[00:00] charlenopires has joined the channel [00:01] HardBit has joined the channel [00:01] tomh has joined the channel [00:01] tanepiper has joined the channel [00:02] smgt has joined the channel [00:02] HardBit has joined the channel [00:03] nym has joined the channel [00:04] mmalecki has joined the channel [00:04] cha0s has joined the channel [00:05] sveisvei has joined the channel [00:05] MarkMenard has joined the channel [00:06] CrabDude: pkrumins: have you ever seen https://github.com/Gozala/streamer? [00:06] disappearedng has joined the channel [00:07] jowop has joined the channel [00:07] lmatteis has joined the channel [00:07] jowop: hello, how can i deny or reject a tcp connection? [00:07] tlrobinson_ has joined the channel [00:08] sx2020 has left the channel [00:08] eastc has joined the channel [00:08] sriley has joined the channel [00:08] dscape has joined the channel [00:09] tjfontaine: jowop: can you be more specific [00:09] jacobolus has joined the channel [00:09] majek has joined the channel [00:09] olegp has joined the channel [00:09] ryanseddon has joined the channel [00:09] jowop: well, when a new connection is opened, i want it to accept or reject the connection based on a condition [00:10] svnlto has joined the channel [00:11] tjfontaine: jowop: in what context, in a tcp server an http server ... a 3rd party module? [00:11] jowop: tcp server, sorry [00:11] jowop: i know i can use .close(), but that means i would have to "poll" my condition and close it when false [00:12] chunhao_ has joined the channel [00:12] wycats has joined the channel [00:12] jowop: returning false on connection event would be nice [00:12] vicapow has left the channel [00:13] iaincarsberg has joined the channel [00:13] tjfontaine: what's the "condition" [00:13] tjholowaychuk: if (something) sock.close()? [00:13] tjfontaine: ya, I don't understand what the issue is [00:13] tjholowaychuk: foo.on('something', sock.close.bind(sock)) [00:13] bofm has joined the channel [00:14] owenb has joined the channel [00:14] jowop: ok so say i want to make a connection to another server, if that is successful, i want to allow the initial connection, if it's not, i want to reject the initial connection [00:14] C0deMaver1ck has left the channel [00:14] cmwelsh has joined the channel [00:15] jowop: basically my issue is that my loadbalancer does not do layer7 checks. i want to make a HTTP request to a server when a new connection is opened to my node.js server. if the HTTP request is successful, i want to accept the connection, if not, reject it. that way my loadbalancer will be able to determine the result of the layer7 request [00:15] heavysixer has joined the channel [00:15] tjfontaine: first off you should probably qualify things better, TCP connection to your node is already made [00:16] justicefries has joined the channel [00:16] niftylettuce has joined the channel [00:17] JKarsrud has joined the channel [00:18] terite has joined the channel [00:18] garann has joined the channel [00:18] jowop: nginx will continue to accept connections even if HTTP requests are not being served out in a timely manner. so my loadbalancer will return a false positive. so i want to have nodejs make sure that HTTP requests are being served out in a timely manner, if not, do not accept TCP connections [00:19] jowop: i mean i guess i can have the nodejs server poll my nginx server and close() when needed, but it seems like it would be easier to just check on every TCP connection from the loadbalancer [00:19] Hosh has joined the channel [00:20] jayniz has joined the channel [00:20] jayniz has joined the channel [00:20] jayniz has joined the channel [00:20] warz has joined the channel [00:20] warz has joined the channel [00:21] svnlto has joined the channel [00:21] skm has joined the channel [00:21] RexM has joined the channel [00:21] jeremyselier has joined the channel [00:22] tomh has joined the channel [00:22] jacobolus has joined the channel [00:22] wolfeidau has joined the channel [00:23] uberbrady: jowop: I think the moment you create a server and tell it to 'listen' - you're going to automatically accept() any connection that comes along. [00:23] neilk_ has joined the channel [00:23] nathanpalmer has joined the channel [00:24] uberbrady: jowop: There doesn't look to be anything at the pre-connection level that allows you to accept or deny the TCP connection based on any bit of logic (IP address for a simpler example) [00:24] tjfontaine: you'd need to bind the netfilter stuff [00:24] strmpnk has joined the channel [00:25] Fabryz has joined the channel [00:25] jowop: yeah i kind of figured node.js was too high level to do what i need :( [00:25] tanepiper has joined the channel [00:25] chunhao_ has joined the channel [00:26] devongovett has joined the channel [00:26] richardr has joined the channel [00:26] uberbrady: But your polling of the back-end server and shutting down your listener when its down will work. [00:26] uberbrady: I think. maybe. [00:26] carlyle has joined the channel [00:26] shedinja has joined the channel [00:27] uberbrady: if you make it http-connect to your server as often as the load balancer checks, it ought to basically do what you want. [00:27] uberbrady: though not as real-time-ey [00:27] replore has joined the channel [00:27] replore_ has joined the channel [00:28] kadnare has joined the channel [00:28] apwalk has joined the channel [00:28] mark_azevedo has joined the channel [00:29] caolanm has joined the channel [00:29] sveisvei has joined the channel [00:30] ryan_stevens has joined the channel [00:30] tjfontaine: it really wouldn't be too bad to do a http://www.netfilter.org/projects/libnetfilter_queue/ with ffi, though probably prefer a native addon [00:31] whatadewitt has joined the channel [00:31] majek has joined the channel [00:32] whatadewitt: hello node users... anyone interested in helping a newbie out with some SIMPLE socket stuff? [00:33] cmr: whatadewitt: Sure thing, just ask some questions [00:33] whatadewitt: thanks cmr! [00:33] whatadewitt: well basically, im looking to create a simple app to just teach myself some basics of node, centered around socket io [00:33] nym has joined the channel [00:33] cmr: Websockets then, and not sockets? [00:34] niftylettuce has joined the channel [00:34] whatadewitt: right now i'm just trying to have users load a page, and each time a user loads the page, i want to emit a message from the server that will just indicate that a new users is visiting the site [00:34] whatadewitt: websockets, yes [00:34] brngardner has joined the channel [00:34] ralph has joined the channel [00:35] StanlySoManly has joined the channel [00:35] relix has joined the channel [00:35] cmr: So you're going to have to write the http handling logic besides this. [00:35] remysharp has joined the channel [00:35] cmr: that uses socket.io to emit the events [00:35] wingie has joined the channel [00:35] fcoury has joined the channel [00:35] Raynos has joined the channel [00:36] whatadewitt: so basically, each time a user is "connecting" to the server, i am doing a socket.emit('new user') and "on that event on the client, i am just printing out "New user joined" [00:36] whatadewitt: that was supposed to be "on" that emit [00:36] cmr: Right [00:36] whatadewitt: so it's pringing out "new user joined" [00:37] whatadewitt: but only on the 1 client [00:37] plutoniiix has joined the channel [00:37] whatadewitt: i was expecting to see that come out every time a new "client" loads (in my case im just opening in a different browser [00:37] cmr: Put your code up on gist.github.com [00:38] lmatteis has joined the channel [00:38] whatadewitt: ooo this is a handy tool! https://gist.github.com/1630041 [00:39] tosh has joined the channel [00:39] cmr: It's like a regular pastebin, but more like github. [00:39] mrb_bk has joined the channel [00:39] whatadewitt: i am brand new to this, and super interested in it... i just need that little "kick" in the right direction [00:40] neilk_ has joined the channel [00:40] cmr: whatadewitt: If you are going to use semicolons, use them everywhere. You are missing one at the end of line 3 in app.js [00:41] cmr: The cool thing about gist is that you can edit it. [00:41] cmr: And not have to send new links etc. [00:41] cmr: Or clone it as a git repo, etc. [00:41] geetarista has joined the channel [00:41] Druide_ has joined the channel [00:41] whatadewitt: ah nice [00:42] neurodrone has joined the channel [00:42] creationix has joined the channel [00:42] whatadewitt: ok so i've added the semi colon (that was just the demo code from the socket.io example pages) [00:42] whatadewitt: ive just modified it slightly [00:42] creationix: anyone know what would cause a "socket hang up" error in the https client? [00:42] cmr: whatadewitt: You want to wrap your code in a window.onLoad, or $(document).ready() [00:42] nibblebot has joined the channel [00:42] apwalk has joined the channel [00:43] cmr: (Clientside, that is) [00:43] whatadewitt: everything? including the socket init? [00:43] cmr: Yes. [00:44] alex__ has joined the channel [00:44] __tosh has joined the channel [00:44] cmr: whatadewitt: Now I'm not all too familiar with socket.io, but I'm pretty sure line 22 only sends the event to the socket that originated the request, not to all of them. [00:44] cmr: (of app.js) [00:45] daleharvey has joined the channel [00:45] whatadewitt: that's what i'm thinking must be happening [00:45] whatadewitt: i'll have to read through more of their documentation [00:46] whatadewitt: and i get my answer simply by scrolling down [00:46] whatadewitt: io.sockets.emit('this', { will: 'be received by everyone'}); [00:46] whatadewitt: i gotta stop trying to cook and code at the same time [00:46] kenperkins: anyone know of any TLS examples with node.js [00:46] kenperkins: (sending data) [00:47] cmr: whatadewitt: I think you want socket.broadcast.emit('new user') [00:47] JasonSmith has joined the channel [00:47] jhbot: 'Upstart script executed via Monit vs. execute process with sudo -u username give different permissions' by Chris F http://stackoverflow.com/q/8903777 (tags: ubuntu, permissions, sudo, monit) [00:47] Nss has joined the channel [00:48] __tosh has joined the channel [00:48] whatadewitt: ah excellent [00:48] jacobolus has joined the channel [00:48] whatadewitt: well thank you smr [00:48] whatadewitt: cmr, you too [00:48] whatadewitt: really appreciate your help [00:48] cmr: np [00:49] sdebaun: @uberbrady: thanks ill try that [00:50] disappearedng has joined the channel [00:52] pizthewiz_ has joined the channel [00:53] eastc: I hope github doesn't blackout for sopa tomorrow [00:53] cmr: I hope they do. [00:54] cmr: The more services near and dear to you that blackout, the more you value your freedom [00:54] [[zz]] has joined the channel [00:54] jxson_ has joined the channel [00:54] cmr: I hear rumours of a 3h facebook blackout [00:54] kadnare: I just searched but I had no luck. Do you guys know if there's a user management module that supports anonymous users? [00:55] adrianF has joined the channel [00:56] dnyy has joined the channel [00:56] jtsnow has joined the channel [00:56] jxson_ has joined the channel [00:57] josh-k has joined the channel [00:57] mattgifford has joined the channel [00:57] sdebaun: ok that didn't help. i still have a horrible bug, where require()'ing a file causes something to fail. is this a node.js newb error? https://gist.github.com/1629776 [00:57] markq: but facebook has servers in foreign countries as well right? [00:58] eee_c has joined the channel [00:58] cmr: markq: you still wouldn't be able to resolve their hostnames [00:58] cmr: And I think PIPA is IP based? Not sure [00:58] Druide_ has joined the channel [00:58] markq: I guess they're going down everyehere then [00:59] flagg0204 has joined the channel [00:59] cmr: But it's just a rumour [00:59] cmr: sdebaun: you know that gist allows multiple files? [01:00] markq: I don't think google would do it [01:00] strevat_ has joined the channel [01:00] markq: either half the world would stop or yahoo would gain a little on their stock [01:00] MarkMenard has joined the channel [01:00] xbayrockx has joined the channel [01:01] charrly has joined the channel [01:01] bradleymeck has joined the channel [01:02] CIA-101: node: 03Ben Noordhuis 07master * rad42a82 10/ configure : build: remove node_debug from config.gypi - http://git.io/cx_DTQ [01:03] webguynow has joined the channel [01:03] k1ttty has joined the channel [01:03] jrbaldwin has joined the channel [01:04] franciscallo has joined the channel [01:05] sdebaun: cmr: ah, i didnt... but one file is more convenient to read, no? [01:06] cmr: sdebaun: I don't think so it at all. It still displays it on one page, but when you reference another file I automatically scroll down to look, and in this case, go "wtf?" ;). Also makes it entirely unusable as a decent git repo, which gist is great for because it supports that [01:06] Vertice: i wrote a partial mixin for underscore - https://gist.github.com/1629491#comments [01:06] sdebaun: ahh ok [01:07] Vertice: learning to use async.js properly was a good thing =P [01:08] sdebaun: @cmr: better? https://gist.github.com/1629776 [01:09] pizthewiz has joined the channel [01:09] cmr: sdebaun: Much better! But I have no idea why it does that, sorry :( [01:09] sdebaun: yeah that is easier to read [01:09] sdebaun: hehehe thanks :) [01:10] alystair: Anyone here know of a bogus data creation thing for populating a DB in development? [01:10] sdebaun: but theres nothing obvious at least [01:10] sdebaun: ? [01:10] erichocean has joined the channel [01:10] cmr: No, but I also have never used mongoose. [01:10] sdebaun: im just a 3-day-noob, and i dont know if im just doing something dumb with node, or if its something i doing wrong in mongoose or nodeunit [01:11] k1ttty has joined the channel [01:11] maletor has joined the channel [01:11] jocafa has joined the channel [01:11] sdwrage has joined the channel [01:12] joshfinnie has joined the channel [01:12] sdebaun: i wonder if its something bizarre that nodeunit is doing [01:13] mateodelnorte has joined the channel [01:13] cmr: ACTION personally prefers tap [01:13] tbranyen: i like bottled [01:14] SubStack: ACTION seconds tap [01:14] SubStack: such a nice api [01:14] isaacs: tap tap [01:14] isaacs: thanks, SubStack. [01:15] isaacs: that fills me with warm joys. [01:15] SubStack: isaacs: I liked it so much I'm pretty much charging people money to use it! :p [01:15] isaacs: i really gotta finish this harness rewrite so that bailout can work properly... [01:15] sorensen__ has joined the channel [01:15] isaacs: SubStack: lol! [01:15] SubStack: to use it on our crazy browser farm [01:15] isaacs: SubStack: bailout right now is WAY too aggressive, which I guess is better than what it was before, which was nothing. [01:17] franciscallo has joined the channel [01:17] heatxsink has joined the channel [01:18] astropirate has joined the channel [01:18] willwhite has joined the channel [01:18] Skaag_ has joined the channel [01:18] astropirate: Hello node peeps [01:18] madhums has joined the channel [01:20] isaacs: hi, astropirate [01:20] enmand has joined the channel [01:20] CrawfordComeaux: Any suggestions for when I want to store a user's Facebook profile photo? (i'm using mongodb) [01:20] tiglionabbit has joined the channel [01:20] flip_digits has joined the channel [01:21] davidwalsh has joined the channel [01:23] Skaag has joined the channel [01:23] astropirate: CrawfordComeaux: when? [01:23] astropirate: o_O' [01:23] eastc has joined the channel [01:24] buttface has joined the channel [01:25] briandh has joined the channel [01:25] Hebo has joined the channel [01:26] westc has joined the channel [01:26] Hebo: Process on/emit doesn [01:27] Hebo: Process on/emit doesn't work within the same process. is there a good way to do events within one process? [01:28] Hebo: or another way to share state [01:29] dodo has joined the channel [01:30] chister has joined the channel [01:30] creationix has left the channel [01:31] tilgovi has joined the channel [01:31] lwille: I have a question concerning v8::Persistent: My factory class has a function list() which asynchronously enumerates connected devices and then calls a callback with an array of Device objects. These objects need to stay connected to the factory class, but that gets always deleted by the garbage collector - although the device objects keep a Persistent handle. Who can help? :) [01:31] scott_gonzalez has joined the channel [01:32] sdebaun: https://github.com/isaacs/node-tap <== tap, instead of nodeunit? [01:32] cmr: Worth a shot, IMO [01:33] sdebaun: man i looked at a dozen different test runners for node [01:33] sdebaun: didnt see that one [01:33] sdebaun: but i saw a TAP plugin for jenkins, thats a generic protocol, not node-specific yes? [01:33] sdebaun: alternative to junit? [01:34] Druide_ has joined the channel [01:35] sdebaun: what else do y'all use for tdd? [01:35] SubStack: tap! [01:35] SubStack: tap is awesome [01:35] sdebaun: ive got jenkins + nodeunit + tobi for browser [01:35] whatadewitt: me again :S, i'm trying to set up a timer to broadcast an event using socket.io every 5 seconds... can anyone give me a hand on where i should put it in my code? [01:35] cgfuh has joined the channel [01:35] sdebaun: so yeah i think ill try swapping out nodeunit with tap [01:36] SubStack: sdebaun: also check out testling [01:36] SubStack: http://testling.com/ [01:36] isaacs: sdebaun: if you've already got nodeunit and it's working, then i'd be hesitant to do some massive switch-over. [01:36] sdebaun: anyone use tobi (http client lib) for browser testing in tap? [01:36] sdebaun: well, its not working, is the problem :) [01:36] SubStack: you can pretty much just take your tap tests and run them in testling since the api is nearly a superset for common uses [01:36] sdebaun: i just started three days ago [01:36] sdebaun: and im stuck at this [01:37] sdebaun: https://gist.github.com/1629776 [01:37] SubStack: and we run all these browsers for you! http://testling.com/ [01:37] SubStack: erm [01:37] SubStack: http://testling.com/browsers/ [01:37] SubStack: and when your code blows up you get a full stack trace! [01:37] sdebaun: not sure if its a mongoose prob or a prob with the test runner [01:38] sdebaun: SubStack -- that looks cool! [01:38] secoif: sdebaun i'm using chai with mocha to do tdd style stuff, works pretty good. I had lots of problems getting running with tobi, ended up just using the request module [01:38] CarterL has joined the channel [01:38] icewhite has joined the channel [01:39] sdebaun: SubStack -- ill remember that for the next internet app i write [01:39] SubStack: pkrumins and I built it! [01:39] MrTopf has joined the channel [01:39] tjholowaychuk: secoif haha yeah sorry about that, i kinda gave up on tobi the jsdom + jquery combo [01:39] tjholowaychuk: is super slow [01:39] tjholowaychuk: one superagent is finished it'll be good for testing that sort of thing [01:40] context: < 1% of the interwebs runs IE 6.0 yet. you can stop testing it [01:40] tjholowaychuk: once* [01:40] context: now* [01:40] flagg0204 has joined the channel [01:41] secoif: ACTION checks out superagent [01:41] SubStack: tjholowaychuk: ryan_stevens is working on a mocha adaptor for testling too, should be pretty great [01:41] secoif: tjholowaychuk yeha superagent looks pretty much what I had in mind [01:42] tjholowaychuk: SubStack nice! [01:42] _Steve_ has joined the channel [01:43] secoif: tjholowaychuk and it'll do multipart file uploads? That's real hassle to do without a browser atm. [01:43] whatadewitt: anyone able to help me out? trying to set up a timeout to broadcast a message every 5 seconds with socket.io? [01:43] tjholowaychuk: secoif yup [01:43] secoif: tjholowaychuk sweet. [01:44] whatadewitt: i currently do it in the "connection" event, but that doesn't work, cause everytime a new user connects, a new timer is being initiated [01:44] secoif: whatadewitt you could ask in #socket.io [01:44] mattgifford has joined the channel [01:44] whatadewitt: secoif zoinks! that will do, thanks! [01:47] criswell has joined the channel [01:48] TN has joined the channel [01:50] jakehow has joined the channel [01:51] boltR has joined the channel [01:51] aGHz has joined the channel [01:52] jxson has joined the channel [01:52] branch has joined the channel [01:53] madhums has joined the channel [01:54] neoesque has joined the channel [01:55] zzo: what the hay: Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead. [01:55] zzo: just upgraded to .6 [01:56] zzo: ~/node_modules exists & has what i need in it [01:56] EriksLV has joined the channel [01:56] abraxas has joined the channel [01:57] cmr: zzo: then you don't need require.paths [01:58] jxson has joined the channel [01:59] zzo: so i upgraded to node .6 to ensure this: https://gist.github.com/1624635 [01:59] marcello3d has joined the channel [02:00] zzo: now worked - however i still get the same error with node .6.7 [02:00] azeroth_ has joined the channel [02:00] postwait has joined the channel [02:01] zzo: same carnage [02:03] dec has joined the channel [02:04] brngardner has joined the channel [02:05] sarlalian has left the channel [02:07] secoif: all hail celeryman [02:07] Druide_ has joined the channel [02:08] maletor has joined the channel [02:11] brianseeders has joined the channel [02:12] dshaw_ has joined the channel [02:13] mattgifford has joined the channel [02:13] mfunkie has joined the channel [02:14] secoif: Anyone know how to check if a net.Server is running? [02:14] secoif: var net = require('net'); var server = net.createServer(); server.close() gives me an "Error: Not running" [02:15] dwhittle has joined the channel [02:16] ap3mantus has joined the channel [02:16] chadskidmore has joined the channel [02:22] a_suenami has joined the channel [02:22] BillyBreen has joined the channel [02:23] cody-- has joined the channel [02:23] ditesh|cassini has joined the channel [02:23] jrbaldwin has joined the channel [02:23] neilk_ has joined the channel [02:24] jbpros has joined the channel [02:25] technel has joined the channel [02:25] nathanpalmer_ has joined the channel [02:26] nicholasf has joined the channel [02:26] meso has joined the channel [02:27] langworthy has joined the channel [02:27] c4milo has joined the channel [02:27] technel: For some reason, I can't get the callback to trigger with async.parallel(). Any thoughts? http://pastie.org/3205063 [02:28] jhbot: 'Running node.js on a port other than port 80' by user600194 http://stackoverflow.com/q/8904409 (tags: javascript, apache, ubuntu-server) [02:28] xbayrockx: ey guys, I'm having trouble getting some basic socket.io stuff to work. I'm expecting my server to output 'Client Connected' when i run http://localhost:8080 in my web browser. I get the Hello Socket Lover html page [02:28] secoif: technel each function you supply to async.parallel needs to fire a callback [02:29] secoif: technel otherwise how does it know the async function is completed? [02:30] Druide_ has joined the channel [02:30] jzacsh has joined the channel [02:30] jzacsh has joined the channel [02:30] qsobad has joined the channel [02:30] technel: secoif: Ahhh yes, of course, thank you! [02:30] secoif: technel http://pastie.org/3205074 [02:30] redir_ has joined the channel [02:30] secoif: technel np [02:31] torm3nt has joined the channel [02:31] secoif: xbayrockx post your code. perhaps ask in #socket.io [02:32] context: xbayrockx: is the websocket connecting ? [02:33] xbayrockx: I don't know. When I connect I told it to output to console [02:33] xbayrockx: And it hasn't [02:33] xbayrockx: Oh sorry, thought I posted my codfe [02:33] xbayrockx: http://pastebin.com/GEd1WFbN [02:33] willwhite has joined the channel [02:35] neilk_ has joined the channel [02:35] context: xbayrockx: so im guessing your not connecting. [02:35] context: xbayrockx: did you try manually connecting from the browser? or see if the js in the page has errors? [02:35] xbayrockx: how do i do both of them [02:36] context: you use the js developers console ? [02:36] xbayrockx: Dont know what it is [02:36] context: so you have no clue if your page is even loading your js ? [02:36] mateodelnorte has joined the channel [02:37] xbayrockx: hmm [02:37] context: xbayrockx: did you get 'client has connected to the server!' ? and where are you looking for this message at [02:38] xbayrockx: oh [02:38] xbayrockx: im not even running the index.js [02:38] xbayrockx: lol [02:38] xbayrockx: Fuck, how do I run that? [02:38] xbayrockx: on the client [02:38] context: ... you should probably learn html/js before tackling socket.io [02:39] xbayrockx: .. [02:39] xbayrockx: So you aren't going to help [02:39] context: no, this isnt school. and this isnt #basic_html_101 [02:39] context: or #html for that matter [02:39] xbayrockx: Next [02:40] context: i like how you expect everyone to just spoon feed you [02:40] xbayrockx: You're an idiot [02:40] xbayrockx: I'm obviously trying to learn [02:40] mark_azevedo has joined the channel [02:41] isaacs: i am so unreasonably happy about node-glob being all js now. [02:41] westc: ping @isaacs. *cough* ^^ [02:41] context: xbayrockx: no. you are asking questions that ANY html book made within the last decade will answer. as well as googe. [02:41] counterbeing has joined the channel [02:41] isaacs: ACTION hands westc a lozenge [02:41] SubStack: bwahaha I'm now using replicant to mirror in-memory sessions across lots of servers [02:42] context: xbayrockx: i just googled "how do i include javascript in an html page" and second result gave me an answer. [02:42] SubStack: later I'll roll up this token system into its own module [02:42] SubStack: such win [02:42] context: xbayrockx: and so did the first result. and the third [02:42] xbayrockx: im just trying to copy code from a tutorialk [02:42] xbayrockx: and get it to work [02:42] context: so you are not trying to learn [02:42] xbayrockx: Yes I am, I'm trying to get an environment that works first [02:42] context: so go bother other people who dont care. cause you *obviously* dont either [02:42] isaacs: xbayrockx: node is a server-side platform. [02:42] context: xbayrockx: being spoon fead does not teach you anything. [02:43] xbayrockx: Wow, you are godly. You somehow manage to know my thoughts and intentions without me telling you. Actually I told you, but you seem to know otherwise [02:43] context: xbayrockx: and taking on socket.io is hardly the best way to learn html... or js [02:43] context: xbayrockx: did you become a mechanic by ripping apart a $1M nascar ? NO. you use a pile of shit and learn the basics first. [02:44] flagg0204 has joined the channel [02:44] westc: context++ [02:44] catb0t: context now has 1 beer [02:45] context: xbayrockx: basics. THE most basic tool of a developer is what we call "GOOGLE" [02:45] context: xbayrockx: if you have to ask a question, and i can type in your question into google verbatim (or very similar to) and find the answer in the first result, you dont have to waste yours OR our time. [02:46] xbayrockx: Cool [02:46] xbayrockx: Got it working, thanks [02:46] westc: context++ [02:46] catb0t: context now has 1 beer [02:46] westc: context+=2 [02:46] context: damn. catb0t is drinnking my beers :( [02:46] catb0t: drinnking beers [02:46] context: hahahaha ! [02:47] westc: lol [02:47] jkridner__ has joined the channel [02:48] context: xbayrockx: being a developer is NOT knowing the answer to everything. when you realize this (and what it really is,) you will understand why people like you asking the questions you ask pisses me off so much. [02:48] context: not, ? i think [02:48] superlou has joined the channel [02:48] westc: print 'hello' [02:48] westc: .. print 'hello' [02:48] catb0t: Exception: SyntaxError: Unexpected string [02:48] cmr: context: you must be allergic to help vampires [02:48] westc: .. print ('hello') [02:48] catb0t: "hello" [02:48] cmr: .. print('hello') [02:48] catb0t: "hello" [02:49] context: xbayrockx: BUT. if you want to pay me to google for you, and read books for you, by all means ill be very nice and answer all your questions [02:49] westc: how do I make it output without the quotes [02:49] westc: show('hello') [02:49] superlou: Is there any sort of standard way to organize a client app in a nodejs project? There's a lot of info on people using backbonejs models on the serverside (since I guess that's the cool thing to do), but I can't find much on how to organize a vanilla backbonejs client app served from nodejs [02:49] westc: .. show('hello') [02:49] catb0t: Exception: ReferenceError: show is not defined [02:49] cmr: westc: You can't. [02:49] cmr: .. process.stdout.write('foo') [02:49] catb0t: Exception: ReferenceError: process is not defined [02:49] cmr: Yeah [02:50] westc: .. function beers(name, amount) { print(name + 'now has " + amount + ' beers) } [02:50] catb0t: Exception: SyntaxError: Unexpected identifier [02:50] westc: .. function beers(name, amount) { print(name + 'now has " + amount + ' beers') } [02:50] catb0t: Exception: SyntaxError: Unexpected identifier [02:50] westc: .. function beers(name, amount) { print(name + 'now has ' + amount + ' beers') } [02:50] catb0t: [02:50] cmr: westc: wrong quote type [02:51] siddhion has joined the channel [02:51] westc: beers(context,30) [02:51] westc: beers(context,30); [02:51] westc: hmm [02:51] cmr: .. beers('context', 30) [02:51] catb0t: "contextnow has 30 beers" [02:51] westc: .. function beers(name, amount) { print(name + ' now has ' + amount + ' beers') } [02:51] catb0t: [02:51] cmr: westc: Jeez, be more careful with your strings. [02:51] westc: beers('context',30); [02:52] cmr: You need the .. before [02:52] westc: .. beers('context',30); [02:52] catb0t: "context now has 30 beers" [02:52] westc: way too many missed attempts lol [02:52] cmr: I'd say... [02:52] westc: beers('cmr',10) [02:52] westc: .. beers('cmr',10) [02:52] catb0t: "cmr now has 10 beers" [02:53] cmr: westc: Now have it keep state per person ;) [02:53] pradeebv has joined the channel [02:53] westc: array time [02:53] westc: or object [02:54] technel: One more dumb question about async.parallel... My callbacks aren't getting triggered: http://pastie.org/private/ihybtitf9poal98k5ugia -- Any ideas? [02:54] redir has joined the channel [02:54] etgregor has joined the channel [02:55] teadict: is Backbone REALLY worth it? [02:55] ap3mantus has joined the channel [02:56] tuhoojabotti: compiling 0.7.0 seems to be taking longer than any version this far [02:56] qsobad has joined the channel [02:56] technel: secoif: Don't suppose you are still around? [02:56] jkridner____ has joined the channel [02:57] flagg0204 has joined the channel [02:57] siddhion: hello. getting started with express.js and going throug hthe quick start. i'm at the part where i have to install dependencies. when i go into my app dir and do `npm install -d` I get an error => http://pastie.org/3205152 [02:58] cmr: .. var beer = { persons: {}, beers: function (name, num) { var already = persons[name] || 0; already += num; persons[name] = already; print(name + ' now has ' + already + ' beers'); }} [02:58] catb0t: [02:58] siddhion: Any ideas whats wrong? [02:58] cmr: .. beer.beers('westc', 3) [02:58] catb0t: Exception: ReferenceError: persons is not defined [02:58] cmr: D'oh [02:58] cmr: .. var beer = { persons: {}, beers: function (name, num) { var already = this.persons[name] || 0; already += num; this.persons[name] = already; print(name + ' now has ' + already + ' beers'); }} [02:58] catb0t: [02:58] cmr: .. beer.beers('westc', 3) [02:58] catb0t: "westc now has 3 beers" [02:58] cmr: .. beer.beers('westc', 3) [02:58] catb0t: "westc now has 6 beers" [02:59] westc: sweeeet [02:59] flagg0204 has joined the channel [02:59] jkridner_____ has joined the channel [03:01] rwaldron has joined the channel [03:01] tuhoojabotti: Whee [03:01] context: .. beer.beers('context', 2) [03:01] catb0t: "context now has 2 beers" [03:01] mdel has joined the channel [03:01] mcluskydodallas has joined the channel [03:01] tuhoojabotti: compile done [03:01] context: im taking my beers back [03:01] westc: beer.beers('context',1) [03:02] westc: .. beer.beers('context',1) [03:02] catb0t: "context now has 3 beers" [03:02] cmr: .. context('context', -1000) [03:02] catb0t: Exception: ReferenceError: context is not defined [03:02] tuhoojabotti: :D [03:02] context: :( [03:02] cmr: .. beer.beers('context', -1000) [03:02] catb0t: "context now has -997 beers" [03:02] cmr: There we go [03:02] halfhalo: DENIED [03:02] cmr: Don't know how I mixed that up but I did... [03:02] context: thats gonna be a hefty tab [03:02] westc: .. beer.beers('context',3) [03:02] catb0t: "context now has -994 beers" [03:02] cmr: .. var beer = { persons: {}, beers: function (name, num) { var already = this.persons[name] || 0; if (num < 0) num = 0; already += num; this.persons[name] = already; print(name + ' now has ' + already + ' beers'); }} [03:02] catb0t: [03:02] cmr: .. beer.beers('context', -1000) [03:02] catb0t: "context now has 0 beers" [03:02] context: cmr: so much beer will take you out of context [03:02] tprice has joined the channel [03:03] tuhoojabotti: I see what you context. [03:03] secoif: technel yeo [03:03] tprice: is there a module to upload files say to php? [03:03] cmr: tprice: Why wouldn't it just be an HTTP POST? [03:04] pizthewiz has joined the channel [03:04] westc: beer.beers('cmr',50) [03:04] westc: .. beer.beers('cmr',50) [03:04] catb0t: "cmr now has 50 beers" [03:04] technel: secoif: I'm starting to think this one is a Mongoose mistake, but can you spot the error? http://pastie.org/private/ihybtitf9poal98k5ugia [03:04] blueadept: does anyone have a list of all the SOPA supporters that are up for reelection in 2012? [03:04] grom358 has joined the channel [03:04] tprice: cmr: its a bit more then that it has to be a multipart form post [03:05] secoif: tprice try "file-uploader" [03:05] disappearedng has joined the channel [03:05] cmr: tprice: Yes, but PHP isn't special when it comes to that [03:05] grom358: how can I load a json file into a variable? [03:06] westc: beer.beers('',50) [03:06] westc: .. beer.beers('',50) [03:06] catb0t: " now has 50 beers" [03:06] westc: .. beer.beers(,50) [03:06] catb0t: Exception: SyntaxError: Unexpected token , [03:06] cmr: .. beer.beers(50) [03:06] catb0t: "50 now has NaN beers" [03:06] cmr: Heh [03:07] nibblebot has joined the channel [03:07] secoif: technel try doing a console.log(arguments) in the final callback [03:08] cmr: westc: I'd add error checking but it doesn't matter and I'm tired of programming in one line on irc :P [03:08] EhevuTov has joined the channel [03:08] tprice: secoif: file-upload is client based. [03:08] tprice: im looking to upload a file from node not the client [03:08] secoif: tprice 'file-uploader' [03:08] westc: .. beer.beers('He used to have 100 beers, but after finishing half of them he',50) [03:08] catb0t: "He used to have 100 beers, but after finishing half of them he now has 50 beers" [03:08] kerang has joined the channel [03:09] cmr: .. while(true) {} [03:09] catb0t: Timeout Error [03:09] xbayrockx: Socket.IO is so shit [03:09] secoif: hahahaha [03:09] westc: lolol [03:09] xbayrockx: I can't find basic client/server code that works [03:09] xbayrockx: ANYWHERE [03:09] russfrank: xbayrockx: lol. [03:09] jkridner_ has joined the channel [03:09] technel: secoif: You mean where I have console.log('TEST_FINAL') ? [03:09] secoif: technel yes [03:10] cmr: xbayrockx: ... what do you mean [03:10] russfrank: its literally right there on http://socket.io/ [03:10] xbayrockx: Find me client and server code, so I can copy and paste, It must work. [03:11] technel: secoif: Still just get "TEST1a", "TEST1b" in the console. Which makes sense because the database callbacks aren't being called, so it should never get to the final callback. [03:11] westc: print(beer.beers('xbayrockx used to have 0 beers,',0) + ', and will always have 0 beers') [03:11] westc: .. print(beer.beers('xbayrockx used to have 0 beers,',0) + ', and will always have 0 beers') [03:11] catb0t: Exception: ReferenceError: beer is not defined [03:12] westc: .. print(beer.beers('xbayrockx used to have 0 beers,',0); + ', and will always have 0 beers') [03:12] catb0t: Exception: SyntaxError: Unexpected token ; [03:12] cmr: .. var beer = { persons: {}, beers: function (name, num) { var already = this.persons[name] || 0; if (num < 0) num = 0; already += num; this.persons[name] = already; print(name + ' now has ' + already + ' beers'); }} [03:12] catb0t: [03:12] cmr: There you go ;) [03:12] westc: .. print(beer.beers('xbayrockx used to have 0 beers,',0) + ', and will always have 0 beers') [03:12] catb0t: "xbayrockx used to have 0 beers, now has 0 beers"; "undefined, and will always have 0 beers" [03:12] secoif: technel drop the {} in the find call? [03:12] cgfuh has joined the channel [03:13] westc: .. print(beer.beers('xbayrockx used to have 0 beers,',0), ', and will always have 0 beers') [03:13] catb0t: "xbayrockx used to have 0 beers, now has 0 beers"; undefined ", and will always have 0 beers" [03:13] apwalk has joined the channel [03:13] westc: what's the undefined for [03:14] westc: .. print('sigh') [03:14] catb0t: "sigh" [03:14] cmr: westc: beer.beers prints, it doesn't return. You are getting the output of beer.beers plus the printed return value [03:14] ryan_stevens has joined the channel [03:14] technel: secoif: Tried that too. I dropped async and did just http://pastie.org/3205190 , but still nothing. I swear this was working before. I logged db.Feedback.find, and it says the function exists... [03:15] secoif: technel oh. you're probably not connected to the db [03:15] technel: secoif: uuuugggghhhh. I switched development environments, and you're exactly right. I got caught up in async and forgot about that, hah, thanks so much! [03:15] westc: yea, just noticed that [03:16] secoif: technel np [03:17] xbayrockx: Nope, that code doesn't work [03:18] jkridner_ has joined the channel [03:18] westc: beer.persons['cmr'] [03:18] westc: .. beer.persons['cmr'] [03:18] catb0t: [03:19] avalanche123 has joined the channel [03:19] context: 21:10 xbayrockx| Find me client and server code, so I can copy and paste, It must work. [03:19] westc: .. print(beer.persons['cmr']) [03:19] catb0t: undefined [03:19] context: spoken like a person that really wants to learn [03:19] context: xbayrockx: you think the first time any of us touched node with something like socket.io it worked right away? [03:19] xbayrockx: heres my code, edited slightly [03:19] xbayrockx: http://pastebin.com/UbZp6CQT [03:19] context: NO! [03:19] context: its called debugging, its called trouble shooting [03:19] context: its called being a developer [03:20] xbayrockx: Should definitely work, according to russell_h [03:20] xbayrockx: russfrank [03:20] westc: beer.beers('context is going for infinity beers, but',100) [03:20] context: xbayrockx: cool you have code. now.. did you get get your alert() ? [03:20] westc: .. beer.beers('context is going for infinity beers, but',100) [03:20] catb0t: "context is going for infinity beers, but now has 100 beers" [03:20] xbayrockx: No I didn't [03:20] context: there you go... your crap is already broke [03:20] xbayrockx: I get that alert if I put the alert box at the top though, before anything else. [03:20] context: why not pull up the error log and see why not ? [03:20] xbayrockx: before the socket code [03:20] context: xbayrockx: first get your alert working.... [03:21] context: you shouldn't even be looking at the socket.io code [03:21] context: if you cant get alert() to work you will never get socket.io to work [03:21] context: simple as that. [03:21] bofm has joined the channel [03:21] Provito has joined the channel [03:21] xbayrockx: My warning works if I put it before the socket code [03:21] xbayrockx: Which means the socket code is stopping execution [03:21] context: stopping ? [03:21] xbayrockx: I don't know how to pull up the error code? [03:21] context: DID YOU LOOK AT THE GOD DAMN JS CONSOLE ? [03:21] xbayrockx: Error log i mean [03:21] context: your brwoser, has a javascript console [03:21] context: it gives you errors when shit is broken [03:22] westc: .. print('context is ON A ROLE!!!') [03:22] catb0t: "context is ON A ROLE!!!" [03:22] captain_morgan has joined the channel [03:22] westc: .. print('context is ON FiYa!!!') [03:22] rwaldron has joined the channel [03:22] catb0t: "context is ON FiYa!!!" [03:22] xbayrockx: I see, interesting [03:22] jsurfer has joined the channel [03:22] xbayrockx: It says IO is not defined [03:22] context: YEY! and not surprising. [03:22] lwille: haha [03:23] xbayrockx: Suprising to me, seeing as though I copied the code from Socket.IO website [03:23] westc: .. print('socket.io decides to secretly remove itself from xbaryrockx's system') [03:23] context: could have told you what the error was gonna be as soon as i pulled up the pastie [03:23] catb0t: Exception: SyntaxError: Unexpected identifier [03:23] context: xbayrockx: url? [03:23] westc: .. print('socket.io decides to secretly remove itself from xbaryrockx\'s system') [03:23] context: nm [03:23] catb0t: "socket.io decides to secretly remove itself from xbaryrockx's system" [03:23] mfunkie: So uh, xbayrockx, is the socket.io.js file in the path relative to the index.html? [03:24] westc: .. print('socket.io cannot handle the ignorance') [03:24] catb0t: "socket.io cannot handle the ignorance" [03:24] xbayrockx: Apparently that code should make my server handle the Socket.IO file [03:24] context: xbayrockx: and you did not copy that from socket.io's site [03:24] context: xbayrockx: the site shows nothing of app = require('http') [03:24] westc: .. print('node is preparing to uninstall :O') [03:24] catb0t: "node is preparing to uninstall :O" [03:24] westc: .. print('mayday, mayday!!!') [03:24] xbayrockx: http://socket.io/#how-to-use [03:24] catb0t: "mayday, mayday!!!" [03:25] bicranial has joined the channel [03:25] westc: .. print('node is taking the next flight out...') [03:25] catb0t: "node is taking the next flight out..." [03:26] xbayrockx: So no, it's not mfunkie [03:27] astropirate has joined the channel [03:27] lwille: xbayrocks, you should be able to open http://localhost/socket.io/socket.io.js [03:27] xbayrockx: Yes, I can [03:29] secoif: .. setInterval(function() {print('hello')}, 1000) [03:29] catb0t: Exception: ReferenceError: setInterval is not defined [03:29] secoif: bah [03:29] lwille: your sample works fine here [03:29] xbayrockx: How did you test it ? [03:30] secoif: xbayrockx perhaps you're not running latest node, or latest socket.io? [03:30] westc: */ [03:30] westc: how do you make comments in the irc [03:30] lwille: xbayrockx just pasted the code from http://socket.io/#how-to-use [03:30] xbayrockx: v0.6.7 [03:30] apwalk_ has joined the channel [03:31] xbayrockx: That's my version of Node, and socket came with it [03:31] lwille: the only thing I changed is the port number [03:31] westc: xbayrockx: STOP polluting the channel with your immature questions that can be answered via learning the foundations of JS [03:31] xbayrockx: So how do you know that it worked? [03:32] westc: the name of the channel is not #spoonfeed.node.js [03:32] lwille: :D [03:32] lwille: nice @westc [03:32] xbayrockx: I commented that there was no single example of basic Socket.IO code that worked [03:33] lwille: well, you maybe should have done this in #socket.io [03:33] xbayrockx: I invite you to try and receive a response there [03:33] lwille: but as I just told you, the samples are working fine [03:34] westc: xbayrockx: not to be rude but programming in general involves a certain amount of cleverness. without that...you're going to have issues [03:34] westc: assuming you already have a solid foundation of the language you're working with [03:34] westc: if you don't even have that then forget it [03:35] jetienne__ has joined the channel [03:35] mfunkie: Samples worked fine for me, changed the port is the only thing [03:35] xbayrockx: I changed to http://localhost/socket.io/socket.io.js and it seems to work [03:36] xbayrockx: Why would that be? [03:36] secoif: xbayrockx what did you change it from?> [03:36] xbayrockx: As in, I thought my code should work as is, given that it came from Socket.IO website [03:36] xbayrockx: socket.io/socket.io.js [03:36] secoif: oh [03:36] secoif: yeah that wasn't going to work [03:37] lwille: well, at least in your pastie the url was correct :) [03:37] maletor has joined the channel [03:37] secoif: xbayrockx I believe the js file contains some smarts as to how to connect to your socket server, isn't just a static js file [03:38] jerrysv has joined the channel [03:38] secoif: xbayrockx as in, I think it needs to be served from the location it's connecting to [03:38] warz has joined the channel [03:38] warz has joined the channel [03:38] xbayrockx: oh [03:38] secoif: xbayrockx so the example WAS working, just not how you intended [03:39] xbayrockx: so they give me code, but didnt tell me that that i run the "client" code on my pc? [03:39] lwille: nope, the file is just static, but socket.io only registers a handler for that exact url. [03:39] xbayrockx: that i dont* [03:39] secoif: lwille ahh [03:39] secoif: that makes sense. [03:39] MrTopf has joined the channel [03:39] lwille: that's why you give the "app" object to socket.io [03:40] lwille: you can change the path though, but I'd always rather stick to the conventions [03:40] xbayrockx: How do I get the code they give to work for me? [03:41] marcello3d has joined the channel [03:42] ec has joined the channel [03:42] westc: I wish @isaacs was here to see this [03:42] westc: ..... [03:42] lwille: :) [03:42] xbayrockx: Cool it works [03:42] xbayrockx: I just need to type localhost in the browser and that's it [03:42] russfrank: ;P [03:42] secoif: xbayrockx awesome [03:42] westc: FINALLY [03:43] lwille: LOL [03:43] secoif: guys stop being assholes. [03:43] lwille: what did you type into your browser before? :) [03:43] xbayrockx: i was typing in the path to the index.html [03:43] secoif: we all ask stupid questions when we don't understand how something works [03:44] lwille: secoif++ [03:44] alystair: now to figure out how the alert() statement set my neighbors dog on fire. [03:44] westc: where's catb0t [03:44] catb0t: where's cb defined [03:45] secoif: and it's probably just evidence that socketio needs better documentation [03:45] westc: secoif++ [03:45] alystair: what's the recommended site for pasting stuff, pastebin.ca isn't resolving 50% of time [03:45] secoif: alystair i use gist so it's easy to track the pastes down again later [03:46] lwille: well, I think they can assume that the user knows that a) he's using a network protocol b) this protocol is HTTP which is c) normally handled via a browser [03:47] secoif: alystair perhaps you need to set up local dns [03:47] lwille: http://pastie.org http://pastebin.com always work fine for me [03:47] Swimming_Bird has joined the channel [03:48] xbayrockx: Is there actually documentation for Socket.IO that I can read? [03:48] xbayrockx: For example what the emit method is [03:48] lwille: xbayrockx https://github.com/learnboost/socket.io/wiki/ [03:48] deedubs has joined the channel [03:49] thinkjson has joined the channel [03:50] TheLifelessOne has joined the channel [03:50] qsobad has joined the channel [03:50] TheLifelessOne: is it possible to convert a large stream into a buffer? [03:50] khrome has joined the channel [03:51] wdperson has joined the channel [03:51] thinkjson has left the channel [03:51] lwille: TheLifelessOne, the stream should already emit Buffers - (why) do you want to aggregate them? [03:52] TheLifelessOne: wait, they emit buffers? [03:52] lwille: afaik [03:52] xbayrockx: There is no documentation there that I can see [03:52] Vennril has joined the channel [03:52] lwille: http://nodejs.org/docs/v0.4.7/api/streams.html#readable_Stream -- "The 'data' event emits either a Buffer (by default) or a string if setEncoding() was used." [03:52] jtsnow has joined the channel [03:52] TheLifelessOne: I see. [03:53] secoif: xbayrockx if you're looking for api docs, you probably won't find them for most node modules [03:53] secoif: xbayrockx generally you get usage examples and source code. [03:54] lwille: xbayrockx take a look at the examples at https://github.com/LearnBoost/socket.io [03:54] secoif: xbayrockx once you know a bit of node, you learn to read other's code. test cases are also a really good place to see how shit works [03:54] TheLifelessOne: What's wrong with the API docs? [03:54] _unary has joined the channel [03:55] azeroth_ has joined the channel [03:56] devongovett has joined the channel [03:56] secoif: TheLifelessOne there are none afaik for socketio [03:57] TheLifelessOne: I see [03:57] azeroth_ has joined the channel [03:57] lwille: gn8. [03:57] secoif: lwille seeya [03:58] lwille: yeah :) if a V8 programmer comes by, tell him I could use some help, too ^^ [03:58] sharkbird has joined the channel [04:00] caludio has joined the channel [04:00] tkaemming has joined the channel [04:01] kerang: what's the correct way of handling http client error? [04:01] kerang: it doesn't seem to emit any error event [04:01] azeroth_ has joined the channel [04:02] k1ttty has joined the channel [04:03] hemanth: is there a way to get responseText? [04:03] jtsnow has joined the channel [04:03] hemanth: res.statusCode gives the status code, what about the text [04:04] tuhoojabotti: hemanth: Make an object that maps them? :P [04:04] jhbot: 'how about node.js change its api?' by Magic http://stackoverflow.com/q/8905022 [04:04] tuhoojabotti: and don't forget 418 [04:06] TheLifelessOne has left the channel [04:07] hemanth: tuhoojabotti, heh heh that's the last option [04:07] kborchers has left the channel [04:07] segv has joined the channel [04:09] oleyb has joined the channel [04:10] branch: I'm new to this stuff... I am trying to use the socket.io module, on the client side I keep getting "io is not defined" - any clues ? [04:10] context has joined the channel [04:10] jxie_ has joined the channel [04:12] buttface has joined the channel [04:13] pquerna has joined the channel [04:14] josh-k has joined the channel [04:14] branch: solved [04:14] githogori has joined the channel [04:14] sdwrage has joined the channel [04:16] strevat_ has joined the channel [04:17] FireFly has joined the channel [04:17] cognominal has joined the channel [04:18] brianloveswords has joined the channel [04:18] paulbaumgart has joined the channel [04:18] pquerna has joined the channel [04:19] context has joined the channel [04:19] confoocious has joined the channel [04:19] confoocious has joined the channel [04:19] apwalk has joined the channel [04:20] rphillips has joined the channel [04:20] phire_ has joined the channel [04:20] tuhoojabotti: secoif: You beat me to it! [04:23] secoif: tuhoojabotti should we put money on accepted answer? [04:23] brngardner has joined the channel [04:23] tuhoojabotti: You won, you has :D and I have :) [04:23] tuhoojabotti: Why would I say that [04:24] tuhoojabotti: asdf, time for math. [04:24] hemanth: I'm a teapot [04:25] peregrine81 has joined the channel [04:25] tuhoojabotti: hemanth: BREW mocca [04:25] jrbaldwin has joined the channel [04:25] tuhoojabotti: http://dev.tuhoojabotti.com/api/tea [04:25] hemanth: tuhoojabotti, out of stock :D [04:25] tuhoojabotti: Damn it. [04:25] jhbot: 'Node.js - core cluster module' by jeffreyveon http://stackoverflow.com/q/8905162 (tags: cluster) [04:25] ovnicraft has joined the channel [04:26] hemanth: holy goodness, svg master! [04:26] kborchers has joined the channel [04:26] hemanth: jhbot, source [04:26] tuhoojabotti: hemanth: Googled it [04:26] hemanth: heh heh ok! :) [04:26] tuhoojabotti: :D [04:26] MUILTR has joined the channel [04:27] hemanth: would a npm be worth, for http response text? [04:27] ChrisPartridge has joined the channel [04:28] tuhoojabotti: secoif: !!! [04:28] tuhoojabotti: I got a vote :D [04:28] secoif: pff [04:28] tuhoojabotti: It's my first vote :3 [04:28] agnat_ has joined the channel [04:28] hemanth: ^_ ^ [04:29] secoif: tuhoojabotti hahah I think you sounded less condescending [04:29] jocafa has joined the channel [04:29] markdaws has joined the channel [04:31] markdaws has joined the channel [04:33] tuhoojabotti: secoif: Also your avatar creeps people. [04:33] perezd has joined the channel [04:33] tuhoojabotti: ":D" [04:34] secoif: tuhoojabotti hahah [04:35] secoif: I thought I looked purdy [04:35] tuhoojabotti: secoif: Yes, in a creepy way. [04:35] tuhoojabotti: ♡ [04:36] kmiyashiro has joined the channel [04:36] secoif: tuhoojabotti ahha my girlfriend hates it too. honestly i mainly keep it just to annoy her [04:36] josh-k has joined the channel [04:37] crodas has joined the channel [04:38] satyr has joined the channel [04:38] apwalk_ has joined the channel [04:38] tuhoojabotti: I approve of your decision. [04:39] apwalk_ has joined the channel [04:42] tuhoojabotti: Now some deriving [04:43] CrabDude has joined the channel [04:45] Init--WithStyle- has joined the channel [04:49] ryanfitz has joined the channel [04:49] rauchg has joined the channel [04:51] dwhittle has joined the channel [04:52] tracker1 has joined the channel [04:55] AvianFlu has joined the channel [04:56] jhbot: 'How to efficiently bulk insert and update mongodb document values from an array?' by tjmehta http://stackoverflow.com/q/8905381 (tags: mongodb, mongoose) [04:57] OmidRaha has joined the channel [04:58] galaxywatcher has joined the channel [04:58] sharkbird has joined the channel [04:59] satyr has joined the channel [05:00] roger_raymond has joined the channel [05:02] Init--WithStyle-: Have you seen how fast node.js based game engines have been being bought up by larger companies?? [05:02] Init--WithStyle-: It seems like a few months after someone announces they have created a node.js + xxx + xxx game engine they get bought up by some massive company like zynga or disney the next day [05:03] pizthewiz has joined the channel [05:05] jonbaer has joined the channel [05:05] [[zz]] has joined the channel [05:06] pyrotechnick: they're scared [05:08] clutchski has joined the channel [05:08] dr0id has joined the channel [05:09] zeade has joined the channel [05:12] Me1000 has joined the channel [05:13] lz has joined the channel [05:15] praCt has joined the channel [05:17] bofm has joined the channel [05:21] boltR has joined the channel [05:22] boltR has joined the channel [05:22] Shakir has joined the channel [05:22] pyrotechnick has left the channel [05:22] mdel has joined the channel [05:22] pyrotechnick has joined the channel [05:22] Shakir: Hi [05:25] lz: sup [05:25] disappearedng has joined the channel [05:26] Shakir: Help me about nodejs express [05:26] Shakir: I want to create my site in nodejs [05:27] sarlalian has joined the channel [05:28] westc: Shakir: read all the docs [05:28] Shakir: can give me a web site address [05:29] Shakir: I was puzzled to set express [05:30] jhbot: 'How to return a complex JSON response with Node.js?' by Martin http://stackoverflow.com/q/8905613 (tags: json, mongoose) [05:30] amasad has joined the channel [05:31] Shakir: What is a first step to set up express [05:33] cyberRodent has joined the channel [05:33] Shakir: how can i configure express in windows [05:33] Shakir: help me [05:35] HT has joined the channel [05:35] kerang has left the channel [05:35] rtgibbons has joined the channel [05:35] ovaillancourt: Shakir, have you gone through the guide? [05:35] ovaillancourt: on the website [05:36] mxbtty has joined the channel [05:36] gavin_huang has joined the channel [05:37] Shakir: yes i was tried it but in window had give me an error [05:37] Shakir: about module [05:38] ovaillancourt: ok, I'm not on windows :| so I can hardly say. Have you installed express through npm? [05:38] Shakir: yes [05:38] gavin_huang has joined the channel [05:38] Shakir: with npm [05:38] Shakir: but still problem [05:39] ovaillancourt: ok, and then you created a javascript file and wrote "var express = require('express');" in it? [05:39] jhbot: 'Nodejs - Check for hidden files' by user1155496 http://stackoverflow.com/q/8905680 [05:39] Shakir: yes [05:39] ovaillancourt: ok, and that gives you an error? [05:40] MrTopf has joined the channel [05:41] Shakir: yes [05:41] ovaillancourt: alright, then paste the error [05:41] ovaillancourt: (help me help you, seriously...) [05:42] Shakir: yes [05:42] praCt has joined the channel [05:43] praCt: trying to get any kind of response from rcon, by connecting via net.createServer, but getting Error: listen EADDRNOTAVAIL instead, could someone possibly direct me in right path with this? [05:43] Shakir: node.js:201 [05:43] Shakir: throw e; // process.nextTick error, or 'error' event on first tick [05:43] Shakir: ^ [05:43] Shakir: TypeError: Object # has no method 'bodyDecoder' [05:43] Shakir: at HTTPServer. (C:\Documents and Settings\Administrator\Desktop\a [05:43] Shakir: as.js:5:17) [05:43] Shakir: at HTTPServer.configure (C:\Documents and Settings\Administrator\node_module [05:43] Shakir: s\express\lib\http.js:543:61) [05:43] Shakir: at Object. (C:\Documents and Settings\Administrator\Desktop\aas.j [05:43] Shakir: s:3:5) [05:43] Shakir: at Module._compile (module.js:432:26) [05:43] Shakir: at Object..js (module.js:450:10) [05:43] Shakir: at Module.load (module.js:351:31) [05:43] Shakir: at Function._load (module.js:310:12) [05:43] Shakir: at Array.0 (module.js:470:10) [05:43] Shakir: at EventEmitter._tickCallback (node.js:192:40) [05:43] Shakir: this is an error [05:43] ovaillancourt: indeed [05:44] ovaillancourt: so you're telling me your file only contains "var express = require('express');" and it poops you that error? [05:44] blueadept has joined the channel [05:44] blueadept has joined the channel [05:44] Shakir: yes [05:46] markdaws: Shakir: change bodyDecoder to bodyParser [05:46] Shakir: now I fixed some error but app.use(express.bodydecode()) still problem [05:46] ovaillancourt: Shakir: like he said [05:46] Shakir: yes i m in trying [05:46] tilgovi has joined the channel [05:47] Shakir: It's working [05:48] ovaillancourt: Shakir: you should really read the guide though [05:48] ByteCrunch has joined the channel [05:49] Shakir: In windows has too much bug [05:49] ovaillancourt: the guide is a website... [05:49] amasad_ has joined the channel [05:49] jgornick has joined the channel [05:49] ovaillancourt: http://www.expressjs.com/guide.html [05:50] jrbaldwin has joined the channel [05:52] harthur has joined the channel [05:53] ChrisPartridge: Is anyone aware of any issues with passing args to child_process spawn? [05:54] grom has joined the channel [05:55] felixge has joined the channel [05:55] felixge has joined the channel [05:55] Shaunzie has joined the channel [05:56] ryan_stevens has left the channel [05:57] LuckySMack has joined the channel [05:57] LuckySMack has joined the channel [05:58] LuckySMack: can anyone recommend a good blog tutorial for node using express and maybe a few other basic libraries. I want to keep it fairly minimal but be able to have some sort of user auth and maybe couchdb [05:59] mraleph has joined the channel [05:59] Shaunzie: do really need a tutorial for that? You can pretty much infer it just by reading a few docs. [05:59] Shaunzie: for auth you can use easyauth [05:59] LuckySMack: or just something along those lines. would like to see what a working app looks like that authenticates users [06:00] Shaunzie: the express documentation is pretty good [06:00] Shaunzie: not so sure about couched, but I'm sure there's a decent package for it.... [06:00] LuckySMack: ok, see i didnt even know of easyauthm im just getting into node. [06:01] LuckySMack: well, couch or mongo, either is fine. I want to try both at some point anyways [06:01] reid has joined the channel [06:01] LuckySMack: ill dig more into express. [06:02] apwalk_ has joined the channel [06:02] jas_a has joined the channel [06:02] Shaunzie: er.. by easyauth I meant everyauth sorry lol [06:02] Shaunzie: https://github.com/bnoguchi/everyauth [06:02] jas_a: hi everyone, i'm looking at error handling in express. i have an error that causes my node to go down. How can i gracefully handle this error? [06:03] Shaunzie: jas_a: try/catch [06:03] jhbot: 'Is a non-blocking, single-threaded, asynchronous web server (like Node.js) possible in .NET?' by Mehrdad http://stackoverflow.com/q/8905860 (tags: c#, multithreading, events, asynchronous) [06:03] jas_a: Shaunzie: i was told that isn't the way to go. that when using express, err is usually the first argument [06:04] LuckySMack: ah ok, thanks Shaunzie [06:05] Shaunzie: jas_a: if an instance of Error is being thrown, you'll want to catch and handle it. [06:05] pradeebv has joined the channel [06:05] Shakir: how can [06:08] jas_a: Shaunzie: i'm reading this on stack overflow: "Though these methods mean that you're app is still throwing exceptions, rather than just creating and passing them. Throwing exceptions is considered bad practice." [06:08] jas_a: Shaunzie: i've read it other places as well, so i'm wondering am i doing something wrong? [06:08] Shaunzie: yah, you should throw Error because if uncaught, node dies, which is kinda bad for business. [06:09] Shaunzie: It's much better to pass an error as a parameter in a callback [06:09] Shaunzie: ie function(err, …) [06:09] Shaunzie: you can gracefully handle that without worrying about node dying on you. [06:10] Shakir: I found an error in express cann't not found connect after install express [06:11] omenar has joined the channel [06:11] jas_a: Shaunzie: so that's what i'm confused about. because i am passing err everywhere. so why is my code still dying? [06:12] liar has joined the channel [06:12] Shaunzie: jas_a: can't really say with out looking at the error :-/. If you want you can gist the error [06:12] jas_a: Shaunzie: it's been several over time. more of a theoretical question. [06:13] mattgifford has joined the channel [06:14] Shaunzie: jas_a: ok, well just because you are passing errors, does not mean that the packages you are using do. [06:15] jas_a: Shaunzie: true. like here is an example of one....if(crypto.createHmac('sha256', user.salt).update(password).digest('hex') == user.password) [06:15] mattgifford has joined the channel [06:15] Shaunzie: ok and the error? [06:16] jas_a: Shaunzie: and the error is TypeError: Not a string or buffer [06:16] jrbaldwin has joined the channel [06:16] Shaunzie: ok so user.salt or password is not a string or a Buffer [06:17] pradeebv_ has joined the channel [06:17] mattgifford has joined the channel [06:18] jas_a: Shaunzie: right. i'm forcing that by passing in bad data. so that's throwing an exception? [06:18] pradeebv_ has joined the channel [06:18] bacon000 has joined the channel [06:18] real_mjr has joined the channel [06:19] Shaunzie: jas_a: yah, it's throwing an error. But that kind of problem can be avoided easily. Before executing that line of code, you need to make sure that your application is providing actual data. [06:20] jas_a: Shaunzie: ok. just doing input validation [06:20] duko2 has joined the channel [06:21] duko2: hi im wondering if there is a preferred way of organising a node.js project [06:21] descipher has joined the channel [06:21] duko2: one that re-uses the same templates for backend and client-side rendering [06:22] Shaunzie: duko2: I think express is the defacto framework for node.js, so most people follow the setup that it generates by default. [06:24] jas_a: Shaunzie: thanks for your help [06:24] jas_a: got to go [06:24] Shaunzie: jas_a: np [06:24] duko2: express does not have a default setup for the sort of application i described [06:25] rburhum has joined the channel [06:25] Shaunzie: duko2: why not? [06:25] Locke23rus has joined the channel [06:27] duko2: it only makes a views directory [06:27] shadowshell has joined the channel [06:27] duko2: there's nothing special about that [06:28] Shaunzie: makes views, public and routes are why gets created with express. that should be enough [06:30] duko2: if you are using your view templates on the client [06:30] duko2: those would go in 'public' [06:31] Shaunzie: duko2: not necessarily. No reason why you couldn't expose additional directories when you create the server [06:31] duko2: that's true :| [06:32] domino14 has joined the channel [06:32] Shaunzie: express won't behave like this out of the box, but you can make it your bitch :D [06:32] ovaillancourt has joined the channel [06:32] twolfson has joined the channel [06:32] domino14: ugh.. i don't understand how to use "next" in express for error checking [06:32] domino14: i do return next(new Error("error")) but it seems that if it's in a nested function, it breaks out of the nested function and just ocntinues executing [06:32] Shakir: Hey, I want Express IDE for windows [06:33] domino14: how do i like … raise an error and return that error to the user? [06:33] Shaunzie: Shakir: You'd have to make one. [06:33] Shaunzie: domino14: you wouldn't raise an error. Error object = bad [06:34] Shaunzie: domino14: check out http://expressjs.com/guide.html#req.flash() [06:34] Shaunzie: ehl…. wtf did he put parens in the id…. -.- [06:34] Shaunzie: if your irc client fails and making a link copy paste ._. [06:35] Shakir: but on that adderss is express module [06:37] domino14: Shaunzie: what does that mean .. what's a flash msg? [06:37] domino14: and why is raising an Error object bad? [06:37] Shaunzie: domino14: allows you to store a message in session the user's session to be retrieved later. [06:38] Shaunzie: domino14: uncaught errors will cause node to die. [06:38] Shaunzie: domino14: accidentally killing your server is bad for business >.> [06:38] pradeebv_ has joined the channel [06:39] Shakir: Help me after install jade module than cann't found jade [06:40] felixge has joined the channel [06:40] mdel has joined the channel [06:41] domino14: Shaunzie: i have a global catch at the end. [06:41] domino14: .on('uncaughtError') i think [06:42] andorraclaim has joined the channel [06:42] domino14: i am using node as an API endpoint, and just wnat to show Success if everything succeeded, or show various failure messages.. no sessions. [06:43] domino14: i am using return next(new Error('x')) wherever there is an error, and then i have app.error(function(err, req, res) { res.send(err.message); } ) [06:43] niloy__ has joined the channel [06:44] wesley__ has joined the channel [06:44] yolin has joined the channel [06:47] luke` has joined the channel [06:47] wesley__: any pointers to what ._controlReleased property is about? cannot find any docs on it [06:49] EndangeredMassa has joined the channel [06:50] qsobad has joined the channel [06:50] rtgibbons has joined the channel [06:51] galaxywatcher has joined the channel [06:51] tkaemming_ has joined the channel [06:52] fangel has joined the channel [06:53] blueadept has left the channel [06:54] joshontheweb has joined the channel [06:56] qsobad_ has joined the channel [06:58] pradeebv has joined the channel [07:00] aesptux has joined the channel [07:01] yumike has joined the channel [07:01] mateodelnorte has joined the channel [07:01] letsgojuno has joined the channel [07:02] niloy has joined the channel [07:03] anarchotron has joined the channel [07:05] cache_za has joined the channel [07:06] dwhittle has joined the channel [07:07] duko2 has left the channel [07:07] ph^ has joined the channel [07:07] joshontheweb has joined the channel [07:07] Swizec_ has joined the channel [07:08] real_mjr has joined the channel [07:08] jacobolus has joined the channel [07:10] CrawfordComeaux has joined the channel [07:10] felixge has joined the channel [07:10] felixge has joined the channel [07:10] incon_ has joined the channel [07:11] _dc has joined the channel [07:13] djbell has joined the channel [07:13] yawNO has joined the channel [07:14] joshontheweb has joined the channel [07:16] SamuraiJack has joined the channel [07:16] zackattack has joined the channel [07:17] CrypticSwarm has joined the channel [07:17] mateodelnorte has joined the channel [07:17] josh-k has joined the channel [07:17] kmiyashiro has joined the channel [07:17] jzacsh has joined the channel [07:17] branch has joined the channel [07:17] icewhite has joined the channel [07:17] sveisvei has joined the channel [07:17] garann has joined the channel [07:17] Lingerance has joined the channel [07:17] Mare13h has joined the channel [07:17] janne has joined the channel [07:17] SirFunk has joined the channel [07:17] gwoo has joined the channel [07:17] Guest44507 has joined the channel [07:17] logbot46379 has joined the channel [07:17] mape has joined the channel [07:18] ph^ has joined the channel [07:19] davetayls has joined the channel [07:19] Init--WithStyle-: could anyone describe to me for what reasons one would want to use socket.io in their node.js server? [07:19] markq: lots [07:19] markq: realtime stuff [07:19] markq: cross-browser [07:19] markq: websockets [07:19] niloy has joined the channel [07:19] Init--WithStyle-: what are some of the features that it brings to the table that node.js doesn't have? [07:19] Init--WithStyle-: node.js isn't cross-browser? [07:19] jacobolus has joined the channel [07:19] markq: node.js and socket.io are not ini the same category [07:20] cmr: markq: he parted [07:20] Init--WithStyle- has joined the channel [07:20] Init--WithStyle-: sorry missed that [07:20] markq: node.js and socket.io are not ini the same category [07:20] cmr: Init--WithStyle-: nodejs doesn't implement websockets. [07:20] markq: node.js is a server side javascript environment whereas socket.io is a library on top of node.js [07:20] Init--WithStyle-: ohhh [07:21] Init--WithStyle-: I see now [07:21] markq: ajax [07:21] markq: long polling comet [07:21] markq: socket.io is in that category [07:21] markq: but with websockets [07:21] markq: and fallbacks [07:21] tuhoojabotti: ws! [07:21] Init--WithStyle-: cool beans [07:21] Init--WithStyle-: :) [07:26] braoru has joined the channel [07:27] braoru has joined the channel [07:27] p1d has joined the channel [07:31] brianseeders has joined the channel [07:33] simplyharsh has joined the channel [07:35] ambroff has joined the channel [07:36] real_mjr has joined the channel [07:38] Nopik has joined the channel [07:39] niloy has joined the channel [07:40] Nopik: hi all.. node.js newbie here.. if i have some app using mysql heavily, and want to add node.js node to that app to handle some incoming traffic, do node.js have good mysql driver to access mysql from many simultaneous connections? [07:40] MrTopf has joined the channel [07:43] caolanm has joined the channel [07:44] cognominal_ has joined the channel [07:45] garrensmith: Nopik: I think this is a good mysql library https://github.com/felixge/node-mysql [07:46] ambroff has joined the channel [07:46] Morkel has joined the channel [07:47] jetienne has joined the channel [07:47] Nopik: looks interesting, yes. but, no transactions? [07:47] Nopik: node-mysql-queues seem to support it at least [07:48] isaacs has joined the channel [07:48] groom has joined the channel [07:49] shinuza has joined the channel [07:50] jdickiton has joined the channel [07:54] Heisenmink has joined the channel [07:54] jetienne has joined the channel [07:55] avalanche123 has joined the channel [07:55] felixge has joined the channel [07:56] skm has joined the channel [07:56] `3rdEden has joined the channel [07:57] niloy has joined the channel [07:57] Neil has joined the channel [07:59] boltR has joined the channel [08:00] ccare has joined the channel [08:00] zivester has joined the channel [08:01] fangel has joined the channel [08:01] Hanspolo has joined the channel [08:01] amasad has joined the channel [08:02] tdegrunt has joined the channel [08:04] captain_morgan has joined the channel [08:06] hipsters_ has joined the channel [08:06] djcoin has joined the channel [08:06] deoxxa: Nopik: START TRANSACTION; SELECT how_to_use_sql FROM information_you_should_know WHERE level = 'beginner'; COMMIT; [08:06] sdwrage has joined the channel [08:06] deoxxa: thank me later [08:07] Nopik: ok, thanks ;) [08:08] Nopik: i somehow started used to client libraries which can protect against sql injection automatically etc., keep forgetting that when all else fails the raw sql statements can be issued, too ;p [08:08] Nopik: on the other hand, it is too bad, that node.js sql support is not mature enough to get it in a better way [08:08] Nopik: guess that will come over next years [08:09] Hamms has joined the channel [08:09] QiBala has joined the channel [08:10] tornad has joined the channel [08:10] tornad: hello [08:10] buttface has joined the channel [08:11] ablomen has joined the channel [08:11] real_mjr has joined the channel [08:13] Init--WithStyle-: hi tornad [08:15] raphdg has joined the channel [08:16] niloy has joined the channel [08:16] Heisenmink has joined the channel [08:16] djcoin has joined the channel [08:17] TheNumb has joined the channel [08:17] klaustsen has joined the channel [08:18] Ibuprofen has joined the channel [08:18] Glenjamin: Nopik: node-mysql supports library-side escaping, which is all you need to protect against sql injection [08:18] stef has joined the channel [08:18] Nopik: Glenjamin: great, i didn't notice that on the github readme [08:18] Glenjamin: db.escape [08:19] deoxxa: parameterised queries, too [08:19] deoxxa: .query("SELECT a, b, c FROM x WHERE d = ?", ["some value"]) [08:20] Nopik: even better, thanks again [08:21] paera has joined the channel [08:22] sharkbird has joined the channel [08:23] jhbot: 'Convert array to string in NodeJS' by Magic http://stackoverflow.com/q/8907094 [08:24] ppcano has joined the channel [08:26] Geeknux has joined the channel [08:26] SubStack: hahaha I don't even [08:27] stonebranch has joined the channel [08:27] torvalamo: lol [08:28] Glenjamin: easy SO points \o/ [08:31] kulor-uk has joined the channel [08:31] [AD]Turbo has joined the channel [08:31] [AD]Turbo: hi there [08:32] Glenjamin: oh damn, i didn't even notice he was assigning string keys [08:34] yolin has joined the channel [08:34] ivic has joined the channel [08:34] djcoin has joined the channel [08:34] LeftWing has joined the channel [08:36] braoru has joined the channel [08:37] dshaw_ has joined the channel [08:39] doitian has joined the channel [08:40] webguynow has joined the channel [08:41] cognominal has joined the channel [08:42] cognominal_ has joined the channel [08:42] Shaunzie has joined the channel [08:45] paera has joined the channel [08:47] cosmincx has joined the channel [08:48] slaskis has joined the channel [08:50] cesconix has joined the channel [08:50] jacobolus has joined the channel [08:51] whitman has joined the channel [08:52] tytsim has joined the channel [08:53] pors has joined the channel [08:56] real_mjr has left the channel [08:57] mikedeboer has joined the channel [08:58] Init--WithStyle-: node.js is just so damn awesome [08:58] ericmuyser has joined the channel [08:58] aaronmcadam has joined the channel [08:59] aliem has joined the channel [08:59] salva has joined the channel [09:00] dr0id has joined the channel [09:02] letsgojuno has joined the channel [09:02] carnau has joined the channel [09:02] Geeknux: hi everybody [09:02] carnau: Is there any way to prevent start the same js twice using node or forever? [09:03] claudio has joined the channel [09:04] hipsters_ has joined the channel [09:04] Geeknux: i'm going to move from PHP to Node.js, I want to know, is node.js stable enough and ready for a Shop CMS or not? [09:05] booyaa: Geeknux: http://nodejs.org/ [09:06] booyaa: do you not think the 4 software houses at the top of the page [09:06] hz has joined the channel [09:06] booyaa: validate node.js' primetime readiness? [09:07] booyaa: afk [09:08] clu3 has joined the channel [09:09] jacobolus has joined the channel [09:09] Geeknux: booyaa: i know that, i'm wan't to know, is node.js good for cms like shops ... etc [09:09] Nss has joined the channel [09:09] abraxas: any zeromq users around? i'm puzzled as to why in 2.0.0 the socket.send API changed. [09:12] hellp has joined the channel [09:13] tomasztomczyk has joined the channel [09:13] martin_sunset: Geeknux: Sure, but expect a couple of weeks intense learning [09:14] rendar has joined the channel [09:14] Geeknux: thanks #martin_sunset :) [09:15] ericmuyser has joined the channel [09:16] skm has joined the channel [09:16] mattgifford has joined the channel [09:16] __doc__ has joined the channel [09:16] beevits has joined the channel [09:16] sdwrage has joined the channel [09:17] sdwrage has left the channel [09:17] yumike has joined the channel [09:18] TomY has joined the channel [09:19] letsgojuno_ has joined the channel [09:19] booyaa: ACTION thinks he may have worked out a way to get around our stupid ntlm proxies at work for installing npms [09:20] yolin has joined the channel [09:20] booyaa: download source, build then npm link it [09:21] martin_sunset: booyaa: I feel bad for you. Stoneage IT department I guess? [09:23] qsobad has joined the channel [09:25] robhawkes has joined the channel [09:26] michaelhartau has joined the channel [09:26] booyaa: yeah... also ms stack' integration authentication makes it real easy for parts to talk [09:26] booyaa: if you're not part of the party then you have to reverse engineer the protocols et al samba [09:27] booyaa: right prep time for meeting and then one more poke of the bcp site [09:27] booyaa: o/ [09:28] maritz has joined the channel [09:28] carnau: Is there any way to prevent start the same js twice using node or forever? [09:30] jimt_ has joined the channel [09:30] DennisRasmussen has joined the channel [09:31] Provito has joined the channel [09:31] vguerra has joined the channel [09:32] versicolor has joined the channel [09:35] agnat has joined the channel [09:37] cesconix has joined the channel [09:38] paera has joined the channel [09:39] dob_ has joined the channel [09:41] MrTopf has joined the channel [09:41] hipsters_ has joined the channel [09:42] lperrin has joined the channel [09:43] Wizek has joined the channel [09:46] shinuza has joined the channel [09:47] cosmincx has joined the channel [09:47] adrianF has joined the channel [09:47] hugdubois has joined the channel [09:50] stagas has joined the channel [09:51] jomoho has joined the channel [09:52] Cromulent has joined the channel [09:52] hugdubois has joined the channel [09:53] qsobad has joined the channel [09:54] yolin has joined the channel [09:55] yawNO has joined the channel [09:56] cognominal has joined the channel [09:57] bLUEEE: is it possible to attach events or override res.render from express ? [09:58] johnhame_ has joined the channel [09:59] LeftWing__ has joined the channel [09:59] arthurdebert has joined the channel [10:00] torvalamo has joined the channel [10:00] lzskiss has joined the channel [10:01] cognominal has joined the channel [10:02] vvo has joined the channel [10:02] stagas: bLUEEE: what are you trying to do? [10:03] bLUEEE: pass locals tot he the view without wrapping or 'disturbing' the current render method [10:03] amasad_ has joined the channel [10:03] jldbasa has joined the channel [10:04] martin_sunset: bLUEEE: Dynamichelpers.... [10:04] lzskiss has joined the channel [10:04] martin_sunset: bLUEEE: Is your friend [10:04] gavin_huang has joined the channel [10:04] bLUEEE: alright, let me look that up - thanks [10:05] riven` has joined the channel [10:05] herbySk has joined the channel [10:06] Skaag_ has joined the channel [10:06] BrianE has joined the channel [10:07] BrianE has joined the channel [10:09] hugdubois has joined the channel [10:10] andorraclaim has joined the channel [10:11] Provito has joined the channel [10:11] markwubben has joined the channel [10:11] larsschenk1 has joined the channel [10:12] larsschenk1 has left the channel [10:13] Shakir has joined the channel [10:14] martndemus has joined the channel [10:14] cognominal has joined the channel [10:14] pradeebv has joined the channel [10:16] real_mjr has joined the channel [10:16] johnhame_: What's the best way to do an update using mongoose? [10:19] Shakir: After Install jade but still problem in my code [10:20] tonymilne has joined the channel [10:22] cgfuh has joined the channel [10:23] tonymilne: Yo peeps, if i have load balanced node apps across multiple servers (and clustered), but i need to do an activity that is "active" for a period of 2 minutes. The request to start it will come to one of the app instances, be inserted into the database, how would you guys end the activity? E.g. run a task as an interval from a separate process or something? [10:24] tonymilne: (sorry for the dump -- hope that's clear what I'm trying to do / ask help for. lol) [10:24] guidocalvano has joined the channel [10:25] MrTopf has joined the channel [10:25] Shakir has joined the channel [10:25] guidocalvano: hey guys... I saw the windows version was now officially available, but there was apparently no linux version [10:25] guidocalvano: what's up with that? [10:25] guidocalvano: is linux still supported? [10:25] Industrial: github ? [10:26] Industrial: guidocalvano: 'source code' :P is for linux [10:26] OmidRaha has joined the channel [10:26] jetienne has joined the channel [10:27] guidocalvano: 'sourcecode' does give the impression that you will run into issues [10:27] igl: so you havent used unix before [10:27] Industrial: I think that's a good thing :\ [10:27] guidocalvano: and those issues will regard how incoming events are dealt with [10:27] igl: source is not abnormal there [10:28] guidocalvano: I worked with the source of node 0.4.1 to 0.5.something [10:28] guidocalvano: made some simple hacks in the code [10:28] Industrial: Not providing builds for a piece of software like this is a good thing in my opinion. it's a great noobwall, keeps people out that would otherwise just install the package, launch their IRC client and start bombarding the channel with questions the could easily look up on google [10:29] igl: Industrial: aptitude search nodejs :) [10:29] igl: too late [10:29] guidocalvano: I'm on mac right now [10:29] megalomix has joined the channel [10:29] megalomix: hello [10:29] megalomix: i'm using http.get [10:29] evangenieur has joined the channel [10:29] megalomix: could someone tell me how can i retrive the code of the page? :) [10:29] xbayrockx has joined the channel [10:29] megalomix: the status is 200 so it should be ok....but how to retrieve the source code? [10:29] Industrial: guidocalvano: see? [10:30] liar has joined the channel [10:30] Industrial: megalomix: did you see http://nodejs.org/docs/v0.6.2/api/all.html#http.get ? [10:30] aslant has joined the channel [10:30] hipsters_ has joined the channel [10:31] yumike has joined the channel [10:31] k1ttty has joined the channel [10:32] megalomix: on('data') [10:32] Industrial: function(res) <-- it's the response object. [10:32] guidocalvano: you could do that Industrial, but if you keep out the noobs your userbase won't grow [10:32] guidocalvano: anyway [10:33] guidocalvano: I have work to do (: [10:33] Industrial: guidocalvano: ;) [10:33] megalomix: Industrial, yes.... so i nee to "attach" [10:33] megalomix: .on('error') [10:34] megalomix: .on('data') [10:34] megalomix: ? [10:34] michaelhartau has joined the channel [10:34] guidocalvano: my best guess: [10:35] guidocalvano: .on( 'data', function( source ) { console.log( source ) ; } ) ; [10:36] megalomix: i try [10:36] guidocalvano: this will write the source to your terminal as soon as it arrives (I think) [10:38] megalomix: guidocalvano, https://gist.github.com/1632371 [10:38] megalomix: ? [10:39] dannyamey has joined the channel [10:39] guidocalvano: I don't know whether the on function returns the object it was called on [10:39] megalomix: so i need to use [10:39] megalomix: res.on('error') [10:40] megalomix: res.on('data') [10:40] megalomix: better ? [10:40] guidocalvano: right [10:40] megalomix: ok i try [10:40] fly-away has joined the channel [10:40] guidocalvano: var res = http.get( ... ) ; [10:40] megalomix: ok [10:40] guidocalvano: res.on( 'data', function( source ) { ... } ) ; [10:41] Industrial: http.get(options, function(response) {console.log(response.body)}) [10:41] Industrial: there's your body. [10:41] megalomix: guidocalvano, https://gist.github.com/1632383 [10:41] megalomix: Industrial, aah ok [10:42] Margle has joined the channel [10:43] guidocalvano: if you know that type of the argument 'response' you can learn more about 'response' and how to get info out of it [10:43] megalomix: https://gist.github.com/1632385 [10:43] guidocalvano: and if you know what http.get returns you can get more info on that [10:43] guidocalvano: you can try that out faster than asking us [10:43] pradeebv_ has joined the channel [10:44] guidocalvano: but I have to get back to work [10:44] guidocalvano: good luck dude [10:44] megalomix: thank you [10:44] martin_sunset: What's your take on - vs _ in file names (source, jade)? [10:44] guidocalvano: ur welcome [10:44] guidocalvano: I prefer _ [10:44] guidocalvano: it isn't an operator [10:45] megalomix: Industrial, i get UNDEFINED (res.body) [10:45] martin_sunset: guidocalvano: Thx [10:45] Industrial: megalomix: you are asking how an API aorks [10:45] Industrial: works* [10:45] guidocalvano: for all other intents and purposes - and _ are equal [10:45] Industrial: API's are documented [10:45] Industrial: first read the documentatiopn [10:45] Industrial: any intro you can google on it [10:45] Industrial: then play around with it [10:45] Industrial: then come here and ask [10:45] megalomix: Industrial, i use YOUR code [10:45] Industrial: guidocalvano: thus my point. [10:46] megalomix: Industrial, http.get(options, function(response) {console.log(response.body)}) <---- [10:46] guidocalvano: megalomix: gratitude does wonders for other's willingness to help you [10:46] martin_sunset: Dude, it is err, .... [10:46] martin_sunset: All node.js callbacks are err, more results [10:47] Shakir: After install jade module still error in my code [10:47] Shakir: help me [10:47] pradeebv_ has joined the channel [10:48] guidocalvano: Industrial: the user base has grown a bit since I last checked irc didn't it... [10:48] martin_sunset: Shakir how should we be able to help you without a a description of the error and b some source [10:48] jbpros has joined the channel [10:48] megalomix: https://gist.github.com/1632404 <--- this works! [10:49] megalomix: thank you guys! [10:49] Shakir: my code erorr is module not found "jade" [10:49] guidocalvano: megalomix: good job (: [10:49] guidocalvano: Shakir: have you installed it using npm? [10:49] martin_sunset: Shakir: Have you included it in your package.json and run NPm install [10:50] Shakir: yes with npm [10:50] Shakir: actually i m using nodejs in windows [10:50] martin_sunset: Shakir: Ah sorry, can't help you with that [10:51] Wizek has joined the channel [10:52] jhbot: 'How to broadcast message to clients of the certain namespace in Socket.IO?' by htonus http://stackoverflow.com/q/8908832 (tags: socket.io) [10:54] pradeebv has joined the channel [10:54] yawNO_ has joined the channel [10:54] Shakir: how can i solved module not found "jade" [10:54] Shakir: in windows [10:56] lmatteis: is the node.js web-server ready for production? [10:56] lmatteis: should i worry about something in particular? [10:57] jakeskik: lmatteis: catch exceptions and use forever or foreman&upstart [10:58] Industrial: Shakir: google. [10:58] bLUEEE: any idea why app.use(express.bodyDecoder()); is giving: throw e; // process.nextTick error, or 'error' event on first tick [10:58] jancsika has joined the channel [10:58] Industrial: K. work time. [10:59] jakeskik: lmatteis: ..and pingdom check. That's pretty all it takes. [11:00] jakeskik: ..much.. [11:00] pradeebv_ has joined the channel [11:01] broofa has joined the channel [11:02] `3rdEden has joined the channel [11:03] xbayrockx has joined the channel [11:03] pradeebv__ has joined the channel [11:03] tonymilne has left the channel [11:04] Shakir: Hi [11:05] tanguito has joined the channel [11:05] mwrf has joined the channel [11:05] Cromulent has joined the channel [11:07] Shakir: help [11:07] Shakir: me [11:07] fbang has joined the channel [11:08] dharmesh has joined the channel [11:09] geoKe has joined the channel [11:09] igl: Shakir: whats in for us? [11:10] geoKe has joined the channel [11:10] Shakir: describe me jabe module [11:10] Shakir: describe me jade module [11:10] Shakir: igl [11:11] yumatov has joined the channel [11:13] d0k has joined the channel [11:14] dannyamey has joined the channel [11:15] davetayls has joined the channel [11:16] jimmysparkle has joined the channel [11:17] galaxywatcher has joined the channel [11:18] xet7 has joined the channel [11:21] nicholasf has joined the channel [11:24] futoase has joined the channel [11:25] e6nian has joined the channel [11:26] jimt_ has joined the channel [11:26] martin_sunset has joined the channel [11:27] e6nian: how to match the end of the page number(like 2 here) in the url http://abc001234.xxxx.com/xxxx/seller/titem/index/page/2 ? [11:27] christkv has joined the channel [11:27] test has joined the channel [11:27] test: asf [11:27] test: hiiiiiiiiiiiiiiiiiiiiiii [11:27] fermion has joined the channel [11:27] test: is anybody here [11:27] fermion: test no [11:29] lzskiss has joined the channel [11:30] yawNO: we are just bots [11:32] Margle_ has joined the channel [11:32] thalll has joined the channel [11:33] mehlah has joined the channel [11:34] Lingerance: e6nian: > path.basename('http://abc001234.xxxx.com/xxxx/seller/titem/index/page/2') [11:34] Lingerance: '2' [11:35] Lingerance: Also: 'http://abc001234.xxxx.com/xxxx/seller/titem/index/page/2'.split('/').pop() [11:36] eee_c has joined the channel [11:38] e6nian: Lingerance: would that work in IE6? [11:39] cosmincx has joined the channel [11:39] tilgovi has joined the channel [11:40] Lingerance: The second one will [11:40] stefpb has joined the channel [11:40] e6nian: Lingerance: ok thank you [11:41] piscisaureus_ has joined the channel [11:42] dannyame_ has joined the channel [11:44] igl: beware of '/page/2/').split('/') [11:45] Lingerance: Hmm? [11:46] dannyamey has joined the channel [11:46] pradeebv has joined the channel [11:47] p1d has joined the channel [11:47] raincole_ has joined the channel [11:49] satyr has joined the channel [11:50] igl: "foo/bar".split("/") !== "foo/bar/".split("/") [11:52] mendel_ has joined the channel [11:53] mendel_ has left the channel [11:55] ivic has joined the channel [11:57] mc_greeny has joined the channel [11:58] maletor has joined the channel [12:00] jancsika: yo guys [12:00] jancsika: i am using the cluster module [12:00] jancsika: is there any way to communicate between slaves? [12:01] unomi has joined the channel [12:03] igl: you got to the docs and found the cluster module. now you may have a look at the next paragraph [12:03] dharmesh has joined the channel [12:04] npa has joined the channel [12:04] tytsim has joined the channel [12:06] Geeknux has joined the channel [12:06] maritz: igl: that takes quite some effort dude, can't you just like... telepathically tell him what to do? or maybe switch the crystals in his computer to write the stuff. come on man, be a little supportive! [12:07] igl: let me get my robe and hat! [12:07] joshfinnie has joined the channel [12:07] jhbot: 'how to run node.js interactively in Emacs on Windows' by Yoo http://stackoverflow.com/q/8909836 (tags: javascript, emacs) [12:11] mwrf has left the channel [12:13] megalomix: hello [12:13] megalomix: excue me, how is this possible? TypeError: Object # has no method 'xml' if i have MyModule.prototype.xml = function(){...} [12:13] megalomix: �_� [12:14] megalomix: i call this using this.xml [12:14] meso_ has joined the channel [12:14] Lingerance: is "this" MyModule or an instance of MyModule? [12:15] megalomix: hmmm i found the problem [12:15] megalomix: i'm calling [12:15] megalomix: this.xml inside a function() { ... } [12:15] megalomix: so maybe "this" it should be the function scope [12:15] megalomix: right? [12:15] Lingerance: I'm way too tired to explain what happens with "this", you're not entirely correct. [12:16] Lingerance: You can make sure it's correct though, with .bind(), .call() or .apply() (all members of Function) [12:16] megalomix: i think i have to do: var that = this in the constructor [12:17] Lingerance: That's a hack, but depending on where the function is, it can work. [12:17] salva has joined the channel [12:17] megalomix: yes [12:17] megalomix: i try [12:18] nicholas_ has joined the channel [12:21] megalomix: doubt: how can i read the attributes where the "name" is set the "loginresponse { name: 'LOGINRESPONSE', [12:21] megalomix: attributes: [12:21] megalomix: { . . } } [12:21] megalomix: do i have to loop? [12:21] megalomix: (i'm using SAX) [12:22] level09 has joined the channel [12:25] ohcibi has joined the channel [12:26] qsobad has joined the channel [12:27] ohcibi: hi i try to install npm via the oneliner (curl http://npmjs.org/install.sh | sudo sh) but i get the error "failed to get tarball for npm/1.1"... i'm behind a proxy and have set $http_proxy and $https_proxy (other ports are either blocked or not behind the proxy), anyone an idea what causes the error? [12:29] salva1 has joined the channel [12:30] Juan77 has joined the channel [12:34] jhbot: 'nodejs jade issue' by Erik http://stackoverflow.com/q/8910157 (tags: jade) [12:34] paera has joined the channel [12:35] megalomix: nobody use sax? [12:35] christophsturm has joined the channel [12:39] criswell has joined the channel [12:39] nerdfiles1 has joined the channel [12:40] MrBig has joined the channel [12:41] jhbot: 'How to close abort the parser?' by Dail http://stackoverflow.com/q/8910228 (tags: sax) [12:41] Kunda has joined the channel [12:41] cjroebuck has joined the channel [12:41] nerdfiles1 has left the channel [12:41] dinarcon has joined the channel [12:42] munichlinux has joined the channel [12:42] TimTim has joined the channel [12:42] joestein has joined the channel [12:46] eb4890 has joined the channel [12:46] _Steve_: is there a Mongoose irc channel? [12:47] npa has joined the channel [12:48] eldar has joined the channel [12:49] crodas has joined the channel [12:50] EvRide has joined the channel [12:50] adambeynon has joined the channel [12:51] burningdog has joined the channel [12:52] bnoordhuis has joined the channel [12:53] ovaillancourt has joined the channel [12:53] Drakonite has joined the channel [12:57] augustl: does the uglify-js CLI support getting AST from stdin and outputting JS? [12:57] augustl: only seems like it can get JS in and AST out [12:57] fantastikibne has joined the channel [12:57] yawNO has joined the channel [12:57] fantastikibne: hi [12:58] coretracker has joined the channel [12:59] fantastikibne: i send a few requests to server http://pastebin.com/raw.php?i=eARMg8L2 [12:59] fantastikibne: but when the needed a key is difference it returns error [12:59] meso__ has joined the channel [13:00] jhbot: 'add property to function' by coen http://stackoverflow.com/q/8910478 (tags: javascript, constructor, prototype, v8) [13:00] fantastikibne: so when i try to get real key [13:00] postwait has joined the channel [13:00] fantastikibne: and update the key still sends the old one? [13:00] stagas has joined the channel [13:00] galaxywatcher_ has joined the channel [13:01] dodo has joined the channel [13:02] ABK has joined the channel [13:02] coretracker has left the channel [13:03] meso_ has joined the channel [13:05] herbySk has joined the channel [13:06] rurufufuss has joined the channel [13:07] scott_gonzalez has joined the channel [13:07] burningdog has left the channel [13:07] meso_ has joined the channel [13:08] megalomix: Guys, if i do: var that = this and then that.id = 12 this property will not also write on this object [13:08] megalomix: ? [13:09] robi42 has joined the channel [13:10] jacobolus has joined the channel [13:10] cnu has joined the channel [13:12] infynyxx has joined the channel [13:12] augustl: megalomix: yes [13:12] augustl: it's the same object [13:12] robotmay has joined the channel [13:13] megalomix: augustl, yes it is the same object BUT is not a copy of the object? [13:13] megalomix: i mean... if i do: var that = this and then that.id = 2 and then can I read --> this.id ? [13:14] megalomix: wow, i tested, it is NOT acopy! [13:14] augustl: megalomix: if it's the same object it's not a copy of the object :) [13:14] megalomix: it is passed by "reference" [13:14] megalomix: right? [13:15] augustl: yes, variables and properties are references [13:15] dannyame_ has joined the channel [13:16] geoKe has joined the channel [13:16] megalomix: wonderful [13:16] megalomix: thank you augustl [13:17] fairwinds has joined the channel [13:19] jhbot: 'Sudo Won't Work after change/mistake in Path env' by user508708 http://stackoverflow.com/q/8910783 (tags: osx, environment-variables, sudo, npm) [13:20] enmand has joined the channel [13:22] jtsnow has joined the channel [13:24] kriszyp has joined the channel [13:26] maushu: "i hope the reddit blackout forces redditors to stumble outside, dazed, so they get run over by traffic" [13:26] robinduckett: LOL [13:27] idefine has joined the channel [13:28] robinduckett: maushu: sounds like something JimBastard/Marak Squires would say. [13:28] bLUEEE has joined the channel [13:28] fumanchu182 has joined the channel [13:28] maushu: robinduckett: Got it from twitter. [13:29] maushu: Found it funny, made me think "those poor redditors! We must save them! ...wait." [13:29] robinduckett: maushu: still, he is a dick. [13:29] robinduckett: maushu: I mean.. redditors are silly. [13:31] Lingerance: ... I did not think I'd see someone mention JB ever again [13:31] aesptux has joined the channel [13:32] amasad has joined the channel [13:32] erichynds has joined the channel [13:32] subhaze has joined the channel [13:32] thax has joined the channel [13:38] yawNO has joined the channel [13:39] Margle has joined the channel [13:39] riven has joined the channel [13:40] stagas has joined the channel [13:41] jhbot: 'Node.js: how does this require work?' by Fluffy http://stackoverflow.com/q/8911091 (tags: require) [13:41] nvoyager has joined the channel [13:41] jtrudeau has joined the channel [13:42] neurodrone has joined the channel [13:42] jacobolus has joined the channel [13:42] tvw has joined the channel [13:42] IrishGringo has joined the channel [13:45] Geeknux has joined the channel [13:50] EyePulp has joined the channel [13:51] pauls1 has joined the channel [13:51] hackband has joined the channel [13:51] luxigo_ has joined the channel [13:52] xetorthio has joined the channel [13:52] Nss_ has joined the channel [13:52] robinduckett: Lingerance: why not? He runs #nodejitsu [13:53] maushu: Anyway to run node.js on windows without showing the command prompt? [13:53] Nss_ has joined the channel [13:53] pdodde has joined the channel [13:54] cgfuh has joined the channel [13:54] augustl: maushu: you can probably write a native program that shells out in the background [13:55] maushu: Ugh. [13:55] augustl: maushu: in C# or whatever it is you use to write native windows programs :) [13:55] maushu: I would like to avoid wrapping it in something. [13:55] maushu: Found this: https://gist.github.com/1621154 [13:55] augustl: I think the question becomes "can I run cmd.exe without showing it" [13:55] robinduckett: maushu: call [13:55] robinduckett: there's a call command [13:55] cesconix has joined the channel [13:55] maushu: robinduckett: hmm? [13:55] robinduckett: in windows [13:55] maushu: Elaborate, please? [13:56] robinduckett: i run nginx/phpcgi from a batch script [13:56] robinduckett: and i believe it's the "call" command [13:57] Geeknux has joined the channel [13:58] aslant has joined the channel [14:00] Geeknux has joined the channel [14:01] maushu: robinduckett: I see, the problem is that I still need to use a cmd.exe to run CALL. [14:01] plutoniix has joined the channel [14:02] albertosh has joined the channel [14:03] robinduckett: if you're looking for a shortcut to double click and node runs in the background, you'll have to use a wrapper [14:03] robinduckett: but there is nothing stopping you having a batch script CALL node in a hidden CMD and exit the batch script, it won't exit node [14:03] AaronMT has joined the channel [14:05] barberdt has joined the channel [14:05] pixel13 has joined the channel [14:05] pixel13 has left the channel [14:06] jacobolus has joined the channel [14:08] lduros has joined the channel [14:08] real_mjr has left the channel [14:08] CIA-101: libuv: 03Ben Noordhuis 07master * rdee86dd 10/ (src/unix/core.c src/unix/internal.h): [14:08] CIA-101: libuv: unix: don't retry close() on EINTR [14:08] CIA-101: libuv: Linux 2.6 always closes the file descriptor, even on EINTR. Retrying the close() [14:08] CIA-101: libuv: call isn't merely useless, it's actively harmful - the file descriptor may have [14:08] CIA-101: libuv: been acquired by another thread. - http://git.io/GZ24nA [14:10] letsgojuno has joined the channel [14:11] joshfinnie has joined the channel [14:11] descipher has joined the channel [14:12] briancray has joined the channel [14:12] amasad has joined the channel [14:12] Vertice: lol http://stopsoap.com/ [14:13] davidsklar has joined the channel [14:13] zemanel has joined the channel [14:13] joestein has joined the channel [14:14] brianseeders has joined the channel [14:14] thomblake has joined the channel [14:17] thomblake has left the channel [14:17] vkareh has joined the channel [14:18] rwaldron has joined the channel [14:19] level09_ has joined the channel [14:20] willwhite has joined the channel [14:22] CIA-101: node: 03Bert Belder 07v0.6 * rd489a01 10/ (lib/path.js test/simple/test-path.js): [14:22] CIA-101: node: Make path.extname do the right thing when the last path component is . or .. [14:22] CIA-101: node: Closes GH-2526 - http://git.io/f-qt5w [14:22] charlenopires has joined the channel [14:23] jacobolus has joined the channel [14:23] TheJH has joined the channel [14:23] cognominal has joined the channel [14:23] lazyshot has joined the channel [14:23] bkaney has joined the channel [14:23] jhbot: 'Node.js createClient Error: getaddrinfo OK at errnoException (dns.js:31:11)' by Jack http://stackoverflow.com/q/8911677 (tags: http) [14:23] ovnicraft has joined the channel [14:24] nerdfiles has joined the channel [14:24] nerdfiles has left the channel [14:24] jetienne has joined the channel [14:24] augustl: Vertice: haha, nice [14:24] Druide_ has joined the channel [14:24] stagas has joined the channel [14:25] nogginBasher has joined the channel [14:27] joshsmith has joined the channel [14:28] cognominal_ has joined the channel [14:29] jhbot: 'Heroku & NodeJS Reading User Stream fails when supplying since parameter' by Mustafa http://stackoverflow.com/q/8911803 (tags: facebook, facebook-graph-api, heroku) [14:29] MrTrick has joined the channel [14:29] benvie has joined the channel [14:30] squinteye has joined the channel [14:30] martin_sunset_ has joined the channel [14:32] robhawkes has joined the channel [14:32] jj0hns0n has joined the channel [14:32] christkv has joined the channel [14:33] pradeebv_ has joined the channel [14:34] pradeebv_ has joined the channel [14:35] cognominal_ has joined the channel [14:36] peregrine81 has joined the channel [14:36] jetienne_ has joined the channel [14:37] zitchdog has joined the channel [14:39] ryanfitz has joined the channel [14:39] Wizek has joined the channel [14:40] RLa has joined the channel [14:44] tomasztomczyk has joined the channel [14:45] mange has joined the channel [14:45] jacobolus has joined the channel [14:46] c4milo has joined the channel [14:46] 18VAAJOVJ has joined the channel [14:46] 17SAAEQOH has joined the channel [14:46] AviMarcus has joined the channel [14:48] Stephen has joined the channel [14:49] Vennril has joined the channel [14:49] npa has joined the channel [14:50] joshsmith: ughhh what is the name of that awesome JS date/time library? [14:51] Lingerance: date.js? [14:51] ablomen: xdate? moment.js? [14:51] joshsmith: my colleague is awesome and remembered [14:51] joshsmith: moment [14:51] joshsmith: thanks, though! [14:54] megalomix: what XML parser do you use? [14:55] MarkMenard has joined the channel [14:55] jacobolus has joined the channel [14:56] ank has joined the channel [14:57] CIA-101: libuv: 03Ben Noordhuis 07master * rfbbc085 10/ (9 files in 3 dirs): [14:57] CIA-101: libuv: Rename COUNTOF() to ARRAY_SIZE(). [14:57] CIA-101: libuv: Consistent with Node, it has an ARRAY_SIZE() macro but not COUNTOF(). - http://git.io/dRszaQ [14:57] CIA-101: libuv: 03Ben Noordhuis 07master * r1161d31 10/ (4 files): test: move container_of() macro into task.h - http://git.io/Vmr3gg [14:57] CIA-101: libuv: 03Ben Noordhuis 07master * r6ede034 10/ test/test-thread.c : test: #include missing - http://git.io/n6h8ew [14:57] chadskidmore has joined the channel [15:01] CIA-101: node: 03Brandon Benvie 07v0.6 * rf7b6125 10/ lib/tty.js : Add missing TTY key translations for F1-F5 on Windows - http://git.io/SFcYCg [15:01] isufy has joined the channel [15:01] gerard0 has joined the channel [15:02] randy_ has joined the channel [15:04] chjj: http://blogs.adobe.com/avikchaudhuri/2012/01/17/the-v8-myth-why-javascript-is-not-a-worthy-competitor/ [15:04] chjj: pa [15:04] chjj: thetic [15:06] meder has joined the channel [15:07] djazz has joined the channel [15:07] eeemsi: is someone using nodejs via cygwin on windows? [15:07] yawNO: eeemsi: there's a native installer for node on win [15:07] yawNO: why would you use cygwin? [15:08] ablomen: chjj, at least he did not call v8 a cancer [15:09] eeemsi: no i'm not using it… was just intersted due to the commit above ;) [15:09] dannyamey has joined the channel [15:09] Tricks has joined the channel [15:09] Swizec has joined the channel [15:10] socketio\test\12 has joined the channel [15:10] cognominal_ has joined the channel [15:12] Skaag has joined the channel [15:12] Guest___ has joined the channel [15:12] jetienne_ has joined the channel [15:13] Guest___ has joined the channel [15:14] Tricks_ has joined the channel [15:15] Tricks_ has joined the channel [15:15] amasad has joined the channel [15:16] EriksLV has joined the channel [15:16] jhbot: 'jQuery UI autocomplete with data from now.js?' by Patrick http://stackoverflow.com/q/8912523 (tags: javascript, jquery-ui, real-time, nowjs) [15:16] springmeyer has joined the channel [15:16] xpigeonx: are streams expensive in node, and do they block on write if they're 'filled'? [15:17] Poetro has joined the channel [15:17] Tricks has joined the channel [15:17] CarterL has joined the channel [15:18] Glenjamin: chjj: in other news. C shown to be faster than pypy in controlled test on known algorithm [15:18] jkridner___ has joined the channel [15:18] apwalk has joined the channel [15:19] maushu: So, I tried this: https://gist.github.com/1621154 [15:19] azeroth_ has joined the channel [15:19] maushu: Didn't work so well... I'm trying to fix but I suck at this. [15:21] benvie: that actionscript article may be factually correct but it misses the forest for the trees [15:21] agnat has joined the channel [15:22] benvie: node shows how you can offload the right parts to C++ while still getting the benefit of the accessibility and ease of use that javascript provides [15:23] jacobolus has joined the channel [15:23] benvie: C and C++ [15:23] Destos has joined the channel [15:24] bnoordhuis: xpigeonx: what kind of streams? [15:24] Hanspolo has joined the channel [15:24] agnat has joined the channel [15:28] JJMalina has joined the channel [15:28] jscheel has joined the channel [15:28] jscheel has joined the channel [15:29] jmar777 has joined the channel [15:30] brngardner has joined the channel [15:30] k1ttty has joined the channel [15:31] tmcw has joined the channel [15:32] kitt has joined the channel [15:32] joshkehn has joined the channel [15:33] joshkehn has left the channel [15:33] BillyBreen has joined the channel [15:33] jbpros has joined the channel [15:33] gsmcwhirter has joined the channel [15:34] ap3mantus has joined the channel [15:34] Tricks has joined the channel [15:34] jacobolus has joined the channel [15:35] gut4 has joined the channel [15:36] Vespakoen has joined the channel [15:36] Vespakoen: hey guys, how come 1/2 % 4 = 0 and 0.5 % 4 = 0.5 [15:38] Glenjamin: Vespakoen: % is more specific than / [15:38] Glenjamin: (1/2) % 4 = 0.5 [15:38] Glenjamin: wait... [15:39] Glenjamin: oh, nope [15:39] Glenjamin: 1/2 % 4 = 0.5 for me [15:39] megalomix: hello [15:39] booyaa: .. 1/2 % 4 [15:39] catb0t: 0.5 [15:39] jerrysv has joined the channel [15:39] Glenjamin: are you doing this in a language with integer division? [15:39] jetienne_: math isnt a pool on the result tho :) [15:40] neurodrone has joined the channel [15:40] megalomix: i have a 10000000000000$ question :-D but I don't have 10000000000000$ can I ask it anyway? :-D [15:40] tjfontaine: sigh [15:40] joestein has joined the channel [15:41] booyaa: woof! [15:41] booyaa: afk [15:41] megalomix: could someone help me what is the better way to do myFunc async? I mean, node does it async if i pass a callback as parameter OR do i have to use process.nextTick() ? https://gist.github.com/1633585 [15:42] nerdfiles1 has joined the channel [15:42] AndreasMadsen has joined the channel [15:42] nerdfiles1 has left the channel [15:42] tomasztomczyk has joined the channel [15:43] baudehlo: why do you want to call myFunc async? [15:44] meso has joined the channel [15:45] megalomix: baudehlo, only to understand how to create an async function [15:45] tjfontaine: megalomix: fwiw there are existing libraries that will let you iterate an array (among other things) asynchronously [15:45] megalomix: tjfontaine, yes but it is not my scope...i only would like to undersatnd if node CALLs it async [15:45] tjfontaine: megalomix: no, simply passing a function isn't sufficient enough to count as async [15:45] megalomix: OR do i have to use process.nextTick() ? [15:45] dannyamey has joined the channel [15:45] megalomix: tjfontaine, ah ok understand [15:45] baudehlo: megalomix: ok. Well async is only important if you're doing I/O, in which case pretty much everything in the node core will take care of that for you. [15:45] brianloveswords has joined the channel [15:46] aliem has joined the channel [15:46] megalomix: ok [15:46] megalomix: but if i use process.nextTick() does it will be async right ? [15:46] uchuff has joined the channel [15:46] baudehlo: yes. [15:46] megalomix: ok perfect! undersatnd [15:47] kmiyashiro_ has joined the channel [15:47] nibblebot has joined the channel [15:47] jonbaer has joined the channel [15:47] baudehlo: process.nextTick() just gives the event loop chance to do something else. But most uses of it are an anti-pattern. [15:48] megalomix: ah ok [15:48] bnoordhuis: unless you're calculating fibonacci numbers [15:48] megalomix: :) [15:48] Glenjamin: heh [15:49] Glenjamin: or doing something compuationally expensive in the main loop [15:49] megalomix: i'm trying to implement a call AFTER the loop is finished....but i'm also using MYSQL module....it is async so i can't know "Perfectly" when all the job is done [15:49] Glenjamin: which could include normal tasks like producing a CSV file for a large dataset [15:49] npa has joined the channel [15:49] baudehlo: even if you're doing something computationally expensive, it's probably *still* an anti-pattern. [15:50] booo has joined the channel [15:50] baudehlo: process.nextTick() is just going to cost you more CPU cycles. [15:50] Glenjamin: megalomix: thats when you want to use existing solutions for managing callbacks/async flow [15:50] jocafa has joined the channel [15:50] Glenjamin: my personal favourite is http://github/com/caolan/async [15:50] megalomix: i see [15:50] baudehlo: (note though, I say "probably") [15:50] Blorb has joined the channel [15:51] Glenjamin: oh yeah, i'd probably child process to another node in that case [15:51] monk12: hello all, got a node oop question ... I was looking at Felix's node.js basic OOP example... I put the files to run here (need oop module installed): https://gist.github.com/1633643 ... [15:51] monk12: I get an error saying inherits method doesn't exist in oop Object # has no method 'inherits' [15:51] kevwil has joined the channel [15:51] Glenjamin: but sometimes nextTick is the path of least resistance [15:51] megalomix: wait [15:51] monk12: I did a console.dir on 'oop' var/function, and seems like its not there. i guess his cold is old on the website. not sure what i need to do to make the example work [15:51] monk12: his code* [15:51] pietern has joined the channel [15:52] megalomix: nextTick gives the possibility to node to do other stuff, why spend more CPU ? [15:52] baudehlo: monk12: it's in util. [15:52] tjfontaine: baudehlo: he's using some 3rd party module it seems [15:53] dannyamey has joined the channel [15:53] baudehlo: megalomix: because creating a closure for nextTick() to run, and calling nextTick() and getting back into the event loop, none of that is free. [15:53] jacobolus has joined the channel [15:53] aelien27 has joined the channel [15:54] d0k has joined the channel [15:54] megalomix: OK [15:55] Swimming_Bird has joined the channel [15:56] MrTrick has joined the channel [15:56] pietern has joined the channel [15:56] pietern has left the channel [15:57] Topcat has joined the channel [15:58] monk12: baudehlo, cool thanks. added that module and substituted util.inherits(this, EventEmitter); Still getting an error "Cannot read property 'prototype' of undefined". darn googlin' [15:59] baudehlo: monk12: yeah the code is busted. [15:59] rauchg has joined the channel [15:59] dannyamey has joined the channel [16:00] baudehlo: I dunno what "mixin" does. [16:00] eldar has joined the channel [16:00] baudehlo: but util.inherits needs to be outside of your constructor, and look like: util.inherits(KitchenTimer, EventEmitter); [16:00] monk12: hah, cool. Guess there is new ways to do oop in node. is there a good tutorial on how to setup proper oop in node (not sure if that means different ways to go about it, aka prototypical inheritance vs crockfords way to setup classes) [16:01] doki_pen has joined the channel [16:01] ritch1 has joined the channel [16:01] xpigeonx: anyone ever get "Error: write EPIPE at errnoException (net.js:640:11) at Object.afterWrite [as oncomplete] (net.js:478:18)" ? [16:01] xpigeonx: at errnoException (net.js:640:11) [16:01] xpigeonx: at Object.afterWrite [as oncomplete] (net.js:478:18) [16:01] monk12: gotcha, using http://nodeguide.com/object_oriented_programming.html . Guess its outdated. [16:01] Glenjamin: the hint is at the top [16:02] monk12: it does say "This guide is not ready to yet, please go away" haha guess i was warned [16:02] monk12: :) [16:02] Glenjamin: generally, you don't need any oop wrappers [16:02] Alpha|_|: so cluster only supports up to 0.4 can anyone recommend another node process manager? [16:02] meso has joined the channel [16:03] baudehlo: yeah all you need is: function Blah () { ... }; util.inherits(Blah, ParentClass); [16:03] fatjonny has joined the channel [16:03] baudehlo: Alpha|_|: you're pretty much stuck writing your own right now. [16:03] EyePulp: Alpha|_|: Node 6.x and up has a built in cluster mecahnism [16:03] MatthewS has joined the channel [16:03] EyePulp: *mechanism [16:04] Alpha|_|: EyePulp: seen that but it doesn't carry over all of the original cluster project's features [16:04] baudehlo: well, built in, but doesn't do nearly as much as tj's cluster does. [16:04] baudehlo: 0.7 improves things. [16:04] EyePulp: Alpha|_|: Nope. The one for 0.7.x has a number of additional capabilities though. [16:04] dilvie has joined the channel [16:05] sorensen__ has joined the channel [16:05] EyePulp: We finally bit the bullet and migrated. It's been pretty painless. [16:05] sh1mmer has joined the channel [16:05] Alpha|_|: i'll take a look at 0.7, thanks [16:05] jmar777 has joined the channel [16:06] Blorb has joined the channel [16:06] isufy has joined the channel [16:06] baudehlo: ACTION is sticking with 0.4.x until some things are added back in. [16:06] EyePulp: baudehlo: like what? [16:07] monteslu has joined the channel [16:07] twolfson has joined the channel [16:07] Glenjamin: I can't convince myself that my code works fine on 0.6 since my test coverage is fairly average :( [16:08] baudehlo: EyePulp: some way to call qmail-queue from node. [16:08] AndreasMadsen: baudehlo: Modules and plugins do will properly first be added in 0.7+ , it very difficult to make modules to 0.6 - now you are warned. [16:09] baudehlo: AndreasMadsen: sorry, I'm guessing English isn't your first language, but I'm having trouble parsing that... Can you re-word it? [16:09] monk12: offtopic: speaking of sopa/pipa.... Craigslist gave me a good intro on the sopa/pipa stuff and contact links (and a way to get out of main screen back to regular site)... I contacted a couple state reps ... wikipedia put an overlay up... i been "$('#mw-sopaOverlay').remove(); $('#content').css('display','block')" yesterday and today in Firebug. Anyway to get out of the overlay in wikipedia with standard usable buttons, heh? [16:09] baudehlo: EyePulp: it requires passing customFds currently, and that got dropped. [16:10] AndreasMadsen: baudehlo: hehe. There is not may modules to cluster in 0.7, since it is difficult to create modules to v0.6 cluster. [16:10] Hanspolo_ has joined the channel [16:10] AndreasMadsen: baudehlo: hehe. There is not may modules to cluster in 0.6, since it is difficult to create modules to v0.6 cluster. [16:10] baudehlo: right. [16:10] josh-k has joined the channel [16:10] AndreasMadsen: Confusing my self :) [16:10] monk12: Just seems a lil' silly as I scanned and saw no way to close it. [16:10] jmar777_ has joined the channel [16:10] spleeze has joined the channel [16:11] Glenjamin: ah right, you mean cluster isn't very extensible in 0.6 [16:11] Edy has joined the channel [16:11] Edy has joined the channel [16:11] mandric has joined the channel [16:11] pizthewiz has joined the channel [16:11] baudehlo: I was considering writing a wrapper for the 0.6 cluster for Haraka, but now I think I'll just wait and see what drops out in 0.7. [16:11] AndreasMadsen: Glenjamin: yes [16:11] dannyamey has joined the channel [16:11] willwh has joined the channel [16:12] moshen has joined the channel [16:12] megalomix: is there not a "self" object to call the function of the class without hach it with var that = this ? [16:12] tylerstalder has joined the channel [16:12] megalomix: otherwise if i have inner functions i must use that.method1 that.method2 [16:12] megalomix: instead of "this" [16:12] nerdfiles1 has joined the channel [16:13] megalomix: it is not a very big problem but if can i do it better...........is better [16:13] megalomix: :D [16:14] jmar777 has joined the channel [16:14] Lingerance: megalomix: As I said earlier, .bind(), .call() or .apply() [16:14] jacobolus has joined the channel [16:15] Glenjamin: i try and avoid using "that" [16:15] Glenjamin: in small functions i might name it self, otherwise i name it based on what it actually is [16:16] tbranyen: I try and name it what it is [16:16] tbranyen: var view = this; [16:16] megalomix: yes yes [16:17] Glenjamin: bind is ok, but it makes for a weird stack trace [16:18] Glenjamin: i'm not sure on the performance of closing over this vs binding the function to a specific context [16:18] versicolor has joined the channel [16:19] jaha has joined the channel [16:19] bradleymeck has joined the channel [16:19] jmar777_ has joined the channel [16:19] gerard0 has joined the channel [16:20] jaha has joined the channel [16:20] albertosh has joined the channel [16:20] willwh has joined the channel [16:20] willwh has joined the channel [16:20] yhahn has joined the channel [16:21] baudehlo: My gut tells me bind() would probably be slower. [16:21] nerdfiles1 has left the channel [16:21] bradleymeck: bind the c socket function? [16:21] Cromulent has joined the channel [16:21] brianthecoder has joined the channel [16:21] baudehlo: no [16:21] willwhite has joined the channel [16:22] baudehlo: Function.bind() [16:22] echobucket has joined the channel [16:22] pgherveou has joined the channel [16:22] draginx has joined the channel [16:22] jaha has joined the channel [16:23] draginx: is there a way to change the volume/left-right on an mp3 file to give it a... "3d sound"? [16:23] baudehlo: ACTION checks the channel name... yup still says node.js [16:23] igl: they did that in the 60~70ties [16:24] draginx: ^ in node.js *obviously)\ [16:24] igl: with the plastic head with microphones for ears =D [16:24] draginx: like a sound library [16:24] baudehlo: no idea. [16:24] xpigeonx: how can I create a buffer with a pretty long length, 2 ^ 64 to be more precise ? [16:24] igl: dolby has a pseudo 3d tech doo [16:24] igl: too [16:24] BrianE has joined the channel [16:24] paera has joined the channel [16:25] bradleymeck: draginx, http://www.mpgedit.org/mpgedit/mpeg_format/MP3Format.html , seems to have multiple channels [16:25] igl: but its more complicated than left and right fading [16:25] stelleg has joined the channel [16:25] tjholowaychuk has joined the channel [16:25] amasad has joined the channel [16:26] draginx: right.. hmm theres this https://github.com/xk/node-sound but only plays/streams (this is also good though as I need a finger print for each song as well) [16:26] draginx: bradleymeck: ty :) [16:26] baudehlo: xpigeonx: why would you need a buffer that big? [16:26] igl: maybe something you can try with the webkit audio api [16:26] igl: client side then [16:26] baudehlo: xpigeonx: that's like 17 million terrabytes. [16:26] enyovelcora has joined the channel [16:26] enyovelcora has left the channel [16:27] broofa has joined the channel [16:27] nphase_ has joined the channel [16:27] nphase_ has joined the channel [16:27] enyovelcora has joined the channel [16:27] enyovelcora: Hi.. I can't quite figure out how require works [16:27] bradleymeck: just make multiple buffers and daisy chain them, but i doubt you have enough storage to even allocate that much [16:27] xpigeonx: baudehlo: websocket spec allows for data to be sent at that size for future proofing, might as well make my code future proof as well [16:27] enyovelcora: Is everything executed only once in a required file? [16:27] olliey has joined the channel [16:28] bradleymeck: enyovelcora require results are cached, think of it as a singleton [16:28] enyovelcora: bradleymeck: wow… that clarifies a LOT of stuff I just read :) [16:28] enyovelcora: thanks [16:29] statusfailed has left the channel [16:29] themiddleman_itv has joined the channel [16:29] flip_digits has joined the channel [16:29] baudehlo: xpigeonx: so stream it. [16:29] enyovelcora: bradleymeck: so when I write: var mongoose = require('mongoose') I can assume it's always the same instance of mongoose [16:29] clutchski has joined the channel [16:30] reid has joined the channel [16:30] ryanrolds: enyovelcora: Yes [16:30] enyovelcora: Great.. thanks [16:30] bradleymeck: enyovelcora as long as the file 'mongoose' resolves to is the same yes (for example i could have multiple modules with multiple 'mongoose' modules, but thats an edge case) [16:31] brianthecoder: is there any express/connect plugin for routing mobile devices to specific views? [16:31] ryanrolds: bradleymeck: That is kept track of by absolute path is it not? [16:31] raincole_ has joined the channel [16:31] amasad_ has joined the channel [16:31] rtgibbons has joined the channel [16:31] bradleymeck: ryanrolds, yep, but ive seen npm need to pull 2 different versions of a module and that can happen [16:32] bkaney has joined the channel [16:32] barberdt has joined the channel [16:32] davehamptonusa has joined the channel [16:32] jonbaer has joined the channel [16:32] ryanrolds: bradleymeck: Wasn't aware that could happen. [16:32] jacobolus has joined the channel [16:32] dubenstein has joined the channel [16:32] bradleymeck: if X@0.1.1 and X@0.2.0 are used for example [16:33] turrican_ has joined the channel [16:33] SoEasy has joined the channel [16:34] turrican_: hello, got "fatal error: linux/version.h: No such file or directory" (cygwin on Windows 7 x64) What can i do? [16:34] ryanrolds: I'm confused how that would resolve differently, unless you had multiple node_modules dirs. [16:34] willwhite has joined the channel [16:34] ryanrolds: turrican_: 0.6.x? [16:35] turrican_: Yes [16:35] turrican_: 0.6.0 [16:35] Sir_Rai has joined the channel [16:35] _dc has joined the channel [16:35] ryanrolds: Is cygwin still supported under 0.6.x? [16:36] ryanrolds: I heard talk of no longer attempting to keep is working not that windows support has been added. [16:36] ryanrolds: *now that [16:36] jaequery has joined the channel [16:36] turrican_: Yes, there is a description https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) [16:36] xtianw has joined the channel [16:36] ritch1 has left the channel [16:36] Stephen has joined the channel [16:36] ryanrolds: The top has a "big fat warning" [16:37] ryanrolds: And says as of 0.5.5 it doesn't build on cygwin [16:37] bradleymeck: ryanrolds, say we have A that require B and C , A says it needs X@0.1.x in its package.json B wants X@0.2.2 in its package.json and C wants X@0.1.1 in its package.json [16:37] dubenste1n has joined the channel [16:38] apoc has joined the channel [16:38] turrican_: cool, comming from The-M-Project, needs >=0.6 :-( [16:38] ryanrolds: bradleymeck: each of those modules should keep their own dependicies. [16:38] ryanrolds: turrican_: Any reason you can't use the version of node for windows? [16:38] jaequery has joined the channel [16:38] bradleymeck: true, but a reference of X from A will not match the catch entry of the reference of X in B [16:39] bradleymeck: so if you are trying to monkey patch something, or you want to store something (singleton based things like configs / logs) you need to be aware of that [16:39] turrican_: seems The-M-Project want's to use cygwin [16:39] ryanrolds: Sucks to be The-M-Project. [16:40] ivic_ has joined the channel [16:40] koo4 has joined the channel [16:40] turrican_: OK, thanx for the answer [16:40] mattgifford has joined the channel [16:40] _unary has joined the channel [16:40] Aikar: turrican_: i think it means you can use the non cygwin build of node [16:40] Aikar: but you still need cygwin installed to access the binaries (Ie: put cygwin paths in your PATH) [16:41] SoEasy has joined the channel [16:41] iamcorpix has joined the channel [16:41] Aikar: as itll execute nix commands which windows doesnt have, but cygwin provides [16:41] Aikar: turrican_: so drop node.exe from the site in your cygwin install, then use it [16:42] ryanrolds: Sorry, I'm a purest. If you want the *nix functionality use a *nix system. [16:42] Aikar: ryanrolds: i agree :P [16:42] turrican_: will try later thanx [16:42] Aikar: I reinstalled windows to play games [16:42] ivic has joined the channel [16:42] Aikar: I loaded it for like 1 day [16:42] Aikar: havent been back since >_> [16:42] turrican_: it a company pc! [16:42] ryanrolds: Games are the only reason the machine I'm on right now is Windows 7. [16:42] Aikar: get a better job :P I'm running ubuntu at work! [16:42] kevwil has joined the channel [16:43] Aikar: and noone even has access to my pc but me [16:43] aliem has joined the channel [16:43] chrisvwebdev has joined the channel [16:43] ryanrolds: Loaded it for the reddit blackout? haha [16:43] willwh: there is always virtualbox too [16:44] Margle has joined the channel [16:44] ryanrolds: Sigh, what happened to the gold old days when you need to run on OS you just ran it instead of trying to fake it? [16:44] FIQ has joined the channel [16:44] ryanrolds: *good ole days [16:45] davetayls has joined the channel [16:45] LeMike has joined the channel [16:46] josh-k has joined the channel [16:46] ivic has joined the channel [16:47] albertosh has joined the channel [16:48] kevwil has joined the channel [16:48] ryanrolds: Aikar: Looks like you're right. Can still use Cygwin, just can't build under it. [16:49] ryanrolds: I wonder if you can get modules to build correctly on in cygwin while using windows version of node. [16:49] ryanrolds: That sounds like mess. [16:50] jacobolus has joined the channel [16:50] ryanrolds: *like a [16:50] raenger has joined the channel [16:50] warz has joined the channel [16:50] warz has joined the channel [16:51] HardBit has joined the channel [16:52] martin_sunset_ has joined the channel [16:52] draginx has left the channel [16:53] boltR has joined the channel [16:53] ivic has joined the channel [16:53] neurodrone has joined the channel [16:53] isufy has joined the channel [16:54] _dc has joined the channel [16:54] bradleymeck: baudehlo, which hook would be for incoming on Haraka after it is processed by any other hooks? [16:55] baudehlo: queue [16:56] jetienne_ has left the channel [16:57] ivic has joined the channel [16:58] GrizzLyCRO has joined the channel [16:58] Tobsn has joined the channel [16:59] SoEasy: Hello all! Tell me please: what better for real-time interaction (for example in flash game) - sockets or polling strategy? [17:00] lperrin has joined the channel [17:00] Aikar: is that a troll question [17:00] benares_98 has joined the channel [17:00] igl: lol [17:00] maritz: SoEasy: you should use SOAP and long-polling [17:00] mmalecki: lol [17:01] TimTim has joined the channel [17:01] Aikar: but isnt wikipedia telling us to not use SOAP?! [17:01] SoEasy: Hmm, no, i`m seriously. Now i choose a sockets because i don`t want work with COMET Server, AMQ and other things... [17:01] maritz: Aikar: i don't know. wikipedia is all black :P [17:01] maritz: SoEasy: What are you seriously? [17:02] SoEasy: sockets or long polling [17:02] Aikar: SoEasy: AMQ is on sockets [17:02] maritz: SoEasy: You're seriously sockets or long polling? Why? [17:02] SoEasy: I`m sorry for my english, i`m from Russia :-[ [17:02] maritz: :D [17:02] maritz: ok, you're exucsed and I apologize. [17:02] Aikar: in soviet russia, sockets long poll you [17:02] maritz: *excused [17:02] igl: try socket.io [17:03] igl: falls thru, websocket > flash-socket > long polling [17:03] HardBit: SoEasy: =D i like russia! i'm from Mexico [17:03] igl: all covered [17:03] alvaro_o has joined the channel [17:03] mmalecki: I like vodka, does it count? [17:03] joshthecoder: socket.io +1 [17:03] GrizzLyCRO: SoEasy: if you have to ask that question, go with whatever looks easiest to implement [17:03] CarlosC has joined the channel [17:03] HardBit: SoEasy: try libs rocket.io o faye [17:03] HardBit: socket.io* [17:03] andrewtennison has joined the channel [17:04] isaacs has joined the channel [17:04] joshthecoder: itscales.io [17:04] Alpha|_|: hi [17:04] Aikar: i had to go see what http://rocket.io/ was >_> [17:04] SoEasy: this libs for flash? I see it and think it`s good for web-based clients. My client write in Flash/AS3 [17:04] HardBit: Aikar: xD sorry [17:04] draginx has joined the channel [17:04] joshthecoder: SoEasy: rewrite it in HTML :) [17:04] igl: socket.io has flash sample code i believe [17:05] SoEasy: yes, i know it and i see it ) [17:05] draginx: Whats the "best" dev tool for nodejs? dev/always/octoploy/run/etc.? [17:05] mmalecki: socket.io is an anti-module for me [17:05] HardBit: SoEasy: socket.io Supported transports "Adobe® Flash® Socket" [17:05] maritz: Aikar: rocket.io is from ESA and not open source yet, sorry. [17:05] mmalecki: draginx: I use forever [17:05] mmalecki: but I'm biased [17:05] clutchski: mmalecki: why? [17:06] mmalecki: clutchski: why I'm biased? or why forever? [17:06] igl: is forver still based on daemon-node? [17:06] Venom_X has joined the channel [17:06] mmalecki: igl: yeah, but I plan to change it asap [17:06] maritz: mmalecki: why socket.io is an anti-module [17:06] clutchski: mmlecki: why is socket.io an "anti-module"? [17:06] mmalecki: and by asap, I mean when forever becomes sane [17:06] mmalecki: s/forever/fork/ [17:06] trotter has joined the channel [17:07] mmalecki: (I mean, fork.disconnect() and stuff) [17:07] mmalecki: soooo [17:07] captain_morgan has joined the channel [17:07] jacobolus has joined the channel [17:07] mmalecki: different transports could be easily isolated into seperate modules [17:07] mmalecki: https://github.com/LearnBoost/socket.io/tree/master/lib/transports [17:08] chadskidmore has joined the channel [17:08] trotter has joined the channel [17:09] jakr has joined the channel [17:09] mmalecki: also, it bundles some outdated websocket client [17:09] jamund has joined the channel [17:10] kmiyashiro has joined the channel [17:10] letsgojuno has joined the channel [17:10] clutchski: i'm curious about to run websockets in prod. load balancers, restarting web servers, etc. [17:10] clutchski: *how to run [17:11] clutchski: i guess because it adds state to web servers [17:12] MadGu1 has joined the channel [17:12] unomi: How do you guys feel about faye on node? [17:12] bradleymeck: clutchski it does not add state, just a persistent communication channel [17:12] rendar: unomi: what is faye? [17:12] stonebra_ has joined the channel [17:12] bradleymeck: unomi i feel it is a little behind socket.io but if you must use other languages faye has more support [17:13] tdegrunt has joined the channel [17:13] robi42 has joined the channel [17:13] bradleymeck: socket.io's channels and events are much nicer [17:13] jaequery has joined the channel [17:13] unomi: rendar: http://webcache.googleusercontent.com/search?q=cache:sLL77qxv77sJ:faye.jcoglan.com/+browser&cd=1&hl=en&ct=clnk&gl=th [17:14] MadGu1: Hi all ! I'm trying to stress test a nodejs/socket.io application, usually I use curl-loader for this task, but this tool didn't yet support web socket load test. [17:14] clutchski: bradleymeck: but that's still sort of state no? what happens when a webserver goes down that has a websocket connection? there's work to do to get that user seamlessly connected on a different server no? [17:14] unomi: bradleymeck: does the bayeux protocol add anything beyond what socket.io achieves? [17:15] bradleymeck: clutchski, thats the same as ajax? [17:15] bradleymeck: you shouldnt tie a transaction to an incomplete communication [17:15] MadGu1: Is there someone already do something like this ? [17:15] unomi: I picked the wrong day to do research on the interwebs it seems [17:15] clutchski: well, usually a load balancer will handle that right and ideally you can bring web servers up and down willy nilly. how does that work with web sockets? [17:15] bradleymeck: clutchski, the connection is killed, like it should be [17:16] bradleymeck: clutchski, if a websocket dies, just reconnect, if you are not keeping a message queue there are a whole slew of problems that are bigger than unreliable network [17:16] joshthecoder: if the client is graceful at handling disconnects and auto-reconnecting shouldn't be an issue. [17:16] bradleymeck: unomi not to my knowledge [17:16] clutchski: oh ok. so maybe it's not as challenging as i think. do you think there are any extra operational challenges with websockets as opposed to plain old http? [17:17] MadGu1: yes normally client reconnect after a 10 seconds timeout [17:17] unomi: clutchski: for the most part, unless you are leveraging something like persevere2, you will need to manage that yourself, ie, a queue / distribution network that your socket.io solution communicates through [17:17] pdodde has joined the channel [17:17] MadGu1: no use haproxy for that [17:17] unomi: I am thinking here where you need someone connected on server A to talk to someone connected to server B [17:17] jaequery has joined the channel [17:18] clutchski: cool, good information. thanks. [17:18] MadGu1: if you want a config sample :) [17:18] dgathright has joined the channel [17:19] MadGu1: @unomi : I think you've to user a datastore for that, if you use two different physical servers, you can't write to the other socket [17:20] ryanfitz has joined the channel [17:23] RobWC has joined the channel [17:23] unomi: MadGu1: well, you don't *need* a datastore, but it certainly can be a good idea [17:23] bradleymeck: baudehlo, do i not have access to node methods in a Haraka plugin? im getting require and console are not defined errors [17:23] dob__ has joined the channel [17:23] bartt has joined the channel [17:24] nerdfiles1 has joined the channel [17:24] unomi: as in, you could simply open direct connections between the backend servers, or have a mechanism for migrating connections [17:24] MadGu1: @unomi : or use socket connection, could be better perhaps [17:24] tomasztomczyk has joined the channel [17:24] ph^ has joined the channel [17:24] franciscallo has joined the channel [17:24] baudehlo: bradleymeck: console isn't there. Use the logging instead. But require() works fine... [17:25] chrisvwebdev1 has joined the channel [17:25] MadGu1: and do you use web sockets with a large amount of users ? [17:26] MadGu1: i'm actually searching how to stress test my application [17:26] pizthewiz has joined the channel [17:26] MadGu1: and it seems that the only solution at this time is to launch multiple instances of node-websocket-client [17:27] jxson has joined the channel [17:27] mark_azevedo has joined the channel [17:28] jacobolus has joined the channel [17:29] salazr_ has joined the channel [17:30] igl1 has joined the channel [17:30] mikeal has joined the channel [17:31] ericmuyser has joined the channel [17:31] maletor has joined the channel [17:32] sharkbird has joined the channel [17:33] dschn has joined the channel [17:33] mxbtty has joined the channel [17:34] robde has joined the channel [17:35] nakkor has joined the channel [17:36] ryanrolds_w has joined the channel [17:36] simb has joined the channel [17:36] xxiao: ACTION found out node is one of the best interactive js shell  [17:37] kmiyashiro_ has joined the channel [17:37] nakkor: thoughts on how fast Amanzon's new DynamoDB witll be implemented in Node? [17:37] patcito has joined the channel [17:37] nakkor: I am very excited for it! [17:37] yawNO has joined the channel [17:37] mmalecki: is it open source? (I know the answer already) [17:38] xxiao: mmalecki: is it (I don't yet know the answer) [17:38] mmalecki: xxiao: it isn't :) [17:39] kenperkins: question for you guys, when you have an asnyc resolution dns failure, how do you trap that? [17:39] mmalecki: also, vendor lockin [17:39] bkaney has joined the channel [17:39] wesley__: anyone have any pointers to what ._controlledRelease property is about? [17:39] kenperkins: dns<-->resolution [17:39] aaronmcadam has joined the channel [17:40] LuckySMack has joined the channel [17:40] baudehlo: nakkor: why does it need implemented? http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/UsingJSON.html [17:40] baudehlo: kenperkins: your callback is still called, with an error. [17:40] nakkor: baudehlo: Well, I was more thinking of a mongoose port or something, so it works with other libs (like everyauth) [17:40] kenperkins: do I need the try within the callback? [17:40] CarterL has joined the channel [17:41] kenperkins: I wrapped the outer call in a try catch, but it's not catching [17:41] jsurfer has joined the channel [17:41] baudehlo: callback first param is err. [17:41] kenperkins: but why is it throwing an exception then? [17:41] baudehlo: it shouldn't... [17:41] bradleymeck: kenperkins i just propagate it up the callback chain [17:41] baudehlo: gist the code? [17:41] bradleymeck: sometimes authors forget to add that to the library [17:43] baudehlo: nakkor: fair enough... honestly people shouldn't be using EC2 anyway. It's WAY overpriced. [17:43] kenperkins: https://gist.github.com/1634416 [17:44] kenperkins: mayeb that can expain it better [17:44] chrisvwebdev1 has left the channel [17:44] nakkor: baudehlo: price is relative, especially when your platform can tie into all the other cool things that aws has [17:44] icebox has joined the channel [17:44] baudehlo: yes, relatively it's 10x more expensive than colo. [17:45] baudehlo: or looking another way, 10x slower, with appalling disk I/O speeds. [17:45] baudehlo: kenperkins: ah I've seen this brought up on the list before. I think it's a bug in the libraries somewhere... [17:46] kenperkins: oh joy [17:46] baudehlo: kenperkins: the work-around is to resolve the host to an IP first, using the core dns libraries. [17:46] kenperkins: ah nice [17:46] kenperkins: dns.resolve then? [17:46] jacobolus has joined the channel [17:46] baudehlo: yes. [17:47] ambroff has joined the channel [17:48] simb has left the channel [17:48] eignerchris has joined the channel [17:50] EriksLV has joined the channel [17:50] bnoordhuis: kenperkins: this.stream.on('error', function(e) { ... }) [17:50] bnoordhuis: kenperkins: tls.connect() is async, it doesn't throw [17:50] MrTrick has joined the channel [17:51] carlyle has joined the channel [17:51] baudehlo: ah crap yeah what bnoordhuis said. Ignore me. Though there *was* a bug like this somewhere in node core a few months ago. [17:53] sarlalian has joined the channel [17:55] mraleph has joined the channel [17:56] jacobolus has joined the channel [17:57] kenperkins: yep, that was exactly it [17:57] kenperkins: I forget that the error is coming from an event [17:58] AaronMT has joined the channel [17:59] CrabDude has joined the channel [17:59] cgfuh has joined the channel [18:00] kmiyashiro_ has joined the channel [18:00] r1ngzer0 has joined the channel [18:02] reid has joined the channel [18:03] ryan_stevens has joined the channel [18:03] mast3rof0 has joined the channel [18:04] jstash has joined the channel [18:04] xpigeonx has joined the channel [18:04] dandean has joined the channel [18:05] xpigeonx: does it make sense to have outside processes do computational heavy work within a node server, so your server doesn't block when processing large amounts of data ? [18:05] draginx has left the channel [18:05] ryanrolds_w_ has joined the channel [18:06] bnoordhuis: xpigeonx: yes [18:06] mmalecki: xpigeonx: yes [18:06] hipsters_ has joined the channel [18:06] ePirat has joined the channel [18:07] xpigeonx: is it better do fork other node processes for computational heavy work, or do c/c++, and if the later whats the standard ipc? [18:07] LuckySMack_ has joined the channel [18:07] vkandy: hello guys, what happens if i start more workers than available cpus? will some starve? [18:07] djazz has joined the channel [18:07] jamund: I have a script that works great when I run it with node 4.12, but on node 6.7 seems to leak memory and or crash. any known obvious areas to look? it does a lot of database stuff and uses async.js to do things in batches. [18:08] cw3de has joined the channel [18:08] cw3de has left the channel [18:08] dandean has joined the channel [18:08] AndreasMadsen: vkandy: no [18:08] xpigeonx: vkandy: it will put more work on the OS scheduler, from the very general rule of thumb, fork n + 1 processes where n is your number of cores [18:08] tkaemming has joined the channel [18:09] xpigeonx: vkandy: but thats more of a rule for a blocking environment, I'm not sure if you can follow it with node [18:09] vkandy: thanks AndreasMadsen, xpigeonx .. does n+1 include the master? [18:09] mmalecki: xpigeonx: I'd just fork node processes, for IPC see child_process.fork [18:09] prettyrobots has joined the channel [18:10] zzo has left the channel [18:10] domino14 has joined the channel [18:10] AndreasMadsen: vkandy: You should have only cpuNum workers, node event-loop take care of the rest, so you will end up with cpunum + 1 process. [18:10] xpigeonx: vkandy: yes, it does [18:11] SoEasy has joined the channel [18:11] retornam has joined the channel [18:11] vkandy: ah ok! thanks for the explanation guys. [18:12] jakr has left the channel [18:12] AndreasMadsen: mmalecki: I thought you where looking for caves? [18:13] jerrysv has joined the channel [18:13] npa has joined the channel [18:13] kmiyashiro has joined the channel [18:14] shinuza has joined the channel [18:14] mmalecki: AndreasMadsen: yeah, I'm in one already! implementing this crazy thing [18:14] TimTim: anyone know the difference in performance between calling readdirSync repeatedly versus keeping the results in memory and reading instead if/when available? [18:14] mmalecki: I'll be back in a year or two [18:14] TimTim: is it neglible? [18:14] brngardner has joined the channel [18:14] TimTim: negligible* [18:14] deedubs has joined the channel [18:15] AndreasMadsen: mmalecki: What crazy stuff? [18:15] vkandy: one more question before i let you guys go :) i have 2 single core nodejs machines. Both run one worker. within the worker i have 2 cron jobs ... so thats 4 crons on 2 machines [18:16] perezd has joined the channel [18:16] StanlySoManly has joined the channel [18:16] vkandy: on one machine the crons worked for more than a month and it suddenly stopped firing. the other nodejs machine is ok (crons fire etc) [18:16] mmalecki: AndreasMadsen: dunno, some v8 stuff XD [18:16] vkandy: i run both http and a tcp service on both machines ... [18:17] nerdfiles1 has joined the channel [18:17] vkandy: is there any reason 1 worker would starve? there are no exceptions .... [18:17] pifantastic has joined the channel [18:17] nathanpalmer has joined the channel [18:17] TimTim: how does readdir/Sync work? does it cache the filenames? [18:17] TimTim: anyone know? [18:17] AndreasMadsen: mmalecki: Do not wast time on v8, it is a crazy beast allready :) [18:17] nerdfiles1 has left the channel [18:17] AndreasMadsen: s/allready/already [18:17] pifantastic: If I fire up an EC2 micro and the compile node, can I just transfer the `node` binary to another machine and expect it to work? [18:17] hackband has joined the channel [18:17] tbranyen: according to adobe node.js should have been node.as [18:17] boltR has joined the channel [18:18] TimTim: rofl @ tbranyen [18:18] jerrysv: would have been better. we could have compiled everything [18:18] jacobolus has joined the channel [18:18] rendar: lol [18:18] jerrysv: then we wouldn't need an engine like v8 [18:18] vkandy: tbranyen thats awesome! [18:18] jerrysv: JIT is a dead philosophy [18:20] jerrysv: hmph. i guess i can't troll as well i used to [18:20] Aikar: pifantastic: if its the same distro it should [18:20] slaskis has joined the channel [18:20] pifantastic: Aikar: sweet, thanks [18:22] hackband has joined the channel [18:24] TooTallNate has joined the channel [18:24] ouch has joined the channel [18:24] ouch: cheers all [18:25] ouch: i am using the cluster module and i got a problem - i need cross-process communication [18:25] ouch: and events [18:25] janekp has joined the channel [18:26] AndreasMadsen: ouch: Use TCP (try the dnode module) [18:26] ouch: AndreasMadsen checking [18:27] hackband_ has joined the channel [18:27] jakehow has joined the channel [18:27] TimTim: how does readdir/Sync work? does it cache the filenames? [18:27] TimTim: or does it hit the disk every time? [18:27] zeade has joined the channel [18:28] EuroNerd has joined the channel [18:28] churp has joined the channel [18:28] ouch: AndreasMadsen i dont think it is what i want [18:28] MatthewS has joined the channel [18:28] d0k_ has joined the channel [18:28] AndreasMadsen: ouch: Oh sorry, thought you wrote cross-platform, sec [18:28] AndreasMadsen: ouch: You just send a message to master and then send it back to all other workers [18:29] bnoordhuis: TimTim: it doesn't cache [18:29] AndreasMadsen: using process.send [18:29] ouch: AndreasMadsen thats a neat idea but how to achieve? API description says nothing about it [18:29] letsgojuno has joined the channel [18:29] vkandy: ouch see message passing here: http://nodejs.org/docs/v0.6.0/api/cluster.html [18:30] ouch: i have chosen such an irritating name [18:30] rwaldron has joined the channel [18:30] ouch: :D [18:30] ouch: vkandy thank you [18:31] tjfontaine: TimTim: what your OS does underneath is a different story [18:31] warz has joined the channel [18:31] warz has joined the channel [18:32] hackband has joined the channel [18:32] dgathright has joined the channel [18:32] ouch: vkandy thats not working [18:32] Tricks has joined the channel [18:32] TheFuzzball has joined the channel [18:33] ouch: vkandy i emitted events from workers and they did nothing... i need to send and recieve events from workers [18:33] Kunda has joined the channel [18:34] vkandy: like AndreasMadsen said, its gotta be through master ... [18:34] vkandy: the example from api doc isnt working? [18:34] ouch: oh indeed sorry im tired [18:34] ouch: hacking for like 14 hours now [18:34] tommyvyo has joined the channel [18:35] xpigeonx: how do I create a new stream in node? [18:35] ouch: vkandy naaa its not working cause i dont work trough the master but i will now [18:36] langworthy has joined the channel [18:37] boltR has joined the channel [18:38] hackband has joined the channel [18:38] Chris_ has joined the channel [18:39] elijah has joined the channel [18:39] ouch: vkandy now i understand how to send info from worker to master [18:39] ouch: vkandy but how to send from master to worker? [18:40] AndreasMadsen: var worker = cluster.fork(); worker.send(msg); [18:40] ouch: AndreasMadsen piss easy, ty [18:40] mikeal has joined the channel [18:41] nerdfiles1 has joined the channel [18:41] simeon has joined the channel [18:41] `3rdEden has joined the channel [18:41] yawNO: baw [18:41] vkandy: AndreasMadsen what would you recommend for message passing between node machines? [18:41] yawNO: i ate too much cake [18:42] yawNO: :| [18:42] ouch: vkandy AndreasMadsen I wanted to ask the same thing [18:42] vkandy: i ended up writing a little multicasting service with what node 0.6 provides ... which is not much [18:42] ouch: vkandy I am thiking abou pushing this message passing out to the database layer [18:42] ouch: vkandy but that will be slower for sure [18:43] vkandy: i looked at hook.io [18:43] AndreasMadsen: vkandy: ouch: I would use HTTP with JSON, there was a nodeup recommending just that [18:43] nerdfiles1 has left the channel [18:43] AndreasMadsen: vkandy: Yes hook.io could work to, I think - have not used it [18:44] vkandy: http between node machines? what if i am running http (express) [18:44] litropy has joined the channel [18:44] ouch: AndreasMadsen problem is i cant really access different machines via http its all happening behind the scenes ( the load balancing ) [18:44] vkandy: yes lb (forgot about that) [18:45] AndreasMadsen: ouch: You will do the http from master, not workers [18:45] ouch: AndreasMadsen seriously dont get ya, but im sure its me :S [18:45] vkandy: AndreasMadsen: how would you send a http message to a worker on a remote machine? [18:45] Shaunzie has joined the channel [18:46] AndreasMadsen: vkandy: I wouldn't, I will send a message to a master and then send it to a worker [18:46] spleeze has joined the channel [18:47] AndreasMadsen: vkandy: If you move the http to workers, the OS will do it magic - and you won't know what worker there get the message. [18:47] vkandy: AndreasMadsen: sorry i meant how can i send a http msg to a remote master? most configurations have a lb directing the traffic [18:47] strevat_ has joined the channel [18:47] albertosh has joined the channel [18:47] vkandy: so node1 -> node2 communication goes through the loadbalancer [18:47] letsgojuno has joined the channel [18:48] insin has joined the channel [18:48] coderarity has joined the channel [18:48] tomtomaso has joined the channel [18:48] hackband has joined the channel [18:48] coderarity has joined the channel [18:48] aaronmcadam has joined the channel [18:48] AndreasMadsen: vkandy: sorry I did not get that [18:49] AndreasMadsen: http://nodeup.com/nine [18:50] ryanrolds_w_: I like the line the user list that separates the OPs from the mortals. [18:50] ryanrolds_w_: *line in the user list [18:50] AndreasMadsen: ^-- it explain how to having a big cluster, and how to communicate between parts of it [18:50] MrBig has joined the channel [18:50] arcanis has joined the channel [18:51] vkandy: AndreasMadsen: thanks for the link to nine. i am reading now [18:51] `3rdEden has joined the channel [18:51] domino14 has joined the channel [18:52] jacobolus has joined the channel [18:53] MrBig: rant : restarted router, have irc but no http :/ [18:55] Hanspolo has joined the channel [18:55] cha0s has joined the channel [18:55] cha0s has joined the channel [18:55] EhevuTov has joined the channel [18:56] MrTopf has joined the channel [18:57] vkandy: AndreasMadsenL is nine a module? [18:57] tanguito has joined the channel [18:57] prasmussen has joined the channel [18:57] AndreasMadsen: vkandy: it is a podcast [18:57] Tricks_ has joined the channel [18:58] mc_greeny has joined the channel [18:58] devongovett has joined the channel [19:00] adraen has joined the channel [19:02] maushu has joined the channel [19:03] BrianE has joined the channel [19:03] adraen: Hi, I started playing with nodejs and jParser however I have some trouble to get it working, I know jParser is not an officially supported plugin but if anyone can give me an hint. The code i'm running is http://www.friendpaste.com/3w62CQ9ICdLiMIM2U0DLa4 and i'm getting "Expecting a function in instanceof check, but got " [19:04] dshaw_ has joined the channel [19:05] madhums has joined the channel [19:06] tdegrunt has joined the channel [19:06] spleeze has joined the channel [19:07] dodo has joined the channel [19:07] polarbear4 has joined the channel [19:08] Me1000 has joined the channel [19:08] polarbear4: i am using mongoose and i want to do 2 saves, but with data from one save passes to the second. i tried having a save in a save function but it was freezing things up. [19:08] eb4890 has joined the channel [19:08] polarbear4: what is the best way to have a save with data from the first save? [19:09] jxson has joined the channel [19:11] soapyillusions has joined the channel [19:11] adraen: polarbear4: have you tried to use the callback function passed to save() and use this to reference the object that has been saved ? [19:11] hz has joined the channel [19:11] Sembiance: js> "test" [19:11] purr: Sembiance: (string) 'test' [19:11] jacobolus has joined the channel [19:11] Sembiance: js> var count = 3; while(count--) { console.log(count); } [19:12] purr: Sembiance: undefined; Console: 2, 1, 0 [19:12] Sembiance: that's normal. [19:12] Sembiance: js> var count = 0; while(count--) { console.log(count); } [19:12] purr: Sembiance: undefined [19:12] Sembiance: that's expected. [19:12] Sembiance: js> var count = 3; while(count--) { console.log(count); } while(count--) { console.log(count); } [19:12] purr: Sembiance: Timeout Error: Execution time exceeded 2 seconds [19:12] Sembiance: infinite loop, that wasn't expected. [19:12] Sembiance: any ideas whay JS behaves that way? [19:13] alvaro_o has joined the channel [19:13] Heisenmink has joined the channel [19:13] tbranyen: Sembiance: 0 is the only falsy number [19:14] tbranyen: all negative numbers are truthy [19:14] tbranyen: so .... [19:14] Sembiance: ahhhh [19:14] tbranyen: which is why (~"something".indexOf("thing")) == true [19:14] Margle has joined the channel [19:14] mbrevda_ has joined the channel [19:16] adraen: Anyone uses jParser successfully with an up to date revision from npm and node 0.6.7 ? [19:16] Sembiance: tbranyen: thanks :) [19:16] tbranyen: np [19:17] joshfinnie has joined the channel [19:18] hipsters_ has joined the channel [19:19] polarbear4: adraen: i have right now - http://pastie.org/3209120 [19:19] polarbear4: the output is: 1 [19:19] polarbear4: 2 [19:19] polarbear4: 4 [19:19] polarbear4: 8 [19:20] jacobolus has joined the channel [19:21] thax has joined the channel [19:21] level09 has joined the channel [19:21] Sembiance: js> var count = 3; while((count--)>0) { console.log(count); } while((count--)>0) { console.log(count); } [19:21] purr: Sembiance: undefined; Console: 2, 1, 0 [19:21] Sembiance: that's better :) [19:22] tkaemming has joined the channel [19:22] coderarity: var count = 3; while((--count)>0) { console.log(count); } [19:22] coderarity: oops [19:22] coderarity: > var count = 3; while((count--)>0) { console.log(count); } [19:22] alex__ has joined the channel [19:22] coderarity: -_- [19:22] coderarity: js> var count = 3; while((count--)>0) { console.log(count); } [19:22] purr: coderarity: undefined; Console: 2, 1, 0 [19:22] adraen: polarbear4: after your 1 2 4 8 you don't have any 5 and 6 /7 ? [19:22] coderarity: js> var count = 3; while((--count)>0) { console.log(count); } [19:22] purr: coderarity: undefined; Console: 2, 1 [19:22] coderarity: i need to work on that [19:23] coderarity: why isn't it printing 3 first [19:23] polarbear4: adraen: nope. [19:23] coderarity: oh, it's before and after the COMPARISON [19:23] jefferai has joined the channel [19:23] jj0hns0n has joined the channel [19:24] uberbrady has joined the channel [19:24] MadGu1 has joined the channel [19:24] wdperson has joined the channel [19:24] okee has joined the channel [19:25] jldbasa has joined the channel [19:25] xtianw has joined the channel [19:26] counterbeing has joined the channel [19:26] EyePulp has joined the channel [19:26] colinclark has joined the channel [19:28] gltiich has joined the channel [19:28] mikeal has joined the channel [19:29] prettyrobots_ has joined the channel [19:29] devongovett has joined the channel [19:30] Shaunzie has joined the channel [19:30] Shaunzie has joined the channel [19:31] CIA-101: libuv: 03Ben Noordhuis 07master * rdd7e6f0 10/ test/test-timer.c : test: don't use malloc/free in test-timer - http://git.io/nQkZdA [19:31] CIA-101: libuv: 03Ben Noordhuis 07master * ree10cb7 10/ src/unix/core.c : unix: use container_of() instead of w->data - http://git.io/-LiLPw [19:31] CIA-101: libuv: 03Ben Noordhuis 07master * r28b0867 10/ (src/unix/core.c src/unix/internal.h src/unix/udp.c): unix: clean up udp shutdown sequence - http://git.io/BegSYQ [19:31] CIA-101: libuv: 03Ben Noordhuis 07master * r454e021 10/ src/unix/udp.c : unix: clean up udp read/write watchers - http://git.io/SBrDUg [19:31] wdbl has joined the channel [19:33] flip_digits has joined the channel [19:33] dob_ has joined the channel [19:33] praCt has joined the channel [19:34] postwait has joined the channel [19:34] cronopio has joined the channel [19:34] boltR_ has joined the channel [19:34] khrome has joined the channel [19:37] praCt: can i use net.createServer to connect to rcon, or net.stream.connect would be better? Also is there any modules that would possible make this a bit easier? [19:37] bnoordhuis: praCt: rcon as in quake 3 rcon? [19:37] praCt: yes, sir [19:37] MadGu1 has joined the channel [19:37] wdbl: in the path.js file, ~line 321, the posix version of exports.join uses Array.prototype.slice.call(...); but then on the next line it uses the paths.filter instead of calling Array.prototype.filter.call(...); - why call an array function one way on the first line and then use a different calling convention on the next line? [19:37] isaacs has joined the channel [19:37] bnoordhuis: praCt: use the dgram module, rcon is udp based [19:38] praCt: looking it up right now, thank you [19:38] bnoordhuis: my pleasure [19:38] MadGu1 has joined the channel [19:38] isaacs: ________________: nice nick. for a second, i thought it was some kind of separation in my irc client. [19:38] kuebk has joined the channel [19:39] richardr_ has joined the channel [19:39] adambeynon has joined the channel [19:39] EyePulp has joined the channel [19:40] Destos has joined the channel [19:40] praCt: a lot of creativity went int o this one [19:40] salva has left the channel [19:41] Vespakoen has joined the channel [19:41] isufy has joined the channel [19:42] wdbl: it seems like every core js file in node calls array.slice by doing Array.prototype.slice.call(target, n); Does anyone know why that single function is called that way, but other Array functions are called like normal? Object.prototype.hasOwnProperty seems to be another one that is always called like this too... [19:42] wdbl: there's even this - Array.prototype.slice.call(arguments, 0).filter(f); [19:42] jerrysv: wdbl: arguments is "special" [19:42] litropy_ has joined the channel [19:43] EhevuTov has joined the channel [19:43] insin: to call it with the given argument as "this", in the case of slice because you're dealing with an Array-like which isn't an Array [19:43] jerrysv: it's not a true array, but can act like one. that just calls Array's slice to convert it into a real array, using "arguments" as "this" [19:43] wdbl: ok, what about all the calls to Object.prototype.hasOwnProperty.call(target, prop) then? [19:43] soapyillusions has joined the channel [19:44] wdbl: (thx btw, I do see that most of those slice.calls are made for "arguments"!) [19:44] insin: same reason, although I'd have to see context to guess at any particular scenario [19:44] jerrysv: i'm blanking on that one too, sorry [19:45] igl: in case of a empty proto object from Object.create() probably [19:45] insin: calling it that way, makes it act as if target has a hasOwnProperty "method" [19:45] jj0hns0n has joined the channel [19:46] jerrysv: which some things won't, there still are a couple of "special" objects out there (see Date) [19:46] lzskiss has joined the channel [19:46] wdbl: ok, I thought it was protection against overriding the hasOwnProperty method or somethong [19:46] whitman has joined the channel [19:46] wdbl: something. [19:47] colinclark has joined the channel [19:47] selend has joined the channel [19:48] loucal has joined the channel [19:48] stefpb has joined the channel [19:48] fantastikibne has joined the channel [19:48] fantastikibne: can i choose source ip when i send http request? [19:48] Locke23rus has joined the channel [19:49] CIA-101: node: 03Ingmar Runge 07cryptopad * r2cafc70 10/ src/node_crypto.cc : Crypto: Adding ability to turn off automatic PKCS padding. - http://git.io/eiwLbw [19:49] CIA-101: node: 03Ingmar Runge 07cryptopad * rb617ec8 10/ test/simple/test-crypto-padding.js : Crypto: Adding tests for new padding control. - http://git.io/R2JpUA [19:49] CIA-101: node: 03Ingmar Runge 07cryptopad * r8b7d809 10/ doc/api/crypto.markdown : Documentation for crypto's setAutoPadding. - http://git.io/Cn4XoQ [19:49] npa has joined the channel [19:49] insin: you can use that technique on call and apply themselves to use them on weird functions which don't have them! (Some of the builtins in IE6, for example) - https://gist.github.com/1074217 [19:51] wdbl: insin: I understand what call and apply do, I was just wondering _why_ they were being used where they were being used since I thought that arguments was a normal array and that all object instances had the "hasOwnProperty" method. [19:51] FireFly has joined the channel [19:51] wdbl: I should have known better than to think that I can depend on anything "always being there" in javascript :) [19:51] selend has left the channel [19:52] jacobolus has joined the channel [19:52] josephmoniz has joined the channel [19:52] wdbl: I think I might just resort to writing whole programs where every call is in the form of Class.prototype.method.call(...); so I can keep my sanity. [19:52] jerrysv: that could be amusing [19:52] jerrysv: also good for currying [19:53] benvie: var callbind = Function.prototype.call.bind.bind(Funtion.prototype.call) [19:53] davetayls has joined the channel [19:53] benvie: callbind for life [19:54] wdbl: lol [19:55] mbrevda_ has joined the channel [19:56] dshaw_1 has joined the channel [19:58] strevat_ has joined the channel [19:58] kmiyashiro: benvie: what does that do? [19:58] sakkaku has joined the channel [19:59] benvie: var slice = callbind(Array.prototype.slice); var args slice(arguments); [19:59] benvie: * args = [19:59] jerrysv: curry [19:59] isufy has joined the channel [19:59] mark_azevedo has joined the channel [19:59] benvie: parameterizes the `this` binding of the passed function [20:00] benvie: applybind is also useful [20:00] jmalina has joined the channel [20:00] benvie: especially for the Array.prototype functions [20:00] benvie: allowing you to pass arguments directly in without slicing [20:01] wdbl: node.js does not do this though. [20:01] gnb has joined the channel [20:01] jmalina_ has joined the channel [20:02] themiddleman_itv has left the channel [20:02] jefferai: I just installed Node on a new machine -- version 0.6.7, npm version 1.1.0-beta-10 -- and when I attempt to do a npm search I get an OpenSSL error...If I try to get the registry via wget it says that it's a self-signed certificate -- is this correct? [20:02] enyovelcora has joined the channel [20:02] jefferai: if it's correct I would have expected npm to show errors on other machines [20:02] aGHz has joined the channel [20:03] isaacs: jefferai: npm has the CA cert bundled. it's signed with a cert that is incorporated into npm, and that's the only cert it recognizes by default. [20:03] enyovelcora: If I use some modules only in specific contexts, should I require them only when needed, or should I just require them at the top of the file [20:03] enyovelcora: eg.: the formidable module.. should I include it in the savePost callback? [20:03] pifantastic_ has joined the channel [20:03] jefferai: isaacs: huh, ok -- so I guess this is a problem with my distribution package [20:04] jefferai: which is odd, usually if some kind of manual intervention is required, it warns you... [20:04] larsschenk has joined the channel [20:04] aGHz1 has joined the channel [20:05] norviller has joined the channel [20:06] jerrysv: dscape: i hate you ... [20:06] spleeze has joined the channel [20:08] yawNO: hi guys [20:08] tttthet has joined the channel [20:08] joestein has joined the channel [20:09] Shaunzie: hellooos [20:11] socketio\test\08 has joined the channel [20:11] dscape: jerrysv: jsconf? [20:12] bradleymeck has joined the channel [20:12] jerrysv: dscape: yes. [20:12] dscape: dont worry there the next round still [20:12] jerrysv: i knoe [20:12] jerrysv: er, know [20:12] johnhamelink has joined the channel [20:12] jerrysv: the gf got in, don't want to have to sit it out. [20:13] jerrysv: 2 minutes [20:13] dscape: when i went on twitter and saw people saying sold out [20:13] dscape: i thought people were like pranking [20:13] dscape: when i refreshed the page [20:13] jerrysv: happened last year too [20:13] dscape: in 10 seconds? [20:13] dscape: wow [20:14] jerrysv: at least i still have nodepdx [20:14] boltR has joined the channel [20:14] dscape: i guess i was lucky [20:14] jerrysv: yeah, for the combo tix [20:14] cjroebuck has joined the channel [20:14] lduros has left the channel [20:14] dscape: i wanted to call my hotel in nyc but thought, let me try the jsconf thing first [20:14] dscape: :) [20:14] albertos_ has joined the channel [20:14] jerrysv: ha [20:14] jerrysv: i need 2 tix [20:14] jerrysv: one for me, one for coworker [20:16] jerrysv: isaacs: i'm guessing no :( [20:16] JoshuaJ has joined the channel [20:16] yawNO: so guys [20:16] isaacs: no early bird for me. [20:16] isaacs: oh well. [20:16] yawNO: who of you can give me a definition of single thread language [20:16] jerrysv: me either. [20:16] yawNO: with nice technical words? [20:17] igl: Array(16).join("wat"-1) + " Batman!" [20:17] nodebiscut has joined the channel [20:17] yawNO: i'm not that good at explaining, so my version would be rather confusing ;_; [20:17] shinuza has joined the channel [20:18] jerrysv: just waiting for official acknowledgement so i can quit hitting refresh and get back to work [20:19] janekp: how to compile the latest version as a dynamic library? I did it like couple of weeks ago with 0.6.7, but it seems different now? [20:19] bnoordhuis: janekp: you'll have to patch the build script: wscript in v0.6, common.gypi in master [20:19] albertosh has joined the channel [20:19] janekp: :( [20:20] xpigeonx has joined the channel [20:20] janekp: ic [20:20] swaj: janekp: 0.6.7 is still the current version [20:20] wdbl: janekp: what are you doing with node as a dll? [20:20] wdbl: janekp: is this for windows? [20:20] mattgifford has joined the channel [20:20] janekp: no, im experimenting node + GUI on mac [20:20] janekp: seems to work [20:21] CIA-101: node: 03Ingmar Runge 07master * r0ca3018 10/ (3 files in 3 dirs): Crypto: adding ability to turn off automatic PKCS padding - http://git.io/lPVbew [20:21] pyrotechnick has joined the channel [20:21] janekp: i have some extra setup code before node::Start (and it runs on another thread) + i load my custom module there too [20:22] wdbl: oh because I'm experimenting with node + GUI on Windows, but linking to node didn't appeal to me. [20:22] cognominal___ has joined the channel [20:22] janekp: why? [20:22] wdbl: I was using it to just run the JS in it's own process and let it control the GUI from there. [20:22] janekp: on mac/linux static linking is a viable solution too [20:23] ph^ has joined the channel [20:23] wdbl: because I'm not doing my GUI stuff in C/C++ on Windows. [20:23] janekp: im using only 1 process. On mac u cant even run GUI from another thread [20:24] janekp: so you either have to launch another process or hack node [20:24] uchuff has joined the channel [20:24] wdbl: have you seen JSCocoa? [20:24] tjfontaine: or https://github.com/TooTallNate/NodObjC [20:24] d5sx43 has joined the channel [20:24] janekp: nop, 1 sec [20:24] tmcw has joined the channel [20:24] wdbl: I think they just use JSCore from WebView/WebKit [20:24] wdbl: nic tjfontaine [20:25] wdbl: *nice [20:25] tjfontaine: I can only take credit for pasting the url, the rest is TooTallNate's [20:25] janekp: well, my use-case is a bandwidth intensive app (large images, videos). Pure web approach isn't still optimal. So the idea is to write it like a web-app, but run it locally [20:25] wdbl: janekp: same here [20:26] jerrysv: isaacs: you'd better hope nodesummit has fast net access, and doesn't suffer what nodeconf did :) [20:26] isaacs: for real [20:26] wdbl: janekp: so, I wanted to run my JS code in the same process as my GUI code too and since embedding Node wasn't an option for me, I'm sort of emulating node's JS API now instead. [20:27] xpigeonx: is there a simple thread-pool producer-consumer library for node? [20:27] jerrysv: i'm not making it to summit, so ... [20:27] AvianFlu: http://stopsoap.com/ [20:27] springmeyer has joined the channel [20:28] wdbl: janekp: what I want is this - a way to make nice desktop apps with JS, with access to all files, etc. everything and I only want to write it once and then have it run on all platforms - the same thing everyone wants :) [20:28] janekp: yes!se) [20:28] janekp: thats my idea [20:28] wdbl: janekp: To do that, I'm doing it one way on Windows and a different way on Mac [20:28] context: avianflu: hahaha [20:28] janekp: i realized that simple nodeJS module is not good enough for that [20:29] janekp: so thats why i want to use node as a lib [20:29] wdbl: on Mac, I will use WebView/JSCore to execute the JS [20:29] wdbl: just because I have code for that already, but I might be interested in your code too [20:29] janekp: i plan to put it on github after i clean it up [20:29] wdbl: sweet [20:30] janekp: current version works like this: node-ui script.js [20:30] janekp: and when i run it [20:30] janekp: from terminal [20:30] janekp: an icon is created and added to Dock [20:30] janekp: so it works like a normal app [20:30] janekp: and like a normal node script too [20:31] Juan77 has joined the channel [20:31] wdbl: are you exposing cocoa APIs directly to your javascript or providing a layer? [20:31] V1 has joined the channel [20:31] janekp: nope [20:31] janekp: no direct APIs [20:31] triptec has joined the channel [20:31] Hamovitz: so with the LearnBoost cluster library no longer supported, what is everyone using to manage their node processes? [20:31] joshsmith: has anyone here used Kissmetrics with a Node app? [20:31] prettyrobots has joined the channel [20:31] janekp: at the moment i need only WebView, openpanel, savepanel, alert dialog and menus [20:32] wdbl: that's exactly what I'm doing [20:32] wdbl: the JS can create a Window, Menus, Toolbars and common dialogs. [20:32] wdbl: I am working on a common JS API to abstract all of that [20:33] wdbl: then the native implementation can do whatever it has to, in order to emulate that [20:33] EhevuTov has joined the channel [20:33] jscheel has joined the channel [20:33] janekp: yes [20:33] rendar: i'm doing that too [20:33] janekp: :) [20:33] janekp: and the resulting binary should be self-contained [20:33] rendar: wdbl: let's unify our works? :-) [20:34] janekp: like all the JS stuff should be embed too [20:34] joshsmith: wow, I'm witnessing an open source project start [20:34] janekp: but that is the last step [20:34] joshsmith: WITH OUR POWERS COMBINED [20:34] swaj: seriously [20:34] janekp: hehe :) [20:34] rendar: lol [20:34] swaj: you two should join efforts :P [20:34] wdbl: I'm trading emails in private messages [20:34] joshsmith: I'm trading pokemon in private messages [20:34] joshsmith: ACTION is more win [20:34] wdbl: hehe [20:34] janekp: possible, im experimenting bit more on mac [20:35] xpigeonx: anyone know what process.blind( [20:35] janekp: one risk area is that ideally it should be possible to use same browser component everywhere [20:35] xpigeonx: anyone know what process.blind('') does? * [20:35] robde has joined the channel [20:35] janekp: but, not critical. But extremely useful/nice. Chromium for example [20:36] jerrysv: 5 seconds. [20:38] N0va` has joined the channel [20:38] Venom_X_ has joined the channel [20:38] janekp: but at the moment I need to build it as a dynamic library to properly test my new module loading hack: https://github.com/janekp/node [20:40] bartt has joined the channel [20:40] HardBit has joined the channel [20:40] themiddleman_itv has joined the channel [20:41] uberbrady has joined the channel [20:42] EhevuTov has joined the channel [20:43] colinclark has joined the channel [20:43] JJMalina has joined the channel [20:44] joshsmith: how do I update to a specific node version? [20:44] joshsmith: 0.4.12 in this case? [20:44] zomg: At least with git, you just checkout the tag for the version you want and compile [20:44] swaj: what do you mean update? [20:44] zomg: There is also nvm [20:45] swaj: or you can download the tgz and compile it yourself: http://nodejs.org/dist/node-v0.4.12.tar.gz [20:45] lperrin has joined the channel [20:46] zomg: I always found it easiest to just clone the git repo since if you need an update you just pull and checkout =) No need to start looking for links etc. [20:46] joshsmith: I wasn't sure if I could just do a node update or something haha [20:47] napperjabber_ has joined the channel [20:47] uberbrady: There's a "node version manager" little script thing - nvm - that lets you grab new versions pretty easily. [20:47] uberbrady: nvm update v0.6.7 [20:47] uberbrady: etc [20:47] uberbrady: it's not bad. [20:48] alessioalex has joined the channel [20:48] uberbrady: or nvm install rather. I think. [20:48] Hebo: i like https://github.com/visionmedia/n [20:48] xpigeonx: ask again, anyone familiar with process.bind ? I see it occur in various source modules, but can't find it in the api anywhere [20:48] joshsmith: ergh, I just reinstalled with the package [20:48] bradleymeck: xpigeonx, there is no process.bind, process.binding is native C++ parts of node [20:48] joshsmith: it's not in my PATH again [20:49] xpigeonx: bradleymeck: what does process.binding do then? [20:49] swaj: I'm digging the cluster api changes in 0.7.0 :) [20:49] Hebo: swaj: link? [20:49] isaacs: xpigeonx: process.binding is the function that returns the natively built c++ bits. [20:50] swaj: Hebo: http://nodejs.org/docs/v0.7.0/api/cluster.html [20:50] isaacs: xpigeonx: ie, the code in node's src/ folder. [20:50] Hebo: ty [20:50] isaacs: xpigeonx: you should not use process.binding in your program. ever. [20:50] isaacs: xpigeonx: it's not documented in the API because you're not supposed to touch it under any circumstances. [20:51] isaacs: xpigeonx: to learn how it works, you must read the code. then you must ask node-core devs who will tell you not to do it. then you must slay no fewer than 3 dragons. [20:51] bradleymeck: only use it if you are tied to the version number, and even then you will regret it, but sometimes you have to [20:51] JJMalina has joined the channel [20:51] isaacs: bradleymeck: no, even then. [20:51] xpigeonx: I want a pipe, and var Pipe = process.binding('pipe_wrap').Pipe; seems kinda like what i want [20:52] isaacs: bradleymeck: if you think you need to use process.binding, then you actually need to post a bug. [20:52] insin: they removed the "complete nethack without eating any food" requirement? When did core go soft? [20:52] isaacs: xpigeonx: what are you trying to do? [20:52] bradleymeck: isaacs, i use it to monkey patch things to prevent the "real" binding from being called [20:52] isaacs: bradleymeck: that is extremely hazardous. [20:52] alessioalex: how do I debug a segmentation fault in Node.js? [20:52] isaacs: bradleymeck: i think it voids the warranty. [20:52] mmalecki: bradleymeck: only in 0.4, right? [20:52] bradleymeck: isaacs, correct and the only sane way to do it [20:53] bradleymeck: mmalecki, correct [20:53] wdblx has joined the channel [20:53] mmalecki: yeah, we're fine in 0.6 [20:53] tjfontaine: alessioalex: gdb [20:53] josh-k has joined the channel [20:53] bradleymeck: but im not going to rewrite c's bind() and preload that just to deal with the net bindings [20:54] xpigeonx: @isaacs: a lot of things, one being setting up a work poll for a thread poll, to handle computationaly expensive parts of requests for my server [20:54] alessioalex: gdb node app.js .. ? [20:54] isaacs: xpigeonx: why isn't child_process.spawn or child_process.fork acceptable to you? [20:54] isaacs: xpigeonx: use the documented api. [20:54] isaacs: xpigeonx: it can do that [20:54] mmalecki: maybe because .fork is broken :/ [20:54] bnoordhuis: alessioalex: `gdb --args out/Debug/node app.js`, then `run`, then `backtrace full` when it crashes [20:54] isaacs: mmalecki: it is not broken. [20:55] joshkehn has joined the channel [20:55] isaacs: mmalecki: it just requires that you run your program with node, and not some other thing. [20:55] alessioalex: thanks [20:55] bnoordhuis: alessioalex: you'll want to compile a debug build, the stack traces from a release build aren't always useful [20:55] mmalecki: isaacs: it has no features. [20:55] kuebk has joined the channel [20:55] isaacs: mmalecki: it has the feature that the children can do work, and communicate with the paretn. [20:55] mmalecki: isaacs: and doesn't let me to capture output. [20:55] isaacs: mmalecki: it's very similar to web workers. [20:55] joshkehn has left the channel [20:55] praCt: bnoordhuis, im looking at some valve docs (specifically rcon source), and its say "The protocol is based around command/response packets encapsulated in a TCP/IP stream", im not too certain dgram udp would make good fit or am i missing something? [20:55] isaacs: mmalecki: it lacks *one* feature, which you've decided you can't live without. [20:56] isaacs: mmalecki: but that's not the same as having "no features" [20:56] pyrotechnick: STOP SOPA has done more damage than SOPA itself [20:56] bnoordhuis: praCt: oh, maybe valve games do it over tcp. quake 3's rcon is udp based though [20:56] xpigeonx: @isaacs: child_process lets you send a message to a child, I'd rather have the children 'wake up' once a condition variable is set to let free ones know theres is more work [20:56] isaacs: xpigeonx: have you tried using the isolates in 0.7? [20:56] infynyxx has joined the channel [20:56] MrTopf has joined the channel [20:56] alessioalex: out/Debug/node: No such file or directory. [20:56] Swizec has joined the channel [20:57] piscisaureus_ has joined the channel [20:57] mmalecki: isaacs: no. many other people would love to be able to do actual logging with fork. [20:57] mmalecki: and don't tell me to net.createConnection. [20:57] isaacs: mmalecki: also, this is fixed in 0.7, I believe. [20:57] mmalecki: oh? [20:57] pkinchington has joined the channel [20:57] isaacs: mmalecki: yes. [20:57] mmalecki: YOU MEAN WE CAN'T NERDFIGHT ;( ? [20:57] isaacs: mmalecki: that whole big discussion was about the core dev team saying you can't change the *stable* version. [20:57] praCt: bnoordhuis: i see, hmm i guess ill try it, and hopefully get some kind of response. [20:58] xpigeonx: @isaacs: is 0.7 stable or still in development, the latest download on the side is 0.6.7 [20:58] bnoordhuis: alessioalex: you'll have to compile it first, of course [20:58] mmalecki: isaacs: hm, my patch was agains master, iirc [20:58] isaacs: mmalecki: and even there, you can use the (internal, undocumented) std*Stream stuff [20:58] isaacs: xpigeonx: 0.7 is unstable. [20:58] boltR has joined the channel [20:58] robde_ has joined the channel [20:58] isaacs: xpigeonx: the stable counterpart will be 0.8 [20:58] isaacs: xpigeonx: which is when the api will be frozen. [20:58] isaacs: likely in a month or two. [20:59] xpigeonx: @isaacs: I also couldn't find isolates in 0.7 api [20:59] isaacs: if you'er in development, and not releasing tomorrow, i'd recommend using 0.7 [20:59] mmalecki: isaacs: frozen forever or just for 0.8, like usual? [20:59] isaacs: mmalecki: yes, that's the pattern. [20:59] isaacs: mmalecki: then there'll be 0.8 [20:59] isaacs: er, then there'll be 0.9 [20:59] isaacs: which will freeze in either 1.0 or 0.10, not sure yet. [20:59] isaacs: that's a ways off. [21:00] mmalecki: isaacs: ah. I thought you ment like forever [21:00] isaacs: the goal is for 1.0 to be api-frozen forever. [21:00] pifantastic has joined the channel [21:00] mehlah has joined the channel [21:00] isaacs: but we'll see if that's feasible or not. [21:00] isaacs: there's a lot that we want to get done before then. [21:00] xpigeonx: i'm about to dust off my c/c++ skills to get this thing to 1.0 faster [21:00] petrjanda has joined the channel [21:01] mmalecki: please don't freeze forever [21:01] isaacs: xpigeonx: i'd *highly* recommend asking about your use case on the mailing list and getting some feedback from other node-core devs. [21:01] harthur has joined the channel [21:01] isaacs: xpigeonx: using process.binding in your program is perhaps the worst thing you can do. *at best* it shows that there's something we haven't addressed properly. [21:01] cognominal_ has joined the channel [21:01] djazz has left the channel [21:01] isaacs: xpigeonx: at worst, your program may randomly break, even within a stable version family. [21:02] isaacs: there are absolutely zero guarantees about process.binding results being consistent. [21:02] bnoordhuis: process.binding has been known to eat babies [21:02] bnoordhuis: you've been warned [21:02] robde has joined the channel [21:02] isaacs: i know that process.binding ate my babies. [21:02] isaacs: in fact. [21:02] richardr has joined the channel [21:02] mmalecki: we use it in production :) [21:02] neilk_ has joined the channel [21:02] mmalecki: ACTION ducks [21:02] isaacs: mmalecki: you are insane. [21:03] isaacs: mmalecki: and probably completely free of babies at this point. [21:03] xpigeonx: babies are COMPLETELY overrated [21:03] isaacs: haha [21:03] isaacs: it also eats ipods. [21:03] wdbl: isn't process.binding just a static lookup table? [21:03] isaacs: and kindles. [21:03] isaacs: srsly. [21:03] mmalecki: isaacs: as long as I have cats, it's cool [21:03] isaacs: wdbl: it might turn into one some day!! [21:03] xpigeonx: zuno 4 LIFE!!! [21:03] isaacs: wdbl: that's why you shouldn't use it [21:03] xpigeonx: zune* [21:03] salva has joined the channel [21:03] isaacs: mmalecki: IT EATS CATS IT EATS EVERYTHING OMG DONT USE IT EVAR [21:03] yawNO has joined the channel [21:03] isaacs: anyway.. [21:04] mmalecki: isaacs: cookies? [21:04] mmalecki: does it eat cookies? [21:04] isaacs: haha [21:04] isaacs: YOUR cookies, yes! [21:04] mmalecki: that'd explain a lot. [21:04] yawNO: yum cookies [21:04] salva has left the channel [21:04] mraleph has joined the channel [21:04] alystair has joined the channel [21:04] yawNO: :Q_ [21:04] wdbl: @isaacs: because it returns internal, undocumented types that should only be used by node core modules basically, right? [21:04] LuckySMack has joined the channel [21:04] enyovelcora has left the channel [21:04] bnoordhuis: wdbl: yes [21:04] isaacs: xpigeonx: yeah, so, all overstatement aside.. if you find a process.binding that does what you need, you need to seek further information. at least, it's a bug or a missing bit of api that we have to add, and we need to know about it. [21:05] wdbl: ok just making sure my understanding is correct after having dove into the node code for a week or so...thx [21:05] isaacs: xpigeonx: and there's a good chance that there's some public api that does what you want in a more stable manner. [21:06] mmalecki: isaacs: so, we have to use it to detect on what port user decided to listen and to override it if there's a collision [21:06] infynyxx has joined the channel [21:07] mmalecki: isaacs: hints :) ? [21:07] isaacs: why do you need to do that? why not let them get an error? [21:08] isaacs: mmalecki: if i say i want to listen on port 12356, and then i'm instead listening on 9239, then that's a problem, i think. [21:08] jesusabdullah: isaacs: It's to spite you [21:08] mmalecki: isaacs: we'd have to define a port user has to listen on, we don't want to [21:08] joshwines has joined the channel [21:09] isaacs: mmalecki: why not? [21:09] mmalecki: because we can do, like, multiple ports [21:09] isaacs: what's wrong with telling the program what it's doing? [21:09] Heisenmink_ has joined the channel [21:09] isaacs: env.PORT or some such. [21:09] mmalecki: isaacs: hm, no. that allows for only one port [21:10] isaacs: so? [21:10] isaacs: give them a range, then [21:10] mmalecki: isaacs: so, I was thinking, make net an EventEmitter, maybe? [21:10] isaacs: env.PORT0 env.PORT1 env.PORT2, ... env.PORT20 [21:11] isaacs: you get to listen on those ones. [21:11] mmalecki: isaacs: that's ghetto [21:11] tjfontaine: env.PORT.split(',') [21:11] isaacs: and hijacking process.binding("net") isn't? [21:11] HardFu has joined the channel [21:11] mmalecki: isaacs: we don't do it in 0.6 [21:11] HardFu: hey, I have a strange problem [21:11] tjfontaine: those who wish to monkey patch always do [21:11] isaacs: mmalecki: i don't get wy you need to catch and handle the listen errors anyway. [21:11] mmalecki: isaacs: and it's actually nice to be able to listen wherever you want [21:11] bnoordhuis: HardFu: i may have a strange solution [21:12] HardFu: if i run d=new Date(); d.setHours(0); console.log(d); [21:12] HardFu: I get Tue, 17 Jan 2012 23:11:10 GMT [21:12] isaacs: mmalecki: yeah, but it sounds like a lie. [21:12] isaacs: HardFu: what time zone are you in? [21:13] HardFu: ah, never mind, my stupidity :) [21:13] isaacs: :D [21:13] HardFu: setUTCHours is the solution [21:13] mmalecki: isaacs: why? [21:13] gnb has left the channel [21:13] isaacs: mmalecki: because i do net.createServer(..).listen(12345) and now i'm not listening on 12345 [21:13] isaacs: i'm listening on some other port instead. [21:13] isaacs: if, somewhere else in my code, i do net.connect("localhost", 12345), what happens? [21:13] mmalecki: isaacs: usually you are listening on the port you choose [21:14] mmalecki: isaacs: well, universe will break [21:14] isaacs: mmalecki: exactly. [21:14] mmalecki: we encourage people not do to it [21:14] mmalecki: cause, we like universe [21:14] isaacs: why not just break the world up front, by having the listen fail? [21:14] isaacs: then let me handle it. [21:14] isaacs: otherwise the magical lie becomes a source of *later* failure, instead of failing when you know it's a problem. [21:14] joshsmith: can someone help me figure out what I'm doing wrong in requiring this module? [21:14] joshsmith: https://github.com/glesperance/node-kissmetrics/blob/master/lib/kissmetrics.js [21:15] mmalecki: isaacs: still, it'd be nice to have net.on('listening') [21:15] mmalecki: isaacs: or... something [21:15] joshsmith: I'm doing require('kissmetrics')({'key': 'MY_KEY'}) [21:15] isaacs: mmalecki: if necessary, provide some api to reserve the next available port. [21:15] isaacs: mmalecki: listen takes a cb [21:15] joshsmith: but it's saying it's undefined [21:15] isaacs: mmalecki: the server is the object. net is not the object, it's a namespace. [21:16] mmalecki: isaacs: net.Server.on('listening') wouldn't work, right? [21:16] wdbl: I don't know many high level SDKs that let you listen in on every socket opened in the process. You can do it in C or C++, but usually not in the higher level kits. [21:16] isaacs: mmalecki: no, net.server is not an EE, it's a class. [21:16] mmalecki: isaacs: exactly :) [21:16] isaacs: mmalecki: you're trying to solve a problem that you have invented. just don't invent the problem. [21:17] isaacs: back up. unwind the use case further. [21:17] mmalecki: isaacs: so, well, keeping track of ports you open *would* be cool [21:17] isaacs: mmalecki: if you let my program fail, then i'll do that. [21:17] joshsmith: nvm, I'm an idiot [21:18] tjfontaine: is this for some hosted paradigm? [21:18] githogori has joined the channel [21:18] wilmoore has joined the channel [21:18] wilmoore has joined the channel [21:18] wdbl: mmalecki: are you at liberty to mention the project you're working on? I'm just curious...getting into this node stuff and I like to look at production stuff. [21:19] mmalecki: wdbl: https://github.com/nodejitsu/haibu-carapace [21:19] mmalecki: wdbl: I work for nodejitsu, it's part of our production stack [21:19] wdbl: sweet, thx [21:19] malkomalko has joined the channel [21:19] davidsklar1 has joined the channel [21:19] boltR has joined the channel [21:20] tjfontaine: right, so I don't see why this needs to muck with the core, wrap it up in a module and let your consumers decide if they want the functionality [21:20] dshaw_ has joined the channel [21:20] mmalecki: tjfontaine: not really, we tell our load balancers to forward traffic to the port you open [21:21] bradleymeck: isaacs, the main reason for this is to allow multiple drones to think they are listening on port 80 etc. without eaddrinuse, you can just use IPTables on linux or similar to get around the connection stuff, that and not allowing users to open up the real port 80 etc even if they are in a jail is something we would like to keep [21:21] johnhamelink has joined the channel [21:21] mmalecki: oh, yeah, that ^ [21:21] bradleymeck: if you want to take the C9 approach or env PORT you are generally limited to N number of ports which we will be unable to deal with when hook.io support comes along [21:21] isaacs: bradleymeck: or you can use node's built-in cluster support, or zones/jails/vms behind a http router. [21:21] tjfontaine: plenty of other platform ways to determine what a process is listening on without mucking around with core [21:22] vguerra has joined the channel [21:22] bradleymeck: you could do it the heroku way and preconfigure it too [21:22] isaacs: bradleymeck: or you can just do like heroku, and force them to use a different port, adn put it in the env. [21:22] praCt: bnoordhuis: do you possibly know if for tcp rcon, net.createServer will do? [21:22] isufy has joined the channel [21:22] isaacs: really, there are many many ways around this problem that don't involve hijacking node's net binding. [21:22] bnoordhuis: praCt: you want to connect to a rcon server right? in that case, you'd use net.createConnection() [21:22] isaacs: when you assume that the known-unsafe approach is just not an option, other solutions become more visible. [21:23] isaacs: and really, they're not bad. [21:23] bradleymeck: isaacs yes, but adding another vm is no less complex, we have plans in the future to avoid the net binding, but even then the IPTables solutions and VM solutions are not things we are too happy with [21:23] isaacs: well, a vm (or better yet, sunos zone or bsd jail) is a bigger solution. [21:23] isaacs: if you want apps to be isolated *for real*, then that's how you do it. [21:23] HardFu: which mongodb library do you prefer, mongooses or mongolia deadbeef? [21:23] isaacs: you give them each an *actual* network stack, etc. [21:24] bradleymeck: we have a jail but even then we want to know which they attempted to listen to inside of it [21:24] bradleymeck: you could do a polling solution but that would have a potential for racing [21:24] isaacs: bradleymeck: with no.de, we put each app in a zone, and just proxy their hostname on the router to their app's :80 [21:24] mmalecki: isaacs: multiple ports? [21:25] isaacs: mmalecki: you get 80, and another one for ssh, and that's it. [21:25] isaacs: mmalecki: if you want more, buy a zone. [21:25] tttthet has joined the channel [21:25] isaacs: and it'll just be out in the wild. [21:25] joshfinnie has joined the channel [21:25] swaj: are there any providers that sell a freebsd jail piecemeal (sort of like a VPS provider)? or is that idea just silly? [21:25] bradleymeck: mmalecki, that wouldnt be an issue if we only had limited ports, but we wont end up with that most likely [21:25] isaacs: swaj: i don't know of any that sell bsd jails, but joyent sells smartos zones. [21:26] mmalecki: bradleymeck: we should totally discuss how we want to implement it later [21:27] pifantastic has joined the channel [21:27] bradleymeck: mmalecki, we know how we do, its just not pretty to do it, almost every solution has a downside when you allow any port dynamically [21:27] cjroebuck has joined the channel [21:28] mmalecki: bradleymeck: and how are we going to load balance this traffic? [21:28] xbayrockx has left the channel [21:29] bradleymeck: in a way pretty much the same as now, because basically anything above c's bind() is bad for us including our shim, which is a 90% catcher but not ideal [21:29] xbayrockx has joined the channel [21:29] wdbl: can't you put every user on their own virtual NIC? [21:30] mmalecki: interesting question, can we? [21:30] smithclay has joined the channel [21:30] mehlah has joined the channel [21:30] bradleymeck: wdbl and mmalecki possible, but right now we are trying to avoid any more virtualization [21:30] tjfontaine: a vif isn't exactly as heavy as the rest of a virtualization stack [21:30] wdbl: it's not a virtual machine nic, it's just another IP on the same physical nic [21:30] seebees has joined the channel [21:31] MrTrick has joined the channel [21:32] wdbl: ifconfig eth0:1 192.168.30.128 netmask 255.255.255.0 [21:32] wdbl: ifconfig eth0:2 192.168.30.129 netmask 255.255.255.0 [21:32] wdbl: etc [21:32] kevwil has joined the channel [21:32] bradleymeck: wdbl im not sure how that would work with other IaaS, since we are not tied to any single one [21:33] wdbl: on the network it should just appear as a different IP address [21:33] bradleymeck: cant just grab ips willy nilly [21:33] tjfontaine: you can match by uid/gid in iptables [21:34] bradleymeck: wdbl but we would need to guarantee we would be assigned the 2nd one, iptables is one thing we have looked at but it takes time for it to be setup after the bind() [21:34] wdbl: oh I was imagining some kind of NAT scenario [21:34] markq has joined the channel [21:34] wdbl: well I'm a shitty network engineer anyway and that's about the extent of my knowledge :) [21:35] nibblebot: what is the state of LearnBoost/cluster vs core cluster module for node 0.6.x? [21:35] ddelrio1986 has joined the channel [21:35] Heisenmink_ has joined the channel [21:37] jj0hns0n has joined the channel [21:38] iRoj has joined the channel [21:38] sharkbird_ has joined the channel [21:40] HardBit has joined the channel [21:42] soapyillusions has joined the channel [21:42] rick- has joined the channel [21:43] sharkbird has joined the channel [21:45] isufy has joined the channel [21:45] skm has joined the channel [21:47] jldbasa has joined the channel [21:48] wdbl_away has joined the channel [21:50] boltR has joined the channel [21:53] joshgillies has joined the channel [21:54] megalomix has joined the channel [21:55] megalomix: hello friends [21:55] josh_k has joined the channel [21:55] megalomix: excuse me guys, this function works correctly, BUT could someone tell me IF i need to optimize it? https://gist.github.com/1636045 [21:55] russell_h has joined the channel [21:56] megalomix: regarding the this/that [21:56] megalomix: today here somone i don't remember the nick told me that i should use bind /apply /call [21:56] megalomix: how can i implement those here? [21:56] sriley has joined the channel [21:56] iaincarsberg has joined the channel [21:57] infynyxx has joined the channel [21:58] tjfontaine: mmalecki, bradleymeck: I know you're all virt averse but this certainly seems right up the wheel house http://berrange.com/posts/2012/01/17/building-application-sandboxes-with-libvirt-lxc-kvm/ [21:58] amasad has joined the channel [21:58] jeremyselier has joined the channel [21:58] megalomix: or better do i need those here? [21:59] Raynos has joined the channel [21:59] bradleymeck: tjfontaine, we actually do have some virtualization, but the problem will still come down to races if we use polling or a comm channel over tcp [21:59] te-brian has joined the channel [21:59] bradleymeck: and for things like that we avoid virtualization [21:59] dwhittle has joined the channel [21:59] torm3nt has joined the channel [22:00] tjfontaine: bradleymeck: it seems like guest bound ports would be an event you can grab on the host such that you wouldn't need to poll, I'll look into that [22:00] letsgojuno has joined the channel [22:01] bradleymeck: tjfontaine, if it had those in a way we can intercept sync would be a good solution [22:02] richardr has joined the channel [22:03] kriszyp has joined the channel [22:03] megalomix: guys, please, can you help me ? :) [22:05] majek has joined the channel [22:05] tomh has joined the channel [22:05] ChrisPartridge has joined the channel [22:06] tiglionabbit has joined the channel [22:06] pyrotechnick: NETSPLIT [22:06] icrazyhack has joined the channel [22:07] tomh has joined the channel [22:07] sriley has joined the channel [22:08] warz: more like irccloud! [22:09] hackband has joined the channel [22:09] iaincarsberg has joined the channel [22:09] garann has joined the channel [22:09] context: yeah i ignore join/par/quit from irccloud [22:09] context: they need to stop being so unstable [22:09] context: for everyone elses sake [22:09] context: sure nice service and all... but you're being a disservice to everyone else on irc [22:10] mjijackson has joined the channel [22:10] colinclark_ has joined the channel [22:10] colinclark_ has joined the channel [22:10] mikeal has joined the channel [22:11] chunhao_ has joined the channel [22:12] jeremyselier has joined the channel [22:12] cmr: It didn't used to be like this. [22:12] tanepiper has joined the channel [22:12] sarlalian has joined the channel [22:12] Raynos has joined the channel [22:13] daleharvey has joined the channel [22:13] ryanseddon has joined the channel [22:13] svnlto has joined the channel [22:14] hackband_ has joined the channel [22:14] niftylettuce has joined the channel [22:15] christkv has joined the channel [22:16] uchuff has joined the channel [22:17] uchuff has joined the channel [22:17] secoif has joined the channel [22:17] jmar777 has joined the channel [22:17] Swizec_ has joined the channel [22:17] uchuff has joined the channel [22:18] tommyvyo has joined the channel [22:18] uchuff has joined the channel [22:18] joshwines has joined the channel [22:19] uchuff has joined the channel [22:19] topaxi_ has joined the channel [22:19] Cite1__ has joined the channel [22:19] scoates has joined the channel [22:19] megalomix has joined the channel [22:19] pokoli has joined the channel [22:19] keeto has joined the channel [22:20] sveisvei has joined the channel [22:20] Mortchek has joined the channel [22:22] lightcap has joined the channel [22:22] xbayrockx: Guys [22:22] xbayrockx: After my rant yesterday [22:22] xbayrockx: Socket.IO IS SICK [22:23] sotosof has joined the channel [22:23] siddhion has joined the channel [22:23] sotosof has left the channel [22:24] lightcap_ has joined the channel [22:25] xbayrockx: Hey guys, check out my code. http://pastebin.com/Pf3RDiTX Now pretend I want to add 100 different event listeners, with if statements, validation etc [22:25] Carmivore has joined the channel [22:25] Carmivore has joined the channel [22:25] xbayrockx: How should I structure my document? Should I add all event listeners in to another file then import them? Or ? [22:25] pyrotechnick: do you consider them data or logic? [22:25] dnyy has joined the channel [22:25] jesusabdullah: xbayrockx: You probably want one listener that does 100 things, not 100 event listeners [22:26] jerrysv: ^^^ [22:26] xbayrockx: Ok so I need one listener for each event type [22:26] xbayrockx: I will probably only have a half dozen type of events [22:27] broofa has joined the channel [22:27] xbayrockx: But the logic inside would be more complex [22:27] xbayrockx: I'd consider it logic, right? [22:27] olegp has joined the channel [22:27] dscape has joined the channel [22:27] alessioalex has joined the channel [22:27] strmpnk has joined the channel [22:27] mikedeboer has joined the channel [22:28] jonbaer has joined the channel [22:28] jerrysv: or look into something like eventemitter2 if you want to wildcard events [22:28] xbayrockx: No, I just want to find a good way of coding [22:29] MrNibbles has joined the channel [22:29] xbayrockx: So I don't waste time and deal with 2000 line pages [22:30] jerrysv: missing how that has anything to do with wildcarding events ... [22:30] zomg: xbayrockx: you could think of how each event is grouped [22:30] zomg: I would assume they would have at least some kind of coherency [22:30] zomg: then just put related ones into their own file [22:30] xbayrockx: For example, should I just use [22:33] xbayrockx: Is that type of code acceptable ? [22:34] Juan77 has joined the channel [22:35] wycats has joined the channel [22:36] relix has joined the channel [22:36] zanefactory has joined the channel [22:37] jscheel has joined the channel [22:37] jscheel has joined the channel [22:37] CrawfordComeaux has joined the channel [22:38] pizthewiz has joined the channel [22:39] stylus has joined the channel [22:39] blueadept has joined the channel [22:39] blueadept has joined the channel [22:40] mjijackson has joined the channel [22:42] tonymilne has joined the channel [22:43] xetorthio has joined the channel [22:44] EvRide has joined the channel [22:45] strevat_ has joined the channel [22:45] JoshuaJ has joined the channel [22:45] jbpros has joined the channel [22:45] astropirate has joined the channel [22:45] ph^ has joined the channel [22:45] justicefries has joined the channel [22:45] majek has joined the channel [22:46] stonebranch has joined the channel [22:46] Hosh has joined the channel [22:46] subhaze has joined the channel [22:47] sotosof has joined the channel [22:49] brianseeders has joined the channel [22:50] michaelhartau has joined the channel [22:52] sotosof has joined the channel [22:54] colinclark has joined the channel [22:55] asdf12 has joined the channel [22:55] JoshuaJ has joined the channel [22:55] JoshuaJ_ has joined the channel [22:55] sotosof has joined the channel [22:55] asdf12: sorry, i looked through the node api docs, but i can't seem to find the function to check if something is a directory ? [22:55] tilgovi has joined the channel [22:56] asdf12: do i just use fs.readdir() and go by errors? [22:57] lmatteis has joined the channel [22:57] MrTopf has joined the channel [22:57] jerrysv: asdf12: http://nodejs.org/docs/latest/api/fs.html#fs.Stats [22:57] megalomix: can i use: if (exchange = exchanges.pop()) directly? [22:57] asdf12: thanks, can't believe i missed that, literally looked up and down the fs api doc [22:58] LuckySMack has joined the channel [22:58] k1ttty has joined the channel [22:59] chapel: megalomix, yeah but it removes the item [22:59] megalomix: yes sure [22:59] megalomix: my scope, thank you chapel [23:01] boltR has joined the channel [23:01] megalomix: chapel, if i do: if(exchange = exchanges.pop()) { .... } [23:01] megalomix: how can i do the other manner? [23:01] megalomix: i mean... I there is not i have to return and finish [23:01] megalomix: can i not do it in one line ? [23:02] megalomix: solved [23:02] megalomix: :D [23:02] megalomix: if(!(exchange = exchanges.pop())) return [23:03] torvalamo: i think a friend of mine set a new record of laziness... here we have mandatory military service (or whatever it's called)... and he said at work yesterday "today will be my last day, going to the army tomorrow" and I said "but i'll probably see you in two weeks..." and he replied "yeah I wouldn't bet against it".... turns out, he managed to escape after just one day. so he's back at work tomorrow :P [23:03] torvalamo: escape/get kicked out.. however you wanna look at it [23:04] torvalamo: just thought i'd share [23:04] torvalamo: completely off topic [23:05] johnhamelink has joined the channel [23:05] adambeynon has joined the channel [23:06] metapandava has joined the channel [23:07] clarkfischer has joined the channel [23:10] astropirate: torvalamo, haha thats awesome [23:12] _dc has joined the channel [23:15] devinus has joined the channel [23:15] devinus: off-topic: does anybody know of any design firms like the now defunct Sofa? [23:16] torvalamo: never even heard of Sofa [23:16] torvalamo: oh, mac stuff [23:18] laprice has left the channel [23:18] evangenieur: hi do someone know a uri template <-> pattern lib like this one http://code.google.com/p/wo-furi/ but in javascript/coffeescript, I just find url templating lib like https://github.com/grncdr/uri-template [23:18] boltR has joined the channel [23:20] pyrotechnick: evangenieur: "#{username}/home" [23:20] pyrotechnick: in coffeescript [23:21] aslant has joined the channel [23:21] evangenieur: it's just string concatenation, i'm looking for pattern matching uri using uri template [23:21] pyrotechnick: i don't understand sorry [23:21] salazr_ has joined the channel [23:22] pyrotechnick: how is that "pattern matching" [23:22] JasonSmith has joined the channel [23:22] nym has joined the channel [23:22] gregpascale has joined the channel [23:22] evangenieur: for replacing regexp / uri analysis to extract data from uri [23:23] stonebra_ has joined the channel [23:23] pyrotechnick: that's the opposite to what you've linked does [23:24] evangenieur: ex : using template pattern matching : "http://vimeo.com/{video_id}" with this uri "http://vimeo.com/34724636" would extract { video_id: 34724636 } [23:24] pyrotechnick: you want named captures? [23:24] pyrotechnick: yeah that's the opposite to what this wo-furi thing does [23:24] evangenieur: wo-furl do it in both way [23:24] pyrotechnick: i've used http://xregexp.com/ before [23:24] Wizek has joined the channel [23:25] pyrotechnick: that's named captures in javascript [23:25] pyrotechnick: but that's probably overkill [23:25] pyrotechnick: i know express's router can do this let me have a look how it works [23:25] pyrotechnick: is this for server or client? [23:25] gigafied has joined the channel [23:26] grom358 has joined the channel [23:26] cfq has joined the channel [23:26] evangenieur: both, just looking for a unique uri template to generate uri and extract data from uri [23:26] grom358: why doesn't this work. var out = process.stdout.write; out("hello\n"); [23:27] benvie: var out = process.stdout.write.bind(process.stdout); [23:27] xreload has joined the channel [23:27] pyrotechnick: it must be a property [23:28] ubii has joined the channel [23:28] stonebranch has joined the channel [23:29] ambroff has joined the channel [23:30] pyrotechnick: evangenieur: there's code here https://github.com/visionmedia/express/tree/master/lib/router [23:30] xreload has joined the channel [23:30] jmar777 has joined the channel [23:31] evangenieur: thx, i have already looked at router lib, but no lib is using the same template in both way : extract and generation :( [23:31] pyrotechnick: probably because that's a bad idea [23:32] evangenieur: probably ;) [23:33] Chrisedge_ has joined the channel [23:33] pyrotechnick: write a module [23:34] evangenieur: yes that's probably what I will do ;) [23:34] Effilry has joined the channel [23:34] jetienne has joined the channel [23:35] pyrotechnick: call it bicurlious [23:35] mikeal has joined the channel [23:35] pyrotechnick: cuz it goes both ways [23:36] evangenieur: I'm thinking of extending URI.js, like : [23:36] jskulski has joined the channel [23:37] Effilry has joined the channel [23:37] evangenieur: URI(uri).extract(templte) [23:37] evangenieur: URI.generate(object, template) [23:38] xbayrockx: How can I import a javascript file with node.js [23:38] pyrotechnick: assign what you want to import to module.exports in the included file [23:38] pifantastic_ has joined the channel [23:39] pyrotechnick: and then include it with require('./what_you_called_it.js'); [23:39] strevat_ has joined the channel [23:42] xbayrockx: im not sure what you mean [23:42] pyrotechnick: ill make you a gist [23:42] xbayrockx: Ok [23:42] xbayrockx: Ill show you what I want to do ? [23:42] CarterL has joined the channel [23:44] xbayrockx: http://pastebin.com/YduDRuFd [23:45] cody-- has joined the channel [23:46] pyrotechnick: xbayrockx: are you using express? [23:46] xbayrockx: I'm not familiar with it, so I doubt it [23:46] pyrotechnick: connect? [23:46] pyrotechnick: or just require('http'); [23:46] jesusabdullah: xbayrockx: You probably want to at least look up express [23:47] gr-eg has joined the channel [23:48] xbayrockx: What is express? [23:48] hackband has joined the channel [23:48] jesusabdullah: google it brah [23:49] jesusabdullah: express js [23:49] jesusabdullah: A whole neww worrrrrld [23:50] pyrotechnick: anyway xbayrockx i assume you've got this chat demo from the socket.io website, to answer your question you'll need to use something like connect or express to serve static files from a public folder or something [23:51] blup has joined the channel [23:52] pyrotechnick: server = connect.createServer() [23:52] pyrotechnick: server.use connect.static "#{__dirname}/public" [23:53] jesusabdullah: whoa whoa whoa you put that weirdo ruby crap away :( [23:53] pyrotechnick: bite me [23:53] jesusabdullah: seriously though: It's not nice to throw down coffeescript as javascript examples [23:54] pyrotechnick: say that when you're maintaining 250k LOC + apps [23:54] jesusabdullah: This guy doesn't even know what express is [23:54] jesusabdullah: and I *do* help maintain that much code [23:54] blup has joined the channel [23:54] pyrotechnick: lies and misinformation = [23:54] bingomanatee: Coffeescript is old fashioned anyway. From now on we'll all be writing our javaScript in Dart. [23:55] jesusabdullah: I don't care about people using coffeescript for projects but I feel strongly that we should adopt a lingua franca when trying to teach javascript [23:55] jesusabdullah: as coffeescript examples just add another layer of confusion [23:55] bingomanatee: I think the lingua franca of Javascript is Javascript. [23:55] cmr: The only language you can teach javascript in is... javascript [23:55] pyrotechnick: grow up guys [23:56] pyrotechnick: bingomanatee: https://a248.e.akamai.net/assets.github.com/img/70c4772b4f10ee4d66a6621410fba65ff9edf80a/687474703a2f2f7365616e6469636b2e6e65742f646172745f7774662e706e67 [23:57] insin: I care what language something is written in as soon as its docs aren't good enough or it behaves unexpectedly [23:57] pyrotechnick: do you know all of your regular expressions aren't javascript [23:57] pyrotechnick: neither is your css [23:57] pyrotechnick: or your index.html [23:57] bingomanatee: function hello(world){ if (NeilDeGrasseTyson.isWorld(world) { world.hello(); } } [23:58] maletor has joined the channel [23:58] pyrotechnick: now if a little coffeescript here and there makes you feel uncomfortable and your mind struggles to switch contexts, web development most probably isn't the best job for you [23:59] roroo has joined the channel [23:59] jesusabdullah: Bullshit [23:59] bingomanatee: wants to develop a language that takes advantage of unicode pictogram. [23:59] insin: you don't have to transpile those other things to something else in your head [23:59] pyrotechnick: the emojicons?