[00:00] piscisaureus: brownies: I think you'll have little luck trying to rope ryah [00:00] brownies: ACTION might spend tonight learning node.js [00:00] SubStack: good plan! [00:00] mscdex: brownies: you know you want to :-D [00:00] SubStack: I should work on my nodeconf slides [00:00] brownies: soooo... what's the canonical node.js tutorial for web devs guys? i'm comptent... i write a lot of python and obj C daily. i just thought i could get away with contracting this one out. [00:01] avalanche123 has joined the channel [00:01] mscdex: brownies: some resources: http://www.youtube.com/watch?v=jo_B4LTHi3I http://nodebeginner.org/ http://nodetuts.com/ http://howtonode.org/ http://nodeguide.com/ [00:01] SubStack: brownies: I think it helps more if you have something you want to build in mind first [00:02] brownies: SubStack: i have a live node.js app that i need to debug. [00:02] SubStack: also http://nodejs.org/docs/v0.4.6/api/all.html [00:02] brownies: very much appreciate the links. thanks. [00:02] mscdex: s/v0.4.6/v0.4.7/ [00:02] mscdex: :P [00:02] stagas: s/v0.4.7/latest/ [00:02] mscdex: is latest still updated? [00:03] devdazed has joined the channel [00:03] stagas: I think so [00:03] mscdex: looks like it [00:04] mscdex: i just know that node-latest.tar.gz was pretty stale not that long ago [00:04] mscdex: but that's updated too it seems [00:04] brownies: one quick question. when you write a "proper" node.js app... is the entire thing supposed to be in one file? [00:05] mscdex: it doesn't have to be [00:06] ardcore has joined the channel [00:06] mscdex: you can separate out your app into logical partitions as modules [00:06] ardcore has left the channel [00:06] mscdex: however you want [00:06] bingomanatee has joined the channel [00:06] jesusabdullah: brownies: Define "proper." ;) [00:06] mscdex: for smaller apps, it'll probably be self-contained [00:08] pcardune has joined the channel [00:09] jmar777 has joined the channel [00:10] SvenDowideit has joined the channel [00:12] norviller has joined the channel [00:12] eee_c has joined the channel [00:13] chrislorenz has joined the channel [00:13] kmiyashiro has joined the channel [00:15] markwubben has joined the channel [00:16] vicapow has joined the channel [00:18] moshe: anyone here is experienced with faye? [00:19] cloudhea2 has joined the channel [00:19] click_click has joined the channel [00:19] rchavik has joined the channel [00:19] rchavik has joined the channel [00:20] mscdex: i wonder why faye doesn't use socket.io [00:20] _fat has joined the channel [00:21] vicapow: anyone have experience with connect-auth? [00:21] vicapow: i'm trying to put together a simple example that uses twitter oauth [00:21] vicapow: http://pastebin.com/DYMWKHaf [00:21] vicapow: but i cant get it working [00:21] moshe: mscdex are you familiar with faye? im a basic question [00:22] captain_morgan has joined the channel [00:22] moshe: trying to build a simple chat here [00:22] mscdex: moshe: sorry i'm not, i think i looked at it once back when i was first starting out with node but that was about it [00:22] mscdex: s/starting/started/ [00:22] NuckingFuts: Hey guys, name me some super-ridiculous albums, I've got to design a cover for my Photoshop class :lol: [00:22] cloudhead has joined the channel [00:22] vicapow: NuckingFuts: you're off topic [00:23] NuckingFuts: vicapow: Your point? [00:23] NuckingFuts: lol [00:23] NuckingFuts: I just need some super-hipster albums, and hipsters are always relevant. [00:23] moshe: well maybe you have a clue anyway :)thats the code of both files https://gist.github.com/858a0046ef8771395305 [00:24] moshe: can't get a client to connect the server, coreb said it's because the server isn't static or anything like that so it doesn't know where to look for my client.html file [00:25] marcello3d has joined the channel [00:25] [[zzz]] has joined the channel [00:25] Martz has joined the channel [00:25] stevenj has joined the channel [00:26] dotcomstu has joined the channel [00:26] grncdr has joined the channel [00:26] _fat has joined the channel [00:27] marcello3d: hallo [00:28] mdaisuke has joined the channel [00:28] onar has joined the channel [00:28] mscdex: moshe: looks fine to me i guess... it's straight off the faye examples [00:28] moshe: yeah it is, and it doesn't work :( [00:29] mscdex: moshe: define "doesn't work" [00:29] moshe: right, sorry. well I can open locatlhost:8000 but the only thing I will get is that reponse.write from the server.js file [00:30] moshe: doesn't matter if I enter localhost:8000/client.html or index.html or whatever...always just this message [00:30] Twelve-60 has joined the channel [00:30] onar has joined the channel [00:32] moshe: coleb suggested to set up node.js to serve my client file from the server as a static file and said it will be easier to get done with express but I haven't figured out how and if it's really necessary [00:32] jesusabdullah: Here, hold on, it's a one-liner basically [00:32] jesusabdullah: for serving static files with express or connect [00:32] konobi: middleware [00:32] jesusabdullah: connect.createServer(connect.staticProvider('/home/josh/www/')).listen(8080) [00:32] jesusabdullah: Serve what folder you actually want [00:33] flippyhead has joined the channel [00:33] jesusabdullah: ymmv if you do anything else [00:33] mscdex: jesusabdullah: not sure if the port has to be the same as the server [00:33] jesusabdullah: Easy as pie :3 [00:33] mscdex: *faye server [00:33] jesusabdullah: Yeah, I wouldn't know re: faye [00:33] mscdex: dunno how well faye handles cross-domain [00:33] hoax__ has joined the channel [00:34] mbrevoort has joined the channel [00:34] mscdex: moshe: what is your html file named and where is it located relative to your faye server? [00:35] moshe: html file is client.html and located in the same folder [00:35] moshe: should I replace var server = http.createServer(function(request, response) with the line jesusabdullah wrote ? [00:36] Mrfloyd has joined the channel [00:36] moshe: this is the code of both files https://gist.github.com/858a0046ef8771395305 [00:38] samsonjs_ has joined the channel [00:38] ardcore has joined the channel [00:38] mscdex: moshe: maybe try something like this: https://gist.github.com/eb137a4f8649f8b98956 [00:38] ardcore has left the channel [00:38] mscdex: except change the path to faye.js in there to wherever it's at [00:39] zkirill has joined the channel [00:39] moshe: let me see [00:40] tesseracter: newb here: working with express and jade - can a jade template just take standard html somehow? i'm moving over a project and dont feel like throwing the mental energy into converting it to jade right away. [00:40] brownies: ok let's back up... [00:40] brownies: what're some good links to learn *javascript*? [00:42] c4milo1 has joined the channel [00:42] mikegerwitz: brownies: I recommend Javascript: The Good Parts by Douglas Crockford. Not a link, but does an excellent job of covering the language. (Just ignore his opinions if you wish) [00:42] mscdex: brownies: maybe this would help: https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide [00:42] brownies: mikegerwitz: is it short/readable? i know plenty of other languages so i just need to get up and running fast [00:43] moshe: wait, question... in the index.html file got this line => var client = new Faye.Client('http://localhost:8000/faye', { [00:43] brownies: mscdex: hm, nice, i can probably read all this. thanks. [00:43] moshe: oh wait [00:43] mikegerwitz: brownies: It's less than 200 pages and you can use it as a reference manual if you wish, rather than reading chapter by chapter [00:43] moshe: think i know whats wrong [00:44] moshe: client can't go do http://localhost:8000/faye since there is no such place [00:44] moshe: or well, isn't localhost = the folder of server.js ? [00:45] mikegerwitz: brownies: It goes into great detaila bout grammar, language oddities/gotchas, etc. [00:46] mscdex: moshe: no, the faye server should handle that request, since it matches your "mount point" [00:47] kmiyashiro has joined the channel [00:47] mscdex: moshe: but i don't think the faye server dishes up your html or the faye.js file, so that's why you have to serve that yourself [00:47] moshe: but it's going to the wrong location, no? [00:47] mscdex: what is? [00:48] moshe: oh [00:48] Corren has joined the channel [00:48] moshe: hmm well [00:49] moshe: if mount is /faye , shouldn't my client.html file be at /faye/client.html? [00:50] moshe: or it doesn't matter [00:50] moshe: ? [00:50] mscdex: no [00:50] moshe: ok [00:50] mscdex: from what i gather the "mount point" is the url the browser client uses to do the actual communication with the faye server [00:50] mscdex: s/url/path/ [00:51] moshe: the actual path of the files doesn't matter then [00:51] moshe: alright [00:51] moshe: well, server won't load up now [00:51] Bwen has joined the channel [00:52] moshe: no sorry it does my bad, same message [00:52] mscdex: moshe: so navigating to http://localhost:8000/client.html does not get you the client page? [00:52] mscdex: with the gist i modified ? [00:53] jaket has joined the channel [00:53] moshe: wait, now it gives me a blank page, i guess thats a progress [00:53] Charuru has joined the channel [00:53] captain_morgan has joined the channel [00:53] moshe: oh, an error, cool . ==> events.js:45 [00:53] moshe: throw arguments[1]; // Unhandled 'error' event [00:53] moshe: ^ [00:53] moshe: Error: ENOENT, No such file or directory 'path/to/server.js' [00:53] alek_br has joined the channel [00:53] moshe: moshe@ubuntu:~/faye$ node server.js [00:53] moshe: events.js:45 [00:53] moshe: throw arguments[1]; // Unhandled 'error' event [00:53] mscdex: moshe: right [00:53] moshe: ^ [00:54] moshe: Error: ENOENT, No such file or directory 'path/to/server.js' [00:54] mscdex: moshe: you have to change the path like i said [00:54] moshe: whops, sorry [00:54] mscdex: wait, server.js ? [00:54] montylounge has joined the channel [00:54] moshe: oh ops, i missed that one [00:54] moshe: sorry, let me check again [00:55] moshe: /path/to is from /home/ ? [00:55] moshe: or from that folder? [00:55] mscdex: moshe: did you install faye from npm or from a tarball? [00:56] moshe: npm [00:56] mscdex: oh hrmmm [00:56] zkirill has joined the channel [00:57] mscdex: well you have to somehow get the path to faye.js that comes in the faye distribution [00:57] moshe: I changed the path, now I get a blank page on client.html, and on anything else i get Helloo, non-Bayeux request [00:57] moshe: so do we have a connection now ? [00:57] mscdex: moshe: is faye stored at /home/foo/.npm/faye ? [00:58] mscdex: where foo is your username [00:58] moshe: yup [00:58] mscdex: ok, and does /home/foo/.npm/faye/javascript/faye.js exist? [00:59] moshe: no [00:59] mscdex: :S [00:59] davidwalsh has joined the channel [00:59] moshe: let me list you the files there [01:00] davidascher has joined the channel [01:00] moshe: faye-browser.js , faye-browser-min.js , faye-node.js , history.txt , package.json , readme.txt [01:01] moshe: my npm might doing troubles, wouldnt be the 1st time... ; [01:01] brownies: thanks mikegerwitz. this looks very appealing actually. [01:01] moshe: which one [01:01] jakehow has joined the channel [01:01] moshe: am I missing files mscdex [01:02] mscdex: moshe: he must have a totally different setup in the npm repository than on github then [01:02] mscdex: moshe: one moment [01:02] moshe: alright, thanks [01:02] Metapony has joined the channel [01:03] moshe: I don't have all of those folders [01:03] moshe: nor the rakefile [01:03] moshe: should I git clone it ? [01:04] mscdex: no hold on [01:04] Me1000 has joined the channel [01:05] moshe: oky [01:05] mscdex: moshe: https://gist.github.com/eb137a4f8649f8b98956 [01:05] mscdex: moshe: replace 'foo' with your username in there [01:07] willwhite has joined the channel [01:07] moshe: same... :( [01:07] mikl has joined the channel [01:07] mikl has joined the channel [01:08] chrislorenz has joined the channel [01:08] moshe: oh wait " /home/moshe/.npm/faye/faye-browser-min.js " this isn't the path actually [01:08] mscdex: oh? [01:09] moshe: /home/moshe/.npm/faye/0.5.5/package/faye-browser-min.js is [01:09] mscdex: ok, use that then [01:09] moshe: does it matter or is it fine? [01:09] mscdex: no, use that path you listed [01:10] moshe: i have, no change [01:10] zentoooo has joined the channel [01:10] moshe: this is ridiculous [01:10] vicapow has left the channel [01:10] mscdex: huh... [01:10] mscdex: weird [01:10] k1ttty has joined the channel [01:11] moshe: might need to use that line he posted earlier? [01:12] moshe: connect.createServer(connect.staticProvider('/home/josh/www/')).listen(8080) this one [01:12] mscdex: nah [01:12] mscdex: it's serving up your html file right? [01:13] moshe: well localhost:8000/ gives Helloo, non-Bayeux request but localhost:8000/client.html = blank page [01:13] moshe: so I'm not completely sure what it's doing or serving... [01:13] mscdex: right, it will be blank, because there is nothing on client.html, just some javascript [01:14] moshe: so it doesn't serve the js ? [01:15] moshe: okay, checked, it does serve the html [01:15] mscdex: moshe: check to see what it's loading... use firebug if you're in firefox or the developer tools in chrome [01:15] mscdex: it should tell you if it couldn't load faye.js [01:18] moshe: Uncaught ReferenceError: extension is not defined [01:18] moshe: (anonymous function) [01:18] moshe: thats for the client.addExtension(extension); part [01:19] moshe: remove it and rerun server? [01:19] mscdex: ok, but it was able to load localhost:8000/faye.js ? [01:19] moshe: if(!this.Faye)Faye={};Faye.extend=function(a,b,c){if(!b)return a;for(var d in b){if(!b.hasOwnProperty(d))continue;if(a.hasOwnProperty(d)&&c===false)continue;if(a[d]!==b[d])a[d]=b[d]}return a};Faye.extend(Faye,{VERSION:'0.5.5',BAYEUX_VERSION:'1.0',ID_LENGTH:128,JSONP_CALLBACK:'jsonpcallback',CONNECTION_TYPES:['long-polling','callback-polling','websocket'],MANDATORY_CONNECTION_TYPES:['long-polling','callback-polling','in-process'],ENV:(fu [01:19] moshe: nction(){return this})(),random:function(a){a=a||this.ID_LENGTH;if(a>32){var b=Math.ceil(a/32),c='';while(b--)c+=this.random(32);return c}var d=Math.pow(2,a);return Math.floor(Math.random()*d).toString(36)},commonElement:function(a,b){for(var c=0,d=a.length;c0)i();g=false};var h=function(){f+=1;j()};h()},toJSON:function(a){if(this.stringify)return this.stringify(a,function(key,value){return(this[key]instanceof Array)?this[key]:value});return JSON.stringify(a)},timestamp:function(){var b=new Date(),c=b. [01:20] moshe: crap [01:20] moshe: sorry guys [01:20] piscisaureus has joined the channel [01:20] Nexxy: moshe, allow me to introduce you to http://pastebin.com/ ! [01:20] moshe: anyway it shows this but no error or anything [01:20] brownies: thanks for the help y'all [01:20] moshe: I said I'm sorry. I know pastebin, didn't think it's that long.... [01:20] mscdex: moshe: ok, it looks like it's loading fine then [01:20] moshe: thought its like a line or two tops ... [01:21] Nexxy: 20 lashes with a wet noodle. [01:21] moshe: well if it loads fine why it doesnt execute the publish part? [01:21] mscdex: moshe: try using the client.html from here: https://gist.github.com/eb137a4f8649f8b98956 [01:21] kmwallio has joined the channel [01:22] mscdex: oops, made a edit, now try [01:23] pcardune has joined the channel [01:23] Emmanuel__ has joined the channel [01:24] moshe: blank, no errors [01:24] mscdex: hrmm [01:24] moshe: should i try using the ff firebug too? [01:24] mscdex: moshe: let me try this [01:25] Skhaz has joined the channel [01:25] moshe: alright [01:26] blkcat: brownies: get it all sorted? [01:26] brownies: blkcat: more or less. i'll let the race condition slide for now but i may fix it myself soon. the contractor has his hands full fixing the error that causes the app to crash about 1000 times/day. [01:26] blkcat: haha, priorities ;) [01:27] abraxas has joined the channel [01:28] Nexxy: resource bundling for node? does it exist? I can has combined js/css n stuff? How does it work... anyone care to splain me? [01:31] duncanbeevers: Nexxy: I haven't looked at the whole ecosystem, but the mishoo's uglifyjs is a powerful js beautifier/minifier. [01:32] Nexxy: ooh thank you duncanbeevers, I will investigate this! It seems to be such a trendy approach to reducing overhead, I'd like to work on it [01:33] moshe: mscdex, are you setting it up your own server? [01:33] mscdex: moshe: trying to set it up locally, yes [01:33] mmso has joined the channel [01:33] zkirill has joined the channel [01:33] moshe: are you facing the same problem ? [01:35] beawesomeinstead has joined the channel [01:35] beawesomeinstead has joined the channel [01:36] indiefan2a has joined the channel [01:36] hij1nx has joined the channel [01:37] [[zz]] has joined the channel [01:39] ezl has joined the channel [01:40] moshe: mscdex are you facing the same problem? [01:40] briznad has joined the channel [01:41] miccolis has joined the channel [01:43] seivan has joined the channel [01:43] mscdex: moshe: yeah, i don't know. you'll have to contact the author if you want to get it going [01:43] moshe: oh boy [01:43] mscdex: the module looks outdated and could use a redesign [01:43] moshe: the funny thing is that all i wanted is to create a simple chat [01:43] mscdex: heh [01:44] moshe: mind pointing me to a better direction then? [01:44] jtsnow has joined the channel [01:44] mscdex: moshe: you could probably build something quicker and easier with socket.io [01:44] moshe: ive made one in dnode but ive been told its really really bad, like horrible [01:44] mscdex: that's known to work and a lot of people use it [01:44] mscdex: oh? [01:44] mscdex: why so? [01:44] moshe: do you know dnode [01:45] mscdex: yes [01:45] ngs has joined the channel [01:45] swizard has joined the channel [01:45] moshe: btw, i need to integrate it with rails later on, so it's something to think about [01:45] ditesh|cassini has joined the channel [01:46] mscdex: integrate it how? [01:46] moshe: btw I was referring to this - https://github.com/substack/dnode/blob/master/examples/chat/chat.js [01:46] sivy_ has joined the channel [01:46] moshe: im not sure exactly, but this chat is just a small part out of a big project [01:47] tjholowaychuk has joined the channel [01:47] moshe: connects to a db and everything I suppose [01:47] mscdex: moshe: that chat example looks like it should fit the bill [01:47] mscdex: what's wrong with it? [01:47] moshe: well I actually used it and it works [01:47] daniellindsley has joined the channel [01:48] moshe: but someone told me it's really horrible and no humen begin should use javascript like tht [01:48] moshe: human * [01:48] mscdex: lol [01:48] moshe: im serious, he strongly adviced me to use someone else and suggested http://railscasts.com/episodes/260-messaging-with-faye [01:48] moshe: something else* [01:48] mscdex: well, i'd like to hear their case :-) [01:49] moshe: and then I figured since it's already integrated with rails it's probably a better fit for me [01:49] moshe: well, should I just stick tot this thing then? [01:50] SubStack: I need to clean up that dnode example chat [01:50] moshe: how come? [01:50] mscdex: SubStack is your go-to guy for dnode ;-) [01:50] moshe: Hi substack ;-) [01:50] moshe: yeah I know [01:50] SubStack: well transports doesn't even work anymore [01:50] SubStack: it's now io : { transports : ... } } [01:50] moshe: well good thing you're telling me this now :) [01:51] SubStack: also it should use the pubsub emitter style [01:51] moshe: well, building something really really simple just to see how it works would take long? [01:51] moshe: I'd really really love to get something working [01:52] SubStack: well the chat example works just fine [01:52] SubStack: it's just not quite idiomatic dnode anymore [01:52] moshe: you just said it's outdated and should be replaced :) [01:52] moshe: well I've used that for a bit [01:52] SubStack: yes [01:52] SubStack: it's outdated but it works [01:53] moshe: id like to change it to what you suggested [01:53] langworthy has joined the channel [01:53] SubStack: moshe: have you read my pubsub article? [01:53] moshe: think not [01:53] SubStack: http://substack.net/posts/9bac3e [01:54] alek_br has joined the channel [01:55] SubStack: I should wrap all that up into a nice library [01:55] moshe: I should have my chat based on that then? [01:56] SubStack: so much to do >_< [01:56] SubStack: moshe: depends on what you want to do with your chat [01:56] a2800276_ has joined the channel [01:56] SubStack: if you want multiple rooms and private messages and that sort of thing the pubsub approach will be easier [01:57] SubStack: if you just want to have a simple room the existing example should work fine [01:57] moshe: well I'm still not completely sure because it's for some project I might be working on. basically it's a admin => users chat, no user => user [01:58] moshe: I rather use this but I exhausted from chasing new technology all the time, made like 4 chats so far :\ [01:59] jaket_ has joined the channel [01:59] brweber2 has joined the channel [02:00] themiddleman_itv has joined the channel [02:01] moshe: SubStack are you usually online during these hours? [02:01] markstory has joined the channel [02:02] zkirill has joined the channel [02:03] moshe: SubStack, using the pubsub approach, how I proceed from there to integrate with rails ? [02:04] Yuffster_work has joined the channel [02:05] blueadept: is there a way to get a list of the top contributors to projects on github? [02:05] blueadept: like a ranking [02:06] tjholowaychuk: blueadept: installl git-extras [02:06] tjholowaychuk: and do $ git summary [02:06] tjholowaychuk: https://github.com/visionmedia/git-extras [02:06] tjholowaychuk: unless you just mean in general on GH [02:07] blueadept: um, well let me try this [02:07] blueadept: dude you make this too? [02:07] blueadept: how do you make so much stuff? [02:07] ardcore has joined the channel [02:08] ardcore has left the channel [02:08] tjholowaychuk: that project is old [02:08] blueadept: oh yeah, last year [02:08] SubStack: moshe: I am omniscient [02:08] blueadept: still though [02:08] SubStack: and omnipresent [02:09] moshe: thats good to know [02:09] SubStack: moshe: also there's a dnode-ruby module so you could use that to tie together your node.js and ruby services [02:09] SubStack: which gets far less love than the node version because I don't use it for anything yet [02:09] moshe: where I can find that? [02:09] SubStack: http://github.com/substack/dnode-ruby [02:10] SubStack: also it's on rubygems [02:10] blueadept: tj: ah ok, this is specific, yeah i'm talking about in general on GH [02:10] SubStack: http://rubygems.org/gems/dnode [02:10] moshe: I rather build it on node and integrate, it's faster and generally better, no? [02:10] MikhX has joined the channel [02:10] thorsteinsson has joined the channel [02:11] SubStack: Build it however you want. This is uncharted territory [02:12] moshe: hehe I mean, it's not faster? [02:12] blueadept: tjholowaychuk: what about github in general? [02:13] tjholowaychuk: i dont know [02:13] Lorentz has joined the channel [02:14] moshe: so far ive been told pretty much by everyone I asked to have it on node instead [02:14] rfay has joined the channel [02:15] sivy has joined the channel [02:15] broofa has joined the channel [02:16] moshe: SubStack, just figured I'll hear your 2cents :) [02:16] SubStack: with dnode it's easy to split up functionality by process [02:17] SubStack: and those processes can be any language so long as they can talk the dnode protocol [02:17] Opaque has joined the channel [02:18] moshe: alright, but I do need to use a socket or anything no? I mean there is something in the middle between rails and dnode [02:19] JJMalina has joined the channel [02:20] SubStack: moshe: dnode is in between [02:20] SubStack: moshe: dnode can talk sockets or socket.io [02:22] themiddleman has joined the channel [02:22] crodas has joined the channel [02:22] moshe: alright thanks [02:22] moshe: well im off for now :) [02:22] uho has joined the channel [02:23] gazumps has joined the channel [02:24] ddollar has joined the channel [02:24] ddollar has joined the channel [02:25] ralphholzmann has joined the channel [02:26] walkah has joined the channel [02:26] walkah has joined the channel [02:26] jfalvarez has joined the channel [02:26] EyePulp has joined the channel [02:26] dyer has joined the channel [02:26] dyer has joined the channel [02:29] Twelve-60` has joined the channel [02:29] mmso has joined the channel [02:31] dantalizing has joined the channel [02:31] dantalizing has joined the channel [02:31] defstream has joined the channel [02:32] Twelve-60 has joined the channel [02:34] defstream: any ejs guru's here? [02:35] defstream: wondering if there is a way to determine at run time if a local variable exists inside an ejs template [02:35] yhahn has joined the channel [02:35] tjholowaychuk: defstream: same way you do with javascript [02:35] baudehlo1 has joined the channel [02:35] dnolen has joined the channel [02:35] saikat has joined the channel [02:36] defstream: tj: when running <%= blah %> if blah doesn't exist as a local variable i get a runtime error, even if were to try if() or even <%= blah || 'blahs not here dude' %> [02:36] defstream: this is with express [02:36] tjholowaychuk: yeah [02:36] tjholowaychuk: thats how js works [02:36] tjholowaychuk: :p [02:37] tjholowaychuk: if it's not declared it's an error [02:37] tjholowaychuk: ReferenceError [02:37] kriskowal2 has joined the channel [02:38] Darshan-NowJS has joined the channel [02:38] than1 has joined the channel [02:40] JacobSingh has joined the channel [02:40] defstream: gotchya [02:41] tjholowaychuk: typeof [02:41] tjholowaychuk: or if (locals.foo) [02:41] defstream: sweet, luckily the locals object itself is exposed and <%= locals.blah || 'woot' %> [02:41] defstream: thanks! [02:41] tjholowaychuk: yup [02:41] tjholowaychuk: it's with (locals) {} [02:41] tjholowaychuk: so you can utilize that object [02:44] samsonjs has joined the channel [02:47] temp01 has joined the channel [02:47] piscisaureus has joined the channel [02:48] Votaguz has joined the channel [02:49] ericnakagawa has joined the channel [02:51] indexzero has joined the channel [02:52] andrewfff has joined the channel [02:52] tk has joined the channel [02:54] amerine has joined the channel [02:54] steph021_w has joined the channel [02:55] multipass_ has joined the channel [02:57] bbttxu has joined the channel [02:58] defstream has joined the channel [02:58] pyrony has joined the channel [02:58] andrewfff has joined the channel [03:00] gms has joined the channel [03:02] zkirill has joined the channel [03:02] ngs has joined the channel [03:05] mbrevoort has joined the channel [03:08] seivan has joined the channel [03:08] dguttman_ has joined the channel [03:09] ScottR3 has joined the channel [03:10] skm has joined the channel [03:11] ericnakagawa has joined the channel [03:13] brolin has joined the channel [03:16] Votaguz has joined the channel [03:17] mscdex: node.js rules! [03:19] blkcat: mscdex: damn straight :) [03:20] blueadept: http://www.google.com/trends?q=clojure%2C+node.js%2C+erlang&ctab=0&geo=all&date=ytd&sort=0 node surpasses erlang [03:21] pyrony has joined the channel [03:24] gtramont1na has joined the channel [03:24] xeodox: Hey, has anyone tried mongoose-auth? Need help on something [03:24] blueadept: hm instagram [03:24] blueadept: i like it [03:25] blueadept: can't answer your question perhaps, but im going to check this out [03:26] [1]Corren has joined the channel [03:27] davidascher has joined the channel [03:28] sechrist has joined the channel [03:29] zakabird has joined the channel [03:30] than1 has joined the channel [03:31] bartt has joined the channel [03:32] mike5w3c has joined the channel [03:32] sub_pop has joined the channel [03:32] bits58 has joined the channel [03:34] JusticeFries has joined the channel [03:37] Me1000 has joined the channel [03:37] zivester has joined the channel [03:37] indiefan2a has joined the channel [03:39] Twelve-60` has joined the channel [03:39] ericnakagawa has joined the channel [03:39] mscdex: Aikar: ping [03:40] JacobSingh has joined the channel [03:41] ngs has joined the channel [03:41] kmduke has joined the channel [03:43] pyrotechnick1: http://www.apple.com/au/ :O [03:44] Nexxy: that should say "Now available in a color that will look dirty and scratched within 15 minutes" [03:45] xeodox: has anyone tried Mongoose-auth? [03:45] ditesh|cassini has joined the channel [03:45] MikhX has joined the channel [03:47] kmiyashiro has joined the channel [03:47] KellyM has joined the channel [03:47] skm has joined the channel [03:47] mcantelon has joined the channel [03:52] LowValueTarget has joined the channel [03:52] LowValueTarget: How do i see whats in my require.paths array? [03:52] pcardune has joined the channel [03:53] SubStack: console.dir(require.paths) [03:54] brianc has joined the channel [03:55] mscdex: is require.paths only used if no node_modules dir was found in the current or any parent path? [03:56] dnolen has joined the channel [03:57] astropirate has joined the channel [03:58] ericnakagawa has joined the channel [03:58] jmoyers: can one use a variable in an attribute in jade? [03:58] jmoyers: like: li(id='#{topic._id}', class='topic') [03:58] jmoyers: this doesn't seem to work [03:58] jmoyers: li##{topic._id} either [03:59] LowValueTarget: Thanks SubStack [03:59] LowValueTarget: having a hell of a time getting webservices module to work [04:00] LowValueTarget: got it installed and node looking in the right dir for modules, but 404's on everything [04:00] LowValueTarget: the journey implementation must be screwed [04:00] LowValueTarget has joined the channel [04:02] sleeplessinc has joined the channel [04:04] XaKBooT has joined the channel [04:04] XaKBooT has left the channel [04:05] EvanCarroll: gah [04:06] rchavik_ has joined the channel [04:07] defstream: xedoc, what's your issue? [04:07] rchavik_ has joined the channel [04:08] balaa has joined the channel [04:08] defstream: err xeodox [04:08] xeodox: hey there! [04:09] JacobSingh has joined the channel [04:09] xeodox: defstream: Your'e the first one that can help :) [04:09] xeodox: I'm trying to override findOrCreateUsers [04:09] xeodox: but nothing is working [04:09] defstream: lol, i didnt' say that ;) [04:09] xeodox: have you used mongoose-auth b4? [04:10] xeodox: Basically, here's my problem: http://stackoverflow.com/questions/5813016/has-anyone-used-mongoose-auth-how-do-you-over-ride-findorcreateusers [04:10] defstream: nope, but I'm happy to repo or give it a try myself [04:14] Darshan-NowJS_ has joined the channel [04:15] newy_ has joined the channel [04:17] xeodox: defstream: Do you see the problem? [04:17] defstream: yeah [04:17] defstream: still looking [04:17] xeodox: sweet, thanks :) [04:22] siculars has joined the channel [04:24] flippyhead has joined the channel [04:26] m64253 has joined the channel [04:26] sreeix has joined the channel [04:26] LowValueTarget: Anyone used the webservice module? [04:29] than11 has joined the channel [04:29] defstream: xedox: is that code you pasted what you are trying to implement? [04:29] defstream: what version of mongoose are you using? [04:29] defstream: err mongoose-auth [04:30] than11 has left the channel [04:30] xeodox: latest [04:30] xeodox: defstream: read this https://github.com/bnoguchi/mongoose-auth/issues/7 [04:30] defstream: taking a look at the current facebook auth code it's exactly the same, why override? [04:30] mscdex: LowValueTarget: no, but what's the problem? [04:31] MikhX has joined the channel [04:31] jmorrisssssss has joined the channel [04:31] LowValueTarget: mscdex: Simply not working. Looks like the code is using a deprecated method for Router. I fixed that, but then it seems like the router is not populating any routes -- everything 404's [04:31] jmorrisssssss: anyone know of an inflector module? [04:31] xeodox: defstream: Because I want to generate a username for each new user along with the current facebook data. [04:32] xeodox: defstream: So when the module creates the user, I want it to also create a username field , and a "code" field. [04:32] mscdex: LowValueTarget: oh. well, the author of that module pops in here quite often (JimBastard) [04:33] mscdex: otherwise maybe create an issue on the github repo [04:33] LowValueTarget: Marak is JimBastard? [04:33] mscdex: LowValueTarget: yeah [04:33] LowValueTarget: cool. Thanks [04:33] stonebranch has joined the channel [04:34] jmorrisssssss: brb [04:34] defstream: can you throw your mongoose lines from your app.js on paste bin ? [04:34] xeodox: defstream: OK, so this is basically all I want.. When a new user comes in, I want to create a "username" field in their profile. The username will be their firstname+lastname+ an integer (if the username is taken already) . That's basically it [04:34] defstream: i gotchya [04:34] defstream: as long as your returning the promising user it shoudln't be a problem [04:34] defstream: are you ensuring to call promise.fail in case of any errors? [04:35] xeodox: defsteram: not sure :( I'm a noob and don't know how to read the OOP code. I just hack stuff together :/ haha [04:35] xeodox: defstream: http://pastebin.com/GWgt1Pza [04:40] techwraith has joined the channel [04:42] kmiyashiro has joined the channel [04:42] xeodox: defstream: Yes, I do return promise at the very end. But I don't even know what the "promise" is haha [04:43] kmiyashiro has joined the channel [04:43] newy_ has joined the channel [04:44] defstream: okay [04:44] defstream: check out the http://pastebin.com/32QPJvq8 [04:44] defstream: see if you get any more details [04:44] beriberikix has joined the channel [04:46] beriberikix: Hey all, I'm been trying to get require to work [04:46] beriberikix: I recently updated to 0.4.7 and on one machine, require doesn't find express [04:47] Skhaz_ has joined the channel [04:47] xeodox: defstream: the same error still happens. (After the redirect, req.loggedIn is fine, but req.user is undefined). Nothing else changed. [04:47] matjas has joined the channel [04:48] saikat has joined the channel [04:49] MikhX has joined the channel [04:49] Skhaz_ has left the channel [04:49] brownies has joined the channel [04:49] xeodox: defstream: My /account/prep (the redirect) the code is this: http://pastebin.com/ebTcKnZT [04:49] sub_pop has joined the channel [04:52] tyler-iphone has joined the channel [04:54] trentm has joined the channel [04:56] defstream: did you remove the routing info in your pastebin of the mongoose lines? [04:57] defstream: can you throw in your setting up express? [04:58] sridatta has joined the channel [05:00] sridatta: I'd like to fire an event when node's processor usage becomes too high. should I just get the process.pid and poll 'top' periodically? [05:01] xeodox: defstream: What do you mean throw remove routing info? [05:01] dguttman has joined the channel [05:02] themiddleman has joined the channel [05:03] defstream: nm it wasnt needed [05:04] defstream: but if you could show me how your initailizing your app it and connecting mongoose-auth it would be great [05:04] xeodox: defstream: here's my entire app http://pastebin.com/Chy2rF9H [05:05] xeodox: defstream: The main problem is that "req.user" is undefined for some reason. [05:06] deepthawtz has joined the channel [05:08] defstream: and it worked fine when removing the findOrCreateUser method alone? [05:09] CIA-72: node: 03isaacs 07v0.4 * r7c6f014 10/ lib/stream.js : (log message trimmed) [05:09] CIA-72: node: Better stream.pipe() tracking. [05:09] CIA-72: node: This commit does three things: [05:09] CIA-72: node: 1. Uses an exposed counter rather than a hidden array for tracking dest [05:09] CIA-72: node: streams that may have multiple inputs. This allows for significantly [05:09] CIA-72: node: faster lookups, since the counter can be checked in constant time rather [05:09] CIA-72: node: than searching an array for the dest object. (A proper O(1) WeakMap [05:09] MikhX has joined the channel [05:09] xeodox: defstream: when removing findOrCreateUser, everything worked perfectly. req.user had something. [05:10] Bonuspunkt has joined the channel [05:11] defstream: check out http://pastebin.com/tRj8LPje [05:11] paolodedios has joined the channel [05:11] dhchow has joined the channel [05:12] xeodox: whats the difference? [05:13] xeodox: oh, the create user part [05:13] xeodox: defstream: No, it's still undefined for req.user [05:14] xeodox: defstream: could it be something to do with promise, self.this? [05:15] seivan has joined the channel [05:17] indexzero has joined the channel [05:19] brownies has joined the channel [05:20] sridatta: question: what happens when node.js runs out of OS file descriptors? does it stop accepting new connections or does it crash? [05:21] jacter has joined the channel [05:21] dandean has joined the channel [05:21] dguttman has joined the channel [05:22] Spion_ has joined the channel [05:24] langworthy has joined the channel [05:25] ddollar: anyone know if it is possible to statically compile node? [05:25] ddollar: my google-fu is failing me [05:25] defstream: xerodox: i've updated the app http://pastebin.com/08wsMuUa [05:25] defstream: my last chance [05:27] rfay has joined the channel [05:27] mscdex: sridatta: it'll probably throw an exception or something, i forget which one it is [05:28] mscdex: ENOMEM or something [05:28] mscdex: ddollar: it is statically compiled, minus openssl [05:28] xeodox: defsream: Thanks , but it still didn't fix it. Thanks a lot for spending the time, though [05:29] MikhX has joined the channel [05:29] xeodox: defstream: where you located? [05:30] defstream: la [05:30] mscdex: los angeles or lousiana? [05:30] mscdex: :P [05:30] defstream: los angeles haha [05:31] halfhalo: gotta love LA... yesterday it was 70ish today it was 93F [05:31] defstream: defiantely gotta hit up the beach soon [05:32] xeodox: ahh i see [05:32] xeodox: i'm in SF :/ [05:32] xeodox: LA is awesome [05:32] xeodox: SF sucks [05:33] SvenDowideit_ has joined the channel [05:35] beawesomeinstead has joined the channel [05:35] beawesomeinstead has joined the channel [05:37] Guest12666 has joined the channel [05:38] balaa has joined the channel [05:39] sridatta: mscdex: seems to be EMFILE error. if I were to catch this exception, is there a way to refuse further connections rather than catastrophically failing? [05:41] SamuraiJack has joined the channel [05:41] amerine has joined the channel [05:42] onre_ has joined the channel [05:49] briznad has joined the channel [05:49] MikhX has joined the channel [05:50] Nexxy has joined the channel [05:51] Twelve-60 has joined the channel [05:52] click_ has joined the channel [05:53] Corren has joined the channel [05:55] mengxy has joined the channel [05:55] JacobSingh has joined the channel [05:57] SvenDowideit_ has joined the channel [05:58] lightcap has joined the channel [05:59] indutny has joined the channel [05:59] niftylettuce has joined the channel [05:59] admc has joined the channel [06:00] bingomanatee has joined the channel [06:02] Xano has joined the channel [06:02] dguttman_ has joined the channel [06:02] JimBastard has joined the channel [06:04] doki_pen has joined the channel [06:06] Aria has joined the channel [06:07] aho has joined the channel [06:10] hoodow has joined the channel [06:10] click_ has joined the channel [06:10] Druide_ has joined the channel [06:11] mytrile has joined the channel [06:13] onre_ has joined the channel [06:14] andrewfff has joined the channel [06:14] isaacs has joined the channel [06:16] stonebranch has joined the channel [06:17] real_ate_ has joined the channel [06:18] newy_ has joined the channel [06:19] onre_ has joined the channel [06:20] karboh has joined the channel [06:21] sh1mmer has joined the channel [06:25] ngs has joined the channel [06:26] MikhX has joined the channel [06:30] coreb has joined the channel [06:33] fangel has joined the channel [06:40] onre_ has joined the channel [06:41] k1ttty has joined the channel [06:45] jmoyers_ has joined the channel [06:45] febits has joined the channel [06:45] ph^ has joined the channel [06:46] onre_ has joined the channel [06:47] niftylettuce: \o [06:48] matjas has joined the channel [06:48] niftylettuce: who wants to make the best framework/stack ever with me [06:48] niftylettuce: node.js, express.js, mongodb, jade, sass, html5 boilerplate [06:48] niftylettuce: who's in? [06:49] F1LT3R has joined the channel [06:50] V1 has joined the channel [06:51] onre_ has joined the channel [06:53] JacobSingh has joined the channel [06:54] Dreamer3_ has left the channel [06:54] Dreamer3_ has joined the channel [06:54] davidascher has joined the channel [06:56] steph021 has joined the channel [06:57] niftylettuce: oy :( [06:58] dhasenan: Show some neat code and it might stick with someone. [06:58] emattias has joined the channel [06:59] Tod has joined the channel [07:00] bergie has joined the channel [07:02] brownies: is anyone here using mongous? [07:02] niftylettuce has joined the channel [07:03] brownies: how do you handle the race condition that occurs when you save something and then want to redirect to a page that needs to access that info? [07:03] Virtuo has joined the channel [07:04] zkirill has joined the channel [07:04] kristsk has joined the channel [07:04] onre_ has joined the channel [07:05] pyrony has joined the channel [07:07] LowValueTarget: mscdex: My bad earlier ... JimBastard had fixed the code and npm was outdated. Source on Github was correct. [07:07] JimBastard: nice [07:07] Aria: brownies: Save it first, send the redirect second? [07:07] JimBastard: yeah, i forgot to do an npm publish like a month ago [07:07] JimBastard: webservice.js is a fun library [07:07] LowValueTarget: Love it. Dont need anything but a few simple webservices. Makes it fast and simple [07:08] coreb: brownies: mongoose? [07:08] brownies: coreb: mongous != mongoose unfortunately. [07:08] brownies: Aria: well the problem is that the save is asynchronous. and the genius who wrote mongous didn't structure it so that save could have a callback. [07:08] Aria: ... Doh. [07:09] SubStack: damn really need to work on my dnode slides [07:09] SubStack: only 1 more week! [07:09] JimBastard: SubStack: cant wait for tomorrow! [07:09] SubStack: yep! [07:10] sechrist: oh snap [07:10] JimBastard: i think cramforce is coming too [07:10] sechrist: I plan to show up [07:10] sechrist: but I work in south bay [07:10] gf3 has joined the channel [07:10] SubStack: I'll just ride my bike down there from the bart [07:10] sechrist: it's haaaard [07:10] JimBastard: sechrist: nice! [07:10] sechrist: 6:45 should be ok [07:10] SubStack: should be flat since it traces the coast [07:10] binaryjohn has joined the channel [07:10] sechrist: SubStack: I moved up to the city [07:10] mraleph has joined the channel [07:10] sechrist: well daly city [07:11] loob2 has joined the channel [07:11] sechrist: but one block or so from daly city bart [07:11] JimBastard: sechrist: if you are a little late its fine, we'll be there [07:11] sechrist: so yeah [07:11] JimBastard: just remember the super secret password [07:11] sechrist: begins with N and ends in U? [07:11] JimBastard: ^_^ [07:11] JimBastard: NO U [07:11] sechrist: you have to rap though [07:11] sechrist: I hope you can freestyle [07:12] SubStack: http://substack.net/images/dnode.png [07:12] JimBastard: whats freestyle? [07:12] sechrist: that's freestyle [07:12] sechrist: substack knows what's up [07:12] JimBastard: SubStack: nice ahaha [07:13] SubStack: more where that came from [07:13] SubStack: at nodeconf! [07:13] sechrist: hmm so I should probably go to work early [07:13] sechrist: so I can leave earlier than 8 [07:13] sechrist: without feeling like an ass [07:13] JimBastard: just dont eat a heavy lunch, trust me on that [07:13] sechrist: early = before 1pm [07:13] sechrist: oh man I looked up the house of air [07:14] sechrist: that stuff is sick [07:14] sechrist: people will get injured :D [07:14] JimBastard: yes it is [07:14] SubStack: they'd better [07:14] isaacs: JimBastard: hey! [07:14] JimBastard: im bringing one of the interns [07:14] JimBastard: dont hurt him too badly [07:14] JimBastard: sup isaacs [07:14] sechrist: i'll be making sure I don't hurt myself [07:14] sechrist: there's dodgeball? [07:14] V1: pff no ninja turtles SubStack? [07:14] isaacs: any chance that rap'll be done by this weekend? [07:14] SubStack: not yet [07:15] isaacs: i wanna put an easter egg in npm [07:15] SubStack: also if you need art for your nodeconf talk I can hook you up [07:16] sechrist: isaacs: it's not an easter egg if everybody in #nodejs knows about it lol [07:17] JimBastard: isaacs: i doubt it, most of my audio gear is in transit. i dont want to rush it [07:17] coreb: brownies: consider rewriting it to use mongoose, or else you'll need to have a loop with timed callbacks that do the mongodb poll [07:17] JimBastard: isaacs: im also trying to get zedshaw to drop some guitar licks for the beat [07:17] sechrist: You moving out here or just visiting? [07:17] isaacs: JimBastard: rad [07:17] mikeal has joined the channel [07:17] sechrist: hah I'd like to meet zed [07:17] isaacs: sechrist: meh, everybody finds the easter eggs [07:17] JimBastard: sechrist: http://blog.nodejitsu.com/the-west-coast-hack-haus [07:17] sechrist: programming-motherfucker.com is my new religion [07:17] isaacs: sechrist: that's what they're there for :) [07:17] SubStack: I need to get some furnature for the stackhaus in oakland [07:17] JimBastard: sechrist: moved out here [07:18] sechrist: hah [07:18] sechrist: you NYC people [07:18] SubStack: I should just build some out of crap I find like my place in fairbanks [07:18] sechrist: all move back [07:18] brownies: coreb: ouch. so i'd have to do a loop that constantly checks the db to see if the new entry exists, then redirect when true? that sounds so ugly. [07:19] jesusabdullah: Do they dumpster dive there? [07:19] SubStack: jesusabdullah: the homeless people pick them over pretty well [07:19] coreb: brownies: not constantly, timed callbacks [07:19] micheil has joined the channel [07:19] SubStack: also the streets are dumpsters on account of the trash pickup [07:19] brownies: coreb: still sounds ugly. [07:19] mAritz has joined the channel [07:19] coreb: usually it would suffice with once or twice, but sure, it gets ugly when you need that and don't have a callback [07:20] coreb: brownies: so rewrite it to use a callback, your solution is hopeless to begin with [07:20] brownies: coreb: yup. i blame the other guy, for picking mongous. *grumbles* [07:21] sechrist: man the house of air is a pain to get to without busses or cars [07:21] sechrist: i've been spoiled since I moved here [07:21] sechrist: in Texas you have to drive to do anything [07:21] SubStack: I'm taking my bike [07:21] sechrist: I need to get a bike [07:22] sechrist: is it cool to bring non-foldable ones on bart? [07:22] SubStack: certain hours [07:22] mytrile has joined the channel [07:23] JimBastard: sechrist: you epic busy right? you feel like helping test out jitsu and deploying an application to our platform? once you npm install jitsu, it should take about 15 seconds [07:23] JimBastard: i can activate your beta account [07:23] sechrist: not epic busy right now [07:23] sechrist: sure [07:24] JimBastard: do a [07:24] JimBastard: [sudo] npm install jitsu [07:24] sechrist: better question is how old my node is on my actual mac [07:25] JimBastard: npm will let you know if its < 0.4.0 [07:25] JimBastard: we are requiring that version for jitsu [07:25] isaacs: sechrist: node -v [07:25] sechrist: makes sense [07:25] sechrist: yeah i'm good [07:25] sechrist: doing it now [07:25] sechrist: aight [07:25] sechrist: oooh pretty [07:26] JimBastard: i dont see an account for sechrist, can you signup again @nodejitsu.com ? [07:26] sechrist: you do now [07:26] seivan has joined the channel [07:26] sechrist: also wow this is slow [07:26] sechrist: optimize [07:26] JimBastard: okay, should be confirmed... [07:26] sechrist: it stalled [07:27] JimBastard: now just create a directory anywhere, touch a server.js or whatever.js file, put in some node code ( this is a good test: https://github.com/Marak/hellonode/raw/master/server.js [07:27] JimBastard: then just type, jitsu deploy [07:27] sechrist: no hold on [07:27] sechrist: your app froze [07:27] sechrist: is that normal [07:27] sechrist: i'm going to have to ctrl+c [07:27] JimBastard: lol? jump into #nodejitsu, lets not spam here [07:29] mytrile has joined the channel [07:31] pdelgallego has joined the channel [07:31] pdelgallego_ has joined the channel [07:31] onre_ has joined the channel [07:32] saschagehlich has joined the channel [07:32] djcoin has joined the channel [07:34] k1ttty has joined the channel [07:34] Druide_ has joined the channel [07:35] ChrisPartridge has joined the channel [07:37] d0k has joined the channel [07:38] chapel: JimBastard: I will try to deploy my app again [07:38] JimBastard: chapel: update jitsu [07:38] JimBastard: for sure [07:38] JimBastard: not sure what version you have, but it auto-increments SemVer nwo [07:38] JimBastard: now* [07:38] JimBastard: on deployment [07:38] JimBastard: also automatic snapshot names [07:39] chapel: :) [07:41] onre has joined the channel [07:42] msucan has joined the channel [07:42] chapel: JimBastard: you aren't using node-colors for jitsu? [07:43] JimBastard: chapel: hrmmm? [07:43] JimBastard: chapel: your question makes odd sense to me [07:43] JimBastard: chapel: as the library is called: "colors", and we are using it? [07:44] ivanfi has joined the channel [07:44] dies_el has joined the channel [07:46] harrythe has joined the channel [07:47] chapel: hmm [07:47] harrythe: hi [07:48] harrythe: l [07:48] chapel: http://search.npmjs.org/#/colors [07:49] ehedenst has joined the channel [07:51] JimBastard: chapel: so whats the question? im so confused [07:52] chapel: did you use colors (your module) in jitsu? [07:52] JimBastard: yeah [07:52] JimBastard: dont you see the colors? [07:52] troessner has joined the channel [07:52] chapel: yeah, I didn't see it when I installed it through npm [07:52] onre_ has joined the channel [07:52] jelveh has joined the channel [07:53] JimBastard: chapel: you high? https://github.com/nodejitsu/jitsu/blob/master/package.json#L19 [07:53] sendark has joined the channel [07:53] JimBastard: if so, pass that shit over here [07:53] JimBastard: :-D [07:53] ChrisPartridge: ACTION laughs [07:53] JimBastard: npm should install that, its also a sub-dep of winston [07:54] JimBastard: so it should definitely install [07:54] niftylettuce: when/where is nodeconf [07:54] niftylettuce: im goin [07:54] niftylettuce: linky plz [07:54] isaacs: niftylettuce: http://nodeconf.com [07:54] isaacs: niftylettuce: it's next week in portland [07:55] teemow has joined the channel [07:55] niftylettuce: i'm student that is my finals week [07:55] niftylettuce: i would get student rate on flight/hotel/ticket [07:55] niftylettuce: but... [07:55] chapel: JimBastard: its probably cause I have colors already installed [07:55] JimBastard: yeah [07:55] niftylettuce: can anyone broadcast it to me? [07:55] chapel: not high, just tired [07:55] chapel: I used colors with restartr [07:55] JimBastard: npm wont reinstall stuff if its already istalled [07:56] chapel: `v git restartr chapel @ JimBastard [07:56] v8bot: JimBastard: gregjan's Profile - GitHub - https://github.com/gregjan [07:56] chapel: wtf [07:56] chapel: `v git restartr @ JimBastard [07:56] v8bot: JimBastard: aaronblohowiak/restartr - GitHub - https://github.com/aaronblohowiak/restartr [07:56] chapel: there [07:56] niftylettuce: howcaniattendificantattend [07:56] niftylettuce: :X [07:56] niftylettuce: east coast ughh [08:00] jacter1 has joined the channel [08:00] eldios has joined the channel [08:01] TomY has joined the channel [08:01] ezmobius has joined the channel [08:02] chapel: JimBastard: I just noticed something [08:02] chapel: when you find dependencies, it asks to write them [08:02] chapel: this is on deploy [08:02] chapel: but then, for the semvar stuff [08:02] chapel: it asks to write them, and overwrites the dependencies stuff [08:03] JimBastard: chapel: interesting, and i suppose it doesnt throw an error because we've resolved the deps on the server. can you open up an issue for that? seems like a problem [08:03] chapel: kk [08:03] chapel: `v git jitsu [08:03] v8bot: chapel: nodejitsu/jitsu - GitHub - https://github.com/nodejitsu/jitsu [08:05] FireFly|n900 has joined the channel [08:05] skm has joined the channel [08:06] gavin_huang has joined the channel [08:07] chapel: also JimBastard when you get a 404, the links at the bottom aren't right [08:08] chapel: instead of devlop.nodejitsu.com they are dev.nodejitsu.com [08:08] chapel: as far as account and what not [08:09] onre_ has joined the channel [08:09] JimBastard: chapel: fixing now, thanks [08:09] hackband has joined the channel [08:09] JimBastard: chapel: join #nodejitsu for nodejitsu chat, dont want to spam the room here too much [08:10] chapel: :) [08:10] jesusabdullah: JimBastard: Are there gonna be idlers this time? [08:10] JimBastard: jesusabdullah: ive been moving for the past 3 months, once my desktop is setup here i will be on 24/7 with logging [08:10] JimBastard: just hard with my laptop [08:10] jesusabdullah: Yeah, sure [08:10] jesusabdullah: Just last time I checked it it was indexzero only XD [08:10] JimBastard: computer is enroute though, in the mail [08:10] JimBastard: yeah, we just got new hires too [08:10] jesusabdullah: Word [08:10] JimBastard: so they will be in there [08:11] jesusabdullah: Oh sweet [08:11] fyskij has joined the channel [08:11] thalll has joined the channel [08:13] Rodtusker has joined the channel [08:13] mc_greeny has joined the channel [08:13] XYXing has joined the channel [08:14] onre_ has joined the channel [08:16] mikl has joined the channel [08:20] onre_ has joined the channel [08:21] saschagehlich_ has joined the channel [08:24] fayce has joined the channel [08:25] onre_ has joined the channel [08:25] mdaisuke_ has joined the channel [08:25] saschagehlich has joined the channel [08:25] mike5w3c has joined the channel [08:25] tokumine has joined the channel [08:25] mscdex: sridatta: yeah, close the server [08:29] JJMalina has joined the channel [08:29] tauren has joined the channel [08:32] hoodow_ has joined the channel [08:33] markwubben has joined the channel [08:36] n2liquid has joined the channel [08:37] coreb has joined the channel [08:39] irPhunky has joined the channel [08:39] adnam has joined the channel [08:42] robm has joined the channel [08:42] Schmallon has joined the channel [08:42] n2liquid: how should I implement the decorator pattern in JavaScript? [08:43] n2liquid: I need to take an object and decorate it, adding functions, adding pre/post wrappers on functions, etc [08:43] n2liquid: something like Mongoose's "pre" function they call a "middleware" system [08:43] adnam: n2liquid: hmm, would it differ from any other language? [08:44] n2liquid: adnam: not really, I just don't want to rewrite existing solutions [08:44] n2liquid: Mongoose, for one, did that already [08:44] adnam: n2liquid: Joose has support for method modifiers http://openjsan.org/doc/s/sa/samuraijack/Joose/3.006/lib/Joose/Manual/MethodModifiers.html [08:44] n2liquid: adnam: hm, gonna check it out, thx [08:45] SamuraiJack: http://joose.github.com/Joose/doc/html/Joose/Manual/MethodModifiers.html [08:46] mdaisuke has joined the channel [08:46] johnnywengluu has joined the channel [08:47] onre_ has joined the channel [08:48] moshe has joined the channel [08:49] jamey-uk has joined the channel [08:51] pt_tr has joined the channel [08:51] bzinger has joined the channel [08:52] onre_ has joined the channel [08:54] fr0stbyte_ has joined the channel [08:55] CIA-72: node: 03koichik 07v0.4 * r1343ee8 10/ (doc/api/http.markdown doc/api/https.markdown): Doc improvements. - http://bit.ly/k74SNa [08:55] stephank has joined the channel [08:56] k1ttty has joined the channel [08:57] ian-london has joined the channel [08:57] CIA-72: node: 03koichik 07v0.4 * rfcc04e6 10/ (lib/buffer.js test/simple/test-buffer.js): Fix SlowBuffer.write() with 'ucs2' throws ReferenceError. - http://bit.ly/j0njf8 [08:57] ezmobius has joined the channel [08:58] onre__ has joined the channel [09:02] Charuru has joined the channel [09:03] jetienne has joined the channel [09:06] onre_ has joined the channel [09:07] bonfo has joined the channel [09:07] bonfo: hi all [09:08] pkrumins has left the channel [09:08] bonfo: i have an issue with openssl [09:09] confoocious has joined the channel [09:09] bonfo: configure says can not find it, but it is installed on the machine (ubuntu) [09:09] bonfo: any suggestion? [09:09] guybrush: https://github.com/joyent/node/issues/880 [09:09] guybrush: bonfo: --^ [09:10] bonfo: thanks guybrush, but the errror is not in make, but in configure [09:11] onre_ has joined the channel [09:11] guybrush: ah k [09:12] guybrush: so you installed openssl? :) [09:12] mscdex: bonfo: install libssl-dev [09:12] boehm has joined the channel [09:13] n2liquid: does anyone know why npm is returning 'ERR! Error: ECONNREFUSED, Could not contact DNS servers' when my connection is working perfectly? [09:13] n2liquid: (under Windows/Cygwin) [09:13] mscdex: n2liquid: what do you have your /etc/resolv.conf set to? [09:14] n2liquid: mscdex: sorry, Cygwin doesn't appear to have that [09:14] mscdex: i'd create it then [09:14] n2liquid: and put what? [09:14] mscdex: with some nameserver entries in there [09:14] n2liquid: mscdex: e.g.? [09:14] guybrush: nameserver 8.8.8.8 [09:15] mscdex: yep [09:15] n2liquid: well.. [09:15] n2liquid: shouldn't my DNS do that for me? [09:15] n2liquid: resolve stuff [09:15] mscdex: not always [09:15] n2liquid: it certainly should, though, lol [09:15] bonfo: mscdex: i've installed libssl-dev and libssl0.9.8 (checked with apt-cache) [09:15] mscdex: yeah, but this is cygwin we're talking about [09:15] mscdex: ;) [09:15] n2liquid: mscdex: ah.. [09:16] mscdex: bonfo: ok, when you ./configure does it say it found the headers and the function ? [09:16] mscdex: the init function or whatever [09:16] guybrush: bonfo: gist the log [09:18] onre_ has joined the channel [09:18] guybrush: `openssl version` [09:18] mscdex: bonfo: if it says 'not found' for 'checking for openssl' but says 'found' for the following two lines where it checks for headers and the openssl init (iirc) function, you're fine [09:19] jelveh has joined the channel [09:19] mscdex: bonfo: ./configure will bomb if it can't find what it needs for openssl, unless you explicity tell it --no-openssl or some such [09:20] mscdex: so if it configures successfully, you're fine [09:20] n2liquid: .. ok, seriously [09:20] n2liquid: you're kidding me npm doesn't work under Cygwin, right? [09:20] mscdex: no idea [09:21] JimBastard: i think ive seen it work under cywin [09:21] n2liquid: :\ [09:21] bonfo: Checking for program g++ or c++ : /usr/bin/g++ Checking for program cpp : /usr/bin/cpp Checking for program ar : /usr/bin/ar Checking for program ranlib : /usr/bin/ranlib Checking for g++ : ok Checking for program gcc or cc : /usr/bin/gcc Checking for program ar : /usr/bin/ar Checking for program ranlib : /u [09:21] JimBastard: all the cool kids use *nix [09:21] bonfo: sorry, i will send the log manually [09:21] n2liquid: no cool kid do real gamedev, then ;) [09:22] bonfo: Checking for openssl : not found [09:22] bonfo: Checking for function SSL_library_init : not found [09:22] moshe: I tried to use the hash libary var Hash = require('hashish'); and I get cannot find module traverse/hanish but I just installed it with npm install traverse .... [09:22] bonfo: Checking for header openssl/crypto.h : not found [09:22] guybrush: bonfo: did you check http://node-js.prcn.co.cc/ ? [09:22] TheDeveloper has joined the channel [09:22] TheDeveloper: morning [09:23] bonfo: guybrush: i'm compiling for linux (ubuntu) [09:23] moshe: morning [09:23] guybrush: ah lol [09:23] guybrush: n2liquid: did you check http://node-js.prcn.co.cc/ ? :D [09:23] onre_ has joined the channel [09:23] herbySk has joined the channel [09:24] bonfo: openssl version: OpenSSL 0.9.8o 01 Jun 2010 [09:24] n2liquid: guybrush: I have to compile addons for this particular project, so I thought I should compile Node myself..? [09:24] moshe: I tried to use the hash libary var Hash = require('hashish'); and I get cannot find module traverse/hanish but I just installed it with npm install traverse and git cloned it ... [09:25] guybrush: uuuh i dont know how to do addons for node on cygwin [09:25] mdaisuke has joined the channel [09:25] n2liquid: hm [09:25] n2liquid: really needed, though [09:25] guybrush: mhm [09:25] n2liquid: I'm embedding NodeJS in a cross-platform game engine [09:25] mscdex: bonfo: what version of ubuntu? [09:26] SubStack: moshe: in what module? traverse/hash went away and became hashish [09:26] moshe: yeah I noticed [09:26] moshe: so I should do npm install hanish ? [09:27] SubStack: where to you get 'cannot find traverse/hash'? [09:27] moshe: when I try to run pub.js [09:28] SubStack: so um [09:28] SubStack: just replace 'traverse/hash' with 'hashish' [09:28] moshe: I did... [09:29] onre_ has joined the channel [09:29] bonfo: ubuntu 10.10 [09:30] mengxy has left the channel [09:31] mengxy has joined the channel [09:31] jamey-uk: n2liquid: your game engine sounds interesting, what sort of games? [09:32] mscdex: bonfo: hrm... what if apt-get install pkg-config ? [09:33] bonfo: SOLVED: libssl-dev was not updated, running apt-get install libssl-dev and the running configure again worked ;) [09:33] mscdex: ah [09:33] bonfo: thanks all ;) [09:33] mengxy has left the channel [09:33] mscdex: :) [09:33] mengxy has joined the channel [09:34] mengxy has left the channel [09:34] mengxy has joined the channel [09:34] onre_ has joined the channel [09:34] path[l] has joined the channel [09:34] Gruni has joined the channel [09:35] littke has joined the channel [09:37] n2liquid: can I install an npm package available locally? [09:38] n2liquid: jamey-uk: japanese games, RPG-like [09:38] n2liquid: sorry for the lag, mIRC sucks and didn't beep me [09:39] sechrist: people actually use mirc? [09:40] onre has joined the channel [09:40] n2liquid: didn't bother to find another IRC client for Windoze [09:40] TheDeveloper: I'm on trillian atm, s'ok... [09:40] n2liquid: I'll check it later [09:41] n2liquid: anyways, can I download an npm package and manually install it? [09:41] SubStack: n2liquid: you can but why? [09:41] SubStack: also you can npm link [09:41] n2liquid: SubStack: I'm under Cygwin and for some reason npm can't resolve the registry address [09:42] n2liquid: tried setting it up on /etc/resolv.conf but that didn't help [09:42] n2liquid: just 'ERR! Error: ECONNREFUSED, Could not contact DNS servers' bullshit [09:43] n2liquid: I'll try npm linking, but any other help would be much appreciated [09:43] mengxy: i got that error in my server too! Then I add a resolv record in my /etc/hosts [09:43] eldios: °_° [09:43] eldios: http://www.cracktwo.com/2011/04/made-portal-themed-casemod-237-pics.html [09:43] stonebranch has joined the channel [09:44] jamey-uk: n2liquid: can't you just extract to directory, change into that and then run 'npm install'? [09:45] n2liquid: jamey-uk: uh, gonna try, thx [09:45] snearch has joined the channel [09:47] Shrink has joined the channel [09:48] mengxy has left the channel [09:48] Killerbang has joined the channel [09:49] mengxy has joined the channel [09:49] daskog has joined the channel [09:49] daskog has joined the channel [09:49] n2liquid: jamey-uk: npm install on the directory worked, thx [09:49] n2liquid: are you into gamedev? [09:50] jamey-uk: no worries :) not particularly but my friend wants me to be so I can help dev him an RPG-like game in fact [09:50] mengxy has left the channel [09:51] jamey-uk: n2liquid: is your code free to look at? [09:51] mscdex: eldios: http://goo.gl/69Wbd [09:51] mengxy has joined the channel [09:52] eldios: mscdex, already saw that.. arduino ftw ;) [09:52] brweber2_ has joined the channel [09:52] saschagehlich has joined the channel [09:52] mscdex: :) [09:53] nmtmason has joined the channel [09:54] moshe: while installing browserify I got this error 3 times => npm WARN publish-everything chainsaw@0.0.7 Adding entire directory to tarball. Please add a [09:54] moshe: npm WARN publish-everything chainsaw@0.0.7 .npmignore or specify a 'files' array in the package.json [09:54] moshe: . does it matter? [09:54] BenC[UK] has joined the channel [09:54] SubStack: oh stupid npm [09:55] mscdex: heh [09:55] SubStack: why isn't that the default? [09:55] SubStack: isaacs should fix that [09:55] mscdex: !seen isaacs [09:55] mscdex: :P [09:55] moshe: oh hi mscdex :) [09:56] moshe: well, do I need to install it again or anything? [09:56] mscdex: yo [09:56] BenC[UK]: hey guys, I came accross node.js the other day, and am having a play with it.. [09:56] moshe: when I run web.js I get Error: Cannot find module 'dnode/package.json' [09:56] moshe: . I do have json installed tho [09:56] charliesome has joined the channel [09:56] mscdex: that's odd [09:56] BenC[UK]: I've taken the very first example on the nodejs.org website.. [09:57] SubStack: there, updated browserify [09:57] BenC[UK]: and added a counter into it [09:57] BenC[UK]: but, its going up in 2's [09:57] saschagehlich has joined the channel [09:57] charliesome: BenC[UK]: can i see your code? [09:57] moshe: so I run install broswerify again? [09:57] BenC[UK]: code is here: http://pastebin.com/6T5PWyTx [09:57] mscdex: BenC[UK]: it's probably your browser requesting favicon.ico [09:57] charliesome: yep [09:57] BenC[UK]: ah [09:57] BenC[UK]: duh, stupid browser [09:58] mscdex: :) [09:58] BenC[UK]: completely forgot about that [09:58] charliesome: BenC[UK]: just check that request.uri is "/" and you should be fine [09:58] mscdex: that one gets new users every time :-D [09:58] BenC[UK]: thanks [09:58] moshe: well installation went fine but I still get the Error: Cannot find module 'dnode/package.json' [09:58] moshe: ... [09:58] SubStack: moshe: can you require('dnode') from the repl? [09:59] moshe: well I could run the client.js example and it uses dnode , so it means yes? [09:59] sreeix has joined the channel [09:59] BenC[UK]: hmm, request.uri is undefined [10:00] mscdex: BenC[UK]: it's request.url [10:00] Corren has joined the channel [10:01] BenC[UK]: perfect, thanks :) [10:01] jacter has joined the channel [10:01] BenC[UK]: ok, none more thing then, node.js is single threaded... so with the timers etc.. im guessing its timesliced... ? [10:02] BenC[UK]: so it gives the appearance of having multiple threads, i.e to handle more than one http connection at a time [10:02] BenC[UK] has left the channel [10:02] moshe: SubStack, if I can run client.js it doesn't mean that dnode is working? [10:03] BenC[UK] has joined the channel [10:03] BenC[UK]: grr, not used to this irc client, closed the wrong window [10:03] daglees has joined the channel [10:04] charliesome: BenC[UK]: node is evented, so it's cooperatively multitasked if you want to think of it like that. if you want proper concurrency, run multiple nodes [10:05] BenC[UK]: is there a "standard" way for multiple nodes to talk to one another and share data? [10:05] BenC[UK]: or, do I need to implement that with memcached or similar? [10:05] mscdex: BenC[UK]: no standard way, but there's various IPC mechanisms out there [10:05] charliesome: BenC[UK]: redis is pretty cool for ipc. look into its pub/sub capabilities for evented message passing between nodes [10:05] mscdex: BenC[UK]: i've used node-webworker before [10:06] charliesome: BenC[UK]: not sure if there's a better way [10:06] mscdex: BenC[UK]: you could also use a simple json protocol over tcp or unix sockets with this: https://gist.github.com/880514 [10:07] BenC[UK]: Okay, ill take a look at those, thanks guys [10:08] mscdex: BenC[UK]: btw, you can handle lots of requests with a single node instance [10:08] moshe: mscdex, when I install dnode I get npm WARN publish-everything dnode-protocol@0.0.7 Adding entire directory to tarball. Please add a [10:08] moshe: npm WARN publish-everything dnode-protocol@0.0.7 .npmignore or specify a 'files' array in the package.json . any idea whats wrong? [10:08] charliesome: mscdex: although if you have multiple cores, there's not really any harm is parallelizing your nodes [10:08] chapel: or you could use dnode [10:08] BenC[UK]: mscdex: was more for redundancy than scalabilty [10:09] mdaisuke: Does anybody know if there's sites explaing about node.js implementation? [10:09] chapel: charliesome mscdex BenC[UK] dnode :) [10:09] TheDeveloper has left the channel [10:09] TheDeveloper has joined the channel [10:09] mdaisuke: I'm kind of newbie of C++ and no idea where to start learning implementation [10:09] SubStack: moshe: published [10:10] TheDeveloper: mdaisuke: http://nodebeginner.org/ [10:10] mscdex: mdaisuke: you mean how node works or how to create c++ addons for node? [10:10] moshe: sweet, thanks [10:10] SubStack: that is such crap that npm makes a mess and then complains about the mess it made [10:10] mdaisuke: mscdex: both of them [10:10] mscdex: mdaisuke: or just node programming resources in general? [10:10] moshe: hehe [10:11] moshe: well, there is a reason why it happens to me? before and now again...? is something wrong with my npm? [10:11] gavin_huang has joined the channel [10:11] moshe: think it's really messed up problems just keep popping [10:11] SubStack: npm 1 has all sorts of kooky shit [10:11] mdaisuke: TheDeveloper: I read that but i wanna know the node.js implementation. how v8 + libev +libeio(?) is working get together [10:12] moshe: alright then, it works now so thanks ): [10:12] moshe: :) [10:12] mdaisuke: mscdex: wanna know how it works with implementation [10:14] mscdex: mdaisuke: i'd watch some of ryah's videos, like: http://www.yuiblog.com/blog/2010/05/20/video-dahl/ [10:14] mdaisuke: guess I need to read the souces but not familier with C++ yet. so if there's sites about it, it will help me [10:15] mdaisuke: mscdex: I'll watch it, thanks [10:16] mike5w3c has joined the channel [10:16] Remoun has joined the channel [10:19] thalll has joined the channel [10:19] jamey-uk: my boss is trying to use node on cygwin but running into problems (which I expected), is this generally loathed and/or less supported than running on mac or linux? if so, which would you prefer out of the two? [10:19] tbassetto has joined the channel [10:20] mscdex: jamey-uk: you're probably better off with a linux vm or something instead [10:20] mscdex: for development [10:21] mikl has joined the channel [10:21] mscdex: cygwin has mood swings [10:21] naneau: is there a way to clear the require() cache? [10:21] jamey-uk: yep but then he does love windows... so if he was browsing/editing on the host OS and had the guest linux vm mounted or something, is that a slow/ugly solution? have you heard of anyone doing this? [10:21] charliesome: jamey-uk: i develop on osx and test on an arch linux vm mounted as a samba share [10:22] charliesome: jamey-uk: works pretty well [10:22] mscdex: jamey-uk: if you're stuck on windows, then that's your best bet right now [10:22] jamey-uk: charliesome: cool, so the samba share you find quick enough? and switching to the arch linux or SSHing in, npm'ing and such is quick and easy? [10:22] azeroth_ has joined the channel [10:22] charliesome: jamey-uk: i just have a permanent ssh window open [10:22] jamey-uk: well, he's happy to consider switching to mac or linux given a good case for doing so [10:22] charliesome: jamey-uk: and the samba is really quick [10:23] charliesome: jamey-uk: given that it's a local vm [10:23] jamey-uk: charliesome: any disadvantages you find generally? [10:23] jamey-uk: yeah [10:23] jamey-uk: mscdex: btw you just gave me nostalgia, that's the DOS CD tool right? [10:23] charliesome: jamey-uk: no real disadvantages i've noticed, if you can mount the samba share somewhere convenient it's pretty seamless [10:23] BenC[UK]: dnode isnt really what I want - for instance, if I had lots of clients connected, and wanted to be able to relay data between them... regardless if which server node they're connected to.. I need to keep a routing table really [10:23] mscdex: jamey-uk: more or less :) [10:23] BenC[UK]: or broadcast to all, but thats not idea [10:23] BenC[UK]: ideal* [10:23] jetienne: q. where can i find an example of a command line tool reading the stdin ? [10:24] mscdex: jetienne: process.stdin.resume(); process.stdin.on('data', callback); [10:24] jamey-uk: charliesome: cool, he'll be happy with that...! except now he's going to have buy a bigger SSD :) [10:24] mscdex: :) [10:24] SubStack: BenC[UK]: are there any modules that let clients talk to each other directly? [10:24] charliesome: jamey-uk: if you can use an ssd for the vm, that'll make it blindingly fast. [10:24] SubStack: that would make a good dnode plugin [10:24] jetienne: mscdex: thanks :) [10:24] charliesome: jamey-uk: I/O is the biggest killer with vm performance [10:25] mnbvasd: BenC[UK]: I've got a similar problem, I was looking at implementing a routing algo, have multiple node frontend instances connected to a local router instance, which then connects to other ones... [10:26] BenC[UK]: yeah, thats my plan also, I've built the system before in c#.net, so was going to port what I have [10:26] mscdex: ACTION shakes a fist at .NET [10:27] jamey-uk: charliesome: okay great, looks like he's gonna upgrade to a bigger, faster SSD and VM it up... ooh just noticed ubuntu 11.04 is out today [10:27] mnbvasd: BenC[UK]: I briefly looked at dijkstra's routing algos, and couldn't get my head around right away, I'm instead considering something nastier. [10:27] jamey-uk: charliesome: also, out of interest - why do you run it under a vm rather than natively under osx? [10:27] ardcore has joined the channel [10:27] mnbvasd: ACTION runs nativly under osx, and nativly on linux(and in vm). [10:28] charliesome: jamey-uk: i guess i'm just more comfortable with using linux for that stuff. i also dev some other things on the vm that rely on linux [10:28] ardcore has left the channel [10:29] charliesome: jamey-uk: although if i were you, rather than using ubuntu, just grab arch linux. node, samba and sshd are all you need [10:29] charliesome: jamey-uk: ubuntu server could work too. [10:30] jamey-uk: charliesome: yeah thought so, i'm on ubuntu here and linux makes my life easy. why would you say arch over ubuntu server, is it lighter/faster? would you be using something like macports if you had to dev on osx? (i have a macbook at home) [10:30] jamey-uk: mnbvasd: cool, which do you find easier or more pleasant, if any? [10:30] charliesome: jamey-uk: either arch or ubuntu server will be fine. personally i prefer arch because everything in the repos is absolutely up to date. [10:31] charliesome: jamey-uk: on osx i use brew [10:31] n2liquid: jamey-uk: there's a very old codebase for the game engine here: http://code.google.com/p/sonetto/ [10:31] jamey-uk: charliesome: up to date meaning latest stable? i guess it'd be important to have same versions as on the live server [10:31] n2liquid: we're rewriting everything now; that one used Ogre3D, which sucks [10:32] mnbvasd: jamey-uk: I generally develop in a freenx(kinda like vnc) in a throwaway linux vm on a linux server, but I just use vim in a terminal whatever platform I'm on, and bash/whatever so I notice no difference. [10:32] jamey-uk: mnbvasd: freenx is like a good version of X11 networking right? [10:32] mnbvasd: jamey-uk: I just use the freenx session so I can keep it open and identical, even after a laptop reboot etc. [10:32] jamey-uk: yeah :) I think I set my father up with it when I switched him to linux over christmas ;) [10:33] mnbvasd: jamey-uk: yes, that you can (dis|re)connect to. [10:33] charliesome: jamey-uk: arch's repos tend to have the latest 'unstable' versions, although they're not the bleeding edge dev versions so they're pretty stable [10:33] jamey-uk: I was impressed with the persistent sessions thing, since then you can pause the vm and continue your session regardless of power loss, right? [10:33] n2liquid: jamey-uk: and a dead blog on sonetto.wordpress.com [10:33] mnbvasd: jamey-uk: aye [10:34] n2liquid: jamey-uk: does your friend have anything to show? [10:36] jamey-uk: mnbvasd: so can you then reconnect locally on that machine, or take over that session locally or something? [10:36] skm has joined the channel [10:36] jamey-uk: n2liquid: no he's more of an actual board game maker ;) so he has plenty of stuff in progress, i go round to play his new maps every now and again [10:37] mnbvasd: jamey-uk: don't have a clue, the box doesn't have a monitor, when I've tried it on other boxes(desktops) I have all kinds of issues, and have ended up firing up x11vnc inside the session and then connecting to that. [10:37] keyvan has joined the channel [10:37] jamey-uk: mnbvasd: x11vnc working there as a rescuer? [10:38] jamey-uk: n2liquid: so what role does node play in sonetto? [10:38] mnbvasd: jamey-uk: just so I can use the session briefly, such as saving data I've not saved. [10:39] jamey-uk: ah gotcha [10:39] jamey-uk: charliesome: thanks for brew, looks great, i haven't done much on osx recently :) [10:39] charliesome: jamey-uk: no problem, hope all goes well [10:39] jamey-uk: what os do people use for their production servers? [10:40] mscdex: linux here [10:40] mnbvasd: debian of course ;) [10:40] mattly has joined the channel [10:42] eldios: http://www.youtube.com/watch?v=On_5woLuZdM <- ryan talk about nodejs @vmware cloudfoundry event (I suppose) [10:42] therrg has joined the channel [10:42] therrg has joined the channel [10:45] jamey-uk: mnbvasd: heh, debian - have you ever used ubuntu server or is that the dark side? [10:45] jamey-uk: ACTION is a hardcore debian lover [10:46] mnbvasd: jamey-uk: yes, not really, it's fine.. I'd use ubuntu over redhat. [10:46] mscdex: i use ubuntu server [10:46] jamey-uk: awesome :) we have one dedi box in the UK running on RHEL, I hate it [10:46] jamey-uk: can't wait to switch to ubuntu server [10:46] mscdex: same here [10:47] jamey-uk: it's just... Windows feeling [10:47] mdaisuke has joined the channel [10:51] SvenDowideit_ has joined the channel [10:54] pastak has joined the channel [10:54] Treffynnon has joined the channel [10:56] temp02 has joined the channel [11:00] Shrink has joined the channel [11:03] jasong_at_apache has joined the channel [11:03] littke has joined the channel [11:06] hlindset has joined the channel [11:08] hackband: jamey-uk: Is it the license or the product that makes you feel that way? [11:09] felixge has joined the channel [11:09] felixge has joined the channel [11:10] n2liquid: jamey-uk: basically, Sonetto is gonna be written almost fully in JavaScript; it's just gonna use C++ for interfacing with D3D/OGL, Vorbis, etc. [11:10] zubairov has joined the channel [11:12] n2liquid: and speaking of writing very precious code in JavaScript, is there a way to actually 'compile' JavaScript? I know V8 does it behind the scenes, but I wish I could actually distribute it in binary (pre-compiled) form only [11:12] niftylettuce: how do I say this.innerHTML without getting the and it's contents, so I only want to return Title .... (e.g. "lets say I have
TitleJSON
") [11:12] jamey-uk: n2liquid: that's a bit mind blowing, so how should I think of how node scripts interfacing with the graphics libraries? [11:14] n2liquid: jamey-uk: I'm thinking in a way to abstract OpenGL/Direct3D [11:14] n2liquid: node simply uses a friendlier interface to do its trickery [11:15] pHcF has joined the channel [11:16] n2liquid: jamey-uk: what's so scary about that? [11:17] jamey-uk: not scary, mind blowing :P [11:18] n2liquid: why? [11:18] jamey-uk: JavaScript, server side, binding to some C++ library [11:18] jamey-uk: I like it :) [11:18] n2liquid: I thought that was common (addons) [11:20] malkomalko has joined the channel [11:21] jamey-uk: yeah it is, sorry I just tried to meld the web with graphics on the desktop and it expanded my mind slightly [11:21] n2liquid: jamey-uk: hah, cool (: [11:27] mengxy has joined the channel [11:27] apoc has joined the channel [11:28] eee_c has joined the channel [11:28] hebz0rl has joined the channel [11:29] moshe: can someone please help me creating a chat using this http://substack.net/posts/9bac3e ? I have the server and the client but I don't know how to send messages from the client [11:29] chapel: from the client to the server? [11:30] moshe: just a chat I mean... [11:31] eb4890 has joined the channel [11:31] moshe: did you see it chapel? [11:32] chapel: see what? [11:32] chapel: the blog post? [11:32] moshe: teag [11:32] moshe: yeah [11:34] moshe: it should be really easy just add a simple input on the client side [11:39] pdelgallego has joined the channel [11:39] pdelgallego_ has joined the channel [11:40] tiagoa has joined the channel [11:41] chapel: yeah, it is pretty easy [11:47] dwiash has joined the channel [11:49] saikat_ has joined the channel [11:51] confoocious has joined the channel [11:51] confoocious has joined the channel [11:51] Treffynnon has joined the channel [11:53] tiagoa_ has joined the channel [11:55] dyer has joined the channel [11:55] dyer has joined the channel [11:55] jeremyselier has joined the channel [11:58] brolin has joined the channel [12:02] eee_c has joined the channel [12:04] jaket has joined the channel [12:08] tiagoa_ has joined the channel [12:08] piscisaureus has joined the channel [12:09] saschagehlich_ has joined the channel [12:10] saschagehlich_ has joined the channel [12:10] ardcore has joined the channel [12:11] ardcore has left the channel [12:14] miccolis has joined the channel [12:15] JacobSingh has joined the channel [12:15] MattJ has joined the channel [12:16] chapel: hmm [12:19] paolodedios has joined the channel [12:23] eldios: LOL http://www.youtube.com/watch?v=YB-M48AP4KA <-- sexiest thing about NodeJS [12:23] troessner has joined the channel [12:24] devdazed has joined the channel [12:24] incon has joined the channel [12:25] V1: I don't want node to be sexy, before we know it, it's full of cum because we all fucked it over ;*( [12:28] teemow has joined the channel [12:29] ardcore has joined the channel [12:30] brendanjerwin_ has joined the channel [12:31] devrim: ergh [12:33] jscheel has joined the channel [12:33] xeodox has joined the channel [12:35] swaj has joined the channel [12:35] swaj has joined the channel [12:36] boghog has joined the channel [12:36] zpao has joined the channel [12:37] mwmw has joined the channel [12:38] jspiros has joined the channel [12:39] V1: ._.? [12:40] moshe has joined the channel [12:41] Mrfloyd has joined the channel [12:42] moshe: someone here can please dedicate me 5 minutes of his time to set him something? [12:43] kriszyp has joined the channel [12:43] ezl has joined the channel [12:45] necrodearia has joined the channel [12:45] jacter has joined the channel [12:45] mengxy has joined the channel [12:47] eldios: moshe, everyone here is dedicating way more than 5 mins [12:47] eldios: simply ask what you need [12:47] broofa has joined the channel [12:47] fermion has joined the channel [12:47] eldios: someone will eventually answer [12:47] eldios: ACTION paste a big poster on the wall "PLEASE DON'T ASK TO ASK.. JUST ASK.." [12:48] FireFly|n900 has joined the channel [12:48] Opaque has joined the channel [12:48] moshe: yeah sorry..well I want to build a small tiny chat using this method http://substack.net/posts/9bac3e [12:49] moshe: and I've got the client and server up and running, I just don't really know how to add the input thingy to make it an actual chat [12:49] jtrudeau has joined the channel [12:49] ardcore has joined the channel [12:49] ardcore has left the channel [12:50] moshe: eldios, can you help me? [12:50] eldios: let's see [12:51] cbiscardi has joined the channel [12:52] moshe: thanks [12:52] eldios: and what's the problem? [12:53] moshe: to make it a chat [12:53] moshe: thats what I want to make [12:54] moshe: I added a input, just not sure how it pushes data to the server [12:54] fumanchu182 has joined the channel [12:54] fumanchu182 has joined the channel [12:54] XYXing_ has joined the channel [12:55] voodootikigod has joined the channel [12:55] moshe: so I'm not sure what do I add to the code...I'm a bit lost [12:56] mscdex_ has joined the channel [12:56] doffm has joined the channel [12:56] frodeniu1 has joined the channel [12:56] [tm]_ has joined the channel [12:56] tbranyen_ has joined the channel [12:56] bruse_ has joined the channel [12:56] chapel: moshe: https://github.com/substack/dnode/blob/master/examples/chat/index.html#L47 that is basically what you want [12:56] nail__ has joined the channel [12:56] antti_s_ has joined the channel [12:56] eirikb1 has joined the channel [12:57] disqk has joined the channel [12:57] jesusabd1llah has joined the channel [12:57] moshe: yeah I used that, but I want to do it with that hashish thingy isntead [12:57] chapel: why hashish? [12:57] stevestreza has joined the channel [12:57] moshe: substackhimself said it's outdated and he should remove it [12:57] eldios: XD hashish is always good :) [12:58] btipling_ has joined the channel [12:58] moshe: ;-) [12:58] eldios: if you have some.. just share it [12:58] moshe: galdly [12:58] vh0st has joined the channel [12:58] cbiscardi_ has joined the channel [12:58] moshe: tried to look at this example to do the same but I fail [12:59] matjas_ has joined the channel [12:59] rchavik_ has joined the channel [12:59] mickaelz has joined the channel [12:59] c4milo1 has joined the channel [12:59] dnolen has joined the channel [12:59] hebz0rl has joined the channel [13:00] fyskij has joined the channel [13:00] moshe: so...can you help please? I rather use this instead of that example [13:00] jtrudeau has joined the channel [13:01] chapel: I don't see how hashish has anything to do with chat [13:01] chapel: hashish is data structure manipulation [13:01] moshe: http://substack.net/posts/9bac3e [13:01] moshe: this, it has something to do with this [13:02] amacleod has joined the channel [13:02] moshe: I want to build my chat using this [13:02] Poetro has joined the channel [13:03] maru_cc has joined the channel [13:04] moshe: did you see it chapel? [13:05] davidsklar has joined the channel [13:06] jbergstroem has joined the channel [13:06] mmso has joined the channel [13:06] alindeman has joined the channel [13:06] heino_ has joined the channel [13:06] sugardave has joined the channel [13:07] dies_el has joined the channel [13:09] Bj_o_rn has joined the channel [13:09] coreb has joined the channel [13:11] jfalvarez has joined the channel [13:11] skm has joined the channel [13:12] jlecker has joined the channel [13:12] Jesse__ has joined the channel [13:14] cbibler_ has joined the channel [13:16] sivy has joined the channel [13:19] n2liquid has joined the channel [13:22] Votaguz has joined the channel [13:24] Jesse__ has left the channel [13:24] dyer has joined the channel [13:24] Jesse__ has joined the channel [13:24] dyer has joined the channel [13:24] moshe: I try to install mongodb and it runs and everything but I do get this - Checking for node path : not found [13:25] avalanche123 has joined the channel [13:25] Jesse__: not by default with install data in the /data/db path. [13:26] Jesse__: mongo even * [13:26] Jesse__: oops sorry I misread you question. still early [13:26] killfill_ has joined the channel [13:26] moshe: hehe [13:27] moshe: its okay, well do you know why im getting this? [13:27] Jesse__: not off hand but let me look [13:27] moshe: it's not the first time :\ [13:27] JulioBarros has joined the channel [13:27] moshe: ok, tnx [13:28] malkomalko has joined the channel [13:28] mickaelz: hello guys [13:28] mickaelz: something i dont understand with events :) [13:28] herbySk has joined the channel [13:29] mickaelz: lets say i have many connections incoming, so i want to use eventEmitter to split the work and dont be stuck answering a request at a time [13:29] mickaelz: right? [13:29] rfay has joined the channel [13:29] n2liquid: mickaelz, not really [13:29] mickaelz: but when i use eventEmitter, its stuck [13:30] matyr has joined the channel [13:30] n2liquid: I think you should read some starter guide on Node [13:30] mickaelz: only process.nextTick will split the execution [13:30] marcello3d has joined the channel [13:30] mbrevoort has joined the channel [13:30] n2liquid: no no no [13:30] n2liquid: you got everything wrong, heh [13:30] mickaelz: :( [13:30] n2liquid: nothing blocks in Node [13:30] n2liquid: nothing [13:30] mickaelz: not blocking then [13:30] n2liquid: so you won't ever get stuck answering a request unless you make a huge loop [13:31] mickaelz: i mean its still busy with one thing :P [13:31] n2liquid: nope [13:31] n2liquid: lemme sketch something up for you [13:31] n2liquid: just a second [13:31] mickaelz: thx :) [13:32] mickaelz: i dont want to waste ur time too, maybe a link to that starter guide will open my eyes? [13:32] SvenDowideit_ has joined the channel [13:32] SvenDowideit has joined the channel [13:33] k1ttty has joined the channel [13:33] n2liquid: huh, sorry [13:34] n2liquid: pastebin.com screwed up [13:34] n2liquid: just check http://nodejs.org/ [13:34] n2liquid: there's an example at the beginning of the page [13:34] n2liquid: nothing there blocks [13:34] Jesse__: moshe what route did you take to install Mongodb? [13:34] moshe: im getting the error error: Cannot find module './ChatSocket' . what am I missing? [13:34] n2liquid: the function being passed to http.createServer() is called whenever a request comes in [13:35] moshe: you mean I should be at /user/ instead of /user/chat/ ? [13:35] n2liquid: it doesn't happen immediately, only when it should (duh) [13:35] n2liquid: so your function is queued somewhere, waiting for the request [13:35] n2liquid: then you pick the return from createServer (which returned immediately because node is non-blocking) and tell it to listen on port 1337 [13:35] n2liquid: and that's it [13:36] n2liquid: your script ends and node keeps listening for incoming connections, handles a bit of the requests and let your callback do the job when it has to [13:36] mickaelz: i understand [13:36] n2liquid: as sick as it seems, this model works pretty well and is on par with Apache [13:37] mickaelz: i know how awesome it is :) [13:37] mickaelz: the thing is [13:37] mickaelz: i am trying to use events [13:37] moshe: wha do you mean Jesse__ ? [13:37] n2liquid: hm [13:37] mickaelz: to split the answer [13:37] n2liquid: split the answer? please elaborate [13:37] mickaelz: lets say there is many connections cominh [13:37] mickaelz: g [13:37] mickaelz: then [13:37] Jesse__: I mean to you use npm a install script or simply download and compile [13:37] mickaelz: one of them takes longer [13:37] bshumate has joined the channel [13:37] bshumate has joined the channel [13:37] devdazed has joined the channel [13:38] mickaelz: i dont want all the connections to wait for that long [13:38] mickaelz: so i though [13:38] bingomanatee has joined the channel [13:38] n2liquid: mickaelz: could you exemplify? I can't see that happening on Node [13:39] n2liquid: you shouldn't be doing heavy-lifting in the main thread [13:39] mickaelz: if i use few events, then it should be able to answer or do some work for other requests right [13:39] n2liquid: if you want to do something big, afaik you should write an addon in another language and use libev/libeio or spawn another process [13:40] mickaelz: i am just trying a stupid example [13:40] mickaelz: a loop [13:40] n2liquid: right, a loop [13:40] mickaelz: actually not a loop [13:40] n2liquid: a slow sloop? [13:40] n2liquid: huh [13:40] mickaelz: its just 2 events calling to each other [13:40] mickaelz: counting to infinite [13:40] n2liquid: can't picture that [13:40] mickaelz: in the main [13:40] mickaelz: not a process [13:40] n2liquid: ah [13:41] mickaelz: like i just want to print 1 to infinite in the console [13:41] mickaelz: but the server has to be able to answer to a request if any [13:41] mickaelz: i can do that with process.nextTick [13:41] mickaelz: its working [13:41] n2liquid: yeap [13:41] n2liquid: ok [13:41] mickaelz: but with eventEmitters it will be just stuck [13:41] n2liquid: did you try it? [13:41] mickaelz: i thought events will be fired in the main event lopp [13:41] mickaelz: loop [13:42] n2liquid: I see [13:42] mickaelz: but its just stuck firing these events [13:42] n2liquid: they're firing as soon as you emit them? that's odd [13:42] mickaelz: when i do .emit() its going to the main loop right? [13:42] n2liquid: I thought they would only be fired on the next tick or something [13:42] mickaelz: i know its odd and ridiculous [13:42] mickaelz: but its just a test [13:43] n2liquid: yeah, actually I don't know how to help you there, but I'm curious now [13:43] n2liquid: emit() fires things [13:43] n2liquid: and those things happen in the main loop, yup [13:43] n2liquid: but they shouldn't hang the process [13:43] moshe: im trying to install mongodb@0.9.2 and I get Checking for node path : not found . anyone please? [13:43] mickaelz: mayeb i am doing something wrong [13:43] n2liquid: imho [13:43] mickaelz: let me try to use that pastebin thing [13:43] n2liquid: can you paste your code somewhere? gist.github.com? [13:44] n2liquid: pastebin is overloaded right now [13:44] mickaelz: haha i see [13:44] n2liquid: mickaelz: use gist [13:44] agrohe21 has joined the channel [13:45] dyer has joined the channel [13:45] n2liquid: moshe: what are you doing to install mongodb? [13:46] moshe: this https://github.com/gregstewart/chat.io [13:46] moshe: trying to at least [13:46] moshe: or you mean how? npm install ... [13:46] moshe: .. sudo npm install mongodb@0.9.2 [13:46] n2liquid: moshe: try typing "which node" on the shell [13:46] n2liquid: paste the output here [13:48] moshe: /user/locl/bin/node [13:48] moshe: /user/local/bin/node [13:48] willwhite has joined the channel [13:48] ngs has joined the channel [13:48] mickaelz: https://gist.github.com/3384e68602daf1f3aa96 :) [13:48] rchavik_ has joined the channel [13:48] cbiscardi has joined the channel [13:49] mickaelz: must be something wrong [13:49] mickaelz: again its just a stupid test, it has no purpose at all [13:49] mickaelz: timeout its actually because it crashes after a while without it : [13:49] moshe: n2liquid it's /user/loca/bin/node [13:50] n2liquid: moshe: brb [13:50] moshe: oh ok [13:51] n2liquid: mickaelz: this timeout is bending my brain XD [13:51] FireFly has joined the channel [13:51] ukev has joined the channel [13:51] Shrink has joined the channel [13:51] Shrink has joined the channel [13:52] n2liquid: mickaelz: did you try firing a different event instead of always the same one? [13:52] n2liquid: moshe: how did you install node? [13:52] saschagehlich has joined the channel [13:53] mickaelz: yep 2 events firing to each other [13:53] moshe: what do you mean [13:54] mickaelz: mosh, maybe try npm install "mongodb@0.9.2" [13:54] n2liquid: mickaelz: same problem? I mean, did you try having p1 and p2? [13:54] mickaelz: yep i did :( [13:54] moshe: with the quotes ? [13:54] mickaelz: yes with the quotes [13:54] mickaelz: both solutions worked for me [13:55] mickaelz: with and without quotes [13:55] moshe: well it doesn't for me :\ [13:55] moshe: something is off with my npm or mabe node itself [13:55] V1: mickaelz the EventEmitter non blocking [13:55] V1: isn't* [13:55] mickaelz: i know it should not be blocking :( [13:55] V1: It's a regular javascript observer pattern, no fancy pancy non blocking shizzle [13:56] Jesse__: moshe did the Check for node prefix succeed? [13:56] n2liquid: V1: I thought that was to be avoided at all costs in Node..? [13:56] V1: it's blocking because it's just regular javascript [13:56] Jesse__: and have you setup a quick test to see if the drive is in fact not working? [13:56] mickaelz: hold on [13:56] davidwalsh has joined the channel [13:56] mickaelz: haaa [13:56] moshe: yeah . ok /user/local [13:56] Aikar: msucan: yo? [13:57] Aikar: err [13:57] mickaelz: V1 you meant its blocking [13:57] Aikar: mscdex_: * yo [13:57] mickaelz: right? [13:57] Jesse__: I would to a quick test to see if in fact its not working. My install fail on node path aswell and appears to functioning fine [13:57] Jesse__: do* [13:57] n2liquid: mickaelz: I think so [13:57] n2liquid: he means you have to take care of yourself not to block when dealing with EventEmitter [13:58] mickaelz: i should have looked inside the code maybe [13:58] V1: yes [13:58] mickaelz: so it does not fire to the main loop [13:58] davidwalsh has joined the channel [13:58] mickaelz: thx V1! [13:58] jacter has joined the channel [13:58] mickaelz: thx n2liquid :) [13:58] moshe: well im about to, thats when I faced another problem lol . I'll post in a second. just figured its not worth ignoring since in the last few days ive installed some modules and everytime I had this problem it bites me in the ass later on [13:58] n2liquid: uh, you're welcome [13:59] n2liquid: moshe: I think you should uninstall node and install it with clean slate [13:59] adambeynon has joined the channel [13:59] strmpnk has joined the channel [13:59] temp02 has joined the channel [13:59] a2800276 has joined the channel [13:59] moshe: and then I will have to reinstall everything ? [14:00] n2liquid: hm [14:00] mickaelz: isnt it a problem with npm ? [14:00] n2liquid: maybe just Node will do [14:00] n2liquid: npm isn't detecting node [14:00] moshe: well how do I uninstall node? [14:00] thomblake has joined the channel [14:00] n2liquid: that probably means node wasn't installed correctly [14:00] demastrie has joined the channel [14:00] moshe: could be [14:00] n2liquid: moshe: it depends on how you installed it [14:01] pietern has joined the channel [14:01] demastrie has left the channel [14:01] n2liquid: was it like "make install"? [14:01] moshe: think so [14:01] moshe: yeah it was [14:01] n2liquid: ok, just go to the directory where you typed make install [14:01] n2liquid: and type make uninstall (: [14:01] liar has joined the channel [14:01] replore has joined the channel [14:02] n2liquid: then you just ./configure it again WITHOUT any --prefix flag you might have set before and make && sudo make install again [14:03] galaxywatcher has joined the channel [14:03] n2liquid: moshe: how's it going? [14:03] moshe: so i just run ./configure ? [14:03] n2liquid: no [14:04] n2liquid: run sudo make uninstall first [14:04] FireFly|n900 has joined the channel [14:04] path[l] has joined the channel [14:04] moshe: i have [14:04] n2liquid: okay [14:04] n2liquid: now ./configure, yeah [14:04] moshe: so yeah :) [14:04] n2liquid: heh, sorry [14:04] moshe: its alright :( [14:04] n2liquid: configure finished running? [14:04] moshe: yeah bot 3 not found on Checking for header port.h : not found [14:05] moshe: Checking for header sys/event.h : not found [14:05] moshe: Checking for function kqueue : not found [14:05] n2liquid: it's okay if it said it's okay in the end [14:05] moshe: alright then [14:05] n2liquid: good [14:05] n2liquid: can you quote the last line? [14:05] moshe: so now try to install mongodb [14:05] n2liquid: no, hold on [14:05] moshe: 'configure' finished successfully (2.777s) [14:05] n2liquid: ah, good [14:05] moshe: you dont trust me :P [14:06] n2liquid: now run make [14:06] n2liquid: and if it finishes without errors [14:06] n2liquid: run sudo make install [14:06] n2liquid: then you can try installing mongo again [14:06] jdp has joined the channel [14:06] bzinger has joined the channel [14:06] moshe: yeah build finished successfully .. [14:06] n2liquid: what about make install? >: [14:06] moshe: now install finished successfully .. [14:07] n2liquid: good [14:07] moshe: yupi yay, now the mongo thingy? [14:07] n2liquid: now try sudo npm install mongodb [14:07] moshe: same shit :( [14:07] Jesse__: when you install the package I've run into problems using simply sudo npm install , I've found that temporarily loggin into root and doing it seems to work better using sudo su [14:07] moshe: maybe its npm thats off then? [14:07] __tomb has joined the channel [14:07] n2liquid: .. well, fuck [14:07] bzinger has joined the channel [14:07] moshe: right, i remember doing that once too [14:08] moshe: its bash something no? [14:08] V1: what's the error? [14:08] n2liquid: lol [14:08] moshe: ^^ [14:08] moshe: Checking for node path : not found [14:08] moshe: my paths are off for some reason... [14:08] context: echo $NODE_PATH [14:08] mickaelz: reinstall npm maybe [14:08] context: npm tells you to put it in your profile when you install it. [14:08] __tomb has left the channel [14:08] unomi has joined the channel [14:09] jano has joined the channel [14:09] n2liquid: context: if it's installed globally shouldn't that be unnecessary? [14:09] context: whats node have to do with it being installed globally [14:09] context: then you need to put NODE_PATH in the global profile. [14:09] moshe: echo $NODE_PATH doesnt return anything [14:09] n2liquid: that's not what I meant [14:09] matyr_ has joined the channel [14:09] mickaelz: moshe you can use node everywhere right? without using its full path? [14:09] context: then yes. you didnt read after installing npm. [14:09] n2liquid: if node itself is globally installed [14:10] n2liquid: everything should be on the global paths [14:10] troessner has joined the channel [14:10] context: node_path != path. [14:10] strzel_a has joined the channel [14:10] n2liquid: so NODE_PATH shouldn't be needed, imo [14:10] n2liquid: hm [14:10] n2liquid: odd [14:10] mickaelz: it returns empty as well and i can install [14:10] n2liquid: since I didn't have to set that [14:10] context: and.... npm is NOT node. [14:10] context: you are telling NODE where NPM installed stuff. [14:10] n2liquid: ahh [14:10] n2liquid: er, wait [14:10] n2liquid: that doesn't make any sense [14:11] mickaelz: but i dont have NODE_PATH and its working for me [14:11] criswell has joined the channel [14:11] V1: moshe, it doesn't matter that it says `Checking for node path : not found ` as long as the module is installing correctly, and npm ends with OK [14:11] mickaelz: i think NPM is just putting the module at the right place for node [14:11] context: mickaelz: which node [14:11] V1: you can just ignore that line completely [14:11] moshe: well id like to think that too [14:11] brianc has joined the channel [14:11] moshe: but I get problems all the time later on [14:11] moshe: like pretty much everytime I use some module ... [14:12] V1: what error? [14:12] mickaelz: node 4. [14:12] V1: Your error might not even be related to that [14:12] moshe: well [14:12] moshe: yesterday for example I was trying dnode [14:12] moshe: and had trouble too [14:12] context: mickaelz: node , then require.paths and pastie.org what it says [14:13] moshe: luckily substack was here to change the files [14:13] mickaelz: moshe are you using sudo ? or have you tried as root? [14:13] context: so you use npm modules without NODE_PATH set ? [14:13] moshe: so it installed correctly [14:13] moshe: sudo, i havent tried as root [14:13] moshe: i was asking how to try as root.... [14:13] __tomb has joined the channel [14:13] mickaelz: su ? [14:13] V1: can you give me an example of the error. You only stated that you have `errors` but you are not telling us the actual error [14:13] JulioBarros has joined the channel [14:13] mickaelz: context hold on [14:14] V1: the mongodb plugin can install perfectly fine when it raises the `Checking for node path : not found ` during installation. [14:14] moshe: hmm let me see [14:14] dmcquay has joined the channel [14:14] context: if you have npm installed locally or running as a user and not root it will install to your home [14:14] context: err hmm [14:14] moshe: so it's ok context? [14:14] context: mine might work without node_path too. [14:15] context: nope. [14:15] context: my node works. [14:15] V1: or maby you are only installing the module locally and attempting to use it globally [14:15] moshe: V1 I don't remember which errors but I'm sure SubStack does, when he gets here I'll ask him [14:15] V1: So there are no errors atm? [14:15] context: i have node installed through homebrew, npm manually of course [14:15] nmtmason has joined the channel [14:15] moshe: well right now im trying to run https://github.com/gregstewart/chat.io [14:16] sudhirjonathan has joined the channel [14:16] V1: and what error does it give? [14:16] deputydink has left the channel [14:16] moshe: when I do node main.js I get Error: Cannot find module './ChatSocket' [14:16] mickaelz: context: [ '/home/mike/.node_modules', '/home/mike/.node_libraries', '/usr/local/lib/node' ] [14:16] mickaelz: if its what you ask for :/ [14:16] moshe: which module am I missing? [14:16] V1: thats because there is an error in the code [14:16] V1: it's not called ChatSocket but chatSocket [14:17] V1: it has nothing to do with your installation [14:17] moshe: oh [14:17] context: mickaelz: yeah i had to put /usr/local/lib/node in manually. [14:17] V1: it's a bug in chat.io [14:17] moshe: wait I was saying it was related... [14:17] moshe: I was just wondering but I'm having this all the time and figured might try to fix that [14:17] ditesh|cassini has joined the channel [14:17] gorkson has joined the channel [14:18] moshe: didn't mean to imply they're related [14:18] context: hmm. does npm have a way to remove old packages (ie: multiple copies installed) [14:19] V1: I'm just saying you probalby wont have any issues with your node and npm installation as some modules trend to be buggy and not build with a propper test suite [14:19] Know1edge has joined the channel [14:19] V1: which explained your chat.io issue.. [14:19] dies_el has joined the channel [14:21] jamey-uk has joined the channel [14:21] moshe: I understand, well which file do I need to change then? [14:21] moshe: main.js? [14:21] jamey-uk: ACTION has been upgraded [14:21] context: what [14:21] V1: yes [14:21] V1: var chatSocket = require('./ChatSocket'); => var chatSocket = require('./chatSocket'); [14:22] Remoun has joined the channel [14:22] moshe: yeah did that [14:22] moshe: hmm says address already in use, need to kill whatever is using it then? [14:22] moshe: ps -aef ? [14:22] V1: yup [14:22] context: and [14:22] sh1mmer has joined the channel [14:22] context: v1: no. [14:22] kawaz_air has joined the channel [14:22] context: node will show code errors if there are code problems [14:22] context: not that it cant find it [14:22] davidascher has joined the channel [14:23] V1: context: You can't run node on a port that is already used [14:23] V1: it just dies. [14:23] V1: (if you don't capture it) [14:23] context: v1: yes. and you will get an error saying the port is in use [14:24] V1: that is exactly the error that moshe is getting context :p [14:24] context: oh. im backlogged :x [14:25] Jesse__: be sure to end the server with Ctrl+C not Ctrl+x as it will continue to run [14:25] Jesse__: do ps and Kill the PID of the running instance or just start a new terminal [14:25] jacter1 has joined the channel [14:26] a2800276 has joined the channel [14:26] moshe: V1, 28 Apr 17:25:34 - socket.io ready - accepting connections [14:26] moshe: Error connecting to mongo -- perhaps it isn't running? [14:26] moshe: :) [14:26] Jesse__: well you have to have mongo install when you did npm install mongodb that was just the driver [14:26] Jesse__: for mongodb [14:27] mbrevoort has joined the channel [14:28] moshe: using this line sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 ? [14:28] moshe: sudo apt-get update [14:28] moshe: sudo apt-get install mongodb-10gen ? [14:28] neoesque has joined the channel [14:28] losing has joined the channel [14:29] moshe: what is that GPG key ? [14:29] V1: chat.io expects that mongodb is running on localhost on port 27017. So make sure you have mongodb installed on your machine and have it running :P [14:29] Jesse__: would work or you can sudo apt-get install mongodb [14:29] CrisO1 has joined the channel [14:30] CrisO1 has left the channel [14:31] CrisO has joined the channel [14:31] msucan: Aikar: was that for me ... or an error? :) [14:32] softdrink has joined the channel [14:33] c4milo has joined the channel [14:36] stepheneb has joined the channel [14:37] saschagehlich_ has joined the channel [14:37] eee_c has joined the channel [14:41] kmiyashiro has joined the channel [14:41] context: http://i.imgur.com/db9nG.jpg [14:42] Remoun: hi, I'm looking for a fairly recent benchmark/comparison of node, esp. for comet workflows [14:42] context: comparing node to .... [14:42] markwubben has joined the channel [14:42] jpld has joined the channel [14:42] jpld has joined the channel [14:43] Remoun: context: other server setups? e.g.python+twisted/orbited, and/or whatever else is out there (I'm not that familiar with all the options, TBH) [14:44] context: and the point of that would be [14:44] V1: You are gonna get a biased answer, we are all gonna say node [14:44] V1: and when you go a python channel [14:44] V1: they are all gonna say twisted+python [14:44] context: well his question is rather vague. [14:44] V1: :D [14:44] Remoun: I'm rather biased myself :) [14:44] context: is he compared languages, IO libs, event libs, comet libs? [14:44] Remoun: so I'm looking for some actual numbers to present [14:44] context: all of the above at once? [14:45] V1: It all depends on the application you are gonna build. a `comet` styled application can be allot of things [14:45] context: language impl ? [14:45] Remoun: true [14:45] V1: Soo, whatca building [14:45] DennisRas has joined the channel [14:45] moshe: V1, server is up now but its a blank page [14:46] copongcopong has joined the channel [14:46] V1: moshe: Atleast that's progress :D! [14:46] V1: No errors? [14:46] Remoun: Basically, a RESTful data server serving JSON, with decent support for live updates (hence Comet) [14:46] moshe: nope [14:46] GasbaKid has joined the channel [14:47] moshe: maybe something doesn't load up? [14:47] DennisRasmussen has joined the channel [14:47] flippyhead has joined the channel [14:49] Aikar: msucan: error lol [14:49] kmwallio has joined the channel [14:49] V1: moshe could be, it's odd that there are no errors :) [14:49] dguttman has joined the channel [14:49] V1: if you where missing a module, node would have thrown an error [14:49] context: remoun: need to be more vague still. [14:50] Remoun: context; more vague? [14:50] jamey-uk has left the channel [14:50] context: yes. you are giving us way to much detail. [14:50] moshe: well I get 28 Apr 17:41:02 - socket.io ready - accepting connections [14:50] V1: Remoun how many users per server are you targetting and does it have to be `comet` or just anything that makes it realtime [14:50] context: remoun: im slightly mocking. you pretty much just reworded what you already said [14:50] sourcode has joined the channel [14:50] moshe: and when I loca localhost:8080 its a blank page, maybe I need to load something else? [14:51] V1: moshe: the readme says port 3000 [14:51] moshe: whopsy, noticed now [14:51] context: remoun: and how important are these numbers as appose to all the other questions. [14:51] GasbaKid has joined the channel [14:52] V1: moshe: working :)? [14:52] Treffynnon has joined the channel [14:52] moshe: yeah, tho I see the other users as 006744438083842397 insead of actual name. on the user list on the bottom I mean [14:52] moshe: in the actual cht I see the name [14:53] context: remoun: is node really the proper answer for the problem, is it gonna jive with what you already have, development costs, maintenance, deployability. if you're a shop with 500 .net developers nodejs i doubt is the answer [14:53] moshe: need to look for it's code [14:53] markwubben has joined the channel [14:53] devdazed has joined the channel [14:53] Remoun: V1; trying to maximise number of users per server, obviously; what other options are there for making it realtime? [14:53] V1: moshe: Well atleast the app is working, [14:53] moshe: yes, thats a good start [14:54] Remoun: context; yeah, that's what I'm trying to assess, especially the maintenance and deployment aspects [14:54] context: remoun: so if java handles 50 more users per server you are gonna go with that? [14:54] V1: Well most of node users, use Socket.IO as realtime option, which doesn't strictly implement the comet specification [14:54] tbranyen_: comet specification? [14:54] tbranyen_: you mean websocket? [14:54] context: Faye does websocket with fallback to jsonp and comet. but thats beyond the point. [14:55] V1: bayeux protocol [14:55] JulioBarros has left the channel [14:55] V1: spec thingy [14:55] V1: :$ [14:55] wilmoore has joined the channel [14:55] JulioBarros has joined the channel [14:55] context: google. [14:55] JulioBarros has left the channel [14:55] context: kk time to go get actual work done :x [14:55] [AD]Turbo has joined the channel [14:55] Remoun: context: not really, no, although I highly doubt that (it'd serve more concurrent users), anyway [14:55] tbranyen_: V1: never heard of that weird [14:55] DennisRas has joined the channel [14:56] V1: but comet is basically just an umbrella term.. but it's usually associated with realtime servers that use the bayeux protocol [14:56] Remoun: V1; Yeah, Socket.IO seems like the most... convenient? option for the realtime stuff [14:56] tbranyen_: V1: yeah thats what i've always thought [14:56] context: remoun: but which is gonna cost more. the 6 more months of development, or buying 1 more server. [14:56] arpegius has joined the channel [14:56] tbranyen_: in 2006 COMET meant holding long connections and encompassing long polling [14:56] axl_ has joined the channel [14:57] context: tbranyen_: and thats still what it means today. [14:57] context: not too many words change definition over time. even ajax has kept its meaning over the years [14:57] Remoun: context: what 6 more months of development? In which case? [14:57] deedubs has joined the channel [14:57] tbranyen_: context: ajax is an acronym that'd be weird to have that change [14:57] context: nm. im going off on a tangent [14:57] tbranyen_: although i guess php changed [14:58] m64253 has joined the channel [14:58] deedubs: gf3: jerk is pretty sweet nice work! [14:58] nciagra has joined the channel [14:59] dmcquay_ has joined the channel [14:59] arpegius has joined the channel [15:00] V1: Remoun: Plurk used to run comet styled server with 800.000+ connections powered by node.js [15:01] adnam: deedubs, gf3: oh nice, i was working on similiar thing on top of irc-js [15:01] Remoun: well, my criteria are essentially: performance (both throughput and number of users per server, and relatedly, memory usage), maintainability, ease/speed of development (roughly in that order, although they're very close in terms of priority) [15:01] jtsnow has joined the channel [15:01] Remoun: V1: Yeah, I read about Plurk. It's not clear how many servers/processes/instances they used, though [15:01] sirkitree has joined the channel [15:02] V1: If i remember correctly it was 8 processes and one single server [15:02] Remoun: wow [15:03] timmywil has joined the channel [15:06] colinclark has joined the channel [15:09] jgv has joined the channel [15:09] Venom_X has joined the channel [15:10] mmso has joined the channel [15:11] bentruyman has joined the channel [15:12] gmonnerat has joined the channel [15:13] sub_pop has joined the channel [15:13] tjholowaychuk has joined the channel [15:13] gmonnerat has left the channel [15:13] ph^ has joined the channel [15:13] ZeroCoder has joined the channel [15:14] shanez has joined the channel [15:15] mdaisuke has joined the channel [15:17] bonfo: hi, where i can find the list of the cygwin DLLs that node.exe need to run properly? [15:18] fyskij has joined the channel [15:18] azeroth__ has joined the channel [15:18] tbranyen: bonfo: you can use dependancy walker [15:18] pifantastic_ has joined the channel [15:18] tbranyen: ldd never works for me in cygwin [15:18] tbranyen: but you can try that [15:19] bonfo: tbranyen: good answer, i will check ;) [15:19] tbranyen: http://www.dependencywalker.com/ [15:19] tbranyen: is what i use for my stuff [15:19] Gregor: strings node.exe | grep -i '\.dll' # :P [15:19] tbranyen: it gives a few false positives [15:20] jonaslund: bonfo: w8 [15:20] tbranyen: Gregor: hmm doesn't work for me in linux :-/ [15:20] tbranyen: oh right [15:20] tbranyen: dll [15:20] tbranyen: xD [15:20] Kingdutch has joined the channel [15:20] jonaslund: bonfo: http://pastebin.com/0qz5eJ1k [15:20] nphase: if i spawn a child process with child_process.spawn() is there any way to i can get the child to figure out that its a child? [15:21] jonaslund: that's the DLL's i have for cygwin [15:21] jonaslund: I'm using the mingw build now though [15:21] jonaslund: but it's mostly to eat dogfood [15:23] tobiassjosten has joined the channel [15:23] aheckmann has joined the channel [15:24] Yuffster_work has joined the channel [15:24] figital has joined the channel [15:25] crodas has joined the channel [15:26] temp02 has joined the channel [15:26] vipaca has joined the channel [15:26] vipaca has joined the channel [15:26] nphase: im just trying to detect if a process is a child is a child [15:27] Prism has joined the channel [15:27] Opaque has joined the channel [15:28] mbrevoort has joined the channel [15:29] bonfo: jonaslund: thanks! [15:29] Gregor: nphase: That's not even meaningful. Everything is a child process of something, and child_process.spawn() isn't any different from fork()/execl() or spawnl() or system() or whatnot. If it really needs to know that it's a child of your Node process, you should probably /tell/ it so in the args. [15:30] Gregor: (Note: "Everything" doesn't include "init", no pedanting me :P ) [15:31] jgv has left the channel [15:31] arpegius has joined the channel [15:31] timmywil_ has joined the channel [15:31] isaacs has joined the channel [15:33] context: remoun: you should never make important decisions based on benchmarks. [15:34] briznad has joined the channel [15:34] context: remoun: good, fast, cheap. pick two ;) [15:35] Remoun: context: Of course not, but the benchmarks can be a good tool to aid in making an informed decision [15:35] ryankirkman has joined the channel [15:36] context: and they could mean nothing at all for what you are gonna be doing [15:36] context: meh [15:36] newy has joined the channel [15:37] CoinOpeBoy has joined the channel [15:37] tbassetto has joined the channel [15:38] Mrfloyd has joined the channel [15:38] jtrudeau has joined the channel [15:38] rfay has joined the channel [15:40] [AD]Turbo: http://www.meetup.com/Node-js-Serverside-Javascripters-Club-SF/events/16674393/ <--- is this meetup streamed? [15:40] codeisforevea has joined the channel [15:41] losing has joined the channel [15:41] pyrony has joined the channel [15:41] jakehow has joined the channel [15:42] tbassetto: Hello. The shiny new version of "connect" is not compatible with the "connect-mongo" (or the contrary). I can wait for an update of "connect-mongo" … or I can tell my script to use an old version of "connect", compatible with "connect-mongo". Is the 2nd solution possible? [15:42] JusticeFries has joined the channel [15:42] briznad has joined the channel [15:43] raz: mos1: well, but your distan cousin can. wink wink. nudge. [15:43] raz: i hereby provide: a spare T [15:43] raz: eh.. wrong channel [15:43] briznad1 has joined the channel [15:44] aroop has joined the channel [15:44] stephank has joined the channel [15:44] briznad has joined the channel [15:45] copongcopong has joined the channel [15:45] gkatsev has joined the channel [15:46] disq has joined the channel [15:46] briznad has joined the channel [15:46] hasenj has joined the channel [15:47] rfay has joined the channel [15:47] veezy has joined the channel [15:47] remysharp has joined the channel [15:48] EvanCarroll: how do you test if a variable is undefined using Jade? [15:48] d0k has joined the channel [15:48] piscisaureus has joined the channel [15:48] tjholowaychuk: EvanCarroll: just like you do with javascript [15:48] dberlinger has joined the channel [15:49] briznad1 has joined the channel [15:49] remysharp: Does anyone know where I can find the "n" node app? not the easiest thing to google [15:49] remysharp: I came across it the other day - for switching versions of node...I think... [15:50] andi5 has joined the channel [15:50] EyePulp has joined the channel [15:50] andi5: Can you guys tell me if there can be a problem with code like this: https://gist.github.com/946613 [15:51] tbassetto: remysharp: https://github.com/visionmedia/n ? [15:51] Remoun: remysharp; https://github.com/visionmedia/n/ [15:51] remysharp: tbassetto: cheers [15:51] andi5: Probably something like maximum call depth ... in one of my script node.js breaks with an uncatchable error [15:51] dberlinger has joined the channel [15:51] copongcopong1 has joined the channel [15:52] mscdex: andi5: i could probably see that happening [15:53] andi5: mscdex: You mean this kind of code is risky for many iterations? [15:53] mscdex: andi5: try wrapping each of those calls in a process.nextTick() [15:54] chrislorenz has joined the channel [15:54] hasenj has joined the channel [15:55] briznad has joined the channel [15:56] olauzon has joined the channel [15:58] aheckmann has joined the channel [15:59] captain_morgan has joined the channel [15:59] stagas: tjholowaychuk: I have a suggestion for expose! :P [16:00] stagas: tjholowaychuk: res.exposed() === res.send(app.js.javascript.join('\n')) [16:00] tjholowaychuk: stagas: I use exposed() already [16:00] tjholowaychuk: plus you can have multiple buffers [16:01] troessner has joined the channel [16:01] stagas: tjholowaychuk: oh didn't see it, well you get the point. I don't want to use templates, just a regular script tag in html [16:01] LowValueTarget has joined the channel [16:02] cwang has joined the channel [16:02] tjholowaychuk: ah gotcha [16:02] tjholowaychuk: hmm [16:02] tjholowaychuk: that would work for some cases [16:02] tjholowaychuk: not per request [16:02] tjholowaychuk: but [16:02] stagas: now I'm doing app.get('/exposed.js', function(req, res) { res.send(app.js.javascript.join('\n')) }) [16:03] populuxe_ has joined the channel [16:03] tjholowaychuk: you could do res.send(app.exposed()) [16:04] tjholowaychuk: reads kinda funny, it's a private method but hey [16:04] tjholowaychuk: you should set the content-type too [16:04] stagas: I missed that so it's there already [16:04] boghog: what would be the most straightforward way to store/load a node.js application's configuration? I guess I want it to be editable so JSON dumped in a file would make sense, but not sure [16:05] tjholowaychuk: stagas; mostly yeah, just doesn't respond for you [16:05] dyer has joined the channel [16:06] EyePulp: boghog: I make a simple json object I return via exports, and then require() it [16:06] hellp has joined the channel [16:07] jbpros has joined the channel [16:07] wilmoore has joined the channel [16:07] boghog: EyePulp, ah yeah, I guess that is the most simplest, though would that still let me require() it when the file is stored under say $HOME/.myapp/config.js ? i guess I need to read up on how require() works [16:07] EyePulp: I did extend it to allow for "local" settings, which then can override the standard settings used in production [16:09] andi5: mscdex: Successful, thanks! [16:11] hlindset has joined the channel [16:11] hlindset has joined the channel [16:11] __tosh has joined the channel [16:12] mscdex: why use json for config when you can just require() a plain js object? [16:12] GasbaKid has joined the channel [16:13] Gruni has joined the channel [16:14] EyePulp: mscdex: I mis-spoke - my settings are just simple exported objects. [16:14] EyePulp: not json strings [16:14] mscdex: oh [16:14] briznad has joined the channel [16:14] EyePulp: In my head I sometimes confuse the json concept with an already eval'd object [16:15] kristsk has joined the channel [16:15] defstream has left the channel [16:15] V1 has joined the channel [16:15] mike5w3c_ has joined the channel [16:17] indiefan2a has joined the channel [16:17] remysharp: tjholowaychuk: I'm not sure if this is cool or not - but can I ask a question about express (hitting a bug just on running default app) [16:17] tjholowaychuk: yeah sure [16:17] nphase: theres request.headers.host, but theres no request.headers.port [16:18] nphase: how do i get the port being requested on? [16:18] remysharp: I've generated an app in an empty directory using the express cmd line tool [16:18] remysharp: it tells me to install jade [16:18] cm: ACTION dies [16:18] remysharp: which I do [16:18] cm: cmd, CMS, I need to change my nick! :'( [16:18] remysharp: I've forced jade to install in ./node_modules/jade [16:18] zubairov_ has joined the channel [16:18] remysharp: (because it's going in the parent directory for some reason) [16:18] remysharp: and when I start it up - I get 500 err saying it can't find jade [16:19] remysharp: tested with node 0.5.0pre and 0.4.7 - same issue [16:19] tjholowaychuk: remysharp: hmm, yeah if node can find it, it should work fine [16:19] tjholowaychuk: I'm not on the recent npm yet [16:19] Mrfloyd has joined the channel [16:19] tjholowaychuk: so im not sure whats going on [16:19] remysharp: yeah, I'm on the new npm [16:19] remysharp: which might be what's screwing things up... [16:19] remysharp: I'll see if I can load jade just from node by itself [16:19] tjholowaychuk: as long as it's in ./node_modules it should work I would think [16:20] remysharp: ah...node -e 'require("jade")' chucking error [16:20] amerine has joined the channel [16:20] remysharp: but I've got a node_modules directory and in there is the jade module directory [16:20] tjholowaychuk: weird :s [16:21] remysharp: shitbeans. I try to do things the "done" way and I'm getting egg on my face. [16:21] remysharp: :) [16:21] indexzero has joined the channel [16:21] balaa has joined the channel [16:22] tjholowaychuk: seems strange that it doesnt work.. ive used node_modules with the older npm and things are fine [16:22] moshe: if I load a document in the terminal, how do I close it so I can get back to the terminal? [16:22] remysharp: I just deleted the node_modules dir [16:23] remysharp: ran npm install jade [16:23] kkaefer: when running a private npm registry, is there a way to use both the public and our private registry? [16:23] remysharp: and the command line module load test fails [16:23] kkaefer: i.e. depend on some modules from the public registry and some from my private registry? [16:24] stagas: is there a way to get the init date of a node process? [16:25] KellyM has joined the channel [16:25] mscdex: stagas: no built-in global or anything, no [16:26] jacter has joined the channel [16:26] mscdex: stagas: you'd have to either create a timestamp at the beginning of your main script or execute `ps` and grep the date from there [16:26] pyrony has joined the channel [16:27] boghog: when when you use require() to import a config file, I'd still need module.exports = { /*...*/ } in the file I'm requiring right? [16:27] mscdex: boghog: yep [16:27] boghog: ah ok [16:28] andi5: Interesting number: Running a MongoDB job (fetching and inserting) with node is 5x faster than running it on MongoDB server. [16:28] stagas: mscdex: hm we should have it though seems handy, and a process.uptime() would be useful too :) [16:29] mscdex: meh, it's easily determined in userland [16:29] mscdex: i dunno [16:29] isaacs has joined the channel [16:29] sivy has joined the channel [16:29] stagas: not so easy if you're inside a module [16:29] boaz has joined the channel [16:30] copongcopong has joined the channel [16:30] ian-london has left the channel [16:30] mscdex: well, i mean you could easily do: process.uptime = Date.now(); at the top of your main script [16:30] mscdex: then modules could access that [16:30] remysharp: tjholowaychuk: I think I know what's happening - and yes, it is npm v1 that's causing the problem [16:31] tjholowaychuk: remysharp: is it? [16:31] tjholowaychuk: hm [16:31] nefD has joined the channel [16:31] remysharp: tjholowaychuk: npm installs "locally" by default [16:31] tjholowaychuk: should still work [16:31] remysharp: so it puts jade in ./node_modules [16:31] piscisaureus has joined the channel [16:31] stagas: mscdex: but the modules wouldn't do that unless they're aware of your main script :) [16:31] tjholowaychuk: remysharp: require() should still grab that AFAIK [16:31] remysharp: but the require for jade is happening in a deeper directory [16:31] remysharp: hmm [16:32] remysharp: Let me set up a test - br(after some minutes)b [16:32] aroop has joined the channel [16:32] mscdex: stagas: submit a patch to nodejs-dev ;-) [16:32] sleeplessinc_ has joined the channel [16:32] remysharp: well - I've just installed jade globally, and it worked [16:32] stagas: mscdex: might make a patch later :D [16:32] remysharp: tjholowaychuk: the require logic is so way out of what I expected before using it in anger. [16:32] JJMalina has joined the channel [16:33] tjholowaychuk: remysharp: shit haha, maybe the new stuff just fucks over how express does the requires for the template engines [16:33] tjholowaychuk: I thought it was supposed to bubble up to the root [16:33] tjholowaychuk: of the script [16:33] remysharp: yeah, that's *exactly* what I would have thought too [16:33] nphase: how do i get the port number from an http request? [16:34] remysharp: which is why I figured I must have being doing something obvious. [16:34] remysharp: apparently not. [16:34] zakabird has joined the channel [16:34] mscdex: nphase: you mean for a request you make or ? [16:34] nphase: a request i'm receiving [16:34] nphase: http request [16:35] mscdex: request.socket.remotePort ? [16:35] max_dev has joined the channel [16:35] rfay has joined the channel [16:35] mscdex: not sure if 0.4.x has that actually... [16:36] qbert has joined the channel [16:36] mscdex: it does [16:36] Madonna has joined the channel [16:36] Madonna: yo [16:36] skm has joined the channel [16:37] indexzero has joined the channel [16:37] Madonna: What virtualization technologies to Node.js people use? [16:37] dguttman has joined the channel [16:38] qbert: I have a string as a function name that I need to execute , in the browser I would do this with window["funcName"](args); ... how would I do this in node ? [16:39] broofa has joined the channel [16:40] jbpros has joined the channel [16:41] nphase: mscdex: request.socket.remotePort [16:41] nphase: i don't,... actually see that [16:42] mscdex: see it where? [16:42] rmustacc: nphase: I think that was only committed to master, not v0.4, iirc. [16:42] nphase: rmustacc: ah, got it [16:42] nphase: i did git clone though [16:42] mscdex: it's in the 0.4 codebase in net.js [16:42] nphase: i have master [16:42] mscdex: https://github.com/joyent/node/blob/v0.4/lib/net.js#L944 [16:43] davidascher has joined the channel [16:43] boghog: hmm does remoteAddress now also work for client sockets? [16:43] copongcopong has joined the channel [16:43] mscdex: remoteAddress has always been there [16:43] mscdex: oh, for client sockets... [16:43] boghog: yah [16:43] mscdex: no that's in master branch only [16:44] mjr_ has joined the channel [16:44] mscdex: iirc [16:44] boghog: ah cool [16:44] mscdex: yep [16:44] jtrudeau has joined the channel [16:44] eddanger has joined the channel [16:44] boghog: ACTION wonders if gentoo has a git ebuid flr nodejs [16:44] timmywil_ has joined the channel [16:44] boghog: s/git ebuid flr/git ebuild for/ [16:45] moshe: anyine having trouble with git now? [16:45] remysharp: tjholowaychuk: okay - just confirmed that require *does* work the way you thought - but it's definitely not picking up the "local" install [16:45] tjholowaychuk: remysharp: weird :s [16:45] sechrist: moshe: the only problems I have with git are always my fault [16:45] sechrist: :) [16:45] moshe: hehe [16:45] moshe: can't be say that about most of our problems? :) [16:45] matjas has joined the channel [16:46] sechrist: did you screw up your git tree or something? [16:46] moshe: well i write git push -u origin master and it doesnt do anything [16:46] copongcopong1 has joined the channel [16:46] moshe: or well, it starts an empty line like its loading or anything and stuck [16:47] baudehlo1: in github after I've forked a project, how do I re-sync it to the current HEAD of that project? [16:47] moshe: and in another rep, I manged to push 3 files but I can't manage to see them on the website, so it's weird. have I missed something? [16:47] davidsklar has joined the channel [16:48] moshe: anyone? [16:48] daniellindsley has joined the channel [16:49] mscdex: baudehlo1: fork queue? [16:49] baudehlo1: mscdex: nm, figured it out. It's on the github help pages. [16:49] keeto has joined the channel [16:49] baudehlo1: get fetch upstream; git merge upstream/master [16:50] creationix has joined the channel [16:51] blueadept has joined the channel [16:51] techwraith has joined the channel [16:52] creationix has left the channel [16:52] moshe: mscdex, after I push the files I should see them on the site or it takes some time to update? [16:52] mscdex: i dunno [16:53] duncanbeevers: It's typically very fast to update. [16:54] zcopley has joined the channel [16:54] LowValueTarget: anyone use the webservice.js module [16:55] mscdex: same problem? [16:55] mscdex: heh [16:55] LowValueTarget: mscdex: ha... no it works [16:56] LowValueTarget: Just trying to access the request object in one of my methods. [16:56] cloudhea1 has joined the channel [16:56] LowValueTarget: dont think it exists in the scope of the webservice method [16:56] remysharp: tjholowaychuk: okay, I think I've got it now - express is installed globally - so it's looking for jade globally [16:57] dmcquay has joined the channel [16:57] tjholowaychuk: remysharp: ohhhhh [16:57] remysharp: tjholowaychuk: which is why installing jade globally fixes it. [16:57] tjholowaychuk: makes sense [16:57] remysharp: tjholowaychuk: basically, update the build script to say npm install jade -g (but then...if it's installed locally... hmm - possible mess - just have to detect some install location I guess) [16:57] LowValueTarget: no worries now mscdex, just realized i have a meeting. I'll bbl [16:58] remysharp: I've had to update the readme on my node apps (as they're all command line) to say -g [16:58] isaacs: remysharp: why do you need to install jade globally [16:58] isaacs: ? [16:58] remysharp: ::sigh:: [16:58] tjholowaychuk: remysharp: yeah kinda confusing i guess since the executable would be installed globally [16:58] tjholowaychuk: hmm [16:58] remysharp: isaacs: because express was installed globally [16:58] jbpros has joined the channel [16:58] nvardar has joined the channel [16:58] remysharp: isaacs: so it couldn't find jade locally [16:58] isaacs: oh, and you linked express, so when it' realpaths, jade isn't in the node_modules path [16:58] tjholowaychuk: remysharp: ideally you woudl have the executable globally but not express [16:58] Aikar: any ubuntu junkies in here? [16:58] tjholowaychuk: but i can see that getting a bit confusing [16:58] mscdex: you sound so jaded [16:59] mscdex: :D [16:59] Aikar: mscdex: what did ya need [16:59] tjholowaychuk: mscdex: http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=jade [16:59] isaacs: tjholowaychuk: yeah, express is a bit of an odd duck in that way. it's a cli app, but really *primarily* a require()-able lib [16:59] tjholowaychuk: oddly [16:59] tjholowaychuk: its on the first page [16:59] tjholowaychuk: haha [16:59] remysharp: isaacs: jade is in the node_modules path - but in the local one - but express is reading from a different location [16:59] isaacs: remysharp: right. express is linked in [16:59] tjholowaychuk: isaacs: I have a few like that [16:59] tjholowaychuk: stylus, jade [16:59] mike5w3c has joined the channel [16:59] isaacs: right [16:59] sirkitre_ has joined the channel [16:59] isaacs: you could do: npm install jade --prefix ./node_modules/express [17:00] mscdex: Aikar: oh, there were a few typos in your wormhole readme that i saw last night [17:00] isaacs: or: npm explore express -- npm install jade [17:00] mscdex: Aikar: also, i use ubuntu [17:00] isaacs: (same thing, basically [17:00] Aikar: mscdex: submit a patch :P i suck at english [17:00] Aikar: mscdex: i have a really specific technical issue right now lol [17:00] remysharp: isaacs: yeah - basically shows up that I've only really used npm for installing - rather than anything much more :( [17:00] Aikar: suck at grammar* [17:00] isaacs: remysharp: that's ok, it's what it does best :) [17:00] nphase: is there any common reason why i'd be receiving a request twice? [17:01] nphase: once with the post data and once without? [17:01] mscdex: nphase: favicon.ico [17:01] isaacs: nphase: is one of them for favicon.ico? [17:01] mscdex: :D [17:01] nphase: omg [17:01] isaacs: ACTION was beat to the proverbial punch [17:01] nphase: ACTION is retarded [17:01] isaacs: mscdex+++ [17:01] isaacs: mscdex++ [17:01] v8bot: isaacs has given a beer to mscdex. mscdex now has 8 beers. [17:02] Aikar: i use a laptop at work, with 2 external monitors, one monitor is using display port which turns off the laptops screen when using it. well power just went out, and only way i know to get a gui back to laptop screen is to restart X. however I dont know what all i had open that may be unsaved so would rather not do that. switching to a TTY (control + alt + F1) gave me a screen on laptop screen, but the TTY7 wont go to laptop. so i wanted options on how i can move [17:02] remysharp: isaacs: that previous command, should I have run: "npm explore express" or "npm explore express -- npm install jade" (sorry if that's a dumb question) [17:02] techwraith: v8: console.log('techwraith++'); [17:02] v8bot: techwraith: "techwraith++" [17:02] isaacs: remysharp: npm explore -h [17:02] techwraith: damn [17:02] sudhirjonathan has joined the channel [17:03] zubairov has joined the channel [17:03] duncanbeevers: Aikar: Plug the monitors into the UPS? [17:03] gf3: deedubs: thanks man [17:03] Aikar: dont have one for cube lol [17:03] rmustacc: Aikar: Most GPUs can only drive two displays at once. [17:03] remysharp: isaacs: only because npm vomited errors when I ran npm explore express [17:03] Aikar: the entire building has backup power for internet [17:03] zylo has joined the channel [17:03] isaacs: remysharp: have you linked express into your project? [17:03] deedubs: gf3: someday I'll be using it to make my servers chatty [17:03] Aikar: but not for cube recepticles [17:03] isaacs: remysharp: or is it JUST installed globally? [17:03] remysharp: isaacs: no - just installed globally [17:04] isaacs: remysharp: oh. well, that's why require("express") won't work then [17:04] remysharp: that does work tho [17:04] zed0: Aikar: Copy *~ in the directories you were working in to somewhere? [17:04] isaacs: remysharp: if you've added the global root to your NODE_PATH, then.... don't do that. [17:04] rmustacc: So unfortunately with the way X works there isn't a way to move the display back to the local laptop display. [17:04] Aikar: damn [17:04] rmustacc: That sucks, I'm sorry. [17:04] isaacs: remysharp: just install locally. otherwise you have to install *everything* globally, which is back to the Bad Old Days of npm 0.x [17:05] rmustacc: Well, actually, you may be able to do some magic with xrandr these days. [17:05] remysharp: isaacs: and don't have NODE_PATH in my env... sorry, I'm now in utter noob mode :( [17:05] Aikar: thats what i was wondering rmustacc [17:05] rmustacc: What video card / driver / distro [17:05] Aikar: but i have no idea how to use xrandr [17:05] isaacs: remysharp: ok. let's start over. what version of npm do you have? 1.0.something? [17:05] remysharp: 1.0final [17:05] isaacs: remysharp: and you did `npm install express -g`? [17:05] Aikar: its dell latitude E6410 ubuntu 10.10 x64 nvidia I950 or so? [17:05] nphase: okay. so request.socket.port should work? [17:05] duncanbeevers: Can you just move the laptop and the two monitors to another location with power? [17:05] hij1nx has joined the channel [17:06] Aikar: apparently our backup power is going to go out soon which means ill lose internet lol :( [17:06] nphase: for http? [17:06] creationix has joined the channel [17:06] remysharp: isaacs: okay, I've just moved to FINAL, but when I was on npm 0.x I did npm install express (which I gather is implicit global) [17:06] creationix: isaacs: ping [17:06] isaacs: remysharp: there ya go!! [17:06] rmustacc: Okay, take a look at nvidia-settings program and/or xrandr [17:06] Aikar: rmustacc: i have no gui, only got a terminal atm lol [17:06] rmustacc: nvidia-settings may be able to move it back without a reset. [17:06] zed0: Aikar: Flee to somewhere with working power where you can plug in another monitor? [17:06] isaacs: remysharp: ok. do `npm install express` again. or `npm link express` if you prefer. then the other things i said above will make sense. [17:06] Aikar: zed0: apparently entire area is out [17:06] isaacs: creationix: hey :) [17:06] rmustacc: Yeah, those should work from the command line [17:07] DennisRasmussen has joined the channel [17:07] Aikar: someone just got back from lunch and said it was flicking off at that place too [17:07] isaacs: remysharp: it may complain about clobbering a file. if it does that, just --force it, and it'll shut up [17:07] creationix: isaacs: npm can be used to simply specify dependencies for an app right [17:07] Aikar: i live in NC, big storm coming through [17:07] creationix: even if that app isn't in the repository [17:07] arpegius has joined the channel [17:07] nphase: yeah, i'm not seeingr request.socket.port [17:07] remysharp: isaacs: ok. I'm going to uninstall express too and run those commands [17:07] isaacs: creationix: well, more precisely, package.json can be used for that purpose. [17:07] isaacs: creationix: but yeah, publishing is 100% optional. [17:07] tjholowaychuk: creationix: we use it for learnboost [17:07] tjholowaychuk: with private: true [17:07] creationix: ok, so I write a package.json and then some npm command will install it's deps [17:08] petermanser_ has joined the channel [17:08] isaacs: creationix: yeah. in 1.0, it's "npm install" (no args) [17:08] isaacs: in the package dir [17:08] thalll has joined the channel [17:08] isaacs: in 0.x, that was "npm bundle" [17:08] isaacs: (and it sucked) [17:08] creationix: isaacs: ok, so it won't try to install the app as a library anywere? [17:08] isaacs: creationix: "npm install -g" will install it into your global folder. (like the 0.x "npm install .") [17:09] isaacs: creationix: but just a local install with no args will install the versions of everything specified in your package.json [17:09] creationix: that's neat [17:09] isaacs: :) [17:09] creationix: so I'm adding a sample app to one of my projects, but the sample has some dependencies [17:09] isaacs: an implicit install will also leave any existing dependencies alone. [17:10] isaacs: so if you did a git checkout or whatever, that'll be "safe" [17:10] onre_ has joined the channel [17:10] saikat has joined the channel [17:10] creationix: "existing", like if I had modules already in the node_modules folder? [17:10] isaacs: LOL! i just realized i forgot to mention "install" in my nodeconf talk. should probably do that... [17:10] isaacs: creationix: yeah [17:10] creationix: is name required for this use case? [17:10] rauchg has joined the channel [17:11] remysharp: isaacs: is there a command in npm final that tells me what version of a module I have insalled? npm version express for instance? [17:11] isaacs: remysharp: npm ls [17:11] isaacs: creationix: yeah [17:11] pcardune has joined the channel [17:11] keeto has joined the channel [17:11] isaacs: creationix: name and version are required for all package.json files. [17:11] balaa has joined the channel [17:11] isaacs: just a lot simpler that way [17:12] remysharp: isaacs: okay, checking npm ls -g it says express isn't installed... [17:12] isaacs: creationix: `npm init` might be helpful there. just bang on the enter key to accept the defaults. [17:12] remysharp: isaacs: yet it is installed under the old npm 0.3 lib directory [17:12] isaacs: remysharp: yeah, because npm 1.0 doesn't know about that directory [17:12] paolodedios has joined the channel [17:12] remysharp: isaacs: okay, then that explains why the whole shebang didn't work [17:13] taf2 has joined the channel [17:13] halfhalo: ACTION actually has a site up built from node! http://REDACTED.preyourmind.org. More of a teaser site atm [17:13] isaacs: remysharp: i'd recommend doing the following: 1. curl http://npmjs.org/install.sh | sh 2. npm rm express (and whatever else) 3. npm rm npm 4. curl http://npmjs.org/install.sh | npm_install=rc sh 5. npm install express (or npm link express, if you prefer) [17:13] MikhX has joined the channel [17:13] remysharp: isaacs: is there anything to import those modules so that npm1 know about them? [17:13] isaacs: remysharp: not really. it's a pretty radically different folder structure. [17:14] techwraith: isaacs, so updating to 1.0 will blow away people's modules? (or, rather, npm will forget about preinstalled ones?) [17:14] remysharp: isaacs: cheers - I'm happy with turfing everything out of my modules, that's not a problem [17:14] remysharp: techwraith: it doesn't blow them away, but it doesn't know about them [17:14] pcardune_ has joined the channel [17:14] moshe: after I push to git, is there anything else I should do? [17:14] techwraith: ok, cool :) [17:14] moshe: I cant see any other file besides the readme..:( [17:14] isaacs: techwraith: yes. npm will leave them there. they'll still work. i need to write a little upgrade script, i guess. [17:15] creationix: isaacs: right, I forgot about npm init [17:15] techwraith: yeah, I think an upgrade script would be awesome [17:15] isaacs: techwraith: or maybe just a "clean up everythign everywhere" [17:15] drudge: npm init never works right for me :/ [17:15] creationix: ACTION is compiling node v0.4.7 with latest npm... [17:16] drudge: asks me all the questions and then doesn't generate the file [17:16] isaacs: techwraith: i don't know. do you think it would be ok to say "when you install npm 1.0, it deletes all your old installed modules"? [17:16] isaacs: techwraith: i've gone the path of "least harm", i suppose. [17:16] remysharp: isaacs: I'd expect it to import the old modules so it "knows" about them [17:16] isaacs: but that path involves leaving behind litter ;) [17:16] isaacs: remysharp: not possible. [17:16] techwraith: Isaacs: that's a good point [17:16] creationix: hmm, I only have npm 0.3.18 [17:16] creationix: is there a special way to get latest? [17:17] isaacs: remysharp: i mean, actually not possible. it is undetermined whether you installed things because you had to, or as deps, or if they should be local, etc. [17:17] techwraith: Isaacs: is there a way to get a globally installed modules to be packaged locally? [17:17] isaacs: creationix: curl .. | npm_install=rc sh [17:17] isaacs: creationix: note the env^ [17:17] dmcquay has joined the channel [17:17] isaacs: creationix: pushing to @latest saturday [17:17] creationix: isaacs: all, it's not released yet [17:17] pcardune_ has joined the channel [17:17] creationix: I see [17:17] isaacs: it's on the @rc tag [17:17] techwraith: lol, looks like it's Isaacs Q&A hour ;) [17:17] isaacs: nah, that's at 4-6 [17:17] remysharp: isaacs: okay, it doesn't particularly need a script - only something in the readme so it's clear that npm can't see previously installed modules [17:18] remysharp: I'm still trying to understand exactly why express couldn't see the locally installed jade [17:18] a|i has joined the channel [17:18] a|i has joined the channel [17:18] newy has joined the channel [17:18] creationix: sweet, it's working [17:18] isaacs: remysharp: yeah, i'll write a blog post today on it, and include that in the release announcement (and maybe print a link to it if the install script sees you're going from 0.3 to 1.0) [17:19] remysharp: definitely think it'll be worth it [17:19] isaacs: remysharp: because jade isn't in express's module lookup path [17:19] remysharp: isaacs: right - but because it was in my "local" node_modules I thought it should be able to see it [17:19] isaacs: remysharp, techwraith: ok, i think that's the answer, then. just solve this with docs, and maybe a little "run this command to clean up" kinda deal. [17:19] remysharp: and when I installed express via npm 1 it was fine [17:20] jtsnow has joined the channel [17:20] isaacs: remysharp: if you installe xpress and jade in the same node_modules folder, then they can see each other. [17:20] remysharp: isaacs: absolutely - but that wasn't my set up :) [17:20] ryankirkman has joined the channel [17:20] isaacs: remysharp: if you install express globally, and then link it locally, it'll be using the node_modules lookup based on where it actually is, not where it's linked to. [17:20] remysharp: I *ran* express to generate the app directory [17:21] remysharp: the express binary suggested I install jade [17:21] remysharp: which I did [17:21] isaacs: remysharp: ok. [17:21] remysharp: and then the fun bagan [17:21] remysharp: *began [17:21] remysharp: and by fun... [17:21] remysharp: I mean headfucking [17:21] creationix: isaacs: how do you do entry point for compiled extensions? [17:21] baoist has joined the channel [17:21] tjholowaychuk: remysharp: the confusing part I think will be explaining to install express with -g, and then install it without -g [17:21] isaacs: creationix: "main" : "./module"? [17:21] tjholowaychuk: so that it works for the generated app [17:22] techwraith: tjholowaychuk, remysharp: yeah, gotta do both ;) [17:22] creationix: isaacs: so just reference the symlink that node-waf will create? [17:22] isaacs: creationix: i usually do the minimum required in c++, then wrap it in a "nicer" js layer. [17:22] tykelewis has joined the channel [17:22] isaacs: creationix: but you can do "main" : "./build/default/foo.node", if you like [17:22] isaacs: whatever node-waf builds [17:22] creationix: will npm call node-waf configure build for the user? [17:23] isaacs: creationix: if npm sees a wscript with a configure and build step, yes. [17:23] remysharp: tjholowaychuk: yeah, that's the problem/mindfuck with the entire transition to the new npm - it makes sense (to me), but it's not what you're used to [17:23] isaacs: creationix: or you can do "scripts" : { "preinstall" : "do some stuff" } [17:23] creationix: I'm fine with generic wscript [17:23] Rixius has joined the channel [17:23] tjholowaychuk: remysharp: yeah it definitely makes sense [17:23] isaacs: creationix: scripts are passed through sh, so you can do funky stuff like "blerg || true && echo 'yo'" [17:23] mscdex: Aikar: https://gist.github.com/7aeb9afec1ad4c30a3d2 [17:23] tjholowaychuk: just going to suck explaining it to people [17:23] isaacs: you could write a whole bash script in there if you get teh quoting right :) [17:24] eddanger has joined the channel [17:24] isaacs: tjholowaychuk, remysharp: i've found that newcomers seem to pick it up pretty quick, but people transitioning from 0.x have a tougher time. [17:24] dmcquay_ has joined the channel [17:24] isaacs: remysharp: especially if you *just* learned how 0.x works, which is largely the same as gems and pip and all them [17:24] tjholowaychuk: isaacs: yeah totally [17:24] groom has joined the channel [17:25] jakehow has joined the channel [17:25] V1: But because someone else did it, doesn't mean it's the best solution for the problem [17:25] rauchg: not that different from how many people use gems today [17:25] remysharp: isaacs: that pretty much sums up my entirely experience (except for the gems bit) [17:25] isaacs: :) [17:25] gmonnerat has joined the channel [17:25] mscdex: ACTION shakes a fist at ruby [17:25] isaacs: rauchg: yeah, i guess with bundler, you can use gems a lot like how npm 1.0 does things anyway [17:25] gmonnerat has left the channel [17:26] rauchg: yep, and i know many web apps that use bundler exclusively [17:26] tjholowaychuk: ruby finally figured out [17:26] isaacs: i should say "gem", not "gems" [17:26] tjholowaychuk: that its lame [17:26] Aikar: mscdex: wow i feel bad for that lol.. mispelling like that is not normal for me o.o bad grammar yeah, but i must of been really tired when typing that up lol [17:26] Votaguz has joined the channel [17:26] mscdex: :) [17:26] mscdex: it happens to the best of us ;) [17:26] Aikar: now how do you apply patches from git >_> git patch < blah.patch ? [17:27] mscdex: git apply [17:27] Aikar: and bleh working on tiny screen with no idea how long backup power will give us intarnetz [17:27] christiansmith has joined the channel [17:29] V1: tjholowaychuk: The documentation of dox seems a bit out of date [17:29] langworthy has joined the channel [17:29] a|i: socketio sends a websocket connection to my rails app on local host, but th every same app on the production server causes socketio to create long polling. [17:29] Aikar: so git apply then git commit? [17:29] mscdex: dox docs [17:29] tjholowaychuk: V1: big time [17:29] mscdex: heh [17:29] springmeyer has joined the channel [17:29] tjholowaychuk: V1: im not done the new one [17:29] pyrony has joined the channel [17:29] mscdex: Aikar: yeah [17:30] Aikar: how does it know to put you as the author? o.o [17:30] mscdex: it's in the patch [17:30] V1: tjholowaychuk: oh :p [17:30] Aikar: i know, but where does it 'store' your name for when i issue the commit [17:31] Aikar: mscdex: it didnt keep your name [17:32] mscdex: Aikar: heh i don't mind, such a small patch anyway [17:32] creationix has left the channel [17:33] windhamdavid has joined the channel [17:33] a|i: is there a better push engine than sockeio for node? [17:33] thomsonit has joined the channel [17:33] techwraith: define better? [17:34] a|i: socketio is so bloated, the .swf part is only 200kb [17:34] captain_morgan has joined the channel [17:34] brianc: tjholowaychuk: howdy - question if you have a second...trying to get cluster up using port 80 (using sudo to bind to that port) any recommended way to do this? I drop back down to user permissions after the server binds to the port, but then there are some weird permissions errors w/ workers [17:34] tyler-iphone: socket.io works on ie6 [17:34] tyler-iphone: what more do you want? [17:34] tbranyen: ie5.5 [17:34] tjholowaychuk: brianc: did you use the "user" / "group" options? [17:34] a|i: who has ie6?! [17:34] a|i: 5%? [17:34] tbranyen: depends on your site [17:34] V1: 17 / 20? [17:34] tbranyen: might be more or less [17:34] brianc: killer - didn't do that [17:35] tjholowaychuk: brianc: try that first [17:35] mnbvasd: has anyone played with learnboost/cluster? [17:35] tbranyen: mnbvasd: i think that tjholowaychuk has [17:35] V1: a|i all other fallbacks use the same swf file [17:36] a|i: how does socketio decide to establish a websocket connection, or long polling? [17:36] tbranyen: a|i: feature detection [17:36] V1: a|i would you rather have a script that fails to work for a percentage of your users? [17:37] brianc: mnbvasd: playing with it now [17:37] tbranyen: especially since websockets are still disabled by default in some browsers [17:37] mnbvasd: brainiac/tjholowaychuk/anyone is there any nice ipc built in, I can see some for communicating pre-defined signals but I was wondering if there's an easy way to implement message passing without a plugin, or another dependency.. [17:37] tjholowaychuk: brianc: what was the perm error you were getting? [17:37] a|i: tbranyen: this is very confusing: my rails app running under localhost gets websocket, under production server it gets long poling, both localhost, and the production server render extactly the same page to the end client! [17:37] brianc: tjholowaychuk: sorry to be a n00b...where the user/group option at? [17:38] tjholowaychuk: mnbvasd: no, it's not an IPC library [17:38] tjholowaychuk: mnbvasd: typically you should use something else [17:38] tbranyen: a|i: no idea [17:38] Spion_ has joined the channel [17:38] tjholowaychuk: brianc: cluster(server).set('user', foo) etc [17:38] tjholowaychuk: brianc: can you gist the error? [17:38] nefD has joined the channel [17:38] drdave has joined the channel [17:39] arpegius has joined the channel [17:39] mnbvasd: tjholowaychuk: well it does wrap a whole bunch up to hide it from $dev, but... [17:39] mnbvasd: ACTION shrugs [17:39] mnbvasd: tar for the pointer :) [17:39] a|i: V1: sure not, but the swf object seems bloated, I think the biggest chunk of it the crypto stuff. [17:39] tjholowaychuk: mnbvasd: $dev? [17:39] tjholowaychuk: what? [17:39] tjholowaychuk: haha [17:39] tjholowaychuk: cluster does IPC yes, but it's not public api [17:40] V1: a|i: Yup, it's quite large and can be improved. I think its mainly bloated because it uses Flex instead of pure actionscript [17:40] MikhX has joined the channel [17:40] Gruni has joined the channel [17:40] mnbvasd: tjholowaychuk: :) [17:40] bojicas has joined the channel [17:41] V1: but still, it's the only good quality websocket fallback available on the web, unless someone decides to build a new one :) [17:41] a|i: V1: files like these are not from flex sdk: https://github.com/gimite/web-socket-js/blob/master/flash-src/com/hurlant/crypto/cert/MozillaRootCertificates.as [17:41] techwraith has joined the channel [17:41] tbranyen: thought i saw another websocket implementation recentely that uses flash sockets as well [17:41] brianc: tjholowaychuk: when I "sudo node index.js" I get this... https://gist.github.com/946834 [17:41] newy: Is there an easy way to email out crash logs from a node server? [17:41] V1: a|i yup, but the whole building process is. [17:42] a|i: tbranyen: jaugrnaut? [17:42] mikeal: who is good at making things printable? [17:42] tbranyen: a|i: ah yea thats what i was thinking of [17:42] tbranyen: thx [17:42] mikeal: i need a printable version of the nodeconf schedule http://nodeconf.com/schedule.html [17:42] tbranyen: a|i: i was messing with spine and noticed that repoi [17:42] V1: Juggernaut or jaugrnaut [17:42] tjholowaychuk: brianc: ah, yeah ok makes sense. the worker would be trying to connect to the socket master created [17:43] halfhalo: jeagernaut [17:43] brianc: tjholowaychuk: ah okay [17:43] tjholowaychuk: brianc: using the settings they are applied on "listening" so it should work [17:43] tbranyen: a|i: have you tried it? [17:43] a|i: tbranyen: that juggerwhatever is not reliable, was dead for 2 years, the developer might break up wit the gf and not be in the mood to continue it [17:44] a|i: it's a pitty node doesn't come with an official pus engine. [17:44] a|i: push* [17:44] V1: The only decent other flash fallback that I found is : https://github.com/y8/websocket-flash-js [17:44] tbranyen: a|i: i don't see how that fits into core [17:44] V1: 8k swf.. [17:44] Crshman has left the channel [17:44] saikat has joined the channel [17:46] bartt has joined the channel [17:46] thomsonit has joined the channel [17:46] jtsnow_ has joined the channel [17:47] timmywil_ has joined the channel [17:47] a|i: V1: when you say falback, you mean socketio fallback? [17:47] brianc: tjholowaychuk: is there a good time or way to drop the master process down from root? the workers are all running as the right user (yay!) but the master cluster process still runs as root [17:48] tjholowaychuk: brianc: master should be fine, all the requests are handled in the workers [17:48] brianc: tjholowaychuk: sweet [17:48] abraham has joined the channel [17:48] V1: a|i: just a fallback for websockets in general. [17:48] V1: or polyfill what ever you want to call it [17:49] thomsoni_ has joined the channel [17:49] saikat_ has joined the channel [17:50] brianloveswords has joined the channel [17:50] thomsonit has joined the channel [17:51] brianc: tjholowaychuk: do you guys use sudo to start up cluster or use iptables to forward a different port or none of my business? I got another EPERM when shutting the cluster back down via the command 'node index.js -S' [17:51] tahu has joined the channel [17:51] a|i: socketio long poling dies after 30 secs or so: GET http://xx.xx.xx.xx/socket.io/xhr-polling/3448525236453861/1304012676387 undefined (undefined) [17:52] V1: a|i it doesn't die, the server closes the connection on purpose [17:52] V1: because a heartbeat is send [17:52] tjholowaychuk: brianc: hmm maybe gist that one. we run cluster on 80 [17:52] brianc: tjholowaychuk: my bad - needed to use sudo to issue the stop command [17:52] tjholowaychuk: well actually we redirect to https our 80 is just a tiny node server [17:52] brianc: makes sense.. [17:52] tjholowaychuk: ah yes :) [17:53] a|i: V1: did I miss a configuration? why should the server close the connection? [17:53] jgv has joined the channel [17:53] V1: a|i: socket.io uses heartbeats to check health of the connection. [17:54] a|i: V1: ok, but why is the connection closed after a while? [17:54] mscdex: why would you send heartbeats on a longpoll ? [17:54] V1: these heartbeats are about each 20 second [17:54] mscdex: you'd detect the disconnection right away [17:54] mscdex: ? [17:55] a|i: V1: yes yes ok, but why does the server close the connection?1 my browser is still open [17:55] Aikar: mscdex: odd, looks like you gotta manually specify the author on commit, https://github.com/aikar/wormhole/commit/00f70efc7f93f04043f72dc2d5939a77e6482d72 [17:55] V1: a|i just like a regular xhr request, the long poll is answered so connection is closed as you can use Longpolling to `stream` data like xhr-multipart allows [17:55] uho has joined the channel [17:55] V1: a|i after the connection is answerd the socket.io client will just create a new connection to the server again. [17:55] a|i: V1: after I see this error in chrome console: GET http://xx.xx.xx.xx/socket.io/xhr-polling/3448525236453861/1304012676387 undefined (undefined) , there is no more connection to the server [17:55] mjr_: you have to heartbeat all long-lived connections, or else you don't know if they are still working thanks to firewalls and other network elements. [17:56] Aikar: mscdex: was that not your github user? it didnt link to your username [17:56] a|i: V1: and the server log says the client disconnected. [17:56] mscdex: Aikar: no problem [17:56] Gruni has joined the channel [17:56] V1: a|i than something else is going on :p kinda hard to tell over IRC ;) [17:57] a|i: long poling also causes the browser loading icon to be active.. [17:57] a|i: annoying [17:57] coreb1 has joined the channel [17:58] Newb has joined the channel [17:58] Newb: Hello [17:58] mscdex: hola [17:59] Newb: Can someone help a newbie out? I don't know where to install node.js in my fresh ubuntu install [17:59] zubairov has joined the channel [17:59] mscdex: Newb: have you built it? [17:59] isaacs: a|i: node will almost certainly not have a websocket implementation until the spec stops changing. and, even when it does, you'll still need socket.io for the vagaries of browsers. [17:59] zubairov has joined the channel [17:59] onre_ has joined the channel [17:59] isaacs: wow, forgot to hit enter, that comment is a bit out of date :) [17:59] pdelgallego_ has joined the channel [18:00] Newb: I have tried to install in in \usr\local\bin and now I cant even remove it [18:00] pdelgallego has joined the channel [18:00] puffpio has joined the channel [18:00] mscdex: Newb: `sudo make install` should install it there which should be fine ... [18:02] Newb: mscdex: returns make: *** No rule to make target `install'. Stop. [18:02] zubairov has joined the channel [18:03] pcardune has joined the channel [18:04] V1: a|i that's already solved in pull request :p [18:04] Newb: I am a linux newb. How can I delete the "node" folder I created with a sudo git [18:05] V1: only webkit browser suffer from that. for some odd reason, if you start a long polling connection before the onload event, you will trigger a forever loading spinner thingy [18:05] onre_ has joined the channel [18:05] patcito has joined the channel [18:05] c4milo: Newb: rm -rf your_node_folder [18:05] stagas_ has joined the channel [18:05] broofa has joined the channel [18:05] V1: a|i but rauchg is gonna push Socket.io 0.7 soon so it might be fixed there. (IDK what pull requests he applied for 0.7) [18:06] Newb: c4milo: ty [18:06] rauchg: the easiest solution obviously [18:06] rauchg: is to initialize the socket on load [18:06] c4milo: Newb: np [18:06] pifantastic_ has joined the channel [18:06] rauchg: which is also not a bad idea anyways [18:06] V1: rauchg yup, but not everybody does that because `domready` is the new `window.onload` [18:06] rauchg: since you want to finish loading all the images and free the keepalive sockets for your actual realtime communication [18:06] Newb: Now, what path should I install Node.js to without having to use sudo? [18:06] rauchg: even for ajax [18:07] a|i: V1: great. [18:07] c4milo: Newb: your home directory cd ~/ [18:07] creationix has joined the channel [18:07] JJMalina has joined the channel [18:08] tobias has joined the channel [18:08] creationix: isaacs: is it possible to have npm publish ignore certain folders when creating the tarball? [18:08] tobias: firefox extension namespace xml: http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul [18:08] isaacs: creationix: .npmignore file [18:08] tobias: someone thinks hes funny. [18:08] c4milo: Newb: http://howtonode.org/how-to-install-nodejs [18:08] isaacs: creationix: same syntax as .gitignore (in fact, it'll use .gitignore if there's no .npmignore file) [18:08] JJMalina: is nodeconf going to be recorded or streamed? [18:09] creationix: ok, I had a .gitignore, how can I find the actual tarball? [18:09] Newb: thanks c4milo [18:09] isaacs: creationix: npm cache ls [18:09] c4milo: Newb: np [18:09] arpegius_ has joined the channel [18:10] creationix: do people generally include samples and docs in the npm module, or should I filter those out with .npmignore? [18:10] isaacs: creationix: usually everythign gets included. [18:11] creationix: cool, I published my first native extension [18:11] isaacs: creationix: it's fine. the `npm explore` command actually drops you into the pacakge folder, so having examples and stuff in there is good. [18:11] creationix: renamed it to topcube since webapp was taken [18:11] isaacs: nice [18:11] creationix: only works on linux I'm sure, but it's a fun extension [18:11] isaacs: the thing about landgrabs: everyone rushes to the obvious names, and those are everybody's first projects, so they're kinda lame. [18:11] isaacs: abandoned, etc. [18:11] creationix: yep [18:11] Soufiane has joined the channel [18:11] deepthawtz has joined the channel [18:12] Billbad has joined the channel [18:13] NuckingFuts has joined the channel [18:14] phil has joined the channel [18:14] tilgovi has joined the channel [18:16] onre_ has joined the channel [18:16] phil has left the channel [18:17] shanez has joined the channel [18:19] incon has joined the channel [18:20] c4milo: tjholowaychuk: hello man [18:21] ryanj has joined the channel [18:21] bene has joined the channel [18:21] sendark has joined the channel [18:21] onre_ has joined the channel [18:21] dyer has joined the channel [18:21] c4milo: tjholowaychuk: a quick question, what's the difference in performance between using expressjs and nodejs http core api [18:22] tjholowaychuk: c4milo: nothing really, slight overhead with routing [18:22] tjholowaychuk: and thats it [18:22] tjholowaychuk: depending on what you use of course [18:22] josefrichter_ has joined the channel [18:22] c4milo: tjholowaychuk: http streaming [18:22] tjholowaychuk: that would be the same [18:22] c4milo: tjholowaychuk: alright, thanks man [18:22] tjholowaychuk: express doesn't touch res.write() etc [18:23] c4milo: and connect? [18:23] jeremyselier: wow I just get a weird bug with connect and node 0.4.7 [18:23] jeremyselier: at MongoStore.regenerate (/usr/local/lib/node/.npm/connect/1.2.1/package/lib/middleware/session/store.js:34:8) [18:23] jeremyselier: at /usr/local/lib/node/.npm/connect/1.4.0/package/lib/middleware/session.js:325:15 [18:23] tjholowaychuk: c4milo: I dont believe any of the core middleware do either [18:23] jeremyselier: picking into two different versions does not seems correct, right? [18:23] josefrichter_: guys, having problem with npm update npm, throws error saying it cannot find some module: http://pastie.org/1844326 any ideas please? [18:23] c4milo: tjholowaychuk: got it [18:24] c4milo: tjholowaychuk: if I have cluster does it affect somehow the http streaming? [18:24] tjholowaychuk: jeremyselier: hmm maybe connect-mongodb or w/e has connect as a dep [18:24] tjholowaychuk: c4milo: not at all no [18:24] c4milo: tjholowaychuk: nice, tks [18:24] isaacs: josefrichter_: you fell off the backwards compatibility train [18:25] isaacs: josefrichter_: do a fresh install [18:25] losing has joined the channel [18:25] josefrichter_: isaacs: ok. do I need to uninstall first please? [18:25] isaacs: josefrichter_: sure. uninstall whatever you have, then follow the steps in the readme.md [18:25] isaacs: on https://github.com/isaacs/npm [18:25] josefrichter_: isaacs thanks, will do [18:26] ryah: [14:25] [@ryah(+i)] [2:#node.js(+nt)] [Act: 1,3] [18:26] ryah: oops [18:26] jeremyselier: I'm forcing the error so don't look at the error itself, it's just a way to show that it's picking files from 2 differents version: http://pastie.org/1844340 [18:26] saikat_ has joined the channel [18:27] nibblebot has left the channel [18:27] jeremyselier: connect-mongo just have this dependencies: { "connect": ">=1.0.3", "mongodb": ">=0.8.0" } [18:27] insin has joined the channel [18:27] troessner has joined the channel [18:28] jeremyselier: of course removing connect@1.2.1 from my machine fix the problem but still [18:28] tjholowaychuk: jeremyselier: for plugin-ish modules it usually doesnt work out to well to have them as a dep [18:28] tjholowaychuk: for example all my express plugin mods [18:28] tjholowaychuk: dont have express as a dep [18:28] nibblebot has joined the channel [18:28] nibblebot has left the channel [18:28] jeremyselier: so you suggest I move connect-mongo into my node-Modules instead of using npm ? [18:28] tjholowaychuk: and connect-redis only has "redis" [18:28] nibblebot has joined the channel [18:29] tjholowaychuk: the problem is that npm will give you a separate module [18:29] tjholowaychuk: regardless of something else in your deps [18:29] tjholowaychuk: satisfying that same dep [18:29] onre_ has joined the channel [18:30] tjholowaychuk: all the plugin-ish modules will suffer from this [18:30] tjholowaychuk: for example with nib for stylus, I had to completely removed all instanceofs in the entire project [18:32] captain_morgan has joined the channel [18:33] samsonjs has joined the channel [18:33] jeremyselier: but just removing the connect depency from connect-mongo does not fix the issue [18:33] joshdavenport has joined the channel [18:33] jeremyselier: I mean I don't see how to be sure that it will not load part of 2 different versions [18:34] jeremyselier: except by removing the older version of connect [18:34] lukegalea has joined the channel [18:35] jeremyselier: if I suppose correctly the same issue will append with connect-redis [18:35] samsonjs has joined the channel [18:35] jeremyselier: s/happen/append [18:35] tjholowaychuk: i dont think so [18:35] themiddleman_itv has joined the channel [18:36] tjholowaychuk: it's probably the mongo mod pulling in that old connect [18:36] tauren has joined the channel [18:37] coliv has joined the channel [18:38] timmywil_ has joined the channel [18:38] sweetd_ has joined the channel [18:39] ngs has joined the channel [18:39] softdrink has joined the channel [18:40] arpegius has joined the channel [18:41] sstephenson: any plans to add something like fs.seek -> lseek(2)? [18:41] sstephenson: it'd be nice for implementing stuff like tail -f [18:42] vipaca has joined the channel [18:42] isaacs: sstephenson: can't you just do that kind of thing with an fs.ReadStream and a start position? [18:43] sstephenson: i just checked the source, and it looks like it reads up to the start position [18:43] joeshaw: sstephenson: i had hacked that up in a local branch, not sure if i ever pushed it to my github [18:43] sstephenson: which would probably be real slow for big log files [18:43] joeshaw: i forget ultimately why i abandoned it, though [18:43] chrislorenz has joined the channel [18:43] sstephenson: i might be reading it wrong though [18:44] jarek has joined the channel [18:44] joeshaw: ah, i remember now [18:44] joeshaw: because fs.read() takes an offset argument [18:44] sendark has joined the channel [18:44] sstephenson: ahh [18:45] creationix: is there a proper way to package client-side modules as stack/connect compatable middleware [18:45] creationix: like, for example mount backbone.js to "/backbone/*" in an http server? [18:45] sstephenson: perfect. thanks joeshaw [18:45] jarek: afair there were some commonjs standards for this [18:45] jarek: creationix^ [18:45] creationix: jarek: Interesting, have a link [18:46] SubStack: isaacs: can npm either not include the node_modules directory or not include directories within node_modules which are already listed as dependencies? [18:46] creationix: they probably don't fit with connect/stack style middleware, but it would be a good place to see what was done before [18:46] isaacs: SubStack: that's how it works now [18:46] SubStack: did that change land recently? [18:46] isaacs: SubStack: it skips over any node_modules/* that aren't in the "bundledDependencies":["list"] [18:46] onre has joined the channel [18:46] isaacs: SubStack: within the last few rc's, i think [18:46] SubStack: oh ok [18:46] jarek: creatronix: http://wiki.commonjs.org/wiki/Modules/SimpleAsynchronous [18:46] SubStack: had some of my modules break last night, time to upgrade I guess! [18:46] cloudhea2 has joined the channel [18:47] jarek: creationix I have probably misunderstood your question [18:48] jarek: creating you would like to keep the client side code together with node.js modules? [18:48] jarek: s/creating/creationix [18:48] creationix: jarek: I have a Stack middleware server running in node, and I want to leverage npm's dependency system so I don't have to bundle backbone with my client-side code [18:49] creationix: today, you can install backbone with npm and it will just put the files under node_modules [18:49] creationix: I want something a little more integrated where I can require a module and get back a middleware that serves backbone [18:50] admc1 has joined the channel [18:50] creationix: and pulling in jquery grabs htmlparser, request, mjsunit, and jsdom [18:50] creationix: I just need the single jquery.js file [18:51] jarek: creationix I see... Browserify module seems to be providing such functionality [18:51] jarek: creationix but there are very few modules that support it right now [18:51] tjholowaychuk: creationix: personally I prefer to manage the CS scripts so that my compression libs can do their thing [18:51] tjholowaychuk: the only other one i know that does that is socket.io [18:51] techwraith has joined the channel [18:51] tjholowaychuk: but yeah it's just /socketio/whatever [18:52] SubStack: jarek: only modules with browser-side components have to go out of their way to support browserify [18:52] __sorin__ has joined the channel [18:52] SubStack: algorithmic modules work as-is usually [18:53] creationix: hmm [18:53] creationix: is there an npm runtime api to get the path to where a module is loaded [18:54] creationix: I can't require browser-side code from node [18:54] SubStack: require.resolve [18:54] jarek: creationix you can [18:55] jarek: crationix I have myself implemented a simple script that allows me for using require() from client-side code [18:55] creationix: well, I don't need to require browser-side code, I just need to know where it's at so I can server it over http [18:55] creationix: I don't have a server-side dom [18:55] jarek: creationix ok, give me a second [18:55] jarek: I will look for a snippet [18:55] creationix: require.resolve seems to do what I need [18:55] tjholowaychuk: wait no because they modify it, god damnit [18:56] jarek: oh, great :) [18:56] creationix: require.resolve('backbone') gives '/home/tim/Desktop/topcube/sampleapp/node_modules/backbone/backbone.js' [18:56] creationix: for example [18:56] Darshan-NowJS_ has joined the channel [18:56] creationix: too bad jquery has a hard depends on jsdom [18:56] pdelgallego has joined the channel [18:57] CiRlE has joined the channel [18:57] indutny has joined the channel [18:58] jarek: creationix what is your directory structure? are you keeping the browser-side code in subdirectory? [18:58] creationix: jarek: yep [18:58] creationix: but it doesn't matter where the client-side libraries are [18:58] creationix: I can map anything to anything [18:59] balaa_ has joined the channel [19:00] jarek: creationix I guess you could just use '__dirname' + '/client' to get path to client modules [19:00] CrisO has joined the channel [19:00] zedas has joined the channel [19:00] creationix: I think I'll just bundle for now, I need to think on this later when I'm not busy [19:01] jarek: creationix I would recommend you to write your own module loader [19:01] jarek: creationix it's really not that hard [19:01] jarek: check Browserify sources for reference [19:01] __tosh has joined the channel [19:02] springmeyer has joined the channel [19:04] jarek_ has joined the channel [19:06] jarek_: here is my implementation of require() function for client modules: http://pics.kiwi-themes.com/client-modules/ [19:06] jarek_: the code is awful, but it works for me [19:06] nciagra has joined the channel [19:06] arianrock has joined the channel [19:06] sridatta has joined the channel [19:08] arianrock: hi [19:09] creationix: jarek_: my problem isn't building and serving the client-side code, I'm looking for a repository of client-side libraries that I can reference with npm's dependency system and find a path to from within the node runtine [19:09] creationix: *runtime [19:09] creationix: I don't think it's exists yet [19:09] balaa has joined the channel [19:10] warreng has joined the channel [19:10] eldios has joined the channel [19:10] arianrock: ACTION is frustrated that I only have 52 bits to work with, and because I'm rewriting an already existing protocol for this game, I have to modify all the cryption stuff because the seeds are 64 bit integers -rage- [19:10] hellp has joined the channel [19:10] kristsk has joined the channel [19:12] dnyy has joined the channel [19:12] pdelgallego_ has joined the channel [19:14] arpegius has joined the channel [19:14] jacter has joined the channel [19:14] Spion__ has joined the channel [19:15] dnyy1 has joined the channel [19:16] dyer has joined the channel [19:17] nciagra has joined the channel [19:17] reid has joined the channel [19:17] Gruni has joined the channel [19:17] tob1 has joined the channel [19:17] dnyy2 has joined the channel [19:18] Votaguz has joined the channel [19:19] mwmw has joined the channel [19:19] dnyy3 has joined the channel [19:23] balaa has joined the channel [19:24] saikat has joined the channel [19:24] nmtmason has joined the channel [19:25] confoocious has joined the channel [19:25] confoocious has joined the channel [19:27] zcopley has joined the channel [19:28] cognominal_ has joined the channel [19:28] kersny has joined the channel [19:29] tyler-iphone: hrm #kaffeine.js is empty. or is it just me? [19:29] jdp has joined the channel [19:30] BillyBreen has joined the channel [19:31] dnyy4 has joined the channel [19:31] cloudhea1 has joined the channel [19:33] BenC[UK] has joined the channel [19:33] than1 has joined the channel [19:34] stagas: anyone got keynote can export some slides to ppt for me? [19:34] deepthawtz has joined the channel [19:34] tyler-iphone: stagas: sure [19:34] maushu has joined the channel [19:35] cbiscardi has joined the channel [19:35] tiemonster has joined the channel [19:35] tyler-iphone: stagas: got dropbox? [19:35] BenC[UK]: hi guys, I had another question... say I was making a web server, and I had a variable with a counter... what would happen if I get two or more "clients" trying to access the same variable? Is the variable single access? [19:35] stagas: tyler-iphone: http://dl.dropbox.com/u/396087/Networked%20Physics%202011.key [19:36] aberry has joined the channel [19:36] timmywil has joined the channel [19:37] tyler-iphone: stagas: http://dl.dropbox.com/u/19255/Networked%20Physics%202011.ppt [19:37] stagas: tyler-iphone: <3 [19:38] blueadept has joined the channel [19:38] dambalah has joined the channel [19:39] V1: rauchg -> im [19:40] indexzero has joined the channel [19:40] mscdex: BenC[UK]: node is single threaded, so there is no issue with that [19:40] TooTallNate has joined the channel [19:41] Aria has joined the channel [19:41] BenC[UK]: thats what I thought, just wanted to make sure :) [19:41] BenC[UK]: thanks [19:42] tyler-iphone: node is mostly single threaded ;) [19:42] tyler-iphone: it has as thread pool for sync io functions ;) [19:43] onre_ has joined the channel [19:44] stonebranch has joined the channel [19:44] mscdex: tyler-iphone: right, but code execution is single threaded [19:44] bfuster has joined the channel [19:44] karboh has joined the channel [19:44] mscdex: no need for mutex locks, etc [19:46] brianloveswords has joined the channel [19:46] tyler-iphone: im just being pedantic [19:46] zubairov has joined the channel [19:48] JJMalina has joined the channel [19:48] riverside has joined the channel [19:48] creationix has left the channel [19:49] stevenj has joined the channel [19:50] F1LT3R has joined the channel [19:50] a2800276 has joined the channel [19:50] norviller has joined the channel [19:50] Country has joined the channel [19:51] jdalton has joined the channel [19:51] AntelopeSalad_ has joined the channel [19:52] xeodox has joined the channel [19:54] broofa_ has joined the channel [19:54] Wizek has joined the channel [19:55] strzel_a has joined the channel [19:55] TomY has joined the channel [19:56] tobiassjosten has joined the channel [19:57] jasong_at_apache has left the channel [19:57] bernowly has joined the channel [19:58] boaz has joined the channel [19:59] rauchg has joined the channel [20:00] xeodox: Is ejs worse or better than jade? [20:00] tjholowaychuk: define better?.. [20:00] tjholowaychuk: faster? easier to read? more flexible? [20:01] rbranson: black and white terms only plz [20:02] jbpros has joined the channel [20:03] mikey_p: i've been meaning to ask if there's a way to convert html to hade, ala sass-convert for sass [20:04] context: anyone know an app/daemon that will ping sites frequently and able to alert you when it goes down/up after so long. preferably something more simple that cacti or nagios [20:04] arpegius has joined the channel [20:04] context: and i could run myself [20:04] tjholowaychuk: mikey_p: someone was builing that [20:04] tjholowaychuk: one sec [20:04] Charuru has joined the channel [20:04] tjholowaychuk: mikey_p: https://github.com/donpark/html2jade [20:05] mikey_p: tjholowaychuk: thanks [20:05] teemow has joined the channel [20:05] mbrevoort has joined the channel [20:08] m64253 has joined the channel [20:09] davida has joined the channel [20:10] tauren has joined the channel [20:11] zubairov has joined the channel [20:12] zubairov_ has joined the channel [20:15] rfay has joined the channel [20:15] GasbaKid has joined the channel [20:17] bernowly has joined the channel [20:18] newy_ has joined the channel [20:19] NuckingFuts has joined the channel [20:19] pdonald has joined the channel [20:21] m64253 has joined the channel [20:22] baudehlo1: where's the docs for JSON in Node? [20:23] timmywil_ has joined the channel [20:24] stisti has joined the channel [20:24] AndChat- has joined the channel [20:24] strmpnk has joined the channel [20:24] replore_ has joined the channel [20:24] malkomalko: yah tj, that's a crazy ass ast for stylus lol, you weren't lying! [20:25] tjholowaychuk: malkomalko: haha [20:25] tjholowaychuk: :D [20:25] tjholowaychuk: parsing c++ would be similar I would imagine [20:25] malkomalko: could probably be compacted a little bit ;P [20:25] chapel: context: pingdom [20:25] kersny: baudehlo1: its built into v8: http://stackoverflow.com/questions/4857072/is-the-json-object-global-in-node-js [20:25] path[l] has joined the channel [20:25] dandean has joined the channel [20:26] tjholowaychuk: malkomalko: I used to have a custom inspect implemented per node [20:26] tjholowaychuk: but [20:26] tjholowaychuk: when you want to actually see the props it gets annoying [20:26] malkomalko: yah some of the node arrays become very large [20:26] malkomalko: it's hard to read [20:26] tjholowaychuk: doesnt help that console.log() only outputs a tiny bit depth-wise [20:26] malkomalko: like for the block nodes [20:26] tjholowaychuk: yeah very hard [20:26] malkomalko: I use eyes for inspection, it works much better [20:26] tjholowaychuk: and the debugger becomes pretty useless [20:27] baudehlo1: kersny: thanks... so no docs then? [20:27] malkomalko: also if you comment out this line https://github.com/LearnBoost/stylus/blob/master/lib/renderer.js#L29 [20:27] malkomalko: it's easier to work with [20:27] malkomalko: at least for inspection, because you don't get the bifs hitting you in the face [20:27] tjholowaychuk: ah [20:27] tjholowaychuk: yeah [20:27] tjholowaychuk: hahaha yeah they get kinda annoying when fixing things [20:28] kersny: baudehlo1: not that I know of... you can see google's tests here: http://code.google.com/p/v8/source/browse/branches/bleeding_edge/test/mjsunit/json.js?spec=svn1784&r=1784 [20:28] tauren has joined the channel [20:29] samsonjs: baudehlo1: v8 implements ES5 so you want to find info on ES5's JSON.parse/stringify [20:30] baudehlo1: gotcha [20:30] baudehlo1: finding up to date Javascript references online is a pain in the ass. [20:30] baudehlo1: this one is fast, but doesn't have JSON: http://www.webreference.com/javascript/reference/core_ref/contents.html [20:30] baudehlo1: Mozilla's is complete, but for some reason slow as balls. [20:31] baudehlo1: w3schools is rubbish [20:31] arpegius has joined the channel [20:32] samsonjs: baudehlo1: it is a pain, I found this PDF that summarizes JSON near the end http://java.ociweb.com/mark/other-presentations/ECMAScript5.pdf [20:32] baudehlo1: actually it seems Mozilla's reference pages are faster today... [20:32] baudehlo1: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/JSON [20:33] samsonjs: oh yeah, that's even better [20:39] bernowly has joined the channel [20:39] jroesch has joined the channel [20:40] V1: rauchg: ping ping! [20:40] V1: (dear god you are hard to reach) [20:43] TomY has joined the channel [20:44] raidfive has joined the channel [20:44] figital has joined the channel [20:45] mansoor has joined the channel [20:45] zcopley has joined the channel [20:45] k_89 has joined the channel [20:48] Me1000 has joined the channel [20:50] nciagra has joined the channel [20:51] res99 has joined the channel [20:52] replore has joined the channel [20:52] taf2: https://github.com/joyent/node/blob/master/src/platform_darwin_proctitle.cc#L49 -> allocated memory and then where is it used from there? trigged on osx when calling process.title = "foo bar"; [20:53] timmywil_ has joined the channel [20:54] eldios: guys anyone have a macosx machine exposed on the interwebs to lend me for some minutes? I need to test an harmless cross-platform script I'm developing for nodester [20:54] EyePulp: heh [20:55] fly-away has joined the channel [20:55] cloudhea1 has joined the channel [20:56] mattrobenolt has joined the channel [20:56] moshe has joined the channel [20:57] mischief has joined the channel [20:58] mraleph has joined the channel [20:58] mischief has joined the channel [20:59] samsonjs has joined the channel [20:59] AntelopeSalad has joined the channel [21:00] markwubben has joined the channel [21:02] arpegius has joined the channel [21:02] mischievious has joined the channel [21:04] Schmallon has joined the channel [21:05] marlun: If I want to remove everything npm has installed and npm itself and then install 1.0 RC, how should I do that? Or where can I read about how to do that? :) [21:05] isaacs: marlun: in the npm readme file [21:06] caike has joined the channel [21:06] isaacs: marlun: or https://github.com/isaacs/npm/blob/master/doc/removing-npm.md#readme [21:07] path[l] has joined the channel [21:07] marlun: isaacs: thanks :) [21:08] sledge has left the channel [21:10] Opaque has joined the channel [21:10] themiddleman_itv: tjholowaychuk: Did you ever hear of anyone having problems with templated pages (the rendered html) being cached too much while using cluster? [21:10] tjholowaychuk: themiddleman_itv: not really sure what you mean [21:10] tjholowaychuk: but yeah if you do in-memory caching [21:10] tjholowaychuk: it's obviously going to do it per process [21:10] brownies has joined the channel [21:11] saikat has joined the channel [21:11] themiddleman_itv: does express cache the rendered html at all or just the compiled templates? [21:12] tjholowaychuk: themiddleman_itv: just the templates [21:12] tjholowaychuk: be sure to update though if you were using 2.3.x [21:12] tjholowaychuk: there was a pretty nasty / simple bug [21:12] tjholowaychuk: might have been what you hit [21:12] isaacs has joined the channel [21:13] coreb: how do you update, just do npm install again? [21:13] themiddleman_itv: tjholowaychuk: oh really? were using 2.3.2 now [21:13] dunpeal has joined the channel [21:13] isaacs: coreb: or npm update [21:13] rook2pawn has joined the channel [21:13] tjholowaychuk: themiddleman_itv: hmm should be fine then i think i fixed it in 2.3.1 [21:13] themiddleman_itv: very good news :D [21:14] dunpeal: Hey. I'm considering Node.js for a project, so going over the docs, and wondering: it seems like most of the API is non-OOP? [21:14] dunpeal: for example, all file interaction happens via the "fs" module, which is just a collection of static functions. [21:14] coreb: that gave me express 2.3.2 [21:14] coreb: npm is great [21:14] tjholowaychuk: dunpeal: a lot of it is lower-level stuff yeah [21:14] techwraith: dunpeal: JS isn't really OOP to begin with [21:14] tjholowaychuk: dunpeal: IMO thats the best way to build a project though [21:14] dunpeal: Since JS is OO, why not define a File class for example? [21:15] isaacs: techwraith, dunpeal: JS is OO [21:15] tjholowaychuk: start with the simple low level stuff and build up to these fancy apis [21:15] indexzero has joined the channel [21:15] isaacs: dunpeal: have you seen fs.createReadStream and fs.createWriteStream? [21:15] techwraith: isaacs: I think it can be argued either way [21:15] tjholowaychuk: dunpeal: if you start with the big, you cant break it down. start with the small, and build it up [21:15] isaacs: dunpeal: most objects in node are EventEmitters. there are also server objects, request objects, response objects, etc. [21:15] sugardave has joined the channel [21:15] isaacs: techwraith: JS is more OOP than Java. *everything* is an object (sorrta) [21:15] dunpeal: isaacs: yeah, but the vast majority of the API is still non-OO [21:16] isaacs: dunpeal: depends on what you're doing [21:16] Borre-go has joined the channel [21:16] jonaslund: OO for the sake of OO is just stupid [21:16] marlun: isaacs: I did sudo npm uninstall npm -g and the rm -rf /usr/local/{lib/node,lib/node/.npm,bin,share/man}/npm* but there are still a npm folder in /usr/local/share/npm with a bin folder full of files. Should I remove it too? [21:16] tswicegood: ACTION resists urge to join OOP/JS debate... [21:16] isaacs: marlun: yeah, i don't really know what that is. homebrew, maybe? [21:16] isaacs: tswicegood: jump in, dude! [21:16] coreb: shouldn't need to sudo npm [21:17] tswicegood: isaacs: I've got stuff to finish this afternoon... :-) [21:17] techwraith: if you don't include inheritance as part of the definition of oo, then yes, js is oo [21:17] isaacs: JS is functional and prototypal [21:17] hij1nx has joined the channel [21:17] isaacs: coreb: sudoing is ok now. encouraged, even. [21:17] techwraith: isaacs: agreed [21:17] isaacs: techwraith: you can do inheritance with prototypes. [21:17] softdrink: you can use your own oop solution or something off the shelf, like mootools [21:17] dnyy has joined the channel [21:17] marlun: isaacs: I've installed node with homebrew but I don't think I've installed npm with it. [21:17] techwraith: isaacs: At the expense of encapsulation [21:17] isaacs: marlun: maybe you have a .npmrc file? that /usr/local/share/npm is all homebrwe [21:17] jonaslund: inheritance is really not an issue with a dynamic language like JS [21:18] dnyy1 has joined the channel [21:18] isaacs: i use inheritance a lot [21:18] isaacs: not in npm, which is very low-level and mostly functional, but in other applications [21:18] tjholowaychuk: i wish the objects themselves were the protos [21:18] tjholowaychuk: no .prototype [21:18] isaacs: tjholowaychuk: you can do that with the ES5 stuff. [21:18] isaacs: Object.create() and friends [21:18] tjholowaychuk: isaacs: yeah totally [21:18] isaacs: constructors are nice, though. so is instanceof [21:19] isaacs: though Object.getPrototypeOf(obj) provides similar utility [21:19] tjholowaychuk: instanceof [21:19] tjholowaychuk: sucks [21:19] tjholowaychuk: haha [21:19] marlun: isaacs: Can't find a .npmrc file, should that be in my home directory? [21:19] tjholowaychuk: i know what you mean though [21:19] isaacs: marlun: yeah, it would be. [21:19] mpoz2 has joined the channel [21:19] tjholowaychuk: isaacs: stylus was a good example of crazy breakage for npm [21:19] tjholowaychuk: I had nib use the AST nodes from stylus [21:19] techwraith: I would call js object based, not object oriented :P [21:20] tjholowaychuk: for some stylus functions [21:20] marlun: isaacs: Well, I removed it :) [21:20] techwraith: but it's really just sematics [21:20] tjholowaychuk: but it ALL breaks due to instanceof [21:20] tjholowaychuk: since npm gives you different objects [21:20] isaacs: tjholowaychuk: well, yeah, if you're delving into the guts of another package, sure, that'll be problematic in some case. [21:21] isaacs: that's the "inappropriate intimacy" smell. [21:21] tjholowaychuk: definitey ways around it [21:21] dnyy2 has joined the channel [21:21] tjholowaychuk: but it renders a lot of core js stuff useless [21:21] isaacs: most innuendoful term in all of CS [21:21] tjholowaychuk: which is why i dont like instanceof [21:21] isaacs: duck-typing is usually safer [21:21] tjholowaychuk: without .prototype an object should just have methods that "super" to figure out type [21:21] tjholowaychuk: yeah [21:21] tjholowaychuk: exactly [21:22] isaacs: the issue with OOP in JS is that it's way too fluid. [21:22] isaacs: it doesn't force you into a rigid Interface -> Class -> Instance heirarchy [21:22] tjholowaychuk: i think it sits in an awkward middle-ground [21:22] isaacs: (like some other languages that start with J) [21:23] dunpeal: isaacs, jonaslund, tjholowaychuk: my point is that plain functions are just not as convenient as classes. since node.js is built on a language that has so many high-level features, why does it limit its API to something that looks like the best you can do with C? [21:23] techwraith: 'An very illustrate example: In chapter 6 of "Object-Oriented JavaScript" describe 10 manners to implement "inheritance". How many manners there are in Java? One, and in C++? One, and in Delphi (Object Pascal)? One, and in Objective-C? One.' [21:23] isaacs: dunpeal: node exposes a low-level API. it also exposes some classes on top of that. [21:24] techwraith: I actually think this is an advantage for js [21:24] isaacs: dunpeal: if you want to do low-level file system operations, and control every stat call, then you need the lowlevel functional model. [21:24] isaacs: dunpeal: of *course* that's going to be "bigger" in terms of the "size" of the API, because it's more granular. [21:24] dunpeal: isaacs: right, but who said a "low-level API" needs to look like C? Smalltalk and Ruby have low-level APIs that still take full-advantage of their high-level features (e.g. File) etc [21:25] frodenius has joined the channel [21:25] isaacs: dunpeal: looking like C is not viewed as a bad thing. [21:25] isaacs: i would argue that, in some ways, the lowlevel JS api in node is sparse and beautiful [21:25] isaacs: it's relatively low-magic, but takes away a lot of the pain of doing async fs io in c [21:26] softdrink: js styles are so varied anyway… i like that node doesn't force you into a specific way of doing classes and such [21:26] dunpeal: isaacs: if I wanted to write C, I'd use... C :) [21:26] dunpeal: isaacs: as for your valid arguments: I'm not entirely sure using classes would hurt performance. but if it does, why doesn't node.js (as its supposed to be a platform) provide higher level stdlib with those classes? [21:26] davidascher has joined the channel [21:26] jonaslund: errrr [21:26] jonaslund: my JS certainly doesn't look like C [21:26] isaacs: dunpeal: it.. um... it does? [21:26] jonaslund: simply because C lacks so much conventient stuff [21:26] isaacs: dunpeal: that's what fs.ReadStream and fs.WriteStream are [21:27] isaacs: and Buffers and Stream#pipe() [21:27] dunpeal: isaacs: right. but that's very little. [21:27] isaacs: there's actually a lot of pretty high-level OOP stuff [21:27] softdrink: oddly enough, js has made me a better c programmer hehe [21:27] isaacs: what can't you do with it? [21:27] SubStack: node also doesn't force you use to use particular callback scheme like promises or deferred [21:27] SubStack: (anymore) [21:27] isaacs: SubStack: well, it does force you to use callbacks, but that's highly wrappabel [21:28] isaacs: dunpeal: Design the API you'd like. Then pick a name for it. Then put a package.json in the root of your project. Then publish it with npm [21:28] dunpeal: isaacs: sure, but it would be nicer if batteries were included. [21:28] SubStack: just start saying that npm IS the stdlib [21:28] isaacs: dunpeal: nicer for whom? [21:28] isaacs: dunpeal: yeah ^ [21:29] isaacs: npm IS the stdlib [21:29] dunpeal: well, nicer for me and my subjective opinions :) [21:29] isaacs: npm's registry, to be more precise [21:29] jonaslund: dunpeal: I've used alot of C, a fair bit of C++, too much Java and now recently using JS more and more.. and looking at how productive i've been noticing that every time i've been doing excessive "oop" i've spent more time designing than doing shit [21:29] dunpeal: isaacs: OK, so what's the standard OOP File lib everyone is using? [21:29] TheFuzzball has joined the channel [21:29] jonaslund: dunpeal: My java code looks like i should be using JS [21:29] isaacs: as one of the maintainers of node, particularly lib/fs.js and src/node_file.cc, i love the simplicity :) [21:29] bene has joined the channel [21:29] jonaslund: when i write it nowadays [21:30] coreb: is *.cc c++? [21:30] dunpeal: usually, yeah. [21:30] veezy has joined the channel [21:30] jonaslund: dunpeal: classes might be convenient when you've done them right... but most of the time a few functions does 90% of the work [21:30] isaacs: dunpeal: you can do most things you really need using the stream api. in npm, i wrap require("fs") to handle EMFILE errors, and a few other tiny things. [21:30] isaacs: dunpeal: but mostly, i think people use the lowlevel api when they need something more granular than Streams. [21:30] taf2: https://github.com/taf2/fork.node/blob/master/test/server.js <= pretty cool now it will respawn dead workers [21:31] dunpeal: jonaslund: it's just a bit more convenient. if I have File, I don't have to keep track and pass around a file descriptor. [21:31] taf2: and it seems to load balance nicely over multiple workers... but i'm still verifying that [21:31] reid has joined the channel [21:31] taf2: running ab against it and i see both workers get busy [21:31] dunpeal: jonaslund: no argument that OOP gets overused and abused, like most other tools. but it does provide some nice features. [21:31] konobi: taf2: you'll also need to instruct libev that you've forked [21:32] max_dev has joined the channel [21:32] taf2: yep, i do [21:32] taf2: i think i do enough? [21:32] taf2: ev_default_fork [21:32] taf2: ? [21:32] isaacs: dunpeal: what do you need to do that is tricky in the current api? (honest question, maybe it could be better) [21:32] taf2: konobi, ^^ [21:32] dunpeal: jonaslund: I used to do a lot of C and C++ without real usage of classes. Since then, I've been spoiled by really nice OOP languages like Python, Ruby, and well, JS. [21:32] konobi: taf2: yeah [21:32] taf2: cool [21:33] dunpeal: isaacs: nothing special; I just expect to be able to do: var f = File('/foo.txt'); f.read(5) [21:33] tjholowaychuk: dunpeal: classes are lame :p [21:33] konobi: taf2: ah... i missed that on first look over [21:33] tjholowaychuk: dunpeal: and that would not work well [21:33] softdrink: i always end up doing struct hacks to do oop-like stuff in c [21:33] tjholowaychuk: async :p [21:33] dunpeal: instead of `fd = fs.open('/foo.txt'); fs.read(fd, 5) [21:33] isaacs: dunpeal: check out the various promises stuff. npm search promise [21:33] arpegius has joined the channel [21:33] isaacs: dunpeal: q-fs and promised-fs are both popular [21:34] dunpeal: isaacs: OK, thanks. [21:34] taf2: konobi, yeah... there seem to be some issues when forking... after the first fork on darwin process.title works but on a second fork it raises the best exception every [21:34] dunpeal has left the channel [21:34] isaacs: dunpeal: those basically flip the thing around. so instead of passing a continuation function that gets called when the thing is done, you get a promise object that gets "resolved" [21:34] taf2: __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__ [21:34] taf2: :) [21:34] isaacs: and then you can do stuff like when(promise, function (data) { .. }) [21:34] taf2: ACTION loves corefoundation [21:34] isaacs: and chain em and stuff [21:35] konobi: taf2: adding socketpair might be useful too [21:35] isaacs: oh, guess he got what he wanted [21:35] kuya: ACTION confused by too many mysql modules... [21:35] taf2: oh... i have to read about that one [21:35] konobi: socketpair(CHILD, PARENT, AF_UNIX, SOCK_STREAM, PF_UNSPEC) [21:36] hoodoos has joined the channel [21:37] taf2: are you suggesting i use that between master and child? [21:37] caike: tjholowaychuk: hi, I'm having some trouble trying to figure out how to hook basicAuth to cluster-live [21:37] veezy: can somebody help me out how to get node working on OSX 10.5.8, i did the config, make, and make install all successfully, but when I type node into terminal its gives me the "dyld: unknown required load command 0x80000022 Trace/BPT trap" error [21:37] taf2: to handle the incoming http requests or as a method to communicate status between the processes? [21:37] jonaslund: veezy: what version ? [21:38] tjholowaychuk: caike: i'd have to look but I think it's just running it with NODE_ENV=production, and live({ user: 'foo', pass: 'bar' }) [21:38] veezy: 0.4.7 [21:38] hoodoos: hey guys, sorry for offtopic(if you'll give me guide for proper channel i'll leave, thnx), anybody heard anything bad about hopone datacenters? i'm looking for really nice DC in US or Europe maybe. [21:38] kkaefer: is there a way to have npm git clone a project instead of fetching the tarball? [21:38] caike: tjholowaychuk: yeah, that's what I'm doing. but I'm getting curl: (52) Empty reply from server [21:38] stisti: veezy: I just installed 0.4.7 on 10.5.8 couple of days ago and it works [21:38] isaacs: kkaefer: no. use git to git clone a project :) [21:39] tjholowaychuk: caike: what's the curl command? [21:39] tjholowaychuk: wrong port maybe? [21:39] isaacs: kkaefer: npm can (maybe) tell you the repo url. npm view repository.url [21:39] kkaefer: isaacs: would that be something to do at --dev? [21:39] stisti: veezy: I ran it with ./configure --prefix=$HOME && make && make install [21:39] kkaefer: so when I run npm install --dev, it clones the devdependencies instead of fetching the tarball? [21:39] hoodoos has joined the channel [21:39] isaacs: kkaefer: no, --dev installs dev dependencies. [21:40] isaacs: kkaefer: just use git to do git clones [21:40] isaacs: you can install folders or tarballs if necessary [21:40] wink_: veezy: first hit on google: http://asqueella.blogspot.com/2010/12/dyld-unknown-required-load-command.html [21:40] isaacs: npm install http://github.com/user/project/tarball/master <-- that would work [21:40] kkaefer: hm, so I have to do npm install, then git clone all of the subprojects that I want to develop on, then npm install each of them? [21:40] eventualbuddha has joined the channel [21:40] isaacs: kkaefer: if you're doing development on something, then you should probably have it checked out anyway. [21:41] isaacs: kkaefer: teh `link` command may be handy to you. read `npm help link` [21:41] isaacs: kkaefer: you on 1.0? [21:41] kkaefer: I know about that [21:41] kkaefer: yes [21:41] caike: tjholowaychuk: http://pastie.org/1845070 [21:42] dnyy3 has joined the channel [21:42] veezy: wink_ i'll try it out [21:43] tjholowaychuk: caike: hmm does look fine [21:43] veezy: @yenz ;lkj [21:43] tjholowaychuk: caike: ps might want to change repl(), takes the same params as listen() but INADDR_ANY, might come back to haunt you [21:43] tjholowaychuk: ill see if i can find out whats wrong [21:44] tjholowaychuk: caike: ohhh you know what [21:44] tjholowaychuk: it's creating an https server [21:44] tjholowaychuk: var app = module.exports = 'production' == process.env.NODE_ENV [21:44] tjholowaychuk: ? express.createServer(options) [21:44] tjholowaychuk: : express.createServer(); [21:44] mbrevoort has joined the channel [21:45] caike: oh [21:45] techwraith: the caike is a lie [21:45] caike: techwraith: lol [21:45] mikeal has joined the channel [21:45] techwraith: ACTION played way too much portal last weekend [21:46] caike: tjholowaychuk: I don't get why it's https... but is there a way to force regular http ? [21:46] dnyy4 has joined the channel [21:46] tjholowaychuk: caike: i [21:46] tjholowaychuk: i'll tweak it [21:47] caike: tjholowaychuk: thanks man, appreciate it [21:47] thisgeek has joined the channel [21:48] caike: tjholowaychuk: if ('object' == typeof options) { [21:48] caike: return new HTTPSServer(options, Array.prototype.slice.call(arguments, 1)); [21:48] caike: } [21:48] caike: tjholowaychuk: I see it ;) [21:48] tjholowaychuk: hehe [21:49] xeodox: What should I use? Jade or EJS? [21:50] a|i has joined the channel [21:50] a|i has joined the channel [21:50] christiansmith has joined the channel [21:51] harth has joined the channel [21:52] tjholowaychuk: caike: k 0.0.3 should be ok [21:52] ArtistConk1 has joined the channel [21:52] tjholowaychuk: oh wait [21:52] tjholowaychuk: one sec [21:52] tjholowaychuk: k [21:54] caike: tjholowaychuk: awesome, thanks dude [21:54] tjholowaychuk: caike: haven't tried it on a live site yet, so if it's way to slow let me know haha [21:54] tjholowaychuk: really depends on the load i suppose [21:55] caike: tjholowaychuk: gotcha [21:55] secoif has joined the channel [21:57] mbrevoort: isaacs: every have any problems with trying to replicate the NPM couchbase registry and the replication dies constantly? [21:58] pquerna: PhilK: ^ [21:59] PhilK: mbrevoort: I have the same problem, but haven't come up with a good way to solve it yet. Basically I'm thinking I'll do some sort of status scraping then just restart the replication if it's not running. [21:59] replore has joined the channel [21:59] Venom_X_ has joined the channel [22:00] dnyy5 has joined the channel [22:00] daniellindsley has joined the channel [22:01] nciagra has joined the channel [22:01] captain_morgan has joined the channel [22:02] McConnell has joined the channel [22:02] hlindset has joined the channel [22:02] hlindset has joined the channel [22:05] Swimmin__ has joined the channel [22:05] xeodox: Does anyone know if ejs or jade is better [22:05] coreb: better how [22:05] xeodox: What are the pros and cons of reach [22:05] deanlandolt has joined the channel [22:06] veezy: any ideas for how to get node working on OSX 10.5.8, tried ./config --prefix=$HOME && make && sudo make install and it still gives me a "dyld: unknown required load command 0x80000022" error after it's finished installing [22:06] tjholowaychuk: xeodox: ejs would be (maybe) more designer friendly [22:06] tjholowaychuk: tiny bit faster [22:06] coreb: ejs is practically html [22:06] tjholowaychuk: jade IMO is easier to read but you certainly have to get used to it [22:06] Pilate: if youre caching speed shouldnt be a big deal [22:06] xeodox: tjholowaychuk: Is it bad if I do it in ejs? (I'm used to html...) [22:06] asdfsafdsa: mmm jade [22:06] moshe has joined the channel [22:06] coreb: jade is haml but as tjholowaychuk says, looking better [22:06] tjholowaychuk: xeodox: not at all [22:06] tjholowaychuk: that's what options are for [22:07] asdfsafdsa: jade + stylus + coffeescript = sexy [22:07] xeodox: tjholowaychuk: ok good. I'm going to stick with ejs then. It's more traditional. [22:07] brownies has joined the channel [22:07] coreb: with ejs it's easy to adapt existing html into a template [22:07] xeodox: tjholowaychuk: for ejs, is it possible to "include" html from another file? [22:07] boghog: inside a module (but outside any function), what does 'this' refer to? [22:08] tjholowaychuk: xeodox: with express you would use partial() [22:08] tjholowaychuk: to render another template and output the results [22:08] stagas: ejs can pretty fast become unreadable [22:08] tjholowaychuk: <%- partial('user', user) %> [22:08] tjholowaychuk: etc [22:08] tjholowaychuk: stagas: yeah I agree [22:08] tjholowaychuk: I used it on one large-ish template [22:08] tjholowaychuk: and it was brutal [22:08] tjholowaychuk: but [22:08] tjholowaychuk: if you keep most the logic to helpers it should be ok [22:09] tjholowaychuk: iteration is the worst part since forEach is pretty ugly [22:09] coreb: would be nice with an html to jade converter, and back [22:09] tjholowaychuk: coreb: there is one [22:09] tjholowaychuk: https://github.com/donpark/html2jade [22:09] tjholowaychuk: I haven't tried it [22:10] groom has joined the channel [22:10] coreb: tjholowaychuk: that's great [22:11] xeodox: tjholowaychuk: Wow, that sonds awesome [22:11] _fat has joined the channel [22:12] tjholowaychuk: xeodox: yup pretty handy :) [22:12] Lorentz has joined the channel [22:15] jmoyers has joined the channel [22:15] coreb: why is ejs faster though, both that and jade is compiled to js, right [22:15] kixxauth has joined the channel [22:16] teemow has joined the channel [22:16] tjholowaychuk: coreb: less closures, less try/catches [22:16] tjholowaychuk: coreb: ejs has a few more now that it has error reporting [22:16] tjholowaychuk: as well [22:17] tjholowaychuk: but for example - if (foo) in jade takes the block following it and wraps it in a closure [22:17] pHcF has joined the channel [22:17] tjholowaychuk: so that it's a single statement [22:17] tjholowaychuk: actually i dont think i do that anymore [22:18] tjholowaychuk: ah no i dont [22:18] jtsnow has joined the channel [22:18] stizz has joined the channel [22:18] JimBastard has joined the channel [22:18] stizz: any ideas for how to get node working on OSX 10.5.8, tried ./config --prefix=$HOME && make && sudo make install and it still gives me a "dyld: unknown required load command 0x80000022" error after it's finished installing [22:19] AntelopeSalad: tj, what are the odds of you properly incorporating mustache.js into express? [22:20] techwraith: AntelopeSalad: donpark has a handlebars plugin for express [22:20] techwraith: it's basically mustache with some other cool stuff built in [22:21] coreb: tjholowaychuk: I see, but it's possible to use both jade and ejs in the same express project right, it's just that with the default template engine you don't need to add the file extension [22:21] AntelopeSalad: techwraith: thanks, checking it out now [22:22] tjholowaychuk: AntelopeSalad: none of them are incorporated.. anything that chooses to support express will work :p [22:22] tjholowaychuk: coreb: correct [22:22] tjholowaychuk: page view can be jade, layout can be ejs etc [22:22] tjholowaychuk: doesnt matter [22:22] coreb: partial could be either too? [22:22] tjholowaychuk: yup [22:23] coreb: that's nice, flexible [22:23] tjholowaychuk: express just uses the parent view's extension as a guess unless explicitly set [22:23] bingomanatee: pyrotechnick: chown! [22:23] Bwen has joined the channel [22:23] AntelopeSalad: this definitely looks a lot more clean than the 'stache' implementation of mustache.js [22:23] mike5w3c has joined the channel [22:23] tjholowaychuk: AntelopeSalad: I started one a while ago [22:23] techwraith: :) [22:23] tjholowaychuk: not done yet [22:23] tjholowaychuk: you can optimize mustache pretty well [22:23] tjholowaychuk: but its still not much faster than ejs/jade really [22:24] tjholowaychuk: IMO not enough to make it worth using [22:24] AntelopeSalad: i have nothing against jade, i just want to write regular html and not bother with logic in the template [22:24] tjholowaychuk: for sure [22:24] tjholowaychuk: i have mixed feelings about mustache [22:24] tjholowaychuk: i like it in some ways [22:24] bingomanatee: stizz: are you coming to the node.js meetup in SF? [22:25] tjholowaychuk: but in some ways i want bits of logic in my template, that are related to the display [22:25] tjholowaychuk: not in my controller or some "setup" object [22:25] stizz: when is the meetup? [22:25] TomY has joined the channel [22:25] bingomanatee: 6:30 [22:26] AntelopeSalad: i think you did a good job with jade though, it's not overly difficult to see what's going on for the most part from the perspective of someone who converts PSDs to html, they can probably figure out what's going on [22:27] brianloveswords has joined the channel [22:27] tjholowaychuk: i wish there was a better textmate/vim syntax available [22:27] tjholowaychuk: to lazy to work on one [22:27] AntelopeSalad: that is another issue too, but in the grand scheme of things it's not really super important [22:28] stizz: where is the meetup at? [22:28] AntelopeSalad: someone will make one eventually :D [22:28] tshpaper has joined the channel [22:29] eldios: n8 [22:30] pdelgallego has joined the channel [22:30] pdelgallego_ has joined the channel [22:32] fljitovak has joined the channel [22:33] coreb: tjholowaychuk: I think you're right about logic in the template [22:33] tjholowaychuk: coreb: it should be readable still [22:33] tjholowaychuk: but I think it belongs there really [22:33] tjholowaychuk: I guess it also depends if you have designers working on them or not [22:34] coreb: just because a lot of noobs misuse it, doesn't mean people who know what they're doing shouldn't be able to foreach collections, and do ifs [22:34] tjholowaychuk: I just dont really like prepping an object just to pass to the template [22:34] tjholowaychuk: when I could just pass the object [22:35] coreb: the complexity's just somewhere else [22:35] AntelopeSalad: you can still pass an object and display its properties however you see fit with mustache [22:35] tjholowaychuk: yeah exactly [22:35] coreb: it's a design issue [22:36] coreb: I just do foreaches and ifs in my templates, really, and that's readable [22:36] coreb: I do no logic there [22:36] AntelopeSalad: example, check this out - https://github.com/janl/mustache.js [22:36] AntelopeSalad: then look at the "Dereferencing Section" section of the readme [22:37] AntelopeSalad: that's pretty straight forward and painless for both the developer and the designer [22:37] tjholowaychuk: AntelopeSalad: yeah, still not flexible in some cases though [22:37] tjholowaychuk: well a lot [22:38] xSmurf: http.createClient is gone? I've been out of the loop too long :/ [22:38] dandean: AntelopeSalad: This might make mustache work a little better for you from within Express: https://github.com/dandean/mustachio/ [22:39] dandean: It adds the idea of View Helper objects which live next to your mustache views. [22:39] coreb: you could do jade and have no logic at all in your templates, why use a template engine that enforces it [22:39] no-gooder has joined the channel [22:39] tjholowaychuk: "myview.mustache.js" [22:39] tjholowaychuk: thats the reason I dont like mustache [22:39] tjholowaychuk: haha [22:39] rauchg has joined the channel [22:40] tjholowaychuk: you have these objects that are ONLY useful for templates [22:40] tjholowaychuk: doesnt really make much sense [22:40] dandean: tjholowaychuck: it's exactly what I'm looking for. I can't stand how messy templates get when logic is in there. [22:40] tjholowaychuk: dandean: yeah [22:40] tjholowaychuk: pros/cons [22:40] tjholowaychuk: I like that it would look cleaner [22:40] dandean: makes tons of sense for the way I like to work, but I can see both sides, for sure. [22:40] tjholowaychuk: but I dont like having more areas influence the template [22:41] coreb: logic should be in the controller [22:41] coreb: or at least handled there [22:41] dandean: coreb: depends... [22:41] no-gooder: hey guys [22:41] no-gooder: is there any serialization library that i can use with node.js which supports circular referencing ? [22:41] sechrist: big.handlebar.mustache.js [22:42] tjholowaychuk: dandean / coreb: maybe express should have an optional event when rendering [22:42] AntelopeSalad: dandean: i've been using https://github.com/fat/stache but tj said it's pretty dirty [22:42] tjholowaychuk: to prepare objects [22:42] tjholowaychuk: but still do res.render() like normal [22:42] tjholowaychuk: but say iterate items and assign classes so you just do foo(class=item.class) [22:42] no-gooder: sechrist, was that to me? [22:43] sechrist: lol no, just playing off of tj's comment [22:43] _fat has joined the channel [22:44] dandean: tjholowaychuck: I'm not too clear on how that would work. [22:44] coreb: an optional event, but still do rendering as normal? [22:44] tjholowaychuk: dandean: yeah not sure haha just brainstorming [22:44] willwhite has joined the channel [22:44] tjholowaychuk: it wouldn't be to nice, again you would be prepping the object somewhere other than the template [22:44] tjholowaychuk: kinda lame [22:44] dandean: AntelopeSalad: I haven't used fat's stache module, but he seems like a smart guy. [22:44] sechrist: tj have you encountered anything that can't be represented in jade from the original html? [22:45] sleeplessinc_: Is there any way that the callback for an http server in node, could be invoked twice on the same transaction? [22:45] tjholowaychuk: sechrist probably [22:45] sechrist: hm [22:45] mscdex: sleeplessinc_: favicon.ico [22:45] tjholowaychuk: sechrist: cant think of anything right now [22:45] coreb: how does one do doctype and similar? //doctype ...? [22:45] tjholowaychuk: there are some limitations [22:45] tjholowaychuk: like foo(foo:bar: baz) would need 'foo:bar' for the namespace [22:45] sleeplessinc_: twice on the same CONNECTION (socket connect) ? [22:45] dandean: tjjolowaychuck: but not in the controller, right? The event would fire, and some other observing function would fire with the data as the argument? [22:46] kawaz_air has joined the channel [22:46] tjholowaychuk: dandean: yeah [22:46] mscdex: sleeplessinc_: possibly, check request.url [22:46] tjholowaychuk: with the view name etc [22:46] dandean: interesting. but where would that live? [22:46] tjholowaychuk: good question [22:46] tjholowaychuk: anywhere really [22:46] dandean: for me, it's nice that that stuff lives right next to the view it's associated with. [22:46] tjholowaychuk: since express is not really structure bound [22:47] dandean: I suppose you could just pass in a function, and devs could maintain their own helper objects with related functions. [22:47] dandean: nah, I still like myview.mustache.js ! [22:48] coreb: dandean: have a blast ;) [22:48] dandean: coreb: lighting the fuse. [22:48] coreb: it's important to have options [22:48] tjholowaychuk: yeah [22:49] tjholowaychuk: they all have limitations [22:49] dandean: indeed [22:49] tjholowaychuk: I think liquid is a nice middle ground [22:49] coreb: yeah, and it's based on what we personally like, not what's right [22:49] tjholowaychuk: but I still dont like typing html [22:49] dandean: gah, I fucking hate liquid [22:49] indexzero has joined the channel [22:50] tjholowaychuk: i think its well done [22:50] tjholowaychuk: gives you flexibility [22:50] Mrfloyd has joined the channel [22:50] tjholowaychuk: but still in a designer-ish way haha [22:50] dandean: I've just had a few excruciating shopify experiences. [22:50] tjholowaychuk: and restrictive enough that you can optimize it well [22:51] coreb: shouldn't be hard for designers to learn jade though [22:51] coreb: they don't do logic, and they don't need to [22:51] tjholowaychuk: dunno [22:51] tjholowaychuk: from what i've seen designers barely touch templates [22:52] tjholowaychuk: all our "designers" code [22:52] tjholowaychuk: haha [22:52] tjholowaychuk: we dont have a designer [22:52] tjholowaychuk: they give us some pictures [22:52] tjholowaychuk: and thats it [22:52] coreb: yeah, that's typical [22:52] coreb: they don't want to learn html and css [22:52] dandean: The amount of code you have to write in liquid to do rather simple logic or data modification is just staggering. If they provided a view helper class it'd be way easier to use. [22:52] coreb: I dislike especially css work, so that's frustrating [22:53] tjholowaychuk: all the programmers on our team do css/html [22:53] coreb: they'd give you a picture, you'd have to implement it in grief, then they'd complain about pixels being off [22:53] _fat has joined the channel [22:53] tjholowaychuk: haha as they should! [22:53] coreb: they should learn css themselves [22:53] coreb: I don't need people drawing websites in photoshop [22:55] mscdex: wysiwyg! [22:56] no-gooder: anyone used dojo on serverside ? [22:56] mscdex: no, but i've used node on serverside :-D [22:56] dandean: no-gooder: i haven't, but dojo scares me... [22:57] no-gooder: dandean, i haven't used it either. i need to use for serialization. :S [22:58] dandean: what kind of serialization? [22:58] no-gooder: mscdex, keep going then :) [22:58] no-gooder: dandean, circular referencing [22:59] mscdex: you know, if we got the year of linux on the desktop, why can't we have the year of node in the browser? :-D [22:59] nlco has joined the channel [23:02] Metapony has joined the channel [23:03] dyer has joined the channel [23:03] jasong_at_apache has joined the channel [23:03] coreb: how many has linux on their desktops, still less than 1%? [23:04] AntelopeSalad: i have linux on my desktop, but it's running in a VM :< [23:05] Draggor: I have linux running on most of my machines [23:05] Draggor: 1 windows, 1 macbooc [23:05] Draggor: and like, 6 nix boxen [23:05] coreb: yeah, but you're probably a real geek [23:05] Draggor: I am [23:05] mscdex: hah [23:05] replore_ has joined the channel [23:05] Draggor: ACTION represent [23:06] coreb: why do you have both the wintendo and the macfu [23:06] Draggor: I should pack [23:06] Draggor: win machine is for games [23:06] coreb: figures [23:06] Draggor: macbook because it was the best deal for a lemon policy'd laptop through best buy at the time [23:07] coreb: a lot of node guys seem to use macs [23:07] Draggor: I greatly dislike osx compared to linux [23:07] Draggor: but I'll take osx over windows any day for non gaming [23:07] coreb: I like win 7 [23:07] Draggor: It helps that the person I was crushing on at the time convinced me of macs :3 [23:08] Draggor: otherwise there was a toshiba i was eyeing [23:08] mikeal has joined the channel [23:08] coreb: but he/she just used you? [23:09] cloudhead has joined the channel [23:10] Draggor: Ha, no, just made a convincing argument. I now no longer desire macs anyway, and for webapps I at least have an osx machine to test against. Though we are dating now, heh. [23:10] coreb: how can a geek have a girlfriend [23:11] Draggor: Oh wow I just realized i stayed gender neutral for all that, woo [23:11] dmaincrash has joined the channel [23:11] Draggor: s/girl/boy that's how [23:11] coreb: could be gay [23:12] Draggor: Our biggest 'war' of sorts is he's a .net guy, and I'm a 99% nix guy (yeah I know there's mono) [23:13] boghog: how do you manage :o [23:13] JimBastard: last call for trampoline dodgeball today in SF [23:13] Draggor: I'm slowly converting him to node.js [23:13] coreb: I work with .net in my day job [23:13] sechrist: i'm going [23:13] Draggor: I work with java in my day job, makes me want to /wrist a lot [23:13] sechrist: possible with a +1 [23:13] eventualbuddha: Draggor: does node.js work on windows? I thought it didn't... [23:13] coreb: used to do java, the new cobol [23:13] Draggor: eventualbuddha: It works fairly well under cygwin for the most part [23:13] eventualbuddha: ah [23:14] sechrist: java? nobody uses that! [23:14] sechrist: learn cobol! [23:14] Draggor: FFI + cygwin is kinda.. hit or miss [23:14] mscdex: windows is a miss [23:14] Draggor: Don't get me wrong, I want windows to pull an Apple and fork a bsd [23:15] Draggor: windows, MS, whatever the company is [23:16] langworthy has joined the channel [23:16] eventualbuddha: wow, when that happens then the hell will truly have frozen :) [23:17] coreb: linux had its shot with netbooks [23:17] mscdex: gah, when will xfce ever implement 'auto arrange' for their desktop?! [23:17] eventualbuddha: linux desktop still sucks, imo [23:17] coreb: eventualbuddha: yeah, for a lot of stuff, I like linux, but only for programming and servers [23:18] rauchg: linux and desktop can't be in the same sentence [23:18] mart_ has joined the channel [23:18] mscdex: lies [23:18] eventualbuddha: coreb: agreed [23:18] techwraith: ubuntu is actually rather good [23:18] rauchg: os x and desktop can [23:18] rauchg: ACTION trololols [23:18] Hamms has joined the channel [23:18] eventualbuddha: rauchg: os x and server can't really, either [23:18] eventualbuddha: and therein lies the rub [23:18] rauchg: haha yep [23:18] TheDeveloper has joined the channel [23:18] blah has joined the channel [23:18] xeodox: Is it possible to use EJS but name the templates ".html" [23:18] mscdex: too bad osx doesn't even come with a decent terminal app [23:19] malkomalko: tjholowaychuk.... why did you choose to use {} for interpolation? seems like this is a bit harder because there are also css literals using the braces [23:19] malkomalko: something that magnifies it anyway [23:19] tjholowaychuk: malkomalko: because I'm magical [23:19] eventualbuddha: mscdex: I've been liking iTerm2 recently [23:19] malkomalko: lol [23:19] coreb: mscdex: I've sure you have to pay for a terminal app for os x [23:19] tjholowaychuk: but yeah it complicates things [23:19] tjholowaychuk: haha [23:19] tjholowaychuk: not to badly, just has a few restrictions [23:19] eventualbuddha: coreb: iTerm2 is free and open source [23:19] tjholowaychuk: but I dont support people who write retard css [23:20] malkomalko: retardcss! [23:20] mscdex: eventualbuddha: i don't use osx enough to warrant installing a separate terminal app, but yeah [23:20] mscdex: it just boggles my mind [23:21] coreb: putty's great [23:21] mscdex: yeah, that's usually what i end up using [23:21] mscdex: i ssh in from a real os [23:21] mscdex: :-D [23:22] eventualbuddha: actually, imo the best thing to happen in the last several years to the linux desktop experience is Google Chrome [23:22] malkomalko: tj.. do you suport same line literal css? [23:22] tjholowaychuk: malkomalko: yup [23:22] tjholowaychuk: unfortunately [23:22] malkomalko: #foo { color: #FFF } [23:22] malkomalko: crap [23:22] malkomalko: lol [23:22] tjholowaychuk: I hate when people do it [23:23] tjholowaychuk: but yeah [23:23] malkomalko: but.... #foo{color: #FFF} [23:23] malkomalko: not valid right? [23:23] malkomalko: say no! [23:24] tjholowaychuk: malkomalko: could be [23:26] _fat has joined the channel [23:26] industrial has joined the channel [23:27] industrial: I have npm installed on osx, and node, but I can't seem to require 'express'. I have it installed through npm [23:27] industrial: so I have an express binary in my path aswell [23:29] tjholowaychuk: malkomalko: added support for that [23:29] tjholowaychuk: doh breaks a test [23:30] coreb: that's why you shouldn't do tests [23:30] tjholowaychuk: my fix breaks stuff like "body{padding: 5px}input{foo:'bar'}" [23:30] industrial: any lib paths I need to set? [23:30] tjholowaychuk: super retarded css [23:30] tjholowaychuk: gahhh [23:30] malkomalko: why should we even care about that bullshit? [23:30] tjholowaychuk: wish people would just do foo {\n props\n} like normal people [23:30] tjholowaychuk: haha [23:30] malkomalko: who the hell writes css like that? [23:30] tjholowaychuk: yeah [23:30] tjholowaychuk: i dont care about that one [23:31] tjholowaychuk: you'd be surprised [23:31] tjholowaychuk: haha [23:31] malkomalko: they are wrong! [23:31] dandean: tjholowaychuck: you're totally going to approve this guy's pull request, right? https://github.com/visionmedia/express/pull/648/files [23:31] tjholowaychuk: foo\n{\n} wont work either [23:31] tjholowaychuk: but its just lame [23:31] tjholowaychuk: woah [23:31] tjholowaychuk: dandean: haha [23:31] tjholowaychuk: wow [23:31] coreb: all the people in tjholowaychuk's team do css that way [23:31] dandean: just do that new automatic merge thingy github built. [23:32] malkomalko: dandean: HAHAHA [23:32] sechrist: bleh [23:32] sechrist: I love the way jade looks [23:32] tjholowaychuk: i feel bad [23:32] tjholowaychuk: that he wasted that time [23:32] sechrist: but I'm not sure I want to impose another standard on my guys [23:32] tjholowaychuk: sechrist: understandable [23:32] sechrist: is the only other alternative ejs? [23:32] malkomalko: are you talking about front end guys learning jade over html? [23:32] aho has joined the channel [23:32] tjholowaychuk: not at all [23:32] tjholowaychuk: there are at least 8 or 9 template engines [23:32] sechrist: what's something with good community backing? [23:32] tjholowaychuk: that work with express [23:32] sechrist: all 9 don't have that [23:33] malkomalko: I don't buy the jade argument [23:33] tjholowaychuk: jade argument? [23:33] sechrist: mine? [23:33] malkomalko: all of jade can be boiled down into like a 10 line tutorial [23:33] tjholowaychuk: oh [23:33] sechrist: it's converting old code that's bitten me [23:33] tjholowaychuk: yeah it's pretty basic [23:33] sechrist: if there was a two-way thing [23:34] sechrist: hell yes [23:34] tjholowaychuk: try that html2jade thing [23:34] malkomalko: so you have a lot of html that you want converted to jade? [23:34] sechrist: well I mean just for weird cases like learning syntax [23:34] sechrist: if I have some html that I can't figure out how to escape properly [23:34] sechrist: I'd like to run it through a tool [23:34] sechrist: and get the proper solution [23:34] tjholowaychuk: = escapes [23:34] tjholowaychuk: != doesnt [23:34] tjholowaychuk: thats all you need to know really [23:34] industrial: nodejs being the webserver part itself, I can't print application errors to the screen like with apache + php? [23:35] paolodedios has joined the channel [23:35] tjholowaychuk: my docs are kinda shitty though [23:35] malkomalko: yah jade is very basic [23:35] malkomalko: I've been using it for a long time [23:35] javaanse_jongens has joined the channel [23:35] malkomalko: and it has only bitten me a few times [23:35] tjholowaychuk: attrs [23:35] sechrist: tjholowaychuk: what's the purpose of the conditonals.js example you have? [23:35] tjholowaychuk: were the bitch [23:35] sechrist: that made me think that conditions weren't a part of the language [23:35] sechrist: but they are [23:35] sechrist: so idk [23:35] tjholowaychuk: sechrist: you can implement your own jade compiler "subclass" to make first-class conditionals etc [23:35] malkomalko: just to show you how you can create your own filters [23:36] tjholowaychuk: if foo instead of - if (foo) [23:36] coreb has joined the channel [23:36] tjholowaychuk: we use a subclass for translation etc [23:36] malkomalko: I'd say that's really the only advanced thing [23:36] tjholowaychuk: yeah the AST stuff is kinda confusing [23:36] Nexxy: ACTION requests an official definition of the term, "retard css" [23:36] tjholowaychuk: Nexxy: hehe :D [23:36] tjholowaychuk: malkomalko: I'd like to make it pluggable too [23:36] tjholowaychuk: instead of inheritance based [23:36] sechrist: also the vim and textmate plugins i've tried using are far from perfect [23:36] malkomalko: how about body{padding: 5px}input{foo:'bar'} [23:36] tjholowaychuk: jade.use(conditionals) etc [23:36] sechrist: I should probably look to see if I can fix the bugs [23:37] JJMalina has joined the channel [23:37] sechrist: but one bug is so glaringly obvious i'm sure there's a reason it's not working [23:37] tjholowaychuk: sechrist: yeah they are not amazing [23:37] Nexxy: also since jade is being discussed [23:37] Nexxy: iz best option for templating? [23:37] tjholowaychuk: sechrist: the biggest beef for me is that - js stuff here is not parsed as js [23:37] tjholowaychuk: for TextMate at least [23:37] Nexxy: I know I've asked it before but I just want to make sure [23:37] tjholowaychuk: there is no "best" [23:37] sechrist: Nexxy: there isn't a best [23:37] sechrist: that's the problem [23:37] malkomalko: yah that'd be nice for the jade stuff, but I don't think it's bad as it is [23:37] Nexxy: most widely used/most likely to be able to have questions answered? [23:38] Nexxy: compared to mustache or something [23:38] malkomalko: if you are going to get your hands wet and manipulate an AST, you probably know that shit anyway [23:38] Nexxy: omg language [23:38] malkomalko: do you mean js client side templating? [23:39] Nexxy: ya [23:39] malkomalko: check out this page [23:39] malkomalko: body{padding: 5px}input{foo:'bar'} [23:39] malkomalko: ERRR: http://jsperf.com/dom-vs-innerhtml-based-templating/143 [23:42] AntelopeSalad: the jade test wouldn't even run in opera for some reason [23:42] tjholowaychuk: the link is busted [23:42] tjholowaychuk: (for jade's js) [23:42] malkomalko: I'm a big fan of doU and doT [23:43] malkomalko: been using that lately.. score very fast, and is all I really need [23:43] isaacs: are you guys talking about WoW in here or something? [23:43] malkomalko: uber nerd alert [23:43] isaacs: wow. [23:43] malkomalko: dot :P [23:44] isaacs: adn here i thought node.js was already as nerdy as it gets [23:44] malkomalko: I'm sad that I remember that [23:44] halfhalo: ACTION walks away slowly [23:46] isaacs: i am so psyched for nodeconf [23:46] tjholowaychuk: malkomalko: did you check the branch? [23:46] malkomalko: haven't gotten a chance to, leaving work now [23:46] malkomalko: gonna pull it down and check it on the train ride home [23:46] tjholowaychuk: sounds good [23:46] sleeplessinc has joined the channel [23:46] dandean has joined the channel [23:47] xeodox: In Express, how do I always send a variable down to the template? I don't want to include it in the res.render every freaking time. Otherwise I would have to copy and paste it 10 times! [23:47] xeodox: oops underline? [23:47] mart_ has left the channel [23:48] malkomalko: you could use a middle ware to set the local programmatically [23:48] malkomalko: res.local() [23:48] tjholowaychuk: xeodox: is it something you can apply at the app level? [23:48] tjholowaychuk: is it static data? [23:48] tjholowaychuk: app.locals() [23:48] tjholowaychuk: or res.local[s]() [23:48] xeodox: what's app.locals? How do I set that? [23:48] tjholowaychuk: or passing to the template [23:48] Tobsn: hmm does anyone know if i can access redis or mongodb directly from the command line? [23:48] Tobsn: without any drivers etc. [23:48] tjholowaychuk: xeodox: local variables [23:48] tjholowaychuk: like the others [23:48] xeodox: Tobsn: mongo -uusername -ppassword database [23:48] tjholowaychuk: but you can apply them all the time [23:48] malkomalko: Tobsn: mongo [23:49] Tobsn: eval right?` [23:49] xeodox: Tobsn: But you gotta start mongod first [23:49] Tobsn: well yeah of course [23:49] malkomalko: alright.. gonna check out that branch [23:49] malkomalko: be back later [23:49] Tobsn: nice... i think i can have a bash script that stuffs logs into mongodb ;) [23:50] bwinton` has joined the channel [23:50] xeodox: tjholowaychuk: can you show me how to do it in an example in pastebin? [23:50] tjholowaychuk: xeodox: it's in the docs [23:50] tjholowaychuk: http://expressjs.com/guide.html#app.helpers() [23:50] tjholowaychuk: just havent updated [23:50] tjholowaychuk: with the locals() name [23:50] tjholowaychuk: same thing [23:51] tjholowaychuk: bad example [23:51] tjholowaychuk: haha [23:51] xeodox: tjholoway: yes, i understand you can set res.locals( blah, blah)....but I don't want to copy and paste that to every Controller function [23:51] tjholowaychuk: i should update that [23:51] chrislorenz has joined the channel [23:52] willwhite has joined the channel [23:52] xeodox: tjholowaychuk: update what? [23:53] tjholowaychuk: use middleware then [23:53] tjholowaychuk: or some helper function [23:53] tjholowaychuk: anything within the req/res cycle can assign the locals [23:53] tjholowaychuk: but it's up to you to decide where [23:54] mikeal has joined the channel [23:55] captain_morgan has joined the channel [23:55] dandean: xeodox: app.all("*", function(req, res) { /* set local */ }) [23:55] Bwen: anyone can help me understand why it thinks it has no test() function in this snippet http://pastie.org/1845459 ? [23:55] xeodox: thanks guys, got it. [23:56] uho has joined the channel [23:57] RusAlex has joined the channel [23:58] bastilian_ has joined the channel [23:59] ji0n has joined the channel