--- Log opened Wed Aug 01 00:00:02 2012 --- Day changed Wed Aug 01 2012 00:00 < ProLoser|Work> um 00:00 <@bnoordhuis> hah, g-wan 00:00 < ProLoser|Work> https://github.com/proloser/learnode.js 00:00 <@bnoordhuis> read the g-wan forums, it's great entertainment 00:00 < ProLoser|Work> 1 hour long end-to-end tutorial on node 00:00 < ProLoser|Work> assumes 0 knowledge, including walking you through how to install everything 00:01 < ProLoser|Work> takes you all the way to having a deployed (and mvc structured) application online 00:01 <@rvagg> ProLoser|Work: you could consider Ender though we're aiming for a more Node-style build process for v1.0, we're not quite there yet. Check out the 1.0-wip branch if you want to poke around, it's in npm as ender@dev 00:01 < dogmatic69> ProLoser|Work: nice 00:01 < ProLoser|Work> woops wrong link: http://vimeo.com/38136668 00:01 < ProLoser|Work> it's a video, the first link is just my code :) 00:01 < dogmatic69> not bad... "Transaction rate: 1360.41 trans/sec" 00:03 < dogmatic69> My first attempt http://paste.ubuntu.com/1122481/ 00:04 < dogmatic69> siege -b -c 500 node.dev 00:05 <@AviMarcus> siege? 00:05 < dogmatic69> load thingy 00:05 <@AviMarcus> hmm better than ab apache thing? 00:05 <@Lorentz> some kind of benchmark thingy 00:05 < moxie> poop -x 4 -d 284 node.pickles.js 00:05 < dogmatic69> AviMarcus: never tried ab, siege does all sorts 00:06 <@AviMarcus> dogmatic69, node-mysql doesn't have connection pooling built in 00:06 <@AviMarcus> so if you add a second mysql connection it might queue and return stuff faster 00:07 < dogmatic69> AviMarcus: in my app, make something like var clientfoo = mysql.... in the loop? 00:07 <@AviMarcus> simplest way.. make client1 and client2 and randomly choose one for your write 00:07 <@AviMarcus> OH 00:07 <@AviMarcus> WAIT! 00:07 <@AviMarcus> more the USE test into the connection 00:08 <@AviMarcus> ,database: 'test' 00:08 <@AviMarcus> and retry without any other changes ;) 00:08 <@AviMarcus> s/more/move/ 00:09 < dogmatic69> into the connection? you mean inside createServer() 00:10 <@AviMarcus> inside the mysql.createClient({ 00:11 <@AviMarcus> if client is a var in the global scope btw you don't need to pass it through your functions 00:11 < Domenic> Has anyone gotten the npm-www site working on Windows? Failing on process.binding('signal_watcher') 00:12 < dogmatic69> AviMarcus: good point about the scope. I was looking at the docs and dont see how you set up use in the createClient. is it as simple as use: 'foobar' 00:13 < dogmatic69> doh, I guess 'database' would be it 00:13 <@AviMarcus> use? it's "database" I thought. or maybe both. Tell me new benchmark please! 00:13 < dogmatic69> one sec. 00:13 <@AviMarcus> ,database: 'test' 00:13 < dogmatic69> :/ missed that line completely. 00:17 < dogmatic69> AviMarcus: not much difference http://paste.ubuntu.com/1122496/ 00:18 < dogmatic69> slightly higher concurrency, slightly lower trans/s 00:18 <@AviMarcus> are you indexing on ID btw? 00:19 <@AviMarcus> your index might be getting more complicated 00:20 <@AviMarcus> I woulda though it'd be better. 00:20 <@AviMarcus> 'night 00:21 < dogmatic69> id is PRIMARY 00:21 < dogmatic69> truncated before running again 00:22 < dogmatic69> oh, got it much faster on the insert side now with multiple connections 00:23 < dogmatic69> http://paste.ubuntu.com/1122501/ 00:23 < dogmatic69> requests are the same, but mysql filling up faster like this 00:28 < rektide> come back npm 00:32 < rektide> miracle of miracles, modules! 00:32 < rektide> oh how i love them 00:33 < TehShrike> ^ 00:34 < TehShrike> I'm going through npmjs.org withdrawal already 00:34 <@deoxxa> npm install miracles 00:35 < randomachiever> What is the best way for Node.js to communicate with php? 00:38 <@deoxxa> randomachiever: i'd say in a very condescending tone 00:38 < randomachiever> made me LoL 00:39 <@deoxxa> like "yes, php. that's right. you're a real language too." 00:39 <+Niloc> Don't lie 00:39 < randomachiever> Ha! 00:39 <@slickplaid> best way is not to 00:40 < randomachiever> doexxa I have done some research (googling, StackOverflow) and I cant seem to find any solid information on the topic 00:40 <@slickplaid> you could just use http 00:41 < samholmes> So this is why search.npm.org wasn't working earlier. ;P 00:41 < CoverSlide> child_process.spawn 00:41 < _ritch> randomachiever: stdio is probably the simplest way to do it, though it has side effects and constraints 00:41 < samholmes> Updated to the new npm have we. XD 00:41 < samholmes> Must say, the new search.npmjs.org search is i lacking a bit 00:41 <@slickplaid> or, as CoverSlide says, run a child_process instance of php 00:42 < ovaillancourt> randomachiever: zeromq could be a good option 00:42 < randomachiever> slickplaid, I am very much a novice, wouldnt http tie up threads? 00:44 < luckysmack> what is the benefit of using flatironjs over express or another one of the basic frameworks? what about angular.js? 00:44 <@slickplaid> randomachiever: depends on what you're trying to accomplish 00:45 <@slickplaid> I regularly have to build single sign on/oAuth mechanisms that talk to every language under the sun 00:46 <@slickplaid> using http is a nice way to make it so the language doesn't matter (much) 00:46 < randomachiever> Simplest example would be, check if a User is online, Socket.io > Node.js > ask php if the user's online then back 00:46 <@slickplaid> so you can just http.request() to the other server and exchange your message 00:46 < luckysmack> well i have a few projects i would like to work on. one geared more towards live interaction ala socket.io which is more of a strategy/turn based game. mostly for learning. im not aiming to make it anything special. 00:47 < zak_> has anybody had any success bootstraping dojo 1.8 into nod? 00:47 < randomachiever> I think I am confused on the process, I am still reading Node.js docs 00:47 < luckysmack> yea having a good rest based api will be very important for my apps. 00:47 <@AAA_awright> Is Node.js going to upgrade Buffer to Uint16Array? 00:47 < luckysmack> the other i want to do is something for work, mostly highly interactive forms and stats tracking. 00:48 <@slickplaid> brb 00:48 < timeturner> is there something that I can cope paste a library's code into to graphically see the tree structure and how one function is calling another which is calling another etc.? 00:53 < rektide> oh neighborhood barking dog 00:55 < rektide> you sound so hoarse, your cry like that of an existentially horrified once healthy hound, who has been bitten by another zombie dog and in the final clutches of losing your dogmanity 00:55 < rektide> to this i say, fucking give it up, you ill bred mutt 00:57 <@Lorentz> how poetic 01:06 < randomachiever> dir 01:09 < jrajav> ls 01:10 < Robdgreat> lc 01:13 < randomachiever> When creating a new node.js application, what is the ideal path to use? 01:14 <+Niloc> the path of righteousness 01:14 < randomachiever> well said 01:14 <@AvianFlu> the middle path 01:19 < moxie> randomachiever, i take the highway 01:19 < moxie> the very high way 01:20 < randomachiever> I think we all like the very high way 01:21 < moxie> ive done a lot of stuff with node now 01:21 < moxie> I STILL DONT SEE THE FUCKING POINT 01:22 <+Niloc> oh my, such anger 01:22 * Niloc hugs moxie 01:22 <+Niloc> guys, moxie here needs a few hugs 01:23 <@maxogden> this channel gets weird 01:24 < moxie> maxogden, ok 01:25 < moxie> randomachiever, make a directory, and a package.json, and then make a bunch of source code 01:26 < moxie> with stuff like #define INT * $_POST[{vars}]++; 01:26 < moxie> the semicolon is very important 01:27 < moxie> dont forget that 01:27 < moxie> because just this " #define INT * $_POST[{vars}]++" wont work 01:27 < randomachiever> Thanks for the tips 01:27 < moxie> hacker tips! 01:28 < moxie> randomachiever, http://www.youtube.com/watch?v=CRQ3gQ4nUtY 01:28 < Bux> Opme 01:29 < moxie> http://www.youtube.com/watch?v=hi6NFQ54Pl8 01:38 <@AAA_awright> Ugh I wish I had the time to write up a detailed document on the semantics of Node.js callbacks, events, packages, modules. A lot of debate on the mailing lists could be adverted if people just knew what a "callback" is. 01:39 < Benvie> https://gist.github.com/3222502 check that out, briding the node module system into appjs browser context 01:42 < DTrejo> AAA_awright: callbackhell? 01:44 < gicode> I wish the APIs didn't use the term "fork" when they aren't using the system call. 01:48 <@maxogden> http://callbackhell.com 02:12 < gblock> yanush: I am here 02:12 < gblock> yanush: but not sure I can help much :-) 02:13 < gblock> yanush: I can say we're investigating it. Martin works at MS so it's affecting some internal teams :-) 02:13 < yanush> gblock: well for me, for now, the silent workaround is sufficient 02:13 < moxie> http://callbackhell.com 02:13 < yanush> gblock: but I wouldn't wanna go with that for long 02:14 < yanush> gblock: i'm going into production on sunday *eeek* so i hope this will be resolved in a month's time, is that an overrated expectation ? 02:15 < gblock> yanush: well I won't say anything until we can identify the cause :-) 02:15 < yanush> gblock: whats the diff between node 0.7.9 and 0.8.0 ? 02:15 < gblock> yanush: ideal would be that there is some small config switch we can make 02:15 < gblock> yanush: well I would go with 0.8.4 02:16 < gblock> yanush: much more stable / bugs worked out 02:16 < yanush> gblock: this problem exists on 0.8.4 02:16 < gblock> yanush: I don't think this is a node issue 02:16 < gblock> yanush: that's just my initial guess 02:16 < gblock> yanush: as we only hit this in Azure 02:16 < gblock> yanush: but….I could be wrong 02:16 < yanush> gblock: its a hybrid issue for sure, since forking worked on azure in version 0.7.9 02:17 < gblock> yanush: as in Node 0.8.0 we found a bug with accessing UNC shares 02:17 < yanush> gblock: i tried several versions around until I found the exact version it stopped working 02:17 < gblock> yanush: which showed up in Azure and appeared to be Azure specific at first 02:17 < gblock> yanush: that's useful info! Can you reply to that on the thread 02:17 < yanush> gblock: on it 02:18 < gblock> sweet 02:18 <@maxogden> isaacs: stream question for ya. im writing a passthrough stream that takes in json objects and emits out csv row strings 02:18 < gblock> I'd make sure the core team knows this 02:19 < gblock> yanush: because it may in fact be a node issue :-) 02:19 <@maxogden> isaacs: my class is called JSONToCSV so i do jsonStream.pipe(new JSONToCSV()) 02:19 <@maxogden> isaacs: the constructor doesnt get anything passed to it cause it cant do anything until write is called 02:19 < yanush> gblock: its posted, if there is anything else I can do , please lemme know. 02:19 <@maxogden> isaacs: but what do you think of using the constructor as a middleware thing for network purposes 02:20 <@maxogden> isaacs: so for instance jsonStream.pipe(new JSONToCSV(resp)) 02:20 <@maxogden> isaacs: that way if you pass in a server response object the stream can be like 'oh i should set content type and whatever' 02:20 <@maxogden> isaacs: and if you dont it just doesnt do anything 02:20 < gblock> yanush: you've done a lot 02:20 <@maxogden> isaacs: (this is kind of a middleware pattern i guess) 02:20 < gblock> isaacs: can you take a peak at this issue: https://github.com/joyent/node/issues/3779#issuecomment-7416376 02:21 < yanush> gblock: since my entire startup + life are now based on node.js I guess its just the beginning :P 02:21 < gblock> isaacs: it looks like it is in fact related to node though it appeared to be Azure specific. It only started in 0.8.x 02:21 < gblock> yanush: ha ha! hold on. Great to hear you are using Azure…. 02:21 < gblock> yanush: we have a node-azure channel btw…though it's often quiet 02:22 < yanush> gblock: on sunday 10000 request per second will get poured into my app, hope the roof holds :) 02:22 < gblock> lol 02:23 < gblock> shoot me an email, gblock@microsoft.com. Love to hear more about what you are doing. 02:23 < gblock> yanush: don't worry, we've got some really large customers running node right now, that I can't talk about 02:23 < gblock> yanush: in Azure, with literally hundreds of instances 02:23 < gblock> yanush: serving millions of requests 02:24 < yanush> gblock: thats good to hear! :) 02:24 < gblock> yanush: are you using worker or web role? 02:24 < gblock> yanush: worker right? 02:24 < yanush> worker ye 02:24 < yanush> gblock: started with c9 02:24 < gblock> yanush: is it mostly web api type stuff..or is it also a website? 02:25 < gblock> gblock: sweet 02:25 < gblock> gblock: using the azure deployment? 02:25 < gblock> yanush: those were meant for you 02:25 < gblock> :-) 02:25 < yanush> gblock: i am actually writnig their worker role deployment now 02:25 < gblock> yanush: meaning are you using the azure deployment in C9? 02:25 < yanush> gblock: since they only deploy to web roles 02:25 < gblock> yanush: aaah I have been pushing them do it 02:25 < gblock> yanush: it's not hard 02:25 < gblock> yanush: to take what's there and make it support worker 02:25 < yanush> gblock: I'm in contact with a uy named Jen or Jan 02:25 < gblock> yanush: great to hear you are doing it 02:26 < gblock> yanush: jan and I worked together to get the web role support in 02:26 < gblock> yanush: he's great…jan jong boom 02:26 < gblock> yanush: it was an awesome syntergy 02:26 < gblock> yanush: synergy 02:26 < yanush> gblock: yea, hopefully I'll get to it in the next few weeks. 02:26 < gblock> nice! 02:27 < yanush> gblock: about what my system does exactly, I can't really talk about it in this forum (no offense meant to anyone) 02:28 < gblock> yanush: that's why I said email me :-) 02:29 < gblock> yanush: if you like..... 02:29 < yanush> will do 02:40 < moxie> gblock, dont get raped 02:41 < gblock> moxie: ha ha what are you doing here? 02:41 < gblock> moxie: aren't you a PHP guy? 02:41 < gblock> moxie: is that a problem I should worry about in Shanghai? 02:41 < gblock> moxie: ;-) 02:43 < moxie> gblock, how am i a php guy 02:43 < sridatta> anyone familiar with jade templating here? I want to add an html5 video tag but it doesn't seem to support it afaik 02:44 < moxie> sridatta, no but im familiar with google 02:44 < gblock> moxie: I guess I am just getting senile 02:44 < gblock> moxie: I didn't realize you were using node 02:45 < gblock> moxie: assuming this is the moxie I think it is 02:45 < moxie> derp 02:45 < gblock> sriley: does it need to? jade just writes out any tag no? 02:45 < gblock> sridatta: that was meant for you 02:45 < gblock> sridatta: doesn't jade just write out any html tag? I don't think it has a whitelist does it? 02:46 < sridatta> gblock: I tried the obvious syntax based on the other tags but I get "unexpected reserved word" 02:46 < gblock> sridatta: ok, I guess I am wrong then :-) ask @tjholowaychuk on twitter 02:48 < moxie> gblock, http://i.imgur.com/Gz9B0.jpg 02:49 < gblock> @moxie that's you? 02:49 < moxie> yes 02:49 < moxie> DAT MUS-TARD 02:49 < gblock> @moxie: I thought you were a completely different @moxie 02:49 < gblock> :-) 02:50 < gblock> I have a friend @moxie on twitter who lives in Norway 02:50 < moxie> eh 02:50 < moxie> THATS MEE 02:51 < gblock> moxie: are you giving me a hard time? 02:51 < gblock> moxie: ya know what…I am wrong 02:52 < moxie> ohhh hoh ho ooooooooo no you dont 02:52 < moxie> you arent getting out of this one that easily 02:53 < gblock> moxie: watch me :-) 02:53 < moxie> gblock, you mus'nt 02:54 < moxie> im listening to mozart 02:54 < moxie> thinking of you 02:54 * moxie ponders 02:55 < gblock> moxie: so @moxie on twitter is you? 02:56 < moxie> |HELLO 03:00 < WillMarshall> Hey! I'm having a weird little issue between two Node apps 03:00 < WillMarshall> Both are "brunch" seeds, one for Ember.js and one for Angular.js 03:00 < WillMarshall> They both include a package called jade-brunch 03:00 < WillMarshall> However, one of my projects is missing files in the jade-brunch package that the other has 03:00 < WillMarshall> I can't work out why 03:01 < moxie> http://callbackhell.com 03:01 < WillMarshall> Specifically, my jade-brunch folder in the Ember project is missing node_modules/jade-brunch/node_modules/jade 03:02 < Domenic> WillMarshall: it's possible npm is smart enough to not install duplicates, and instead it looks for jade higher up in the hierarcy 03:02 < gblock> moxie: I was confused. I have a friend who works here: http://www.moxiesoft.com/ and for some reason that is where I got moxie. My other friend is not @moxie on twitter. :-) 03:03 < WillMarshall> Domenic: Both have identical lists of packages in ./package.json is the issue 03:03 < WillMarshall> Except for the ember/angular split 03:03 < Domenic> WillMarshall: it doesn't matter, npm wouldn't install duplicates, it would just look for jade higher up in the hierarchy. 03:03 < WillMarshall> Domenic: Interesting 03:04 < WillMarshall> The reason I ask is because launching my server is giving me this: https://gist.github.com/3223257 03:04 < WillMarshall> On the Ember project with the missing dir 03:04 < Domenic> WillMarshall: I'd fix the EADDRINUSE first 03:05 < Domenic> WillMarshall: otherwise it could be that brunch_JavaScriptCompiler_runtime.js is buggy and does not deal well with this situation. 03:05 < WillMarshall> Domenic: Done, but the Jade failure is still there 03:05 < WillMarshall> Hmm 03:05 < mhike0626> hello 03:06 < Domenic> WillMarshall: I'd open a bug with the author of that file. He/she is not handling a legitimate installation structure generated by npm, it seems. E.g. he/she should use `require.resolve("jade/runtime")` instead of `path.resolve("node_modules/jade/runtime.js")` 03:07 < WillMarshall> Domenic: The file doesn't even seem to exist 03:07 < WillMarshall> Which is … odd 03:08 < Domenic> WillMarshall: doesn't it exist in another place in the folder structure? some other node_modules directory? 03:08 < WillMarshall> Domenic: Neither of my apps contains a file or a string matching "brunch_JavaScriptCompiler_runtime" 03:09 < Domenic> WillMarshall: err, that's wierd. I guess brunch or jade-brunch or whatever is generating it? 03:09 < WillMarshall> I'd assume so, yeah 03:09 < Domenic> Icky 03:09 < WillMarshall> I dont' really understand the Node stack, which doesn't help 03:10 < Domenic> Well this is a problem with the brunch stack really 03:10 < Domenic> It's doing crazy things 03:10 < Domenic> If you want to understand the node module system, and node_modules, and the like, start with this: http://nodejs.org/docs/latest/api/modules.html 03:10 < WillMarshall> Well, part of the issue is that I'm not really trying to learn Node right now :/ 03:10 < WillMarshall> I just want Brunch to work properly so I can do a client-side project 03:11 < Domenic> Yeah, but Brunch is a pretty untested and immature framework, so that wasn't a great choice :-/ 03:12 < Domenic> Plus, it's written by a racist, so there's that. 03:12 < WillMarshall> Ah 03:12 < WillMarshall> Links? 03:12 < WillMarshall> I didn't pick it, but I haven't committed to it yet 03:12 < WillMarshall> Is there something more mature and less racist? 03:13 < WillMarshall> npm rebuild fixed it, incidentally 03:13 < Domenic> Oh, nice!! 03:14 < WillMarshall> I think. Hmm. 03:14 < WillMarshall> Might just be that I removed a package 03:14 < Domenic> This might be a good place to learn about frameworks: http://todomvc.com/ 03:15 < WillMarshall> Nah, it was just the removal of the jade-brunch package that "fixed" it 03:15 < moxie> LoL 03:16 < WillMarshall> Manually copying the missing part of the package across also fixes it, but that isn't exactly a nice fix 03:17 < Domenic> As for paulmillr's racist-ness, I think jashkenas was able to get GitHub to delete the actual pull request where things got really ugly, but here's a sampling: https://github.com/paulmillr/coffee-script/commit/443012b5b2bb8fac64abfb9fc06f9cfe98e4ae0e 03:17 < Domenic> (note the branch name also) 03:18 < WillMarshall> Domenic: Thanks for that 03:19 < WillMarshall> What the fuck's up with the english on that? 03:19 < jrajav> WillMarshall: Take a look at the lexer.js diff 03:19 < jrajav> second from the top 03:20 < WillMarshall> Right. So he has a "nigga" branch with a bunch of bad English aliases in it 03:20 < WillMarshall> What a cunt 03:21 < WillMarshall> I assume he's not invited to any more Node.js conferences? 03:30 < DTrejo> who thinks it would be fun to participate in a npm+node contribution hackathon? 03:31 < samholmes> Browserify can make it difficult to develop and debug client-side code because it's all in one file. How can this problem be solved? 03:32 < Domenic> samholmes: here is a solution I hacked together for our project, but it is not really modular enough yet to be easily reusable. https://github.com/NobleJS/WinningJS-build/blob/master/lib/doBrowserify.js 03:32 < samholmes> Maybe with a browserify "development mode" where the bundle loads the individual scripts separately, instead of all compiled together. 03:33 < Domenic> samholmes: there is also https://github.com/substack/wreq but I don't think it's used very much at all, so I bet it falls down on a lot of edge cases 03:34 < samholmes> Domenic: interesting. 03:35 < samholmes> I'd vote for a dev mode for browserify, that way I can just turn it on and off between dev and production environments. 03:35 <@SubStack> --debug 03:35 < samholmes> SubStack: Hmm. Does that load files separately? 03:35 < Domenic> samholmes: the problem is then you have to rewrite your index.html so it uses lots of