<   January 2012   >
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
00:00 <ceej> hey, is there a simple way to override a specific find_by method, like find_by_login ?
00:00 <maxogden> markq: line 80
00:00 <guy> https://gist.github.com/76eb6e8bfe3908020c9c
00:00 <guy> any clue?
00:00 <Lingerance> ceej: obj.find_by_object = function() { ... }
00:01 <markq> that...sucks
00:01 <ceej> Lingerance: so you can't do it inside class Account < ActiveRecord::Base ?
00:01 <Lingerance> ... are you in the right channel?
00:01 kevwil joined
00:02 <ceej> o wups LOL
00:02 <ceej> ty :)
00:02 <maxogden> rad
00:02 <Lingerance> np
00:02 <guy> Just in case, I've installed nodejs using this repo http://nodejs.tchol.org/
00:02 manuj joined
00:02 r04r joined
00:02 manuj left
00:03 <maxogden> guy: git clone https://github.com/joyent/node && cd node && git checkout v0.6.7 && ./configure && make && sudo make install
00:03 <guy> What's wrong with the repo?
00:03 <Draggor> isn't latest version 0.6.8?
00:03 infynyxx joined
00:04 <maxogden> guy: just giving you alternatives that i know work
00:06 munichlinux joined
00:06 <guy> ok.. that's really strange
00:06 <guy> https://gist.github.com/9ac97182736b4a0ae177
00:06 <guy> nodejs is under `nodejs` name rather than `node`?
00:07 <maxogden> guy: im guessing the weird repo you're using does that
00:07 <guy> It is official repo fromhttp://nodejs.org/
00:08 <maxogden> guy: it says at the bottom "This project is not formally related to or endorsed by the official Joyent Node.js open source or commerical project."
00:08 <maxogden> guy: i am just being pedantic though
00:08 austih joined
00:09 <maxogden> guy: you should rename it to node cause everything will expect the binary to be node and not nodejs
00:09 <guy> is there a way to rename it?
00:09 <maxogden> guy: mv /usr/bin/nodejs /usr/bin/node probably
00:10 <guy> merci!
00:12 JohnBeales joined
00:12 dimatosaurus joined
00:14 iLico joined
00:14 dimatosaurus left
00:15 _dc joined
00:17 zilch joined
00:17 cnu joined
00:17 r04r joined
00:17 r04r joined
00:17 <Lingerance> guy: Fedora has a package named node that is in /usr/bin/node; I would recomend you not do the mv command
00:18 <guy> I am using CentOS 6
00:18 <Lingerance> Instead: ln -s `which nodejs` ~/bin/node
00:18 mateodelnorte joined
00:18 <Lingerance> There's a good chance it has the same package...
00:19 <mateodelnorte> Anybody ever had an "Error: EMFILE, Too many open files" error with bouncy?
00:19 <maxogden> mateodelnorte: 3 days ago i heard substack say he has never used bouncy in production so i'm sure he'd love a bug report
00:20 nerdfiles joined
00:20 orlandovftw joined
00:20 <mateodelnorte> maxogden: heh. well, sounds like an indicator I should use HAProxy in prod... :P thx
00:21 flip_digits joined
00:21 <maxogden> mateodelnorte: node is more like LAProxy
00:21 <ChrisPartridge> mateodelnorte: sounds like max file descriptors was hit
00:21 khrome joined
00:22 nerdfiles left
00:22 <mateodelnorte> ChrisPartridge, I think that's it. But the question is why. My proxy app dies, but my clustered, child_process spawned child sites don't. Indicates to me it's inside bouncy.
00:23 <ChrisPartridge> mateodelnorte: bouncy just isnt handling the error
00:23 <guy> ok. I messed up a bit. Anyone mind helping me around? How to remove node.js after installing it using `git clone https://github.com/joyent/node && cd node && git checkout v0.6.7 && ./configure && make && sudo make install`
00:24 <guy> I've tried `make uninstall` and it says success, but `node -v` still brings v0.6.8
00:24 loucal_ joined
00:25 dshaw_ joined
00:25 <ChrisPartridge> mateodelnorte: https://github.com/isaacs/node-graceful-fs - might be able to just drop that in
00:25 <maxogden> guy: if you installed 0.6.7 and it says 0.6.8 then it must be hitting a different installation, no?
00:26 <guy> no, I've installed 0.6.8; sorry wrong copy paste
00:26 <guy> but only v changes.
00:26 <bradleymeck> mateodelnorte, thats a leaking file descriptor then
00:26 kmiyashiro joined
00:26 <maxogden> guy: gotcha
00:27 catshirt joined
00:28 <bradleymeck> mateodelnorte, we saw something similar in node-fork recently
00:28 <mateodelnorte> so far all of these scenarios sound like issues bouncy should handle internally, no?
00:28 <bradleymeck> mateodelnorte, correct, bother substack
00:28 <mateodelnorte> Will do. Thanks guys
00:28 <bradleymeck> or try node-http-proxy
00:29 <maxogden> guy: this is all make uninstall does: https://github.com/joyent/node/blob/master/tools/installer.js#L114-117
00:29 r04r joined
00:29 <guy> -bash: cd: /usr/bin/node: Not a directory
00:30 hipertracker_ joined
00:30 <guy> but I can still access node in CLI
00:30 <maxogden> guy: `which node`
00:30 <guy> /usr/bin/node
00:30 <guy> ....
00:30 materialdesigner joined
00:30 <Aria> ... Right. It's not a directory ;-)
00:30 <maxogden> guy: haha
00:30 <guy> oh wait. -bash: cd: /usr/bin/node: Not a directory
00:30 <guy> yeah, didn't notice "Not a directory"
00:31 <superjoe> wow
00:31 <superjoe> guy, time to take a 15 minute break? :)
00:31 <guy> Not really.. I made changes on production server that result in failure. 5:31
00:32 <guy> Hopefully no one is awake yet.
00:32 <superjoe> you made the changes directly on the server?
00:32 <guy> Don't really understand why make uninstall didn't work.
00:32 <guy> Moving project files to new server, superjoe.
00:33 xaq joined
00:33 <guy> https://gist.github.com/38da92e2b89fef577d96
00:33 <guy> It didn't actually do https://github.com/joyent/node/blob/master/tools/installer.js#L114-117
00:34 <guy> any clue why?
00:35 neilk_ joined
00:35 hasenj joined
00:37 pradeebv_ joined
00:37 sechrist joined
00:37 raincole joined
00:38 fr0stbyte joined
00:38 pradeebv__ joined
00:39 sdwrage joined
00:41 mn12345 joined
00:41 <guy> anyway.. removed everything manually
00:42 r04r joined
00:47 nerdfiles1 joined
00:48 replore joined
00:48 replore_ joined
00:50 <guy> after I install forever using `npm install forever -g`
00:50 <guy> and type `forever` afterwards, I get -bash: forever: command not found
00:50 fr0stbyte joined
00:50 soapyillusions joined
00:50 kevwil joined
00:51 <maxogden> guy: it sounds like your path is wonky
00:51 <maxogden> guy: in general
00:51 <guy> anyone can help me out sorting this all out?
00:51 <guy> I am starting to freak out a bit..
00:51 <konobi> guy: `hash -r`
00:52 <guy> no output
00:52 r04r joined
00:52 <konobi> ...
00:52 <Aria> no output is unix for "That went splendidly."
00:52 phire joined
00:53 <guy> yeah, but `forever` still doesn't work
00:53 <guy> this is output of `npm list`
00:53 <guy> https://gist.github.com/6e28e33da62568aead70
00:53 <guy> so it is installed
00:55 mikeal joined
00:56 guy left
00:56 atdiehm joined
00:58 <bradleymeck> guy is /var/www/virtualhosts/dev.anuary.com/node on your PATH env variable? and that /bin etc?
00:59 tom__ joined
00:59 Me1000 joined
00:59 <bradleymeck> but yes your PATH is pretty toasted, i would check `env` and try to fix it
01:02 <Aria> npm list -g would show yout globally installed
01:03 mraleph joined
01:05 r04r joined
01:06 `3E joined
01:09 Edy joined
01:11 ericmuyser joined
01:13 cache_za joined
01:13 versicolor joined
01:18 DEV0_ID joined
01:22 bartt joined
01:23 ceej joined
01:23 yogieric joined
01:24 shadow_s joined
01:25 mikeal joined
01:25 <yogieric> When I did "npm search jsdoc", I see lots of options. What's best?
01:27 `3E left
01:27 jetienne joined
01:27 r04r joined
01:30 stayarrr joined
01:33 SamuraiJack joined
01:33 mikeal joined
01:33 strathmeyer joined
01:36 saikat joined
01:37 psjinx joined
01:37 mikeal joined
01:38 levi501d joined
01:39 r04r joined
01:39 r04r joined
01:45 noderjs joined
01:45 anoop joined
01:45 harthur joined
01:46 bulatshakirzyano joined
01:49 r04r joined
01:49 ccat joined
01:50 davetayls joined
01:52 Hamms joined
01:53 Lars_ joined
01:53 tornad joined
01:54 p1d joined
01:57 enobrev joined
01:59 kickingvegas joined
02:03 nbqx joined
02:03 r04r joined
02:03 r04r joined
02:03 ericmuyser joined
02:06 cosmincx joined
02:08 <shanebo> hey guys what's fastest way to output a buffer in answering a request?
02:09 <maxogden> .toString() ?
02:09 <DeezGz> res(buffer)
02:10 <segv> hey with http.request can I receive streaming json from cli, (want this all local to the app not client side)
02:10 <shanebo> DeezGz do you mean res.end(buffer)?
02:10 mikeal joined
02:10 petersendidit joined
02:10 MUILTR joined
02:10 <DeezGz> sorry fs.createReadStream(f).pipe(res)
02:10 <DeezGz> sorry fs.createReadStream(buffer).pipe(res)
02:10 <shanebo> DeezGz and will that end on it's own when it's done?
02:11 <segv> I don't want to receive just the "end" data does res.on('data', ...) stream is what I should have asked
02:11 <maxogden> segv: this should get you going https://gist.github.com/1609973
02:11 <DeezGz> i dont remember
02:11 <segv> maxogden: ah
02:11 <maxogden> yes streams emit end
02:11 <SubStack> segv: .pipe(request(...), { end : false })
02:11 <maxogden> unless you do o/
02:11 <segv> cool
02:12 <segv> Minsunderstood what I was doing, I post, and the data is streamed back have a "msg" field I wanted to stream back straigt but that couchdb example looks promising
02:12 <SubStack> maxogden: \o teamwork
02:12 <SubStack> ^5
02:12 r04r joined
02:12 r04r joined
02:12 <segv> indeed thanks
02:12 <* maxogden> touches substack's hand
02:12 <shanebo> thanks DeezGz, I'll give it a go
02:12 <DeezGz> no brob
02:13 <DeezGz> thank you
02:14 <maxogden> stackhaus residents should receive kickbacks from any node conference budget surplus
02:14 <DeezGz> politics
02:15 <SubStack> stackhaus === helping
02:15 <maxogden> anyone know if express supports .pipe(response) yet
02:16 jgornick joined
02:16 <segv> SubStack: so that .pipe(request()) is attached to the data event?
02:17 <maxogden> segv: if you have streaming json coming in you'll want to use a streaming json parser such as JSONStream
02:17 <maxogden> segv: and that will give you a thing you can .pipe() to a request
02:17 <segv> got it
02:18 <markq> is cluster used for scaling node?
02:19 Locke23rus joined
02:21 <wingie> is there a good node.js library that generates 40 chars SHA-1 keys?
02:21 pgte joined
02:21 r04r joined
02:22 tdegrunt joined
02:25 skylamer` joined
02:26 <wingie> require('crypto').createHash('sha1').digest('hex')
02:27 your_name left
02:28 stagas joined
02:28 harthur joined
02:28 pgte joined
02:29 plutoniix joined
02:29 viz joined
02:31 cesconix joined
02:32 r04r joined
02:35 ph^ joined
02:35 <shanebo> DeezGz can't get it to work...
02:36 <DeezGz> u talking about the piping
02:37 cosmincx joined
02:37 <shanebo> DeezGz yeah
02:37 <DeezGz> let me find something
02:37 stagas joined
02:41 <maxogden> shanebo: are you using express
02:41 <DeezGz> is this a string buffer or a raw buffer
02:41 <shanebo> raw buffer
02:41 <DeezGz> for file
02:41 <shanebo> maxogden, no
02:41 mattgifford joined
02:41 <DeezGz> are you spitting back to a http?
02:41 <DeezGz> or to where?
02:42 dannyamey joined
02:42 <shanebo> yes
02:42 Morkel joined
02:42 rtgibbons joined
02:42 <DeezGz> try buffer.pipe(where u want it to go);
02:42 <shanebo> currently i'm just using response.end(buffer)
02:43 <shanebo> but I tried your example of:
02:43 <shanebo> fs.createReadStream(buffer).pipe(response)
02:43 <shanebo> and each file throws a 500
02:44 <DeezGz> try buffer.pipe(response) see if that works
02:44 riven` joined
02:45 <maxogden> shanebo: you might find the filed module useful if you are dealing with files
02:45 <DeezGz> check this out see if this helps
02:45 <DeezGz> http://elegantcode.com/2011/04/06/taking-baby-steps-with-node-js-pumping-data-between-streams/
02:46 <DeezGz> old school shoud work
02:46 <maxogden> shanebo: also there is lotsa code in here that does piping to http responses https://github.com/maxogden/rewriter
02:46 <DeezGz> util.pump(buffer, response);
02:46 ccare joined
02:48 <shanebo> DeezGz, no dice on buffer.pipe(response)
02:49 <shanebo> gonna try the util example
02:49 <DeezGz> that one should work, that how i started with this stream stuff, still wrapping my head around it myself
02:49 unreal-dude joined
02:50 paera joined
02:50 AD7six joined
02:52 groom joined
02:52 <shanebo> DeezGz still throwing a 500
02:53 _shorinji_ joined
02:53 catshirt joined
02:54 <maxogden> shanebo: are you rolling your own server using the http module?
02:54 <maxogden> shanebo: and where does the buffer come from?
02:54 <shanebo> SubStack, what's the best stream alternative to response.end(buffer)?
02:55 <SubStack> shanebo: what are you doing?
02:55 <SubStack> that question doesn't make sense
02:55 <SubStack> but you probably want .pipe()
02:55 <SubStack> code would help
02:55 <DeezGz> ok looking
02:56 <DeezGz> are you writing your headers first
02:56 mange joined
02:56 <DeezGz> mime type & length
02:56 <shanebo> SubStack I've read response.end(buffer) isn't as good as piping. However, I'm unclear how to pipe a buffer.
02:56 <shanebo> yes headers are all set
02:56 _shorinji_ left
02:57 <SubStack> shanebo: if you paste some actual code it would clear up a lot of the confusion
02:57 rtgibbons joined
02:58 <shanebo> SubStack I have a buffer of a file cached and when it's route is matched I write it's headers and response.end(asset.body) (asset.body is a buffer)
02:59 <shanebo> ˆˆ and all that works
02:59 fangel joined
02:59 slaskis joined
02:59 <shanebo> SubStack I'm trying to implement a pipe alternative (if it's better practice)
02:59 jbpros joined
03:00 <SubStack> shanebo: that doesn't help. code would make sense
03:00 <DeezGz> ok try var tmp_buff = ''; buffer.on('data',function(chunk){tmp_buff += chunk;});buffer.on('end',function(){res.write(tmp_buff);res.end();})
03:00 <SubStack> DeezGz: buffers do not work that way
03:00 riven joined
03:01 riven joined
03:01 Hanspolo joined
03:01 <DeezGz> what version of node are you on
03:01 <shanebo> SubStack what code do you need to see? My response.writeHead code and response.end is all there is here.
03:02 <SubStack> shanebo: it's very hard to reason about code without being able to see it
03:02 <maxogden> i can reason about code without being able to see it
03:02 <maxogden> plus open source is for hippies
03:03 <maxogden> i want to keep my intellectual property thank you
03:03 <* SubStack> uses government mind rays to steal maxogden's intellects
03:03 <DeezGz> so you want to spit a bufferd file to a response
03:04 [AD]Turbo joined
03:04 <DeezGz> are their any real experts that can help this man with his problems
03:04 <shanebo> SubStack http://cl.ly/0p0p2z3x2k1a1p3U1X2F
03:04 emattias joined
03:04 <[AD]Turbo> hi there
03:05 Locke23rus joined
03:05 riven` joined
03:05 jeffbcross joined
03:05 <SubStack> shanebo: why not just app.use(express.static(__dirname + '/static')) ?
03:05 <SubStack> or use ecstatic
03:06 <DeezGz> so asset.body is a buffer?
03:06 <SubStack> or some other module
03:06 <SubStack> that is for serving static files
03:06 <shanebo> DeezGz yes
03:06 <DeezGz> ok
03:06 sindresorhus joined
03:07 petersendidit joined
03:07 <shanebo> SubStack because I'm writing my own framework to try an learn things
03:07 <DeezGz> fs.createReadStream(asset.body).pipe(response); take off the response.end bit
03:07 <DeezGz> me too, dont give up all new to me
03:07 <shanebo> DeezGz already tried that, it doesn't work
03:07 superjudge joined
03:08 <SubStack> fs.createReadStream(filename).pipe(res) you mean
03:08 tornad joined
03:08 <SubStack> why do you want to keep file contents in memory?
03:08 <SubStack> also this: https://github.com/mikeal/filed
03:08 <DeezGz> no respone in you cause
03:08 <shanebo> SubStack because I assume it's faster?
03:09 <SubStack> does that actually matter?
03:09 <shanebo> of course
03:09 superjudge left
03:10 <DeezGz> what version of node are you using
03:11 <shanebo> v0.6.7
03:11 <DeezGz> ok
03:12 _root_ joined
03:12 <DeezGz> console.log(asset.body.pipe) tell me if u can see anything in your console?
03:13 <DeezGz> i want to see if it has a pipe method
03:13 Morkel joined
03:14 garrensmith joined
03:15 tdegrunt joined
03:15 <DeezGz> this is me pipe function if this helps u
03:15 <DeezGz> Pipe = {
03:15 <DeezGz> init:function(S,o){this[S](o)},
03:15 <DeezGz> R:function(o){
03:15 <DeezGz> fs.createReadStream(o.s,o.o).pipe(o.d);
03:15 <DeezGz> },
03:15 <DeezGz> W:function(o){
03:15 <DeezGz> o.s.pipe(fs.createWriteStream(o.d,o.o));
03:15 <DeezGz> }
03:16 <DeezGz> R = readStream W = Write stream
03:16 tdegrunt joined
03:16 <DeezGz> Pipe('W',{s:'your source',o:'stream option'})
03:17 <DeezGz> Pipe('R',{s:'your source',o:'stream option'})
03:17 rendar joined
03:17 <timoxley> SubStack the id given to the connection on server and the id given to the client connection… should they be the same?
03:17 <timoxley> SubStack RE dnode
03:18 <DeezGz> sorry wrong way
03:18 <DeezGz> like this
03:18 <DeezGz> Pipe.init('W',{s:req,d:'test.json',o:{bufferSize:(7*1024)}});
03:19 thalll joined
03:19 <segv> maxogden: tis may be my issue, http.request doesn't support streaming? I'm going about this all wrong and reading mixed tuts/outdated ones, etc.
03:19 <DeezGz> Pipe.init(Mode, object{s:'source',d:'destination',o:'options'})
03:19 TheNumb joined
03:20 hipsters_ joined
03:22 robzdc joined
03:23 <SubStack> timoxley: nope
03:23 cfq joined
03:23 <timoxley> SubStack great. thanks.
03:23 <robzdc> any nodejs/socket.io tut with all functions and that?
03:24 <maxogden> segv: it does
03:24 <segv> maxogden: Okay, so I'm just overcomplicating this haha
03:24 <maxogden> segv: see this readme for example https://github.com/mikeal/filed
03:25 mehlah joined
03:25 <segv> maxogden: ah, all i'm trying to do is pass a stream back to terminal
03:25 <segv> not serve it to a client
03:26 <DeezGz> o ok
03:26 <maxogden> .pipe(process.stdout)
03:26 <timoxley> robzdc look at the examples and the test cases on the socketio githubs.
03:26 <SubStack> .pipe(process.stdout, { end : false }) probably since closing stdout is probably not what you want
03:26 <SubStack> can get annoying for debugging when stdout gets closed >_<
03:26 <segv> That would be placed on the req?
03:27 <* segv> tests
03:27 <maxogden> segv: it would be placed on whatever stream you want to stream back to terminal
03:27 wereHamster joined
03:27 <segv> k
03:27 sgimeno joined
03:27 <maxogden> segv: can you describe what you're trying to do again? accept json and modify it in some way and stream it back to stdout?
03:28 riven` joined
03:29 <maxogden> SubStack: http://felixge.s3.amazonaws.com/11/nodejs-streams.pdf
03:30 wilmoore joined
03:30 klaustsen joined
03:31 <segv> maxogden: have a remote api, almost similar to the twitter stream, I post to it and it sends back information, a section of it i oull out and parse
03:31 <maxogden> segv: do you pull out the parse this section before the 'sends back information' step happens?
03:32 <segv> maxogden: No sending back information, I was trying to parse it on the end
03:32 przemoc joined
03:32 <maxogden> segv: hah im confused
03:33 djcoin joined
03:33 [AD]Turbo joined
03:34 <segv> maxogden: I'm half asleep trying to figure this out haha
03:34 salva joined
03:34 <DeezGz> wake up
03:34 <segv> trying :(
03:34 <DeezGz> eastcoast or west
03:35 josh-k joined
03:36 superjudge joined
03:36 dannyamey joined
03:37 josh_k joined
03:40 irok joined
03:41 Goaman_ joined
03:43 Nss joined
03:44 riven` joined
03:47 tornad joined
03:48 i42n joined
03:49 johnhamelink joined
03:49 mikeal joined
03:49 <martin_sunset> Hi guys, any recommendations for a bootstrap compatible form builder that works on client and node?
03:51 whitman joined
03:52 [AD]Turbo joined
03:52 level09 joined
03:53 mn12345 joined
03:53 riven` joined
03:55 Jippi joined
03:55 zarex joined
03:55 AvianFlu joined
03:56 claudio joined
03:56 monteslu joined
04:00 prettyrobots joined
04:00 lzskiss joined
04:01 technikhil joined
04:02 ccare joined
04:02 aliem joined
04:02 riven` joined
04:02 <wingie> anyone here using flatiron?
04:02 liar joined
04:03 stagas joined
04:04 hipsters_ joined
04:05 boltR joined
04:05 boltR joined
04:05 whitman_ joined
04:06 binary42 joined
04:06 demerzel3 joined
04:07 dgathright joined
04:07 niftylettuce_ joined
04:07 blup joined
04:08 aaronmcadam joined
04:12 plutoniiix joined
04:12 blup_ joined
04:13 Geeknux joined
04:14 sechrist joined
04:16 PureRumble joined
04:18 <booyaa> wingie: no one awake in #nodejitsu?
04:19 <DeezGz> hellp
04:22 thalll joined
04:23 AAA_awright_ joined
04:23 TomY joined
04:26 hipertracker joined
04:26 whitman joined
04:27 rendar joined
04:27 anoop joined
04:28 misza222 joined
04:29 <robzdc> How do you send a message to a specific socket? can you? or you have to do a broadcast and then specify wich user is gonna see the message?
04:30 robhawkes joined
04:30 <SubStack> net.createServer(function (c) { c.write('beep boop\r\n') })
04:30 mikedeboer joined
04:30 <SubStack> is how
04:31 markwubben joined
04:32 versicolor joined
04:32 vadi` joined
04:34 <vnjs> @sub
04:34 robotmay joined
04:35 agnat joined
04:36 ivic joined
04:38 eldios joined
04:38 mraxilus joined
04:39 tommy_ joined
04:40 jacobolus joined
04:41 hz joined
04:42 LeMike joined
04:43 yawNO joined
04:44 maritz joined
04:44 riven joined
04:47 vl4kn0 joined
04:49 aslant joined
04:50 a_meteorite joined
04:50 davetayls joined
04:50 Glenjamin joined
04:51 mattgifford joined
04:52 viz joined
04:53 claudio joined
04:55 <hemanth> I have a simple function defined in a js, have a package.json for the same, build and link works, even require work also, but not able to access any of the functions in it! As in the object thus created has no property at all, I'm missing something for sure, but don't know what
04:56 <maritz> hemanth: can you give us a gist?
04:56 <hemanth> maritz, ok, one second
04:56 <maritz> i expect you've set whatever functions you want to export in the exports variable?! :)
04:56 <hemanth> o ya!
04:57 <hemanth> this is first ever npm package :)
04:57 schristo joined
04:57 <maritz> nice :)
04:57 <hemanth> could be npm package
04:57 <hemanth> just a simple function to return http response text for a given code
04:57 <maritz> be sure to read the npm help pages for developers, json and packages :)
04:58 <hemanth> something like that is there already i presume https://github.com/joyent/node/blob/master/lib/http.js
04:58 __doc__ joined
04:58 <maritz> hemanth: apparently, yes. :D
04:59 <maritz> didn't even know that :)
04:59 <hemanth> it was not there few days back
04:59 <hemanth> :(
05:00 <maritz> hemanth: are you sure? most of these are still from the very beginning of node in july 09.
05:00 <hemanth> or I must have missed it
05:00 <maritz> happens :)
05:01 <hemanth> :) So getting response text is very much possible with http right?
05:03 pors joined
05:04 diogogmt joined
05:06 bradleyg joined
05:09 jldbasa joined
05:10 booo joined
05:10 <maritz> hemanth: require('http').STATUS_CODES
05:11 RLa joined
05:11 <* hemanth> does an rm -rf on his npm dir
05:11 <hemanth> :/
05:12 rchgonzaga joined
05:12 stagas joined
05:14 Goaman_ left
05:14 umren joined
05:15 cesconix joined
05:15 <hemanth> marienz, summarizing it all, npm init, npm build, npm link, npm install, npm publish . [ not to forget module.exports ]
05:15 <hemanth> right?
05:16 <hemanth> maritz, ^ oops
05:17 [AD]Turbo joined
05:17 aliem joined
05:17 <sunglepuss> If I use snappy to compress on the server, how do I uncompress at the client?
05:18 pickelss joined
05:18 shinuza joined
05:22 <maritz> hemanth: depends on your package. i've never needed build for example.
05:22 <maritz> but if you have a build process, yeah
05:23 <hemanth> :) ok; now brain storming to come up with a better npm, heh eh
05:23 <maritz> wait, no. you shouldn't call npm build according to the man page
05:23 <maritz> what's wrong with npm?
05:24 <hemanth> heh heh i meant a better package from myside
05:24 <hemanth> npm is brilliant!
05:24 Sami_ZzZ_ joined
05:25 mattgifford joined
05:25 Nirav joined
05:26 vguerra joined
05:27 <hemanth> maybe some hardware interaction
05:28 davetayls joined
05:29 plutoniix joined
05:30 spolu joined
05:30 r04r joined
05:31 robm joined
05:31 <Nirav> help please i have custom server on that i have install node.js as well as npm but it doest allow me to set host and port to my application consol.log(app.address()); print null
05:32 <garrensmith> Nirav: console.log
05:33 kmiyashiro joined
05:33 <Nirav> yeh
05:33 enobrev joined
05:33 <Nirav> but its print null only
05:34 <timoxley> SubStack so, if I want to fire ordinary events over socketio, does any dnode functionality expose socketio to allow that?
05:34 sotosof joined
05:37 <SubStack> no
05:37 jetienne left
05:37 <SubStack> timoxley: do this instead: http://substack.net/posts/9bac3e
05:38 <timoxley> SubStack ok, that's what I thought.
05:38 <timoxley> cool
05:41 rdmoshpit joined
05:41 a_meteorite joined
05:42 stagas joined
05:43 wereHamster joined
05:48 idea-squirrel joined
05:53 arcanis joined
06:00 mansoor joined
06:00 davetayls joined
06:01 kurtzhong joined
06:02 davidbanham joined
06:03 stagas joined
06:03 sechrist joined
06:05 icebox joined
06:05 ivic_ joined
06:06 robde joined
06:07 herbySk joined
06:08 mattgiff_ joined
06:08 blup joined
06:08 <* booyaa> ponders using minify/uglify to troll
06:08 gut4 joined
06:08 <booyaa> yeah here run this code...
06:09 <booyaa> *blort*
06:12 <booyaa> hronous nature to hell!
06:12 <booyaa> eh?
06:14 wbednarski joined
06:16 jacobolus joined
06:17 <eldios> guys does anyone of you have a *GOOD* waterproof laptop backpack?
06:17 tomasztomczyk joined
06:17 <eldios> I'm considering one from swissgear but I cannot understand if they are actually waterproof or not :/
06:18 <icebox> eldios: northsails - model surge?
06:18 <eldios> thanks icebox will check immediately
06:20 <eldios> icebox, does not look like t's waterproof
06:21 <icebox> eldios: I have been checking... and it seems your right.. well they don't state it is not waterproof :)
06:21 <eldios> that's a bit risky
06:22 <RLa> i haven never seen waterproof backpacks
06:22 JoeTT joined
06:22 <eldios> but in that case I would go for a swissgear
06:22 <eldios> http://www.swissgear.eu/the-ibex#1
06:22 <eldios> this one possibly
06:22 cnu joined
06:22 mattgifford joined
06:24 <icebox> eldios: cool
06:24 <RLa> i would expect waterproof backpack keep its contents dry when you submerge it into water
06:24 <eldios> yep
06:24 <eldios> RLa, yes that's why most of the time they say "water resistant"
06:24 p1d joined
06:24 agreco joined
06:25 <RLa> if you need real waterproof, get such laptop
06:26 <RLa> i think there are some that tolerate submerging into water
06:26 adrianF joined
06:27 <icebox> eldios: and changing approach? a good backpack with a laptop waterproof skin?
06:28 jbpros joined
06:28 <eldios> mm
06:28 apoc joined
06:29 <eldios> well tbh I do not need to submerge my laptop in water.. it's only that I do not it to get wet when I ride my motorbike and I'm surprised by rain
06:29 thalll joined
06:29 <icebox> eldios: ok... use two plastic bags :)
06:30 <eldios> that's a good workaround.. but if a good water resistant backpack existed I would have choosen that.
06:30 pradeebv joined
06:30 <eldios> anyway as I can read the one I was choosing from swissgear looks well water-resistant
06:31 <eldios> I'll buy that one and let you know =)
06:34 HardFu joined
06:35 <eldios> well.. I was wrong.. an actual waterproof backpack exists --> http://www.amazon.com/Lowepro-DryZone-Camera-Backpack-Yellow/dp/B00009R855/ref=sr_1_fkmr0_2?ie=UTF8&qid=1327664079&sr=8-2-fkmr0
06:35 <eldios> works even against submersion XD
06:36 gavin_huang joined
06:37 p1d joined
06:37 wbednars_ joined
06:37 raincole joined
06:38 <prettyrobots> Where do people get textures for their CSS?
06:40 <sriley> what kind of textures?
06:40 spolu joined
06:40 <prettyrobots> Everyone is using nice subtle textures.
06:40 <prettyrobots> http://get.gaug.es/documentation/reference-listing/sharing/
06:40 <prettyrobots> Like in the blue bar there.
06:40 <prettyrobots> Or the background here:
06:40 <prettyrobots> http://dimsumthinking.com/2012/01/21/a-writers-eula/
06:40 <sriley> people usually work from a design thats made in a graphics application
06:41 <prettyrobots> Yup.
06:41 <sriley> in photoshop for example the subtle text is just a noise filter
06:41 <jacobrask> prettyrobots: you're looking for subtle patterns? try http://subtlepatterns.com :P
06:41 <prettyrobots> Yes! Thanks!
06:42 <prettyrobots> I'd just seen this, but I couldn't find it again.
06:42 LarsSmit joined
06:45 booo joined
06:45 LarsSmit joined
06:45 RLa joined
06:45 jimt_ joined
06:47 viz joined
06:51 LarsSmit1 joined
06:53 stagas joined
06:54 thirdknife joined
06:54 aesptux joined
06:56 Morkel joined
06:56 N0va` joined
06:57 TimTim joined
06:59 robde_ joined
07:00 robm joined
07:00 mn12345 joined
07:02 jxie joined
07:02 satyr joined
07:02 <`10> https://github.com/ksdlck/sleepy.node
07:02 Hyp joined
07:03 stagas joined
07:03 pradeebv joined
07:04 tdegrunt_ joined
07:07 hipertracker joined
07:07 <timoxley> prettyrobots also http://www.minimal-patterns.com/
07:08 <prettyrobots> timoxley: Very cool.
07:08 <prettyrobots> Thanks everyone.
07:09 LeMike joined
07:09 d0k joined
07:10 petersendidit joined
07:11 Nirav joined
07:12 <Nirav> hi guys my node application running on 0.0.0.0 : 13886 but i can not open from brower its on live server
07:14 unomi joined
07:15 r04r joined
07:17 pors1 joined
07:17 stagas joined
07:20 yawNO joined
07:20 shinuza joined
07:20 <RLa> Nirav, maybe firewall blocks it
07:21 k1ttty joined
07:21 <Nirav> Rla : have you any idea how can i prevent this problem
07:22 Cromulent joined
07:23 alanmeira joined
07:27 slaskis joined
07:30 hipertracker joined
07:30 mn12345 joined
07:31 r04r joined
07:31 r04r joined
07:32 Juan77 joined
07:33 scott_gonzalez joined
07:35 <rdmoshpit> hey all, I'm totally new to nodejs, and kind of newbie of programming...
07:35 <rdmoshpit> there is something I don't understand with my REST client
07:35 <rdmoshpit> I'm using restler
07:36 RLa joined
07:36 <rdmoshpit> when i make a get on google.com, it works fine
07:36 <RLa> i got disconnected
07:36 lotsofcode_ joined
07:37 <RLa> Nirav, can you connect from the machine itself
07:38 <Yester> can please someone tell me if it's possible to do login sessions with nodejs and maybe a good module? i don't get a solution... i tried https://github.com/marak/session.js but i don't work for me :( maybe because i want to combine it with websockets
07:39 viz joined
07:39 <rdmoshpit> damned, my problem is with prestashop api… can't login to the api :(
07:41 eb4890 joined
07:41 cgfuh joined
07:43 jimt joined
07:46 robde joined
07:47 piscisaureus_ joined
07:48 erichynds joined
07:49 chchrist joined
07:50 jetienne joined
07:52 Edy joined
07:52 Edy joined
07:55 <timoxley> If i'm contracting to (not employed by) a company, and I figure we could solve their problems by building a bunch of modules, if they go open source, who should own the github repository?
07:55 tshpaper joined
07:56 <mansoor> timoxley, if it was done on their dime I think it should go to them because they own the rights to it
07:56 <ckknight> timoxley: it depends on where the copyright lies, which depends on the contract you're working under. If it's open-source, then it could be under their github repo and you could just clone it.
07:56 <mansoor> but I guess you could ask them, I dont' think they
07:56 <timoxley> my opinion is that it should partially depend on whose initiative it was to build the module
07:56 <mansoor> would mind you working on it
07:57 <mansoor> a "module" is just a piece of code you wrote for money :p
07:57 <mansoor> no different than any other line of code you write
07:57 <augustl> agree with ckknight, copyright is what matters
07:58 stagas joined
07:58 <timoxley> I see it that they are paying for me not for my code.
07:58 <augustl> doesn't matter how you see it, what matters is who holds the copyright :)
07:58 <prettyrobots> timoxley: What does the contract say?
07:58 <timoxley> well, actually currently we have no contract
07:58 <timoxley> it's pending.
07:59 <mansoor> lol from contractor to contractor bad idea :p
07:59 pors left
07:59 <timoxley> I have done work with them for the past 6 months, they are trustworthy
07:59 <mansoor> opens a big ugly can of worms
07:59 <prettyrobots> timoxley: Have you seen this?
07:59 <prettyrobots> http://vimeo.com/22053820?utm_source=swissmiss
07:59 <timoxley> no
07:59 <prettyrobots> Great talk.
08:00 <timoxley> I'm not at any risk of not being paid.
08:00 <prettyrobots> About contracts and payment in creative.
08:00 <timoxley> ok
08:00 <prettyrobots> Okay, but it sounds like you're confused about who holds the copyright on your work, so you should get that sorted out.
08:01 whaley joined
08:01 <prettyrobots> My understanding, IANAL, is that unless you have a contract that explicitly transfers copyright, then it says with you.
08:01 <prettyrobots> s/says/stays/
08:02 <augustl> timoxley: it makes sense that you discuss it with the client - your argument is valid. As in, you agree that they only buy your time, and the right to use what you produce, and they don't buy the copyright to it
08:02 <augustl> or at least some parts of what you produce, such as reusable decoupled standalone modules
08:02 <timoxley> augustl agreed.
08:02 satyr joined
08:02 <augustl> photographers do this I think. If you want to buy exclusive rights to a photo, the price quadruples
08:03 <timoxley> augustl agreed.
08:03 <augustl> the artifacts of photos and code is different though
08:03 pandeiro joined
08:03 <timoxley> augustl what do you mean
08:04 gqlewis_ joined
08:04 <timoxley> prettyrobots thanks, this is a good talk.
08:05 <augustl> timoxley: basically, a photo and code is not the same thing ;)
08:05 <augustl> so it's just an example of the pricing model, not an argument for using the pricing model for code
08:06 koo1 joined
08:06 rchgonzaga left
08:06 PaulIIIIIIII joined
08:06 <PaulIIIIIIII> http://www.hot.ee/keber/pilt.JPG
08:07 <prettyrobots> http://24ways.org/2008/contract-killer
08:07 <prettyrobots> timoxley: http://mylawyergabe.com/
08:07 nicki9knuckles left
08:08 tomasztomczyk joined
08:09 chchrist joined
08:09 <timoxley> prettyrobots thanks
08:09 ovaillancourt joined
08:09 enmand joined
08:09 <timoxley> yeah i think I just need to talk to them about a new contract.
08:10 <timoxley> owning the code is so much more valuable to me (code is my business) than it is to them (business is their business)
08:13 fairwinds joined
08:14 <augustl> timoxley: I think the biggest challenge is to argue that doing so doesn't cause them to indirectly pay for the work you do other clients
08:14 <timoxley> sure
08:14 garrensmith joined
08:14 <timoxley> they were planning on releasing this stuff open source anyway
08:14 <timoxley> so i think they've got pretty good attitude
08:15 <timoxley> and theya re my only client at the moment
08:16 brianseeders joined
08:17 richardrflores joined
08:17 p1d joined
08:17 sgimeno joined
08:17 Kunda joined
08:18 khinester joined
08:18 <khinester> hello
08:19 cnu joined
08:19 <richardrflores> khinester: hello
08:20 <richardrflores> khinester: Im just checking things out...using the webchat client.
08:21 <khinester> i am trying to build node 0.6.8 on freebsd but get an error https://github.com/joyent/node/issues/2623
08:21 plutoniix joined
08:21 jetienne joined
08:23 <blup> could anyone recommend reading material for js security? id like to test my app..
08:25 MadGu1 joined
08:25 socketio\test\27 joined
08:25 bnoordhuis joined
08:26 ts__ joined
08:26 <claudio> blup, I can suggest taking a look at fusker https://github.com/wearefractal/fusker
08:26 artusrocha joined
08:27 ccare joined
08:27 chchrist left
08:29 robde joined
08:29 <blup> thanks claudio
08:31 trose joined
08:32 munichlinux joined
08:33 p1d joined
08:34 tvw joined
08:37 jlaire joined
08:37 margle joined
08:39 timmorgan joined
08:39 avih joined
08:39 vl4kn0 left
08:39 <timmorgan> I was under the impression that Node.js has a 64-bit binary for Windows, but when I install and run on my Windows 64-bit machine, it's 32-bit.
08:40 <Glenjamin> mmalecki: you about?
08:40 <timmorgan> Is there a way to get a x64 binary of Node.js on Windows?
08:41 bshumate joined
08:41 bshumate joined
08:41 <timmorgan> I will accept a lmgtfy link :-)
08:42 robhawkes joined
08:43 thomaschaaf joined
08:43 <thomaschaaf> Hey what is the best XML parser for nodejs? (needs to be windows compatible)
08:43 r04r_ joined
08:44 heavysixer joined
08:45 <augustl> timmorgan: compiling it yourself, I guess
08:46 <timmorgan> bummer
08:46 level09 joined
08:46 bradleyg joined
08:47 amigojapan joined
08:48 <augustl> compiling node is really easy (on *nix at least)
08:48 kurtzhong joined
08:48 r04r joined
08:48 Poetro joined
08:49 |Freeman| joined
08:49 jimmysparkle joined
08:52 Nss joined
08:52 zarex joined
08:55 r04r joined
08:56 lazyshot joined
08:57 booo joined
08:57 qsobad joined
08:58 sparcd joined
08:58 dload joined
08:58 jlaire joined
08:58 level09 joined
08:58 <sparcd> anyone got any examples of how to make an ajax call inside node.js?
08:58 viz joined
08:59 yogig joined
08:59 <tuhoojabotti> wut
09:00 <tuhoojabotti> sparcd: normal http get/post
09:00 <sparcd> yeah
09:00 <tuhoojabotti> consult the apt
09:00 <sparcd> found something here http://nodejs.org/docs/latest/api/http.html#http.get
09:00 <tuhoojabotti> api
09:00 <tuhoojabotti> that
09:00 soapyillusions joined
09:00 r04r joined
09:01 <tuhoojabotti> res.on data
09:01 <tuhoojabotti> res.in end done
09:01 <tuhoojabotti> on*
09:01 <tuhoojabotti> sorry for mobile typos. :e
09:02 mAritz joined
09:02 quijote joined
09:03 seb_m joined
09:04 petersendidit joined
09:04 jkridner__ joined
09:06 lduros joined
09:07 r04r joined
09:08 zarex joined
09:09 Wizek joined
09:10 tomb- joined
09:10 patrickgamer joined
09:11 patrickgamer left
09:11 icebox joined
09:13 yawNO joined
09:13 RLa joined
09:13 <RLa> damn internet today
09:14 sharkbird joined
09:14 sharkbird_ joined
09:14 sharkbird__ joined
09:14 r04r joined
09:15 bluepaint joined
09:15 fumanchu182 joined
09:16 peterrs joined
09:16 <bluepaint> [Question:] I just installed vows on windows, but when I try "vows mytest.js" in cmd.exe, it isn't recognized as an external or internal command. (nodejs, npm, etc, Does work, however)
09:16 AaronMT joined
09:17 bkaney joined
09:17 <peterrs> in node_modules i have a directory called sky with symlinks to some libraries inside my application.. like sky/router -> require("sky/router/file") is it possible to have npm build these symlinks when the package is installed, or do i have to add a scripts to "scripts" directory in package.json?
09:17 <timoxley> sparcd what are you truing to do
09:18 <timoxley> peterrs you might want to look into a private npm repo
09:18 napperjabber joined
09:18 <bluepaint> timoxley: can you help me too?
09:18 <bluepaint> [Question:] I just installed vows on windows, but when I try "vows mytest.js" in cmd.exe, it isn't recognized as an external or internal command. (nodejs, npm, etc, Does work, however)
09:18 hipertracker joined
09:18 <bluepaint> where can I find this vows file manually?
09:19 <timoxley> bluepaint npm install -g vows
09:19 <bluepaint> already done it. twice.
09:19 <bluepaint> hm.. with the -g
09:19 <rdmoshpit> wow, I have a strange behavior with the restler module and the authentification by username...
09:19 <timoxley> bluepaint -g will install it so it's available as an executable on your PATH
09:19 <peterrs> timoxley: ahh.. maybe i should explained myself better.. i pull my private repo from github.. run npm link.. and it basically just downloads the required packages needed to run the app, kinda like a tiny boostrap. but that is probably not what you meant?
09:20 <bluepaint> timoxley: aha. alright. it works now. thanks ALOT! :D
09:20 <timoxley> peterrs no, more like https://github.com/dominictarr/shadow-npm
09:20 <timoxley> bluepaint np
09:20 <timoxley> peterrs you could commit the modules into git
09:21 <timoxley> peterrs git add node_modules
09:21 mAritz joined
09:21 joeferner joined
09:21 <timoxley> peterrs if you dont' want to do that, you can set up a postinstall script that will be run by npm after install, perhaps you could put that stuff in there
09:22 <timoxley> peterrs npm help scripts
09:22 r04r joined
09:23 ePirat joined
09:23 <timoxley> peterrs I'd put all the login in a a Make file, then invoke it via npm
09:23 <peterrs> timoxley: nah.. the shadow idea is good, but cannot publis the code to it though.. think i'll just to put this into my makefile :)
09:23 <timoxley> peterrs why can't publish the code to it? company secrets?
09:23 <peterrs> mm
09:23 <timoxley> mm
09:23 <peterrs> hail the corporates
09:24 cesconix joined
09:24 <peterrs> guess i'll just have to wait until someone decides to create an easy way of hosting private repos on your own build server or something like that :)
09:24 grekko joined
09:25 <timoxley> peterrs you can run your own private npm https://github.com/isaacs/npmjs.org
09:25 kevwil joined
09:25 <timoxley> I havent' done it but I know that's how the big guys do it
09:25 AlexJS joined
09:26 <peterrs> timoxley: yeah, i know.. but you know.. you never find the time to do just that.. maybe in the future! +1 github integration
09:26 jscheel joined
09:26 jscheel joined
09:27 <peterrs> thank you for the advice though :)
09:27 dthompso99 joined
09:27 <timoxley> peterrs np
09:27 baudehlo joined
09:28 redir joined
09:30 jetienne_ joined
09:30 r04r joined
09:30 r04r joined
09:31 viz joined
09:31 jmar777 joined
09:33 markprovan joined
09:33 carlyle joined
09:33 <markprovan> yo all
09:34 <jmar777> yo
09:35 Geshpacky joined
09:35 <jmar777> in both node v0.6.7 and v0.6.8, my express application ALWAYS throws an ETIMEDOUT exception at exactly 1m15s after starting it
09:35 markprovan left
09:36 tomasztomczyk joined
09:36 <jmar777> the stack trace isn't very long, but it's coming from net.js. I removed any code that involved connecting to databases, etc., so given that it's a connection issue, it must have to do with the http server itself
09:36 <jmar777> anyone else seen this?
09:37 r04r joined
09:37 r04r joined
09:38 <timoxley> jmar777 post some code
09:38 munichlinux joined
09:38 i42n joined
09:38 esmevane joined
09:39 pgte joined
09:39 <jmar777> timoxley: will do. need to reduce it first. just realized i forgot to remove a module that's connecting to rabbitmq, so that's probably my prime suspect now
09:40 sechrist joined
09:40 <timoxley> jmar777 hopefully the act of reducing it to the minimum required code to cause the bug will flush out the bug
09:40 bradleymeck joined
09:40 Druid_ joined
09:40 <jmar777> timoxley: ya. digging around the net.js where the error was being thrown, it has to do with a socket connection
09:40 broofa joined
09:41 <jmar777> timoxley: so, the rabbitmq connection seems most likely (checking to see if rabbitmq is actually running now, it's on ec2). thanks!
09:41 _unary joined
09:42 <timoxley> jmar777 np
09:42 illourr joined
09:42 <RLa> anyone written service that employs data sync between multiple parties?
09:42 <jmar777> ya, that was definitely it. just ran for 3m35s before i killed it myself.
09:42 martinkr joined
09:42 kevwil joined
09:42 <jmar777> RLa: sortta, but we basically just piggy-backed on couchdb
09:43 viz joined
09:44 tjgillies joined
09:44 <RLa> jmar777, we have relational data, which is actually quite flat, i would like to sync 1-2 tables, tables can be synced separatedly
09:44 r04r joined
09:44 <RLa> just haven't gotten how exactly to do it
09:44 <martinkr> i published a package to npm and my .npmignore included ".*" as a rule, but dotfiles in subdirectories still end up on npm. how do i exclude them?
09:45 <RLa> and without permanently storing delete events
09:45 <timoxley> RLa I'm building just that right now
09:45 <RLa> want to do some coop?
09:45 <timoxley> RLa for sure.
09:46 <RLa> can i pm?
09:46 <timoxley> sure
09:46 kevwil left
09:47 <CIA-101> node: 03Fedor Indutny 07master * r85a86b5 10/ tools/wafadmin/Tools/node_addon.py : waf: predict target arch for OSX - http://git.io/8CveZg
09:48 fly-away joined
09:48 neurodrone joined
09:48 fangel joined
09:48 francisl joined
09:50 yuva joined
09:51 r04r joined
09:51 bkaney joined
09:52 tjgillies joined
09:52 SkyRocknRoll joined
09:52 SkyRocknRoll joined
09:54 enmand joined
09:55 Kunda left
09:55 adambeynon joined
09:56 jstash joined
09:56 rowanu joined
09:56 r04r joined
09:57 wanyixue joined
09:58 anders_ joined
09:59 neebz joined
10:01 Vennril joined
10:01 petersendidit joined
10:01 <thomaschaaf> Does anyone know an XML Parser which can run on windows?
10:01 <icebox> thomaschaaf: xml2js
10:02 broofa_ joined
10:02 r04r joined
10:02 r04r joined
10:02 CarterL joined
10:02 <icebox> thomaschaaf: yes, it runs on windows
10:02 <neebz> Hello, I have created an expressjs app which is working fine. Now I need to create another app which uses some classes from the first app. e.g. I want to use the business logic layer from the first app. Is it possible?
10:02 <thomaschaaf> icebox: thanks let me look into that
10:03 <icebox> thomaschaaf: https://github.com/Leonidas-from-XIV/node-xml2js
10:03 <HardFu> neebz: sure
10:03 <HardFu> neebz: just load modules from the first app
10:03 <HardFu> those that you need
10:05 yawNO joined
10:05 diogogmt joined
10:05 <neebz> HardFu: thanks. would still require to copy the files..no?
10:05 kgriffs joined
10:06 pickelss joined
10:06 <neebz> HardFu: both apps aren't running on the same server. I was thinking along the lines of using git submodules?
10:06 <HardFu> ah yes if they don't run on the same server then yes, any way of sharing/copying files is ok
10:07 jtsnow joined
10:08 postwait joined
10:09 r04r joined
10:09 bizniz98 joined
10:10 dubenstein joined
10:10 jstash joined
10:10 senorpedro joined
10:10 <senorpedro> hi
10:10 thomblake joined
10:10 thomblake left
10:11 adrianmg joined
10:11 adrianmg left
10:12 Cromulent joined
10:13 colinclark joined
10:14 <markq> anyone know if cluster is the way to scale node?
10:14 joshsmith joined
10:14 <RLa> depends where bottleneck is
10:15 dubenstein joined
10:15 <RLa> if it's somewhere else, adding more instances will do nothing
10:15 dubenste1n joined
10:15 <markq> suppose I'm getting 1000 requests per second on one process or something
10:15 <markq> how do I scale out
10:15 <markq> 10,000*
10:16 <icebox> markq: well... it depends on the kind of app... the number of requests doesn't mean too much
10:16 r04r joined
10:16 tom__ joined
10:16 <RLa> if you have multiple cores, then yes, using cluster will help with computing power
10:16 <RLa> unless io becomes bottleneck
10:16 <jstash> markq: hypothetically speaking? yeah, cluster is one way to do it
10:16 <markq> a blog app for example
10:16 <markq> yea hypothetically
10:17 hipertracker joined
10:17 <markq> how do I scale node to different servers though?
10:17 nibblebot joined
10:17 <deedubs> markq: same as any other web tech, a load balancer
10:18 <markq> like HAProxy? or is there a module for node?
10:18 c4milo joined
10:18 <jstash> HAProxy works
10:18 <markq> anything better?
10:19 <deedubs> if your on ec2 you can use their load balancer
10:19 <jstash> we just switched from nginx to HAProxy and are looking at Mongrel2 (but M2 is quite a different beast)
10:19 <markq> I'm on rackspace
10:19 brianc1 joined
10:19 <markq> so their load balancer would work for this case?
10:19 <deedubs> yes of course
10:20 <markq> and I just run the node app on a different server on the same port?
10:20 zitchdog joined
10:20 <markq> or is it more complicated
10:21 <markq> or just a different server*
10:21 <markq> how do I set it up?
10:21 <yawNO> woah
10:21 <yawNO> felt the earthquake
10:21 <yawNO> =\
10:21 patrickgamer joined
10:21 briancray joined
10:21 <sriley> do you need to? you have enough traffic to need load balancing?
10:22 <sriley> otherwise youre just adding complexity to something thats not needed
10:22 munichpython joined
10:22 <markq> I'm just thinking ahead
10:22 <markq> right now I don't need it
10:22 <deedubs> markq: don't do that
10:22 patrickgamer left
10:22 yogig joined
10:22 <sriley> look in to how to scale your application if and when it takes off
10:23 <markq> it's sort of a nightmarish situation if I can't handle the load and I'm trying to scale at that moment
10:23 <markq> is there a guide I can look at that anyone knows of?
10:23 robm joined
10:23 r04r joined
10:23 r04r joined
10:23 peregrine81 joined
10:23 <deedubs> if you want to think ahead build blog -> get famous -> host huge event get paid $millions -> go to vegas -> lose everything -> move into box on corner
10:23 <deedubs> so just skip everything and go live in a box
10:24 <markq> that's harsh lol
10:24 <markq> and it's not a blog
10:24 kenperkins joined
10:24 <markq> I was just thinking hypothetically
10:25 <sriley> whats wrong with your current technology stack with just add another box and load balance it? or upgrade to a larger dedicated server instead of virtual server (the easier option)
10:25 <bradleymeck> markq there is no easy book to read, a lot of network engineers do that full time if it is big enough
10:25 robo joined
10:25 storrgie joined
10:26 thinkjson joined
10:26 JSLint joined
10:26 viz joined
10:26 <thinkjson> What is the preferred method of connecting to Redis from Node.js? node_redis appears to have been removed from the npm registry...
10:27 jeffbcross joined
10:27 <jstash> https://github.com/mranney/node_redis ?
10:27 <thinkjson> yeah
10:27 <joshsmith> markq: if you haven't heard the phrase YAGNI, now's the time to learn it
10:27 <thinkjson> it's not in npm anymore
10:27 <joshsmith> it's good to think ahead, but not if it stops you from getting traction now
10:27 ohtogo joined
10:28 joshkehn joined
10:28 <jstash> thinkjson: i'm interested in the same answer
10:28 <joshsmith> markq: go benchmark your app with ab and see how it performs
10:28 jeffbcross left
10:28 joshkehn left
10:28 lperrin joined
10:29 crodas joined
10:30 <CIA-101> libuv: 03Bert Belder 07v0.6 * rf925275 10/ test/test-fs.c : Fix windows build - http://git.io/j3LpzQ
10:30 apwalk joined
10:31 saikat joined
10:31 <timoxley> markq dont' use ab, it is balls, use apache jmeter
10:31 jaha joined
10:31 josh-k joined
10:32 <CIA-101> libuv: 03Bert Belder 07mcast-win * r7bc6f3a 10/ src/win/udp.c :
10:32 <CIA-101> libuv: Implement udp multicast methods on windows.
10:32 <CIA-101> libuv: Test is failing.
10:32 <CIA-101> libuv: uv_udp_set_membership is not supported for UDP/IPv6 sockets yet. - http://git.io/1wzxpg
10:32 <timoxley> thinkjson npm install redis worked for me
10:32 SamuraiJack joined
10:32 <markq> what's the best way to bench it then
10:32 JSLint joined
10:33 <timoxley> jmeter is pretty damn good for benching.
10:33 r04r joined
10:33 gsmcwhirter joined
10:34 <joshsmith> hmm I need to try out jmeter tim_smart
10:34 <joshsmith> errr, timoxley
10:35 <timoxley> joshsmith gives you lots of good stats as well as ability to ramp up/down traffic
10:35 <timoxley> joshsmith the interface sucks though. bit of a learning curve.
10:35 <joshsmith> ah that sucks
10:35 <joshsmith> I love how simple ab's interface is
10:35 <timoxley> still good though.
10:36 <joshsmith> I'll have to try it out at some point here
10:36 cjm joined
10:36 xtianw joined
10:36 <joshsmith> I'm not worried enough yet. when I have to start thinking about earned media I'll deal with that stuff
10:36 pickelss joined
10:36 <timoxley> ab doesn't model traffic remotely realistically, which is the problem. You can end up solving issues that you'll never ever have
10:37 dob joined
10:37 <joshsmith> it did help point out some flaws pretty quickly, though
10:37 BillyBreen joined
10:38 Sami_ZzZ_ joined
10:38 <timoxley> if you like ab, also check out siege
10:38 <joshsmith> yeah, I need to check that out, too
10:38 <thinkjson> timoxley: hmm. wonder why it doesn't show up in search.npmjs.org...
10:39 pradeebv joined
10:40 fatjonny joined
10:40 phidah joined
10:40 adrianmg joined
10:41 devongovett joined
10:42 xaq joined
10:42 adrianmg left
10:45 <thinkjson> my npm was jacked up because I installed 0.6 over 0.4
10:46 <Kingdutch> Argh, 'this' is biting me in the arse..
10:47 EyePulp joined
10:47 stagas joined
10:48 ding_ joined
10:48 <Kingdutch> Actually, it's not, but my node app does get ridiculously slow when I send it input very fast :o
10:49 peregrine81 joined
10:49 voodootikigod joined
10:50 jocafa joined
10:50 francisl left
10:51 <bradleymeck> Kingdutch, if you are coercing buffers to strings a lot or doing CPU intensive processing that can happen
10:51 <Kingdutch> I don't know, I'm doing some IRC in/out
10:52 davidwalsh joined
10:52 <Kingdutch> It should handle like 20 messages within a few seconds though, imo
10:52 <Kingdutch> bradleymeck: ^
10:53 JJMalina joined
10:54 cole_gillespie joined
10:55 jetienne joined
10:55 ohtogo joined
10:56 rwaldron joined
10:56 <bradleymeck> Kingdutch, yep it should
10:56 <Kingdutch> So then it must be my code : |
10:56 k1ttty joined
10:57 <Kingdutch> Or the server was lagging, could be it too
10:58 tdegrunt joined
10:59 voodootikigod_ joined
10:59 EriksLV joined
11:00 satyr joined
11:00 Me1000 joined
11:01 bizniz98 joined
11:02 RORgasm joined
11:02 k1ttty_ joined
11:02 zzak left
11:02 grampajoe joined
11:03 RORgasm joined
11:03 <Kingdutch> bradleymeck: It's quite fast if I just send it one command, then it goes really slow if I put like 5-10 within a second
11:04 <gsmcwhirter> Kingdutch: are you doing sync operations or something?
11:04 francisl_ joined
11:05 <Kingdutch> gsmcwhirter: Somehow it looks like I'm very much doing sync operations, my debug output is totally synched =|
11:05 ekryski joined
11:05 neurodrone joined
11:05 booo joined
11:05 <gsmcwhirter> a gist or equivalent would possibly help us help you identify the source of the slowness
11:06 nicki9knuckles joined
11:06 jamund joined
11:06 [AD]Turbo joined
11:06 <gsmcwhirter> Kingdutch: ^
11:06 bizniz98 joined
11:06 <Kingdutch> Hold on, it's quite a bunch
11:07 pixel13 joined
11:07 pixel13 left
11:07 artusrocha joined
11:07 tahu joined
11:07 sorensen__ joined
11:07 rwaldron joined
11:08 PeterPan- joined
11:08 <Kingdutch> gsmcwhirter: I can give you the entire 250 lines, or strip it out to the init and onMessage function which should be enough I think (As that's what's slow, if you can help me async that I can do the rest myself)
11:08 coccia73 joined
11:08 tom__ joined
11:08 <gsmcwhirter> Kingdutch: well, we can start there =) might be a problem elsewhere though
11:08 <gsmcwhirter> but that is the most likely place
11:09 monteslu joined
11:09 <Kingdutch> Hold on
11:09 <Kingdutch> How can I async this:
11:09 <Kingdutch> this.onMessage( msg ); this.emit( 'data', chunk );
11:09 brngardner joined
11:09 <Kingdutch> this.emit feels fine IMO (default EventEmitter thingy)
11:10 <Kingdutch> It's the onMessage within a loop that's blocking (The loop just reads out buffers and chops it into lines which is relatively fast)
11:10 <gsmcwhirter> I can't really tell from just that
11:10 k1ttty joined
11:10 <Kingdutch> I suppose I could do: var self = this; process.nextTick(function () { self.onMessage( msg ); }); but wont that ruin 'this' in .onMessage
11:10 joaquin_win joined
11:10 <Kingdutch> hmm ok
11:10 <Kingdutch> hold on
11:12 francisl joined
11:12 devdazed joined
11:13 francisl left
11:13 <Kingdutch> gsmcwhirter: https://gist.github.com/2b736e115226f4425b88 <-- Tried to remove as much unrelated stuff as possible and added a few comments to potential bottlenecks
11:13 <Kingdutch> Program startup is a call to initialise() then connect()
11:13 k1ttty_ joined
11:14 sharkbird_ joined
11:14 sharkbird joined
11:14 Poetro joined
11:14 <Kingdutch> When a message comes in the onData is called as a callback from the connection (net module), the onData adds the data to the buffer and just loops through it till a line is found (\r\n) and cuts that out
11:15 k1ttty__ joined
11:15 <Kingdutch> It then hands that over the parse to create a msg object, passing that to the onMessage callback which will distribute it depending on the type of message (In the case of the test this was a PRIVMSG with a command starting with the this.command character)
11:15 alanmeira joined
11:15 redir joined
11:15 <Kingdutch> All the command does is a raw send on the bot
11:16 rtgibbons joined
11:16 nicki9knuckles left
11:17 xtianw joined
11:17 zitchdog joined
11:18 tonbar joined
11:18 <gsmcwhirter> Kingdutch: the fishiest thing I see is that while loop. so when a chunk comes in, you append it to the buffer, but then you force it to handle all of it before you read the next chunk
11:19 hipertracker joined
11:19 <Kingdutch> Right, although that while in itself doesn't do a lot, so imo that's no biggy
11:19 <Kingdutch> It's the .parse and .onMessage which will add a lot of function calls, so would a process.nextTick help there?
11:20 <gsmcwhirter> possibly. I am not sure that is the best way to accomplish what you want, but it may work
11:21 <gsmcwhirter> and to answer a question from earlier, sending function (){ self.onMessage(blah);} shouldn't mess up the "this" referent for .onMessage
11:21 <gsmcwhirter> *sending = setting to nextTick
11:21 pluc joined
11:21 <Kingdutch> ok : )
11:22 <Kingdutch> What would you recon is the best way btw
11:22 <gsmcwhirter> I also don't know if how I would do it is the best way, but let me sketch something
11:23 klaustsen joined
11:25 Poetro joined
11:26 <dob> which ide are u using to develop node applications? I know the last time i had a eclipse plugin with node startbutton, but can't find that anymore. Cloud9 can't install ace...
11:26 <dob> Is there anything else?
11:26 Destos joined
11:26 <tjfontaine> vim++
11:26 napperjabber joined
11:26 <dob> tjfontaine: Hope you are kidding :)
11:27 <tjfontaine> not in the least
11:28 <* Draggor> seconds the vim-nod
11:29 <gsmcwhirter> Kingdutch: https://gist.github.com/1689622 is my sketch (NB - probably quite buggy, seeing as it is a sketch)
11:29 <gsmcwhirter> for instance, probably forgot "var self = this;" in several places
11:30 FnuGk joined
11:30 yogig joined
11:30 <dob> no, i really hate the vim syntax... Is there not a real ide with debugger and breakpoints etc...
11:30 blakehaggerty joined
11:31 <Draggor> isn't that what node-inspector is for?
11:31 riven joined
11:31 riven joined
11:31 <gsmcwhirter> Kingdutch: also, like I said, not sure if that is the right way either
11:31 <Kingdutch> this.queue.push.apply(this.queue, lines); vs this.queue.push(lines) why?
11:31 FnuGk left
11:31 <Kingdutch> And there's the problem of incomplete lines in the buffer = |
11:32 Naked joined
11:32 xaq joined
11:32 Venom_X joined
11:33 B4mb00zle joined
11:33 hellp joined
11:33 FnuGk joined
11:33 B4mb00zle left
11:33 saikat joined
11:33 Qbix1 joined
11:34 EyePulp joined
11:34 <dob> is node.js 64bit only?
11:34 brianc2 joined
11:34 <dob> on macosx?
11:35 <FnuGk> why would you run it in 32bit?
11:35 jerrysv joined
11:35 <Kingdutch> gsmcwhirter: A .emit is async right?
11:36 <dob> My current macbook is in service, so I had to use my 32 bit macbook pro :(
11:36 caolanm joined
11:36 fangel joined
11:37 hipertracker_ joined
11:37 <gsmcwhirter> Kingdutch: not 100% sure, but I think it fires its stuff on the next tick
11:38 <gsmcwhirter> Kingdutch: I have to run, sorry to cut out before this is fully straightened out. good luck
11:38 riven` joined
11:38 <Kingdutch> Haha no problem, thanks for hte help : )
11:38 <FnuGk> i think all intel macbooks are able to run 64bit. It might just not be activated if your os is older than (snow) leopard
11:38 EuroNerd joined
11:39 salva joined
11:39 mandric joined
11:39 <timoxley> whoa, I'm having trouble with some basic stuff here.
11:39 <timoxley> module.exports = SomeConstructorFunction
11:40 jiboumans joined
11:40 ts___ joined
11:40 <timoxley> if I do this, but set the prototype on SomeConstuctorFunction
11:40 <timoxley> every instance will get the same prototype
11:41 <timoxley> what's the best way to get a freshly generated prototype every time
11:41 <dob> FnuGK: No it's the first Macbook Pro from 2006 and there is only a coredou not a core2duo processor. So only 32bit
11:41 jarek joined
11:41 jarek joined
11:41 <timoxley> while still exposing constructor as module.exports and instantiating via new
11:42 munichpython joined
11:43 <Kingdutch> Does anyone know if emit is always async?
11:43 thewildpendulum joined
11:44 <bnoordhuis> Kingdutch: emit as in EventEmitter.emit? it's never async
11:45 neilk_ joined
11:45 <FnuGk> dob: hmm what if you compile it yourself? Would that not result in 32bit bins?
11:45 <jerrysv> you can defer it
11:45 <dob> FnuGK: I am not sure... did not try it yet.
11:46 <thewildpendulum> anyone use mongoose?
11:46 <dob> I hate it to install a new computer lol
11:46 <FnuGk> thats life :)
11:46 atdiehm joined
11:46 <timoxley> bnoordhuis when you emit, it doesn't fire the listeners syncronously though… it will fire them on nextTick won't it
11:46 <timoxley> ?
11:47 theBrettman joined
11:47 <timoxley> thewildpendulum don't ask to ask, just ask
11:47 <bnoordhuis> timoxley: no
11:47 sharkbird joined
11:47 <timoxley> bnoordhuis whoa.
11:47 sharkbird_ joined
11:47 <bnoordhuis> timoxley: but (nearly) all the core code wraps the emit in process.nextTick
11:47 davetayls joined
11:48 <timoxley> I thought that was part of the whole 'event driven' architecture
11:48 <timoxley> I should be doing that, I had jsut assumed it did it automatically
11:48 <timoxley> bnoordhuis mind blown.
11:49 <timoxley> bnoordhuis hm, I think it does what i described in actionscript, perhaps that's why I'm confused.
11:49 Qbix1 joined
11:49 sharkbird joined
11:50 dnjaramba joined
11:50 stefpb joined
11:50 briancra_ joined
11:51 sharkbird joined
11:51 Poetro joined
11:53 <thewildpendulum> i'm trying to store backbones models using mongoose and all the code i've read so far isn't very straightforward about how this actually done. is it as simple as opening a connection and calling save() or do i need to define a sync method?
11:55 imsky joined
11:56 jj0hns0n joined
11:57 nibblebo_ joined
11:57 r04r joined
11:57 bodisiw joined
11:57 nerdfiles joined
11:57 <Kingdutch> bnoordhuis: Aaah really?
11:57 <Kingdutch> bnoordhuis: And yes as in eventemitter.emit
11:58 <bnoordhuis> Kingdutch: yep
11:59 <Kingdutch> bnoordhuis: Well that explains why everything runs so slowly.. trying to use .emit to get stuff async
11:59 Me1000 joined
11:59 chadskidmore joined
12:00 <* Lingerance> wonders why emit doesn't default to making each call happen on the next tick
12:00 linac joined
12:00 <jerrysv> Kingdutch: there are a couple of libraries that help you out a little bit, like eventreactor -- a thin wrapper that extends eventemitter with common patterns
12:00 <Kingdutch> Hmm ok
12:00 <Kingdutch> Is there a way to profile my node.js program to see where it spends its time? I feel like I'm just blindly adding overhead in an attempt to make it async and faster =|
12:00 binaryjohn joined
12:00 <jerrysv> Kingdutch: see https://github.com/observing/eventreactor
12:00 <Kingdutch> Because if I give it more than 5 msgs at a time it'll die on me
12:01 rauchg joined
12:01 <linac> if a connection is closed, all event listener on it would be removed automaticly?
12:02 barberdt joined
12:02 Poetro joined
12:03 <linac> i am worried about memory leak.
12:05 riven joined
12:05 riven joined
12:05 voodootikigod_ joined
12:07 kenperkins joined
12:07 bodisiw joined
12:07 darkenco joined
12:07 <timoxley> linac you can always remove them yourself with obj.removeAllListeners()
12:07 callumacrae joined
12:08 <timoxley> linac and you can see how many listeners there are with obj.listeners.length
12:08 Cromulent joined
12:09 <timoxley> linac where obj is an event emitter (in your case it might be a connection object)
12:09 dilvie joined
12:10 <linac> so i have to add cleanup function listening on 'close' 'error' event for everywhere i use listener?
12:10 alvaro_o joined
12:11 <linac> it's not a perfect design.
12:11 riven` joined
12:11 <timoxley> linac I avoid a lot of problems by using emitter.once
12:11 <timoxley> removes the listener automatically after firing once
12:12 <bnoordhuis> linac: not removing your listener doesn't inherently leak
12:12 <linac> event emitter should be able to automatic remove listener on event that would never be fired .
12:13 <timoxley> linac how can it now it would never be fired.
12:13 <timoxley> know*
12:13 kgriffs left
12:13 RobWC joined
12:13 LeMike joined
12:14 <linac> for example, when connection is closed, 'data' event would never be fired.
12:14 <deedubs> linac: not true there could still be some data to be drained
12:14 tom__ joined
12:15 lperrin joined
12:15 mattly joined
12:15 <CIA-101> libuv: 03Bert Belder 07stat-regress * rcf8038e 10/ (src/win/fs.c test/test-fs.c test/test-list.h): Windows: fix stat("c:\\") regression - http://git.io/Dv_JVA
12:15 kmiyashiro joined
12:15 ajpiano joined
12:15 <linac> connection know whether there have data to drained. if no, listener could be removed safetly.
12:16 <timoxley> linac are you experiencing a leak/
12:16 <timoxley> linac it's quite possible that node is cleaning stuff up for you. Do a test.
12:16 <bnoordhuis> timoxley: he left :/
12:17 <timoxley> ah well.
12:17 riven joined
12:18 linac joined
12:18 broofa joined
12:19 <linac> timoxley, no now. but i think dangling listener would be a source to leak.
12:19 tornad joined
12:19 <bnoordhuis> linac: no
12:20 <bnoordhuis> i think you need to read up on how garbage collectors work...
12:20 nodebiscut joined
12:20 sreeix joined
12:20 slaskis_ joined
12:20 <bnoordhuis> it's possible to leak but it takes more than a unused event listener
12:20 pizthewiz joined
12:22 dgathright joined
12:22 sotosof left
12:23 Hanspolo joined
12:24 orlandovftw joined
12:25 <linac> bnoordhuis, so closed connection and dangling listener are cicle-referenced, and garbage collector would work on them?
12:25 maletor joined
12:26 <bnoordhuis> linac: v8's garbage collector is smart enough to deal with circular references
12:26 qsobad joined
12:26 dob_ joined
12:30 kmiyashiro_ joined
12:31 igl1 joined
12:32 isaacs joined
12:34 markdaws joined
12:34 davehamptonusa joined
12:35 langworthy joined
12:36 davehamptonusa left
12:36 githogori joined
12:36 hipsters_ joined
12:38 tom__ joined
12:40 mAritz joined
12:41 munichlinux joined
12:42 blakehaggerty joined
12:42 dshaw_ joined
12:42 MadGu1_ joined
12:43 diogogmt joined
12:43 <broofa> SubStack: Any idea why a PNG won't display on browserling's version of IE7, but displays on several virtualised IE7s I'm running elsewhere? E.g. /msg SubStack Any chance you might know why browserling.com
12:43 N0va` joined
12:43 <broofa> (they have the exact same useragent, btw.)
12:44 <broofa> e.g. http://koivi.com/ie-png-transparency/test.png
12:45 davetayls joined
12:45 <Phoenixz> Just to be sure, does node.js (or better, javascript) work with referenced objects? so if I have user={'name' : 'foo'}; a={'user' : user}; b={'user' : user}; a.user.name='bar'; console.log(b.user.name); I will get as a result "bar" ?
12:48 aheckmann joined
12:50 riven` joined
12:50 kmiyashiro_ joined
12:51 jtrudeau joined
12:51 tjholowaychuk joined
12:51 retornam joined
12:52 shanebo joined
12:52 mAritz joined
12:53 ph^ joined
12:55 adrianF joined
12:55 jocafa joined
12:55 rwaldron joined
12:55 davetayls joined
12:56 nibblebot joined
12:56 _dc joined
12:56 slaskis joined
12:57 xbayrockx joined
12:57 ohtogo joined
12:59 mAritz joined
13:00 <augustl> are there any alternatives to jsdom that also works on windows?
13:00 tommyvyo joined
13:00 SleepingPrgmr joined
13:01 gregpascale joined
13:02 fr0stbyte joined
13:02 <strager> augustl: The browser.
13:02 sreeix joined
13:02 TheJH joined
13:03 liar joined
13:03 <stagas> augustl: htmlparser
13:04 <augustl> strager: you don't say :)
13:04 waxjar joined
13:04 stelleg joined
13:04 <stagas> augustl: and soupselect for a css selector
13:04 <augustl> stagas: tnx
13:04 <waxjar> is there an equivalent of Ruby's Bundler for node.js that deals exclusively with dependencies (opposed to the package.json)?
13:05 <gsmcwhirter> waxjar: why not use the package.json and npm?
13:05 <waxjar> i don't really need to keep track of a name and version and all that extra jazz
13:06 <gsmcwhirter> well, the version string is pretty loose...
13:06 cognominal joined
13:06 <gsmcwhirter> could probably do ">= 0.0" or something
13:06 mAritz joined
13:06 <isaacs> waxjar: so just name it whatever.
13:06 neilk_ joined
13:06 <isaacs> and give the version 1.1.1 or something
13:07 <augustl> one of the great benefits of Bundler is package.json. I hope something like that comes to npm soon
13:07 patcito joined
13:07 <augustl> it locks versions not just for your direct dependencies but for the full tree
13:07 <isaacs> augustl: just check them into git
13:07 <augustl> isaacs: never :P
13:07 <isaacs> that'll lock down not just the dependencies, but every line.
13:07 <isaacs> augustl: i don't get that.
13:07 <isaacs> why not?
13:07 riven joined
13:07 riven joined
13:07 sreeix_ joined
13:08 <augustl> isaacs: makes the repo huge after some time
13:08 <isaacs> augustl: it makes the repo huge? really?
13:08 <isaacs> what are you depending on, cloud9?
13:08 <waxjar> i don't mean the version of my dependencies, but of my own project, if that makes sense
13:08 <waxjar> *versions
13:08 <isaacs> waxjar: yeah, just throw anything in there.
13:08 <isaacs> waxjar: if you're not publishign it, it doesn't matter.
13:09 <isaacs> waxjar: ther's an outstanding feature request to make name/version optional for non-published packages, but.. meh.
13:09 <waxjar> i guess, it'll do. it isn't pretty, though :p
13:09 <isaacs> it adds some complexity in a bunch of places, for really very little gain.
13:09 <augustl> isaacs: it also makes git do the job of the package manager
13:09 <isaacs> waxjar: you may come to find that having a version is kind of nice :)
13:09 <isaacs> augustl: no, it makes git do the job of the content tracker and lock-down-er
13:09 <isaacs> augustl: which is git's job.
13:09 <isaacs> augustl: i'm not suggesting you use git to find and manage deps.
13:10 gr-eg joined
13:10 <augustl> isaacs: I also think it only makes sense for that very repo. Say I put all the dependencies in my git repo, that doesn't help when people use npm to install my project as a dependency.
13:10 <isaacs> augustl: don't do that for things that get installed as a dependency.
13:10 <augustl> should my package embed all the packages it is using?
13:10 <isaacs> do that for deployable apps.
13:10 <isaacs> a website that you're pushing to a server, or a standalone application that does some stuff.
13:11 <augustl> isaacs: ah, right, I'm talking about things that gets installed as a dependency
13:11 <isaacs> augustl: yeah, you shouldn't lock down the deps of those things, either.
13:11 <isaacs> doing so only reduces the number of places where it can be used.
13:11 <isaacs> and reduces the feedback and usage that your lib will get.
13:11 <augustl> true, the Gemfile.lock only makes sense for things-you-deploy too
13:11 <isaacs> right
13:11 colinclark joined
13:11 <isaacs> and gemfile.lock is a pretty sad substitute for just checking those things into git.
13:12 <aslant> Nested in the json body of an http request posted from the browser to a Node server, as well as other stuff, there's an empty array. The key-value pair competely disappears by the time I'm processing it. I'm using Express for the Web server and jquery on the client. Any ideas where the problem might be?
13:12 <augustl> isaacs: I think Gemfile.lock is the right thing to do
13:12 <waxjar> it's a great substitute for fast deployment
13:12 <isaacs> augustl: why?
13:12 <isaacs> waxjar: how is it "fast deployment" to have to talk to another web server to deploy?
13:12 <augustl> isaacs: the package manager manages packages, I shouldn't have to remember to check it into git
13:12 <isaacs> augustl: if you want them locked down, you do.
13:12 <isaacs> augustl: it's not hard.
13:12 <isaacs> npm install blah; git add node_modules; git ci -m "update blah"
13:12 <isaacs> create a bash shortcut for it.
13:13 <isaacs> :)
13:13 <augustl> isaacs: right, but it's still the package managers concern to make sure I have the correct versions of packages
13:13 <augustl> and the git repos job to keep track of my code
13:13 <isaacs> augustl: sure, and it will.
13:13 <augustl> it's a matter of opinion though
13:13 bodisiw joined
13:13 <isaacs> no, it's actually provable in this case.
13:13 sh1mmer joined
13:13 <augustl> should the git repo track your code only, or the dependencies too
13:13 <isaacs> there are metrics we can measure, and have been measuring.
13:13 mxbtty joined
13:13 <isaacs> the dependencies are a part of "your program" if you're deploying them.
13:13 Qbix1 joined
13:13 <isaacs> that's why node bundles v8
13:13 <isaacs> same reason.
13:14 <isaacs> it's a standalone application.
13:14 <waxjar> well, the servers at heroku fetch the gems from ruby gems/or cache a lot faster than my connection can upload them
13:14 <isaacs> waxjar: don't you use git to push stuff to heroku?
13:14 kitt joined
13:14 <waxjar> i do
13:14 jbpros joined
13:14 <augustl> isaacs: I think it makes sense that node embeds v8 in the tarball you download. In the git repo a submodule should be used.
13:14 <isaacs> waxjar: don't they already have most of the diffs?
13:14 <isaacs> waxjar: your argument that heroku can fetch them faster than you upload them is thus invalid.
13:14 <isaacs> waxjar: you're not uploading most of them most of the time.
13:14 <isaacs> you're only uploading the changes.
13:14 nibblebo_ joined
13:14 perezd joined
13:14 <isaacs> augustl: submodules are unnecessarily painful.
13:15 mAritz joined
13:15 <waxjar> meh, i guess it's not such a big deal
13:15 <isaacs> Gemfile.lock is a half-way solution to an invented problem.
13:15 <isaacs> that's not a package manager's job.
13:15 <augustl> isaacs: how is it half-way, and invented?
13:16 TooTallNate joined
13:16 <isaacs> augustl: it's half-way because you don't get nearly the same level of guarantee that things are actually "locked"
13:16 <isaacs> augustl: with git you get a cryptographically secure sha.
13:16 <isaacs> if one byte is off, you know exactly which byte, and how off.
13:16 <augustl> isaacs: in case people republish version 1.3.2 you mean?
13:16 <isaacs> augustl: or in case the gem server goes down.
13:16 <isaacs> or is compromised.
13:16 sechrist joined
13:16 ritch- joined
13:17 <isaacs> it's an invented problem because really, what works much better, is to just check all your deps into git, and then deploy one single thing that has the entire app.
13:17 <isaacs> Gemfile.lock can never give you the same level of reliability or reproducibility
13:17 <isaacs> thats why there's no `npm lock` command.
13:17 <jesusabdullah> bundledDeps *are* pretty rad ^^
13:17 <isaacs> becuase it's dumb.
13:17 <augustl> it's interesting.. As long as you keep all 3rd party code in vendor/ in your project you can easily ignore that in git logs etc to only see changes to "your own" code
13:18 <isaacs> augustl: yeah.
13:18 <augustl> what about when you depend on a npm package that needs to be compiled?
13:18 <isaacs> augustl: and, you end up with the same number of commits that you'd have with submodules.
13:18 <CoverSlide> hey folks, anyone try to fire off a bunch of http.request 's at once and get getaddrinfo ENOENT errors?
13:18 Morkel joined
13:18 <isaacs> augustl: run `npm rebuild` on deployment.
13:18 <isaacs> augustl: rebuild is a non-network command. it doesn't touch any remote resources. it just walks your dep tree runnig any install commands necessary.
13:18 norviller joined
13:19 <aslant> re: my question above. It's nothing to do with node or express, it either the browser or jquery
13:19 r04r joined
13:19 r04r joined
13:19 JaKWaC joined
13:20 <augustl> the repo size still concerns me though. Same number of commits as a submodule, but it's N bytes for the commit instead of just one sha changing
13:20 <augustl> the node repo is now 44.3 mb, how much of that is changed dependencies?
13:20 <augustl> and will that be a problem in 3 years from now when it's 1.5gb large?
13:21 <augustl> just can't shake the feeling that embedding dependencies in the git repo doesn't scale
13:21 <isaacs> augustl: repo sizes are going up slower than disk size relevance is going down.
13:21 <isaacs> it's 44.3 mb? *no* node program is anywhere near that size.
13:21 FnuGk joined
13:21 <isaacs> that's including all of v8 and libuv and cares and openssl
13:22 <isaacs> oh, not cares any more
13:22 <augustl> I'm talking more in a general sense, not just node projects
13:22 <isaacs> http_parser, npm, v8, uv, and zlib
13:22 <CoverSlide> node executable is about 6mb last i checked, which is kind of big for a single executable; perl, python, ruby are around 500k iirc
13:22 lohkey joined
13:22 pizthewiz joined
13:22 <augustl> CoverSlide: it embeds a lot of stuff :)
13:22 riven joined
13:22 riven joined
13:23 <augustl> CoverSlide: all of ruby is a lot more than 500k
13:23 themiddleman_itv joined
13:23 slloyd joined
13:23 <CoverSlide> true, if you include the standard library
13:23 <isaacs> building as a standlone bin has a lot of advantages.
13:23 Robdor joined
13:23 <augustl> isaacs: it has a lib/ folder too no?
13:23 <isaacs> augustl: the lib js files get compiled in
13:23 <isaacs> as c strings
13:24 <augustl> ah that's how it's done
13:24 Rockinoutt93 joined
13:24 addisonj joined
13:24 <isaacs> yeah
13:24 <isaacs> so you can drop the node bin anywher.
13:24 <isaacs> it used to use a lib folder.
13:24 <CoverSlide> great we have to worry about the null byte too. where does the bloat end?
13:24 <isaacs> waaaayyyy back
13:24 <* isaacs> and augustl are showing our age...
13:24 <augustl> we'd probably want to do that for busterjs.org at some time. I.e. create something like node, an executable that inlines all of the buster code and is super easy to install
13:24 DeezGz joined
13:24 <isaacs> augustl: yeah, i'd sooo love to do that.
13:24 <isaacs> augustl: that'd be so nice for cli apps
13:25 <isaacs> just download the thing, and it runs. don't even have to know that node is a part of it
13:25 <augustl> indeed, almost don't need an installer, just download a file and put it in path :)
13:25 <augustl> yup
13:25 <tjfontaine> so evil
13:25 <DeezGz> MongoDB
13:25 <AvianFlu> we've had a similar dream of jitsu.exe for windows peeps
13:25 <isaacs> like a `nodecc` that bundles your program all into an exe and unix bin
13:25 <augustl> tjfontaine: well some people _really_ like convenience :)
13:25 <augustl> isaacs: gimme! :D
13:25 <isaacs> augustl: it's in the plans. there are other things to do first.
13:25 hipertracker joined
13:26 <CoverSlide> didn't ryah want a "node install" command
13:26 <augustl> isaacs: about the git repos and dependencies, I think I view dependencies and generated files as the same thing. As in, you wouldn't commit the output of "make" into the git repo.
13:26 <tjfontaine> I wish we could fork all these windowisms into a separate project
13:26 <augustl> but it's as you say different, dependencies are actually part of your program, not "generated files"
13:26 jiboumans joined
13:27 <tjgillies> Array(16).join("wat" -1) + " Batman!"
13:27 <CoverSlide> yes we all saw the wat video
13:27 <isaacs> augustl: that does kind of make sense if, for example, you have a .node file that one of the deps builds.
13:27 <CoverSlide> javascriptisms that people have known about for ages
13:27 <isaacs> augustl: you should probably put that in a gitignore or something.
13:27 <CoverSlide> that noone ever uses in real life
13:27 RushPL joined
13:27 Darrow joined
13:28 patcito joined
13:28 legind joined
13:28 mikeal joined
13:28 callen joined
13:28 <tjgillies> CoverSlide: that fact, is the only thing that makes my statement funny
13:28 nw` joined
13:28 bengl joined
13:28 chrisdico joined
13:28 augustl joined
13:28 pkrumins joined
13:28 halfhalo joined
13:28 matti joined
13:28 pkrumins joined
13:28 matti joined
13:28 __doc__ joined
13:28 mashed joined
13:28 strager joined
13:28 CrypticSwarm joined
13:28 Diablo-D3 joined
13:28 _bat joined
13:28 JuanCri joined
13:28 graft joined
13:28 rauchg joined
13:28 takeout joined
13:28 davehamptonusa joined
13:28 rachet joined
13:28 tvw joined
13:28 mongrelion joined
13:28 stelleg joined
13:28 QiBala joined
13:28 monk12 joined
13:28 igl joined
13:28 theBrettman joined
13:28 cainus joined
13:28 elijah-mbp joined
13:28 sqlserverio joined
13:28 aaronmcadam joined
13:28 innociv joined
13:28 RLa joined
13:28 linac joined
13:28 <augustl> woha, reboot time?
13:28 eb4890 joined
13:28 trose joined
13:28 tauren joined
13:28 gsmcwhirter joined
13:28 wankdanker joined
13:28 bodisiw joined
13:28 russfrank joined
13:28 SkyRocknRoll joined
13:28 plutoniix joined
13:28 ljackson joined
13:28 stayarrr joined
13:28 jlank joined
13:28 _unary joined
13:28 Yoms joined
13:28 garrensmith joined
13:28 Cromulent joined
13:28 timoxley joined
13:28 AaronMT joined
13:28 _dc joined
13:28 slajax joined
13:28 robo joined
13:28 __doc__ joined
13:28 Slashbunny joined
13:28 <CoverSlide> yay netsplits!
13:28 gsmcwhirter joined
13:28 darkixion joined
13:28 <Guest81666> hey, I'm a gues now
13:28 xSmurf joined
13:28 <Guest81666> this wasn't a netsplit I think..
13:28 EvRide joined
13:28 chunhao_ joined
13:28 <isaacs> Guest81666: yeah, it was
13:28 pusewicz_ joined
13:29 PeterPan- joined
13:29 dthompso99 joined
13:29 xaq joined
13:29 <isaacs> Guest81666: just /nick back to what you were
13:29 nerdfiles1 joined
13:29 shykes joined
13:29 <augustl> way ahead of ya :P
13:29 <isaacs> Guest18468: 10:27 chrisdickinson has left IRC (*.net *.split)
13:29 RichardBronosky joined
13:29 <chrisdickinson> aww.
13:29 <* chrisdickinson> is flattered to be used as an example.
13:29 DeezGz left
13:30 <augustl> I wonder why the peeps are laughing so much in that video. It's not _that_ funny...
13:30 martinkr left
13:30 <isaacs> augustl: batman jokes
13:30 halcyon918 joined
13:30 <augustl> they must have had a professional audience warm up guy, like they have for talk show audiences
13:30 <CoverSlide> probably just a laugh track
13:30 Rockinoutt93 left
13:30 Rockinoutt93 joined
13:30 Rockinoutt93 left
13:30 davehamptonusa left
13:31 matti joined
13:31 matti joined
13:31 storrgie joined
13:31 wssr joined
13:31 DeezGz joined
13:31 <DeezGz> hello guys
13:32 ohtogo joined
13:32 <CoverSlide> hello males
13:32 CIA-99 joined
13:32 keeto joined
13:32 franciscallo joined
13:33 ajpiano joined
13:33 <yenz> <laugh track>
13:33 <yenz> :D
13:34 tmm1 joined
13:35 <augustl> so that's what a netsplit looks like when you're being split. I always thought it was my router that failed every time I got back into irrsi as Guest123123
13:35 <augustl> or something else connection related on my end
13:35 kmiyashiro joined
13:35 EuroNerd joined
13:35 jsurfer joined
13:35 wavded joined
13:36 strax joined
13:36 Venom_X joined
13:37 hyce joined
13:37 bruceb_ joined
13:37 Bodil joined
13:38 <bruceb_> Greetings
13:39 PyroPeter joined
13:40 idefine joined
13:40 fairwinds joined
13:40 r1ngzer0 joined
13:40 insin joined
13:40 dnyy joined
13:41 TheJH joined
13:42 Destos joined
13:42 saikat joined
13:42 tkaemming joined
13:44 matti left
13:45 krake joined
13:45 CrawfordComeaux joined
13:46 StanlySoManly joined
13:46 hipsters_ joined
13:46 sarlalian joined
13:46 sarlalian left
13:47 hz joined
13:47 samsonjs joined
13:47 DeezGz joined
13:47 mAritz joined
13:47 megalomix joined
13:48 <megalomix> hello everybody
13:48 <isaacs> hi
13:48 diogogmt joined
13:48 <DeezGz> hello guy
13:48 samsonjs joined
13:49 petersendidit joined
13:49 sdwrage joined
13:49 jmar777 joined
13:50 CrawfordComeaux joined
13:51 dscape joined
13:51 <CrawfordComeaux> Anyone able to suggest a module for signing OAuth'd API calls?
13:52 barberdt joined
13:52 odyniec_ joined
13:53 <chapel> CrawfordComeaux: node-oauth
13:53 riven` joined
13:53 <megalomix> hello
13:54 <megalomix> guys, I do not know WHERE...e WHEN
13:54 <megalomix> but node has a problem i think
13:54 <megalomix> i lunched an app
13:54 brngardner joined
13:54 <megalomix> yesterday and today
13:54 <stride> stop eating your apps, problem fixed
13:54 <megalomix> and after around 10 hours
13:54 <stride> :)
13:54 <megalomix> the apps becomes idle
13:54 redir joined
13:55 Poetro left
13:55 <megalomix> i see the process, but it seems idle
13:55 <megalomix> i also tried to see it with node-inspector
13:55 <megalomix> but nothing, no breakpoints are called
13:56 erichynds joined
13:56 <megalomix> i do not know the problem.....the app works very good (And do the same thing)
13:56 <megalomix> then after X hours....it becomes idle
13:57 isufy joined
13:57 <megalomix> i also put breakpoints in node.js file
13:57 <megalomix> but nothing happen
13:58 <bruceb_> Can anyone point me in the direction of an apache benchmark-like app written in node? I don't care whether it uses the built-in http module, higher level http-based modules, or the basic net module only. I need to find out the best way to creat concurrent http connections. :)
13:59 nerdfiles1 left
13:59 <markq> anyone know what express-mongoose is supposed to hep me with?
13:59 <DeezGz> i was trying to figure out my self
13:59 <markq> I'm not very familiar with promises but it almost seems like a pseudo transaction type thing
13:59 <CoverSlide> i think it's a session store based on mongo
14:00 <markq> isn't that mongostore though?
14:00 <DeezGz> is their a way to compile the MongoDB driver directly in the node.exe
14:00 <CoverSlide> i dont know, i know there's a redis store, i'm assuming they made a mongo store
14:00 <markq> DeezGz: part of node-core?
14:00 zitchdog joined
14:00 <DeezGz> compile it with the node.exe
14:01 <markq> ah
14:01 staar2 joined
14:01 <markq> i don't know
14:01 <DeezGz> so i dont have to carry it around
14:01 <CoverSlide> maybe stick it into the lib/ directory
14:01 <megalomix> isaacs, do you have any idea? or can you advice me a check that i can do? as i told, the apps works good, and does the same things again and again...but after many hours becomes idle
14:02 halfhalo joined
14:02 ajpiano joined
14:02 _dc joined
14:02 <isaacs> DeezGz: you'd have to fork node and add it as a module to the src/ dir. we're not ever going to take such a patch into core, though, so you'd be on your own.
14:03 <isaacs> DeezGz: your best bet is to just not do this.
14:03 <tjfontaine> out in the wilderness, left to die alone
14:03 <DeezGz> well i just want to add the .js to the node.exe
14:03 <isaacs> DeezGz: yeah. deploy the js and exe together.
14:03 zeile joined
14:03 <jesusabdullah> So, I was poking around Alameda on google maps and I found what looks like an exploded airliner
14:03 <isaacs> DeezGz: use what node already does.
14:03 <jesusabdullah> http://maps.google.com/maps?ll=37.790757,-122.322856&spn=0.001027,0.001632&t=h&z=20
14:03 <DeezGz> i already made a mime.js and compiled it with node js
14:03 <DeezGz> is possible
14:03 <isaacs> DeezGz: so, do the same thing with mongo, then
14:04 <isaacs> DeezGz: but you have to compile it in your own fork.
14:04 <isaacs> the mongo driver is quite a bit bigger, and probably not written with this approach in mind.
14:04 <tjfontaine> all this "compile" talk, makes me think something is being lost in translation
14:04 <DeezGz> yea that is the problem i am having
14:05 <markq> jesusabdullah: O_O
14:05 <DeezGz> its way to big and not very clear and clean
14:05 <augustl> node should embed mongo and browsers should embed jquery :D
14:05 mc_greeny joined
14:05 <DeezGz> i dont even know where to start to get it going
14:05 <DeezGz> its a database driver for god sake, node is open source right?
14:05 <markq> I'm waiting for the day in which I can just tell a robot to program everything from scratch
14:06 <tjfontaine> DeezGz: and as isaacs said, you're free to fork it
14:06 <augustl> markq: isn't that kind of what programming is like today? :)
14:06 zitchdog joined
14:06 <DeezGz> well if we start a structure to make this possible, we wont have a problem like this
14:06 <markq> fork it and then spoon in mongo
14:06 <markq> don't use a knife though
14:06 <DeezGz> only root lib forder for your modules
14:06 <tjfontaine> DeezGz: "we" don't have any problem, "you" have a wish
14:06 trotter joined
14:07 <DeezGz> think about it, when you want to compile like a comman database driver it would be possible
14:07 <markq> DeezGz; it just isn't going to happen. ever. totally against node-core philosophy
14:07 <DeezGz> well it has aleady happen. i already dont it with my mime.js
14:07 <DeezGz> next is mongodb driver
14:08 colinclark joined
14:08 <DeezGz> then sql driver
14:08 <DeezGz> the mysql drive
14:08 <tjfontaine> ...
14:08 <DeezGz> -r
14:08 <bruceb_> I've been testing a node crawler designed to politely crawl as many sites concurrently as possible, but it seems like the sockets just queue and connect serially? I'm running the latest node.js v0.6.8 (I built it yesterday).
14:08 <isaacs> DeezGz: these things do not belong in node-core.
14:08 <tjfontaine> Profit
14:08 <isaacs> DeezGz: do them as addons.
14:08 <isaacs> DeezGz: you're trying to scale a very high wall when there's a door already there for you.
14:08 <isaacs> the pain of "having to carry the js around with you" is WAAAYYYY less than what you're trying to do.
14:09 <bruceb_> It takes upward of 16 seconds to get 300 sockets connected at all (I log connections whether they're currently active or not, all of my statistics are sanely gathered)
14:09 CrawfordComeaux joined
14:09 <bruceb_> I've tested with the net module handling HTTP requets myself, with the built-in http module, and with two third-party higher level http modules (I tried those first)
14:09 <DeezGz> easy to say when sitting on file system, but when you have to make these things move around in a portable way, it becomes a nightmare
14:10 <Phoenixz> Can I do two times modules.exports = variableName; ?
14:10 <jesusabdullah> markq: I think it's a firefighter training facility
14:10 <tjfontaine> DeezGz: have you not met configuration management/souce control?
14:10 level09 joined
14:10 <tjfontaine> DeezGz: you're talking about a deployment problem
14:11 <DeezGz> you see how the node.js source has done, very clean, that is the way to do source
14:11 <DeezGz> no module structure problem
14:11 <DeezGz> and debuging clearity problem
14:11 <chjj> mime.js in node core? i hope that never happens
14:12 <DeezGz> sorry guys Notepad++. keep it simple
14:12 <chjj> there is no specification which maps file extensions to mime types
14:12 <chjj> could be anything
14:12 sechrist joined
14:12 <DeezGz> i put it in my own compiled node.exe
14:12 <DeezGz> i compile my own node.js
14:12 <augustl> DeezGz: hmm, I'm curious, why did you do that?
14:13 <augustl> most of us add it as a dependency in package.json :)
14:13 <DeezGz> i didnt want to car the mime.js file with the node.exe and my app with me every where
14:13 <augustl> or check it into the repo for the program
14:13 <DeezGz> carry sorry
14:13 langworthy_ joined
14:13 <augustl> you didn't want to carry mime.js with node.exe?
14:13 <chjj> DeezGz: im curious, why didnt you just put mime.js in your app's codebase?
14:13 <augustl> isn't that the default behaviour?
14:13 <augustl> as in, node.exe doesn't bundle mime.js
14:14 matti joined
14:14 soapyillusions joined
14:14 thriple joined
14:14 cesconix joined
14:14 <DeezGz> for codebase setups, yes, this is straight up notepad++ and my web app in a node.exe
14:14 <DeezGz> thats what i wanted
14:14 tom__ joined
14:14 <augustl> I don't follow you at all. What's mime.js got to do with nodepad++
14:14 <augustl> ?
14:15 <DeezGz> i also wanted a mongodb driver in ther too. that mongo thing is all over the place
14:15 <DeezGz> meaning i code this my self and edit the config stuff my self manually
14:15 <DeezGz> no automation
14:15 crodas joined
14:15 <DeezGz> i dont mind
14:15 <bruceb_> Does anyone know about a nodejs crawler project that can handle lots of different jobs in parallel?
14:15 <augustl> I still don't understand what you're talking about. "straight up notepad++ and my web app in a node.exe" makes no sense to me..
14:16 <DeezGz> but that module structe i see some of these projects using does not make any sense
14:16 <chjj> augustl: isnt it obvious? he compiled notepad++ and linked it with node
14:16 <chjj> :)
14:16 <DeezGz> notepadd++ is a text editor on windows
14:16 <DeezGz> no no no
14:16 <augustl> right, with you so far :)
14:16 <chjj> hehe
14:16 <DeezGz> it is what i use to edit these files
14:16 rick_ joined
14:17 <augustl> so what do you do with notepad++ that makes you want to compile mime.js into a custm node.exe?
14:17 <augustl> or is it related to notepad++ at all?
14:17 <DeezGz> no script or codebase managment software
14:18 <augustl> DeezGz: can you describe your exact problem in one sentence?
14:18 <DeezGz> well i want to gointo the mongoDB driver and make it into a coule or posible 1 js, then compile into the node.exe
14:18 ajpiano joined
14:18 <DeezGz> couple sorry
14:18 <augustl> right, but what problem do you solve when you compile mongo into node.exe?
14:18 mraleph joined
14:19 <bruceb_> he solves the problem of "having to cart those files around along with node" as he mentioned above.
14:19 <DeezGz> thx yes
14:19 <bruceb_> unless I misunderstood him earlier
14:19 <DeezGz> i have alot of work to do
14:19 <augustl> so you carry node.exe around with you? Do you reinstall windows often or change computers often or something?
14:19 mozava joined
14:19 <DeezGz> yes i am a vmware exsi guy
14:19 <augustl> and you want a node.exe on a usb stick you can carry around, that embeds some projects you use often?
14:19 <DeezGz> so yes
14:20 <DeezGz> i have 5 systems running right now
14:20 <augustl> what's the downside of depending on mongo in package.json and linking it in with npm?
14:20 <DeezGz> yes or will use often
14:20 boltR joined
14:21 <DeezGz> carry all the file directorys and writing script to handdle many files and sub directorys
14:21 <augustl> you don't have to write a script to handle dependencies - npm does that
14:21 <DeezGz> vs handling 1 file
14:21 <augustl> just type "npm link" in the project one time and you're done
14:22 <DeezGz> what does this npm do?
14:22 <bruceb_> node package manager :P
14:22 mikeal joined
14:22 <DeezGz> supposed to be like a apt-get on ubuntu huh!
14:22 <bruceb_> think apt or yum, but for node dependencies and much less bulky
14:22 <augustl> DeezGz: yes, it's like apt-get
14:22 <augustl> npm is a package manager too
14:23 <DeezGz> but it cant gather these modules to compile in your node.js src? right
14:23 <DeezGz> i think that is a missing feather
14:23 <augustl> no, but it solves the problem of managing the software
14:23 methodT joined
14:23 <augustl> just type npm link and you have all the dependencies installed
14:24 reid joined
14:24 jamescarr joined
14:24 <jamescarr> ls
14:24 <DeezGz> npm dows work nice with getting the package but that it
14:24 <jamescarr> shit
14:24 <bruceb_> DeezGz: try it, spin up a new vm and install node, then copy your project requiring mongo etc. onto the machine. Then type node link
14:24 <augustl> DeezGz: no, it also installs it, in addition to downloading it
14:24 <augustl> DeezGz: it puts the packages in a place so that require("thepackage") works
14:24 <DeezGz> id it already that how i got mongodb on my system
14:25 <DeezGz> i want to consolidate this mongoDB into one js file
14:25 <isaacs> DeezGz: we were discussing earlier this problem.
14:25 <augustl> why do you want to consolidate mongodb into one file?
14:25 <DeezGz> can npm help me with that?
14:25 <isaacs> DeezGz: it'd be nice to be able to compile a node program into a single standalone executable binary
14:25 dwhittle joined
14:25 <augustl> DeezGz: you don't seem to get what I'm saying
14:25 <isaacs> DeezGz: but that functionality does not exist today.
14:25 <isaacs> DeezGz: what you really are asking for is a nodecc program, similar to javacc
14:26 infynyxx joined
14:26 <isaacs> DeezGz: that is not a priority yet.
14:26 <augustl> DeezGz: if you use package.json you don't need to build it into node.exe
14:26 <DeezGz> i do, but u dont seem to under stand 1 file, u like package managers
14:26 <augustl> perhaps I don't understand your problem
14:26 <isaacs> augustl: he wants nodecc
14:26 <jamescarr> isaacs, didn't I hear that the new V8 release supports vm snapshots?
14:26 <augustl> you don't want node.exe with mongodb, you want your node project and all its dependencies as one .exe file?
14:26 salva left
14:26 <DeezGz> people we have a lot to learn here
14:26 <isaacs> augustl: bingo.
14:27 <jamescarr> isaacs, yep: With the V8 snapshot feature (activated with build option snapshot=yes, which is the default) the time spent creating the first context will be highly optimized as a snapshot includes a serialized heap which contains already compiled code for the built-in JavaScript code. Along with garbage collection, V8's extensive caching is also key to V8's performance, for more information see V8 Design Elements.
14:27 <DeezGz> yes thnks augustl
14:27 <isaacs> DeezGz: would it be ok for your program to be all in one place, even if it wasn't called "node.exe"?
14:27 <isaacs> that doesn't exist yet.
14:27 <augustl> DeezGz: I think the problem here is that when I asked you to explain what your problem was, you didn't do a very good job of doing so ;)
14:27 <DeezGz> well it has to be called node.exe
14:27 <augustl> or that I'm brainfarting, who knows..
14:28 <isaacs> DeezGz: why?
14:28 <bruceb_> august1: I can explain my problem pretty clearly, and you seem pretty familiar with node. Do you have a moment?
14:28 <DeezGz> brb guys
14:28 mehlah joined
14:28 <augustl> bruceb_: I'll go find august1 and see what he says
14:28 <* isaacs> beginning to think that DeezGz's problem is overly constrained
14:28 <jamescarr> isaacs, yeah :)
14:28 <tjfontaine> itym DeezGz's WishList
14:28 <bruceb_> l1 :)
14:29 <augustl> bruceb_: get a better font!
14:29 hasenj joined
14:29 <bruceb_> I'm attempting to write an http crawler in node, both because I like node and because I think it would be pretty fast. I realize that node was primilary designed for server-side javascript execution but this seems like a lot less code in node than in java using nio
14:30 <augustl> isaacs: I liked the old blue/purple links in the docs better than the green/gray ones :P
14:30 <augustl> isaacs: on my screen it looks like two different colors, not like a slightly faded version of the green color, just fyi
14:30 <bruceb_> My tests however have revealed slow socket connections being made.. It's not my ulimit as I never even reach 1k. It takes upward of 16 secs to establish connections on 300 sockets and I'm not sure why. Mind you each socket is connecting to a different domain, so I'm being polite about it.
14:31 <bruceb_> I suspect my code first, obviously, as I suspect a bug in the language last. I'm 99% it's my code but I don't know why this is happening
14:31 <tjfontaine> bruceb_: is the code available for inspection?
14:32 <augustl> perhaps DNS lookup is what's slow
14:32 <bruceb_> it can be :)
14:32 <bruceb_> I have three tests actualy, one using the net module only
14:32 <tjfontaine> bruceb_: you will get more useful information if you can provide the most context
14:32 <augustl> seems like every dns lookup when connecting does require('dns')
14:32 <augustl> perhaps that's what's slowing it down
14:32 <bruceb_> one using http module, and one using a third-party module that's higher level but I've sort of ditched that.
14:32 <augustl> but I suppose the require of an internal module is fast, since it doesn't have to go to the file system
14:32 <bruceb_> I'll give as much context as you like. What is unclear?
14:33 <augustl> ah, the http module has agents that pools etc
14:33 <bruceb_> yeah I have used htis
14:33 <augustl> g2g
14:33 <bruceb_> I changed maxSockets and such. I'm using the new agent correctly as far as I can tell (the docs are oudated on this afaik)
14:34 <DeezGz> node.gyp
14:34 <tjfontaine> bruceb_: the most context is to be able to see the code in question, then those who are equipped can provide useful hints
14:34 riven joined
14:34 riven joined
14:34 <bruceb_> Where can I post the code for inspection? What's the most convenient for you?
14:34 fomatin joined
14:34 <tjfontaine> gist.github.com
14:35 <bruceb_> omw
14:35 defied joined
14:37 tom__ joined
14:37 <bruceb_> alright, here's the http test: git://gist.github.com/1690517.git
14:37 <bruceb_> this is just me trying to get lots of parallel connections happening. At this point I'm just counting time to see how long it takes to establish connections etc.
14:37 illourr joined
14:38 vl4kn0 joined
14:38 <bruceb_> mind you targets.txt is a text file containing actual URLs, mostly to index pages of sites. I've got just over 900 urls in there and they are mostly working :)
14:38 <bruceb_> Ah to be more clear, most of the URls are valid and actually return a payload of html when a get request is issued, I think a few are down/offline at any moment though.
14:39 themiddleman_itv joined
14:39 blup joined
14:40 whitman joined
14:40 jj0hns0n joined
14:41 <bruceb_> I realize that I'm probably doing something terribly wrong here, but I don't know what it is :) The test runs fine but it just seems slow making connections.
14:41 aslant joined
14:41 <bruceb_> am I just blocking as a result of reading data from so many remote hosts and that's what's happening here?
14:41 vguerra joined
14:41 Edy joined
14:41 Edy joined
14:42 ivic joined
14:42 <DeezGz> maybe your connection pool limit is too low
14:44 <bruceb_> I've ready more than a couple forum posts on this, it seems there was a bug in an earlier version of node that caused a problem with socket queueing
14:44 <bruceb_> *read
14:44 themiddleman_itv joined
14:44 <bruceb_> tjfontaine: One of my targets.txt lists is just a csv dump of the top 1000 alexa-ranked sites
14:45 <bruceb_> converted to txt of course
14:45 jomoho joined
14:47 <dob_> do you know where i can find the eclipse plugin for node development? I had this plugin and thought it was great.
14:47 <dob_> I loved the node start and stop button...
14:49 Hanspolo joined
14:49 stephank joined
14:50 kuebk joined
14:50 hz joined
14:51 hz joined
14:52 ohtogo joined
14:53 terite left
14:53 lbod joined
14:53 <bruceb_> isaacs: Are you available to field a socket pooling/concurrency question?
14:54 <lbod> hi guys, im a behind a corporate firewall at work and before i start asking them for firewall rules im right in thinking i can just download tarballs/zips from github without using npm (as long as i update nodes package.json)?
14:55 hz joined
14:55 strmpnk_ joined
14:55 <lbod> ive done it with a couple so far but im looking at template engines now and theres a few dependencies
14:55 <tjfontaine> lbod: the firewall blocks npmjs.org but allows github.com?
14:56 <lbod> yep, npm uses httpclient? we use pac files for browser access
14:57 <lbod> its more a case of non ntlm client not being granted access i.e. through browser pac files
14:57 <torvalamo> maybe npm should accept proxies then
14:57 <isaacs> lbod: yes, npm uses the request module.
14:57 <isaacs> npm does support basic auth http and https proxies.
14:58 <isaacs> but it doesn't do the CONNECT dance to tunnel https through http, so if your proxy doesn't speak https, then you have to use the http registry url.
14:58 <isaacs> which is less secure.
14:58 <tjfontaine> if he says ntlm I'm walking away
14:58 <isaacs> ntlm is insanity. probably never going to support that.
14:58 <tjfontaine> I would never expect you to
14:58 <lbod> am i right in thinking i can just download though? as long as i get the dependencies
14:58 <isaacs> it'd be easier to just write a standalone server that translates ntlm to basic auth.
14:59 <isaacs> lbod: sure. you can also just fetch tarballs and unpack them right into node_modules.
14:59 <lbod> this is just so i dont have to run through hoops asking the network guys to let me out
14:59 <isaacs> lbod: or you can tether through your cell phone :)
14:59 <isaacs> lbod: or take your laptop to starbucks.
14:59 <isaacs> probably less headaches doing it that way
14:59 <isaacs> :)
14:59 <torvalamo> or sacrifice a child
14:59 <tjfontaine> ssh -D
14:59 <torvalamo> that always works
14:59 <lbod> isaacs: excellent, cheers.. like i say ive done it with a cpl of modules so far
14:59 <torvalamo> ALWAYS
14:59 dwhittle joined
14:59 <DeezGz> openvpn home
15:00 <DeezGz> the best
15:00 <isaacs> lbod: yeah, you can also set up an SSH tunnel through a server on the outside, and use that as your registry url.
15:00 <DeezGz> ssl too
15:00 <zeile> guys, whats the common way to put css into my static node.js server. jade?
15:00 FnuGk joined
15:00 <tjholowaychuk> zeile link tags?
15:00 <tjholowaychuk> in html
15:00 <isaacs> then have it proxy its connection to registry.npmjs.org:443
15:01 <torvalamo> style attributes in your tags bro.. go hardcore
15:01 <megalomix> why my application goes idle when it runs for 12-14 hours :((
15:01 <lbod> isaacs: this is more for my own playing whilst at work, i get to play alot but corporates/financial services are a pain to work in
15:01 <isaacs> lbod: tell me about it :)
15:01 langworthy_ joined
15:01 <isaacs> lbod: every new service that wants to do anything on the network has to sacrifice goats.
15:01 <isaacs> to the gods of IT
15:01 <lbod> yep
15:01 <DeezGz> json you css so it is easy to work with javascript
15:01 <lbod> and you call favours etc
15:01 <zeile> dont wanna go hardcore :d
15:02 <bruceb_> IT is a service, and its customers are the rest of the company :)
15:02 <DeezGz> yes am a it guy
15:02 <zeile> is stylus the way to go?
15:02 <lbod> somones about to say "treating customers fairly"
15:02 <zeile> im on express btw..
15:02 sreeix joined
15:02 <bruceb_> Unfortunately they usually behave like DMV employees
15:03 <DeezGz> in it its every man for himself sorry to say
15:03 <bruceb_> "serving" the community that way
15:03 <tjholowaychuk> zeile whatever you want, regular CSS / Stylus / LESS
15:03 <tjholowaychuk> whatever works for you
15:03 <lbod> so in regards to the depenencies, it feels a bit hacked if im not using npm but can i specify > than versions in package.json?
15:04 <zeile> im not used to so much freedom :d but ill look into stylus a bit more. found the page :D
15:04 <megalomix> guys, do you know acommand the trace a process?
15:04 <bruceb_> you can't trace in node, there is no stack to speak of
15:05 Mischanix joined
15:05 <lbod> does he maybe mean node-inspector?
15:05 <timoxley> megalomix bruceb_ console.trace()
15:05 <lbod> which is what im trying to install now and why im asking about manual installs
15:06 <megalomix> i have installed node-inspector
15:06 <megalomix> but the app seems idle
15:06 <megalomix> because i added some breakpoints
15:06 <lbod> well youre way ahead of me then :D
15:06 <timoxley> megalomix tell the debugger to continue?
15:06 <megalomix> (also in node.js) BUT never be called
15:07 <megalomix> timoxley, i don't see any moves
15:07 <lbod> anyway, thanks guys, trying to move to node as my prototyping tool of choice and because i love JS
15:07 <isaacs> lbod: whatever you specify in your package.json should be what your app needs, regardless of how you get it.
15:07 lbod left
15:07 <isaacs> oh, he is gone.
15:07 <isaacs> proxy probably decided it didn't like irc :)
15:07 <timoxley> megalomix I don't know much about node-inspector, getting the thing running is a pain
15:07 <megalomix> timoxley, the process is still active
15:08 <bruceb_> lol
15:08 <timoxley> megalomix just use console.trace
15:08 <bruceb_> IT probably caught wind of what he was trying to do :)
15:08 FIQ joined
15:08 <megalomix> timoxley, where?
15:09 <megalomix> i can't stop the apps
15:09 <megalomix> do you mena from node inspector?
15:09 <megalomix> *mean
15:09 <timoxley> megalomix not from node inspector.
15:09 <timoxley> megalomix just write that line in your code
15:09 <timoxley> console.trace()
15:09 <timoxley> and when it gets to it it will print out a stack trace
15:10 h4mz1d joined
15:10 MatthewS joined
15:10 Me1000 joined
15:10 <timoxley> megalomix http://nodejs.org/docs/latest/api/all.html#console.trace
15:10 <megalomix> What code? i have to know what happen NOW...
15:10 Morkel joined
15:10 <bruceb_> Unfortunately you are probably going to have to wait another 10-12 hrs to find out :(
15:11 <megalomix> shit
15:11 <timoxley> megalomix you could also try work the node debugger. if you want to keep using node-inspector I cant' help you, I'm giving you alternatives to node-inspector.
15:11 <bruceb_> Do you have a suspected location of the bug or a particular function that seems suspicious?
15:11 jmar777 joined
15:11 <megalomix> the problem is that the software goes well for many hours
15:11 <megalomix> i can debug it at the momenet
15:11 <timoxley> then what's the issue?
15:11 <megalomix> because it works good for many hours....i can debug it for 12 hors :D
15:11 <megalomix> *hours
15:12 <megalomix> timoxley, the problem is that it seems idle
15:12 <megalomix> the job is not completed
15:12 <megalomix> it does the same thing again and again
15:12 <megalomix> download a xml file....parse it and save to mysql...
15:12 <megalomix> again and again
15:12 <bruceb_> megalomix: this is almost certainly a logic error so you're gonig to have to give us more context. How often is the xml file downloaded, and consequently how often is mysql queried?
15:13 <megalomix> so when i debugged it...it works fine.... and also these 12 hors
15:13 <megalomix> *hours
15:13 <timoxley> megalomix sometimes that happens
15:13 jldbasa joined
15:13 <timoxley> megalomix just restart it
15:13 <megalomix> a logic ? but it does the same thing again and again... nothing different
15:13 <timoxley> megalomix perhaps the xml was malformed
15:13 themiddleman_itv joined
15:14 joshthecoder joined
15:14 tmcw joined
15:14 <timoxley> megalomix or perhaps you have a memory leak
15:14 <bruceb_> it's not crashing though...
15:14 <megalomix> timoxley, yes, maybe but i manage the error... if there was an error i go ahead
15:14 lbod joined
15:14 <megalomix> yes the process still here
15:14 Edy joined
15:14 Edy joined
15:14 Hackjack joined
15:14 <Hackjack> Hi
15:15 <megalomix> i also added a timeout control (reques tmodule)
15:15 <timoxley> megalomix did you start the node process with debug options?
15:15 <megalomix> timoxley, no, but i kill with USR1 the process
15:15 <timoxley> megalomix or are you trying to debug a regular process?
15:15 <megalomix> (for node-inspector)
15:15 marten_ joined
15:15 <timoxley> megalomix I don't think you can debug unless you are running in debug mode
15:15 pgte joined
15:16 <megalomix> why not? i read it in the node-inspector doc
15:16 <timoxley> megalomix you needed to have started the process in debug mode
15:16 <timoxley> maybe I'm wrong
15:16 <timoxley> hang on
15:16 iamdustan joined
15:16 der| joined
15:17 <megalomix> i restart it
15:17 <timoxley> ok I was mistaken
15:17 <timoxley> TIL you can throw node into debug mode while it's running
15:18 <megalomix> yes
15:18 <megalomix> i can
15:18 <der|> timoxley: hey, thanks for the advice about the test cases :) (I'm the dude behind corejs)
15:18 <megalomix> but as i told you .....i have added 3-4 breakpoints but nothinghappen
15:18 <chjj> "creationix started watching luvit/luvit January 27, 2012"
15:18 <chjj> hmmmm
15:19 <megalomix> how can i start in debug mode?
15:19 rwaldron joined
15:19 <megalomix> wait
15:19 <megalomix> I had and IDEA
15:19 <megalomix> maybe a bullshit :)
15:19 <der|> megalomix: require('child_process').spawn('kill', ['-s', 'SIGUSR1', process.pid]);
15:19 <timoxley> der| no problem… how's the test suite coming along? you must be near 100% test coverage by now yes?
15:20 <megalomix> but i shot it
15:20 <Hackjack> hi guys. where can i learn to program with node in my iPod? like iOS.openApp or so
15:20 <megalomix> der|, hmmm
15:20 <Hackjack> *on my ipod
15:20 <megalomix> --debug parameter at the start
15:20 <megalomix> no?
15:20 <megalomix> btw can i log debug message to a file ?
15:20 <Hackjack> where can i learn?
15:20 <der|> timoxley: I've rewritten everything to vanilla JS. Working on the test cases now, everything's running good so far
15:21 <megalomix> or better
15:21 <Hackjack> hello?
15:21 <der|> timoxley: you can check it out briefly at core-js.org (redirects to github)
15:21 <megalomix> if i start in a debug mode
15:21 <megalomix> all the message are prints on the console right?
15:21 <Hackjack> hello
15:21 <bruceb_> is there any reason why a program using the http module (with an agent, properly, with maxSockets set to 1024 and when sending Connection: keep-alive in headers of all attempts) would queue up connection attempts and make them serially while waiting for current connection to establish?
15:21 <megalomix> maybe i can keep them with nohup
15:21 <Hackjack> someone answer me?
15:21 <der|> megalomix: the code I gave you will start debug mode within the node process
15:21 ajpiano joined
15:21 Hackjack left
15:22 <megalomix> der| i would like to start the debug without change the code
15:22 <der|> megalomix: node --debug-brk myapp.js
15:22 <timoxley> der| wow, test suite is looking nice
15:22 <megalomix> der|, perfect!
15:22 <megalomix> thank you
15:22 <der|> timoxley: yeah, I was very excited yesterday, where I automated the test engines cases
15:22 <bruceb_> I *think* the http module in my case (running the latest version of node, 0.6.8) is waiting to connect until the current http connection in the pool is established. Is this how http works atm?
15:22 <der|> timoxley: the framework integrates the view engiens... this means you can use hogan partials within jade, etc mix & match, pretty cool
15:23 <timoxley> nice
15:23 themiddleman_itv joined
15:23 <der|> timoxley: and best of all, the tests tell you which engines are compatible
15:23 <lbod> ok i need to read docs but im trying to quickstart first and get inspector debugging going.. when im extracting the zips do the folder names matter? or does module loading scan all dirs and read the package.jsons for module ids?
15:23 <der|> lbod: yup
15:24 <der|> chjj: your liquor engine rocks, just a fact :P
15:24 <lbod> der|: cool thx
15:24 <der|> lbod: make sure the package.json contains the `main` property, as it will be the loaded script...
15:25 <lbod> the main property? im looking at node-inspector and theres no main
15:25 <der|> lbod: I mean, in the package.json file >> http://package.json.nodejitsu.com/
15:25 <lbod> and again sorry, trying to quickstart
15:25 patcito joined
15:26 <lbod> ah you mean nodes package.json yah?
15:26 boltR joined
15:27 <der|> lbod: yup, usually module devs handle that
15:27 <bruceb_> der|: does the http module dev ever connect here? :)
15:28 <lbod> yeh i cant use npm so im trying to hook up dependencies manually
15:28 <der|> bruceb_: I believe http belongs to core, so I guess you're in the right place heh, having any issues with the http module ?
15:30 cesconix joined
15:31 cgfuh joined
15:31 khrome joined
15:31 <bruceb_> der|: I'm not familiar with irssi so I'm not sure whether my pms are reaching you
15:31 <der|> bruceb_: yup
15:32 flotsumjets joined
15:32 blakehaggerty joined
15:33 tjgillies left
15:33 <flotsumjets> I'm trying to get a simple module working from a runme.js file, but it can never find the methods, can someone take a peep at this and tell me if anything sticks out : http://pastebin.com/uQBjyxNP
15:35 sabbath joined
15:35 <insin> the only property you've given "staticc" is a "prototype" property, so there's no such thing as staticc.createServer
15:36 fomatin joined
15:36 <der|> flotsumjets: Use Object.create(prototype);
15:37 <der|> flotsumjets: var staticc = Object.create({ ... prototype code here ... });
15:38 <bruceb_> der|: am I missing something or am I experiencing the limitation of the http module establishing connections as fast as it can?
15:38 zemanel joined
15:38 sdwrage joined
15:38 Will987 joined
15:38 <der|> bruceb_: I'm not quite sure, maybe somebody else can help.
15:38 <Will987> Anyone interested in buying a website where users can sign in with social networks and show their online status on chat applications and services. Fully complete and all modifications are free. PM me for pricing. DEMO: http://myonlinestat.us/josh
15:39 <CIA-99> libuv: 03Ben Noordhuis 07master * r9db39bb 10/ src/unix/freebsd.c : unix: don't use C99 comments in C89 source - http://git.io/uHthCQ
15:39 <CIA-99> libuv: 03Ben Noordhuis 07master * rceff85d 10/ src/unix/freebsd.c :
15:39 <CIA-99> libuv: unix: fix compile error in freebsd.c
15:39 <CIA-99> libuv: Fixes joyent/node#2606. - http://git.io/VpvekA
15:39 <CIA-99> libuv: 03Ben Noordhuis 07master * rc89a75f 10/ (src/unix/kqueue.c src/unix/tcp.c src/unix/udp.c):
15:39 <CIA-99> libuv: unix: fix compiler warning in kqueue.c, tcp.c, udp.c
15:39 <CIA-99> libuv: Include <unistd.h>, it contains the definition of close(). - http://git.io/_uQ6Zg
15:39 <CIA-99> libuv: 03Ben Noordhuis 07master * r9974825 10/ (config-unix.mk uv.gyp):
15:39 <CIA-99> libuv: unix: link to libkvm on freebsd
15:39 <CIA-99> libuv: Fixes 'undefined reference' linker errors to kvm_open(), kvm_close(), etc. - http://git.io/gPybcA
15:40 kmiyashiro joined
15:40 kevwil joined
15:41 nibblebot joined
15:41 MatthewS joined
15:41 devdazed joined
15:42 kevwil left
15:42 fomatin joined
15:43 <timoxley> Will987 protip: tidy up the design before you try sell that. judge book cover yadda.
15:43 <Will987> timoxley: as I said, modifications are included.
15:45 innociv joined
15:46 <Edy> i'll buy ist for 1€
15:46 der| joined
15:46 <timoxley> Edy don't inflate the price, it'll make it harder for others
15:46 <Edy> :)
15:47 <der|> Is there any way to set an object's prototype similar to using ob.__proto__ = prototype ?
15:47 AndreasMadsen joined
15:47 <der|> I believe using ob.__proto__ is discouraged, isn't it ?
15:48 <timoxley> der| you can get it with Object.getPrototypeOf(obj)
15:48 <timoxley> der| not sure about setting though
15:49 bkaney joined
15:49 <der|> timoxley: yeah, I have done it using __proto__ which apparently can replace the prototype, but would like to use a more standard way to do it
15:49 <der|> heard somewhere that __proto__ is discouraged, but since we're running on the server, it's not that bad to use I think
15:50 <timoxley> der| I think it's discouraged because it's not a standard
15:50 <chjj> der|: thanks
15:50 <der|> timoxley: exactly
15:50 sunglepuss joined
15:51 <der|> chjj: welcome mate. Marked looks pretty cool also
15:52 mAritz joined
15:52 Locke23rus joined
15:53 <zeile> is there a node.js showcase?
15:53 briancra_ joined
15:53 EuroNerd joined
15:54 joshgillies joined
15:55 falk_ joined
15:56 Cromulent joined
15:56 jhurlima2 joined
15:56 peregrine81 joined
15:56 <megalomix> guys
15:57 <megalomix> strace command should be usefull to understand why my node app goes idle ?
15:57 euforic joined
15:57 mikeal joined
15:57 petersendidit joined
15:58 SleepingPrgmr left
15:59 <baudehlo> megalomix: not really.
16:00 innoying joined
16:01 <innoying> Okay. I have a quick question. I run apache on my server currently. But I want to transition to node becuase it's awesome. But initial tests using node and express.js I'm getting worse performance (about 3x worse) than apache. That's not what I was expecting. Any ideas?
16:02 Axsuul joined
16:02 <innoying> Or optimizations?
16:02 <DeezGz> use streaming and piping
16:02 carlyle joined
16:02 <innoying> DeezGz: Instead of using express.js?
16:02 MatthewS joined
16:03 <DeezGz> yes keep it simple
16:03 <DeezGz> write your own functions
16:03 <innoying> Hmm. Okay. I'll try that
16:03 <DeezGz> their are no short cuts in life
16:03 <innoying> haha true.
16:03 vl4kn0 left
16:04 scott_gonzalez joined
16:04 <viridari> you've obviously never met a trust fund brat
16:04 vkandy joined
16:04 <DeezGz> a site from scratch with no jquery or other bull shit
16:04 <DeezGz> http://kingofphotography.com/
16:05 Juan77 joined
16:05 francisl joined
16:06 <VesQ> DeezGz: I srsly hope that ain't your site
16:06 <viridari> 1996 called. They want their web site back.
16:06 <DeezGz> its a work inprogress
16:06 francisl left
16:06 <DeezGz> looks suck for now
16:06 francisl joined
16:06 francisl left
16:06 <VesQ> DeezGz: REMOVE THAT AUTOPLAY. Please.
16:06 <tjfontaine> lul autoplay
16:06 <viridari> it needs more <blink>
16:06 <DeezGz> its a stream
16:06 <megalomix> baudehlo, how can i find problem on my application?
16:07 <DeezGz> go to techno
16:07 <viridari> VesQ++
16:07 <catb0t> VesQ now has 1 beer
16:07 <megalomix> as i told this app goes well for 12 hours
16:07 <VesQ> DeezGz: what ever, dont make it play when I enter the site
16:07 mikeal joined
16:07 <megalomix> do i have to wait 12 hours ? :)
16:07 <DeezGz> no
16:07 <viridari> do not myspace your web site
16:07 <DeezGz> thats boring
16:07 <VesQ> DeezGz: Oh my god
16:07 <DeezGz> out with the old in with the new
16:07 <viridari> do not put music, do not put faireys that fart glitter and rainbows
16:07 eboy joined
16:07 <VesQ> DeezGz: I can live with the rest but don't make me lose my job because I left my speakers on full volume
16:08 <EyePulp> DeezGz: Is that all node on the backend?
16:08 <DeezGz> its not a myspace site, its really for web dj to hold a spot on the add stream network i will be working on soon
16:08 <DeezGz> not yet
16:08 <DeezGz> raw c++ exe
16:09 <VesQ> DeezGz: remove the autoplay, remove the autoplay, remove the autoplay...... * Infinity
16:09 <DeezGz> its also servs a ios app to view photos
16:09 strmpnk joined
16:09 <megalomix> is there a command to understand what node is doing internally ?
16:09 <VesQ> it really is awful UX if you have autoplay
16:09 <DeezGz> it not even close to being done
16:09 <VesQ> ok, so remove the fundamental flaw you have
16:09 <DeezGz> i know we did it from scratch
16:10 <DeezGz> more of a scripter not a graphic man u digg
16:10 FredrIQ joined
16:10 euforic joined
16:10 <viridari> music has no place on a professional photography site
16:10 <baudehlo> megalomix: maybe load it in the debugger?
16:11 <DeezGz> at first we did it in pure javascript, that was the goal
16:11 <DeezGz> yea right
16:11 <megalomix> baudehlo, i don't know...where can i see examples?
16:11 <DeezGz> music make a boring site come alive
16:11 d_low joined
16:11 <DeezGz> special when coding
16:12 joshgillies joined
16:12 <baudehlo> megalomix: lmgtfy.com?q=debugging+nodejs
16:12 <VesQ> DeezGz: oh geez
16:12 <viridari> so listen to music while you're coding. Don't subject your visitors to it though.
16:12 <CIA-99> node: 03isaacs 07v0.6 * rf98999c 10/ (3 files in 2 dirs):
16:12 <CIA-99> node: Properly update npm to 1.1.0-3
16:12 <CIA-99> node: Thanks @mscdex for spotting this. - http://git.io/XjnoJA
16:12 <d_low> Hello. Would anyone in the channel happen to have some examples of proper ways to throw/handle errors when using streams?
16:13 <DeezGz> hit the stop button if you like guy
16:13 <sechrist> since dox no longer generates those same pages itself, is there a way to get the same thing/
16:14 <isaacs> d_low: instead of throwing, emit an error event.
16:14 <isaacs> d_low: instead of catching, add an "error" event handler.
16:14 <VesQ> DeezGz: oh well. If you can't understand what's for the best of internetz I can't help you
16:14 <isaacs> d_low: that's about it.
16:14 <d_low> isaacs: ahh, so i need to build an event listener for the stream?
16:14 <VesQ> DeezGz: I'll never visit that site anyways, so I won't probably mind
16:15 <d_low> so the stream would emit an erro event?
16:15 djazz joined
16:15 <isaacs> d_low: a stream is basically just an EventEmitter object that emits specific events and has some methods added.
16:15 <isaacs> d_low: so it has all the EE stuff. on, removeListener, etc.
16:15 <CIA-99> libuv: 03Bert Belder 07v0.6 * r92b260c 10/ (src/win/fs.c test/test-fs.c test/test-list.h): windows: fix stat("c:\\") regression - http://git.io/8FrlsA
16:15 <CIA-99> libuv: 03Ben Noordhuis 07v0.6 * r3f1bad2 10/ test/test-fs.c : test: add missing return statement in fs_stat_root - http://git.io/qBd94g
16:15 <VesQ> DeezGz: just an opinion onthe matter: http://blog.therapysites.com/?p=178
16:15 <d_low> isaacs: that seems so obvious now. I just didn't occur to me at first. Thanks.
16:16 devongovett joined
16:16 <DeezGz> kool not for every one, not done with it, just a test of thing, i got shit that would blow you mind anyways. u cant see yet not down, it works across all platforms too
16:16 <isaacs> d_low: also, unhandled "error" events throw, so if that's your *intent*, you can always just let it happen
16:16 <isaacs> d_low: but at least then it's *possible* to work with it in an async manner without killing the whole process
16:16 <isaacs> d_low: usually, once a stream emits "error", it's not really usable any more.
16:17 <d_low> isaacs: makes sense
16:17 heavysixer joined
16:17 <VesQ> DeezGz: ok then. When it's ready I'd be happy to see it :) I see much of JS in that site and I like studying them. Don't get upset just because I'm flaming about autoplay.
16:17 themiddleman_itv joined
16:18 <DeezGz> well i host my own server here at home, i dont have to follow you cdn rules guy..
16:18 <DeezGz> its koo i know u are just voicing you opion
16:18 <VesQ> "cdn rules guy"?
16:18 <DeezGz> my pops and i worked on that
16:18 <CIA-99> node: 03Ben Noordhuis 07v0.6 * r8a413b0 10/ (3 files in 2 dirs): uv: upgrade to 3f1bad2 - http://git.io/3idDeg
16:18 <DeezGz> but mostly is dessign, i not to fun of my self
16:19 defied joined
16:19 jmar777 joined
16:19 <DeezGz> content delivery network or content distribution network (CDN)
16:19 liar joined
16:19 <baudehlo> or CanaDiaNs
16:20 <DeezGz> lol
16:20 <VesQ> DeezGz: yes that's true that you don't have to listen on my opinions. I'm just saying like a website maker says to another, that autoplay really doesn't work that well. I'd like to have some visual info that I could manually make the music play when I enter, not that it autoplays immediately
16:20 <VesQ> visual info that would point me to the player* is what I meant to say
16:20 <megalomix> guys how can i go ahead when i set a breakpoints?
16:20 euforic joined
16:20 <megalomix> how can i move it?
16:21 <VesQ> megalomix: are you using node-inspector or just plain-old console-debugging?
16:21 <DeezGz> i feel that, i dont like that interface for the music player, and the fack that it is in html frames, my pops idea though, i just did the media player interface object to the flash player
16:21 <VesQ> DeezGz: ah so you just made the graphics, not the code
16:22 <DeezGz> no the code he did the graphics, adobe AI just learing how to use it
16:22 <VesQ> what?
16:22 <DeezGz> man what a pain in thee ass
16:22 FIQ joined
16:22 <tuhoojabotti> Moi
16:22 <VesQ> moi
16:22 <megalomix> VesQ, node-inspector
16:23 tornad joined
16:23 <VesQ> megalomix: you can make a new breakpoint and click on the play-button to continue to that one
16:23 <megalomix> ok
16:24 <VesQ> megalomix: but it will always stop on that debugger; statement, as far as I know it can't be deleted with node-inspector. At least it always fails when I try to modify the code.
16:24 <VesQ> but you probably didn't have debugger; statements hardcoded to your js
16:24 jj0hns0n joined
16:25 <megalomix> i need to find the problem of my code
16:25 <megalomix> but now i dont see any problems
16:25 <megalomix> i have to do it for 12-14 hours
16:25 <megalomix> :D
16:25 <CIA-99> libuv: 03Ben Noordhuis 07master * r3de0411 10/ (9 files in 4 dirs): Merge remote-tracking branch 'origin/v0.6' (+149 more commits...) - http://git.io/B_CVLA
16:25 sr71-blackbird joined
16:26 tkaemming joined
16:26 warz joined
16:26 warz joined
16:26 <VesQ> megalomix: try adding breakpoints here and there and inspect what data is in closure or local
16:27 jbpros joined
16:27 strmpnk joined
16:27 <megalomix> VesQ, i would like do it IN the code without debug it
16:27 <megalomix> i mean...i can lunch the app
16:27 shanebo joined
16:27 <megalomix> and log all the messages
16:27 <VesQ> but what's wrong
16:27 <megalomix> util.inspect(WHAT HERE)
16:27 Juan77 joined
16:28 <megalomix> VesQ, i really do not know
16:28 <megalomix> it works very good for 12-14 hours
16:28 <megalomix> then the proces goes idle �_�
16:28 <VesQ> oh
16:28 <megalomix> it does the same things repeatly
16:29 <VesQ> do you have some possible integer overflow or something?
16:30 idoru joined
16:32 pgte joined
16:32 <CIA-99> node: 03Ben Noordhuis 07master * r14b7c43 10/ (14 files in 5 dirs): uv: upgrade to 3de0411 - http://git.io/Mh543g
16:32 zitchdog joined
16:33 adrianmg joined
16:33 innociv joined
16:33 adrianmg left
16:33 addisonj joined
16:34 tttthet joined
16:35 tttthet joined
16:35 <megalomix> VesQ, i do not know
16:35 <megalomix> how can i check it ?
16:36 dilvie joined
16:36 <megalomix> VesQ, the problem is that i dont see any error
16:36 Carmivore joined
16:36 <VesQ> megalomix: what type of app are we talking about?
16:36 <megalomix> and i also check the errors if a callback returns an errors i jump it and to another request
16:36 peregrine81 joined
16:36 <megalomix> i have wrote an app that connect to a web service
16:36 vkandy joined
16:36 <megalomix> retrieve xml pages
16:36 <megalomix> and save data to mysql
16:36 <megalomix> stop
16:36 <megalomix> do it again and again
16:37 <VesQ> sounds funky
16:37 <VesQ> do you have a timer of some sort that handles the core functions?
16:38 brianc3 joined
16:38 <megalomix> VesQ i use request module
16:38 <megalomix> with a timeout
16:38 <megalomix> if i get a timeout i do the request again
16:38 <megalomix> then i lunch process.nextTick
16:38 <megalomix> to retrive this xml file
16:39 <megalomix> the other...it is simple
16:40 <VesQ> uhh I feel like I can no longer help you. I would've build the app on using EventEmitters and emitting certain events when data is sent / data is read / all is done
16:40 innociv joined
16:41 jsurfer joined
16:41 djazz left
16:42 <megalomix> VesQ, now i try to understand the errors
16:42 <megalomix> i can use TRY CATCH
16:42 <megalomix> and see prints the errors
16:42 prettyrobots joined
16:42 diogogmt joined
16:42 maushu joined
16:42 <VesQ> sounds like you have something big to debug, if the app fails only after 12 hours or so
16:43 <CIA-99> node: 03isaacs 07v0.6 * r3865152 10/ test/simple/test-tty-stdout-end.js : stdout ending test message correction - http://git.io/skL-9w
16:43 jergason joined
16:43 neilk_ joined
16:44 callen joined
16:45 <megalomix> VesQ, the strange thing is that
16:45 <megalomix> the app works good
16:45 <megalomix> but something happen
16:45 <megalomix> so
16:45 <megalomix> with a try catch
16:45 <megalomix> i should get the error
16:45 mara left
16:45 <megalomix> hmmm
16:45 JJMalina joined
16:45 <megalomix> no wait... i use nohup
16:46 <megalomix> if i get an error i think node print it to console
16:46 rsa-squirrel joined
16:46 <megalomix> so nohup should print the output to the file
16:46 <megalomix> hmmm
16:46 <megalomix> node write on the console right?
16:46 <megalomix> *writes
16:46 <VesQ> yes
16:46 Simas_J joined
16:46 <VesQ> you could also try http://nodejs.org/api/process.html#event_uncaughtException_ while debugging
16:47 <isaacs> test, please: http://nodejs.org/dist/v0.6.9-RC0/
16:47 innociv joined
16:48 binaryjohn joined
16:48 nsabovic joined
16:48 <megalomix> isaacs, ?
16:48 <megalomix> do you mean for my issue?
16:48 <isaacs> megalomix: no, i mean, for all issues :)
16:49 <megalomix> :D
16:49 <megalomix> ok
16:49 <isaacs> working on a release.
16:49 <megalomix> i saw 0.7.1
16:49 petersendidit joined
16:50 <isaacs> megalomix: yeah, 0.7.1 is still unstable.
16:50 <isaacs> this is a bugfix release on the 0.6 branch
16:50 <megalomix> very good
16:50 mxbtty joined
16:50 <megalomix> i saw each 15 days you release new versions
16:51 <megalomix> VesQ, Event: 'uncaughtException' wow yes it is good
16:51 <megalomix> i use it
16:51 <isaacs> should be every week
16:51 <isaacs> twice a week, actually
16:51 <isaacs> once for unstable, once for stable.
16:51 mxbtty joined
16:51 <isaacs> but 0.6 will slow down very soon.
16:51 <isaacs> the holidays were a bit of a speedbump.
16:51 jldbasa joined
16:51 <megalomix> :)
16:51 <megalomix> good
16:51 <VesQ> isaacs: looking forward to 0.7 branch becoming stable :)
16:53 tilgovi joined
16:53 <isaacs> VesQ: me too :)
16:53 <isaacs> VesQ: please use it. maybe not in production, but test with it a lot.
16:53 mrc0ke joined
16:53 <isaacs> VesQ: the more eyeballs on it, the faster it can stabilize.
16:53 <VesQ> I'll sure test it out at some point with my udp app :)
16:54 <tuhoojabotti> I use 0.7.x!
16:54 <VesQ> tuhoojabotti: our app works nicely with it? oh
16:54 <tuhoojabotti> of course
16:55 <VesQ> well yeah, why wouldn't it... :)
16:55 <tuhoojabotti> Why wouldn't it?
16:55 <VesQ> :D
16:55 <tuhoojabotti> We don't use path.exists much
16:55 <megalomix> VesQ, i added it......lunched the app....i will wait 12 hors :ooooo
16:55 <wankdanker> isaacs: linux 64: [00:56|% 100|+ 327|- 0]: Done
16:55 <megalomix> :D
16:55 <isaacs> wankdanker: !!!!!
16:55 slaskis joined
16:55 <isaacs> wankdanker: you got all tests passing? that *never* happens.
16:55 <isaacs> wankdanker: nice.
16:55 <wankdanker> isaacs: :) dgram!!!!!
16:55 <nsabovic> hi - i'm trying to set up a npm repository, and after a few gigs of replication, http://localhost:5984/registry/_design/ui/_rewrite is empty
16:55 <VesQ> megalomix: fingers crossed, hopefully it wont crash and burn :D
16:56 iRoj joined
16:56 <megalomix> VesQ, :D
16:56 <nsabovic> i mean the ui is there, but there's no packages, only a flood of errors in console: [info] [<0.227.0>] OS Process #Port<0.1551> Log :: function raised exception ["error", "invalid_require_path", "Object has no property \"monkeypatch\". {\"views\":{\"lib\":null},\"_module_cache\":{}}"] with doc._id hiredis
16:56 <isaacs> ah, forgot to update the version properly.
16:56 <isaacs> rc1 coming right up :)
16:57 <wankdanker> :)
16:57 <wankdanker> bring it
16:58 <nsabovic> this on linux, ubuntu 11.10 x64, couchdb 1.1.1
17:00 bartt joined
17:00 <nsabovic> i saw someone ask the same question and get no answer, so I thought maybe I'm luckier
17:01 nibblebot joined
17:02 napperjabber_ joined
17:02 <megalomix> guuuuuyyyss wait
17:03 <megalomix> maybe i got the memory limit
17:03 <megalomix> is there a limit right?
17:03 <megalomix> maybe this problem cause the iddddle :)
17:03 <megalomix> possible?
17:03 <TheMoonMaster> megalomix: Details?
17:04 <isaacs> test, please: http://nodejs.org/dist/v0.6.9-RC1/
17:05 <markq> RC1?
17:06 sz0 joined
17:06 <* dragon> looks for the changelog.
17:06 <megalomix> TheMoonMaster, i mean....i have an app that runs many hours.....and then i see the process still here
17:06 <megalomix> but it is iddle
17:06 <megalomix> *idle
17:07 <megalomix> i tried to debug it with node-inspector
17:07 <megalomix> but nothing happen
17:07 johnhamelink joined
17:07 <megalomix> i tryied to add breakpoints in node.js
17:07 <megalomix> but nextTick is not called anymore
17:07 <VesQ> breakpoints stop the program
17:08 <VesQ> thats why they're called breakpoints
17:08 level09 joined
17:08 napperjabber joined
17:09 <baudehlo> megalomix: and how do you mean it's idle? Is it not accepting connections?
17:10 <nsabovic> sigh...
17:11 tttthet joined
17:11 tomasztomczyk joined
17:11 qbit_ joined
17:14 albertosh joined
17:14 strmpnk joined
17:15 <RORgasm> isaacs: any news on the smartmachines being reverted?
17:16 adrianF joined
17:16 <isaacs> RORgasm: new smartmachines now have older versions of node.
17:16 <isaacs> a new one with node 0.6.8 should be ready today or monday
17:16 <isaacs> and then they'll have 0.6.9 probably next week
17:16 <RORgasm> awesome...i guess i will check later this weekend
17:16 mehlah joined
17:16 <RORgasm> or maybe i'l just wait till next week for 0.6.9 :)
17:17 <RORgasm> is there a twitter feed i can follow for such announcements? joynet maybe?
17:17 chrispaterson joined
17:17 <megalomix> VesQ, I add breakpoints but they are not "invoked"
17:17 <chrispaterson> Where is the documentation for package.json for npm?
17:18 <chrispaterson> I was wondering if there is any 'install' scripts?
17:18 FredrIQ joined
17:18 <megalomix> baudehlo, i mean that adding breakpoints the program does not go ahead
17:18 <megalomix> i added breakpoints to my app and node.js also
17:18 <megalomix> but nothing...the debug is running, but nothing
17:18 <megalomix> with "idle" i mean that
17:18 <SubStack> isaacs: on that note, rolling zero-downtime multi-server git deploys with dynamic port allocation is about to get really easy
17:19 <isaacs> chrispaterson: npm help json, you mean?
17:20 EvRide1 joined
17:20 <SubStack> just finishing up one more thing in seaport and hooking propagit to forever
17:20 <isaacs> SubStack: great.
17:20 <isaacs> maybe one day PaaS will not be fundamentally shitty.
17:20 <isaacs> though, i remain doubtful.
17:20 <chrispaterson> isaacs: First of all, npm is awesome... No I mean I know you can add a 'scripts' property but is there an 'on install' script?
17:21 <chrispaterson> isaacs: like if I wanted my app to build a database on start
17:21 <SubStack> chrispaterson: there's install and preinstall and other fun times
17:21 <SubStack> npm help json lists all the fun
17:21 <chrispaterson> Oh ok awesome!
17:21 <chrispaterson> thanks
17:22 dnjaramba joined
17:22 koo1 joined
17:22 <SubStack> isaacs: I'm more thinking that PaaS should evolve into continuous multi-process multi-server deployment as a service
17:22 mattgifford joined
17:23 joshgillies joined
17:23 mattgifford joined
17:24 <SubStack> because that would be way more useful
17:25 blueadept joined
17:25 blueadept joined
17:25 <tuhoojabotti> Yo
17:25 <isaacs> SubStack: it'd be nice if that could be done without having to isntall a bunch of stuff on the server.
17:25 <isaacs> SubStack: every line of code on the server is a liability.
17:25 Renegade001 joined
17:26 <isaacs> we should try to minimize those.
17:26 <SubStack> yes
17:26 <SubStack> this is just a thing that you can npm install
17:26 strmpnk joined
17:26 <SubStack> that is the goal
17:26 <isaacs> SubStack: even that is too much
17:26 <isaacs> SubStack: assume that the server has rsync, and ssh, and that is it
17:26 mattgifford joined
17:26 <isaacs> the tool should be something i install locally, and it should do all the setup of the server.
17:27 <isaacs> oh, also, let's say you can assume gcc and python
17:27 <isaacs> since most modern os's have twayhat any
17:27 <isaacs> *have that anyway (trackpad caused packet shifting)
17:28 mrc0ke left
17:28 tommyvyo joined
17:29 petersendidi joined
17:29 CrabDude joined
17:30 <CrabDude> Anyone know anything about node-spdy failing in windows node v0.7.1? => "Assertion failed: err == Z_OK && "Failed to set dictionary", file src\node_zlib.cc, line 338"
17:30 <CrabDude> ping isaacs
17:30 <isaacs> CrabDude: ping fedor indutny
17:31 <CrabDude> ping indutny Have you tried node-spdy on windows (v0.7.1)?
17:33 mikeric joined
17:33 dnolen joined
17:35 davehamptonusa joined
17:37 rdmoshpit joined
17:37 <jhurlima2> tjholowaychuk, nedis seems to have issues with losing hashset fields
17:37 cjm joined
17:37 <jhurlima2> should i submit a bug report + repro or is it a known issue?
17:37 brianseeders joined
17:38 <davehamptonusa> isaacs: normally npm install installs to the node_modules directory in the directory that you call it from. Is there a way I can tell npm to install it in another directory (specifically the current one)?
17:39 <isaacs> davehamptonusa: it will alwyas install intoa node_modules folder
17:39 <davehamptonusa> somehting like npm install foo -d ./
17:39 <isaacs> you can specify the prefix with the --prefix arg
17:39 mehlah joined
17:40 <baudehlo> woo, another win for Node fans: $ telnet mxi2f.craigslist.org 25
17:40 <baudehlo> Connected to mxi2f.craigslist.org.
17:40 <baudehlo> 220 mxi2f.int.craigslist.org ESMTP Haraka 1.1.0 ready
17:40 <isaacs> baudehlo: neat :)
17:40 <davehamptonusa> thanx issacs.
17:41 <isaacs> davehamptonusa: it walks up the tree until ti finds a node_modules or package.json
17:42 <isaacs> davehamptonusa: so you can also just make that dir or that file to enforce it
17:42 <isaacs> davehamptonusa: it's similar to how git walks up to a .git folder
17:42 creationix left
17:42 <davehamptonusa> we deploy our apps in /home/something/htdocs. So ill just install in /home/something and symlink the node_modules folder to htdocs
17:42 <davehamptonusa> easy enough
17:43 ninjapig joined
17:43 fomatin left
17:45 joshsmith joined
17:45 kn0where joined
17:45 enmand joined
17:46 jxson joined
17:47 markschaake joined
17:49 k1ttty joined
17:49 jbpros joined
17:50 joshkehn1 joined
17:53 yawNO joined
17:54 seb_m joined
17:54 ph^ joined
17:55 Taai joined
17:55 blakehaggerty joined
17:56 reid joined
17:56 CarterL joined
17:57 <Taai> Why this never stops? var i = 10; while (i) { while (i--) { } }
17:57 <kn0where> try --i
17:57 dload joined
17:59 <topaxi_> Taai: because if the inner while stops, there will be one decrement on 0, -1 is a truthy value :)
17:59 <topaxi_> --i like kn0where said should do it
18:00 <Taai> Thanks! It really is so! I'm just used to that the while (i--) {} works, but only now tried to use double while's ;)
18:01 mikeal joined
18:04 mikeric joined
18:07 krake joined
18:07 <Taai> yeah, well, that's changing the routine - the last `i` turns out as 1 not 0 ... So, my solution will be this - while (i) { while (i) { i--; } }
18:08 koo1 joined
18:09 peregrine81 joined
18:09 DennisRasmussen joined
18:11 dob joined
18:11 davidbanham joined
18:11 r04r joined
18:11 <eeemsi> https://www.destroyallsoftware.com/talks/wat
18:11 <dob> Did somebody use the node-csv-parser extension? I have some problem and don't know how to solve it
18:11 <eeemsi> hrhrhr
18:11 __main__ joined
18:12 <dob> In my csv is a string "ytsk\"kyy" and the parser returns Invalid closing quote; found "k" instead of delimiter ","
18:14 redwinter joined
18:15 <redwinter> I'm using express. I have a file require()'d in app.js, and I want to access the "app" var in that file. How could I do this? module.app doesn't work...
18:15 ajpiano joined
18:16 r04r joined
18:16 <CIA-99> libuv: 03Ben Noordhuis 07v0.6 * r16124bb 10/ src/unix/udp.c :
18:16 <CIA-99> libuv: sunos: fix uv_udp_set_ttl and uv_udp_multicast_ttl
18:16 <CIA-99> libuv: The argument to setsockopt(IP_TTL|IP_MULTICAST_TTL) should be a char, not an int
18:16 <CIA-99> libuv: like on other Unices. - http://git.io/8xdSkQ
18:16 sreeix_ joined
18:17 jlank_ joined
18:17 satyr joined
18:18 <CIA-99> node: 03Ben Noordhuis 07v0.6 * r22e2347 10/ deps/uv/src/unix/udp.c : uv: upgrade to 16124bb - http://git.io/kKt4hA
18:18 prettyrobots joined
18:19 <maxogden> redwinter: module.exports.app = app
18:19 dilvie joined
18:20 <redwinter> maxogden: console.log(module.exports.app) -> undefined when calling it in a controller require()d by app.js?
18:21 petersendidit joined
18:21 <maxogden> redwinter: i dont know anything about express but the way commonjs works is that module.exports is the object that gets loaded when you require()
18:22 dodo_ joined
18:22 paulwe joined
18:23 cognominal_ joined
18:24 <tuhoojabotti> How to transfer a callback into return :P
18:24 <tuhoojabotti> functional programming messes with my head
18:24 <tjholowaychuk> return function(){}
18:24 <tuhoojabotti> Template engine calls my function, which calls an async url shortener, but how to return the url
18:24 <redwinter> maxogden: hmm...
18:25 r04r joined
18:25 <maxogden> redwinter: test it out. make a file called something.js with "module.exports = {hello: "world"}" in it, and in another file console.log() "require('./something').hello"
18:26 <tjholowaychuk> or exports.hello = 'world'
18:27 Murvin joined
18:27 colinclark joined
18:27 <redwinter> maxogden: Would it change anything that this line is in app.js (the file doing the require()ing)? var app = module.exports = express.createServer();
18:27 cjm joined
18:28 <tjholowaychuk> redwinter learn about modules first
18:28 <tjholowaychuk> before using express
18:28 brngardner joined
18:28 <SubStack> learn about modules before using any of them
18:28 <maxogden> he or she is learning right now!
18:29 <SubStack> hooray!
18:29 artusrocha joined
18:29 <redwinter> tjfontaine: I read a few articles, and I thought I understood this, but module.exports.app doesn't work in the require()d file
18:30 <redwinter> tjholowaychuk: sorry, you ^
18:30 <tjholowaychuk> module.exports == exports
18:30 <tjholowaychuk> in the current module
18:30 <tjholowaychuk> not other modules
18:30 <tjholowaychuk> it's a new object per module
18:30 <tjholowaychuk> (file)
18:30 <megalomix> guys, I have to write a function that has as paramenter a list of values that i have to insert to mysql, i know mysql works async, how can i be sure that the callback will ONLY be called *AFTER* all the queries are done?
18:30 <maxogden> megalomix: callbacks!
18:31 <megalomix> do i have to create an anonymous function inside that decrement a counter ?
18:31 <isaacs> test, please: http://nodejs.org/dist/v0.6.9-RC2/
18:31 r04r joined
18:31 <megalomix> maxogden, ?
18:31 <Murvin> in nodejs, is there a way to stop the stream of the http.request if the request body is too large? (particularly for file upload scenario)?
18:31 <maxogden> megalomix: im hoping your mysql library uses callbacks
18:31 <megalomix> maxogden, sure... mysql.query("", function(err, rows){ .... })
18:32 peregrine81 joined
18:32 <maxogden> megalomix: cool so you want to do a bunch of queries and run a callback when they're all done?
18:32 <isaacs> maxogden, megalomix: your names have a lot of characters in common. i keep getting them confused
18:32 <megalomix> i have a function called insertValues (listOfValues)
18:32 <megalomix> max exactly
18:32 <maxogden> megalomix: check out the async library specifically the parallel function
18:32 mattgifford joined
18:32 <maxogden> megalomix: or roll it yourself (more fun)
18:33 <maxogden> isaacs: megaogden
18:33 mikedeboer joined
18:33 <megalomix> maxogden, wait, i have a function called insertValues where i pass the list of values AND Inside that i have mysql.query (in a forEach)
18:33 xeodox joined
18:33 <megalomix> maxogden, at the moment i decrement a counter
18:33 <maxogden> megalomix: my advice remains the same in light of this new data
18:33 mattgiff_ joined
18:33 <megalomix> i set the conter as the length of the list and then i do --cnt
18:34 josh-k joined
18:34 TimTim joined
18:34 <isaacs> maxogden: megaogden is like maxogden, but instead of a man with a large beard on it's face it's a large beard with a man on its face.
18:34 <maxogden> SubStack: illustration needed o/
18:35 <xeodox> How do I make the session expire to 999999 , in Express?
18:36 <SubStack> maxogden: you could change your name to beard dotcom and move to new zealand
18:36 <Murvin> tjholowaychuk: hi.. i have sent the issues about session on https not working. is that a valid issue?
18:36 <maxogden> xeodox: i dont know anything about express but heres a way to do it without a library https://github.com/maxogden/datacouch/blob/node_server/service/auth.js#L14
18:37 ninjapig joined
18:37 <megalomix> isaacs, is there a memory limit in node?
18:37 <redwinter> tjholowaychuk: module.exports is only for defining variables that will be sent back to the file doing the require(), right? Is it possible to access the variables in the require()d file from the file doing the requiring?
18:37 <megalomix> isaacs, i mean if my app waste a lof of memory, coul dnode "block" it ?
18:37 <megalomix> (or kill it)
18:37 <megalomix> ?
18:37 dshaw_ joined
18:37 DEV0_ID joined
18:38 <SubStack> megalomix: if you try to use too much memory your program will crash
18:38 <maxogden> redwinter: the only thing that gets exported (and becomes accessible) is module.exports
18:38 binaryjohn joined
18:38 r04r joined
18:38 r04r joined
18:38 <isaacs> megalomix: the memory limits are in the OS
18:38 <isaacs> megalomix: but most operating systems have tools for this, yes.
18:39 <redwinter> maxogden: Right, and in app.js, it has var app = module.exports = ..., and app.use() works there, but then it has a require('file2') and in file2 I can't call module.exports.use() or module.exports.app.use()
18:39 TimTim joined
18:39 <megalomix> isaacs, but if the app use too much memory the app will be killed or not?
18:40 <megalomix> because this maybe be the issue i had
18:40 <megalomix> (idle process)
18:40 <tjholowaychuk> redwinter for my own apps i just have an "app" global
18:40 <tjholowaychuk> passing it around with node modules is really nasty
18:40 johnmdonahue joined
18:40 <tjholowaychuk> depending on the project you can abstract things in ways that you dont even need to access it from other files
18:40 <tjholowaychuk> but it really depends
18:40 materialdesigner joined
18:41 ohtogo joined
18:41 bingomanatee_ joined
18:43 <Murvin> any method to stop or limit the http request size in nodejs?
18:43 alexrbarlow joined
18:43 <alexrbarlow> Hey guys, whats the best way of benchmarking a function in node
18:43 mattgifford joined
18:44 <alexrbarlow> (i want to test how much my method of string interpolation is slower)
18:44 <SubStack> tjholowaychuk: what's so bad about threading app around?
18:44 <tjholowaychuk> it's pointless
18:44 <tjholowaychuk> for your own app
18:44 <tjholowaychuk> module.exports = function(app){
18:45 <tjholowaychuk> ends up creating a lot of ugly noise
18:45 <tjholowaychuk> for little gain
18:45 mattgiff_ joined
18:46 hipsters_ joined
18:46 <tuhoojabotti> tjholowaychuk: https://gist.github.com/1691638
18:47 dubenstein joined
18:47 <SubStack> tj I just really hate implicit state I guess
18:47 <SubStack> beh lag
18:47 <tuhoojabotti> I'd love to find a tutorial on advanced use of functions, like in crockford's talk
18:48 brngardner joined
18:48 <tjholowaychuk> SubStack i just hate indenting an entire file
18:48 <tjholowaychuk> jsut to pass my app
18:48 <tjholowaychuk> haha
18:48 <tjholowaychuk> it reminds me of
18:48 <tjholowaychuk> $(function(){})
18:48 <tjholowaychuk> code smell
18:48 boltR joined
18:49 <tjholowaychuk> for a while I was using the vm module to inject app in
18:49 <tjholowaychuk> but that's effectively the same thing
18:49 <tjholowaychuk> as a global
18:50 <SubStack> you could also put each of the routes in its own exports key
18:50 <tuhoojabotti> Anyone?
18:50 nibblebot joined
18:51 <tuhoojabotti> I hate being stupid
18:51 <tuhoojabotti> :D
18:51 <maxogden> tuhoojabotti: read books!
18:51 <tuhoojabotti> maxogden: Great, which one?
18:51 jasonkuhrt joined
18:51 <tjholowaychuk> SubStack yeah that's what I usually end up doing
18:51 <tjholowaychuk> it's nice to have the list to grep as well
18:51 <tjholowaychuk> some people dont like managing two areas for one route though
18:51 <maxogden> tuhoojabotti: i enjoyed stoyan stefanovs Javascript Patterns
18:51 davidwalsh joined
18:51 <tjholowaychuk> i dunno, i like it
18:52 <SubStack> well but if you're already doing exports for routes it's not bad to exports.beep = function (app, req, res, nex) {}
18:52 <SubStack> *next
18:52 <tuhoojabotti> maxogden: I'd prefer books I can read online for free. :P
18:52 mattgifford joined
18:52 dubenste1n joined
18:52 dob joined
18:53 <jaha> Hello all, if I create a route for a get request to a commonjs module, how do I server a static html file from inside that module?
18:53 <jaha> using express
18:53 CrabDude_ joined
18:53 <maxogden> tuhoojabotti: interesting, you're trying to learn a profession which easily fetches a six figure salary yet cant afford a $20 book ? :P
18:53 <tuhoojabotti> maxogden: I'm a student after all, I'm doing semi-pro stuff atm ;)
18:53 joshkehn joined
18:54 <tuhoojabotti> -> I don't get paid.
18:54 <maxogden> tjholowaychuk: i have an express question. can you .pipe() to response objects?
18:54 <tjholowaychuk> maxogden yeah they're regular node request / response objects
18:54 mattgiff_ joined
18:54 <maxogden> tjholowaychuk: sweet
18:55 <chrispaterson> tjholowaychuk: Don't forget to breed
18:55 <chrispaterson> tjholowaychuk: ;-)
18:55 <tjholowaychuk> uhhh
18:55 <tjholowaychuk> haha
18:55 <maxogden> the winky face made it seem like a proposition
18:55 <* maxogden> just sayin
18:55 mephux joined
18:56 <chrispaterson> tjholowaychuk: Just a joke, you're such a prolific coder and a genius, so we just want to make sure it passes on so we don't end up like Idiocracy. Just sayin'
18:56 Ralith joined
18:56 <tjholowaychuk> genius no way haha not even close man
18:56 <tjholowaychuk> average at best
18:56 <davehamptonusa> oh god I have to save this thread
18:57 <Ralith> Does libuv have any support for things like keyboard/mouse input?
18:57 dubenste2n joined
18:57 dubenste3n joined
18:58 <jaha> in expess, how do i serve a static html file that is sitting in the public folder (cant seem to find it on the express's website)
18:58 <tjholowaychuk> jaha app.use(express.static(__dirname + '/public'))
18:58 StanlySoManly1 joined
18:58 <tjholowaychuk> ./public/foo.html
18:59 <tjholowaychuk> GET /foo.html
18:59 jasonkuhrt joined
19:00 FnuGk joined
19:01 jasonkuhrt joined
19:01 <jaha> i set that in configure, what do i use after ive handled the routing
19:01 <jaha> send? render?
19:01 <jaha> i dont want to use jade yet
19:01 <tjholowaychuk> res.sendfile()
19:02 mikeal joined
19:02 FnuGk joined
19:03 FnuGk joined
19:03 voodootikigod joined
19:05 <jaha> hmm
19:05 <jaha> app.use(express.static(__dirname + '/public'));
19:05 <jaha> res.sendfile(__dirname+'/public/pages/index.html');
19:06 <tjholowaychuk> you dont really need res.sendfile() if you're not doing anything dynamic
19:06 <tjholowaychuk> in that case GET /pages/index.html
19:06 <tjholowaychuk> would give you that file
19:06 ismell joined
19:08 <jaha> sorry for my ignorance but what do i pass that to?
19:08 <jaha> exports.howto = function(req, res) {
19:08 <jaha> // what goes here to send that html file
19:08 <jaha> };
19:09 h4mz1d joined
19:10 <markq> jaha...it's all in the docs
19:10 <tjholowaychuk> jaha it'll be confusing if you're coming from php or something but take a look at some of the examples in the repo's ./examples directory
19:12 <jaha> thanks, i looked at the docs but obviously im still confused on the static stuff, everything else was fine
19:12 dubenste1n joined
19:13 kuhrt joined
19:13 ismell joined
19:13 <tjholowaychuk> express.static() acts as a static file server for whatever dir you pass it
19:13 <tjholowaychuk> no routing involved
19:13 <tjholowaychuk> GET /js/jquery.js will request ./public/js/jquery.js
19:13 <tjholowaychuk> if you're transferring html that's likely all you need
19:13 <chrispaterson> Is there a good jsonrpc client module? I've tried a few but they seem wrong. I am using connect-jsonrpc which is a great server module... But not sure how to implement the client
19:14 pfraze left
19:17 arcanis joined
19:19 <jaha> … im an idiot … I was confused cause I thought when you wrote GET, you were talking about an express function… not the actual GET request from the browser… its been a long day
19:19 <tjholowaychuk> no no i mean a GET request
19:19 <tjholowaychuk> static() looks at the url, sees if there's a file in that dir
19:19 <tjholowaychuk> that's it pretty much
19:23 [[zzz]] joined
19:24 devongovett joined
19:26 ohtogo joined
19:29 rtgibbons joined
19:29 agreco joined
19:30 <CIA-99> libuv: 03Ben Noordhuis 07v0.6 * r332b72e 10/ src/unix/udp.c :
19:30 <CIA-99> libuv: sunos: fix uv_udp_set_ttl and uv_udp_set_multicast_loop
19:30 <CIA-99> libuv: It turns out that setsockopt(IP_TTL) *does* expect an int, whereas
19:30 <CIA-99> libuv: setsockopt(IP_MULTICAST_LOOP) needs a char. - http://git.io/Og66CQ
19:31 mattgifford joined
19:31 levi501d joined
19:31 <CIA-99> node: 03Ben Noordhuis 07v0.6 * r4b6164a 10/ deps/uv/src/unix/udp.c : uv: upgrade to 332b72e - http://git.io/yBi2sw
19:31 satyr joined
19:31 BillyBreen joined
19:32 warz joined
19:32 warz joined
19:33 Qbix1 joined
19:34 <jaha> tjholowaychuk: still having a problem with sendfile, im trying to serve the html file from a different route, the path is correct but i get a internal server error when I do:
19:34 <jaha> exports.howto = function(req, res) {
19:34 <jaha> console.log(app.settings.pages+'/index.html');
19:34 <jaha> res.sendfile(app.settings.pages+'/index.html');
19:34 <jaha> };
19:35 <jaha> nevermind
19:35 <jaha> forgot the dependencies
19:37 EyePulp joined
19:37 ismell joined
19:37 <isaacs> test please: http://nodejs.org/dist/v0.6.9-RC3/
19:39 plutoniix joined
19:39 <jaha> thanks for all the help
19:41 <ryanrolds> isaacs: On it, making fine so far.
19:41 <isaacs> thanks
19:44 blup joined
19:46 bradleymeck joined
19:49 langworthy joined
19:50 Juan77 joined
19:52 voodootikigod joined
19:54 petersendidit joined
19:55 <CIA-99> node: 03isaacs 07v0.6 * rf19e20d 10/ (8 files in 6 dirs): (log message trimmed)
19:55 <CIA-99> node: 2012.01.27, Version 0.6.9 (stable)
19:55 <CIA-99> node: * dgram: Bring back missing functionality for Unix (Dan VerWeire, Roman Shtylman, Ben Noordnuis)
19:55 <CIA-99> node: - Note: Windows UDP support not yet complete.
19:55 <CIA-99> node: * http: Fix parser memory leak (koichik)
19:55 <CIA-99> node: * zlib: Fix #2365 crashes on invalid input (Nicolas LaCasse)
19:55 <CIA-99> node: * module: fix --debug-brk on symlinked scripts (Fedor Indutny)
19:55 <CIA-99> node: 03isaacs 07v0.6 * r5756d79 10/ src/node_version.h : Now working on 0.6.10 - http://git.io/5IBysA
19:58 StanlySoManly joined
19:59 <ryanrolds> @isaacs: I didn't have problems building. A tiny site using express + redis is running it fine.
20:00 dnolen joined
20:00 <isaacs> great!
20:00 ryah joined
20:00 jergason joined
20:01 SamWhited joined
20:02 Cromulent joined
20:02 satyr joined
20:02 hipertracker_ joined
20:03 fr0stbyte joined
20:03 khrome joined
20:05 ryah joined
20:05 stagas joined
20:08 thalll joined
20:08 <CIA-99> node: 03isaacs 07v0.6 * rca4b91a 10/ ChangeLog : Correct spelling of Ben Noordhuis - http://git.io/Cv7wwA
20:09 mikeal joined
20:10 neurodrone joined
20:12 tilgovi joined
20:14 pradeebv joined
20:16 brngardner joined
20:17 jtsnow joined
20:17 clockwize joined
20:17 JJMalina joined
20:19 tommyvyo joined
20:19 brngardner joined
20:23 fr0stbyte joined
20:24 pradeebv joined
20:25 lzskiss joined
20:26 lzskiss joined
20:26 lbod left
20:27 Ralith left
20:28 innoying joined
20:28 <isaacs> 0.6.9 is live, retweet every tweet! https://twitter.com/nodejs/status/163063697877647360
20:29 cognominal joined
20:30 cfq joined
20:33 kuhrt joined
20:34 kmiyashiro joined
20:36 <markq> anyone know the answer to this: http://stackoverflow.com/questions/9042008/mongodb-node-js-ajax-solution-for-doing-autocomplete-search
20:36 <markq> I'm kind of interested mysel
20:36 <markq> myself*
20:37 ohtogo joined
20:39 catshirt joined
20:41 EvRide joined
20:41 jocafa joined
20:42 Juan77 joined
20:43 cody-- joined
20:44 jacobolus joined
20:45 c4milo joined
20:47 voodootikigod joined
20:49 clockwize joined
20:58 mikeric joined
20:58 binaryjohn joined
20:59 cognominal_ joined
20:59 binaryjohn joined
21:00 stagas joined
21:03 Qbix2 joined
21:04 lwille joined
21:04 jkridner joined
21:07 der| joined
21:08 nerdy joined
21:08 ry4n3 joined
21:09 voodootikigod joined
21:11 JJMalina joined
21:13 cognominal joined
21:14 binaryjohn joined
21:14 der| left
21:15 cognominal_ joined
21:16 hasenj joined
21:18 innoying joined
21:18 isufy joined
21:19 isaacs joined
21:29 cognominal joined
21:29 Qbix2 joined
21:29 jmar777 joined
21:31 samsonjs_ joined
21:31 infynyxx joined
21:32 boehm joined
21:33 Aria joined
21:36 mathmoi joined
21:36 mikeal joined
21:39 vkandy_ joined
21:42 mcluskydodallas joined
21:42 Leemp joined
21:42 langworthy joined
21:43 kmurph79 joined
21:43 omenar joined
21:44 tomyan joined
21:46 cognominal joined
21:46 avalanche123 joined
21:48 apwalk joined
21:51 carlyle joined
21:53 <bbenvie> .. var stack = Object.getOwnPropertyDescriptor(Error(), 'stack').get; stack()
21:53 <catb0t> "Error\n at Error (unknown source)\n at (shell):1:45"
21:53 HardBit joined
21:53 <HardBit> Hi people!
21:55 bartt joined
21:56 fr0stbyte joined
21:57 johnmdonahue left
21:58 <bbenvie> Object.getOwnPropertyDescriptor(Error(), 'stack') is a data descriptor in spidermonkey and an accessor in v8
21:59 orospakr joined
21:59 CrabDude joined
21:59 orospakr joined
22:01 petersendidit joined
22:01 orospakr joined
22:01 sdwrage joined
22:03 jsurfer joined
22:04 samsonjs joined
22:04 pekim joined
22:06 <joshsmith> how can I have socket.io anywhere in my express app, and not just near where 'app' is declared?
22:07 <AvianFlu> first guess: keep it in scope?
22:08 <joshsmith> well, ideally I would be doing any socket-related stuff within some other controller
22:08 <joshsmith> so say some user follows another user. I have to get extra metadata and shouldn't be relying heavily on my front end for those emitters. I should be doing all that within Node and fetching that data there
22:10 markatto left
22:11 <joshsmith> hmm
22:11 Qbix1 joined
22:12 <DEV0_ID> OK. I give. After an hr of searching, I still don't know why a textarea post gives me 'text=word+word+word"... why the pluses? (first nodebeginner app btw - so I'm a complete idiot, but a curious one)
22:12 previsuals_ joined
22:12 <joshsmith> DEV0_ID: sounds like some sort of URL encoding
22:13 <DEV0_ID> yeah, that's what I thought, but I tried bunches...(and exactly copied nodebeginner source). Figured it was some default node thing
22:14 orospakr joined
22:15 dilvie joined
22:15 kmiyashiro joined
22:15 <joshsmith> can I declare multiple sockets.on()?
22:15 <joshsmith> err, sockets.on('connection')?
22:16 brianseeders joined
22:22 Qbix1 joined
22:22 <Aria> Yes.
22:22 <Aria> They run in the order you set them up.
22:23 <joshsmith> Aria: how can I do that in Express without access to the app var?
22:23 <joshsmith> doesn't it need to listen on the app?
22:24 orospakr joined
22:24 <Aria> You can pass it around like any other variable you need a reference to. Where are you getting this 'sockets'?
22:24 <joshsmith> http://socket.io/#how-to-use
22:24 <joshsmith> under the Express example
22:25 <joshsmith> io.sockets.on()
22:25 <Aria> Yeah. You just need to get the 'io' variable into wherever you need it.
22:25 <Aria> Pass it around -- there's no magic.
22:25 <joshsmith> ohhh, I'm an idiot
22:25 <joshsmith> like completely retarded
22:26 <Aria> Hehe. Everyone is so surprised at how SIMPLE node is.
22:26 <Aria> Once you get what's going on (which isn't that far away if you're looking for it), you get this "ohhhh" moment. Sounds like you just had yours.
22:27 <joshsmith> so wait, bear with me for a moment
22:27 <joshsmith> lets say that I've got this controller to which I've now passed in the io var
22:27 <joshsmith> I need to do io.sockets.on('connection', fn) within that
22:27 r04r joined
22:27 <joshsmith> and then operate on the socket itself?
22:28 <joshsmith> does it reconnect the socket somehow?
22:28 <* joshsmith> does not understand
22:28 qsobad joined
22:28 <Aria> No -- it gets the same connection object the other events get, if you're calling it on the same io.sockets.
22:29 <Aria> An eventEmitter just calls each callback that's registered in turn with the same arguments.
22:29 <joshsmith> well, I'm not
22:29 Vennril joined
22:29 <Aria> No? Making a new one?
22:30 fleeky joined
22:30 kmiyashiro joined
22:31 mattly joined
22:32 <joshsmith> yeah
22:32 <Aria> Well, then, don't ;-)
22:32 <joshsmith> so within the controller itself is where I do io.sockets.on()
22:32 <Aria> Wherever you need to set it up.
22:32 StanlySoManly1 joined
22:32 <Aria> I'm not sure what you're trying to achieve, so I can't tell you
22:32 <joshsmith> I don't see how I would possibly pass the sockets themselves around
22:33 neurodrone joined
22:33 nibblebot joined
22:33 <Aria> Hm? io.sockets is just a variable like anything else.
22:34 tommyvyo joined
22:34 <joshsmith> no, I mean the socket in the function callback
22:35 <Aria> Those, too, are just objects you can pass around. What are you trying to do?
22:36 ircdearia joined
22:36 <joshsmith> okay, I need access to the sockets within some of my routes
22:36 <joshsmith> should I wrap *all* my routes within the sockets.on('connection') callback?
22:37 jocafa joined
22:38 <joshsmith> like var route = require('./routes/route')(socket); app.get('/route', route)?
22:38 <joshsmith> and have that nested within the connection callback?
22:39 <Aria> Nah, because that sets up your routes on EVERY callback.
22:40 <Aria> what are you setting up? What are you doing with the io.sockets object?
22:40 <joshsmith> I'm doing an emit
22:40 boltR joined
22:42 <joshsmith> just io.sockets.on('connection', function(socket) { socket.emit('news', data); });
22:42 satyr joined
22:42 <joshsmith> maybe I should specifying something other than the connection event somehow?
22:42 <joshsmith> I really don't know
22:43 <Aria> So what's that got to do with the route?
22:43 <Aria> That's the question, I guess.
22:43 <joshsmith> I'm doing that within the route itself
22:43 <Aria> Ah. Why there?
22:43 <joshsmith> okay, basically here's my scenario
22:43 <joshsmith> a user presses a button, in this case "Follow"
22:43 orospakr joined
22:44 <joshsmith> I'm doing an AJAX post to a route
22:44 seb_m joined
22:44 <joshsmith> if it succeeds, I'm going to emit this event to every client to post to their news feed
22:44 <Aria> Aaah, fun!
22:44 <joshsmith> but I need the data within that route
22:44 <Aria> You need to make a central place for this -- perhaps on the app itself.
22:45 <Aria> app.sockets = io.sockets?
22:45 <Aria> You can get to the app from the request coming in.
22:45 <joshsmith> can I?
22:46 <joshsmith> I always thought app was undefined within routes
22:46 SpaceHorse joined
22:46 <joshsmith> I think I'm misunderstanding though
22:46 <SpaceHorse> hi! :D
22:46 <joshsmith> do you mean to pass the app into the route?
22:47 <Aria> Depends on where you define your routes -- you're putting yours into another file, so they're isolated.
22:47 <Aria> But you can also get to it from the request that the route gets.
22:47 <SpaceHorse> can anyone help me with installing node.js / i have a question
22:47 <Aria> SpaceHorse: Then ask.
22:47 <joshsmith> I can get the app from the request?
22:47 <SpaceHorse> i have mac osx 10.5.8 and downloaded node.js installation package. everything went ok during installation but when i had an error. it seems that i need higher version of my osx system to use noje.js.
22:47 <SpaceHorse> ?
22:47 <joshsmith> I define my routes where I create the app
22:48 <Aria> Yeah, I can't remember the exact path, but it's referenced in the request.
22:48 <Aria> req.something.something
22:48 r04r joined
22:49 <Aria> SpaceHorse: You might. What error?
22:49 bizniz98 joined
22:50 <SpaceHorse> dyld: unknown required load command 0x80000022
22:50 <SpaceHorse> i googled it and found that it cud be cos of my osx system version http://asqueella.blogspot.com/2010/12/dyld-unknown-required-load-command.html
22:50 <joshsmith> Aria: I just searched all of the Express guide and found nothing about app being nested within the req object
22:50 <Aria> Yeah. That sounds about right. You probably have to compile your own, SpaceHorse.
22:51 <Aria> joshsmith: I found it by console.log(req)
22:51 <joshsmith> oh god
22:51 <joshsmith> was it at least named app?
22:51 <Aria> I can't remember, but shouldn't be hard to find.
22:52 <SpaceHorse> i hope it's not cos of it. it's just Leopard, 10.5 is not that old. that's weird. i hope nodejs works with 10.5 / maybe i was wrong in something else
22:52 <joshsmith> found it
22:52 <joshsmith> req.app
22:52 <joshsmith> rofl
22:52 tornad joined
22:53 retornam joined
22:53 <joshsmith> okay, so now what? I've got the io.sockets object here
22:53 <joshsmith> I'm still not sure how I get around just making new connections repeatedly
22:54 <SpaceHorse> Aria: so, what do u think?? ><
22:54 <SpaceHorse> ou/
22:54 <Aria> SpaceHorse: Compile it yourself and see?
22:54 <SpaceHorse> i don't hav XCode)
22:54 <Aria> (10.5 is obsolete, but you're right, not THAT old.)
22:54 <Aria> Download it?
22:55 wankdanker_ joined
22:55 <Aria> joshsmith: Connections from what to what?
22:55 tommyvyo joined
22:55 <Aria> (sounds like you probably want the socket.io broadcast functions)
22:55 <joshsmith> my whole problem is that I'm wrapping everything within sockets.on('connection')
22:55 r04r joined
22:56 <SpaceHorse> nah.... i actually don't want to / all i need is just run 1 file on node.js / to be honest i just don't want to download and install the whole XCode :<
22:56 <joshsmith> which means I'm repeatedly connecting a client multiple times and emitting the same event multiple times over
22:56 <joshsmith> SpaceHorse: I honestly don't know how you do *any* development work without XCode
22:57 <Aria> SpaceHorse: There might be gcc-only packages about -- I've not looked at 10.5 in a while though
22:57 <Aria> joshsmith: Yeah, you probably don't want to do that -- connects in one place, routes in another, and have one talk to the other as needed. You don't want a 1:1 mapping.
22:58 <joshsmith> yeah, I just simply don't understand how to go about that
22:58 <SpaceHorse> Aria: hmmm... i use netBeans and i'm working on javascript game and i need node.js just as a small part of it / for server side . i don't want to install XCode cos i'm not going to use it and i... lol don't have enough space) that sounds stupid but it's how it is. i thought i cud just install node.js and use it
22:58 <joshsmith> doing the connection is all well and good. I can do that right within my app.js
22:58 <Aria> SpaceHorse: Not on an obsolete OS, apparently!
22:59 <joshsmith> but since the connection itself requires a callback, I have no idea how to get at the client's socket from within that route
22:59 <Aria> joshsmith: You're sending to ALL connected clients?
22:59 <joshsmith> yep
22:59 <joshsmith> each and every one
22:59 <joshsmith> it's a global news feed for the time being
23:00 r04r joined
23:00 r04r joined
23:00 <SpaceHorse> .. yea. that sux ... i need need to buy new osx cuz of node.js ... :(
23:00 <catb0t> Exception: SyntaxError: Unexpected identifier
23:01 <Aria> SpaceHorse: You're two revisions back ;-)
23:02 ohtogo joined
23:03 apwalk joined
23:03 <Aria> joshsmith: So make an array, and when a socket.io connection comes in, add it to the array.
23:03 <Aria> When you want to send, iterate over the array and send.
23:03 <SpaceHorse> Aria: yea i know but it's complicated to upgrade the system. i'll better use my pc laptop ...
23:03 tkaemming joined
23:04 <joshsmith> Aria, should I remove items from that array on disconnect?
23:04 <Aria> Yeah, probably, joshsmith.
23:04 <Aria> SpaceHorse: Sure. Or a linux VM.
23:04 <Aria> Or BSD.
23:05 seb_m joined
23:06 kenperkins joined
23:06 <SpaceHorse> yea. maybe i can install windows or something in a virtualBox lol and install node.js there. technologies of the future
23:06 64MAALO1H joined
23:06 <Aria> Yeah.
23:07 <Aria> (Or an OS that doesn't need licensing ;-)
23:07 64MAALO1H left
23:07 r04r joined
23:07 r04r joined
23:09 monteslu joined
23:09 <SpaceHorse> license is not a problem. i can install a pirate OSX. i'm worrying about software after upgrade. it cud stop work. it's a lot of time and blah blah.
23:09 kenperkins joined
23:09 Qbix2 joined
23:10 atdiehm joined
23:11 apwalk_ joined
23:11 <linac> why "this" point to ontimeout context when i call object.method as callback.
23:13 <Aria> linac: Because 'this' is a twitchy devil.
23:14 prettyrobots joined
23:14 apwalk_ joined
23:14 r04r joined
23:14 r04r joined
23:14 cgfuh joined
23:15 <joshsmith> Aria: I think I got it
23:15 <Aria> sweet, joshsmith
23:15 SpaceHorse left
23:15 <joshsmith> I'm gonna try doing some non-test data and see if it actually works
23:15 <linac> Aria, so how to call object.method in callback?
23:16 <Aria> linac: What's "object" and where's it from?
23:17 <linac> object = new function(){this.data = xxx;};
23:17 <linac> object hold data in this context.
23:17 <Aria> Okey. And how's the callback made?
23:18 <linac> setTimeout(object.method, 1000);
23:18 scott_gonzalez joined
23:18 <Aria> Ah, yeah. That'll call it without the context.
23:18 <Aria> Since 'this' is defined by the calling context.
23:18 <Aria> (this is JAvascript's crazy)
23:18 <Aria> So:
23:18 jstash joined
23:18 <Aria> setTimeout(function() { object.method() }, 1000);
23:19 <joshsmith> Aria: do you use caolan/async at all?
23:19 <Aria> joshsmith: No, but it's good stuff.
23:20 avalanche123 joined
23:20 r04r joined
23:21 amigojapan joined
23:22 apwalk_ joined
23:22 d_low joined
23:25 <AvianFlu> joshsmith, caolan/async is good stuff
23:26 r04r joined
23:27 booo joined
23:27 dnolen joined
23:28 orospakr joined
23:32 <joshsmith> why does socket.io take so long to establish a connection?
23:32 <joshsmith> it's like 8 or 9 seconds
23:33 <seb_m> is it using xhr? or websockets?
23:33 <Aria> Sounds like it's failing its first choice of transport and falling back.
23:33 <joshsmith> let me gist output
23:33 <HardBit> xhr is most common for all browsers
23:34 <HardBit> compatibility
23:34 <joshsmith> https://gist.github.com/1692640
23:34 otakutomo joined
23:34 r04r joined
23:34 <joshsmith> that whole process takes 8 or so seconds to run
23:35 <Aria> Yeah. I bet it's trying websocket first, or flashsocket, and then falling back to xhr
23:35 <Aria> flashsocket has an inherent delay since it doesn't report failures well.
23:35 <joshsmith> well that suck
23:35 <joshsmith> s
23:35 otakutomo joined
23:35 <Aria> I believe you can tweak it, or I've heard of people doing so, but I've not done it yet.
23:36 <joshsmith> that's just way too slow
23:37 <joshsmith> if anything happens in those 8 seconds, then that data is just lost
23:40 pradeebv joined
23:40 jsurfer joined
23:41 warz joined
23:41 warz joined
23:43 draginx joined
23:43 <draginx> whats the best way to parse a file (like nginx.conf?)
23:45 <Aria> Write a parser.
23:45 <Aria> nginx.conf is simple, but non-regular, so regular expressions won't quite suffice if you want to do it properly.
23:46 <Aria> What information are you wanting out of it?
23:51 xaq joined
23:52 ajpiano joined
23:54 shiawuen joined
23:54 petersendidit joined
23:56 OmidRaha joined