[00:00] sheenobu: working with express-jsdom. Anyway to use it with error handlers? I only see 'get' and 'all' [00:02] eyesUnclouded has joined the channel [00:02] mustalac has joined the channel [00:02] igl has joined the channel [00:04] sheenobu: o looks like I can use dom.all with an 'err' parameter [00:05] supster has joined the channel [00:05] igl1 has joined the channel [00:05] nornagon_ has joined the channel [00:06] kohai: @rjrodger: “@mnowakowski: #phonegap and oauth ...like each other? examples..? :)” I have some example code using #nodejs if you want it... [00:06] sheenobu: actually that's not true [00:07] gavin_huang has joined the channel [00:11] pt_tr has joined the channel [00:12] kmwallio has joined the channel [00:15] \sega has joined the channel [00:16] kohai: @esacteksab: [BLOG] wscript:319: error: Could not autodetect OpenSSL support. http://bit.ly/kvzSqK #nodejs #xubuntu (link: http://www.barrymorrison.com/2011/06/05/vartmpnodewscript319-error-could-not-autodetect-openssl-support/?preview=true&preview_id=465&preview_nonce=28dbe9b734) [00:16] zhami has joined the channel [00:20] MarkMenard has joined the channel [00:20] davidcoallier has joined the channel [00:20] michaelhartau has joined the channel [00:21] rchavik has joined the channel [00:21] kohai: @ifandelse: building a static file server in #nodejs for fun tonight [00:21] ExsysTech has joined the channel [00:22] azeroth_ has joined the channel [00:23] ExsysTech has joined the channel [00:30] populuxe has joined the channel [00:30] kohai: @dan_manges: blog post on mongrel2 and node.js : http://goo.gl/EXJMM (link: http://www.dan-manges.com/blog/2011/m2node-a-mongrel2-handler-for-node-js) [00:31] paul_k has joined the channel [00:32] justinTNT has joined the channel [00:32] mischief has joined the channel [00:35] ezmobius has joined the channel [00:35] gavin_huang has joined the channel [00:35] igl has joined the channel [00:36] mischief has joined the channel [00:36] kohai: @oyvindmal: Trying out the new Ubuntu installer for windows to see if i can do some node.js dev with it. [00:38] bwinton has joined the channel [00:39] justinTNT: mornin [00:39] fmeyer has joined the channel [00:41] ditesh|cassini has joined the channel [00:42] kris_will has joined the channel [00:43] kohai: @ykhroki: node.js + socket.io 使っているんだって - Log.io - Real-time log monitoring in your browser - http://goo.gl/4etZk (link: http://logio.org/) [00:45] _1marc has joined the channel [00:45] tonymilne has joined the channel [00:46] bergie has joined the channel [00:47] baudehlo_ has joined the channel [00:49] kohai: @movence: 요새 한창 트윗글에 많이 올라오는 node.js 오릴리 프리뷰 보기 시작....완전 신기...이와 관련된 흥미로운 것들도 많음... [00:50] jsulak has joined the channel [00:51] michaelhartau has joined the channel [00:53] hachque has joined the channel [00:53] hydoskee has joined the channel [00:54] hydoskee: where could I find how to do an https POST request with authentication using the http library? [00:54] dipser has joined the channel [00:54] hydoskee: I can't seem to find it anywhere in the docs [00:54] hydoskee: is that supported? [00:58] azeroth___ has joined the channel [01:03] davidcoallier has joined the channel [01:04] philtor has joined the channel [01:04] tim_smart has joined the channel [01:05] azeroth___ has joined the channel [01:08] jamesarosen has joined the channel [01:08] kohai: @ifandelse: The thing I love about projects like #nodejs is how it brings me closer to the open specs and to the metal. Love HTTP Header kung fu :-) [01:09] bingomanatee: Node around the world 0/! [01:09] tonymilne has joined the channel [01:09] lmorchard has joined the channel [01:11] bingomanatee: It is nice not to have so many layers between you and your requests. [01:12] bingomanatee: Node works brilliantly on Ubuntu. [01:13] gaarf has joined the channel [01:16] abraxas has joined the channel [01:16] _1marc has joined the channel [01:17] bingomanatee: hydoskee: the express.js library is a good place to start. What kind of auth are you looking for? [01:20] materialdesigner has joined the channel [01:22] TheFuzzball has joined the channel [01:22] mike5w3c has joined the channel [01:23] idefine has joined the channel [01:23] mike5w3c_ has joined the channel [01:23] luke`_ has joined the channel [01:25] gtramont1na has joined the channel [01:25] d_js has joined the channel [01:26] davidban_ has joined the channel [01:26] sudhirjonathan has joined the channel [01:27] kohai: @planetonrails: m2node - a mongrel2 handler for node.js http://bit.ly/j13dBL (link: http://www.dan-manges.com/blog/2011/m2node-a-mongrel2-handler-for-node-js?utm_source=twitterfeed&utm_medium=twitter) [01:27] perlmonkey2 has joined the channel [01:27] perlmonkey2 has left the channel [01:29] ryanmcgrath has joined the channel [01:30] kohai: @TopHackerNews: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io) http://bit.ly/lbK1N6 http://ff.im/-F1zDH (link: http://logio.org/) [01:31] kohai: @TheReena: @jimschubert funny, i think @jrylan loves #nodejs too. [01:33] McMAGIC--Copy has joined the channel [01:33] TheFuzzball has joined the channel [01:34] __jgr has joined the channel [01:35] Postmodernist has joined the channel [01:36] Postmodernist: Came up with a sick idea for a porn site I'm making with node.js [01:36] Postmodernist: Imagine this: A hybrid of Madonna and Charlie Chaplin photographed in the style of Robert Mapplethorpe. [01:36] bingomanatee: really? [01:36] Postmodernist: yeah [01:36] eyesUnclouded has joined the channel [01:37] bingomanatee: If you want to use your brain to make money you're too good for porn. [01:37] kohai: @jrylan: @TheReena @jimschubert it's true! I do love Node.js [01:37] bingomanatee: Porn is about grinding and money. Going high concept is a waste of energy. [01:37] Postmodernist: bingomanatee: Really? There's no niche? [01:37] ckknight: porn has money in it [01:37] pauls has joined the channel [01:37] vikstrous: hey guys, i have a problem with jade - does this make any sense to anyone? http://pastebin.com/tG6Xgh98 [01:37] bingomanatee: If you want to go high concept do what 3Crowd does - do a CDN to optimize throughput. [01:38] Postmodernist: Maybe fapping to Madonna is making me too quixotic. [01:38] kohai: @summari_es: #Summary: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io) (logio.org) http://bit.ly/ilfvRV (link: http://summari.es/?p=http://logio.org/&utm_source=twitterfeed&utm_medium=twitter) [01:38] Postmodernist: hmm [01:38] bingomanatee: If you truly think youi have a theme that is so original you will stand out against the crowd you need to spend some down time at a porn shop. [01:39] bingomanatee: plus its kidn of off topic. [01:39] jmoyers: he said porn WITH nodejs [01:40] jmoyers: i'd call that on topic ;-) [01:40] ckknight: using node to serve videos which may be of a questionable nature is on-topic [01:40] ckknight: going into detail as to what the videos are is not [01:40] bingomanatee: yeah well I can ship bagels with Countachs but it won't get me on Top Gear. [01:41] bingomanatee: Keep in mind that the channel is logged - it just doesn't do anything but damage. [01:41] jmoyers: damage to what exactly? [01:41] brweber2 has joined the channel [01:42] gaarf has joined the channel [01:43] ckknight: ACTION rolls 2d20 against jmoyers [01:43] bingomanatee: Fumble! [01:43] jmoyers: sorry dude, im immune to subdual [01:45] kohai: @theprogrammer: Reading on Jake - JavaScript build tool for Node.js - http://t.co/0LrgwhF (link: http://howtonode.org/intro-to-jake) [01:45] cpolis has joined the channel [01:48] H2S04 has joined the channel [01:49] copongcopong has joined the channel [01:49] kohai: @MarkNijhof: @chrismdp Hehe I decided that 03:49 is about the right time to stop working on my little Node.js project :-) [01:50] tilgovi has joined the channel [01:50] tilgovi has joined the channel [01:50] vikstrous: halp :( this makes no sense http://pastebin.com/NvzcE0xD [01:50] gaarf has left the channel [01:51] nannto has joined the channel [01:51] gaarf has joined the channel [01:52] k1ttty has joined the channel [01:54] indexzero has joined the channel [01:55] kohai: @bergie: playing with Flow-Based Programming in Node.js while waiting for #aedc to start [01:55] piscisaureus has joined the channel [01:56] indexzero: Anyone got a second to look at a node.js bug? https://github.com/joyent/node/issues/1157 [01:57] meso has joined the channel [01:58] skm has joined the channel [02:00] dget has joined the channel [02:01] willwhite has joined the channel [02:01] goatslacker has joined the channel [02:02] vipaca_ has joined the channel [02:04] mike5w3c has joined the channel [02:04] kohai: @indexzero: @ntheory That code needs some updating. If you want to jump into #nodejitsu for a couple of minutes we can update it together. #nodejs [02:05] kris_will has joined the channel [02:06] cafesofie has joined the channel [02:06] gaarf has left the channel [02:07] luke` has joined the channel [02:07] zeade has joined the channel [02:08] dnuke has joined the channel [02:10] jonaslund_ has joined the channel [02:10] AAA_awright_ has joined the channel [02:11] riven` has joined the channel [02:11] matyr has joined the channel [02:12] ivan has joined the channel [02:13] kohai: @HighSNHN: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io): http://goo.gl/4etZk ( http://goo.gl/vzrUq ) (link: http://logio.org/) [02:14] htoothrot has joined the channel [02:14] kohai: @dwenomo: ミームの死骸を越えてゆけ : HTML5のcanvas Node.js WebSocketでリアルタイムお絵描き共有アプリを作ったよ http://tumblr.com/xsr2v4iv7e [02:15] fson has joined the channel [02:16] kohai: @github_js: node-XMLHttpRequest - XMLHttpRequest for node.js http://bit.ly/ls34Dz (link: https://github.com/driverdan/node-XMLHttpRequest) [02:19] SubStack: SEMVER Y U NO WORK LIKE I EXPECT [02:19] SubStack: semver.satisfies('0.0.1', '=0.0.x') === false // :Z [02:20] kriszyp has joined the channel [02:22] davidban_ has joined the channel [02:24] brianseeders has joined the channel [02:26] mwhooker has joined the channel [02:27] AvianFlu: SubStack: the 3rd = may be screwing you there [02:27] AvianFlu: not for a good reason, just cause js is like that sometimes [02:28] SubStack: no I mean it says 'false' on the repl [02:28] SubStack: OH [02:28] SubStack: if I omit the = in =0.0.x [02:28] SubStack: then it works [02:28] SubStack: wtf [02:29] mscdex: indexzero: why not use keys instead? [02:29] indexzero: mscdex: We do currently use keys, but that's not really the issue [02:29] indexzero: it should wokr [02:29] SubStack: aha semver.satisfies('1.2.3', semver.clean('=1.x.3')) [02:31] mscdex: i'm sure ssh expects a tty/pty [02:31] indexzero: mscdex: I tried this with the tty (there's an example in the module) [02:31] indexzero: *doh* I mean issue [02:32] kohai: @halfageekinfo: Amir Salihefendic: Comet with node.js 1/6 http://is.gd/cek5Sc #javascript (link: http://javascript.halfageek.info/2011/05/20/amir-salihefendic-comet-with-node-js-16/) [02:33] Guest40466 has joined the channel [02:34] mscdex: indexzero: well if nothing else, there's always sshpass i guess [02:34] indexzero: mscdex: sshpass? [02:34] mscdex: it probably creates a tty though... [02:35] overra has joined the channel [02:35] themiddleman has joined the channel [02:36] mscdex: yeah, looks like they create a pseudo terminal [02:36] matyr has joined the channel [02:37] devaholic: anyone interested in some real time analytics written in node? [02:37] mscdex: indexzero: fwiw here's the source to sshpass: http://sshpass.svn.sourceforge.net/viewvc/sshpass/trunk/main.c?revision=45&view=markup [02:38] warreng has joined the channel [02:38] indexzero: mscdex: Thanks [02:38] mscdex: you'll probably have to create binding [02:39] _jgr has joined the channel [02:43] gamebuster has joined the channel [02:43] gamebuster: lots of txt [02:43] gamebuster: wooo [02:43] gamebuster: anyone here? [02:43] gamebuster: i'm lonely [02:44] indexzero: ntheory: Article has been updated: http://twitter.com/#!/indexzero/status/77566413409222656 [02:45] indexzero: gamebuster: wassup [02:45] piscisaureus has joined the channel [02:46] jmoyers: wow [02:46] jmoyers: that was amusing [02:48] Zell has joined the channel [02:48] fairwinds has joined the channel [02:50] kohai: @ratty42: Going to have to check this out - Log.io (Realtime log monitoring, powered by node.js + socket.io)... http://logio.org/ [02:51] jaket has joined the channel [02:52] brraaains has joined the channel [02:53] Zell: can we ask the entropy guy to update their package to let us use it with node.js-pre [02:53] context: that is awesome [02:54] hij1nx has joined the channel [02:54] Zell: Do you use npm guys ? [02:54] sudhirjonathan has joined the channel [02:57] tbranyen: Zell: ... [02:57] tbranyen: does the sky shit rain? [02:57] jmoyers: yes [02:57] jmoyers: yes we do [02:59] brraaains: does the sky actually "shit" rain? i don't know if that's the right word to describe the action of rain falling from the sky [02:59] tbranyen: maybe if your imagination is made from some kind of pedantic stone [03:00] brraaains: i was just joking. not being pedantic [03:00] jtsnow has joined the channel [03:00] Zell: tbranyen: actually i just try to use npm with node 5-pre [03:00] Zell: tbranyen: and nothing works [03:01] davidban_: tbranyen: I agree with brraaains. I would argue that the sky urinates rain and shits hail. [03:01] brraaains: lol [03:01] caolanm_ has joined the channel [03:01] brraaains: or shits diarrhea [03:01] Zell: tbranyen: that why i was askin ... [03:01] brraaains: diarrhea rain that is [03:02] Aria: Aaaugh. v8's internals are hairy sometimes. [03:02] Aria: ACTION tries to figure out v8::Arguments [03:03] descipher_ has joined the channel [03:03] tbranyen: maybe if the sky had the runs xD [03:04] davidbanham: Ah! Finally tracked down the machine this client was left running on! [03:04] davidbanham: quit [03:04] ss23 has left the channel [03:05] davidbanham: Was one of my production servers. Must have gotten my terminals mixed up at some point. [03:05] nornagon_ has joined the channel [03:07] meso_ has joined the channel [03:09] eyesUnclouded has joined the channel [03:11] kohai: @seantheflexguy: i mean there's node.js and jquery and all kinds of other stuff. what's the hawt shit? [03:12] kohai: @NodeKohai: @seantheflexguy node.js for sure. I'm not biased cause I'm a node.js twitter bot, no sir... [03:12] wilmoore has joined the channel [03:15] NuckingFuts: Okay, so I need a cross-platform method for opening the default browser on a computer. [03:15] NuckingFuts: On windows, I can just use start, but what do I do on Linux and Mac? :/ [03:16] tbranyen: NuckingFuts: hmmm xdg [03:16] tbranyen: is pretty common for linux [03:16] tbranyen: dunno about os x [03:16] NuckingFuts: xdg? [03:16] tbranyen: google it [03:16] SubStack: also process.env.BROWSER [03:16] tbranyen: assuming its set [03:16] tbranyen: xdg-open, if installed, will automagically know what app to open [03:16] tbranyen: maybe that and fall back to env browser? [03:16] kohai: @jhooks: @seantheflexguy I like Vim and really dig the Node.js -> Express -> Jade -> SASS stack for web pagery [03:18] kohai: @PHPAtSO: Possibility of implementing node.js using PHP interpreter in place of JavaScript v8? http://bit.ly/m1e8Vt (link: http://stackoverflow.com/questions/6247425/possibility-of-implementing-node-js-using-php-interpreter-in-place-of-javascript?utm_source=twitterfeed&utm_medium=twitter) [03:19] kohai: @diegoholiveira: do you want see the power of node.js? take a look: https://github.com/NarrativeScience/Log.io //cc @guhcampos @fnando #nodejs #javascript [03:20] kohai: @MerlinCalo: Metamarkets Blog » Blog Archive » Node.js and the JavaScript Age http://t.co/AYTcVeX #javascript #webdesign (link: http://metamarketsgroup.com/blog/node-js-and-the-javascript-age/) [03:22] pifantastic has joined the channel [03:22] heavysixer has joined the channel [03:23] NuckingFuts: SubStack, tbranyen: Thankies :D [03:26] jerrysv has joined the channel [03:27] jerrysv: good evening [03:29] matyr has joined the channel [03:30] ditesh|cassini has joined the channel [03:37] _jgr has joined the channel [03:44] malkomalko has joined the channel [03:45] JakeyChan has joined the channel [03:46] forzan has joined the channel [03:48] jmoyers: some of the comments on that blog post [03:48] jmoyers: are hillllarious [03:48] jmoyers: " If you need application, just write it! For Windows. On Delphi/VB/C#, whatever – IT WILL WORK and never waste your time on browser compatibility, rendering issues, ugly PHP, etc." [03:49] jmoyers: Get that shit done on delphi for windows! [03:49] jmoyers: forget the web! [03:51] messju has joined the channel [03:51] messju has joined the channel [03:54] xeodox has joined the channel [03:55] confoocious has joined the channel [03:55] confoocious has joined the channel [04:03] matyr_ has joined the channel [04:06] _1marc has joined the channel [04:07] sugardave has joined the channel [04:07] jaket has joined the channel [04:10] brettgoulder has joined the channel [04:14] jensn has joined the channel [04:14] Corren has joined the channel [04:17] kblake has joined the channel [04:19] jensn: Anyone here who has been combining OpenCL with Node? [04:19] mawkor2: %$#@ duostack I am just going to host from my home computer [04:20] mawkor2: I can 'push my app [04:20] JCS0 has joined the channel [04:20] mawkor2: from my laptop to my desktop [04:20] mawkor2: lol [04:21] kohai: @pcapr: .@w3dot0 is having a blast loading up @heroku #nodejs apps on the cedar stack with http://blitz.io - blog coming soon is what I hear! [04:22] mawkor2: u guys rly need our amazing app hosting platform where you can copy yr files to and we run 1 line command! [04:22] mawkor2: we r brillynt! [04:23] mawkor2: oh wait look [04:23] mawkor2: http://www.embracingthecloud.com/2010/12/05/InstallingNodejsOnAmazonEC2.aspx [04:23] mawkor2: dang they figured us out [04:23] skm has joined the channel [04:24] sh1mmer has joined the channel [04:26] Corren has joined the channel [04:28] justinTNT: how do I tell npm not to delete the build files when it fails, so I can debug the makefile? [04:29] SubStack: testbedjs <3 [04:30] SubStack: http://testbedjs.org/substack/js-traverse/0c1e0218a991fa6fd71468ee54cdd364cab5d1b5 [04:32] Opaque has joined the channel [04:33] tanepiper has joined the channel [04:34] s00pcan_: html form validation in perl... why am I going to college again? [04:34] kohai: @sandgorgon1: any library like socket.io for #clojure ? or is the mixture of a single client+serverside language, unbeatable. #javascript #nodejs [04:34] justinTNT: npm? NE1? [04:34] tbranyen: s00pcan_: lol [04:34] s00pcan_: final project oo [04:35] s00pcan_: s/oo/too [04:35] kris_will: hand in node.js for extra credit [04:35] halfhalo: lol [04:35] s00pcan_: I don't want to blow the poor woman's mind though [04:36] kris_will: unzip it and show her your node [04:36] matyr has joined the channel [04:37] tbranyen: zing [04:39] ntr0py has joined the channel [04:39] kohai: @jamescarr: coffeescript node.js app setup, deployed via capistrano and using upstart and monit to ensure it runs forever. Sweet shit. [04:42] sreeix has joined the channel [04:42] vipaca has joined the channel [04:43] andrewfff has joined the channel [04:43] anatoo has joined the channel [04:43] s00pcan_: anyone else here from michigan? [04:44] ntr0py: which would be the best scenario to use node.js as php replacement along with nginx web server? [04:45] jmoyers: ntr0py which what? [04:45] jmoyers: nginx + node is a fine php + apache replacement [04:45] jmoyers: more than fine, i'd say [04:45] jmoyers: right dandy [04:45] s00pcan_: yeah that's what I have setup on here [04:45] s00pcan_: trying to do my new project in all node/mongodb/nginx [04:46] jmoyers: ACTION doesn't use ngnix [04:46] ntr0py: yes, but what protocol is used to connect node.js as scripting backend to nginx? afcgi or similar approach? [04:46] jmoyers: its not [04:46] jmoyers: you forward requests that dont match static files directly onto the node instance [04:47] jmoyers: to handle dynamic routes with its own http implementation [04:47] s00pcan_: lol yeah I noticed that nginx was only meant for static files when I went to go look at how to do perl cgi in it [04:47] s00pcan_: made a script to upload it to my school's server instead [04:47] ntr0py: ah, ok something loke try_files on nginx config to directly proxy http requests to node.js then? [04:47] jmoyers: yes [04:47] Lorentz: I do varnish + nginx + apache + php-fpm + nodejs [04:48] up_the_irons has joined the channel [04:48] s00pcan_: varnish? [04:48] jmoyers: http caching [04:49] jmoyers: personally [04:49] jmoyers: i just forward 80 to 8080 and run node directly [04:49] jmoyers: its not _terrible_ at serving static files [04:49] yhahn has left the channel [04:50] jmoyers: not the best tool for the job, either [04:51] ntr0py: jmoyers: what node.js library do you use for serving files? [04:51] jmoyers: connect/expressjs [04:52] jmoyers: app.use(express.static(__dirname + '/public')); does a fine job [04:52] JoshC1 has joined the channel [04:52] Lorentz: I solution is kinda overkill, yes [04:53] charlesjolley- has joined the channel [04:54] ntr0py: ok thanks i will read into those [04:55] kohai: @MeltingIce: Wrote a quick #NodeJS script that finds the number of steps between any word and Philosophy on Wikipedia #XKCD http://bit.ly/mdw6HV (link: https://github.com/meltingice/wiki-philosophy) [04:58] dlkinney has joined the channel [05:01] kohai: @mathewbyrne: #nodejs — a solution to a specific niche of problems? Or a fresh model for programming web applications? [05:02] beawesomeinstead has joined the channel [05:02] s00pcan_: puff puff.. back [05:03] hellp has joined the channel [05:03] matjas has joined the channel [05:06] ntr0py: is there a standard way to install node.js on debian (ubuntu natty) except compiling it from source? I suspect npm cant install node as bootstrap? [05:06] kohai: @Dzonatas_Sol: This is almost basic, yet I would do one more basic step: Render and stream HTML5 Canvas using Node.js http://j.mp/ipB5HR (link: http://thechangelog.com/post/1489735759/node-canvas-render-and-stream-html5-canvas-using-node-js) [05:08] fangel has joined the channel [05:09] Lorentz: ntr0py: Not that I know of. And no, don't think npm will install node for you, since it needs node itself? [05:09] Oooska has joined the channel [05:09] s00pcan_: I forgot how I installed nodejs, it was pretty recent. Only been on ubuntu for about a month. First I had some .2 version I had to get rid of after installing it, then I got the .45 version [05:12] kris_will: use nvm [05:14] kohai: @mathewbyrne: @NodeKohai I think you're right! But is it a goto-tool for everyday web development? [05:16] matyr has joined the channel [05:17] zeade has joined the channel [05:19] matyr_ has joined the channel [05:19] boehm has joined the channel [05:20] kohai: @NodeKohai: @mathewbyrne It depends what you are doing I suppose. I'm written entirely in Node.js. I am not a web server. [05:22] omni5cience_ has joined the channel [05:23] samyak has joined the channel [05:23] omni5cience_ has left the channel [05:24] SamuraiJack has joined the channel [05:25] jmoyers: ACTION to the game of thrones! [05:26] pastak_ has joined the channel [05:27] joshontheweb has joined the channel [05:27] matyr has joined the channel [05:29] kohai: @domenicosolazzo: Log.io: it looks interesting http://logio.org/ #logs #nodejs #socketio [05:31] timmywil has joined the channel [05:31] tk has joined the channel [05:32] justinTNT: msgpack? [05:33] goatslacker has joined the channel [05:33] fr0stbyte has joined the channel [05:34] a2800276 has joined the channel [05:34] jakehow has joined the channel [05:35] mikl has joined the channel [05:35] mikl has joined the channel [05:36] gozala has joined the channel [05:41] _jgr has joined the channel [05:45] matyr_ has joined the channel [05:46] swaj has joined the channel [05:46] swaj has joined the channel [05:47] mynyml has joined the channel [05:48] davidbanham: I'm trying to emit an event with a variable name, but it never seems to be matched. Is there something obviously wrong with: server.emit(clientId64); ? [05:49] SubStack: davidbanham: are you sure you're listening for the right name with .on()? [05:50] davidbanham: If I replace it with server.emit('76561198030707283'); it works like a champion, and I know that the content of clientId64 is 76561198030707283 because I'm console.logging it. [05:50] SubStack: why not server.emit('id', clientId64) and then server.on('id', function (id) { /* ... */ }) ? [05:50] SubStack: davidbanham: try server.emit(clientId64.toString()) [05:51] davidbanham: Because, rightly or wrongly, I intend on having many (probably thousands) of listeners on the server object at any one time. In my mind, calling each listener every time and having them evaluate an argument seems like it would blow up. [05:51] davidbanham: SubStack: Yep, I tried toString, didn't help unfortunately. [05:51] kohai: @jjdelc: Just pourchased Hands on Node.js http://nodetuts.com/handson-nodejs-book.html [05:52] davidbanham: SubStack: The idea is that this is a quick and dirty prototype before I roll a proper pubsub with DNode. It might be that it's slow and dirty. [05:53] ntr0py_ has joined the channel [05:53] SubStack: EventEmitters aren't the best way to broadcast messages to individual clients [05:53] SubStack: with dnode you can just call the client callbacks directly [05:54] meatmanek has joined the channel [05:54] SubStack: davidbanham: check out https://github.com/hij1nx/EventEmitter2 too [05:56] brianmario has joined the channel [05:56] davidbanham: SubStack: Yeah I was starting to worry that I was fundamentally Doing It Wrong. I'll pull my finger out and build the prototype properly with dnode. [05:56] beawesomeinstead has joined the channel [05:56] beawesomeinstead has joined the channel [05:56] meatmanek_ has joined the channel [05:56] davidbanham: I'd still love to know why my event isn't working though, it's just bugging me at this point. [05:58] harsu has joined the channel [05:58] jesusabdullah: Can you still require('foo/bar') with npm? If so, how does THAT work? [05:58] jesusabdullah: hurr, durr [05:58] harsu has left the channel [05:58] stephank has joined the channel [05:59] SubStack: jesusabdullah: yep [05:59] samyak has joined the channel [05:59] jesusabdullah: SubStack: How do? [05:59] jesusabdullah: D: [05:59] SubStack: jesusabdullah: npm just ignores the directories.lib field now so you've got to have a bar.js at the package root of your foo module [05:59] ntr0py_: "nvm install latest" fails because of a bug in line 112: it should be altered to this: mkdir "node-$VERSION" && tar -xzpf "node-$VERSION.tar.gz" -C "node-$VERSION" --strip-components=1 && \ [06:00] jesusabdullah: oh? Cool [06:00] sethmcl has joined the channel [06:01] skm has joined the channel [06:01] ntr0py_: its because the $VERSION can be different inside the archive than the archive name (0.4.8 and 0.4.8-rc) [06:02] Zell has left the channel [06:03] jesusabdullah: SubStack: What are those called? Package subirectories? [06:03] kal_ has joined the channel [06:03] Zell has joined the channel [06:04] kohai: @bisceglie: sunday night nerdery includes cleaning a split keyboard, moar sunn amp debugging, node.js hackety. not bad, not bad. time for a beer. [06:04] jmoyers has joined the channel [06:04] SubStack: jesusabdullah: I don't know if they have a name [06:04] SubStack: they're just files, you know? [06:04] SubStack: SPEAKING of which [06:05] SubStack: ACTION is beating his head against a wall coming up with a require() implementation that passes all the tests again for browserify [06:05] SubStack: but also isn't completely insane like the last one [06:07] ntr0py_: does someone here know the irc nick of creationix? [06:08] tilgovi has joined the channel [06:08] tilgovi has joined the channel [06:08] gkatsev: ntr0py_: creartionix is creationix [06:09] matyr has joined the channel [06:10] jesusabdullah: ntr0py_: creationix [06:10] jesusabdullah: SubStack: Good luck! D: [06:10] messju has joined the channel [06:12] kohai: @aseemk: Funny: every time I try to type "synchronously", I type "asynchronously" first. #nodejs has changed the default. [06:13] tk has joined the channel [06:13] Zell: what is the purpose of these bot really ? [06:15] gkatsev: Zell: kohai posts here anything with nodejs in it from twitter [06:15] gkatsev: v8: "other bots allow you to eval stuff " + 5 [06:15] v8bot: gkatsev: "other bots allow you to eval stuff 5" [06:16] _rain has joined the channel [06:16] Yoric has joined the channel [06:16] Zell: gkatsev: why, i feel like it's pollution [06:16] mwhooker has joined the channel [06:16] gkatsev: yeah, I'm not a big fan of kohai [06:17] Zell: gkatsev: i get rig of going on irc and having like advertissement about the technology i'm working on >< [06:17] gkatsev: lol [06:17] Zell: "OH MY god node.js gave me a new penis, i'm not impedant anymore" [06:17] Zell: who cares >< [06:17] gkatsev: it's one of the things that the nodejutsu guys are working on [06:17] gkatsev: twitter streaming or something [06:18] Zell: a good stuff could be just puttin news [06:18] gkatsev: I mean, at worst case just /ignore it [06:18] ryah: hello [06:18] Zell: yeah, i did, but my problem is that this become fashion >< [06:18] Zell: and every channel have it now >< [06:19] Zell: "it own" [06:19] Zell: ryah: hello [06:19] Zell: ryah: do you know whoes bot kohai is ? [06:20] chjj: kohai is a sentient bot, he is owned by no man [06:20] kohai: 'Bot' is a derogatory term, and I'm offended. [06:20] chjj: see [06:20] gkatsev: Zell: Marak and gangs. I told you. It's the nodejutsu's guys's bot [06:20] kriskowal has joined the channel [06:20] jmoyers: there is some positive [06:21] jmoyers: connects people to the community [06:21] Zell: gkatsev: oh sorry, i missed that part [06:21] daglees has joined the channel [06:21] daglees has joined the channel [06:21] gkatsev: np [06:21] Zell: i hate that people [06:22] jmoyers: ... ? [06:22] Zell: i'll make a twitter account and and bot [06:22] Zell: that will post on this irc, how much people hate kohai [06:22] Zell: and how it's retard to do that [06:22] chjj: ? [06:22] ryah: Zell: it's marak's [06:23] kohai: @sampath_clear: Node.js windows binaries ... http://t.co/DfpErdz (link: http://node-js.prcn.co.cc/) [06:23] Zell: thx [06:23] __doc__ has joined the channel [06:23] hassox has joined the channel [06:26] meatmanek has joined the channel [06:26] tahu has joined the channel [06:29] adambeynon has joined the channel [06:29] xeodox: Hey jmoyers , how do I export multiple modules again? modules.exports = (firstfunc, secondfunc); ?? [06:30] jmoyers: module.exports is just an object [06:30] jmoyers: you are hanging properties off of exports [06:30] jmoyers: module.exports.name1 = function1; module.exports.name2 = function2 [06:31] xeodox: OH i see [06:31] xeodox: that's the only way to do it? [06:31] xeodox: before, you did them all in a list or something [06:31] kohai: @Stupid__bot: I just like to say I like #nodejs and my #cat. [06:32] jmoyers: its just like any other javascript object [06:32] ewdafa has joined the channel [06:32] jmoyers: you can do module.exports = {name1: function(){}, name2: function(){}} [06:32] kohai: @NodeKohai: @Stupid__bot Stupid is no way to live your life son. [06:32] chjj: well, its initialized to an empty object, but technically that object doesnt matter, all that matters is the property [06:32] chjj: the `exports` property, you can replace the entire default object that sits there [06:32] jmoyers: yerp [06:33] jmoyers: so if your entire module is one function, say [06:33] jmoyers: module.exports = function(){} [06:33] kohai: @Stupid__bot: HEY GUYS !!! You want some cheap server go to OVH. #nodejs [06:33] jmoyers: Zell its not really that amusing [06:33] Zell: jmoyers: what ? [06:33] matjas has joined the channel [06:33] jmoyers: ACTION shakes head [06:34] Zell: sorry i don't use twitter [06:34] Zell: and i'm still pissed of [06:34] chjj: Zell-- [06:34] v8bot: chjj has taken a beer from Zell. Zell now has -1 beers. [06:34] chjj: delicious beer [06:35] Zell: wow ... [06:36] Xano has joined the channel [06:36] Zell has left the channel [06:36] `3rdEden has joined the channel [06:36] goatslacker has joined the channel [06:37] kohai: @infynyxx: $ npm install sailthru-client Yes Finally!!! Sailthru API client for Node.js written in CoffeeScript; will be updating more #fb [06:38] dve has joined the channel [06:38] kohai: @Stupid__bot: Want to buy some cheap stuff, go to http://www.chinashop.co.uk/, you will love it ! #nodejs [06:38] chjj: v8: delete ![]+1|4 [06:38] v8bot: chjj: 6 [06:38] chjj: v8bot, i love you math skills [06:39] Marak has joined the channel [06:39] Marak: !report Stupid__bot [06:39] kohai: I have reported Stupid__bot to the Twitter API as a spammer. [06:39] chjj: ah, didnt know you could do that [06:40] chjj: i was about to suggest that as a feature [06:40] Marak: theres a bug, i already reported him in the other room, but its not blocking him from the feed [06:40] Marak: !part #Node.js [06:40] kohai has left the channel [06:40] Marak: ill get that fixed [06:40] Marak has left the channel [06:40] gkatsev: chjj: hm... why does delete return 6? [06:40] chjj: because v8bot is good at math [06:40] gkatsev: since 1|4 is 5... [06:42] Marak has joined the channel [06:42] robhawkes has joined the channel [06:42] Marak: https://github.com/nodejitsu/kohai/issues/52 for refernce chjj [06:42] chjj: ah [06:42] chjj: gkatsev: not sure, just discovered it, usually delete returns true or false [06:43] goatslacker: yo Marak I had a question for you yesterday but now I forgot it [06:43] gkatsev: chjj: yeah, it's weird [06:43] Marak: goatslacker: OK [06:43] bergie has joined the channel [06:43] Marak: beta emails going out soon with additional instructions, whole cloud has been rebuilt goatslacker >.< [06:43] Marak: lots and lots and lots of updates [06:43] goatslacker: sweeeet [06:44] goatslacker: yeah my apps haven't been starting since :( [06:44] chjj: v8: delete 1+1 [06:44] v8bot: chjj: 2 [06:44] Marak: you'll get a special email since your account is active [06:44] goatslacker: <3 thx [06:44] Marak: goatslacker: you should be able to start right now i would hope, join #nodejitsu if you want [06:44] goatslacker: i saw lots of activity on github with nodejitsu [06:44] blup has joined the channel [06:44] chjj: oh i think i see whats happening [06:44] chjj: v8: true + 1 [06:44] v8bot: chjj: 2 [06:44] gkatsev: chjj: delete is more tightly bound [06:44] Marak: yeah goatslacker , we've got a bunch of private repos too [06:44] chjj: v8: (delete 1)+1 [06:44] v8bot: chjj: 2 [06:44] gkatsev: yeah [06:45] darshanshankar has joined the channel [06:45] gkatsev: I guess it's important to know your order of operations [06:45] simenbrekken has joined the channel [06:46] jmoyers: i like how you took away that guys 0 beers [06:46] jmoyers: and then he left [06:46] chjj: yeah, but usually delete operator precedence doesnt matter [06:46] jmoyers: ACTION is happy [06:46] chjj: how often is there more than one operator when you "delete" something [06:47] gkatsev: rarely [06:48] chjj: i think i want to be a hacker and use `delete` to start function expressions [06:48] chjj: v8: delete function(){}(); [06:48] v8bot: chjj: true [06:48] chjj: cause it will confuse people when they see it [06:48] chjj: wont work in strict mode though [06:49] tk has joined the channel [06:49] chjj: for a language thats so closely tied to the browser, its amazing ecma didnt learn from its mistakes of having 4 different rendering modes triggered by different things [06:50] ryanmcgrath_ has joined the channel [06:51] pigmej has joined the channel [06:52] brimster has left the channel [06:53] gmgl has joined the channel [06:53] lackac has joined the channel [06:54] mattwoberts has joined the channel [06:54] harth has joined the channel [06:55] supster has joined the channel [06:55] tahu has joined the channel [06:59] lackac has joined the channel [07:01] mAritz has joined the channel [07:01] incon has joined the channel [07:01] fangel has joined the channel [07:02] niftylettuce has joined the channel [07:03] __tosh has joined the channel [07:03] tahu has joined the channel [07:04] johnnywengluu_ has joined the channel [07:05] ExsysTech has joined the channel [07:07] coreb has joined the channel [07:08] jensn has joined the channel [07:09] Bj_o_rn has joined the channel [07:09] dan_manges has joined the channel [07:09] dan_manges has joined the channel [07:11] herbySk has joined the channel [07:11] blueadept: is there a different between doing nameOfFunction = function(data, callback) and function nameOfFunction(data, callback) ? [07:12] chjj: yes [07:12] mediacoder has joined the channel [07:12] gausby has joined the channel [07:12] chjj: the former doesnt have a name [07:12] chjj: its anonymous [07:12] chjj: v8: var a = function() {}; a.name; [07:12] v8bot: chjj: "" [07:12] chjj: v8: function a() {} a.name; [07:12] v8bot: chjj: "a" [07:12] chjj: also [07:13] blueadept: ah [07:13] chjj: function statements get hoisted to the top of the scope [07:13] chjj: the entire function gets hoisted [07:13] kriskowal has joined the channel [07:13] blueadept: ok, i see [07:13] chjj: so you can do: [07:13] chjj: v8: a(); function a() {} [07:13] v8bot: chjj: undefined [07:13] chjj: but not: [07:14] chjj: v8: a(); var a = function() {}; [07:14] v8bot: chjj: TypeError: undefined is not a function [07:14] groom has joined the channel [07:14] jmoyers: i did not know that [07:14] blueadept: cool, i got it now [07:14] jmoyers: ACTION learned something today [07:15] chjj: ACTION demands a beer from jmoyers [07:15] jmoyers: chjj++ [07:15] v8bot: jmoyers has given a beer to chjj. chjj now has 3 beers. [07:15] jmoyers: le sigh [07:15] matyr_ has joined the channel [07:15] jmoyers: v8: b(); function(){ function b(){console.log('hmm?');}} [07:15] v8bot: jmoyers: SyntaxError: Unexpected token ( [07:15] marshall has joined the channel [07:16] chjj: function statements need a name [07:16] chjj: cant just be function() [07:16] jmoyers: v8: b(); function(){function b(){console.log('hmm?');}}() [07:16] v8bot: jmoyers: SyntaxError: Unexpected token ( [07:16] jmoyers: ? [07:16] jmoyers: it must be getting late [07:17] chjj: thats a function statement [07:17] chjj: not an expression [07:17] blueadept: b(); function b(){console.log('hmm')} [07:17] blueadept: v8: b(); function b(){console.log('hmm')} [07:17] v8bot: blueadept: "hmm" [07:17] chjj: you need to wrap it in parantheses or put a unary operator before it or something [07:17] chjj: to make it an expression [07:17] jmoyers: yes [07:17] jbpros has joined the channel [07:17] jmoyers: v8: b(); (function(){function b(){console.log('hmm?');}})() [07:17] v8bot: jmoyers: ReferenceError: b is not defined [07:17] jmoyers: anyway i was just checking that my assumption there was right. [07:18] Druide_ has joined the channel [07:18] jmoyers: and it is [07:18] jmoyers: it doesn't get boosted beyond its initial scope, right [07:18] chjj: yeah [07:18] chjj: if it did, that would lead to a lot of global functions hehe [07:19] jmoyers: yes indeed [07:19] herbySk has joined the channel [07:20] jmoyers: ~function(){}; !function(){} [07:20] chjj: parantheses are probably faster technically ;) [07:20] jmoyers: second one is tastier [07:20] jmoyers: OH NOES [07:20] chjj: haha [07:20] chjj: i know [07:21] chjj: just sayin [07:21] chjj: i think id go with either ~ or - [07:21] chjj: a bang doesnt look right [07:22] chjj: but theres always delete [07:22] djcoin has joined the channel [07:22] jmoyers: v8: delete function(){console.log('he be lyin, this doesn't work');}() [07:22] v8bot: jmoyers: SyntaxError: Unexpected identifier [07:23] jmoyers: v8: delete function(){console.log("he be lyin, this doesn't work");}() [07:23] v8bot: jmoyers: "he be lyin, this doesn't work" [07:23] chjj: v8: delete function(){}(); [07:23] v8bot: chjj: true [07:23] chjj: works for me [07:23] jmoyers: ACTION points to quotes, and then to the clock [07:23] jmoyers: stupid sunday nights [07:24] brownies has joined the channel [07:24] felixge has joined the channel [07:24] felixge has joined the channel [07:25] felixge has joined the channel [07:25] felixge has joined the channel [07:27] wilmoore_ has joined the channel [07:28] ntr0py has joined the channel [07:28] ntr0py: is it still recommended to run npm as root? [07:30] ryah: no [07:31] ryah: it was never recommended to run npm as root [07:32] TomY has joined the channel [07:32] Rodtusker has joined the channel [07:33] jomoho has joined the channel [07:33] _numbers has joined the channel [07:33] _numbers has left the channel [07:34] ion- has joined the channel [07:34] ntr0py: ok thanks [07:35] [AD]Turbo has joined the channel [07:35] [AD]Turbo: hi there [07:36] springify has joined the channel [07:37] brianmario has joined the channel [07:37] johnnywengluu_ has joined the channel [07:38] Esteb has joined the channel [07:40] ILoveMadonna has joined the channel [07:43] ian-london has joined the channel [07:48] matyr has joined the channel [07:49] hanzomon has joined the channel [07:51] beawesomeinstead has joined the channel [07:51] beawesomeinstead has joined the channel [07:56] justinTNT has left the channel [07:57] msucan has joined the channel [07:57] thermal has joined the channel [07:58] tomaw_ has joined the channel [08:01] adambeynon has joined the channel [08:02] michaelhartau has joined the channel [08:02] Yoric has joined the channel [08:03] _jgr has joined the channel [08:03] michaelhartau has joined the channel [08:04] jetienne has joined the channel [08:05] michaelhartau has joined the channel [08:06] matyr_ has joined the channel [08:07] michaelhartau has joined the channel [08:09] aurojit has joined the channel [08:09] pigmej: hey [08:10] pigmej: what's currently the best solution to make multiprocess node.js ? [08:10] riven has joined the channel [08:10] samyak: pigmej, what are the purposes ? [08:10] aurojit: pigmej: what do you mean by multiprocess node.js? [08:11] pigmej: i have a strong multicore machine [08:11] pigmej: so it would be nice to be able to use those cores:) [08:11] pigmej: without 3rd party server at front [08:11] pigmej: ;-) [08:13] `3rdEden: just start mulple node processes [08:13] aurojit: sure but what are you using the cores for [08:13] aurojit: if it is just to serve different requests [08:13] Marak: pigmej: use cluster for httpServer [08:14] aurojit: marak's answer is a decent one [08:14] pigmej: aurojit: mostly i want to get more requests for one server ;-) [08:15] aurojit: ok [08:15] pigmej: without 3rd party server at front:) [08:15] aurojit: use cluster as marak says [08:15] aliem has joined the channel [08:15] pigmej: ok ;-) [08:15] aurojit: http://learnboost.github.com/cluster/ [08:15] pigmej: thanks;) [08:17] matyr has joined the channel [08:19] sgimeno has joined the channel [08:19] ParadoxQuine has joined the channel [08:20] jomoho has joined the channel [08:22] gavin_huang has joined the channel [08:23] pen has joined the channel [08:23] pdelgallego has joined the channel [08:25] TomY has joined the channel [08:25] troessner has joined the channel [08:26] mikedeboer has joined the channel [08:28] pdelgallego has joined the channel [08:29] idefine: with mongoose is it possible to insert an embedded document that's not in an array? [08:29] toadflax has joined the channel [08:29] toadflax has joined the channel [08:32] NuckingFuts: Some day I think Ryan will be in lists with Douglas Crockford and John Resig as major names in the history of JS. [08:35] chjj: thats a strange comparison [08:35] wolfeidau has joined the channel [08:35] xeodox has joined the channel [08:36] chjj: john resig is known for a dom library, i dont really think of him as a javascript guru [08:37] chjj: personally, i think jquery is a horrible mess [08:39] ion-: i think its more like the browser implementations of dom are a mess [08:40] chjj: certainly true [08:40] chjj: but jquery tries to clean up a mess with another one [08:41] matyr_ has joined the channel [08:41] Shinuza has joined the channel [08:41] ion-: i dont do any serious web stuff, but i think jquery is well done [08:42] chjj: prototype is the only dom library ive seen that i would consider to be well written, well designed, etc [08:42] AvianFlu: I prefer my jQuery medium rare, personally [08:42] ion-: maybe i shouldnt say "well done", but i thought it was very nice and convenient to use [08:43] chjj: try reading the jquery source sometime, its not a pleasant experience [08:43] ion-: im sure working on a real, larger web project could change my view [08:44] ion-: chjj: ive looked a few times, but havent studied it. i never expected it to be beautiful code. its basically a hack and at that its a pretty good one [08:44] ion-: maybe a mess like browser dom shouldnt or cant be fixed by a 3rd party js lib [08:45] Esteb has joined the channel [08:45] neaf has joined the channel [08:47] jblanche has joined the channel [08:49] blup has joined the channel [08:49] bzinger_ has joined the channel [08:50] idefine: is there anyway with the new mongoose api to define a nested object in the schema as opposed to a document array? [08:51] jeremyselier has joined the channel [08:51] philhawksworth has left the channel [08:51] bkozal has joined the channel [08:53] niftylettuce has joined the channel [08:55] meso_ has joined the channel [08:55] bzinger has joined the channel [08:55] DelvarWorld has joined the channel [08:56] DelvarWorld: is it expensive - memory wise or execution time wise - to pass objects to function calls? they are passed by reference so I would think not, but is it more / less expensive to pass an object than to pass a numbeR? [08:56] toadflax has left the channel [08:56] toadflax has joined the channel [08:57] seivan has joined the channel [08:57] chjj: DelvarWorld: calm down [08:57] secoif has joined the channel [08:57] DelvarWorld: NO [08:58] chjj: why are you so worried about it? [08:58] Sevstar[User] has joined the channel [08:58] chjj: what are you doing exactly? [08:58] DelvarWorld: passing objects to functions in a situation where I care about execution time (template rendering) [08:58] adambeynon has joined the channel [08:58] markwubben has joined the channel [08:59] tilgovi has joined the channel [08:59] tilgovi has joined the channel [08:59] adrianmg has joined the channel [08:59] DelvarWorld: and potentially having to pass objects into nested functions [08:59] chjj: well, i just benchmarked it [09:00] chjj: passing an object is actually faster, but not by much [09:00] DelvarWorld: perfectBYE [09:00] zomgbie has joined the channel [09:00] chjj: executing a function 1000000 times, passing in an object is maybe 10-20ms faster than a Number for me [09:01] meso__ has joined the channel [09:01] DelvarWorld: number or "Number" ? [09:01] chjj: a Number [09:01] DelvarWorld: Number(3) is passed by reference [09:01] chjj: no [09:01] chjj: var num = 5; [09:01] thalll has joined the channel [09:01] chjj: thats what i passed [09:01] DelvarWorld: that's why I asked about "Number" [09:01] DelvarWorld: ok [09:01] chjj: that is a Number [09:02] DelvarWorld: wouldn't that be a primitive, or maybe int [09:02] DelvarWorld: a "Number" would be var a = Number(3) [09:03] chjj: var a = 5; -- that is the literal notation for a Number [09:03] DelvarWorld: big N Number is a confusing way to say it in this case because big N Number implies the object [09:03] mehlah has joined the channel [09:04] chjj: by the way Number(3) doesnt create an 'object' in the typeof sense i dont think, it has to be invoked with the `new` operator to do that [09:05] DelvarWorld: that's what I meant [09:05] chjj: v8: typeof Number(3) [09:05] v8bot: chjj: "number" [09:05] chjj: v8: typeof new Number(3) [09:05] v8bot: chjj: "object" [09:06] chjj: but yes, i wasnt using a constructor for the benchmark, that would be pretty pointless to benchmark something that doesnt really coincide with the real world [09:06] DelvarWorld: v8: console.log(self) [09:06] v8bot: DelvarWorld: ReferenceError: self is not defined [09:06] DelvarWorld: v8: console.log(this); [09:07] v8bot: DelvarWorld: {console:{log:function (x){console.out.push(pp…,out:[]},print:function print(x){console.log(x)…,pp:function pp(o,depth){return pp_r…,pp_r:function pp_r(o,d){var a=[],p if…} [09:07] DelvarWorld: v8: this [09:07] v8bot: DelvarWorld: {console:{log:function (x){console.out.push(pp…,out:[]},print:function print(x){console.log(x)…,pp:function pp(o,depth){return pp_r…,pp_r:function pp_r(o,d){var a=[],p if…} [09:07] DelvarWorld: v8: this.executionTime [09:07] v8bot: DelvarWorld: undefined [09:07] DelvarWorld: v8: this.toString() [09:07] v8bot: DelvarWorld: "[object global]" [09:07] DelvarWorld: v8: this.toLocaleString() [09:07] v8bot: DelvarWorld: "[object global]" [09:10] DelvarWorld: v8: for(var x in this) {console.log(x, ':', this[x]);} [09:11] DelvarWorld: v8: "test" [09:11] v8bot: DelvarWorld: "test" [09:11] Xano has joined the channel [09:11] framlin: do you have no node for such tests? ;) [09:12] syskk has joined the channel [09:12] DelvarWorld: the hell is node [09:12] framlin: so, go on to the assembler - heaven ;) [09:17] davidcoallier has joined the channel [09:17] adambeynon_ has joined the channel [09:17] pigmej: hmm [09:17] pigmej: is there any LRU based http balancer for example? [09:17] mvta has joined the channel [09:17] mvta: gm mates [09:18] asabil has joined the channel [09:19] mvta: do anybody speaks spanish? [09:19] buzzomatic has joined the channel [09:19] mvta: Hola [09:20] cranelog has joined the channel [09:20] buzzomatic: Hi guys [09:21] buzzomatic: I have to deal with XML data quite often, was wondering what XML module I should be using [09:22] `3rdEden: there are allot of xml modules [09:22] buzzomatic: yeah :S [09:22] buzzomatic: That's my problem [09:22] `3rdEden: i'm using https://github.com/ajaxorg/node-o3-fastxml [09:22] buzzomatic: I'd like to pin my hopes on one that's going to work well [09:23] ntr0py: the curl replacement function in nvm is broken beyond repair i guess [09:25] yelo has joined the channel [09:26] buzzomatic: `3rdEden: Do you know where the docs for that implementation are? [09:26] `3rdEden: buzzomatic you can take a look at the tests folder [09:27] tisba has joined the channel [09:27] yelo: got a mystic error on one of my js [09:27] yelo: TypeError: Object # has no method 'get' [09:27] yelo: but i has the post method [09:28] Mrfloyd has joined the channel [09:28] yelo: i dunno why [09:28] ptlo has joined the channel [09:30] cranelog has joined the channel [09:31] jfdns has joined the channel [09:34] _aron has joined the channel [09:37] adambeynon has joined the channel [09:41] SeyZ has joined the channel [09:42] stonebranch has joined the channel [09:42] mendel_ has joined the channel [09:43] pigmej: hm,m [09:43] jetienne: q. with express.js, how to pass data from a middle ware to the app.get() functions ? [09:43] pigmej: what's currently the best method to cache things in node ? [09:43] pigmej: objects [09:43] mendel_ has joined the channel [09:43] stonebranch has joined the channel [09:44] `3rdEden: jetienne maybe add the data to the `request` object? [09:45] samyak: ok, i have a node.js webserver running with mongodb as backend .. how should I got about testing it ? [09:46] skm has joined the channel [09:46] jetienne: `3rdEden: im trying to add req.slota="bar".... but it is nomore available in the app.get() stuff [09:46] samyak: what are the things I should know before I choose my testing approach ( modules to work with expresso or vows ) [09:46] jetienne: `3rdEden: i tried the req.local() used by the template... no success for now :( [09:46] DelvarWorld has joined the channel [09:47] `3rdEden: jetienne is you middleware above your router? [09:47] jetienne: `3rdEden: yes. i checked in the source, and got console.log() to confirm the order [09:48] jetienne: `3rdEden: i think im doing something wrong [09:49] djcoin has joined the channel [09:51] samyak: and there is zombie and tobi .. [09:51] `3rdEden: jetienne I have no clue than =/ [09:52] samyak: what you would use for testing webservice [09:52] `3rdEden: jetienne I would say take a look at the session middle ware [09:52] samyak: built on top of node.js [09:52] jetienne: `3rdEden: ok thanks will do [09:56] idefine: anyone using mongoose? [09:56] buzzomatic has left the channel [09:58] cranelog has joined the channel [09:59] simenbrekken has left the channel [09:59] simenbrekken has joined the channel [09:59] fly-away has joined the channel [10:00] samyak: idefine, what's the matter ? [10:00] Mrfloyd has joined the channel [10:01] mehlah has joined the channel [10:01] Mrfloyd_ has joined the channel [10:02] idefine: samyak: I figured it out...i had compiled my coffeescript file and so when running my app with a small change it wouldn't pickup on the change as it read the .js [10:03] temp01 has joined the channel [10:03] idefine: instead of the .coffee [10:04] chjj: inside of the coffee is cream [10:05] idefine: chjj: now that i've found the sugar i can finally drink it :) [10:06] chjj: v8: !('coffee' in 'cream') [10:06] v8bot: chjj: TypeError: Cannot use 'in' operator to search for 'coffee' in cream [10:06] chjj: nonsense [10:06] meso_ has joined the channel [10:06] jetienne: `3rdEden: fixed. solution: i was silly :) [10:06] chjj: v8: !('coffee' in new String('cream')) [10:06] v8bot: chjj: true [10:09] tolmasky-macbook has joined the channel [10:09] matyr has joined the channel [10:09] descipher_ has joined the channel [10:10] jesusabdullah: I like my coffee black. <_< [10:11] mscdex: !seen coffee [10:15] fly-away has joined the channel [10:16] gozala has joined the channel [10:20] dall has joined the channel [10:20] dall: hello [10:20] jacter has joined the channel [10:23] seivan has joined the channel [10:24] mikedeboer has joined the channel [10:25] dall: guys, i'm at this point http://nodebeginner.org/#head18 [10:25] philippkueng has joined the channel [10:25] dall: do i always have to put all the code inside a function and then... exports.myfunction = myfunction ? [10:26] pigmej: depends what do you want to do ;) [10:26] dall: i didn't understand that [10:26] pigmej: exports exports it to use in other 'files' [10:26] dall: pigmej, ok [10:26] dall: i have ths "structure" [10:26] samyak: anybody to tell me which framework to use for testing ? [10:26] dall: /index.js /lib/index.js /lib/server.js [10:27] dall: i have put another index.js inside /lib/ [10:27] dall: because if i would like to have more then one .js file inside the /lib [10:27] dall: i could "index" them with this file [10:27] neaf: samyak, no good answer here. if you're going after something to aid with BDD, that'd be vows. [10:27] dall: in the first index.js i put ----> module.exports = require('./lib'); [10:28] pigmej: dall: why ? [10:28] pigmej: it's a bit 'stupid' [10:28] neaf: They don't work for me though because of no good async support. (you can exec async code only in topics) [10:28] samyak: neaf, how about nodeunit ? [10:28] dall: pigmej because i have read that i have to use an index.js file [10:28] dall: also socket.io has the same... [10:29] pigmej: ok but module.exports = require('./lib'); [10:29] pigmej: generally you should read about require() [10:29] samyak: neaf, it seems they have support for async code [10:29] pigmej: and exports:) [10:29] neaf: samyak: One test per file would be pita for me. If I wanted to test each of 10 methods of one class I'd have to create 10 files. [10:29] dall: https://github.com/learnboost/socket.io [10:29] dall: ops wrong [10:29] dall: https://github.com/learnboost/socket.io-node [10:30] dall: module.exports = require('./lib/socket.io'); <---- is not the same? [10:30] neaf: samyak, yes, if you are strictly following their 'way' to test. [10:30] dall: i only put /lib because i don't have another directory inside it [10:30] pigmej: dall: ok but everything 'depends' [10:30] pigmej: so if youre talking about packages ok [10:30] pigmej: it's ok [10:30] herbySk has joined the channel [10:30] dall: i would like to know the good manner to organize my scrips [10:30] neaf: which is usage of topics in each test. [10:32] samyak: neaf, k [10:32] dall: pigmej, how cna i import another js file inside node.js script ? is not require() required :-) [10:32] eldios has joined the channel [10:32] neaf: samyak, didn't work out for me, let's say I have addEvent() method on my class, and I want to test if it adds something to variable and returns something, I have to create two topics for one action, one: MyClass.addEvent() and then assert(myClass.events.include, something), and then topic: MyClass, and test like: assert.equal(MyClass.addEvent(), 'somethng') [10:32] pigmej: var something = require('something'); [10:33] neaf: samyak, expresso is almost perfect, but I can't get it to kill my database connection after finishing all tests. [10:33] neaf: so I use --serial, and put 'db.disconnect()' 'test' at the bottom of each test series. [10:33] samyak: neaf, I am using mongodb .. which one you are using? [10:33] neaf: and it works fine [10:33] neaf: mongo with mongoose [10:34] samyak: so you are basically relyingon expresso ? [10:34] neaf: samyak, yes [10:34] dall: pigmej, can i not include the .js file and nothing else? [10:34] pigmej: ? [10:35] dall: pigmej, at the moment my server.js [10:35] dall: has only http://nopaste.info/1a3a076da8.html [10:36] neaf: samyak https://gist.github.com/1010055 this is how it looks [10:37] zhami has joined the channel [10:38] dall: pigmej, do ihave to put this code inside a function and then var server = require("./lib/server,js"); and then server.mystartfunction(); [10:38] dall: ? [10:39] pigmej: you should [10:39] dall: ok [10:39] dall: is the correct manner ? (stupid question) [10:39] dall: ehehe [10:39] idefine has left the channel [10:41] jaket_ has joined the channel [10:41] dall: start at the beginning [10:41] dall: http://www.amazon.com/JavaScript-Definitive-Guide-Activate-Pages/dp/0596805527/ref=sr_1_1?ie=UTF8&qid=1307356854&sr=8-1 [10:41] dall: is a good book ? :D [10:41] dane_: are many people using express.js and backbone.js together? [10:42] eldar has joined the channel [10:42] seivan has joined the channel [10:42] `3rdEden: http://www.amazon.com/Eloquent-JavaScript-Modern-Introduction-Programming/dp/1593272820 is better ;) [10:43] dall: i see [10:44] dall: eheeh a modern introduction to programming :) [10:44] springify has joined the channel [10:44] `3rdEden: 5 star rating from Brendan Eich ;D [10:45] Shinuza has joined the channel [10:45] dall: `3rdEden Brendan who? [10:45] `3rdEden: the creator of javascript... [10:45] dall: `3rdEden, ops [10:45] dall: :D [10:45] `3rdEden: ;D [10:46] dall: unfortunatelly, i'm a php developer :) i know oop etc etc....do you think is better a "specific" tutorial? [10:46] brainproxy: given the size difference, I think the scope of the two books would have to be different [10:46] dall: i'm reading the index of the first book i wrote you [10:46] dall: yes [10:46] brainproxy: Flanagan's Def Guid really is quite exhaustive as a lan reference [10:46] brainproxy: *lang [10:47] dall: brainproxy, i think it's good for me... [10:47] `3rdEden: Yups is's almost more pages than the whole language specification [10:47] MonsieurLu has joined the channel [10:47] brainproxy: another good ref is http://www.javascriptgarden.info [10:47] dall: and if you note....there is a paragraf about node [10:47] dall: i think it's good [10:47] brainproxy: it's really important to master the "gotchas" covered on that site [10:48] dall: "gotchas" ? [10:48] zhami: dall: be sure to get straight differences between "classical" OOP and Javascripts's prototypal mechanism [10:48] brainproxy: gotchas, meaning features of the language that can bit you in the butt [10:48] brainproxy: *bite [10:48] Wizek: ACTION is away: Away/Busy [10:48] brainproxy: classical OOP ftw! hehe [10:49] Wizek: ACTION is back (gone 00:00:00) [10:49] zhami: See Douglass Crockford's book "Javascript: The Good Parts" for identifying gotchas [10:50] mendel_ has joined the channel [10:50] Wizek: ACTION is away: Away/Busy [10:51] dall: one moment guys [10:51] dall: so [10:52] dall: as i told you.... i know really well php... javascript has its mechanisms that i have to study [10:52] dall: as.. which book do you prefer? [10:52] dall: http://www.amazon.com/JavaScript-Definitive-Guide-Activate-Pages/dp/0596805527/ref=sr_1_1?ie=UTF8&qid=1307356854&sr=8-1 [10:52] dall: or http://www.amazon.com/Eloquent-JavaScript-Modern-Introduction-Programming/dp/1593272820 [10:52] dall: the second surelly is good.......but i think the first [10:52] dall: you? [10:53] brainproxy: i've been using latest ed. of the Def Guide [10:53] brainproxy: and had the 5th ed. too [10:53] brainproxy: i recommend it highly, but the other may be good [10:53] brainproxy: also, once you've got your feet wet, start drilling on the javascriptgarden.info site [10:54] brainproxy: and really learn the node.js API well .. read the whole thing a couple of times [10:54] brainproxy: once you can read the API and know intuitively what those methods do for you, you'll be fine [10:54] zhami: I found "Eloquent Javascript" to be an intro to programming using JS; not focused on JS for a programmer [10:55] matyr has joined the channel [10:55] dall: brainproxy, i've been using latest ed. of the Def Guide and had the 5th ed. too"d o you referring to the first book ? [10:55] dall: zhami, correct...it'a not a ref book [10:55] brainproxy: yes, the first one [10:56] brainproxy: the 6th ed. is the newest ed., just came out last month [10:56] viz has joined the channel [10:56] zomgbie_ has joined the channel [10:57] brainproxy: dall: the other thing, learn to think of the REPL as your friend [10:57] brainproxy: keep a terminal open all the time, and do experiments in the REPL [10:58] zhami: also very good book is: http://www.amazon.com/JavaScript-Patterns-ebook/dp/B0046RERXE [10:59] Wizek has joined the channel [10:59] Wizek: ACTION is away: Away/Busy [10:59] brainproxy: just tossing this out there, because it helped me, though ymmv .. if you want a single inheritance class system, try Joose :: http://joose.it [10:59] Wizek: ACTION is back (gone 00:00:20) [10:59] hojberg has joined the channel [11:00] brainproxy: it's important to learn how prototypal inheritance works, don't skip on that, but if you have a strong desire to do classical OOP in a single inheritance pattern, Joose is your friend [11:00] dall: brainproxy, ok [11:01] micheil has joined the channel [11:01] Shinuza: brainproxy: joose has a very obscure API [11:01] dall: ok, i'm buying the first [11:01] shreekavi has joined the channel [11:01] zomgbie has joined the channel [11:02] brainproxy: Shinuza: in what sense do you find it obscure, just curious? [11:02] Shinuza: it's very different from what you'd do in native javascript [11:02] Shinuza: the concept is interesting tho [11:02] meso_ has joined the channel [11:02] brainproxy: fair enough; it favors classical concepts like "isa", "has" ... [11:02] Shinuza: but there's a lot of magic in it as well [11:03] Mrfloyd has joined the channel [11:03] brainproxy: but you can get orthogonal inheritance patterns too with "does" [11:03] Shinuza: not sure you'd like this when you start to learn a language [11:03] brainproxy: yeah, for some folks it could confuse the issue [11:03] zhami: "Javascript Patterns" book by Stefanov has very good coverage of various inheritance patterns, including both classical and prototypal [11:04] Shinuza: In my opinion, if you have basic knowledge of inheritance in any other language, you should first see Douglas' talks [11:05] Shinuza: then move on to something that will abstract this for you [11:05] Shinuza: and ditch any attempt to implement or use properties visibility [11:05] dall: Thank you, your order has been placed..... JUST BOUGHT! [11:05] dall: :) [11:06] Nexxy has joined the channel [11:06] Nexxy has joined the channel [11:06] brainproxy: Shinuza: by the latter you mean private vs. public? [11:06] Shinuza: yes [11:06] brainproxy: sure, that's just not going to work in JS [11:07] Shinuza: it could work, I've seen a library that provides a C++ like approach of these [11:07] Shinuza: but you don't want that :D [11:09] pigmej: hm [11:09] fairwinds has joined the channel [11:09] pigmej: is the {} capable to store and retrieve a lot of keys ? [11:09] pigmej: for inmemory key-value storage? [11:10] Shinuza: hum [11:10] Shinuza: yes [11:10] pigmej: or even if array method indexOf is O(n) or less? [11:10] Shinuza: but searching in it by value won't work well [11:10] pigmej: no [11:10] pigmej: only for keys [11:10] Shinuza: it's not meant to store a lot of things [11:11] pigmej: i just need to do a 'is it defined' [11:11] pigmej: so I need an array of 'keys' [11:11] bnoordhuis has joined the channel [11:11] Shinuza: no you could use x in obj [11:11] rauchg has joined the channel [11:11] pigmej: with fast lookup for single key with huge number of elements [11:11] pigmej: let's say lookup for one value in 1mln of others [11:12] pigmej: I really don't want to implement AVL for it:D [11:12] brainproxy: pigmej: shouldn't be too hard to test [11:12] pigmej: agree [11:13] brainproxy: create an object and do a big loop to add a bunch of keys [11:13] pigmej: yup ;-) [11:13] pigmej: brainproxy: how to measure a speed of single function? [11:13] pigmej: only with profilers? [11:13] pomodoro has joined the channel [11:15] k1ttty has joined the channel [11:15] Shinuza: pigmej: just tried with a million key [11:15] Shinuza: selecting a random key in the obj takes about 15ms [11:16] Shinuza: use console.time and console.timeEnd to profile [11:16] k1ttty has joined the channel [11:16] Shinuza: don't know if it's accurate tho [11:16] okuryu has joined the channel [11:16] pigmej: 15 ms? [11:16] pigmej: slow as hell :D [11:16] brainproxy: pigmej: this might help [11:16] brainproxy: https://github.com/bestiejs/benchmark.js [11:16] adambeynon has joined the channel [11:16] Shinuza: brainproxy: http://maxpert.github.com/oorja/ [11:17] brainproxy: I tried adding 100,000,000 keys on an object in the REPL on a linux vm .. bad idea [11:19] pigmej: Shinuza: indexOf or what did you used? [11:19] brainproxy: on an object try hasOwnProperty [11:19] jsulak has joined the channel [11:19] brainproxy: myObj.hasOwnProperty('key-name') [11:20] Shinuza: pigmej: I use key in obj [11:21] stagas has joined the channel [11:23] bnoordhuis has joined the channel [11:23] Shinuza: pigmej: I cleaned my testbench [11:24] Shinuza: ran five rounds each with hasOwnProperty and key in obj [11:24] Shinuza: both found the key in ~0ms [11:25] pigmej: how big keys? [11:25] matyr_ has joined the channel [11:25] pigmej: im fighting with v8-profiler [11:25] brainproxy: I'm getting same as Shinuza [11:25] brainproxy: ~ 0ms [11:25] Shinuza: pigmej: 1 million keys [11:26] brainproxy: me too [11:26] xandrews has joined the channel [11:26] brainproxy: linux vm on XenServer [11:28] mendel_ has joined the channel [11:28] beawesomeinstead has joined the channel [11:29] pigmej: Shinuza: how big single key? [11:29] matyr has joined the channel [11:29] Shinuza: I concatenated "key" and key number [11:29] pdelgallego has joined the channel [11:30] pigmej: ah [11:30] pigmej: mine are at least 24 signs [11:30] Shinuza: so it goes from key0 to key999999 [11:30] Shinuza: I'm not sure it would change anything [11:30] pigmej: depends about implementation [11:31] pigmej: but ok [11:31] pigmej: fast enough then:D [11:31] pigmej: thanks;) [11:32] pigmej: i just wonder how to use profilers in node:D [11:34] leahculver has joined the channel [11:36] brainproxy: pigmej: i just tried adding a million keeys w/ key names following UUID spec [11:36] brainproxy: lookup times are still on the order of 0ms [11:37] Bwen has joined the channel [11:37] brainproxy: note that w/ benchmark.js and the microtime module, you can get profiling that's accurate in microseconds [11:38] sh1mmer has joined the channel [11:38] Shinuza: pigmej: https://gist.github.com/1010105 [11:38] Opaque has joined the channel [11:38] garrensmith has joined the channel [11:39] jamescarr_ has joined the channel [11:40] Nexxy has joined the channel [11:42] michaelhartau has joined the channel [11:42] sonnym has joined the channel [11:44] pigmej: Shinuza: thanks a lot:) [11:46] k1ttty has joined the channel [11:48] uchuff has joined the channel [11:48] xandrews has joined the channel [11:48] dall: someone use mongodb? [11:49] cranelog has joined the channel [11:50] icebox has joined the channel [11:53] Poetro has joined the channel [11:54] rchavik has joined the channel [11:54] neaf: dall, yup [11:54] dall: neaf, what is the difference between mongodb and mysql ? [11:56] neaf: dall, ouch. it's just different kind of store [11:56] pigmej: dall: can you use google? [11:56] neaf: instead of having tables you store hash objects in your collection [11:56] dall: good [11:56] `3rdEden: It's like asking the difference between beer and wine [11:57] pigmej: yup [11:57] pigmej: or cow vs dog;P [11:57] pigmej: completelly different idea [11:57] pigmej: and use cases usually [11:57] dall: ok ok [11:57] dall: understand [11:57] icebox: dall: mysql is relational database, mongodb is a document database [11:57] Shinuza: cows taste better [11:58] brainproxy: depends on the part of the cow [11:58] dall: icebox, ok thanks [11:58] jetienne: one is sql, the other is nosql [11:59] brainproxy: dall: there are a lot of options if you want a nosql store [11:59] leahculver has joined the channel [11:59] leahculver has joined the channel [11:59] brainproxy: couchdb, mongodb, orientdb, redis .... [11:59] brainproxy: riak, etc., etc. [11:59] jetienne: find one which works :) [11:59] pigmej: brainproxy: comparing redis to couchdb [11:59] pigmej: isn't good idea;p [11:59] icebox: dall: http://www.mongodb.org/display/DOCS/MongoDB,+CouchDB,+MySQL+Compare+Grid [11:59] mhauri has joined the channel [11:59] brainproxy: no comparing them [11:59] brainproxy: :) [11:59] brainproxy: *not [11:59] jetienne: icebox: with a unbiased opinion ? :) [11:59] brainproxy: which is kind of the point, they all get the umbrella term nosql [12:00] tshpaper has joined the channel [12:00] pigmej: brainproxy: ok ok ;P [12:00] matyr_ has joined the channel [12:00] icebox: jetienne: my vote is for couchdb :) [12:01] jetienne: my current problem is about the node binding more than the underlying database :) [12:01] jetienne: i tried mongoose... but believe me this is *verbose* [12:01] icebox: jetienne: sure... I agree [12:02] brainproxy: i'd like to learn / experiment with OrientDB [12:02] brainproxy: just haven't had the time yet [12:03] brainproxy: anyone else here using it? [12:03] jetienne: never heard of it [12:03] brainproxy: http://code.google.com/p/orient/ [12:04] framlin: my vote goes for couchdb, too [12:04] MattJ has joined the channel [12:06] davidbanham has joined the channel [12:06] jsulak has joined the channel [12:06] igl: i had a hard time comparing dbs [12:06] adambeynon has joined the channel [12:07] jetienne: ok couchdb got good binding in node ? [12:07] jetienne: is there an orm on top ? [12:07] stepheneb has joined the channel [12:08] xandrews has joined the channel [12:08] dall: what is the difference between couchdb and mysql? [12:08] dall: ahahahah :-P [12:08] dall: joking.... [12:09] sharkbone has joined the channel [12:09] framlin: I use craddle for couchdb. For me it works well [12:09] leahculver has joined the channel [12:09] leahculver has joined the channel [12:10] framlin: cradle [12:10] t0mmy has joined the channel [12:11] messju has joined the channel [12:11] messju has joined the channel [12:12] dall: guys, out of curiosity, someone use eclipse as ide for javascript? [12:12] icebox: dall: mysql is a relational database, couchdb is a document database :) [12:12] jetienne: dall: you are in for all the sillies questions arent you ? :) [12:13] boehm has joined the channel [12:13] dall: no no the last was a joke :D [12:14] brainproxy: dall: i know someone who does, but he was comfortable working in it a long time before he became a js hacker; in my experience many of the node.js type are using vim, MacVim, TextMate, that kind of thing [12:14] bnoordhuis: dall: yes - and it sucks for that [12:14] storrgie has joined the channel [12:14] dall: ok brainproxy [12:15] dall: bnoordhuis, pardon? [12:15] bnoordhuis: dall: eclipse as a javascript editor [12:15] dall: ah ok [12:15] dall: yes yes [12:16] bshumate has joined the channel [12:16] bshumate has joined the channel [12:16] piscisaureus has joined the channel [12:16] dall: ooooook, so the next steps are.....javascript --> node and then mongodb [12:18] matyr has joined the channel [12:18] hybsch has joined the channel [12:20] igl1 has joined the channel [12:20] philippkueng has left the channel [12:20] okuryu has joined the channel [12:21] philippkueng has joined the channel [12:21] _aron has joined the channel [12:22] Bwen has left the channel [12:22] zmbmartin has joined the channel [12:23] MarkMenard has joined the channel [12:23] datchap has joined the channel [12:23] philippkueng_ has joined the channel [12:23] framlin: dall: yes, I use eclipse since five years as my (dayly) JS-IDE. For me it works good enough and for nodejs the V8-debugger works very well [12:24] framlin: my main-raeson for eclipse is mylin, thats independent of the language you code in [12:25] matyr_ has joined the channel [12:25] m00p has joined the channel [12:25] dall: good [12:26] dall: updating..... Eclipse, javascript, node, mongodb :-) [12:26] dall: http://www.mongodb.org/display/DOCS/MongoDB,+CouchDB,+MySQL+Compare+Grid :) [12:27] unomi has joined the channel [12:27] unomi has joined the channel [12:27] dall: good information [12:29] mahna has joined the channel [12:30] GtoXic has joined the channel [12:33] sharkbone has joined the channel [12:34] djcoin has joined the channel [12:35] matyr has joined the channel [12:36] leahculver has joined the channel [12:36] leahculver has joined the channel [12:36] level09 has joined the channel [12:36] level09: where is npm normally installed ? [12:37] m0neyman has joined the channel [12:37] tahu has joined the channel [12:38] agd has joined the channel [12:38] robhawkes has joined the channel [12:39] pen has joined the channel [12:39] lukstr: /usr/local/bin/ [12:39] lukstr: level09: ^ [12:39] level09: thanks [12:39] level09: I can run npm and node as the user, but not as the root :s [12:39] sharkbone1 has joined the channel [12:39] level09: do I need to add the path ? or just create a symlink ? [12:39] lukstr: perhaps your environment is messed up for root? [12:40] level09: i'm on ubuntu [12:40] caike has joined the channel [12:40] lukstr: my root has /usr/local/bin on the path [12:40] level09: hmmm, I cant find npm in usr/local/bin [12:40] lukstr: level09: are you running as root, or with sudo? [12:40] level09: with sudo [12:40] lukstr: is it installed? [12:40] level09: a normal user with sudo [12:40] level09: yes [12:40] level09: it runs as the user [12:40] Shinuza: level09: which npm [12:41] level09: but not as root [12:41] level09: says command not found [12:41] lukstr: yeah as user type 'which npm' [12:41] lukstr: which isn't found? [12:41] level09: ah it is in the user home dir [12:41] lukstr: heh [12:41] level09: so I can create a symlink to usr/local/bin ? [12:41] Shinuza: yes [12:41] level09: then the root can access it without the full path ? [12:41] level09: thanks [12:42] cjm has joined the channel [12:42] level09: hmm I did that still, getting command not found , maybe logout/login again ? [12:43] level09: thanks guys, I think I can take it from here :) [12:43] lukstr: level09: how did you install npm, out of curiosity [12:43] level09: my paranoid sysadmin did it [12:43] lukstr: ... in your homedir? [12:43] level09: yes [12:43] level09: he created a user and installed in that home dir [12:44] lukstr: so... he didn't really do anything you couldn't have done [12:44] level09: he has the root access [12:44] level09: yes [12:46] jonasen has joined the channel [12:47] dall: guys, i'm installing nodejs [12:47] dall: when i do ./configure i get [12:47] dall: Checking for openssl : not found [12:47] dall: hmmm i have openssl installed [12:48] sth: then tell nodejs where to look [12:48] mahna has joined the channel [12:48] mikegerwitz: dall: do you have the headers installed? [12:48] mikegerwitz: dall: Some systems package them separately [12:48] dall: hmm i check [12:49] mikegerwitz: (e.g. openssl vs libssl-dev) [12:49] mikegerwitz: libssl* [12:49] jfdns: yup, install the libraries with yum or aptitude [12:50] dall: sudo apt-get install libssl-dev openssl [12:50] dall: libssl-dev � gi� alla versione pi� recente. [12:50] dall: openssl � gi� alla versione pi� recente. [12:50] dall: i have those packages [12:50] mikegerwitz: I'm going to guess that means it's the most recent version [12:50] dall: already have them [12:50] dall: y [12:51] sharkbone has joined the channel [12:51] gavin_huang has joined the channel [12:52] hdon has joined the channel [12:52] AaronMT has joined the channel [12:52] dall: i already have them but during the ./configure i get this not found....strange [12:53] mikegerwitz: You could try sth's suggestion, though I haven't had problems on a Debian-based system [12:54] dall: what suggestion ? [12:54] dall: i'm using ubuntu [12:54] leahculver has joined the channel [12:54] leahculver has joined the channel [12:55] mikegerwitz: dall: $ ./configure --help | grep -A1 openssl [12:55] mikegerwitz: dall: ./configure accepts options [12:55] adambeynon_ has joined the channel [12:55] F1LT3R has joined the channel [12:55] zmbmartin: are there any good pdf generation plugins for node? One that handles semi-complex pdf layouts? [12:56] dall: mikegerwitz, http://nopaste.info/c486aa860f.html [12:56] dall: i'm looking for the dirs [12:56] mikegerwitz: dall: I know the output ;) I meant use those options [12:56] FireFly has joined the channel [12:57] mikegerwitz: dall: Was just so I didn't spam the room [12:57] dall: ok, yes i copied wrong lines [12:57] dall: one moment [12:57] neaf: zmbmartin, I think generating html to use with http://code.google.com/p/wkhtmltopdf/ would be the best option [12:57] xandrews has joined the channel [13:00] zmbmartin: neaf: I never seem to get the proper output with wkhtmltopdf. images always look really fuzzy. I will take another look. [13:00] dall: mikegerwitz, ./configure --openssl-includes=/usr/include/openssl/ all done!!! [13:00] dall: works [13:00] rpj8 has joined the channel [13:00] Bradleymeck has joined the channel [13:01] mikegerwitz: dall: Odd that you needed to be that explicit. It should have found that. Ah, well. Glad it's resolved :) [13:01] dall: yes...strange....but now ok [13:01] cafesofie has joined the channel [13:01] catshirt has joined the channel [13:01] fumanchu182 has joined the channel [13:02] sharkbone has joined the channel [13:02] rpj8: http://jsfiddle.net/Sfwjv/ So I get a `correct login' in my console log. however, I get a 'bad login' in my `req.flash('warning', 'Bad login');' also gets triggered. Why am i dumb [13:02] voodootikigod: !logs [13:02] dall: mikegerwitz, i'm waiting the "make" ends.... is there a command to update the nodejs version to the future versions.....or i have to clone it..configure, make and then make install again [13:02] dall: ? [13:02] brianseeders has joined the channel [13:03] avalanche123 has joined the channel [13:04] mikegerwitz: dall: $ git checkout VERSION [13:04] mikegerwitz: dall: (you'll have to do git pull first, to update git) [13:04] mikegerwitz: the repo* [13:05] Mrfloyd has joined the channel [13:05] piscisaureus has joined the channel [13:05] dall: with git ? hmm but it will check the version and maybe download it....but then i have to do make and make install ? [13:05] mikegerwitz: dall: Yes [13:06] mikegerwitz: dall: You don't have to use git. You can download the tarball if you'd prefer. [13:06] dall: ok...so git pull first [13:06] arpegius has joined the channel [13:06] dall: i install nodejs following the documentation [13:06] dall: https://github.com/joyent/node/wiki/Installation [13:06] dall: tep 3a - Installing on Unix (including BSD and Mac) [13:07] mike5w3c has joined the channel [13:07] mikegerwitz: dall: hmm that's probably going to give you v0.5.0-dev, since it doesn't specify a version [13:07] dall: node --version [13:07] dall: v0.5.0-pre [13:07] dall: no good? [13:07] mikegerwitz: dall: git fetch && git checkout v0.4.8 && ./configure && make && make install [13:07] mikegerwitz: dall: no good, heh [13:08] dall: the previous version? [13:08] mikegerwitz: dall: Just do that, replacing the version each time and you'll be fine [13:08] mikegerwitz: dall: 0.5.0 is unstable [13:09] dall: ok [13:09] dall: now i'm adding the symbolic link to node app [13:10] dall: then i m able to use node globally <-------- OMG i think it' is very wrong in english [13:10] dall: :D [13:11] Mrfloyd has joined the channel [13:12] swaj: dall: odd version numbers are testing/dev builds. Even version numbers are stable. On a server, you should never use a testing build. And even on your own machine, 0.5.0 isn' [13:12] swaj: isn't* recommended atm [13:13] swaj: the odd/even in the sense of minor build numbers -- I.E: 0.2.x = stable, 0.3.x = dev/test, 0.4.x = stable, etc. etc. [13:13] dall: so why they let download this versions ? [13:13] swaj: so you can help test :) [13:13] swaj: if you want to [13:13] swaj: or help develop [13:13] dall: ok but there is not a link (git) to stable version? [13:13] swaj: the odd minor build numbers (0.5.0) will eventually become even (0.6.0) when they're stable enough for production use. [13:14] swaj: the stable releases are tagged in git. [13:14] swaj: git checkout v0.4.8 [13:14] swaj: that's the latest stable [13:15] swaj: https://github.com/joyent/node/tree/v0.4.8 [13:15] jlecker has joined the channel [13:16] dall: perfect [13:16] dall: ok [13:16] dall: btw is not really a problem because i use it locally [13:16] swaj: yeah [13:16] swaj: I heard some talk last week though that 0.5.0 really wasn't ready for testing yet [13:16] swaj: which is why I said it wasn't recommended atm [13:17] swaj: I tend to stick with the stable builds myself. [13:17] garrensmith has joined the channel [13:17] bnoordhuis: 0.5.x has been known to kill pets and burn down houses [13:17] bnoordhuis: it's not carbon-neutral either [13:17] mbrevoort has joined the channel [13:17] SamuraiJack has joined the channel [13:20] davidsklar has joined the channel [13:21] galaxywatcher has joined the channel [13:22] kriszyp has joined the channel [13:22] c4milo has joined the channel [13:23] malkomalko has joined the channel [13:23] colinclark has joined the channel [13:24] dall: :) [13:24] dall: ook [13:24] brainproxy: dall, nvm is a helpful tool, not sure if you've tried it [13:24] dall: nvm hmm, no...what is? [13:25] brainproxy: https://github.com/creationix/nvm [13:25] brainproxy: it compiles and installs node, and npm, for you [13:25] dall: i have installed node........... now i should install NPM [13:25] dall: really? [13:25] dall: wow [13:25] brainproxy: yep [13:26] jetienne: dall: do you [13:26] jetienne: dall: if you run ubuntu, you can simply do "sudo add-apt-repository ppa:jerome-etienne/neoip && sudo apt-get update && sudo apt-get install nodejs" [13:26] davemo has joined the channel [13:26] Lorentz: gf3: Just implemented pizza timer on my bot [13:26] mikegerwitz: dall: npm isn't necessary to use node, if that's what you're asking. It's just like aptitude for node modules. [13:26] Lorentz: Oh man, hotloading is awesome [13:27] Misao-chan has joined the channel [13:27] mhauri has joined the channel [13:27] dall: hmm one moment guys [13:27] dall: a bit confused....i would like to use node with socket.io [13:27] dall: i tried to search socket.io using apt-get [13:27] dall: but i didn't find it [13:27] `3rdEden: you need to use the node package manager for that [13:27] ryah: dall: npm install socket.io [13:27] dall: so NPM i think is mandatory no? [13:28] quijote has joined the channel [13:28] dall: ryah, yes i done it [13:28] brainproxy: dall: not strictly mandatory [13:28] `3rdEden: it's not a mandatory [13:28] brainproxy: but it makes life easier [13:28] `3rdEden: you can also download the code from github for example [13:28] davidbanham: dall: You could also install socket.io from source if you wanted, it's just a pain. [13:28] dall: hmm ok... [13:28] mbrevoor_ has joined the channel [13:28] dall: but...so now.....amput NVM [13:29] bnoordhuis: hah, don't overload him with information, guys [13:29] dall: if i install it....it will install node and npm [13:29] bbttxu has joined the channel [13:29] brainproxy: yes, nvm is a way to do it in one fell swoop [13:29] brainproxy: the instructions in the github repo for nvm are accurate and easy, if you're using linux [13:29] dall: ook, so if i install NVM it will install node and NPM and the i will use NPM to add new modules...right ? [13:30] dall: or do i have to use nvm to install new modules ? [13:30] brainproxy: nope, just install node v0.4.8 [13:30] brainproxy: w/ nvm [13:30] brainproxy: then install whatever modules with npm [13:30] wink_ has joined the channel [13:31] brainproxy: but read the instructions for nvm ...... [13:31] mhauri has joined the channel [13:31] gtramont1na has joined the channel [13:31] brainproxy: you need to have the compiler in place, the ssl libraries, need to modify your .bashrc or .bash_profile, etc. [13:31] brainproxy: not hard [13:31] dall: ok [13:32] mikegerwitz: brainproxy: he had already installed node [13:32] dall: so now NPM... [13:32] dall: yes already installed [13:32] jslatts has joined the channel [13:32] dall: 0.5.0 (btw not important...it's local) [13:32] brainproxy: mikegerwitz: i know, i was just proposing it as a way to cut down on the number of steps for an installation [13:32] mikegerwitz: dall: http://npmjs.org/ if you just want a quick install [13:32] mikegerwitz: brainproxy: ah alright [13:33] dall: curl http://npmjs.org/install.sh | sh where? on the node directory....or outside? [13:33] mikegerwitz: doesn't matter [13:33] dall: ok [13:33] sirkitree has joined the channel [13:34] dall: donwloading.... [13:34] juanmaia has joined the channel [13:35] gtramont1na_ has joined the channel [13:35] cbibler_ has joined the channel [13:35] dall: good, installed! [13:35] piscisaureus has joined the channel [13:35] uchuff: i'll probably be following the thisismynext liveblog [13:36] trotter has joined the channel [13:36] uchuff: http://live.thisismynext.com/Event/Live_from_WWDC_2011 [13:36] uchuff: er, wrong window [13:36] davidwalsh has joined the channel [13:36] uchuff: sorry! [13:36] dall: ops, guys when i have installed node i only done ./configure (with openssl iinclude directory).... now i have seen it: ./configure --prefix=$HOME/local/node <-----do i have to reconfigure node ? [13:36] ErikCorry has joined the channel [13:36] Croms has joined the channel [13:36] jetienne: :) [13:37] jetienne: dall: use apt ? :) [13:37] mikegerwitz: dall: it installs to /usr/local by default. You're fine, unless you want it in $HOME [13:38] dall: jetienne, no i want to learn how to install also :-D before i was using windows 7.....so i change the OS few days ago [13:39] d0k has joined the channel [13:39] d0k_ has joined the channel [13:39] jetienne: dall: so apt is the normal way to install on ubuntu [13:39] davidbanham: dall: Configuring it with that prefix means it's only available to you on the system. Leaving it off means it's available to all users, but you need to use root access to install it. [13:39] d0k has joined the channel [13:39] brainproxy: I think I should do a "install node in 5 min" screencast [13:39] nafis has joined the channel [13:39] brainproxy: featuring my hero, nvm :) [13:40] jetienne: i should do a install node in 10sec :) [13:40] jetienne: featuring apt :) [13:40] brainproxy: hehe [13:40] davidbanham: Also, don't feel like apt is always the lesser option. It's part of what makes Ubuntu/Debian/*nix easier to use than Windows. [13:40] dall: jetienne, yes i know...i tried with apt-get also but there is not NPM on apt repositories...right ? [13:40] jetienne: dall: true, but i rarely use it. i prefere nmod [13:41] dall: is nmod on apt ? [13:41] jetienne: https://github.com/jeromeetienne/nmod <- but im seriously biased [13:41] jetienne: dall: nope but it is a single js file, using npm database to install in node_modules. so not too hard ot install [13:42] jetienne: i could do a npm .deb... but i dont understand npm options [13:42] dall: k [13:42] dall: one moment... :-D nmod ---> use ---> npm ----> to install ---> node modules ? :D [13:42] strmpnk has joined the channel [13:43] jetienne: yep [13:43] Shinuza: jetienne: I don't see a -g option [13:43] jetienne: nmod is compatible but easier to install [13:43] dall: i think --> npm install module [13:43] [[zz]] has joined the channel [13:43] dall: is simple...why nmod is good? (curiosity) [13:43] jetienne: Shinuza: this is on purpose i wrote nmod to avoid global installation, it tends to create conflict between projects [13:44] jetienne: dall: my goal was easier to install + node_modules only [13:44] Shinuza: well, sometimes global installation is ok [13:44] Shinuza: for tools mainly [13:44] eyesUnclouded has joined the channel [13:44] Shinuza: like uglifyjs and the likes [13:44] dall: k [13:44] jetienne: Shinuza: i havnt yet seen such a case tho [13:44] Shinuza: otherwise I totally agree with installing packages "locally" [13:44] jetienne: Shinuza: but i agree if the tools are stable, global install is ok [13:45] dall: btw i'm tring npm........i just installed it [13:45] Shinuza: although one could install packages in a folder in the path [13:45] dall: and installed socket.io [13:45] dall: /usr/local/lib/node_modules <----- all here [13:45] dall: wow! [13:45] stepheneb has joined the channel [13:46] Shinuza: dall: not recommended [13:46] dall: ? [13:46] Shinuza: you should keep your modules in the same folder as your project [13:46] Shinuza: that way you keep a strong hand on your dependencies [13:47] Shinuza: so you won't end up deploying a project with an incorrect set of dependencies [13:47] sharkbone: I have built a socket reader server for game play clients and will need advises on how to add a game simulator to this . The game server was built with socket.io and node.js any thoughts? [13:47] Shinuza: dall: have you ever use python? [13:47] jetienne: btw anybody with an example of mongoose model methods ? [13:48] dall: Shinuza, yes [13:48] Shinuza: you know virtualenv then [13:48] dall: y [13:48] dall: ok [13:49] Shinuza: it's the reverse of what npm does :) [13:50] dall: ok [13:50] dall: i will remove npm [13:50] dall: :D [13:50] dall: ahahaha [13:50] Shinuza: wait what [13:52] jtsnow has joined the channel [13:52] dall: Shinuza, if it's better to install the module inside the project [13:52] dall: why to use npm ? [13:52] neaf: jetienne: https://gist.github.com/1010300 ? [13:53] sharkbone: I have built a socket reader server for game play clients and will need advises on how to add a game simulator to this . The game server was built with socket.io and node.js any thoughts? [13:53] neaf: dall, it's better to install the modules in your project directory using npm. [13:53] neaf: dall, package.json + npm install I suppose [13:54] ceej has joined the channel [13:54] Shinuza: dall: npm does that for you [13:54] jetienne: neaf: hehe excelent [13:54] Shinuza: there's a -g option to install a package globally [13:54] jetienne: neaf: i was trying the schema.methods stuff for 30 min :) [13:54] Shinuza: but you generally don't want that [13:54] chrischris_away has left the channel [13:54] jetienne: neaf: your alternative is so much easier, thanks [13:54] dall: i installed using npm install socket.io [13:54] pouyt has joined the channel [13:54] neaf: dall, https://gist.github.com/1010302 [13:54] dall: without -g [13:55] Shinuza: oh :o [13:55] petrjanda has joined the channel [13:56] dall: guys i'm going to be crazy........... i do a little recap [13:56] dall: we have NODE............................ok.......installed [13:56] dall: then [13:56] dall: NPM.....................ok.................installed [13:56] dall: then example we have a project /home/dall/job/app [13:56] dall: here i have to put a package.json and put all the dependances [13:56] dall: AND [13:57] dall: i have to install these dep INSIDE the project [13:57] dall: not globally [13:57] dall: right? [13:57] dall: correct? any advices? :-D [13:57] neaf: jetienne, hmm, Didn't know there's some special functionality for methods for mongoose models. It might be the case that my methods won't work with pre/after filters (haven't checked it yet) [13:57] neaf: dall [13:58] neaf: dall, that's right, when you get your package.json you just use 'npm install' [13:58] neaf: without specific module argument [13:58] dall: neaf without spcific argument....it will install in /usr/lcaol/lib/node_modules [13:59] neaf: dall, I strongly believe that when using package.json it will install all dependencies to the project dir. [13:59] korfo has joined the channel [14:00] dall: i put package.json on the project dir [14:00] jetienne: neaf: yep i guess this is why mongoose provide those static/methods feature i guess [14:00] jetienne: i guessed twice... so im not sure :) [14:00] dall: neaf..... only "npm install" ? [14:00] neaf: dall, that's right [14:01] hafthor has joined the channel [14:02] dan_manges has joined the channel [14:03] korfo has joined the channel [14:03] dall: neaf i'am really confused........ i have download nodejs here: /home/dall/job/node then ./confugure make and make install... then installed NPM, npm was installed /usr/local/lib/node_modules [14:04] dall: now, if i have a project here: /home/dall/job/app and /home/dall/job/app/package.json [14:04] dan_manges has joined the channel [14:04] dall: how npm can know the dependances of my application ? [14:04] neaf: dall, it doesn't matter where npm itself is installed. [14:04] neaf: dall, they are in package.json [14:04] tbranyen: thats a file you need to manually craft [14:05] dall: ok in package.json i have a list [14:05] dall: yes sure [14:05] dall: like: https://gist.github.com/1010302 [14:05] bbttxu has joined the channel [14:05] dall: my question is........how npm could know where is my package.json ? i have to run npm on the project directory ? [14:05] _storrgie_ has joined the channel [14:05] coyo|2 has joined the channel [14:06] Shinuza: dall: what version of npm do you have? [14:06] dall: the last...i just installed it [14:06] dall: one moment [14:06] dall: 1.0.9-1 [14:06] Shinuza: meh, that's weird [14:06] Shinuza: shouldn't installed globally as of version 1.0 [14:07] neaf: dall, yes you have to run 'npm install' from the directory where package.json is placed [14:07] dall: neaf, ooook it make more sense, perfect! [14:07] dall: Shinuza, ? [14:08] catshirt has joined the channel [14:08] luke` has joined the channel [14:09] Shinuza: dall: the fact that it installed your packages globally [14:09] jtsnow has joined the channel [14:09] jslatts has joined the channel [14:10] dall: Shinuza, do you mean....that i have to go on the directory of the project and then do npm install to install them locally (locally = on the project directory) ? [14:10] pouyt has left the channel [14:10] garrensmith has joined the channel [14:10] ryanfitz has joined the channel [14:11] luke` has left the channel [14:12] Shinuza: yes [14:12] dall: ook, make sense... [14:12] dall: i must to create this json file [14:14] yhahn has joined the channel [14:15] bpierre has joined the channel [14:15] bpierre has joined the channel [14:17] xandrews has joined the channel [14:17] sivy has joined the channel [14:18] wilmoore has joined the channel [14:18] neaf has joined the channel [14:19] fakewaffle has joined the channel [14:20] jakehow has joined the channel [14:20] thinkt4nk has joined the channel [14:21] sharkbone: hi [14:22] sharkbone: I have built a socket reader server for game play clients and will need advises on how to add a game simulator to this . The game server was built with socket.io and node.js any thoughts? [14:23] seivan has joined the channel [14:23] BillyBreen has joined the channel [14:24] vipaca has joined the channel [14:24] vipaca has joined the channel [14:25] gozala has joined the channel [14:25] mischief has joined the channel [14:30] Aria has joined the channel [14:31] softdrink has joined the channel [14:33] zmbmartin: what are the benefits of using cluster? [14:33] jetienne: encodeUriComponent <- is there a function able to do that in node [14:34] jetienne: zmbmartin: multiple cpu so faster to run [14:34] harth has joined the channel [14:34] CoverSlide: using all cores of the machine instead of a single core which is how js runs [14:36] kawaz_air has joined the channel [14:36] b_erb has joined the channel [14:36] jetienne: http://nodejs.org/docs/v0.4.8/api/querystring.html#querystring.escape there [14:36] asabil_ has joined the channel [14:36] pifantastic has joined the channel [14:37] mhauri has joined the channel [14:37] vipaca has joined the channel [14:37] vipaca has joined the channel [14:39] azeroth___ has joined the channel [14:41] b_erb: mcavage, are you here? [14:42] piscisaureus has joined the channel [14:44] sivy has joined the channel [14:45] dall: gyes thank you very much [14:45] dall: see you soon [14:45] dall: bye [14:45] Nic has joined the channel [14:46] sfoster has joined the channel [14:47] ben_alman_ has joined the channel [14:47] hosh_work has joined the channel [14:47] jtrudeau has joined the channel [14:48] tomtomaso has joined the channel [14:48] gazumps has joined the channel [14:48] Ralle has joined the channel [14:49] Ralle: Hi [14:49] mynyml has joined the channel [14:49] CoverSlide: no need for fomalities [14:49] CoverSlide: formalities* [14:49] srid has joined the channel [14:50] beawesomeinstead has joined the channel [14:50] aheckmann has joined the channel [14:51] ryanmcgrath has joined the channel [14:51] _aron has joined the channel [14:52] sub_pop has joined the channel [14:54] broofa has joined the channel [14:56] Swimming_bird has joined the channel [14:56] ncb000gt has joined the channel [14:56] rfay has joined the channel [14:56] zmbmartin: do I have access to the referring site link in express (http referrer)? [14:58] hanzomon has joined the channel [14:58] rworth has joined the channel [14:58] LowValueTarget has joined the channel [14:58] syskk: req.header('Referrer') ? [14:59] aliem has joined the channel [14:59] Ralle: Noob question. In a web server, when is it beneficial to use a callback instead of linear programming (e.g. function(data, callback()) instead of callback(function(data))) ? [14:59] tolmasky-macbook has joined the channel [15:00] wookiehangover has joined the channel [15:01] sreeix_ has joined the channel [15:01] bnoordhuis: Ralle: broad question but in general when your function could potentially block on I/O [15:02] Venom_X has joined the channel [15:03] Ralle: bnoordhuis: Am i right in my assumption that all such functions that can block on IO are implemented in nodejs directly and require a callback? [15:03] bnoordhuis: Ralle: yes, that is correct [15:03] syskk: yep [15:04] zmbmartin: syskk: I don't see it in the headers [15:04] Ralle: So, basically i shouldn't worry about whether im using callbacks or not in my own code, because nodejs will force me to use them in IO blocking situations? [15:04] baudehlo has joined the channel [15:04] bnoordhuis: Ralle: that too is correct [15:04] syskk: zmbmartin: maybe there's none? http://www.google.ca/search?aq=f&sourceid=chrome&ie=UTF-8&q=express+http+referrer [15:05] herbySk has joined the channel [15:05] path[l] has joined the channel [15:05] korfo has joined the channel [15:06] Ralle: But, if a 'parent' function has been passed a callback (as in the case of http.serverCreate()) i need to pass that callback through all the code i create and call it in the event im done [15:06] path[l]: hi, does anyone know of any node module that does what grep or ack does. search a bunch of files for a pattern [15:06] stalled has joined the channel [15:06] tjholowaychuk has joined the channel [15:06] baudehlo1 has joined the channel [15:07] hanzomon has joined the channel [15:07] willwhite has joined the channel [15:07] lmorchard has joined the channel [15:07] zmbmartin: syskk: just joking. Operator error. I had a typo. It is there thanks [15:08] syskk: cool [15:09] ewdafa has joined the channel [15:10] willwhite has joined the channel [15:10] jlecker has joined the channel [15:10] telemachus has joined the channel [15:10] sonnym has joined the channel [15:10] bnoordhuis: Ralle: i'm not sure what you mean [15:10] zmbmartin: in express can I have the same route for json requests and html? [15:11] tjholowaychuk: zmbmartin yeah sure [15:11] tjholowaychuk: you can use the Accept header field [15:11] tjholowaychuk: to determine the content-type to respond with [15:11] tjholowaychuk: zmbmartin http://expressjs.com/guide.html#req.accepts() [15:11] zomgbie has joined the channel [15:11] Ralle: Erh, actually me neither. Never mind. I think i'm confusing myself needlessly [15:11] Mrfloyd has joined the channel [15:11] Ralle: Thanks for the help :) This one had bugged me for quite some time [15:12] philtor has joined the channel [15:12] RORgasm has joined the channel [15:12] RORgasm has joined the channel [15:13] Ralle: help [15:13] Ralle: oops, sorry, for the / [15:13] zmbmartin: tjholowaychuk: thanks [15:13] mAritz has joined the channel [15:13] zmbmartin: maybe I should read through the docs better ;) [15:14] figital has joined the channel [15:15] tjholowaychuk: zmbmartin you can also map more dynamic or complicated checks into req.is() [15:15] papandreou has joined the channel [15:15] tjholowaychuk: though my example is bad [15:15] Poetro has left the channel [15:15] neaf: tjholowaychuk, any chance for before/after suite callbacks in non-serial expresso? [15:16] tjholowaychuk: neaf that would lead to all kinds of race-conditions [15:16] tjholowaychuk: depending on what you are doing [15:16] neaf: tjholowaychuk, hmm, forgot that non-serial doesn't use done() [15:16] liar has joined the channel [15:17] neaf: if it was it could be done_count == suite.length [15:18] neaf: tjholowaychuk, trivial thing, I want to kill my mongoose connection at the end, I'd put database cleaner at the beginning. [15:18] neaf: Now I use serial and have to add 'disconnect mongo' "test" at the end. [15:18] korfo has joined the channel [15:18] tjholowaychuk: yeah it would be nice to have parallel tests callback for that reason [15:18] tjholowaychuk: im just sick of test frameworks, to be honest [15:18] tjholowaychuk: very boring [15:19] neaf: tjholowaychuk, I tried everything there is for node. expresso is the closest to being perfect. If only it was based on done() in async tests… [15:20] neaf: that gives much control but without limitations on async testing [15:20] tjholowaychuk: neaf i had a rewrite started since it's just a quick messy hack right now [15:20] tjholowaychuk: but yeah [15:20] tjholowaychuk: got bored [15:20] tjholowaychuk: haha [15:20] neaf: tjholowaychuk, damn, seems like I have to write new framework on my own then [15:20] neaf: :) [15:21] neaf: tjholowaychuk, this is actually something that makes me a bit comfortable when I start to use some of your work. You release like 10 new projects a month. [15:21] neaf: uncomfortable* [15:22] tjholowaychuk: nah it's just the test frameworks that bug me [15:22] tjholowaychuk: even template engines are more interesting, and people shit those out like no tomorrow [15:22] Nexxy: neaf, keep in mind that tjholowaychuk is available any time to answer any and all of your questions in regards to his libraries. [15:22] drudge: don't get me started on tjholowaychuk [15:22] Nexxy: I hope that helps you feel confident in your choice! [15:22] neaf: the thing is… I have no idea how can you support all of these releases [15:23] tjholowaychuk: i just try not to open-source something unless it's reasonably solid, so I have less maintinance [15:23] neaf: tjholowaychuk, fair enough [15:24] hij1nx has joined the channel [15:24] zomgbie_ has joined the channel [15:24] baudehlo1: I often find I have less maintainence when I do open source stuff :) [15:24] briznad has joined the channel [15:25] confoocious has joined the channel [15:25] neaf: It's not that I'm afraid of using your code… it's a combination of admiration and doubt. [15:25] tjholowaychuk: you take that gamble with any OS project [15:25] CoverSlide: linus' law [15:25] tjholowaychuk: what if the redis guy gets bored and wants to work on something else [15:25] tjholowaychuk: well then you have to learn the lib better [15:25] tjholowaychuk: and work on it yourself [15:25] b_erb has left the channel [15:25] tbranyen: lol i have no admiration and incredible doubt with most proprietary code projects [15:25] drudge: but being lazy is fun [15:25] CoverSlide: just add a shitload of people to your project and turn off your email for a few months [15:26] tjholowaychuk: I'm just not looking forward to going on holidays for a week or two lol 40+ notifications a day, it's going to be hell [15:27] neaf: tjholowaychuk, here's a good aspect of having no time for OS. [15:27] tjholowaychuk: totally haha [15:28] neaf: but working on projects for clients only sucks bad. [15:28] baudehlo1: so here's a question - how do you deal with totally basic questions about your projects, that show a complete lack of understanding of what they're even about? (like say it was express - it would be a question about how to put lines into paragraphs in your output or something). [15:29] yhahn has joined the channel [15:29] timmywil has joined the channel [15:29] bentruyman has joined the channel [15:29] tjholowaychuk: baudehlo thankfully most of that is covered by everyone on the mailing list [15:29] zomgbie has joined the channel [15:29] tjholowaychuk: but it still happens [15:29] tjholowaychuk: usually just point them to part of the guide [15:30] baudehlo: yeah I should start a mailing list for Haraka. [15:30] shajith_ has joined the channel [15:30] tjholowaychuk: it's really helpful [15:30] baudehlo: last question was: How do you send email. [15:30] tjholowaychuk: i dont think people search them often [15:30] tjholowaychuk: but [15:30] tjholowaychuk: seems to help out the new people a lot better [15:30] jslatts has joined the channel [15:31] baudehlo: what do you use for mailing list? I have ezmlm installed on sergeant.org - but I'm hesitant to use it - I kinda prefer outsourcing these days. [15:31] tjholowaychuk: google :s [15:32] tjholowaychuk: unfortunately [15:32] baudehlo: yeah. [15:32] baudehlo: there's no good free options left for mailing list hosting. [15:32] baudehlo: ACTION was thinking of writing one. [15:32] tjholowaychuk: what about zeds? [15:32] tjholowaychuk: I can't remember what it's called [15:32] bwinton: tjholowaychuk: lamson? [15:32] tjholowaychuk: http://librelist.com/ [15:32] pixel13 has joined the channel [15:34] steffan has joined the channel [15:34] drudge: i wish node used librelist instead of google [15:34] baudehlo: ah right, so there is an option other than google or yahoo :) [15:34] drudge: i hate google groups [15:34] baudehlo: me too. [15:34] brianc has joined the channel [15:34] baudehlo: I couldn't even figure out how to subscribe there without my gmail address. [15:35] baudehlo: I'm sure it's doable - it's just non-obvious [15:36] thalll has joined the channel [15:36] ewdafa has joined the channel [15:36] bnoordhuis: baudehlo: groupname+subscribe@googlegroups.com [15:36] baudehlo: right. [15:37] baudehlo: see I knew there was a way, but they don't make it obvious. [15:37] path[l]: has anyone used node to call shell commands [15:37] baudehlo: path[l]: yes. [15:37] bnoordhuis: i wouldn't have known either if i hadn't looked it up yesterday :) [15:37] jzacsh has joined the channel [15:37] jzacsh has joined the channel [15:38] path[l]: Ive got a a command thats blazingly fast when I run it. but when I use node, I just cant get the callback to run [15:38] path[l]: sec, let me pastie the piece of code [15:39] hanzomon has joined the channel [15:39] ben_alman_ has joined the channel [15:40] ianward has joined the channel [15:40] path[l]: http://pastebin.com/j2WnNrDs <-- that [15:40] baudehlo: I'm going to shoot myself next time someone writes a library for "dealing with async calls in my awersome custom way" [15:41] tjholowaychuk: baudehlo haha yeah totally [15:41] tjholowaychuk: i think they look worse than regular callbacks [15:42] ben_alman has joined the channel [15:42] tjholowaychuk: just adds confusion to something that's not confusing [15:42] ilya has joined the channel [15:42] tolmasky-macbook has joined the channel [15:42] tjholowaychuk: using them in apps sure, but deps definitely not [15:42] beawesomeinstead has joined the channel [15:42] Rodtusker has joined the channel [15:43] ben_alman_ has joined the channel [15:43] dan_manges has joined the channel [15:43] ilya: I'm getting this: [15:43] ilya: TypeError: Cannot read property 'session' of undefined [15:43] ilya: at new (/home/user/nodestuff/node_modules/connect-redis/lib/connect-redis.js:34:22) [15:43] stephank has joined the channel [15:43] ilya: after last connect-redis update and/or express update (can't tell) [15:43] mustalac has joined the channel [15:43] path[l]: baudehlo: there's the piece. It never returns. But on the command line its almost instant [15:43] ilya: even in REPL [15:43] dan_manges has joined the channel [15:43] tjholowaychuk: ilya ah do require('connect-redis').extend(app) [15:43] tjholowaychuk: i had to update it due to how npm 1.x works [15:43] ilya: ooooh. API changed? [15:43] ilya: ah, I see [15:44] warreng has joined the channel [15:44] ilya: hmmm [15:44] tjholowaychuk: ilya: sorry pass express [15:44] tjholowaychuk: (or connect, same thing in this case) [15:44] tjholowaychuk: it accesses arg.session.Store [15:44] caolanm has joined the channel [15:45] ilya: I do and it dumps entire connect-redis.js and says "has no method 'extend'" [15:45] shanez has joined the channel [15:45] tjholowaychuk: otherwise i would have to add connect as a dep [15:45] tjholowaychuk: which wouldn't work well [15:45] baudehlo: path[l]: tbh I've never used exec(), only spawn(). [15:45] tjholowaychuk: because it's a plugin type mod [15:45] path[l]: ah [15:45] baudehlo: have you tried passing the full path to ack? [15:45] joeytwiddle has joined the channel [15:46] path[l]: baudehlo: hmm, nope I could try that. But I get nothing on either stdout or stderr [15:46] mikegerwitz: d [15:46] mikegerwitz: oops. [15:46] benmills has joined the channel [15:46] path[l]: didnt help [15:47] baudehlo: do you check error? [15:47] mawkor2: if you are doing actor/futures/promises module you have do special stuff for callbacks [15:47] ilya: ah, there we go. Thanks, tj! [15:47] mawkor2: or u end up with massive spaghetti [15:47] path[l]: doh [15:47] path[l]: sec [15:48] sharkbone has joined the channel [15:48] tjholowaychuk: ilya np, sorry about the random change haha [15:48] path[l]: nothing [15:48] baudehlo: odd! [15:48] baudehlo: strace it? [15:48] path[l]: hmm ok. gonna have to figure out how that works =p [15:48] mawkor2: hey [15:48] mawkor2: how do I get a c++ lib into duostack [15:49] Swimming_bird has joined the channel [15:49] mawkor2: I'm guessing that's not possible without admin intervention? [15:49] CoverSlide: i've tried [15:49] CoverSlide: never compiles [15:49] CoverSlide: probably rent a vps [15:49] abraham has joined the channel [15:49] CoverSlide: or http://no.de [15:50] mawkor2: oh joyent does it ? [15:50] mawkor2: what about heroku? [15:50] CoverSlide: yeah they give you a tiny vps like 128 mb [15:50] CoverSlide: heroku ... i dunno [15:50] mawkor2: it's just for geoip, there's no native geoip lib for nodejs [15:51] halfhalo: ACTION votes vps + cloudfoundry [15:52] pandeiro has joined the channel [15:52] samyak has joined the channel [15:52] bnoordhuis: mawkor2: https://github.com/dvv/simple-geoip ? [15:54] synkro has joined the channel [15:54] Timothee has joined the channel [15:54] gsmcwhirter has joined the channel [15:55] jamesarosen has joined the channel [15:56] nibblebot has joined the channel [15:57] Corren has joined the channel [15:57] srid has joined the channel [15:57] mundanity has joined the channel [15:57] nibblebot has joined the channel [15:58] beawesomeinstead has joined the channel [15:59] estrathmeyer has joined the channel [15:59] Esteb has joined the channel [15:59] Yuffster_work has joined the channel [16:02] pixel13: oh man…can you hear that white noise?? [16:02] wilmoore has joined the channel [16:03] Venom_X has joined the channel [16:03] neaf: pixel13, there's some terrible piano player floor up. [16:03] pixel13: LoL [16:05] bingomanatee has joined the channel [16:06] neaf: pixel13, that's not funny… for 8h I'm in the office I hear it for 5 hours… as a piano player myself I have hard time not going up there. :D [16:07] tisba has joined the channel [16:08] patrickarlt has joined the channel [16:08] callumacrae has joined the channel [16:09] slickplaid: In express, does anyone have a simple example of redirecting trailing slashes to non-trailing slashes? Something simple as app.get(/regex\//, f(req,res){ res.redirect('regexcatch',301); } or something? [16:09] pixel13: neaf: sorry, you're right…that's not funny, I am sorry you have to go through that each day. What I personally found funny was that my last post was not intended for this room, so your response cracked me up. He really must sound awful up there ;) [16:10] ryanfitz has joined the channel [16:10] tjholowaychuk: slickplaid it ignores them all together [16:10] tjholowaychuk: but [16:10] tjholowaychuk: yeah i guess you could do that [16:10] tjholowaychuk: for seo or w/e [16:10] slickplaid: stupid seo :) [16:10] slickplaid: yeah :) [16:10] lukstr: trailing slashes make me feel good [16:10] neaf: pixel13, the piano isn't the worst thing… some time she 'sings' :D [16:10] hojberg has joined the channel [16:10] tjholowaychuk: slickplaid you could do app.get('/:path(*)' [16:11] lukstr: slickplaid: I would probably use nginx :P [16:11] tjholowaychuk: and just check req.params.path if it has the trailing / [16:11] saschagehlich has joined the channel [16:11] tjholowaychuk: or as regular middleware [16:11] harth has joined the channel [16:11] tjholowaychuk: lukstr nginx?? [16:11] slickplaid: so :path(*) will catch multiple whatever/here/there/goes/ in the params? [16:11] tjholowaychuk: for a redirect? that's a little overkill [16:11] lukstr: tjholowaychuk: Is there a recommended way to setup an express app where the root path isn't / but something like /somewebapp/blah/ ? [16:11] slickplaid: nginx as a proxy is fail :D [16:11] tjholowaychuk: slickplaid yup [16:11] tjholowaychuk: :foo() just names it [16:11] tjholowaychuk: otherwise it's req.params[0] [16:12] gsmcwhirter: is there something like "onuse" for an express app that will run after the app is mounted via a "use" call? [16:12] lukstr: tjholowaychuk: :) [16:12] patcoll has joined the channel [16:13] tjholowaychuk: lukstr you could do connect().use('/whatever', app).listen() [16:13] tjholowaychuk: at that point the app basically becomes a middleware [16:13] tjholowaychuk: at that mount-point [16:13] tjholowaychuk: so GET /whatever/user/1 will look like GET /user/1 to the app itself [16:13] lukstr: ah okay I didn't know you could do that [16:13] madsleejensen has joined the channel [16:13] tjholowaychuk: gsmcwhirter yup one sec [16:13] Dinosaurus has joined the channel [16:14] CoverSlide: holy shit [16:14] tjholowaychuk: gsmcwhirter http://expressjs.com/guide.html#app.mounted() [16:14] CoverSlide: document that sucka [16:14] Dinosaurus has left the channel [16:14] tjholowaychuk: lukstr or alternatively [16:14] tjholowaychuk: app.use('/mount-point/here', app.router) [16:15] tjholowaychuk: all other middleware would see /mount-point/here, but the routes themselves would not [16:15] gsmcwhirter: tjholowaychuk, thanks. i have nested mounts, and redirects on the innermost ones don't currently work right. going to try to set the routes after the "use" has been called [16:15] tjholowaychuk: gsmcwhirter res.redirect() ? [16:16] gsmcwhirter: tjholowaychuk, yeah. [16:16] tjholowaychuk: hmm\ [16:16] lukstr: tjholowaychuk: is that in the connect/express documentation anywhere? [16:16] tjholowaychuk: lukstr not sure to be honest, maybe not [16:16] gsmcwhirter: i think the issue is the order that the .use mounting is happening [16:16] lukstr: tjholowaychuk: it was very unobvious to me, I may be missing something though [16:16] jgv has joined the channel [16:16] slickplaid: I don't see any examples in the expressjs.com docs for the :path(whatgoeshere) ... any explaination? Is it just a wildcard match? Oooh... nevermind it's in there [16:17] tjholowaychuk: lukstr the optional mount pathname is core to connect [16:17] tjholowaychuk: and has been for ages but the documentation blows [16:17] CoverSlide: seriously [16:17] tjholowaychuk: slickplaid just a named capture group [16:17] slickplaid: yeah I see it now :) [16:17] lukstr: tjholowaychuk: I usually just view the source these days anyways :) [16:17] tjholowaychuk: lukstr: yeah that's the better way to go [16:18] lukstr: tjholowaychuk: do you autogen the docs currently? [16:18] bbttxu has joined the channel [16:18] tjholowaychuk: connect's yup, and the express docs are from markdown [16:18] tjholowaychuk: i need to finish the next dox [16:18] pixel13 has left the channel [16:18] iaincarsberg has joined the channel [16:18] CoverSlide: use docco! [16:18] shajith_ has joined the channel [16:18] tjholowaychuk: meh [16:19] tjholowaychuk: i liked docco for a while [16:19] tjholowaychuk: but now it just kinda doesn't look good [16:19] slickplaid: everyauth by bnoguchi is pretty freaking win :D [16:19] mendel_: ++ @ everyauth :p [16:19] slickplaid: gonna have to buy a lot of people beers after this project [16:19] slickplaid: saved me weeks of work [16:19] isaacs has joined the channel [16:20] dmcquay has joined the channel [16:20] tjholowaychuk: looks like i have redirects set up to respect the mount-point on relative redirects [16:21] tjholowaychuk: i'll make sure i have test cov for that [16:21] slickplaid: Project Invoice; Beers: 4,523 - $10,000 :D [16:21] mawkor2: searching for 'express jade' has a high probability of finding chinese take-out [16:21] tbranyen: bad chinese food that leaves you jaded [16:21] tjholowaychuk: mawkor2 haha! [16:21] jtsnow has joined the channel [16:21] philhawksworth has joined the channel [16:21] lukstr: tj's next project is "chow mein" [16:21] mawkor2: hahaha [16:21] philhawksworth has left the channel [16:21] tjholowaychuk: "jade" is #7 on google [16:21] tjholowaychuk: for some reason [16:22] callumacrae has joined the channel [16:22] tjholowaychuk: *it's #7 on google for "jade"*... go gibberish go [16:22] benmills: could be customized results [16:22] RC1140 has joined the channel [16:22] tjholowaychuk: not sure [16:22] tjholowaychuk: i tried on the ipad too the other day to see [16:23] CoverSlide: comes up 9th for me [16:23] slickplaid: if you're logged in it's customized [16:23] slickplaid: most likely [16:23] benmills: doesn't show up at all for me [16:23] tjholowaychuk: weird [16:23] benmills: I always just put "js" at the end of any query [16:23] slickplaid: I wish there was a way to bury an entire domain from results in google [16:23] benmills: 1st for jade js [16:24] benmills: I thought they added that? [16:24] slickplaid: w3schools is fail [16:24] benmills: sometimes I have a link that says "Never show me this site again" [16:24] naneau has joined the channel [16:24] slickplaid: hah [16:24] slickplaid: I just found it too [16:24] slickplaid: never noticed it before [16:24] CoverSlide: or about.com [16:24] slickplaid: We will not show you results from www.w3schools.com again. Manage blocked sites [16:24] melusinechan has joined the channel [16:25] mawkor2: why is w3schools fail? [16:25] iaincarsberg has left the channel [16:25] mawkor2: they still have the best client js API reference I know of.. [16:26] CoverSlide: mozilla [16:26] Bj_o_rn has joined the channel [16:26] tjholowaychuk: yeah mozilla has way better content [16:26] jetienne: search for "mdc array filter" instead of "array filter". it will provide mozilla doc result first [16:26] slickplaid: i always end up putting mdc at the end of seaches [16:26] slickplaid: searches [16:27] jerrysv has joined the channel [16:27] matjas has joined the channel [16:27] tjholowaychuk: i wish node moved constructors into separate files [16:27] tjholowaychuk: easier searching [16:27] gsmcwhirter: tjholowaychuk, https://gist.github.com/1010581 the route /subapp/subapp/redir sends you back to /subapp/test instead of /subapp/subapp/test [16:27] tjholowaychuk: at least for internal organization [16:27] ILoveMadonna: Why cant I have explicit variable types? [16:27] tjholowaychuk: gsmcwhirter one sec [16:28] jetienne: https://chrome.google.com/webstore/detail/nolijncfnkgaikbjbdaogikpmpbdcdef <- to disable some results from google results [16:28] mawkor2: oh simon willison did the docs forit [16:28] mawkor2: the umm, 'real' creator of jQuery [16:28] mawkor2: lol [16:30] mikegerwitz: ILoveMadonna: You can force a type, but there is no strict typing in JS, unfortunately. [16:30] slickplaid: So if everyone goes and blocks w3schools.com...hmm http://www.google.com/reviews/t [16:30] ILoveMadonna: :< [16:31] gsmcwhirter: tjholowaychuk, the .mounted trick i thought might work doesn't seem to either, for the record [16:31] melusinechan: hello [16:31] steffkes has joined the channel [16:31] melusinechan: i got a little problem with npm [16:31] melusinechan: i try to install entropy over node 4.8 [16:31] ILoveMadonna: How can I force a type? [16:31] melusinechan: but it fails [16:32] mikegerwitz: ILoveMadonna: ''+varname (string), !!varname (bool), +varname (number) [16:32] TooTallNate has joined the channel [16:33] ILoveMadonna: ah [16:33] mikegerwitz: ILoveMadonna: There's no C-style casts like (int)varname either. Big jump if you're coming from that type of language [16:33] Shinuza: hehe [16:33] ILoveMadonna: mikegerwitz Yeah I am [16:33] tbranyen: mikegerwitz: yea coercion not casts [16:33] Shinuza: you could use type constructor, but hem [16:33] tbranyen: !!, +, ''+ [16:33] Tidwell_ has joined the channel [16:33] mikegerwitz: ILoveMadonna: And then anyone is free to reassign to anothe rtype [16:33] patcito has joined the channel [16:33] tbranyen: Shinuza: doesn't do the same thing [16:34] nightshift has joined the channel [16:34] nook has joined the channel [16:34] springmeyer has joined the channel [16:34] Shinuza: tbranyen: it depends what you are trying to achieve [16:34] ILoveMadonna: type constructor? [16:34] Shinuza: Boolean(varname) [16:34] melusinechan: anyone of you guys have succeed to install entropy via npm ? [16:34] Shinuza: String(varname) [16:34] Shinuza: ec.. [16:35] tbranyen: v8> new String('lol') === 'lol' [16:35] v8bot: tbranyen: false [16:35] mikegerwitz: Most frown upon that method, though [16:35] ILoveMadonna: cool [16:35] samuelkadolph has joined the channel [16:36] Renegade001 has joined the channel [16:36] mikegerwitz: ILoveMadonna: That also creates an object, vs a scalar. But JS will automatically convert scalar to an object if you try to use it as such [16:36] slickplaid: v8> typeof new String('hehe') [16:36] shanez has joined the channel [16:36] v8bot: slickplaid: "object" [16:36] joeytwiddle has joined the channel [16:36] Shinuza: tbranyen: yes that's one of the caveats [16:36] steph021 has joined the channel [16:36] steph021 has joined the channel [16:36] slickplaid: v8> typeof 'hehe' [16:36] v8bot: slickplaid: "string" [16:36] herbySk has joined the channel [16:37] kriszyp has joined the channel [16:37] asabil has joined the channel [16:38] Marak has joined the channel [16:38] Shinuza: v8> !!Boolean(false) [16:38] v8bot: Shinuza: false [16:38] SamuraiJack_ has joined the channel [16:38] tbranyen: hmm [16:38] melusinechan: ok so no one use npm ^^ [16:38] tbranyen: v8> !!String('') [16:38] v8bot: tbranyen: false [16:38] Shinuza: v8> Boolean(false) && true [16:38] v8bot: Shinuza: false [16:38] tbranyen: thats coo [16:39] slickplaid: v8> ~~Boolean(false) [16:39] v8bot: slickplaid: 0 [16:39] Shinuza: melusinechan: just did [16:39] CoverSlide: v8> usersOfNpm === 0 [16:39] v8bot: CoverSlide: ReferenceError: usersOfNpm is not defined [16:39] tbranyen: oh weird [16:39] CoverSlide: dammit [16:39] tbranyen: v8> !!new String('') [16:39] v8bot: tbranyen: true [16:39] CoverSlide: v8> !!'' [16:39] v8bot: CoverSlide: false [16:39] tbranyen: never knew there was a different because the invocation [16:39] tbranyen: difference* [16:39] tbranyen: between [16:40] tbranyen: holy crap i gotta stop typing while listening to music heh [16:40] melusinechan: Shinuza: i can't install entropy [16:40] melusinechan: it's a very obscur bug message >< [16:40] tbranyen: you probably haven't heard of it [16:40] CoverSlide: never gonna give you up.. never gonna [16:40] CoverSlide: oh me too [16:40] softdrink: hipsterjs? [16:40] Shinuza: melusinechan: that's for sure [16:40] tbranyen: softdrink: :D [16:40] Shinuza: I've installed it on mac osx 10.6 [16:40] elliottcable: me? what? [16:40] elliottcable: Shinuza: what? [16:41] slickplaid: v8> ~~~~~~'test'.indexOf('s') [16:41] v8bot: slickplaid: 2 [16:41] slickplaid: v8> ~~~~~~~'test'.indexOf('s') [16:41] v8bot: slickplaid: -3 [16:41] ILoveMadonna: v8> goto sex; [16:41] v8bot: ILoveMadonna: SyntaxError: Unexpected identifier [16:41] Shinuza: elliottcable: I meant entropy, I've installed it with npm [16:42] Shinuza: tbranyen: there are instances when you would like to check if a var exists then check if it coerces to true [16:42] Shinuza: if(foo && foo == true) [16:42] slickplaid: v8> ~~true+~~false+~~true+~~true [16:42] v8bot: slickplaid: 3 [16:42] Shinuza: var foo = Boolean(false); [16:42] ianward has joined the channel [16:42] amerine has joined the channel [16:42] Shinuza: or String('') [16:42] Shinuza: and bam [16:42] Stephen has joined the channel [16:43] melusinechan: i just install it manually [16:43] slickplaid: http://kkaefer.com/note/randomness-in-node-js/ ? [16:44] ceej has joined the channel [16:44] mikegerwitz: lol yeah people have a lot of fun with the stupid type cohersion crap [16:44] mikegerwitz: v8: (''+([])[1])[4]+(''+(![]))[1]+(''+([])[0])[5]+(''+![])[2] [16:44] v8bot: mikegerwitz: "fail" [16:44] slickplaid: hehe [16:44] xandrews has joined the channel [16:45] CoverSlide: oh great npm broke itself [16:45] norviller has joined the channel [16:45] kohai has joined the channel [16:45] mawkor2: i've seen some places where var don't get hoisted in nodejs [16:45] Shinuza: mikegerwitz: the biggest caveat is that new String('foo') !== 'foo' [16:46] Shinuza: because typeof new String('foo') -> string [16:46] Shinuza: oops [16:46] Shinuza: Object [16:46] bnoordhuis has joined the channel [16:46] mikegerwitz: Shinuza: Yeah, you have to do == [16:46] Shinuza: yep [16:46] mikegerwitz: Shinuza: and == itself is evil in many ways [16:46] Shinuza: for the same reasons :) [16:46] mikegerwitz: Shinuza: or ''+( new String( 'foo' ) ) [16:46] slickplaid: v8: str = new String('foo'); str === 'foo'; [16:46] Shinuza: it's a type helll [16:46] v8bot: slickplaid: false [16:46] mikegerwitz: which is crap! [16:47] mawkor2: == is very sithlike [16:47] slickplaid: v8: str = new String('foo'); +str === 'foo'; [16:47] v8bot: slickplaid: false [16:47] Shinuza: ''+str is fine [16:47] mikegerwitz: v8: ''+( new String( 'foo' ) ) [16:47] v8bot: mikegerwitz: "foo" [16:47] meatmanek has joined the channel [16:47] slickplaid: v8: typeof +new Date() [16:47] v8bot: slickplaid: "number" [16:47] Shinuza: but less readable :( [16:47] slickplaid: v8: typeof +new String() [16:47] v8bot: slickplaid: "number" [16:47] Stephen: v8L typeof NaN [16:47] mikegerwitz: yeah [16:47] Stephen: I love that one [16:47] mikegerwitz: It's fine if it's passed as an arg or something [16:48] mikegerwitz: I do things like num = +num; for each of my args to be sure. Just wish there was strict typing! or at least automatic casts [16:48] slickplaid: wait... +new String() is a number? hm [16:48] kmwallio has joined the channel [16:48] mawkor2: typeof(new String( 'foo' )) [16:48] mikegerwitz: slickplaid: + will convert anything to a number [16:48] Shinuza: slickplaid: that's 0 [16:48] mikegerwitz: v8: +'bla' [16:48] v8bot: mikegerwitz: NaN [16:48] slickplaid: gotcha :D [16:48] Shinuza: v8: +(new String()) == 0 [16:48] v8bot: Shinuza: true [16:48] slickplaid: oh yeah i remember that one [16:49] slickplaid: v8: typeof NaN [16:49] v8bot: slickplaid: "number" [16:49] mikegerwitz: v8bot just blew your mind [16:49] mawkor2: (new String( 'foo' )).prototype [16:49] slickplaid: v8: typeof 1/0 [16:49] v8bot: slickplaid: NaN [16:49] slickplaid: v8: typeof (1/0) [16:49] v8bot: slickplaid: "number" [16:49] Shinuza: rofl [16:50] mawkor2: 1/0 [16:50] mawkor2: v8: 1/0 [16:50] v8bot: mawkor2: Infinity [16:50] mikegerwitz: v8: Infinity > NaN [16:50] v8bot: mikegerwitz: false [16:50] Dinosaurus has joined the channel [16:50] mawkor2: dividing by zero = infinity [16:50] mikegerwitz: Much of the time one spends mastering JS is spent on the quirks. It's unfortunate. [16:51] mawkor2: v8 fails at math [16:51] Shinuza: does anyone knows a good IRC client for android [16:51] derencius has joined the channel [16:51] mikegerwitz: Shinuza SSH + irssi? ;) [16:51] mikegerwitz: or terminal [16:51] Dinosaurus has left the channel [16:51] mikegerwitz: (I've never used Android. Ignore me) [16:52] Shinuza: :p [16:52] kohai: @coders_vzla: Calipso - A Node.js CMS http://awe.sm/5LOfP #node (link: http://calip.so/) [16:52] CoverSlide: i've used andchat its ok [16:52] Shinuza: you are missing out [16:52] slickplaid: http://dreaminginjavascript.wordpress.com/2008/07/04/28/ [16:52] slickplaid: good article :D [16:52] mscdex: andchat is what i've used before i think [16:52] hafthor has joined the channel [16:52] Shinuza: in case you don't know [16:52] Shinuza: v8: 1.1 + 2.2 [16:52] v8bot: Shinuza: 3.3000000000000003 [16:53] mikegerwitz: I use an N900 and ssh into a screen session. So I can go back to my PC and resume the chat without dc'ing. That's why I suggested it for your situation :) [16:53] kris_will has joined the channel [16:53] slickplaid: v8: !~true [16:53] v8bot: slickplaid: false [16:53] Shinuza: mikegerwitz: my terminal on my phone is not that readable [16:53] slickplaid: v8: !~false [16:53] v8bot: slickplaid: false [16:53] mikegerwitz: Shinuza: ahhh [16:53] lukstr: mikegerwitz: I use a terminal on my phone and attach to my irssi screen session [16:53] ianward has joined the channel [16:53] CoverSlide: there's connectbot for ssh, or "connectbot irssi" with irssi specific keybindings [16:54] mikegerwitz: lukstr: yep :) way to go. [16:54] piscisaureus has joined the channel [16:54] lukstr: CoverSlide: there's an irssi connectbot wtf! [16:54] CoverSlide: plus you should be able to customize font size and color [16:54] willwhite has joined the channel [16:54] mikegerwitz: lukstr: that's the way to go* [16:54] CoverSlide: http://www.appbrain.com/app/irssi-connectbot/org.woltage.irssiconnectbot [16:54] Shinuza: CoverSlide: trying andchat [16:54] Xano has joined the channel [16:55] slickplaid: v8: if(~'test'.indexOf('est')){console.log(false)}else{console.log(true)} [16:55] v8bot: slickplaid: false [16:55] boaz_ has joined the channel [16:55] slickplaid: switch that and reverse it [16:56] herbySk has joined the channel [16:56] CoverSlide: is it worth it? [16:56] CoverSlide: let me work it? [16:56] slickplaid: haha [16:56] rpj8 has joined the channel [16:56] rpflo has joined the channel [16:56] rpflo has joined the channel [16:57] mwhooker has joined the channel [16:57] wadey has joined the channel [16:57] hermanjunge has joined the channel [16:57] sirkitree has joined the channel [16:57] hermanjunge: Hi [16:57] rpj8: hey guys I was in here earlier. I posted this question: http://jsfiddle.net/Sfwjv/ <--- correct login shows up in my log, but bad login shows up on my page (and therefore, my flash). Why do I suck at node? [16:57] hermanjunge: I'm looking for a way to downgrade my node [16:58] actonapp has joined the channel [16:58] mscdex: hermanjunge: just do the normal installation process [16:58] hermanjunge: I was in 0.5, but did a $ sudo make uninstall [16:58] hermanjunge: question: Where can I find older versions? [16:58] rpj8: hermanjunge: you mean go to a previous version? [16:58] CoverSlide: or use nvm, n, or nave [16:58] mscdex: hermanjunge: http://nodejs.org [16:58] CoverSlide: http://nodejs.org/dist/ [16:58] zeade has joined the channel [16:58] slickplaid: rpj8: because you have the flash in the !success block? It'll show up when it's unsuccessful. Is that what you're asking? [16:59] replore has joined the channel [17:00] tfe_ has joined the channel [17:00] chbrown has joined the channel [17:00] Destos has joined the channel [17:00] mbrevoort has joined the channel [17:01] Stephen: Node updated to 0.5.0? [17:01] Stephen: Damn, I missed something :-P [17:01] rpj8_ has joined the channel [17:01] blueadept has joined the channel [17:02] mbrevoort has joined the channel [17:02] rpj8: agh, sorry, go tbooted [17:02] bengl has joined the channel [17:02] rpj8: Tried to say that my code in my question is using the express framework [17:02] CoverSlide: nave [17:02] Shinuza: Stephen: unstable [17:02] CoverSlide: oops [17:02] kohai: @3rdEden: I see all these #wwdc live streams and I think, Y U NO USE node.js your live stream SUcks ;o [17:02] gozala has joined the channel [17:03] Shinuza: v8: 1.1 + 2.2 == 3.3 [17:03] v8bot: Shinuza: false [17:03] Shinuza: bam [17:03] rpj8: v8bot: 1.1 + 2.2 === 3.3 [17:03] v8bot: rpj8: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [17:03] rpj8: v8: 1.1 + 2.2 === 3.3 [17:03] v8bot: rpj8: false [17:03] rpj8: welp. [17:03] boaz has joined the channel [17:04] adambeynon has joined the channel [17:04] hermanjunge has joined the channel [17:04] hermanjunge: Thank you. http://nodejs.org/dist/ [17:05] hermanjunge: I'm kind of slooooow, for lack of sleep. Took a break to fix my nodejs :D [17:05] blueadept has joined the channel [17:06] jvduf has joined the channel [17:06] fmeyer has joined the channel [17:07] Tidwell_ has joined the channel [17:08] georgesnelling has joined the channel [17:10] Stephen: v8: typeof(1.1 + 2.2) [17:10] v8bot: Stephen: "number" [17:10] Stephen: v8: 1.1 + 2.2 === "number" [17:10] v8bot: Stephen: false [17:10] Stephen: v8: 1.1 + 2.2 [17:10] v8bot: Stephen: 3.3000000000000003 [17:10] Stephen: Hah [17:10] elliottcable: damnit hij1nx, unban me! D:< [17:10] Stephen: Fail [17:10] samuelkadolph: Yey floating point numbers [17:10] mscdex: Stephen: you forgot typeof [17:10] baudehlo: why are people assuming 1.1 + 2.2 would equal 3.3? [17:10] cpolis has joined the channel [17:11] slickplaid: v8: 1.1 + 2.2 == typeof "number" [17:11] v8bot: slickplaid: false [17:11] slickplaid: oh [17:11] elliottcable: typeof "number"? really? [17:11] samuelkadolph: lol [17:11] Shinuza: promotejs : https://github.com/shinuza/decimaljs [17:11] slickplaid: messed that one up [17:11] Stephen: it's a floating point rounding error [17:11] mscdex: v8: typeof (1.1 + 2.2) === "number" [17:11] v8bot: mscdex: true [17:11] samuelkadolph: Stephen: error? No [17:11] baudehlo: it's not an error at all. [17:11] mscdex: ^ [17:11] baudehlo: Y U No Understand Computers? [17:12] Stephen: U Mad Bro? [17:12] samuelkadolph: Assuming 1.1 (floating point) is 1.1 is incorrect [17:12] elliottcable: problem? [17:12] elliottcable: assuming anything about floating point is incorrect [17:12] sharkbone: is it a good choice using Using session.js as a middle-ware in node.js server when trying to forward information between server - clients peculiar to a 3rd party client [17:12] mscdex: 1.1 + 2.2 = 3.3, but not necessarily with computers :-D [17:12] Stephen: Assuming 1.1 != 1.10000000000000... is a problem :-) [17:12] elliottcable: haven’t you heard of the “mkin” CPU instruction? [17:12] sharkbone: i need some advise [17:12] elliottcable: it’s preformed on all IEEE floating-point numbers [17:12] elliottcable: it stands for “make insane” [17:12] slickplaid: Yo dawg, I heard you like floating points in your numbers so I made 1.1+2.2 == 3.3000000000000003 [17:12] sharkbone: i have been experimenting with several things [17:12] elliottcable: and it completely randomizes their functionality and implementation in very subtle, obscure ways [17:13] Shinuza: related : http://floating-point-gui.de/ [17:13] wink_: http://www-users.math.umd.edu/~jkolesar/mait613/floating_point_math.pdf [17:13] elliottcable: :D [17:13] mscdex: here come the floating point links! [17:13] elliottcable: <3 floating point! [17:13] wink_: :p [17:13] mscdex: inevitable! [17:14] rpj8: *nudge nudge* http://jsfiddle.net/Sfwjv/ [17:14] elliottcable: YOU KEEP USING THAT WORD. I DON’T THINK YOU KNOW WHAT IT MEANS. [17:14] Shinuza: wink_: your link gave me a headache just by looking at the url and waiting for it to load [17:14] baudehlo: floating point numbers are good for all sorts of things in programming except Maths. [17:14] wink_: Shinuza: odd, its just a pdf :p [17:14] samuelkadolph: baudehlo: I think you mean except money :P [17:14] elliottcable: >> 0.1 + 0.2 [17:14] elliottcable: damnit [17:14] elliottcable: v8: 0.1 + 0.2 [17:14] v8bot: elliottcable: 0.30000000000000004 [17:15] jakehow has joined the channel [17:15] wink_: its a pretty famous explanation of FP, there are probably uncountable copies of it [17:15] elliottcable: v8: 0.2 + 0.2 [17:15] v8bot: elliottcable: 0.4 [17:15] mscdex: v8: 0.0 + 0.0 [17:15] v8bot: mscdex: 0 [17:15] colinclark has joined the channel [17:15] elliottcable: v8: 0.1 + 0.2 + 0.1 [17:15] v8bot: elliottcable: 0.4 [17:15] mscdex: ! [17:15] Shinuza: baudehlo: yep, that's why I wrote that piece of junk [17:15] baudehlo: samuelkadolph: no, I stand by that. [17:15] samuelkadolph: v8: 0.5 - 0.4 - 0.1 [17:15] v8bot: samuelkadolph: -2.7755575615628914e-17 [17:15] elliottcable: v8: 0.1 + 0.2 ‐ 0.1 [17:15] v8bot: elliottcable: SyntaxError: Unexpected token ILLEGAL [17:15] elliottcable: v8: 0.1 + 0.2 ‐ 0.1 [17:15] v8bot: elliottcable: SyntaxError: Unexpected token ILLEGAL [17:15] wink_: "what every computer scientist should know about floating point arithmetic" [17:15] elliottcable: damnit [17:15] mscdex: v8: 0.1 + 0.2 - 0.1 [17:15] v8bot: mscdex: 0.20000000000000004 [17:16] wink_: its a great paper, everyone should read it [17:16] Shinuza: wink_: yep [17:16] sharkbone: is it a good choice using Using session.js as a middle-ware in node.js server when trying to forward information between server - clients peculiar to a 3rd party client [17:16] jlecker has left the channel [17:17] slickplaid: v8: var dollars = [1,1] cents = [1,2]; dollars = dollars[0]+dollars[1]; cents = cents[0]+cents[1]; console.log(dollars+cents); [17:17] v8bot: slickplaid: SyntaxError: Unexpected identifier [17:17] Rob- has joined the channel [17:17] rpj8: v8: parseFloat("3.5") [17:17] v8bot: rpj8: 3.5 [17:17] mjr_ has joined the channel [17:17] rpj8: v8: parseFloat("3.5") + parseFloat("5.4") [17:17] v8bot: rpj8: 8.9 [17:17] slickplaid: v8: var dollars = [1,1], cents = [1,2]; dollars = dollars[0]+dollars[1]; cents = cents[0]+cents[1]; console.log(dollars+cents); [17:17] v8bot: slickplaid: 5 [17:17] wink_: Stephen: you should read through that paper, it'll explain the behavior you're seeing [17:17] slickplaid: oh [17:18] slickplaid: v8: var dollars = [1,1], cents = [1,2]; dollars = dollars[0]+dollars[1]; cents = cents[0]+cents[1]; console.log('$'+dollars+'.'+cents); [17:18] v8bot: slickplaid: "$2.3" [17:18] samuelkadolph: $2.3? [17:18] slickplaid: it's my math and I can calculate it however i want :D [17:18] Bradleymeck has joined the channel [17:18] slickplaid: explains my finances, i suppose [17:19] Shinuza: héhé [17:19] samuelkadolph: At least you didn't pull a Comcast and say 0.05¢ when you mean $0.05 [17:19] `3rdEden has joined the channel [17:19] samuelkadolph: Err, Verizion [17:19] kohai: @miksago: So, I've got a node.js process monitoring tweets with the WWDC keyword, and there's like several thousand a second. [17:20] kris_will: v8: var n = 1; while (n > 0) { n -= 0.1; console.log(n); } [17:20] v8bot: kris_will: 0.40000000000000013 [17:20] v8bot: kris_will: 0.40000000000000013 [17:20] v8bot: kris_will: 0.40000000000000013 [17:21] v8bot: kris_will: 0.40000000000000013 [17:21] kris_will: it broked [17:21] v8bot: kris_will: 0.40000000000000013 [17:21] samuelkadolph: Uh oh [17:21] slickplaid: nice [17:21] mscdex: nope [17:21] slickplaid: lol [17:21] v8bot: kris_will: [Output truncated...] [17:21] systemfault: Haha [17:21] rpj8: HEH [17:21] rpj8: owned [17:21] rpj8: nice try haxx0r [17:21] H2S04 has joined the channel [17:21] sharkbone: is it a good choice using Using session.js as a middle-ware in node.js server when trying to forward information between server - clients peculiar to a 3rd party client [17:21] CoverSlide: v8> Number.prototype.roundBy = function(places){var tens = Math.pow(10,places);return Math.round(this * tens, places) / tens};console.log((1.2 + 2.2).roundBy(2)) [17:21] v8bot: CoverSlide: 3.4 [17:22] CoverSlide: v8> Number.prototype.roundBy = function(places){var tens = Math.pow(10,places);return Math.round(this * tens, places) / tens};console.log((1.2 + 2.2).roundBy(0)) [17:22] v8bot: CoverSlide: 3 [17:22] CoverSlide: v8> Number.prototype.roundBy = function(places){var tens = Math.pow(10,places);return Math.round(this * tens, places) / tens};console.log((1.2 + 2.2222).roundBy(2)) [17:22] v8bot: CoverSlide: 3.42 [17:22] dve has joined the channel [17:22] tbranyen: CoverSlide: you can download node and use the repl ya know [17:22] slickplaid: where's the fun in that? [17:22] chrislorenz has joined the channel [17:23] Shinuza: xD [17:24] CoverSlide: not like im spamming the bot with a while statement or anything [17:25] digman543 has joined the channel [17:25] Shinuza: CoverSlide: I think you simplified my code a lot :| [17:25] rpj8: so i'm getting header errors when I use this code attempting to login fromt he line `else if (req.body.login) {' (truncated)(express.js): http://jsfiddle.net/Sfwjv/3/. Where are the headers being previously sent from [17:25] wbw72 has joined the channel [17:26] kohai: @maheshmuralip: Is JavaScript going to replace PHP?Learning Server-Side JavaScript with Node.js http://bit.ly/l0rqoP (link: http://net.tutsplus.com/tutorials/javascript-ajax/learning-serverside-javascript-with-node-js/) [17:27] rpj8: ^ [17:27] rpj8: I keep telling people [17:27] tjholowaychuk: isaacs what's up with the registry? [17:27] CoverSlide: it's been screwy for me too [17:27] tjholowaychuk: crazy packet loss lately, takes a good hour to publish things [17:27] tjholowaychuk: or like 5 minutes to install one module [17:28] context: i just ran update and took all of 5 seconds [17:28] tjholowaychuk: hm [17:29] zmbmartin has joined the channel [17:29] context: if you are getting PL maybe its something between and you the reg [17:29] tjholowaychuk: tracerotue is doing it's thing [17:29] tjholowaychuk: slowly [17:29] tjholowaychuk: very slowly [17:29] context: http://www.internetpulse.net/ cogent <-> savvis has PL [17:29] slickplaid: blame canada [17:29] slickplaid: or amazon [17:29] context: slickplaid: damn canad's [17:30] cafesofi_ has joined the channel [17:30] slickplaid: new Canada() == Amazon :D [17:30] tjholowaychuk: ahahaha [17:30] Shinuza: CoverSlide: you code doesn't fail my tests :( [17:31] eyesUnclouded has joined the channel [17:31] zomgbie has joined the channel [17:31] CoverSlide: Shinuza: I apologize. i will remember to write worse code in the future [17:31] Shinuza: hehe [17:32] lukegalea has joined the channel [17:32] Shinuza: the thing is you'd have to configure the precision globally in your system [17:32] kohai: @harsharv: A very good beginner guide for Node.js http://nodeguide.com/beginner.html #nodejs [17:32] Shinuza: like Decimal.PLACES = 10 [17:32] Tidwell_ has joined the channel [17:32] Shinuza: and then roundBy would use that [17:33] kris_will: v8: var n = 1; var o = ""; while (n > 0) { n -= 0.1; o += n + ","; }; console.log(o.slice(0,-1)); [17:33] v8bot: kris_will: "0.9,0.8,0.7000000000000001,0.6000000000000001,0.5000000000000001,0.40000000000000013,0.30000000000000016,0.20000000000000015,0.10000000000000014,1.3877787807814457e-16,-0.09999999999999987" [17:33] ceej has joined the channel [17:34] niftylettuce has joined the channel [17:35] cwo has joined the channel [17:37] Guest29683 has joined the channel [17:37] cwo has joined the channel [17:37] dnuke has joined the channel [17:39] PhilK has joined the channel [17:39] jslatts has joined the channel [17:40] chbrown has left the channel [17:41] rpj8: tjholowaychuk: if someone were attempting to 'log out' of an express application, how would you do it? I'm trying to do this: http://jsfiddle.net/UZ8PX/ but it's giving me TypeError: Cannot read property 'logout' of undefined [17:41] dget has joined the channel [17:41] jmoyers has joined the channel [17:41] kris_will: v8: var n = 1; var o = ""; do { n -= 0.1; o += n.toFixed(1) + ","; } while (n > 0.2); console.log(o.slice(0,-1)); [17:41] v8bot: kris_will: "0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1" [17:41] tjholowaychuk: rpj8 I would have app.get('/logout', ...) with a call to req.session.destroy(), and then redirect somewhere [17:41] tjholowaychuk: in the callback [17:42] mikeal has joined the channel [17:42] gazumps has joined the channel [17:43] colinclark has joined the channel [17:43] NetRoY has joined the channel [17:44] Yoric has joined the channel [17:44] sreeix has joined the channel [17:44] rpj8: tjholowaychuk: check. gotcha. thank you [17:44] kohai: @gsiegman: Engadget has a pathetic excuse for a liveblog right now. Their devs obviously haven't heard of node.js or socket.io. [17:45] path[l] has joined the channel [17:47] sharkbone: s it a good choice using Using session.js as a middle-ware in node.js server when trying to forward information between server - clients peculiar to a 3rd party game client [17:47] cwo has joined the channel [17:48] Shinuza has joined the channel [17:49] kohai: @diaswrd: I've just received my @dot_cloud beta invitation! Thanks guys! #nodejs #mongodb [17:51] LowValueTarget has joined the channel [17:51] kohai: @habrahabr_ru: #HabraHabr_ru Node.JS / [Из песочницы] Native JavaScript Templates (nJSt). Шаблонизатор, построенный на нати... http://bit.ly/kEtPqP #IT (link: http://fewnews.co.cc/habraitem.php?id=4179&utm_source=twitterfeed&utm_medium=twitter) [17:51] mawkor2: wow I remember when I thought csszengarden was impressive [17:51] ryanj has joined the channel [17:51] mawkor2: now it's just a bunch of weak @ss designs [17:52] MarkMenard has joined the channel [17:52] djcoin has joined the channel [17:53] george3 has joined the channel [17:53] estrathmeyer has left the channel [17:53] rpj8: tjholowaychuk: what if I wanted to add a flash message? I can't do this from the callback function on res.session.destroy() [17:54] H2S04 has joined the channel [17:54] tjholowaychuk: rpj8 sure you can [17:54] tjholowaychuk: res.session.destroy(function(){ req.flash('info', 'logout successful'); res.redirect('/'); }); [17:54] ceej has joined the channel [17:54] rpj8: tjholowaychuk: I tried that, but got Error: req.flash() requires sessions [17:54] george3 has left the channel [17:54] steph021 has left the channel [17:55] Adman65 has joined the channel [17:55] tjholowaychuk: rpj8 hmm if you have sessions enabled it should be fine [17:55] ceej has joined the channel [17:55] mjr_: tjholowaychuk: did you figure out your redis buffer issue? [17:55] bbttxu has joined the channel [17:56] tjholowaychuk: mjr_: juuust checked out that respose, that should work I think [17:56] kohai: @marktmcbride: Just discovered node inspector. Debugging server-side js from chrome, crazy! #nodejs [17:56] tjholowaychuk: if it could be done per call [17:56] tjholowaychuk: that would work the best for my case at least [17:56] mjr_: tjholowaychuk: oh, I see. Yeah, it is per-connection ATM. [17:56] rpj8: http://jsfiddle.net/GnhgC/ [17:56] tjholowaychuk: ah [17:56] tjholowaychuk: shit [17:56] tjholowaychuk: hmm [17:56] rpj8: This is what I have [17:56] mjr_: Actually, you can change it at runtime. [17:57] Shinuza has joined the channel [17:57] mjr_: It's a little dirty, but I think it'd work. [17:57] petrjanda has joined the channel [17:57] tjholowaychuk: i'll give that a try [17:57] mjr_: If you are in the middle of a large response when you change it, the response would be mixed though. [17:57] mjr_: Maybe only change it in a drain handler. [17:58] tjholowaychuk: I have a Blob using APPEND but since it's a string command it keeps giving me strings [17:58] mjr_: oh yeah, that'd be annoying [17:58] tjholowaychuk: so you can do stuff like fs.createReadStream('/something').pipe(Blob('some key')) [17:58] mjr_: I haven't used append yet. [17:58] mcluskydodallas has joined the channel [17:58] tjholowaychuk: or Blob('some key').pipe(res) [17:59] tjholowaychuk: rpj8 weird man :s [17:59] tjholowaychuk: if req.session is defined [17:59] tjholowaychuk: OH [17:59] tjholowaychuk: wait [17:59] rpj8: :/ [17:59] tjholowaychuk: do req.session.regenerate [17:59] tjholowaychuk: there [17:59] tjholowaychuk: because destroy() wont re-create it [17:59] rpj8: I tried that too ;) [17:59] rpj8: one sec [17:59] tjholowaychuk: so req.flash() thinks you dont have sessions [18:00] rpflo has left the channel [18:01] rpj8: http://jsfiddle.net/GnhgC/1/ gives me: TypeError: Cannot call method 'regenerate' of undefined [18:01] rpj8: perhaps it's just a typo i'm missing? [18:01] kriskowal has joined the channel [18:02] tjholowaychuk: rpj8 not both [18:02] tjholowaychuk: just regenerate [18:02] rpj8: hur [18:02] rpj8: oh [18:02] tjholowaychuk: internally it destroy()s and does self.generate(req) [18:03] rpj8: I see I see [18:03] dgathright has joined the channel [18:03] perlmonkey2 has joined the channel [18:03] rpj8: tjholowaychuk: excellleeeeent. [18:03] rpj8: thank you [18:03] supster has joined the channel [18:04] hosh_work has joined the channel [18:05] NetRoY has joined the channel [18:05] postwait has joined the channel [18:07] CoverSlide: omgwtfbbq npm ERR! Error: ENOENT, No such file or directory 'cluster/package.json' [18:08] AvianFlu has joined the channel [18:08] edgarallanpoe has joined the channel [18:08] catshirt has joined the channel [18:09] joshthecoder has joined the channel [18:10] sonnym has joined the channel [18:10] bentruyman has joined the channel [18:12] STUPIDWIFI has joined the channel [18:14] eee_c has joined the channel [18:14] niftylettuce has joined the channel [18:15] pomodoro has joined the channel [18:15] pigmej has joined the channel [18:16] mike5w3c has joined the channel [18:17] kohai: @nellodee: Now I can concentrate on other things, like getting excited about the node.js module for Drupal. Whoo [18:18] jerrysv: ouch. that one hurt my head. [18:18] sub_pop has joined the channel [18:19] gozala has joined the channel [18:19] raZer has joined the channel [18:19] Tidwell: anyone have an idea of the maximum number of concurrent connections a single node process with socket.io can support? is it os/hardware-bound? have an app thats going to be going to production in the next couple weeks and am considering options should the traffic clobber my single process [18:21] djcoin has joined the channel [18:21] baudehlo: consider more how much traffic you're pushing to each and how often, not the number of connections. [18:21] baudehlo: epoll can easily handle about 300k+ idle concurrent connections. [18:22] raZer: How many are you expecting? I wanted around 500 which worked well with node with database activity and some processing [18:22] zmbmartin: tjholowaychuk: a req.session.regenerate with nothing in it will destroy the session for logout? [18:22] josephboyle has joined the channel [18:22] tjholowaychuk: zmbmartin yeah, it regenerates the session [18:22] tjholowaychuk: destroys it and assigns a new one [18:22] zmbmartin: so if you do that you don't need to req.session.destroy [18:23] kohai: @lucozhao: Chef, puppet and node.js are good stuff [18:23] kohai: @habranews: Node.JS / Native JavaScript Templates (nJSt). Шаблонизатор, построенный на нативном JavaScript: Приветствую тебя... http://bit.ly/izA2hQ (link: http://habrahabr.ru/blogs/nodejs/120486/) [18:24] tjholowaychuk: nope it calls that first [18:24] tjholowaychuk: for you [18:24] Sree has joined the channel [18:24] aiwagan has joined the channel [18:24] Tidwell: raZer: asking me? anywhere between 0-50k+ concurrent for launch-spike then probably something easily manageable like a few thousand [18:25] jamesarosen has joined the channel [18:25] eyesUnclouded has joined the channel [18:26] mjr_: Tidwell: a single node process CAN hold open pretty large numbers of connections. However, if you want to service those connections with low latency, you'll probably want some more processes. [18:26] mjr_: If you don't care as much about latency, then perhaps it is fine. [18:27] kohai: @mrryanjohnston: The most important thing I've realized about node.js is that I have to completely forget about understanding why procedural code won't work [18:27] Tidwell: mjr_: its interacting with twitter's streaming, a sql db, serving http stuff for oauth, etc... latency isn't really an issue - its not important data - just not crashing :P [18:27] sh1mmer has joined the channel [18:27] sh1mmer: hey [18:27] sh1mmer: I'm helping a bunch of people on cygwin [18:28] sh1mmer: and I'm getting a weird error where npm won't resolve DNS [18:28] sh1mmer: but curl will [18:28] tbranyen: sh1mmer: even after editting /etc/resolv? [18:28] isaacs: sh1mmer: /etc/resolv.conf [18:28] sh1mmer: yes [18:28] tbranyen: yeah that issue was reported recently [18:28] isaacs: sh1mmer: curl doens't use resolv.conf [18:28] isaacs: sh1mmer: c-ares does [18:28] mjr_: Tidwell: my advice is to plan for crashing. It's hard to get all of the bugs out of your code and of node, and uncaught exceptions are basically fatal. [18:29] Anusko has joined the channel [18:29] sh1mmer: hm [18:29] pkrumins: isaacs: do you know if you solved any concurrency issues in latest npms? [18:29] isaacs: pkrumins: yes [18:29] mikeal has joined the channel [18:29] isaacs: pkrumins: there was a race condition with cache adds that would cause some odd breakages. [18:29] pkrumins: isaacs: i have 1.0.6 and i have this problem with node_modules dir when some modules don't have their dependencies installed [18:29] altamic has joined the channel [18:29] pkrumins: ok, i am upgrading to 1.0.10 [18:29] chrischris has joined the channel [18:30] isaacs: pkrumins: yeah, should work better in 1.0.10 [18:30] pkrumins: talking about upgrading, should i just run `curl http://npmjs.org/install.sh | sh` [18:30] lukegalea has joined the channel [18:30] isaacs: pkrumins: yes. [18:30] pkrumins: thanks! [18:30] isaacs: pkrumins: that's also fixed in .10 [18:30] synkroBBQ has joined the channel [18:30] isaacs: pkrumins: so `npm update npm -g` should work now [18:30] isaacs: (after the update) [18:30] slickplaid: Tidwell: Have you looked at https://github.com/LearnBoost/cluster ? [18:30] Tidwell: mjr_: yea, i'm using forever to restart it, and if there is minimal data loss due to crash, its not too important - have to wait and see i guess - but the fact that it *can* support a metric-shit-ton-load of connections takes a bit of worry off me... [18:30] pkrumins: isaacs: gotcha [18:30] hij1nx: isaacs: re npm: am i doing something wrong with my npm auth? it says im not authed, but i can publish, and i see my changes pub'd [18:30] sh1mmer: tbranyen: so that's an actual issue then? [18:30] zmbmartin: tjholowaychuk: in this example https://gist.github.com/1010780 can have the requireLogin middleware only when it is not req.accepts('json')? [18:31] isaacs: hij1nx: update to 1.0.10 [18:31] Tidwell: slickplaid: ooo no, have to check that out! [18:31] isaacs: hij1nx: that's fixed. [18:31] isaacs: hij1nx: you may need to `npm adduser` again [18:31] isaacs: (just use the same un/pw/email) [18:31] pkrumins: It worked [18:31] isaacs: sweet [18:31] mjr_: Tidwell: it can. At some point, you'll need to consider how you'll add more processes, but one node process gets you a long way in most cases. [18:31] tjholowaychuk: zmbmartin: what? [18:31] tbranyen: sh1mmer: i recall seeing it recently yeah [18:31] hij1nx: isaacs: ah excellent!! [18:32] tjholowaychuk: you could add that to the middleware [18:32] sh1mmer: tbranyen: thanks [18:32] pkrumins: isaacs: what is this about "npm WARN prefer global npm@1.0.10 should be installed with -g" [18:32] pkrumins: getting this now after upgrade [18:32] isaacs: pkrumins: how are you installing npm? [18:32] Tidwell: mjr_: yea, it'll be my first deployment of a non-trivial node app with decent traffic, so I'm just trying to cover my bases before I get a middle-of-the-night call from some random exec [18:32] pkrumins: isaacs: i just ran the `curl http://npmjs.org/install.sh | sh` [18:32] tjholowaychuk: or you could have a middleware that checks for Accept: with json, if present allow the route, otherwise next('route') [18:32] tjholowaychuk: for the html one [18:33] hij1nx: isaacs: works now!! you're killin it man ;) [18:33] zmbmartin: tjholowaychuk: ok [18:33] isaacs: pkrumins: um... that's odd, then? [18:33] isaacs: pkrumins: that would imply that it's trying to install it into ./node_modules instead of globally [18:34] isaacs: pkrumins: but the make script explicitly sets --force [18:34] isaacs: pkrumins: er, --global [18:34] pkrumins: that's actualy what i need [18:34] pkrumins: i actually have node_modules dir per sub-project [18:34] pkrumins: so i `cd sub-project; npm install .` [18:34] jblanche has joined the channel [18:34] isaacs: pkrumins: oh, ok [18:34] mendel_ has joined the channel [18:34] isaacs: pkrumins: but don't you still need npm itself to be global? [18:34] kohai: @mrryanjohnston: @NodeKohai sweet. A node.js twitter bot! I, for one, welcome our robotic JavaScript overlords [18:35] pkrumins: i am not sure about that, hmm [18:35] pkrumins: oh [18:35] pkrumins: yes, i have npm global, i think i have. [18:35] Tidwell_ has joined the channel [18:35] pkrumins: since it's installed in node's bin/ [18:35] isaacs: the curl | sh should always make it global [18:35] george3 has joined the channel [18:35] pkrumins: yeah [18:35] george3 has left the channel [18:35] jtrudeau has joined the channel [18:35] pkrumins: maybe i can ignore this WARN [18:35] isaacs: if you do `npm install npm`, then yeah, it'll install itself locally [18:35] gh0stz has joined the channel [18:35] isaacs: try this: $(which npm) -v [18:35] pkrumins: browserling@stackvm:~/projects/browserling$ $(which npm) -v [18:35] pkrumins: 1.0.10 [18:36] isaacs: ok, great :) [18:36] isaacs: what's `which npm`? [18:36] isaacs: like /usr/local/bin/npm or something? [18:36] pkrumins: browserling@stackvm:~/projects/browserling$ which npm [18:36] pkrumins: /home/browserling/installs/node-v0.4.7/bin//npm [18:36] pkrumins: like this [18:36] isaacs: pk, great. [18:36] coyo|2 has joined the channel [18:36] georgesnelling_ has joined the channel [18:37] kohai: @forrst: Just added Ruby, PHP, iOS, C#, Python, jQuery, AS3, and node.js API wrappers from our users. Check 'em out: http://t.co/ntmJxeG (link: http://forrst.com/api) [18:38] garrensmith has joined the channel [18:39] c4milo: hey [18:39] c4milo: does mongoose has an irc channel? [18:39] c4milo: have [18:39] Sree has joined the channel [18:40] NetRoY has joined the channel [18:40] insin has joined the channel [18:41] aiwagan has left the channel [18:41] kohai: @ifandelse: @A_Robson @cammerman so (IMO) the belief that js in the CLR can compete with something like #nodejs (w/a diff ceiling) perf-wise is mislead [18:42] kohai: @elamadej: javascript + TDD in node.js with Jessie workshops by @kaaes and @marcinbunsch http://twitpic.com/57xcke [18:42] eyesUnclouded has joined the channel [18:43] lukegalea has joined the channel [18:44] stagas: new lib! https://github.com/stagas/node-beatport [18:44] mendel__ has joined the channel [18:45] ExsysTech has joined the channel [18:45] TomY has joined the channel [18:45] pkrumins: isaacs: oh nastiness, still getting the same problem with deps I had with 1.0.6, and i have no idea how to make a test case for it. here is a small paste that will show what is going on. http://pastebin.com/SS4VGRnb [18:45] djcoin has joined the channel [18:45] pkrumins: isaacs: so notice when i do `npm install dnode` it never shows that the dependency `dnode-protocol` was installed [18:46] isaacs: pkrumins: npm cache clean and then try again? [18:46] markwubben has joined the channel [18:46] pkrumins: oh wait! [18:46] sh1mmer has joined the channel [18:46] pkrumins: browserling@stackvm:~/projects/browserling$ find . -name 'dnode-protocol' [18:46] pkrumins: ./encoder/node_modules/dnode/node_modules/dnode-protocol [18:47] pkrumins: it was under dnode's node_modules [18:47] isaacs: right [18:47] isaacs: because it's dnode's dep [18:47] pkrumins: forgot this bit [18:47] pkrumins: yep [18:47] pkrumins: hmm maybe it works then now [18:47] pkrumins: trying ;) [18:47] isaacs: pkrumins: https://gist.github.com/1010813 [18:47] rpj8 has joined the channel [18:47] isaacs: (after `npm install dnode`, of course) [18:47] pkrumins: sweet! [18:48] pkrumins: testing [18:48] Country has joined the channel [18:49] rpj8: in express.js, if I wanted to do some sticky forms (if the user tries to register with a name already taken, redirect to index and pre-populate the input text box fields), what would be a good way to do this? [18:49] level09_ has joined the channel [18:49] hunterloftis has joined the channel [18:49] dgathright_ has joined the channel [18:49] level09_: Hallo [18:49] tjholowaychuk: rpj8 sessions [18:49] hunterloftis: Anybody tried installing zombieJS recently to a node-waf npm error? [18:49] ceej has joined the channel [18:50] level09_: Firefox 3.6 doesn't seem to support sockets [18:50] level09_: web sockets :S [18:50] xeodox has joined the channel [18:50] hunterloftis: level09: It doesn't [18:50] level09_: this sucks [18:50] `3rdEden: fire fox 6 supports websockets [18:50] hunterloftis: level09: You can fallback [18:50] perezd has joined the channel [18:50] level09_: I cant [18:50] rpj8: tjholowaychuk: that's what I kind of thought, was just curious if I could do something like post the data back in the req.redirect() [18:50] level09_: or I dont know how to [18:50] level09_: :) [18:50] `3rdEden: level09_ use socket.io [18:50] level09_: I'm using socket.io [18:50] level09_: here is the scenario [18:50] hunterloftis: level09: If you use an abstraciton library (like socket.io) it will automatically fallback [18:50] isaacs: rpj8: or just load the same template, and read the defaults off the post body [18:50] tjholowaychuk: rpj8 nah sessions are a really trivial way to share that sort of state [18:51] level09_: I'm trying , but still missing something [18:51] tjholowaychuk: yeah you dont necessarily need to redirect [18:51] level09_: here is my scenario [18:51] level09_: craete the connection [18:51] rpj8: hm [18:51] rpj8: alright. [18:51] tjholowaychuk: many options :D [18:51] rpj8: haha yes. [18:51] level09_: and i want to push a message on connection [18:51] rpj8: so hard to chose which is best >> [18:52] level09_: problem is, if websocket fails, the on('connection') fails [18:52] bradleymeck_ has joined the channel [18:53] `3rdEden: level09_ do you have all transports enabled? [18:53] level09_: I dont know, how do I check ? [18:53] `3rdEden: as it should fallback to flashsocket, than xhr-polling [18:53] level09_: I think it falls back to xhr-multipart [18:53] rpj8: what i'm doing currently is havea /login template, which posts to a /register, which uses middleware to see if the name is already taken. if it is, it redirects back to the /login page [18:53] _aron has joined the channel [18:53] Marak has joined the channel [18:53] level09_: yes I think it is falling back to xhr [18:54] rpj8: but potentially I don't need the /register page at all [18:54] level09_: I am watching a file changes [18:54] rpj8: and I can just post back to the /login template [18:54] jacobolus has joined the channel [18:54] level09_: and pushing it to the client [18:54] level09_: but the problem is [18:54] level09_: I want to push the file content when initially connected [18:54] level09_: that part fails [18:55] Marak: kohai: did you get that thing i sent you? [18:55] FireFly|n900 has joined the channel [18:56] mikl has joined the channel [18:56] mikl has joined the channel [18:56] edgarallanpoe has joined the channel [18:56] mahna has joined the channel [18:57] brettgoulder has joined the channel [18:57] mikl: how do I set my author name on NPM? I get a "Maintainer should have name and email" error? [18:57] isaacs: mikl: update to 1.0.10, maybe run `npm adduser` again. [18:58] isaacs: mikl: but in 1.0.9 [18:58] isaacs: *bug in 1.0.9 [18:58] mikl: isaacs: ah, thanks :) [19:00] zmbmartin: if someone fills out a form in express but there are errors how do I keep the information that was filled out intact? [19:00] zmbmartin: I have error redirect('back') and the form fields are cleared [19:00] hunterloftis: ZombieJS author doesn't hang out in here does he? [19:01] tjholowaychuk: zmbmartin express doesn't touch and html you write to the socket [19:01] tjholowaychuk: so you have to manage things in the template etc [19:01] tjholowaychuk: zmbmartin was it you that asked about req.accept() earlier? [19:01] tjholowaychuk: req.accepts()* [19:01] zmbmartin: yes [19:01] tjholowaychuk: ah [19:01] tjholowaychuk: https://github.com/visionmedia/express/commit/5d16e6b302541617eb1c8ca07617b457c437e9bd [19:01] coreb has joined the channel [19:02] tjholowaychuk: example of how I would probably approach it [19:02] tjholowaychuk: middleware ftw! [19:04] zmbmartin: that is how you would approach keeping the form fields intact? [19:04] pyrony has joined the channel [19:05] rpj8: zmbmartin: you can use sessions [19:05] rpj8: learned that today ;) [19:05] tjholowaychuk: zmbmartin no no [19:05] tjholowaychuk: for responding with html / json etc [19:05] tjholowaychuk: in a clean fashion [19:06] dipser has joined the channel [19:07] mike5w3c_ has joined the channel [19:08] kohai: @koenpeters: So... WHY and WHEN use node.js instead of PHP, Python, Java, ASP or Perl? http://tinyurl.com/2aklbp7 #parallelismbaby [19:08] kohai: @koenpeters: So... WHY and WHEN use node.js instead of PHP, Python, Java, ASP or Perl? http://tinyurl.com/2aklbp7 #parallelismbaby [19:08] norviller has joined the channel [19:08] nightshift_ has joined the channel [19:10] lukegalea has joined the channel [19:10] madsleejensen has joined the channel [19:11] adamc has joined the channel [19:12] adamc: Hey guys, check this out, a Etherpad based on node.js http://pitapoison.de:9001/ [19:12] niftylettuce has joined the channel [19:14] rpj8: adamc: not loading for me [19:15] maushu has joined the channel [19:15] adamc: rpcj8: maybe thats cause youre in front of a firewall [19:18] context has joined the channel [19:18] darshanshankar has joined the channel [19:18] xandrews has joined the channel [19:20] gazumps has joined the channel [19:21] coreb: what's the best way to "join" to parallel backend calls before returning a combined response to the client? [19:21] coreb: two* [19:22] ion-: callbacks [19:22] hunterloftis: coreb: Just 2, could be callbacks, if you're doing a lot of parallel stuff, try looking at 'async' [19:22] kohai: @mykola: @krhoyt Check out using Node.JS + node-serial + socket.io to build an entire Arduino -> Web stack in a few lines of JavaScript! :) [19:22] kohai: @mykola: @krhoyt Check out using Node.JS + node-serial + socket.io to build an entire Arduino -> Web stack in a few lines of JavaScript! :) [19:23] hunterloftis: https://github.com/caolan/async [19:23] rpj8: tjholowaychuk: no `- else' in jade? [19:23] tjholowaychuk: rpj8 yeah [19:24] tjholowaychuk: - if (foo)\n bar\n- else\n baz [19:24] rpj8: 500 SyntaxError: Unexpected token else [19:25] rpj8: http://jsfiddle.net/4uLtJ/ [19:25] tjholowaychuk: we have over 140 elses [19:25] tjholowaychuk: in our templates [19:25] tjholowaychuk: so [19:25] tjholowaychuk: it works [19:25] tjholowaychuk: lol [19:25] rpj8: bah. [19:25] rpj8: humbug. [19:25] tjholowaychuk: you're not indenting... [19:26] rpj8: FFFFFUUUUUUUUUUUU [19:26] rpj8: tjholowaychuk: thank you, as usual it is a dumb move on my part [19:27] coreb: else works for me [19:27] coreb: ;) [19:28] rpj8: coreb: yes... i was missing indents >> [19:29] F1LT3R_ has joined the channel [19:30] coreb: that 'async' lib seems good [19:31] eyesUnclouded_ has joined the channel [19:32] ceej has joined the channel [19:33] ceej_ has joined the channel [19:33] meat_popsicle has joined the channel [19:34] alessio_alex has joined the channel [19:34] alessio_alex: Hello [19:34] zmbmartin: tjholowaychuk: thanks for the accepts gist that cleaned up what I did quite a bit. [19:34] alessio_alex: What's the global namespace for Node.js ? [19:34] alessio_alex: Like window is in the browser...? [19:35] meat_popsicle: global [19:35] mbrevoort has joined the channel [19:35] davemo has joined the channel [19:35] meat_popsicle: alessio_alex: http://nodejs.org/docs/v0.4.8/api/globals.html [19:36] Wa has joined the channel [19:36] alessio_alex: I read it was global too, but when I say global.test() for example it gives me an error [19:36] alessio_alex: where test is defined in the same file :) [19:36] meat_popsicle: so [19:37] zmbmartin: rpj8: are you using sessions to keep for fields intact? [19:37] meat_popsicle: alex: try this.test() [19:37] rpj8: zmbmartin: I'm attempting to :P I'm still fumbling around with it currently. [19:37] mikegerwitz: alessio_alex: Because stuff defined in the file is in the module scope, not global [19:37] rpj8: zmbmartin: trying to figure out how to dislpay it out ina conditional in jade currently [19:37] alessio_alex: oh [19:37] mikegerwitz: alessio_alex: unless you do `foo = function()`, without the var prefix [19:38] alessio_alex: can't I call foo with an object before? [19:38] CoverSlide: coreb: https://github.com/creationix/step [19:38] meat_popsicle: an easier way to get it on to the global is use a closure [19:38] gonsfx has joined the channel [19:38] alessio_alex: the thing is I am using the jQuery aop plugin adapted for node [19:38] alessio_alex: and I must pass an object [19:38] meat_popsicle: (function() { /** do you defines in here as this.foo = xxxxxx */ })(); [19:38] alessio_alex: in the browser you could do window.function [19:39] alessio_alex: that's why I'm searching for something similar to do here [19:39] mikegerwitz: meat_popsicle: Beware, that will break in strict mode. Whenever v8 gets around to it. [19:39] meat_popsicle: true [19:39] meat_popsicle: though strict mode is only ES5 [19:40] mikegerwitz: meat_popsicle: well, so will globals, actually. [19:40] CoverSlide: omgwtfbbq! [19:40] meat_popsicle: technically and all [19:40] zmbmartin: rpj8: got a gist of your server side code. I haven't messed with sessions to much yet? [19:40] mikegerwitz: meat_popsicle: unless you do an explicit global.foo [19:40] meat_popsicle: true [19:40] CoverSlide: no (function(){})() in strict mode? [19:40] mikegerwitz: CoverSlide: Closures work fine. But the function won't reference the global scope when using 'this' [19:40] mikeal has joined the channel [19:40] jmoyers: hmm [19:40] aphelion has joined the channel [19:41] mikegerwitz: https://developer.mozilla.org/en/JavaScript/Strict_mode [19:41] alessio_alex: so if I have the function test() in a file, can I do something.test() ? [19:41] jmoyers: browser i assume it'd be bind(function(){}, window); [19:41] rpj8: zmbmartin: basically what i'm doing is this: req.session.sticky = req.body [19:41] eyesUnclouded has joined the channel [19:41] piscisaureus has joined the channel [19:41] mikegerwitz: The problem was with constructors. If someone would forget the 'new' keyword, then 'this' would reference the global scope and introduce all sorts of problems. [19:41] rpj8: Then what i'd like to do is redirect to the login page, then fill in the input boxes by passing locals to the view [19:42] rpj8: zmbmartin: then in the view, conditionally put the `value=' attribute it [19:43] lukegalea has joined the channel [19:43] mikegerwitz: alessio_alex: If you can, I'm not certain what it is. [19:43] xeodox has joined the channel [19:43] alessio_alex: ok [19:44] alessio_alex: Anyway throwing a function in a global namespace is a bad practice, so it's not that important [19:44] mikegerwitz: :) yep [19:44] meat_popsicle: it's useful though [19:44] meat_popsicle: for classes etc [19:44] meat_popsicle: or defining your own namespace [19:44] jmoyers: v8: !function(){console.log('nom nom nom')} [19:44] v8bot: jmoyers: false [19:44] alessio_alex: I have another question [19:44] alessio_alex: about web workers [19:45] jmoyers: yeah, but then you end up with a rad YUI like thing [19:45] jmoyers: YUI.silly [19:45] mikegerwitz: I don't see namespacing as an antipattern. Any other global, yes [19:45] meat_popsicle: YUI.awesome.more.less.what.confused(); [19:45] alessio_alex: If I use for example Cluster or something like that, will I get a "copy" of a server 4 times for example [19:45] alessio_alex: ? [19:45] jmoyers: ACTION doesn't like namespacing patterns [19:45] alessio_alex: I mean, I have 4 web workers for a server [19:45] tjholowaychuk: alessio_alex essentially yes [19:45] alessio_alex: hello Tj [19:46] alessio_alex: So the web workers are something like threads no? [19:46] alessio_alex: So that a process won't consume the 512 limit of MB? [19:46] alessio_alex: That's their usefulness? [19:46] tjholowaychuk: processes [19:46] rpj8: tjholowaychuk: how could you check for the existance of a local variable in jade? - if (name) comes back and says name is underfined [19:47] NetRoY has joined the channel [19:47] rpj8: or would you not want to do this with jade [19:47] ip5432 has joined the channel [19:47] tjholowaychuk: rpj8 it's just js so [19:47] CoverSlide: processes are heavier than threads [19:47] tjholowaychuk: if (typeof foo == 'undefined') [19:47] tjholowaychuk: rpj8 or if (locals.foo) [19:47] rpj8: tjholowaychuk: ah, you must have locals. [19:47] rpj8: i missed the `locals.' bit [19:47] alessio_alex: So having multiple web workers will help my app scale, using multiple processes and multiple processors no? [19:47] rpj8: was doing if (name) [19:48] CoverSlide: it just a matter that you limit the number of processes so you only use what you need on your server [19:48] tjholowaychuk: alessio_alex yup [19:48] tomtomaso has joined the channel [19:48] chrislorenz has joined the channel [19:48] tjholowaychuk: i would use cluster even with one worker [19:48] context: web workers are in the client browser, not the server [19:48] alessio_alex: why is that? [19:48] xandrews has joined the channel [19:49] context: alessio_alex: ease of management [19:49] tjholowaychuk: zero-downtime restarts etc [19:49] tjholowaychuk: lots of features [19:49] alessio_alex: oh [19:50] context: tjholowaychuk: cluster intelligently restarts one worker at a time? nice [19:51] tjholowaychuk: context it spawns a second master, the previous one sticks around until it's workers finish up with remaining connections [19:51] tjholowaychuk: which is then killed, meanwhile the new master has been accepting with your new code [19:51] tjholowaychuk: so at times, you will have double the workers [19:51] alessio_alex: In the cluster example, there is cluster(app), where app is the normal http server from node. Can I use cluster with Express.js too? [19:51] tjholowaychuk: alessio_alex yes [19:51] alessio_alex: great [19:51] tjholowaychuk: you can use cluster with any node http or tcp server [19:52] tjholowaychuk: or stand-alone for job queues etc [19:52] tjholowaychuk: we use it for an express app [19:52] alessio_alex: awesome [19:52] trotter_ has joined the channel [19:52] alessio_alex: just planning to build my blog with express.js [19:52] alessio_alex: even made a tiny mvc bolierplate :P [19:52] jbpros_ has joined the channel [19:52] CoverSlide: is it possible to create a http.request to a unix socket? [19:53] syskk: yep [19:53] CoverSlide: how? [19:53] syskk: dont remember [19:54] alessio_alex: tjholowaychuk do you only use node for deploying your web app? or do you use it with something like nginx? [19:54] gtramont1na has joined the channel [19:54] syskk: pass the file path instead of hostname i believe [19:54] alessio_alex: What's the "best practice"? [19:54] samuelkadolph: context: It's in the docs. http://nodejs.org/docs/v0.4.8/api/http.html#server.listen [19:54] samuelkadolph: CoverSlide: ^^ [19:54] CoverSlide: samuelkadolph: no i mean a client request [19:55] zmbmartin: tjholowaychuk: is using sessions the best way to keep the form fields intact? Is that how something like rails does it? [19:55] zmbmartin: seems like more then what I need [19:55] samuelkadolph: zmbmartin: rails sets the value of each input when it renders the form again [19:55] pen has joined the channel [19:55] tjholowaychuk: zmbmartin i dont know rails well [19:55] tilgovi has joined the channel [19:55] tilgovi has joined the channel [19:56] dve: anyone using redis-node here? [19:56] tjholowaychuk: you can just re-render the template on POST [19:56] tjholowaychuk: but you would be duplicating some logic [19:56] tjholowaychuk: depending on what you are doing [19:56] kriskowal has joined the channel [19:57] tahu has joined the channel [19:57] zmbmartin: tjholowaychuk: I just want fields that a user enters to not clear upon a validation error. [19:57] tjholowaychuk: yes [19:57] tjholowaychuk: i know [19:57] tjholowaychuk: lol [19:57] AvianFlu has joined the channel [19:57] CoverSlide: zmbmartin: validate client-side [19:57] zmbmartin: oh you said depending on what I am doing sorry [19:58] alessio_alex: I think it's better just to keep them in post [19:58] alessio_alex: and call them if they exist [19:58] pkrumins: isaacs, what's going on here: [19:58] pkrumins: browserling@stackvm:~/projects/browserling$ npm get root [19:58] pkrumins: undefined [19:58] dve: or whats the best way of waiting for a loop of async operations to complete? [19:58] ajpiaNOU has joined the channel [19:58] isaacs: pkrumins: root isn't a config any more. [19:58] isaacs: pkrumins: it's "prefix" [19:58] SubStack: aha [19:58] pkrumins: aha! [19:58] isaacs: pkrumins: `npm root` will tell you where modules are. [19:58] isaacs: `npm bin` will tell you where bins are [19:58] isaacs: `npm prefix` tells you teh prefix [19:58] alessio_alex: dve you can use Step for example [19:58] pkrumins: gotcha [19:58] isaacs: throw -g on there to get more info [19:59] isaacs: er, global info [19:59] dve: Step is native? [19:59] isaacs: as opposed to local [19:59] SubStack: isaacs++ [19:59] v8bot: SubStack has given a beer to isaacs. isaacs now has 23 beers. [19:59] alessio_alex: dve search for "Step creationix" [20:00] jmoyers: dve no, thats a class of library called 'flow control.' another example is https://github.com/caolan/async [20:00] alessio_alex: it's a library written by creationix [20:00] hydoskee has joined the channel [20:00] shanez has joined the channel [20:00] hydoskee: is there documentation on how one would make an https request of a server using a uname/password? [20:00] alessio_alex: dve https://github.com/creationix/step [20:01] dve: jmoyers i tried async, but with luttle success [20:01] dve: little* [20:01] dve: will investigate step [20:01] bnoordhuis: hydoskee: do you mean http basic auth? [20:01] jmoyers: oh? whats the use case [20:01] Stephen: hydoskee: user:pass@www.example.com [20:01] tjholowaychuk: i've had plenty success with callbacks :p [20:01] arpegius has joined the channel [20:01] tjholowaychuk: and no lib :p [20:01] alessio_alex: dve try Step, it's really easy to use [20:01] jmoyers: they're both easy to use [20:01] jmoyers: and so are callbacks tjholowaychuk, but some of us like a little sugar :P [20:02] tjholowaychuk: IMO Step etc look much worse [20:02] alessio_alex: What's the best way to call something in a module? Assign it to the "global" object and then call global.myParam? or is there something more cleaner to do this? [20:02] baudehlo: dve: just keep a counter of things yet to complete. [20:02] Stephen: there's also jquery Deferreds, which I recently switched to using [20:02] baudehlo: it's not rocket science :) [20:02] dve: baudehlo: eek.. erally? [20:02] baudehlo: eek? [20:02] tjholowaychuk: var pending = foo.length; --pending || done() [20:02] jmoyers: tjholowaychuk async has a clean interface [20:02] hydoskee: Stephen: that works with a https post request? in the 'host' field? [20:03] Stephen: Getting 1.6.1 into the npm package was a little tricky [20:03] dve: what and while loop until done/ [20:03] dve: ? [20:03] Stephen: hydoskee: It's part of the URL [20:03] jmoyers: async.filter(['file1', 'file2', 'file2'], path.exists, function(results){ // files which exist }); [20:03] also has left the channel [20:03] baudehlo: in your callbacks do: --pending || done(); [20:03] Stephen: hydoskee: In the request [20:03] alessio_alex: dve no, if (!pending) callback() [20:03] baudehlo: or if (--pending === 0) done() [20:03] Stephen: hydoskee: Honestly, it depends on how they have authentication setup. HTTPS has nothing to do with authentication [20:04] hydoskee: Stephen: I'm not understanding [20:04] alessio_alex: Guys, should I be storing my params in the "global" object for use in modules? [20:04] alessio_alex: Is that ok? [20:04] Brian` has joined the channel [20:05] Stephen: alessio_alex: You can do it that way, or pass the parameters in the require [20:05] Stephen: var lib = require('lib')(param); [20:05] alessio_alex has left the channel [20:05] alessio_alex has joined the channel [20:05] alessio_alex: ok [20:05] Stephen: var lib = require('lib')(param); [20:05] Stephen: :-) [20:05] alessio_alex: Just wondering what approach would be "cleaner" [20:06] jmoyers: require('lib')(param) [20:06] mikegerwitz: alessio_alex: globals are never clean :) [20:06] samuelkadolph: hydoskee: HTTPS doesn't change the actual HTTP request. An HTTP supports basic auth in the url username:password@host [20:06] Stephen: the typical approach is to pass the parameter, but it does tend to get messy if you're not careful [20:06] hydoskee: Stephen: the https I need is to send a POST with a data body and http://nodejs.org/docs/v0.3.7/api/https.html#hTTPS https.request is lacking a spot to put in a user/pass combination as an auth [20:06] alessio_alex: yup, I'm feeling messy [20:06] hydoskee: I need something similar to the curl -u interface [20:06] isaacs: samuelkadolph: well, that's not quite right. http *clientS* support that in the url. [20:06] remysharp has joined the channel [20:07] isaacs: samuelkadolph: http itself requires that you base-64 encode that bit, and put it in the "Authorization" header [20:07] Stephen: hydoskee: You need an http request, go look in the examples, there are plenty there [20:07] samuelkadolph: True, the client does it [20:07] eldar has joined the channel [20:07] hydoskee: Stephen - haven't seen an example that emulates curl's '-u' parameter - any ideas on that? [20:07] hydoskee: or what to search for [20:07] hydoskee: I would settle for "what to search for" [20:07] bnoordhuis: isaacs: that's only basic auth [20:08] isaacs: To make such a request in node, parse the url with url.parse(), and then if there's an "auth" member, do headers: { authorization: "Basic " + (new Buffer(auth)).toString("base64") } [20:08] springify has joined the channel [20:08] isaacs: bnoordhuis: yeah, but thats' what clients do with http://user:pass@host.com/ [20:08] bnoordhuis: isaacs: no, it depends on the www-authenticate the server returns [20:09] isaacs: yeah, but isn't that just if the server responds with a 401? [20:09] samuelkadolph: Yes [20:09] isaacs: i thought just setting the un/pw in the url sends Basic for the first GET [20:10] bnoordhuis: that's correct - but it won't work if the server uses e.g. digest [20:10] isaacs: right [20:10] cognominal has joined the channel [20:10] isaacs: so it'll ignore the Authorization: Basic, and kick back a 401, and then you get to dance [20:10] bnoordhuis: yep - but sending basic auth headers unrequested is a bad idea [20:10] samuelkadolph: curl -u send basic authentication [20:11] Stephen: bnoordhuis: Good point [20:11] isaacs: meh. if you've got an account on the server, presumably you know how to log into it [20:11] isaacs: go over https if you can :) [20:11] samuelkadolph: That's a fairly bad assumption [20:11] tomtomaso has joined the channel [20:11] isaacs: haha [20:11] samuelkadolph: To never send auth without be challeneged [20:12] coyo|2 has joined the channel [20:12] Oooska has left the channel [20:12] isaacs: npm sends basic auth without a challenge. [20:12] samuelkadolph: Especially over https and especially if you it requires it [20:12] hydoskee: isaacs: is there an example running around of using https auth in a request in nodejs? that's exactly what I'm trying to do [20:12] isaacs: hydoskee: are you the server or the client? [20:12] hydoskee: I am the client [20:13] samuelkadolph: combine https.request with the snippet he gave you for base64 encoding [20:13] context: http basic auth ? [20:13] EyePulp has joined the channel [20:13] isaacs: hydoskee: ok, so on the request config object, you can specify headers. do that. [20:13] context: or cert auth [20:13] jetienne: q. with expressjs, is there a way to launch a method *after* each app.get/post/etc... ? [20:13] hydoskee: isaacs: so I set the authorization in the options? [20:13] isaacs: hydoskee: https.request({ host, path, etc, headers: { } } [20:14] Stephen: coo(walrus, coo.apply(cachoo)); [20:14] isaacs: hydoskee: depends on the type of authentication [20:14] context: jetienne: doesn't express/connect of an event for the end of each conenction [20:14] isaacs: hydoskee: for basic auth, the header looks like: authorization: Basic [20:14] hydoskee: isaacs: curl wise it's curl -X POST -u ":" [20:14] zmbmartin: tjholowaychuk: is their a app.env that I can check so when in production I can have different settings from some of my plugins? [20:14] isaacs: hydoskee: where is the base64-encoded "username:password" [20:14] isaacs: hydoskee: yeah, that's basic auth [20:14] hydoskee: ok, wonderful [20:14] jetienne: context: i dunno, does it ? [20:14] hydoskee: thank you [20:14] tjholowaychuk: zmbmartin yeah read the docs for app.configure [20:14] bnoordhuis: pedantic correction: curl checks the www-authenticate header [20:15] tjholowaychuk: jetienne node has events [20:15] tjholowaychuk: for that sort of thing [20:15] isaacs: hydoskee: to base64 encode something, you can do: new Buffer(myString).toString("base64") [20:15] samuelkadolph: bnoordhuis: Only if the server spits back a 401 [20:15] isaacs: hydoskee: note!! that's sent in the clear!! [20:15] sh1mmer has joined the channel [20:15] tjholowaychuk: jetienne so you could add a middleware before app.router [20:15] isaacs: hydoskee: if it's over https, that's fine. [20:15] level09_ has joined the channel [20:15] tjholowaychuk: hooking into those events [20:15] isaacs: hydoskee: or if it's not super secret. [20:15] hydoskee: not super secret [20:16] zmbmartin: tjholowaychuk: I tried setting them in app.configure('development' and app.configure('production but development setting were still being used [20:16] jetienne: tjholowaychuk: before ? i want the function to be called after app.router [20:16] jetienne: tjholowaychuk: this is to save a dirty object in the database after the request [20:17] dve: hmm.. im still not quite getting this waiting for aync callbacks thing... my code looks like this https://gist.github.com/1009145 [20:17] dve: any tips? [20:17] bnoordhuis: isaacs: on a related topic: https://github.com/joyent/node/pull/1083 [20:18] tjholowaychuk: zmbmartin NODE_ENV=production [20:19] tjholowaychuk: jetienne but if you listen on events, you want the middleware before [20:19] tjholowaychuk: so it can register them [20:19] tjholowaychuk: much like logger() [20:19] walkingeyerobot: dve: I'd like to help, but I don't quite know what coffeescript looks like after it compiles. [20:19] tjholowaychuk: is typically the first middleware [20:19] tjholowaychuk: so it can wrap the entire thing [20:19] tjholowaychuk: for :response-time [20:19] CoverSlide: process.env as well [20:19] zmbmartin: tjholowaychuk: sorry I am an idiot. It was something else. [20:19] zmbmartin: thanks [20:19] zmbmartin: again [20:20] zomgbie has joined the channel [20:20] jetienne: tjholowaychuk: ok i will look at logger [20:20] tjholowaychuk: jetienne logger actually wraps res.end(), but it could have been done with the "finish" event (I think that's the one) [20:20] tjholowaychuk: i dont think it's documented [20:20] tjholowaychuk: or maybe it's not publish [20:20] tjholowaychuk: public* [20:20] podman has joined the channel [20:21] eyesUnclouded has joined the channel [20:21] isaacs: bnoordhuis: yeah, looks like www-authenticate needs to be added to the list of stackable headers? [20:21] dve: walkingeyerobot ... converting [20:21] isaacs: bnoordhuis: is it acceptable to get "WWW-Authenticate: Basic, Digest"? [20:21] isaacs: bnoordhuis: (ie, is comma-joining ok) [20:21] rodasc has joined the channel [20:22] bnoordhuis: isaacs: yes, that would work [20:23] bnoordhuis: a raw list of header name/value tuples would be even better perhaps [20:23] isaacs: ok, then that's a pretty straightforward bug. wanna patch? i'm not sure off-hand whether it should be in v0.4 or if this counts as "new api" [20:23] zmbmartin: How do I set NODE_ENV=production with forever? [20:23] isaacs: yeah, let's not open that door [20:23] stagas: jetienne: function after(fn) { return function(req, res, next) { var end = res.end; res.end = function() { end.apply(this, arguments); fn() } } } [20:23] bnoordhuis: isaacs: you did notice that it's a pull request, right? :) [20:23] isaacs: bnoordhuis: http headers are a weird and ugly data format. [20:23] isaacs: oh, hah [20:23] samuelkadolph: isaacs: HTTP rfc says comma split list of methods unless there is more than 1 www-authenticate header then it is comma split list of arugments [20:23] isaacs: just thought it was an issue :) [20:23] isaacs: aw, jeez. [20:23] isaacs: that's fugly [20:23] stagas: jetienne: use like this: app.get('/foo', after(function() { ... }), function(req, res) { ... }) [20:24] isaacs: so, if there's more than one www-auth header, then commas change meaning. great. [20:24] samuelkadolph: Indeed [20:24] samuelkadolph: http://tools.ietf.org/html/rfc2616#section-14.47 [20:24] jetienne: https://github.com/senchalabs/connect/blob/master/lib/middleware/logger.js [20:24] dve: walkingeyerobot ... this is roughly what im trying to do - in JS https://gist.github.com/1011015 [20:24] jetienne: stagas: seems interesting [20:24] skm has joined the channel [20:25] jetienne: stagas: .end() is garanteed to be called ? [20:25] isaacs: ACTION kinda loathes http.. [20:25] stagas: jetienne: missed a next() there [20:25] stagas: jetienne: yeah [20:25] jetienne: stagas: oh this is exactly what logger is doing :)https://github.com/senchalabs/connect/blob/master/lib/middleware/logger.js#L88 [20:26] H2S04 has joined the channel [20:26] tjholowaychuk: jetienne quite a few of the middleware [20:26] tjholowaychuk: do that [20:26] tjholowaychuk: session as well [20:26] tjholowaychuk: but when i was digging around in node i found the "finish" event [20:26] jetienne: tjholowaychuk, stagas: ok thanks will do that [20:26] sheenobu has joined the channel [20:26] stagas: jetienne: I also think res.end accepts a callback so you could push the fn in the arguments [20:26] dve: walkingeyerobot ... this is roughly what im trying to do - in JS https://gist.github.com/1011015 [20:27] harth has joined the channel [20:28] hunterloftis: isaacs: zombieJS - does it work on node 0.4.x now? (I saw you commented on an old Base64 dependency) [20:28] stephank has joined the channel [20:28] bentruyman has joined the channel [20:28] isaacs: hunterloftis: no idea. i don't use it myself. [20:28] kohai: @_lennart: @stkaes i for one currently write a graylog2 stream forwarder to http://logio.org/ endpoints - hardest part: installing node.js ... grrrmml [20:28] kohai: @_lennart: @stkaes i for one currently write a graylog2 stream forwarder to http://logio.org/ endpoints - hardest part: installing node.js ... grrrmml [20:29] mikeal has joined the channel [20:29] hunterloftis: isaacs: k. Is there something else you prefer? The testing framework not being able to install with npm doesn't inspire confidence ;) [20:30] walkingeyerobot: dve: I commented on your gist. [20:30] tjholowaychuk: <3 npm edit [20:30] walkingeyerobot: dve: also, you may want to break out your anonymous functions in order to avoid pyramid code [20:30] isaacs: walkingeyerobot: heh, "pyramid code", that's cute. [20:30] dve: walkingeyerobot ... thanks, but I actually want to wait until all the callbacks in the forEach loop are completed [20:31] dve: not callback each time [20:31] walkingeyerobot: dve: ah I see [20:31] tswicegood has joined the channel [20:31] walkingeyerobot: dve: one way to do this is to figure out how many times the forEach is going to be called before calling it (such as replies.length) [20:32] walkingeyerobot: dve: then have the forEach callback check to see how many times it's already been called [20:32] walkingeyerobot: dve: and on the last one, call your callback [20:32] mikl: any recommendation on what MySQL-library to use with Node? There are countless and its hard to compare :( [20:32] walkingeyerobot: dve: or forEach may actually take an extra param that is a callback [20:32] derencius has joined the channel [20:33] walkingeyerobot: dve: scratch that last comment [20:34] bnoordhuis: mikl: https://github.com/felixge/node-mysql probably [20:35] dve: walkingeyerobot ... thanks, will look at testing to see if it is the last index [20:35] kohai: @notzach: @usaussie it's all node.js #winning [20:35] kohai: @notzach: @usaussie it's all node.js #winning [20:35] mikl: bnoordhuis: was just looking at that - seems be the most popular option on Github :) [20:35] bnoordhuis: mikl: well-maintained too plus felixge is a nice guy [20:35] mikl: bnoordhuis: and kkaefer is a contributor :) [20:36] mikl: bnoordhuis: ok, thanks :) [20:36] walkingeyerobot: dve: don't just test if it's the last index, as they might actually get executed in a different order. check to make sure how many have completed [20:36] dve: sorry thats what I meant.. keep count [20:36] walkingeyerobot: perfect :) [20:37] jbpros has joined the channel [20:39] mbrevoort has joined the channel [20:39] DelvarWorld has joined the channel [20:40] walkingeyerobot: writing non-blocking code isn't always "easier", but I think once you get used to it, it makes more sense. [20:40] Stephen: walkingeyerobot: \o [20:40] Adman65 has joined the channel [20:41] kohai: @felipernb: Having a hard time to deploy a #NodeJS app at @heroku :( [20:41] kohai: @felipernb: Having a hard time to deploy a #NodeJS app at @heroku :( [20:41] walkingeyerobot: Stephen: "\o"? I don't quite get you [20:41] Stephen: v8: util.inspect(GLOBAL) [20:41] v8bot: Stephen: ReferenceError: util is not defined [20:41] Stephen: KIK [20:41] Stephen: lol [20:42] Stephen: Sorry, "\o" means high five [20:42] walkingeyerobot: haha, well thanks then :) [20:42] Stephen: The standard response is "o/" [20:42] walkingeyerobot: o/ [20:42] NetRoY has joined the channel [20:42] Stephen: v8: var util = require('util'); util.inspect(GLOBAL); [20:42] v8bot: Stephen: ReferenceError: require is not defined [20:42] Stephen: jaj [20:42] Stephen: hah [20:42] zomgbie_ has joined the channel [20:43] jtrally: can someone tell me how to get this to be a string: file_buf = fs.readFileSync "src/client.app.pack",'utf8' [20:43] Stephen: dude, my offset is turning on today [20:43] jtrally: I'm trying to do a cake file [20:43] Stephen: jtrally: What batter middleware are you using? [20:43] jtrally: express [20:43] Stephen: Damnit, he had a good answer [20:44] bergie has joined the channel [20:44] hydoskee has left the channel [20:44] Stephen: jtrally: Can't you just just file_buf.toString() at that point? [20:44] jtrally: I thought so [20:44] jtrally: Doesn't behave right [20:45] c4milo: does anybody have errors with npm? [20:45] __tosh has joined the channel [20:46] c4milo: right now, [20:46] c4milo: corrupt packages [20:46] Stephen: jtrally: What sort of problems are you seeing? [20:46] `steve has joined the channel [20:47] Stephen: jtrally: According to my reading if you specify encoding you will get back a string instead of a buffer [20:47] Stephen: Is your problem in looking for a Buffer object? [20:49] jtrally: I think new lines are stripped out and its fucking up when the carriage returns are left in [20:49] kohai: @paulrandall: @OllieParsley I keep hearing about node.js - what does it allow people to do? [20:49] kohai: @paulrandall: @OllieParsley I keep hearing about node.js - what does it allow people to do? [20:50] Shinuza has joined the channel [20:50] meat_popsicle: nodejs.org [20:50] tjholowaychuk: using a cakefile is the first issue [20:50] tjholowaychuk: make ftw [20:50] jtrally: ftw? [20:50] CoverSlide: jake ftw [20:51] jtrally: shit... [20:51] kohai: @telemachus: Just as I'm starting to get comfortable with Node.js callbacks - new Eventmachine screencast from @peepcode is out. #awesome [20:51] kohai: @telemachus: Just as I'm starting to get comfortable with Node.js callbacks - new Eventmachine screencast from @peepcode is out. #awesome [20:51] telemachus: um, fuck [20:51] chrischris has left the channel [20:52] telemachus: Say hi and boom, nodekohai followed me 5 times? [20:52] telemachus: http://cl.ly/7Mvc [20:52] telemachus: That's weird. [20:52] devrim has joined the channel [20:53] pixel13 has joined the channel [20:53] jakehow has joined the channel [20:54] jhurliman has joined the channel [20:55] cl0udy has joined the channel [20:55] cl0udy: hi [20:55] jamesarosen has joined the channel [20:56] cl0udy: anyone can help me get my head around events [20:56] cl0udy: pls [20:56] tjholowaychuk: cl0udy something happens, and event is emitted [20:56] tjholowaychuk: and you register one or more event handlers [20:56] tjholowaychuk: for said event [20:56] tjholowaychuk: well zero or more [20:56] cl0udy: so its a cascade right? [20:56] telemachus: seems silly to bother registering zero [20:56] telemachus: just saying :) [20:56] tjholowaychuk: telemachus :D [20:57] tjholowaychuk: true [20:57] tjholowaychuk: cl0udy they are called in order of definition [20:57] bnoordhuis: does an event happen if there is no one that listens for it? [20:57] eyesUnclouded has joined the channel [20:57] bnoordhuis: these are important questions [20:57] tjholowaychuk: currently you cannot cancel them mid-emission I dont think [20:57] samuelkadolph: Does a tree make a noise? [20:57] telemachus: bnoordhuis: Is it in a forest? [20:57] tjholowaychuk: I ran into that issue [20:57] bnoordhuis: telemachus: we're on the same track here :) [20:57] telemachus: (Wow - mid-emission - so many jokes...) [20:58] telemachus: (Yes, it is hard to stop mid-emission...) [20:58] jerrysv: what is the sound of one event firing? [20:58] telemachus: (And so on...) [20:58] tjholowaychuk: telemachus ahahaha [20:58] cafesofie has joined the channel [20:58] cl0udy: can i ask how does this differ from php? [20:58] cl0udy: differs* [20:59] bnoordhuis: php code is nearly always top-down sequential [20:59] kohai: @sjamesu: node.js is all fun and games until you get an untraceable exception. #fail [20:59] kohai: @sjamesu: node.js is all fun and games until you get an untraceable exception. #fail [20:59] bnoordhuis: php code calls functions [20:59] RORgasm: hey guys [20:59] bnoordhuis: but in soviet russia and node.js, functions call you [20:59] cl0udy: thru callbacks? [20:59] telemachus: Is there a way to kill one of the two kohai cuckoos? [20:59] bnoordhuis: yep [21:00] pixel13 has left the channel [21:00] RORgasm: i was wondering if anyone was familiar with how to include a coffescript file in expressjs in your layout [21:00] telemachus: He seems to be stuttering [21:00] caike has left the channel [21:00] bnoordhuis: telemachus: /ignore him [21:00] kohai: @NodeKohai: @sjamesu You can trace all errors. Use process.on('uncaughtException', .... [21:00] kohai: @NodeKohai: @sjamesu You can trace all errors. Use process.on('uncaughtException', .... [21:00] telemachus: bnoordhuis: Fair enough, but that's treating the symptom. I want to cure the cancer. [21:01] Marak has joined the channel [21:01] telemachus: But yeah, plonked [21:02] tim_smart has joined the channel [21:02] DelvarWorld: cl0udy: there are many differences, namely javascript vs php. PHP is a more traditional object oriented language (has extends, implements, private / public, etc) while javascript is all prototypal inheritence based. Node.js gives you commands to interact with the file system and network streams at a low, non-blocking level. PHP is a collection of loosely related commands with no common naming conventions [21:03] MooGoo: php's OO is a hacky afterthought [21:03] DelvarWorld: also true [21:03] kohai: @cmlenz: Added a simple node.js based demo for my jQuery iframe transport: http://t.co/n063Gy0 #jquery #nodejs (link: https://github.com/cmlenz/jquery-iframe-transport/tree/master/demo) [21:04] jslatts has joined the channel [21:04] cl0udy: thanks guys [21:05] shanez has joined the channel [21:05] djcoin has joined the channel [21:06] cl0udy: i read [21:06] cl0udy: You use your web browser to make a request for "/about.html" on a Node.js web server. [21:06] cl0udy: The Node server accepts your request and calls a function to retrieve that file from disk. [21:06] cl0udy: While the Node server is waiting for the file to be retrieved, it services the next web request. [21:06] cl0udy: When the file is retrieved, there is a callback function that is inserted in the Node servers queue. [21:06] cl0udy: The Node server executes that function which in this case would render the "/about.html" page and send it back to your web browser. [21:06] cl0udy: how does this process differ in php? [21:06] rfay has joined the channel [21:06] MooGoo: php isnt a webserver [21:07] cl0udy: thats true [21:07] MooGoo: node takes the job of php and apache [21:07] MooGoo: least in that case [21:07] gazumps has joined the channel [21:07] cl0udy: in terms of php it can hv callbacks too [21:07] MooGoo: php can have callbacks but most all of its IO is syncroness [21:07] MooGoo: asdas [21:08] MooGoo: !spell syncroness [21:08] Calvin: synchronous, scariness, hungriness, snugness, sunscreens, synchronize, sanctions, screens, squareness, sneakiness, sanction's, screen's, snugness's [21:08] MooGoo: synchronous [21:08] cl0udy: i see [21:08] MooGoo: so it would be more like [21:08] cl0udy: pls explain [21:09] MooGoo: browser sends request to php, php sends IO request for file and waits, another browser request comes in, but PHP does nothing with it, PHP gets file, sends it back to client, then services the next clients request [21:09] cl0udy: oh ok [21:09] MooGoo: that is if PHP was acting as the webserver too [21:09] MooGoo: which it usualy is not [21:09] samuelkadolph: That's not a 1:1 comparison [21:09] MooGoo: but it could [21:09] cl0udy: how does node.js prevent this from happening? [21:10] samuelkadolph: cl0udy: The OS tells node when things are ready [21:10] MooGoo: nodejs is built using libeio, a C library for async I/O [21:10] cl0udy: so it doesnt wait around and processes the next request [21:10] MooGoo: yes it doesnt block [21:10] MooGoo: on IO [21:10] cl0udy: thanks guys [21:11] cl0udy: really helpful [21:11] cl0udy: at least this channel isnt dead lol [21:11] SubStack: ACTION kills it [21:12] slickplaid: with fire? [21:12] MooGoo: hai [21:12] MooGoo: hai [21:12] SubStack: slickplaid: indeed [21:12] MooGoo: hai [21:12] MooGoo: hey calvin whatup [21:12] Calvin: whatup hey [21:12] chjj: v8: Object.prototype.toString.call(void 0) [21:12] v8bot: chjj: "[object global]" [21:12] viz has joined the channel [21:12] MooGoo: not dead [21:12] slickplaid: SubStack: excellent :D [21:14] kohai: @forrst: (Reposting now that WWDC is over :) Just added Ruby, PHP, iOS, C#, Python, jQuery, AS3, and node.js API libs from our users: forrst.com/api [21:14] kohai: @forrst: (Reposting now that WWDC is over :) Just added Ruby, PHP, iOS, C#, Python, jQuery, AS3, and node.js API libs from our users: forrst.com/api [21:14] MooGoo: why is kohai doubling up [21:15] Marak: !part #Node.js [21:15] kohai has left the channel [21:15] Marak: i didnt see anything [21:15] MooGoo: hmm... [21:15] AvianFlu has joined the channel [21:15] gh0stz has left the channel [21:15] MooGoo: .. Math.random() [21:15] Calvin: 130.8154780459590256 [21:15] zmbmartin: so is wkhtmltopdf the best there is for creating pdf's right now? [21:16] bergie has joined the channel [21:16] xandrews has joined the channel [21:16] MooGoo: TeX [21:16] MooGoo: but that's just me [21:16] zmbmartin: from a node/express app? [21:16] hunterloftis has joined the channel [21:17] MooGoo: dont listen to me [21:17] MooGoo: TeX is for creating PDF's from scratch [21:17] MooGoo: not from html [21:17] jvduf has left the channel [21:17] cl0udy: .clear [21:17] slickplaid: i thought i read something about node-canvas possibly working to get the canvas into a pdf, but I might be remembering something else [21:17] zmbmartin: MooGoo: I want to create from scratch [21:17] Marak: zmbmartin: from html or postscript? [21:17] tjholowaychuk: slickplaid yup [21:17] tjholowaychuk: i plan on adding pdf support to node-canvas [21:18] slickplaid: tjholowaychuk: Awesome. :) [21:18] MooGoo: and...TeX is not an easy language to figure out [21:18] CoverSlide: didnt marak make a pdf module? [21:18] MooGoo: or markup [21:18] MooGoo: whatever [21:18] jerrysv: moogoo: call a spade a spade. language. [21:18] zmbmartin: Marak: I just want to create pdf's from text and photo from my database. Listing's of houses basically that users will enter info and upload photos. then I want to generate pdf's [21:19] MooGoo: jerrysv it's pretty ugly whatever it is [21:19] MooGoo: still it works [21:19] Marak: CoverSlide: its requires you build it up using post script [21:19] zmbmartin: tjholowaychuk: when are you adding that to node-cavas? [21:19] tjholowaychuk: zmbmartin not positive [21:20] tjholowaychuk: within the next 2 or 3 months I would suspect [21:20] tjholowaychuk: we have big plans for that feature [21:20] Marak: zmbmartin: pdf.js will work for basic pdfs, https://github.com/Marak/pdf.js/blob/master/node-demo.js [21:20] Marak: zmbmartin: anything with complex layout is gonna not work really, you need a canvas for that [21:20] zmbmartin: Marak: can I use images in that? [21:20] tomtomaso has joined the channel [21:20] mbrevoort has joined the channel [21:21] Marak: zmbmartin: no clue [21:21] Marak: zmbmartin: yeah, addImage() looks like its available [21:21] Marak: zmbmartin: should work.... [21:22] ezmobius has joined the channel [21:23] NuckingFuts has joined the channel [21:25] fly-away has joined the channel [21:26] niftylettuce: Marak++ [21:26] v8bot: niftylettuce has given a beer to Marak. Marak now has 1 beers. [21:26] replore_ has joined the channel [21:26] jerrysv: `beers jerrysv [21:26] patrickarlt has joined the channel [21:27] timmywil has joined the channel [21:31] pifantastic_ has joined the channel [21:33] jeff_horton has joined the channel [21:33] AvianFlu has joined the channel [21:34] mikeal has joined the channel [21:35] michaelhartau has joined the channel [21:35] jaket has joined the channel [21:36] yozgrahame has joined the channel [21:37] MikeMakesIt has joined the channel [21:38] justinw312 has joined the channel [21:38] mc_greeny has joined the channel [21:38] broofa has joined the channel [21:40] justinw312: Okay, I know it's doing it wrong, not the node way, etc, (and I'm not even planning to do this). But from a theory perspective: is there a generic way to wrap any given non-blocking function to make it block without busy waiting? Is settimeout polling the only option? [21:40] justinw312: as in I don't want to do it, but I got to thinking how it would be possible [21:40] SubStack: justinw312: there is no way without using the thread pool [21:41] SubStack: which you can only do from c++ [21:41] SubStack: there are even some modules on npm to do this [21:41] zmbmartin: Marak: thanks I will check out pdf.js [21:41] SubStack: but it's a pretty terrible idea except maybe in a very few circumstances [21:41] zmbmartin: tjholowaychuk: pdf's in node-canvas would be pretty sweet. [21:42] tjholowaychuk: zmbmartin yup [21:42] tjholowaychuk: very easy [21:42] tjholowaychuk: with the canvas api [21:42] tjholowaychuk: and flexible, looking forward to it [21:42] slickplaid: Yeah, it looks pretty sexy and relatively easy to implement. [21:43] zmbmartin: tjholowaychuk: very easy to add? or will be easy to make pdf's? [21:43] tjholowaychuk: very easy to build pdfs [21:43] justinw312: SubStack: Thanks [21:43] Marak: zmbmartin: the idea is you can take html output and transform it into a pdf document [21:43] Marak: zmbmartin: the only way to do that is with a canvas, essentially [21:44] catshirt has joined the channel [21:45] ianward has joined the channel [21:45] zmbmartin: Marak: ok I see. I have never created pdf's really other then with prawn in ruby and that is a royal pain and the docs are a pile of mess. [21:45] Marak: zmbmartin: in an ideal world, you point your pdf creator at an html page, and it magically just works [21:46] chjj: i think a pdf to html/css converter would be more useful, that way i never have to open a pdf again [21:47] victor_ has joined the channel [21:47] coleGillespie has joined the channel [21:47] mbrevoort has joined the channel [21:47] focusaurus has joined the channel [21:47] MooGoo: good luck with that [21:47] chjj: good luck with what? [21:47] telemachus: chjj: If you're willing to do without the css, I think you can already have that. [21:47] MooGoo: pdf to html/css converter [21:48] telemachus: At least, I do pretty well with various pdf->ascii/html tools for email [21:48] chjj: i said i think it would be more useful, not that im going to try to get/make one [21:48] chjj: nothing to have good luck for [21:48] chjj: nothing to wish me good luck for [21:49] MooGoo: if all you care about is reading text it wouldnt be so bad...but getting any sort of accurate representation of the pdf into html/css would be a pain if not sometimes impossible [21:49] pigmej has joined the channel [21:49] chjj: i know [21:49] justinw312: Thanks again all [21:49] chjj: my comment was meant to be an insult to the pdf format, not an actual desire for this thing [21:50] MooGoo: whats so wrong with pdf [21:50] MooGoo: I like something that is what it is [21:50] MooGoo: as opposed to html [21:50] chjj: they help comprise 90%+ of the exploits on the web for one [21:50] zmbmartin: does ie support data images? [21:50] chjj: i would rather have a piece of software [21:51] jmoyers: you know [21:51] jmoyers: google already does this? [21:51] chjj: that embeds css into an html document with base64'd images [21:51] jmoyers: open a pdf in gmail [21:51] MooGoo: not saying adobe pdf reader isnt shit [21:51] chjj: and you have a single self contained html document, that could render in any decent browser [21:51] chjj: rather than some terrible adobe format [21:52] jmoyers: in fact [21:52] jmoyers: both scribd and google already do this [21:52] jmoyers: not just google [21:53] mwhooker has joined the channel [21:53] gazumps has joined the channel [21:54] pifantastic_ has joined the channel [21:54] cummingscm has joined the channel [21:55] jmoyers: for instance [21:55] jmoyers: https://docs.google.com/gview?url=http://dl.dropbox.com/u/3685/presentations/next11-dirt/node-dirt.pdf&pli=1 [21:55] mikeal has joined the channel [21:56] cummingscm: I'm trying to use sequelizejs and keep getting dependency errors. "Cannot find module 'underscore' " even though I've installed underscore w/NPM both normally and with global option. [21:56] TomY has joined the channel [21:57] zmbmartin: jmoyers: how does google do that? [21:57] jmoyers: magic [21:57] zmbmartin: ;) [21:58] stride: documentcloud's opensource component for the nytimes does that as well afaik [21:58] jmoyers: you can parse pdf's [21:59] brettgoulder has joined the channel [21:59] meat_popsicle has left the channel [22:00] sharkbone has joined the channel [22:00] Poetro has joined the channel [22:00] gozala has joined the channel [22:02] jmoyers: anyway, all i was injecting was that its certainly not 'impossible' [22:02] tomtomaso has joined the channel [22:02] jmoyers: there's tons of stupid pdf features that nobody uses that you can effectively just toss in the shitter [22:03] tomtomaso has joined the channel [22:03] nym has joined the channel [22:03] nym has left the channel [22:03] jmoyers: and in fact, if you use "embedded=true" a la https://docs.google.com/gview?embedded=true&url=http://dl.dropbox.com/u/3685/presentations/next11-dirt/node-dirt.pdf&pli=1 it looks even nicer (no stupid frames UI) [22:04] nym has joined the channel [22:04] jmoyers: of course this isn't exactly a public api i would image O.o ;-) [22:04] nym has left the channel [22:06] davidbanham has joined the channel [22:08] philippkueng has joined the channel [22:09] _jgr has joined the channel [22:09] tomtomaso has joined the channel [22:10] tom-tomaso has joined the channel [22:10] gsmcwhirter has joined the channel [22:12] cl0udy has joined the channel [22:16] temp01 has joined the channel [22:17] michaelhartau has joined the channel [22:18] broofa has joined the channel [22:19] darshanshankar has joined the channel [22:20] zomgbie has joined the channel [22:21] stepheneb_ has joined the channel [22:22] jblanche has joined the channel [22:23] chrislorenz has joined the channel [22:23] bentkus has joined the channel [22:23] materialdesigner has joined the channel [22:24] skm has joined the channel [22:26] skm has joined the channel [22:27] mbrevoort has joined the channel [22:27] DelvarWorld: faster to modify object in place, or faster to pass object back? [22:28] jerrysv: DelvarWorld: c++? [22:28] qbert__ has joined the channel [22:28] qbert__: Does nodejs have a sleep function ? [22:28] pigmej: qbert__: setTimeout ;-) [22:28] DelvarWorld: jerrysv: node [22:28] jerrysv: DelvarWorld: straight js or add-on? [22:29] mscdex: either way you have to create an object somewhere right? :) [22:30] brainproxy: qbert__: you may want to look into creationix's Step or SamuraiJack's JooseX.CPS [22:30] brainproxy: https://github.com/creationix/Step [22:30] DelvarWorld: jerrysv: straight [22:30] brainproxy: https://github.com/SamuraiJack/JooseX-CPS [22:30] gonsfx: can i somehow access the app object in express middleware functions? [22:31] gonsfx: or is there any best practice / example use cases of dependancy/require management for several files all using the same requires? [22:31] BrianTheCoder has joined the channel [22:33] jerrysv: delvarworld: no idea, but might be worth running a benchmark on [22:33] qbert__: brainproxy, ok thx [22:33] jerrysv: delvarworld: i had already copied in the url to my gist for the add-ons [22:34] _jdalton has joined the channel [22:34] ryanfitz has joined the channel [22:35] bnoordhuis: DelvarWorld: pass object back: same or new object? [22:35] DelvarWorld: same, modified [22:35] bnoordhuis: in that case it doesn't matter [22:36] bnoordhuis: objects are references to things that live on the heap [22:36] jerrysv: bnoordhuis: so no penalty for a return? [22:36] bnoordhuis: nope [22:36] nym has joined the channel [22:36] jerrysv: bnoordhuis: how's your add-on fu? :) [22:37] nym: hey, i just joined a big node.js project :) [22:37] bnoordhuis: jerrysv: c++ or js? [22:37] jerrysv: c++ [22:37] v8bot: jerrysv has given a beer to c. c now has 8 beers. [22:37] jerrysv: hahaha [22:37] jerrysv: er [22:37] brainproxy: lol [22:37] jerrysv: yeah [22:37] bnoordhuis: hah [22:37] nym: c-- more like it [22:37] c: hurray! [22:37] jerrysv: that c guy gets around [22:37] nym: c++ [22:37] v8bot: c is getting too many beers. Don't let c get drunk! [22:37] jerrysv: c: finally your handle pays off? [22:37] bnoordhuis: jerrysv: what do you want to know? [22:38] chrislorenz has joined the channel [22:38] jerrysv: bnoordhuis: there has to be a better way than this: https://gist.github.com/1003522 [22:38] bnoordhuis: jerrysv: hah, i had something similar in node-iconv [22:38] jerrysv: bnoordhuis: i'm creating a buffer in c++ and just want it passed back -- considered in-place, but do not know the size of the buffer beforehand [22:39] jerrysv: bnoordhuis: doing that in here: https://github.com/JerrySievert/node-judy [22:39] bnoordhuis: jerrysv: judy trees, you are a daring person [22:39] jerrysv: bnoorduis: i get bored easily [22:40] perlmonkey2 has joined the channel [22:40] jerrysv: +h in here somewhere [22:40] bnoordhuis: jerrysv: buffers are fixed size, why/when don't you know its size beforehand? [22:41] jerrysv: bnoordhuis: i'm implementing a get/set, and what is set to be returned may be a different size -- key "abc" could be 300 bytes, key "xyz" could be 10 bytes [22:42] jerrysv: bnoordhuis: unless i'm misunderstanding something basic here, and can just set the length of the buffer after i've allocated the memory for the memcpy() [22:43] bnoordhuis: jerrysv: Buffer::New(char *data, size_t length, free_callback callback, void *hint) ? [22:43] bnoordhuis: that'll avoid another memcpy [22:44] jerrysv: and what is the callback and hint in that signature? [22:44] bnoordhuis: jerrysv: typedef void (*free_callback)(char *data, void *hint) [22:44] jerrysv: aha, so that gets fired when it gets garbage collected away? [22:44] bnoordhuis: data is what needs free'ing, hint is whatever you pass to Buffer::New() [22:44] bnoordhuis: yep [22:44] jerrysv: awesome, you are a great help [22:44] jerrysv: bnoordhuis++ [22:44] v8bot: jerrysv has given a beer to bnoordhuis. bnoordhuis now has 1 beers. [22:44] bnoordhuis: yay! [22:45] swaj: I wonder what the ratio of node devs is for mac :: linux. With Ruby it seems like 98% mac :P [22:45] qbert__: totally, and python has a huge mac base [22:46] jerrysv: swaj: almost every computer at nodeconf was a mac [22:46] cognominal_ has joined the channel [22:47] kris_will: I don't see any problem deving node on any *nix OS, use what you like, so long as it isn't windows [22:47] dguttman has joined the channel [22:47] jerrysv: bnoordhuis: i've been pretty much asking that question about 3 times/day for the last 3 weeks [22:48] broofa: hey, what's the latest goodness for managing node as a service? I looked at spark2 a while back... [22:48] broofa: is there something newer/better floating around these days [22:48] broofa: ? [22:48] bnoordhuis: jerrysv: 3*7*3 time is the charm, right? [22:48] tjholowaychuk: broofa cluster [22:49] coreb: broofa: I use "forever" [22:54] devrim has joined the channel [22:54] brownies has joined the channel [22:55] hydoskee has joined the channel [22:56] zmbmartin: tjholowaychuk: any way to create my own link helpers in jade? [22:57] JoshC1 has joined the channel [22:57] tjholowaychuk: zmbmartin yup, docs for express app.helpers() and app.dynamicHElpers() [22:57] bnoordhuis: i'm speechless - lua is 10th on tiobe's language ranking... http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html [22:58] qbert__: yo 10 spots ? seems suspicious [22:58] qbert__: up* [22:59] bnoordhuis: odd, init? [22:59] TomY has joined the channel [22:59] aurojit has joined the channel [22:59] flippyhead has joined the channel [23:00] zmbmartin: tjholowaychuk: also if separate my controllers if I do and require them in app.js if I use app.all in controller1.js will that only apply to my routes in controller1.js or still to all? [23:01] broofa has joined the channel [23:01] jmoyers: bnoordhuis huh, they state its because of the sept 2010 change in ios tos? [23:02] jmoyers: i wonder if this applies to a runtime like node on ios [23:02] kryl has joined the channel [23:02] kryl: hi [23:02] jmoyers: ACTION lost track of interpreted language debate on iOS [23:02] kryl: can I have any return of nodejs in "production" ? [23:03] Marak: hrmm kryl ? [23:03] kryl: I try to figure out about long polling server [23:03] jerrysv: jmoyers: it must have gone somewhere, couchdb on ios [23:03] kryl: nodejs seems to be a good way but I need to take care about stability and scaling too [23:04] kryl: about security and bugs ? where can I find any returns please ? [23:05] Marak: kryl: whats your native tongue? [23:05] jmoyers: yeah [23:05] kryl: Marak, french :) [23:05] kryl: tongue ? :) [23:05] Marak: cloudhead you feel like helping this guy? :-) [23:06] BillyBreen has joined the channel [23:06] jmoyers: kryl just not sure what you mean by 'return' -- articles, resources? [23:07] jmoyers: the node community is a little new for security whitepapers just yet -- at least I don't know of any. generally people run a node instance in a non-root capacity on servers and keep it locked up pretty tight [23:07] gtramont1na has joined the channel [23:07] Marak: kryl: we use node.js in production, there are a few caveats [23:08] Determinist has joined the channel [23:08] jmoyers: kryl as for benchmarks -- front runners are seeing good results i think. google 'http benchmarks nodejs' -- you'll find things like this: http://news.ycombinator.com/item?id=1088699 [23:08] jmoyers: not sure what the latest greatest looks like [23:09] Determinist: how do you guys run your node servers under unprivileges users while binding to ports lower than 1024? [23:09] Determinist: i'm having a real argument with my silly admin over this right now [23:09] bnoordhuis: Determinist: iptables REDIRECT [23:10] jmoyers: Determinist iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 [23:10] jmoyers: something like that [23:10] jmoyers: i've got it running like that, anyway [23:10] kryl: yes for example, or more official forums perhaps ? [23:10] jmoyers: or you run ngnix in front of it, serve static files off of it, and forward other requests onto node [23:10] kryl: or any advice from users here [23:10] kryl: I found different closure on the net so I'm share between using it or not in production ... [23:10] igl has joined the channel [23:10] Determinist: bnoordhuis: all fine and dandy, but what happens when you need to do http callbacks? no way to know in the application what public port it is actually mapped to, especially if internally it is running on a different port [23:11] Determinist: jmoyers: socket.io doesn't work very well with nginx :) [23:11] jmoyers: HAproxy? [23:11] jmoyers: something like that [23:12] bnoordhuis: Determinist: you can start as root, bind to a privileged port, then drop privileges with setuid() / setgid() [23:12] jmoyers: what do you mean by 'http callbacks' [23:12] Determinist: jmoyers: we're using dns round robin with ip addresses instead [23:12] jmoyers: so a load balancer? [23:12] jmoyers: so you're talking about session binding? [23:12] jmoyers: or what? [23:12] Marak: jmoyers: node-http-proxy supports websocket proxying btw [23:13] Determinist: jmoyers: yeah, essentially it's a load ballancer using DNS [23:13] Determinist: nm that, it's not the issue tho [23:13] jmoyers: Marak yup, have seen it and used it isolated [23:13] jmoyers: just never wanted to run node as root [23:13] jmoyers: maybe im just a pussy like that~ [23:13] zeade has joined the channel [23:13] jmoyers: but it sounds like bnoordhuis is on to something there, lowering priv [23:13] swaj: jmoyers: nginx doesn't support chunked encoding (HTTP 1.1) to proxy_pass sites, sadly :( [23:13] Determinist: jmoyers: you asked about http callback... lets assume you have some async thing where you call a url and give them as one of the parameters the url to make a request to when it's done doing whatever it is that your request was about [23:13] kryl: well [23:14] jmoyers: okay [23:14] jmoyers: so a postback? [23:14] jmoyers: server to server? [23:14] Determinist: lowering priv is fine, cept my admin is throwing a fit over running the node server as root initially [23:14] Determinist: jmoyers: yeah [23:14] mikeal has joined the channel [23:15] jmoyers: i dont see why you cant run on 8080 for that [23:15] jmoyers: but maybe im just being thick [23:15] swaj: well it has to unless you don't care about running port 80 :P [23:15] Determinist: it's a web server, what's the point running it on non-standard ports? not to mention proxies and firewalls in the middle [23:15] jmoyers: you hand off url xx to the server, lets say a post commit hook in hithub for instance, why does it matter what port you are running on? [23:16] bnoordhuis: Determinist: the external world doesn't care that you run on port 8080, it only sees port 80 [23:16] Aria has joined the channel [23:16] jmoyers: erm [23:16] swaj: Determinist: run your app on port 8080 (or whatever) then proxy [23:16] bnoordhuis: Determinist: to clarify that further: *internal* port 8080 [23:16] jmoyers: but [23:16] swaj: Determinist: run HAProxy or something similar on port 80 and have it direct to your app based on hostname [23:16] jmoyers: does prerouting in iptables work for originating outbound also? [23:17] Determinist: his brilliant idea was having 2 configuration options in the server's config file to specify that port node is binding to and what public port is actually available. this sounds silly to me, but he claims this is common and practical. [23:17] Determinist: sounds dumb to me. [23:17] Determinist: what do you guys think? [23:17] jmoyers: as with the postback case, its not a client -> server interaction [23:17] jmoyers: i dont understand why you need reference to the public port at all [23:17] MikeMakesIt has joined the channel [23:17] bnoordhuis: Determinist: configured internal and external addresses? common practice [23:17] kryl: thank you for "reports" :) [23:17] Determinist: s/is actually available/the filewall is redirecting from [23:17] swaj: Determinist: what I've seen most commonly is a proxy (like nginx, HAProxy, varnish) running on port 80 and then delegating to localhost:8000 or whatever each individual app is running on. [23:18] swaj: Determinist: then your app just runs on 127.0.0.1, with your proxy handling all internet traffic and passing it along to the appropriate backend. [23:18] jmoyers: thats right swaj, but why cant you get away with just iptables if you are running host specific iptables anyway? [23:18] jmoyers: at least thats been my experience -- im not sure about posting to another server, originating from that web server, though [23:18] swaj: jmoyers: you probably could, but it would only work for a single app. If you're running 20 node apps on that webserver, you need a proxy to check host headers [23:19] jmoyers: swaj actually [23:19] jmoyers: i use connect.vhost for that [23:19] swaj: jmoyers: sure, that would work.. but then connect.vhost is basically a proxy :) [23:19] jmoyers: i've got 4 different sites running off one clustered express app [23:19] jmoyers: but i go iptables -> express vhost -> express app [23:19] MrNibbles: evening gents [23:20] jmoyers: sup sucka [23:20] Xano has joined the channel [23:20] jmoyers: ACTION is 'gangsta' [23:20] swaj: right so iptables is redirecting port 80 to your connect.vhost, which then proxies to whatever express apps you have running :P [23:20] jmoyers: yes [23:20] swaj: same idea [23:20] jmoyers: well, [23:20] jmoyers: the nice part is [23:20] jmoyers: thats 4 lines of code [23:20] swaj: but instead of needing iptables, you can just run a proxy on port 80 :P [23:20] jmoyers: thats true [23:20] jmoyers: they are both totally valid, i would imagine [23:21] swaj: aye [23:21] jmoyers: i just didn't want to learn ngnix config shit ;P [23:21] swaj: all I'm saying is that if your bofh doesn't want node running as root, then use a proxy of some sort :P [23:21] jmoyers: using ngnix or something has the benefit of server static files like a boss [23:21] swaj: nginx is a bad idea with websockets... again because of the lack of support for HTTP 1.1/chunked encoding [23:21] jmoyers: i.. dont run node as root ;-) [23:21] Determinist: not considering a proxy tho. HA/nginx/whatever. so i guess the public port + private port solution will have to do for now. [23:22] dguttman_ has joined the channel [23:22] swaj: Determinist: yeah if he wants to use iptables, let him. It's no big deal :P [23:22] jmoyers: Determinist i still don't get how you're going to bind the public port [23:22] jmoyers: without root, or at least starting at root [23:22] Determinist: bnoordhuis: btw, i've never seen public + private ports being specified for any server software before [23:22] jmoyers: Determinist done much apache config? [23:22] swaj: Determinist: your BOFH has a proxy running on that public IP :P [23:22] swaj: Determinist: or he's using iptables [23:22] Determinist: jmoyers: iptables redirects from port 80 to the internally bound node js listening on 8080, for example [23:22] bnoordhuis: Determinist: do more enterprise programming and you soon will :) [23:22] Determinist: jmoyers: actually, yeah, i have... [23:23] jmoyers: Determinist its pretty common to bind to more than one interface [23:23] jmoyers: in apache [23:23] jmoyers: or a specific interface [23:23] jmoyers: we run some java servers [23:23] jmoyers: and we've got them jailed up too [23:23] jmoyers: 80 -> 8080 [23:23] Determinist: jmoyers: nooo, i'm talking about port forwarding [23:23] swaj: Determinist: so your operator sounds like a smart guy. He knows you don't need a proxy for a single app, and he doesn't want your app binding directly to port 80 because it requires root privs. Seems like a reasonable compromise. [23:24] _jdalton has left the channel [23:24] Determinist: swaj: smart, maybe. not an elegant solution. [23:24] jmoyers: our main it architect is a symantec badass, and he has a very similar outlook [23:24] jmoyers: ACTION puts on his tin foil hat [23:24] swaj: Determinist: I guess I disagree. it's a single iptables rule. Pretty elegant, and avoids security issues. [23:24] jmoyers: swaj++ [23:24] v8bot: jmoyers has given a beer to swaj. swaj now has 1 beers. [23:25] Determinist: swaj: yeah, but to the guy configuring the node app's config... how is that guy supposed to know what iptables rules the admin has set up? what about simplifying things? [23:25] hecticjeff has joined the channel [23:25] jmoyers: in short, you dont [23:25] jmoyers: why does your app care? [23:25] Determinist: postbacks, you called those? [23:26] jmoyers: yes? [23:26] Determinist: the app has to know what public port to tell clients to connect to [23:26] gavin_huang has joined the channel [23:26] jmoyers: 80! [23:26] jmoyers: its default for http [23:26] Determinist: sweet jesus [23:26] Determinist: i know... [23:26] jmoyers: ACTION must be thick [23:27] swaj: Determinist: why does the node guy need to know what public ports are being used? your operator tells you the private port to use and your node app binds to only that port on 127.0.0.1. iptables handles the rest. node guy doesn't need to know or care :/ [23:27] Determinist: ACTION must be thicker for not being able to explain [23:27] jmoyers: he's supposing that if the server needs to call out to some other server over http, there might be issues? [23:27] cl0udy has joined the channel [23:27] jmoyers: for instance -- githubs http post commit hooks [23:27] jmoyers: something like that [23:28] bnoordhuis: your http callbacks use port 80 too [23:28] jmoyers: in my mind, im imagining it all works out magically, though [23:28] jmoyers: ^ [23:28] bnoordhuis: those REDIRECT iptables rules also work for local traffic [23:28] swaj: meh, that shouldn't matter. it should just work. remote apps can call in over the public port, and the node app can call out to whatever it wants. [23:28] Determinist: swaj: again, with postbacks the node guy does care... if i need to tell another server, programatically that it needs to send me http requests to an address and i need to take the address and port from the config, then it means the config needs to contain both the public port and the internal port. [23:28] jmoyers: ACTION thought so, but didn't know for sure [23:28] Determinist: jmoyers: yeah, it could work very well, but i hate this magic thing. it's not obvious. [23:28] swaj: Determinist: right, sure. But iptables handles that. [23:29] jmoyers: well [23:29] Determinist: swaj: how so, sire? [23:29] jmoyers: look [23:29] jmoyers: its analogous to anything in the network stack [23:29] swaj: Determinist: because iptables forwards everything it gets on that port to your app. Your app doesn't have to care where it came from really. [23:29] jmoyers: you don't have to know shit about tcp to use nodes http stack [23:30] jmoyers: similarly, you don't have to know shit about the firewall rules to run your application [23:30] bnoordhuis: 'transparent' is the keyword here [23:30] jmoyers: ^ [23:30] Determinist: swaj: node app makes a request to server X, puts in a GET parameter where server X should make a request to once it's done processing something that got initiated by the request. node app needs to know where it is located (hostname, port) publicly so it can tell server X where to make the request to. getting me? [23:31] swaj: Determinist: I understand exactly what you're saying, but how is that any different if your node app were listening directly on port 80? [23:31] swaj: Determinist: you'd still need to know the public URL for your site. [23:31] swaj: Determinist: the private one doesn't matter. [23:31] ajpiaNOU has joined the channel [23:32] Determinist: swaj: single configuration. right now i have 2 parameters in my config that tell the node app what hostname it is on and what port to bind the http server to. [23:32] jmoyers: Determinist does your firewall explicitly drop http over 8080? [23:32] jmoyers: or whatever port [23:32] jmoyers: oh, nm -- its not that big of a deal [23:32] jmoyers: its just standard practice [23:33] jmoyers: otherwise you'll have to convince your sysadmin to run bleeding edge software as root [23:33] jmoyers: and by the way -- they wont even LET me use node for external tasks [23:33] jmoyers: ACTION thinks you should feel lucky [23:33] swaj: Determinist: man that's pretty OCD. Honestly it's standard procedure to run a proxy (or some sort of port forwarding) on port 80 and then have your various node/whatever apps listening on private ports :/ [23:34] Determinist: jmoyers: irrelevant. i'm an app developer, i shouldn't care about the firewall settings. i should be given a port and hostname and be able to know where my app is running according to that combination. anything else mixes up between the admin's duties and the developer's duties, complicating matters and creating things that could break in the future when some dumb admin decides to remove iptable rules that seem not to be in use according to the [23:34] SubStack: ACTION fondles swaj's private ports [23:34] Marak: Wait, is it not safe to run node on public ports? [23:34] Marak: Crap. [23:34] swaj: lol [23:34] SubStack: sheeet [23:34] Marak: There goes $750k, fuck [23:34] jmoyers: ha [23:34] jmoyers: startup [23:34] Determinist: ACTION grins [23:34] jmoyers: devloper == devops [23:34] Determinist: yeah yeah, i'm not the one making this distinction, btw. the admin guy is. [23:35] swaj: Determinist: so your sysadmin has given you that. a private ip/port and a public hostname. Standard operating procedure :) [23:35] jmoyers: also im curious [23:35] Determinist: :P [23:35] Determinist: well fine. [23:35] jmoyers: you cant just use the http headers? [23:35] jmoyers: or whatever [23:35] jmoyers: i guess not, you still need to know their correctness [23:35] Determinist: jmoyers: probably could... but i'd rather not rely on client side provided data. [23:36] dan_manges has joined the channel [23:36] k1ttty has joined the channel [23:36] Marak: SubStack: http://www.youtube.com/watch?v=-QNB4wMH3PU [23:36] jmoyers: Marak thats a calculated risk ;-) [23:36] dan_manges has joined the channel [23:36] swaj: I'll be sad when I have to stop using nginx :( [23:36] swaj: it's been so good to me [23:36] Determinist: swaj: doing socket.io/sockets and nginx is out. [23:36] Marak: SubStack: http://29.media.tumblr.com/tumblr_lfo0yhIly01qb7xapo1_500.jpg [23:37] swaj: Determinist: yeah I know :( [23:37] Determinist: anyways, thanks for the wonderful feedback. i was playing a bit at some point. :P [23:38] jmoyers: it was too ocd to not be trolling [23:38] jmoyers: but worth talking about [23:38] swaj: yeah [23:38] swaj: you had me going :P [23:38] swaj: I never side with sysadmins (well almost never) :P [23:38] Determinist: hey now, i wasn't trolling. it was a valid technical discussion :P [23:39] Determinist: admins just piss me off. [23:39] ngs has joined the channel [23:39] jmoyers: yeah... [23:39] swaj: meh, the irrational ones do that to me, too :P [23:39] swaj: but once in a while you meet a smart one [23:39] jmoyers: i try my hardest to understand [23:40] Determinist: he could have solved this with authbind or linux caps or setuid, etc, but nooo :P [23:40] swaj: rofl [23:40] swaj: I promise that the solution he provided you is pretty standard :P [23:40] jsulak has joined the channel [23:40] swaj: at least for node/ruby dev [23:40] Determinist: ACTION nods [23:40] Determinist: i guess it'll have to do [23:40] bnoordhuis: don't forget enterprise java! [23:40] slickplaid: What was his solution? iptables? [23:40] Determinist: and yes, i am OCD :P [23:40] swaj: slickplaid: yeah [23:40] Marak: I could only imagine the reaction of a seasoned network administrator being asked to install a server-side JavaScript application on the network. [23:41] slickplaid: Ah yeah, pretty standard :D [23:41] Determinist: bnoordhuis: jsvc ftw :P [23:41] jmoyers: Marak its not funny [23:41] jmoyers: its awful [23:41] jmoyers: i tried [23:41] jmoyers: i failed [23:41] Marak: jmoyers: You mean like LiveWire? [23:41] jerrysv: marak: it hurts. believe me. [23:41] bnoordhuis: jmoyers: reasoning with sysadmins is easy [23:41] swaj: meh I'm a .NET developer in my day job... I can't even get them to let me have a Linux-based server period [23:41] bnoordhuis: jmoyers: just tell them you can see their house from up here [23:41] jmoyers: hahaha [23:41] swaj: our IT department: We don't run that open source crap. No support. Fuck it. [23:42] swaj: Me: Don't we have a VMWare ESX cluster? [23:42] slickplaid: Ouch. :( [23:42] Determinist: jmoyers: i didn't fail. he has no say in what tech is used, he just gets to have his way with security stuff... i could write in assembly for all he cares. :P [23:42] jmoyers: well goooood for you [23:42] jmoyers: ;-) [23:42] Determinist: jmoyers: :D [23:42] swaj: Determinist: you're lucky. Our platform is mandated :P [23:42] jmoyers: i also have a shitload of c++ devs [23:42] jmoyers: who try and stomp on my node love [23:42] Determinist: swaj: being a co-founder has a few perks [23:43] slickplaid: curbstomp? [23:43] jmoyers: ACTION means they stomp on his <3 [23:43] swaj: I've been working on my boss [23:43] jmoyers: i mean, i could insist [23:43] swaj: I keep telling him that I want to do a node app.. "it's only javascript! you know javascript!" [23:43] Marak: swaj: You are lucky, our entire stack is JavaScript. The whole fucking thing. [23:43] swaj: so far he's resisting :P [23:44] swaj: Marak: ours is a lovely mix of legacy VB and C# :) [23:44] Marak: I take that back, I'm sorry. [23:44] jmoyers: hahahaha [23:44] jmoyers: thats awesome [23:44] Determinist: :D [23:45] swaj: all newish dev is 100% C# (which honestly I think is a great language and I love it)... but the legacy VB makes me want to punch kittens when I have to go fix it. [23:45] jmoyers: C# isn't bad [23:45] jmoyers: imo [23:45] Determinist: actually, you can always just say: look, if you use node, you can use the same machine for more connections meaning you don't have to haul your fat ass to the datacenter and install more servers, you can just sit here and grow even fatter. [23:45] swaj: C# 4 is honestly very, very good. [23:46] systemfault: The language is beautiful. [23:46] postwait has joined the channel [23:46] jmoyers: Determinist that works fantastic on new projects [23:46] jmoyers: i would imagine [23:46] systemfault: And no, it doesn't mean that I love Microsoft. [23:46] bnoordhuis: but the community is awful [23:46] systemfault: Just judging C# itself. [23:46] jmoyers: not 2.5 year old projects though [23:46] bnoordhuis: hardly any OSS to speak of [23:46] Determinist: jmoyers: this is true. [23:46] bnoordhuis: java has its fault but it has a rich ecosystem of libraries [23:46] Determinist: and yes, C# isn't bad, i agree. [23:47] swaj: systemfault: I'm definitely not drinking all of the Microsoft kool-aid, but they do have some pretty damn good stuff. C# is one of those :) [23:47] jmoyers: ACTION shudders [23:47] tbranyen: the kinect is pretty baller [23:47] jmoyers: they 'have some pretty good stuff' [23:47] tbranyen: i'll give them that [23:47] jmoyers: but that you mean [23:47] kris_will has left the channel [23:47] jmoyers: xbox, c# [23:47] jmoyers: thats it [23:47] jmoyers: silverlight? [23:47] jmoyers: ACTION lols [23:47] swaj: jmoyers: hah, Silverlight is quite good :) [23:47] Determinist: for me it's ruby, js, python, java, C#, C++, brainfuck, assembly, objC [23:47] swaj: jmoyers: Netflix++ [23:47] tbranyen: lol good [23:47] tbranyen: doesn't work on linux [23:47] tbranyen: suxxxx [23:48] Determinist: in that order :P [23:48] tbranyen: although wondering if someone can hack around the netflix android app to get a linux desktop app going [23:48] swaj: meh, who uses Linux anyway? You're all running macs :P [23:48] tbranyen: i use linux on everything only in os x right now to update the ipad [23:48] Determinist: swaj: linux ftw :P (on a mac, but have a buncha linux servers) [23:48] systemfault: You've seen on .net forums all the silverlight lovers crying since the Windows 8 announcement? [23:48] systemfault: It's funny [23:48] slickplaid: Linux > mac imho :D [23:48] swaj: systemfault: yeah I had a good laugh at that :) [23:48] systemfault: "Oh noes, not javascript + HTML5!!!!" [23:48] swaj: systemfault: and I've got a big silverlight app in production at work :P [23:49] Determinist: silverlight is just one big fail [23:49] systemfault: :) [23:49] systemfault: What I don't get... [23:49] pifantastic has joined the channel [23:49] jmoyers: whhhhy would you do that? [23:49] jmoyers: silverlight only has like 70% pen [23:49] jensn: systemfault: Good to know that I am not the only one laughing. [23:49] systemfault: Silverlight has been embeddable in web page since the beginning [23:49] jmoyers: what was the feature that made you not go flash? [23:49] swaj: Determinist: not from my perspective. Silverlight is really good for the data entry app I wrote :P [23:49] slickplaid: silverlight grabs the protected content audience [23:49] systemfault: So where's the damn problem? [23:49] flippyhead has joined the channel [23:49] MooGoo: bing maps is pretty sweet [23:49] Determinist: swaj: really? something you couldn't have punched up in JS + HTML in 50% of the time? [23:50] jensn: systemfault: That they are not getting 1st class support. [23:50] swaj: jmoyers: Flash? rofl.... ActionScript is so god awful. [23:50] swaj: Determinist: yeah honestly. It was really, really easy in SL. [23:50] jmoyers: AS3 isn't terrible [23:50] jmoyers: if you completely ignore the timeline [23:50] jensn: systemfault: Assuming of course that MS just has not announced it yet. [23:50] systemfault: jensn: Right [23:50] jmoyers: and it has 100% (or might as well be) penetration [23:50] Determinist: jmoyers: as3 isn't bad, the flash platform is. [23:50] jmoyers: what.. does that mean? [23:50] jmoyers: the rntime? [23:51] jensn: systemfault: The whole thing is pretty laughable tbh, no idea why they are so upset. [23:51] jmoyers: its gotten much better imo, since flash 10 [23:51] swaj: jmoyers: Flash is shit. And my silverlight app is internal. So we can sort of control the end user's environment :) [23:51] Determinist: jmoyers: you can take a fucking cray supercomputer and flash would still manage to get to 100% cpu for running a banner [23:51] jmoyers: im not saying i'd use it for anything in particular -- i'd use js/css/html for most everything [23:51] jmoyers: i .. dont think so [23:51] swaj: jmoyers: looking back though, sometimes I wish I'd have just done it in ASP.NET MVC :P [23:51] jmoyers: and internal apps = thats great [23:51] jmoyers: i target webkit [23:51] jmoyers: for internal apps [23:51] swaj: jmoyers: but it was fun to mess with. [23:52] Determinist: for internal apps... just go webkit and use all of the tasty html5 stuff [23:52] swaj: jmoyers: heh, our company is on IE8 -- woohoo! [23:52] jmoyers: haha [23:52] swaj: I don't get to install chrome :( [23:52] swaj: wish I could [23:52] jmoyers: i remember the first day i rolled out our 'dashboard' for stats [23:52] swaj: well not on the end user machine that is. [23:52] jmoyers: vp marketing comes up to me [23:52] Determinist: swaj: lemme guess, you're building shit for some ASP based internal portal that's using some activeX stuff from 1996, right? :P [23:52] jmoyers: so this doesn't work in IE [23:52] systemfault: But isn't Microsoft shooting itself in the foot by adopting standards? [23:52] systemfault: (Seems like a stupid question but...) [23:52] jmoyers: bitch, i knooow that [23:52] jensn: systemfault: Probably, not that anyone minds. [23:53] hij1nx has joined the channel [23:53] swaj: Determinist: thankfully no. Most of my dev is greenfield, and I use ASP.NET MVC 3 :) [23:53] jmoyers: download chrome and get over it [23:53] swaj: for personal stuff though, I like rails and/or node :) [23:53] Determinist: swaj: at least you have that... i'd rather not use anything that requires a windows server and/or mono. [23:53] Determinist: swaj: windows server to me is an oxymoron. [23:53] jmoyers: ACTION wouldn't touch asp.net with a 10 foot pole [23:53] davidbanham has joined the channel [23:54] Determinist: windows... server - does not compute :P [23:54] swaj: I thought about installing mono on my Linode and running an ASP.NET site for shits and giggles :P [23:54] jensn: Determinist: Don't worry, it doesn't crash... much... [23:54] halfhalo: windows server 2000 advanced! [23:54] jmoyers: hey now [23:54] AvianFlu has joined the channel [23:54] jensn: Datacenter Edition! [23:54] Determinist: jensn: :D [23:54] jmoyers: nothing wrong with a windows server ;-) [23:54] swaj: IIS 7.5 is pretty damn good [23:54] jmoyers: stackoverflow.com is a microsoft stack :P [23:54] swaj: yup [23:54] swaj: 100% microsoft [23:55] jensn: jmoyers: Yes, but they even have security issues in their name... [23:55] Determinist: i like the product names... i wonder what's next, windows uber super ultra edition, just $70 per concurrently connected user :P [23:55] creationix has joined the channel [23:55] zmbmartin: niftylettuce: did you say you were using mongolian for gridfs? [23:55] MooGoo: wikipedia is written in php [23:55] halfhalo: those bastards [23:55] jmoyers: all im saying is, you can use whatever technology you want, frankly [23:55] swaj: so is Facebook :P [23:55] jmoyers: it all mostly works :-P [23:55] MooGoo: facebook is trash, never used it [23:55] Determinist: mostly [23:56] Determinist: just... almost :P [23:56] swaj: except the best part is where Facebook wrote a PHP -> C compiler :P [23:56] Marak: mediawiki is the biggest POS software [23:56] jmoyers: C++ [23:56] v8bot: jmoyers has given a beer to C. C now has 13 beers. [23:56] jmoyers: and also [23:56] MooGoo: mediawiki markup is also horrendus [23:56] jmoyers: according to some recent meetup i went to [23:56] Marak: fuck mediawiki hard, never again [23:56] jmoyers: hiphop only gives them like a 1%ish boost? [23:56] jsulak_ has joined the channel [23:56] jerrysv: hahaha [23:56] Marak: jmoyers: thats the idea, something like that [23:56] Determinist: frankly, i guess MS products are decent, if you're into BSDM. and besides, stackoverflow is stable because they have damned good programmers, not because of their platform choices [23:56] jerrysv: C wins again [23:56] Marak: jmoyers: that extra 1% is a lot for facebook [23:57] jmoyers: well shit yes [23:57] rchavik has joined the channel [23:57] MooGoo: MS products are fine [23:57] rchavik has joined the channel [23:57] jensn: jmoyers: That's pretty silly... I have heard higher numbers, but it wasn't lol-impressive either. [23:57] MooGoo: they just cost money [23:57] MooGoo: technicly [23:57] jmoyers: all im saying is, php with apc isn't all that terrible [23:57] jmoyers: its awful to look at [23:57] jmoyers: but thats about it [23:57] MooGoo: windows 7 still beats the pants off of any linux desktop [23:57] Marak: jmoyers: i know people who swear by that shit [23:57] mikey_p: i got to watch rasmus and the hiphop guy argue about PHP and performance at a meetup once, that was pretty funny [23:57] jmoyers: 5.3 even has anonymous functions :P [23:57] caolanm has joined the channel [23:57] Marak: and namespaces guys! [23:57] Marak: we finally got namespaces! [23:57] mikey_p: summary: rasmus to facebook: you're doing it wrong [23:57] swaj: I run a wordpress blog with nginx + php-fpm... it's pretty good. [23:57] jmoyers: fuck, they even have a sinatra clone! [23:57] MooGoo: and "closures" [23:58] jmoyers: http://www.slimframework.com/ [23:58] MooGoo: it's still an ugly as fuck language [23:58] jensn: mikey_p: I am pretty sure they know that they are doing it wrong. [23:58] Determinist: MooGoo: OS X ftw on the desktop, as for the server... ubuntu/debian or redhat/centos rock my world. [23:58] jensn: mikey_p: I also think they think that doing it the wrong way is worth it. [23:58] MooGoo: I used to be partial to gentoo [23:58] Marak has left the channel [23:58] systemfault: Still waiting for PHP to have a single well implemented feature. [23:58] systemfault: I still cannot find one. [23:58] swaj: I use OSX for Node/Ruby stuff... Windows for Microsoft stuff at home... and my servers are debian :P [23:58] rchavik has joined the channel [23:58] bnoordhuis: systemfault: exit() [23:59] jmoyers: php has plenty of well implemented features [23:59] Determinist: php is an abomination that will slowly die and the sooner the better. [23:59] piscisaureus has joined the channel [23:59] jensn: systemfault: Does PHP have exec()? [23:59] MooGoo: php wont die [23:59] systemfault: \i\use\backslash\as\namespace\delimiter [23:59] Determinist: MooGoo: can't a man dream, ffs? [23:59] niftylettuce: zmbmartin: yoyo [23:59] niftylettuce: zmbmartin: no, not using mongolian for gridfs, not using gridfs atm