[00:00] mwhooker: TheDahv yes [00:00] kris_will: to prevent sending up your packages [00:00] TheDahv: kris_will: that has been done [00:00] kohai: @halfageekinfo: 27c3: Node.js as a networking tool (en) http://is.gd/Lvc0Nm #javascript (link: http://javascript.halfageek.info/2011/05/27/27c3-node-js-as-a-networking-tool-en/) [00:00] TheDahv: but, unlike heroku, no.de doesn't automatically scan the package.json file on push and install the dependencies [00:00] TheDahv: Rather, it doesn't *seem* to [00:01] TheDahv: But, node_modules is already in my ignore file [00:01] MrNibbles has joined the channel [00:02] TheDahv: I am terribly tempted to install everything globally and just get going :) [00:02] kris_will: nothing wrong with that [00:03] kris_will: if it works, then just go back to vendor packages after it's fixed [00:03] mwhooker: yeah, sometimes you just gotta get stuff done [00:04] TheDahv: Is there a way to force a git push? I thought something like "git push -f joyent master" would work, but to no avail [00:05] wes2 has left the channel [00:05] kris_will: doesn't heroku compile a bundle into a package and then copy it to the slices? [00:05] migimunz2 has joined the channel [00:05] TheDahv: oh, I don't know [00:05] kris_will: so when you push it's actually doing some processing [00:05] kris_will: then copying stuff out [00:05] avalanche123 has joined the channel [00:06] kris_will: that's how it works on the ruby slices [00:06] TheDahv: Here's another thought, the main issue I ran into with heroku was that it couldn't compile the connect-mongodb library. [00:06] mwhooker: has anyone tried duostack? [00:06] TheDahv: mwhooker: got bought by dotcloud [00:06] TheDahv: dotcloud spooked me [00:06] mwhooker: http://discuss.joyent.com/viewtopic.php?id=28826 [00:06] TheDahv: anyway, connect-mongodb was supposed to handle sessions for me [00:06] mwhooker: that's about the mongo driver [00:07] TheDahv: Is that still the right way to manage authentication [00:07] TheDahv: ? [00:07] TheDahv: node moves so fast, it's hard to tell which blogs/articles are still valid [00:07] mwhooker: yeah [00:07] mwhooker: that post is from 2 weeks ago [00:07] tilgovi has joined the channel [00:07] tilgovi has joined the channel [00:07] Guest74734 has joined the channel [00:08] mwhooker: also heroku is now salesforce. did you have a bad experience with dotcloud? [00:08] TheDahv: I never got started with dotcloud (eg, "spooked") [00:08] kris_will: so far salesforce hasn't imposed any tech on heroku, as far as I can tell [00:09] TheDahv: I think heroku spoiled me. The onboarding process is so simple. You don't worry about billing or long-term implications [00:09] TheDahv: You just get started and go [00:09] s00pcan has joined the channel [00:09] TheDahv: You worry about billing and $$$ later if you decide you like it [00:09] kris_will: yeah for devs it's great [00:09] kris_will: easy staging in production env [00:09] TheDahv: dotcloud started mentioning things about billing, but only vaguely [00:09] TheDahv: and then I couldn't find any solid info about the costs of trying dotcloud [00:10] TheDahv: so without any info, i felt spooked out of trying it out [00:10] s00pcan_ has joined the channel [00:10] Tobsn has joined the channel [00:10] TheDahv: I think the only reason I got a node coupon was that joyent seems to not support certain characters in their passwords and the sign up process was breaking for me [00:10] cjm has left the channel [00:10] TheDahv: I guess I got a pity coupon [00:10] zhami has joined the channel [00:10] mwhooker: heh [00:11] cjm has joined the channel [00:11] kris_will: this guy couldn't figure out dotcloud costs either: http://www.theroamingcoder.com/node/113 [00:11] mwhooker: feels like it needs some polish [00:11] amerine has joined the channel [00:11] gerard0 has joined the channel [00:12] kohai: @juanleung: Todavía no existe una buena buen módulo de node.js para ms sqlserver, x lo tanto el polling seguirá siendo polling :s [00:13] migimunz has joined the channel [00:13] darshanshankar has joined the channel [00:13] stonebranch has joined the channel [00:14] TheDahv: kohai: porque necesitas mssql? [00:15] TheDahv: no creo que node.js funciona bien en windows [00:15] kris_will: this is the only tds stuff I could find for MSSQL https://github.com/orenmazor/node-tds [00:17] TheDahv: ugh, so I still get the npm issues with no.de [00:19] Corren has joined the channel [00:20] gerard0 has left the channel [00:21] whiteybulger has joined the channel [00:21] kohai: @mde: Hacking on FileList for Jake. Next up: integrate with PackageTask, start building NPMPackageTask. #nodejs #javascript [00:22] gerard0 has joined the channel [00:22] shajith_ has joined the channel [00:22] deedubs_ has joined the channel [00:23] migimunz2 has joined the channel [00:25] TheDahv: the world seems to explode with this package http://search.npmjs.org/#/connect-mongodb [00:25] TheDahv: both on heroku and on no.de [00:25] davidban_ has joined the channel [00:25] TheDahv: somebody posted a related link [00:26] TheDahv: I think anyway... [00:26] TheDahv: Has anybody else experienced issues with connect-mongodb? [00:28] michaelhartau has joined the channel [00:32] F1LT3R has joined the channel [00:33] mikeal: hrm [00:33] Melkor_ has joined the channel [00:34] whiteybulger has left the channel [00:35] telemachus: Am I crazy or might node return items in an array out of order in a for loop? [00:36] telemachus: I should say "from a for loop"... [00:37] a2800276 has joined the channel [00:37] tanepipe1 has joined the channel [00:38] igl1: you are doing it wrong [00:38] telemachus: igl1: I don't doubt it [00:39] mikeal: you can't iterate over an array that way [00:39] telemachus: That is, I know that I shouldn't want to use a for loop, but I have three things that I want printed in just that order 1, 2, 3 [00:39] Opaque has joined the channel [00:39] mikeal: arrays in javascript aren't real arrays, they are sparse arrays because they are just a hack on objects [00:39] telemachus: mikeal: hmm [00:39] telemachus: it's pretty common in client-side JS, no? [00:39] igl1: whats the matter with for? [00:40] telemachus: I am using for [00:40] igl: its fine to use arrays [00:40] igl: what do you mean with out of order? [00:40] dane_: hey guys - why in the require do people sometimes do this: var _ = require('underscore')._ [00:41] dane_: whats the ._ at the end used for [00:41] mikeal: telemachus: nope, you don't do it that way [00:41] mikeal: you have to do [00:41] telemachus: igl, I mean that roughly 2-3 times out of 5, the 0th element comes second [00:41] telemachus: not first [00:41] dane_: I've also seen var mongoose = require('mongoose').Mongoose [00:41] mikeal: for (var i=0;i import Scripting ImportError: No module named Scripting [01:15] tahu has joined the channel [01:17] hij1nx has joined the channel [01:18] cafesofie has joined the channel [01:18] supakow has joined the channel [01:20] zhami has joined the channel [01:20] kohai: @stojanovic: Joyent's Node.js Cloud Service is elegant and who doesn't like git-based deployment? Simple is beautiful. http://t.co/ySTbQi7 (link: https://no.de/) [01:20] kohai: @tennety: Installed node.js locally, wondering how to get started. Anyone know of any node-koans? Cc @rubybuddha [01:21] mscdex: Ec2User: what version of python? [01:23] supakow: newb here - trying to upload a single image and display it from POST. I can upload but can't figure out how to get POST. I know how to pass to Jade. Anybody got some simple code they can share? [01:24] mscdex: !tweet @tennety http://bit.ly/fC4wF8 http://bit.ly/aOjkoI http://bit.ly/eDdYBL http://bit.ly/hKeeNJ http://bit.ly/8WY5bA [01:24] ryanfitz has joined the channel [01:25] ryan[WIN] has joined the channel [01:26] mscdex: supakow: i'm not sure what you mean, perhaps you have existing code you could gist? [01:26] kohai: @NodeKohai: @tennety What are you interested in building? [01:26] mscdex: aw man, nodekohai doesn't like me [01:26] mscdex: :( [01:27] AvianFlu: mscdex, try again [01:27] AvianFlu: I whitelisted you [01:27] jgautier has joined the channel [01:27] mscdex: !tweet @tennety http://bit.ly/fC4wF8 http://bit.ly/aOjkoI http://bit.ly/eDdYBL http://bit.ly/hKeeNJ http://bit.ly/8WY5bA [01:27] kohai: @NodeKohai: @tennety http://bit.ly/fC4wF8 http://bit.ly/aOjkoI http://bit.ly/eDdYBL http://bit.ly/hKeeNJ http://bit.ly/8WY5bA (link: http://nodebeginner.org/) [01:27] mscdex: \o/ [01:27] sudhirjonathan has joined the channel [01:27] AvianFlu: there you go [01:27] mwhooker has joined the channel [01:27] mscdex: i thought Marak added me earlier [01:27] mscdex: :s [01:28] AvianFlu: the config file may have been replaced at one point [01:28] mscdex: ah [01:28] AvianFlu: it's hard to say [01:29] madsleejensen has joined the channel [01:29] mwhooker has joined the channel [01:30] kohai: @goatslacker: Working on a #nodejs modules sync client for use with #npm https://github.com/goatslacker/nms [01:37] amerine has joined the channel [01:38] abraxas has joined the channel [01:40] supakow: mscdex: https://gist.github.com/295773bc2d326d780f76 [01:41] kohai: @fcarriedo: Immersing myself in the promise lands of Scala, Node.js and backbone.js. Some coffescript to stay alert please. [01:44] jtsnow has joined the channel [01:44] davidban_ has joined the channel [01:45] kohai: @rickasaurus: Node.js + Coffeescript isn't all that bad for whipping up a front end for a data view. It's nice to leave behind the framework overhead. [01:46] kohai: @mikebz: @openshift can I install Node.js on express? [01:47] liar has joined the channel [01:52] mscdex: supakow: by default files are uploaded to /tmp so you'll have to move them into a public directory [01:53] supakow: mscex: did that in connect-form [01:53] mscdex: supakow: there is a way to specify an upload directory other than /tmp, but i'm not sure how you'd do that through connect-form, since it's really a node-formidable option which connect-form uses underneath [01:53] Adman65 has joined the channel [01:54] mscdex: supakow: where? [01:54] supakow: mscdex: correction - did that in node-formidable/lib/incoming_form.js [01:54] supakow: mscdex: this.uploadDir = 'public/uploads'; [01:55] JoshC1 has joined the channel [01:57] mscdex: supakow: and it's not saving it to that directory? [01:57] tanepiper has joined the channel [01:57] supakow: mscdex: it's saving to the dir. if I save a specified file (e.g. 66.jpg) it will display it b/c i've hardcoded that response to work [01:58] kohai: @Joe_Wegner: @ScottWegner C++ , which is nice, because Node.js has a C++ module for even more advanced projects. [01:58] supakow: mscdex: also works for other file types (3gp, etc) provided they're in the right DOM element (video) [01:58] mscdex: supakow: well the file's name is in the `files` variable [01:58] mscdex: supakow: `files[fieldName].name` [01:59] supakow: mscdex: right. tried files.uploadedFile (name of my form input) but no dice [01:59] supakow: mscdex: ah, syntax. why haven't i seen it like that elsewhere? [01:59] supakow: mscdex: trying that now [02:00] mscdex: supakow: well, i mean if you know the literal name of the field you can use dot syntax too, like: files.familyPhoto.name [02:00] mscdex: supakow: otherwise for bracket syntax it'd be: files['familyPhoto'].name [02:01] supakow: mscdex: yeah - ReferenceError: uploadedFile is not defined. trying 'familyPhoto' example now [02:01] mscdex: supakow: you can also do `console.dir(files)` to see the structure [02:02] supakow: mscdex: imgUrl: fields['uploadedFile'].name yields TypeError: Cannot read property 'name' of undefined [02:02] mscdex: mscdex: no, you want files, not fields [02:03] mscdex: ha [02:03] mscdex: supakow: no, you want files, not fields [02:03] mscdex: man this cold is killing me [02:04] niles|iPod has joined the channel [02:04] supakow: mscdex: i think that did it [02:05] stagas has joined the channel [02:06] kohai: @tennety: @NodeKohai thanks! All of these look promising. Starting with the first for now. [02:07] supakow: mscdex: thx a bunch. I was definitely doing that the hard way. [02:08] mscdex: supakow: cool [02:10] supakow has left the channel [02:11] kohai: @github_js: m2node - mongrel2 handler for node.js http://bit.ly/jU7akg (link: https://github.com/dan-manges/m2node) [02:11] digiwano: whee docs and tests [02:11] pandeiro has joined the channel [02:14] brownies has joined the channel [02:16] brownies has left the channel [02:16] brownies has joined the channel [02:21] darshanshankar has joined the channel [02:24] wookiehangover has joined the channel [02:25] jdalton has joined the channel [02:25] jdalton has left the channel [02:25] kohai: @aAmalia: “@github_js: m2node - mongrel2 handler for node.js http://t.co/7hoXRRc” (link: https://github.com/dan-manges/m2node) [02:26] kriszyp has joined the channel [02:28] dguttman has joined the channel [02:29] kohai: @jQueryBot: via @recenturl http://bit.ly/jQXoCT coderwall Have at least one jquery, prototype, or node.js repo with commitsHave at least three o... (link: http://coderwall.com/miyagawa) [02:29] _jgr has joined the channel [02:33] nornagon_ has joined the channel [02:35] ParadoxQuine has joined the channel [02:36] dget has joined the channel [02:36] gsmcwhirter: what is the best way to clone/copy an object? I thought Object.create(template) might give me a copy, but it just gives me a blank object back [02:37] gsmcwhirter: I would guess it is something simple, but I am stuck [02:38] swaj: http://stackoverflow.com/questions/122102/what-is-the-most-efficient-way-to-clone-a-javascript-object [02:40] niftylettuce has joined the channel [02:40] swaj: sadly, there's no way built into javascript [02:41] gsmcwhirter: swaj, =( thanks for the answer though [02:41] mscdex: gsmcwhirter: i use jquery's extend function [02:42] perezd has joined the channel [02:42] swaj: yeah [02:42] swaj: that's what the most common case seems to be [02:42] mscdex: gsmcwhirter: https://github.com/mscdex/node-imap/blob/master/imap.js#L1232 [02:42] swaj: in the question I linked, John Resig actually answered it pointing to extend to do both shallow and deep copies [02:43] gsmcwhirter: thanks. mscdex and swaj [02:47] materialdesigner has joined the channel [02:48] dnuke has joined the channel [02:49] gf3: you could also use proto [02:49] bradleymeck has joined the channel [02:51] gsmcwhirter: gf3, how would that work? the object is just a simple one holding strings etc. that was grabbed from JSON [02:51] chjj: they wouldnt be own properties if you used __proto__ [02:52] b3funk has joined the channel [02:53] brweber2 has joined the channel [02:53] timmywil has joined the channel [02:57] tahu has joined the channel [03:00] igl: for (key in obj) < global var called key, that will be a fun bug hunt later on :) [03:02] briznad has joined the channel [03:04] raydeo has joined the channel [03:07] pen has joined the channel [03:09] bradleymeck has joined the channel [03:11] ryanfitz has joined the channel [03:14] jacobolus has joined the channel [03:15] Twelve-60 has joined the channel [03:17] perezd has joined the channel [03:18] ryanfitz has joined the channel [03:18] materialdesigner has joined the channel [03:19] raidfive has joined the channel [03:19] Adman65 has joined the channel [03:20] [[zz]] has joined the channel [03:20] copongcopong has joined the channel [03:22] amerine has joined the channel [03:27] arthur_kalm has joined the channel [03:30] hafthor has joined the channel [03:33] kohai: @mackmgg: @arnoldkim You should make a cool Node.JS powered version of MacRumors Live, that would be awesome [03:34] jerrysv has joined the channel [03:34] brraaains has joined the channel [03:39] Spion_ has joined the channel [03:39] mawkor2: brraaains! [03:39] mawkor2: http://www.dailymotion.com/video/xb7uon_doctor-who-waters-of-mars-part-4_travel [03:39] mawkor2: best scene ever imo [03:40] jtsnow has joined the channel [03:40] goatslacker has joined the channel [03:43] mbrevoort has joined the channel [03:44] perlmonkey2: Anyone have an idea why I'd be getting the error on line 11 when doing an npm install on node-expat? http://pastebin.com/gaSQmY2k [03:46] ccarter has joined the channel [03:46] kohai: @acostoss: @disassemblyline Yeah, I have node.js for use with Zeon, @Gargron's open source forum project that I am testing, so I'll give it a look. [03:49] perlmonkey2: Anyone had trouble installing node-expat with npm? [03:56] perlmonkey2 has left the channel [03:56] perlmonkey2 has joined the channel [03:56] bradleymeck has joined the channel [03:57] ccarter has left the channel [03:57] brraaains: mawkor2: have you seen the weeping angels episode yet? [03:57] drudge: https://github.com/conceited/linkinus2-bitcoin-otc-gpg-auth-plugin/ [03:59] kohai: @reiot: 아.. 최신 JSLint 가 for 문에 var 선언을 완강하게 거부하고 있다... 이 정도면 용역과 경찰을 투입해야 될 정도!! 그나저나 요즘 Textmate 자바스크립트 번들들은 node.js 가 기본이구나. [04:00] brraaains: from the matt smith era to be more specific [04:01] hij1nx has joined the channel [04:01] sh1mmer has joined the channel [04:03] matjas has joined the channel [04:07] c4milo has left the channel [04:07] Opaque has joined the channel [04:12] brownies has joined the channel [04:14] jzacsh: perlmonkey2: do you have the expat library installed? [04:16] perlmonkey2: jzacsh: hah, that might be my problem. I'll look :) [04:17] algoseeker has joined the channel [04:17] jzacsh: perlmonkey2: if it can't find the header for that library, that very well may mean you just dont' have the lib installed. [04:18] perlmonkey2: I didn't even know I needed the expat library installed. Had never heard of it before so thought it was just a node npm module. [04:19] Aria: Nope. It's the oldest, simplest, streaming/evented XML parser. [04:19] perlmonkey2: jzacsh: heh, yum install expat-devel; npm install node-expat; success. You rawk. [04:20] jzacsh: :) [04:20] Marak has joined the channel [04:22] azeroth_ has joined the channel [04:23] algoseeker has left the channel [04:24] SvenDowideit has joined the channel [04:26] bradleymeck has joined the channel [04:31] coderendezvous has joined the channel [04:31] themiddleman has joined the channel [04:31] br- has joined the channel [04:32] kohai: @mackmgg: @joshuatopolsky You should use Node.JS for the WWDC liveblog. Instant live updates ftw! [04:32] boehm has joined the channel [04:35] hasenj has joined the channel [04:35] jzacsh: is this an appropriate place to ask express.js stuff? [04:37] hij1nx has joined the channel [04:40] gsmcwhirter: jzacsh, i don't see why not [04:40] perlmonkey2: Anyone doing anything with calipso? [04:41] mustalac has joined the channel [04:44] rictic has joined the channel [04:45] michaelhartau has joined the channel [04:47] mscdex: jzacsh: this is the best place really [04:49] jzacsh: okey doke, thanks :) [04:54] jrmiddle has joined the channel [04:55] johnnywengluu_ has joined the channel [04:56] jrmiddle has left the channel [04:56] themiddleman has joined the channel [04:57] jrmiddle has joined the channel [04:57] kohai: @vshkurin: 7 Free E-Books and Tutorials for Learning and Mastering Node.js http://rww.to/kSk51G #nodejs (link: http://www.readwriteweb.com/hack/2011/04/6-free-e-books-on-nodejs.php) [04:58] kohai: @jackhq: Just updated Cupcake to v0.0.8, Cupcake now includes new the NodeJS Framework http://search.npmjs.org/#/coffeemate #nodejs #coffeescript [04:58] c4milo has joined the channel [04:59] tahu has joined the channel [05:02] sreeix_ has joined the channel [05:02] jzacsh: ACTION throws highfive at self [05:03] jzacsh: '\o [05:05] rchavik has joined the channel [05:06] johnnywengluu__ has joined the channel [05:12] ion- has joined the channel [05:12] rfay has joined the channel [05:14] Lorentz has joined the channel [05:16] brownies has joined the channel [05:18] darshanshankar has joined the channel [05:19] Aria has joined the channel [05:20] sh1mmer has joined the channel [05:25] kris_will has joined the channel [05:27] kohai: @shell_sillo: @combacsa node.js 프론트엔드와 Python 백엔드를 이어주려고 하는데 thrift 를 쓰는건 어떤가요? 현재 아라 구조와 비슷해질 거 같습니다만? [05:30] kohai: @maxogden: i want to rewrite http://managingnews.com as a couchapp with node.js flavored @mapbox. that's some peanut butter and chocolate right there [05:32] kohai: @combacsa: @shell_sillo 이미 존재하고 있는 Python Server-side Code 를 Thrift 를 이용하여 Middleware 화 하고 node.js 를 Frontend 로 쓰는 건가요? 단순히 DB 연동이 목적이라면 MongoDB 가 대세. [05:33] SubStack: hmm [05:36] kohai: @j2labs: Hmm... turntable.fm might be a node.js site. socket.io in some error output (cc @TheRightChoyce) [05:38] c4milo has joined the channel [05:39] kohai: @combacsa: @shell_sillo 원하는 것이 node.js 의 여러 강점을 이용하는 웹서버 개발이라면 @drypot 님이 요즘 요 며칠 내내 올리시는 트윗들이 node.js 와 MongoDB 에 대한 이야기들이니 참고면 좋겠습니다. [05:40] rubydiamond has joined the channel [05:42] kohai: @shell_sillo: @combacsa 예전에 짜놓은 파이썬 코드를 웹서버에 붙여보고 싶어서요. 물론 이런저런 경험도 해 볼겸 node.js 같은거와 연동해 보려고 하는 겁니다. 공부용 시험기? 인 셈이죠. [05:42] kris_will: seriously? [05:46] kohai: @combacsa: @shell_sillo 5일차 : Thrift 와 supervisor 를 이용한 기존 파이썬 서버사이드 코드 MiddleWare 화 / 6일차 : web.py or Flask + Thrift / 7일차 : node.js + Thrift 아름다운 1주일 [05:46] rubydiamond has joined the channel [05:47] ryanfitz has joined the channel [05:49] rubydiamond has joined the channel [05:49] rubydiamond has joined the channel [05:52] kohai: @AkitaOnRails: If you're a Rubyist and is shrugging with some node.js envy, Good old Eventmachine comes to the rescue :-) http://bit.ly/ma3Yjo #peepcode (link: http://peepcode.com/products/eventmachine) [05:52] rubydiamond has joined the channel [05:54] kohai: @shell_sillo: @drypot 특정 파이썬 패키지에 (연산/data plotting) 의존적이라 '이 부분'은 일반 파이썬 코드로, 웹 엔진 관련 부분은 web.py 대신 node.js (nowjs) 로 구성해보려고 합니다. 합리적인 구조인가요?? @combacsa [05:54] charlesjolley- has joined the channel [05:54] dominictarr has joined the channel [05:58] jmoyers: some korean nodesters [05:59] mwhooker has joined the channel [05:59] mwhooker has joined the channel [06:00] systemfault: I love node :D [06:00] systemfault: That's every twitter feeds about node? [06:02] systemfault: Made a test, it's not real time :P [06:02] kris_will: not sure what they are talking about. the google translate isn't very good with korean [06:03] sreeix has joined the channel [06:04] sh1mmer has joined the channel [06:04] hasen has joined the channel [06:05] kohai: @sreeix: Simple Bloom filter (http://t.co/tRW0LMJ) implemented on Redback #nodejs #redis #javascript http://t.co/eQVJvFZ (link: http://en.wikipedia.org/wiki/Bloom_filter) [06:06] jmoyers: it is real time [06:06] jmoyers: it has rate limiting [06:06] jmoyers: uses streaming api if im not mistaken [06:07] systemfault: That's cool [06:07] systemfault: Then it probably skipped my test because it's a stupid message :/ [06:07] jmoyers: it has a similarity filter [06:11] kohai: @goatslacker: Siesta - Create simple RESTful services in #nodejs https://github.com/goatslacker/siesta [06:12] jacobolus has joined the channel [06:18] philtor has joined the channel [06:22] openpercept has joined the channel [06:25] mustalac has joined the channel [06:27] dget has joined the channel [06:30] aurynn has joined the channel [06:32] devrim has joined the channel [06:33] snearch has joined the channel [06:34] xeodox has joined the channel [06:38] jzacsh: kohai: hai [06:41] JakeyChan has joined the channel [06:48] openpercept has joined the channel [06:50] jmoyers: kohai is a bot, sir [06:50] jmoyers: he no longer denies it [06:51] _jgr has joined the channel [06:53] jesusabdullah: dominictarr: testbedjs looks fuckin' sweet! Do you live in the bay area or are you just visiting? [06:53] Emmanuel__ has joined the channel [06:54] kohai: @shell_sillo: 우선은 알고리즘 설계부터 다시 하고... web.py 로 먼저 구현부터 해봐야겠다. 일단 형체가 갖춰지면 NoSQL (Cassandra/MongoDB), node.js frontend 같은걸 하나둘 달아봐야지. [06:56] dget has joined the channel [06:56] jonaslund: . [06:57] mikeal has joined the channel [06:57] ngs has joined the channel [06:57] mikeal1 has joined the channel [06:58] JakeyChan: kohai: ... [06:59] simenbrekken has joined the channel [06:59] kohai: @kelmiyashiro: @maxogden What's node.js flavored mapbox? livetile.js? [07:00] SamuraiJack has joined the channel [07:03] secoif has joined the channel [07:03] killfill has joined the channel [07:04] dominictarr: jesusabdullah: i'm visiting. here another 3 weeks! [07:05] sudhirjonathan has joined the channel [07:06] sh1mmer has joined the channel [07:06] mendel_ has joined the channel [07:08] jesusabdullah: dominictarr: Shit, I think I'll just miss you by a week! [07:08] jzacsh: jmoyers: idk, i think not denying it means responding. [07:08] jzacsh: kohai: hai! [07:09] jzacsh: ACTION is not impressed with bot. [07:09] jmoyers: he used to [07:09] jmoyers: ACTION shrugs [07:09] jmoyers: god damn [07:09] jmoyers: recently i've seen ~something.indexOf(somethingElse) [07:09] jxck has joined the channel [07:09] jmoyers: that... doesnt work [07:10] jmoyers: v8: console.log('is this thing on?'); [07:10] McMAGIC--Copy has joined the channel [07:10] v8bot: jmoyers: "is this thing on?" [07:10] dominictarr: I'll probably be back sooner or later, the bay area is awesome. [07:10] jesusabdullah: :) [07:10] jmoyers: v8: var a = ['test', 'two']; console.log(~a.indexOf('test')); [07:10] v8bot: jmoyers: -1 [07:10] jmoyers: doesn't work for 9 [07:10] jmoyers: err 0 [07:11] jmoyers: oh wait, nm [07:11] jmoyers: im an idiot~! [07:11] jesusabdullah: Just spent a bunch of time with my family. Dad's cousin joked, "when you come to your senses and realize California sucks..." [07:11] jesusabdullah: XD [07:11] jzacsh: jmoyers: what does the tilda do for javascript? [07:12] jmoyers: ones compliment [07:12] jmoyers: just like most things [07:12] jmoyers: im pretty sure anyway [07:12] jzacsh: interesting. [07:12] jmoyers: for indexOf its convenient because normally a miss return -1 [07:12] jmoyers: and thats not falsy [07:12] jmoyers: so you cant say [0,1,2,3].indexOf(5) [07:12] jmoyers: alone [07:12] gavin_huang has joined the channel [07:12] jmoyers: you'd have to say == -1 [07:13] jmoyers: with ~, you can get a falsy value for -1, since ~(-1) == 0 [07:13] jzacsh: -1 isn't falsy?.. [07:13] dominictarr: is your family in california? [07:13] jmoyers: nope [07:13] jzacsh: ACTION hasn't finished reading "good parts" book. [07:13] SubStack: jesusabdullah: get down to cali already! [07:13] dominictarr: ~-1 is falsy though! [07:14] jmoyers: v8: if([0,1,2,3].indexOf(5)){ console.log('you are magical'); } else { console.log('babies are crying'); }; [07:14] v8bot: jmoyers: "you are magical" [07:14] dominictarr: you need more magic: [07:14] dominictarr: v8: if(~[0,1,2,3].indexOf(5)){ console.log('you are magical'); } else { console.log('babies are crying'); }; [07:14] jmoyers: heh [07:14] jmoyers: think operator precedence there [07:14] jmoyers: but yes, ~ is magical for that [07:14] dominictarr: v8: if(~([0,1,2,3].indexOf(5))){ console.log('you are magical'); } else { console.log('babies are crying'); }; [07:15] jzacsh: dominictarr: i don't think v8 likes you calling it " v8" [07:15] dominictarr: v8: if(~([0,1,2,3].indexOf(5))){ console.log('you are magical'); } else { console.log('babies are crying'); }; [07:15] v8bot: dominictarr: "babies are crying" [07:15] jmoyers: :-) [07:15] dominictarr: stupid robot [07:15] jesusabdullah: SubStack: Working on it!! [07:16] jesusabdullah: dominictarr: My family's in Alaska. Things are very different here in some ways [07:16] dominictarr: I bet! [07:16] dominictarr: Alaska is the end of the road. [07:17] dominictarr: thats where crazy people go to live, when they realize california sucks. [07:17] m00p has joined the channel [07:17] jmoyers: my sister is crazy [07:17] jmoyers: and she moved from cal to alaska [07:17] jmoyers: so, theory confirmed [07:18] dominictarr: totes. [07:19] Druide_ has joined the channel [07:19] killfill has joined the channel [07:21] steffkes has joined the channel [07:21] jacobolus has joined the channel [07:22] jesusabdullah: Haha, it's so true [07:23] jesusabdullah: Alaska is where you move when to you just don't give a fuck anymore [07:27] hachque has joined the channel [07:29] xeodox has joined the channel [07:29] dominictarr: yeah, and want to get away from people who do. [07:29] mikeal has joined the channel [07:31] Rodtusker has joined the channel [07:34] abraxas has joined the channel [07:35] fangel has joined the channel [07:35] m00p has joined the channel [07:35] abraxas: Does anybody know what logic is applied in choosing new versions of V8 for NodeJS? [07:36] seivan has joined the channel [07:37] __tosh has joined the channel [07:37] tomtomaso has joined the channel [07:38] mendel_: do you guys recommend a service to enable creditcard payments in my app? [07:39] chiyam has joined the channel [07:39] mendel_: without a paypal/ google checkout account [07:40] jmoyers: i am a big ass fan of braintree [07:40] jmoyers: http://www.braintreepayments.com/ [07:40] jmoyers: i use it in production, and have found their api to NOT suck, which is uncommon for payment processors [07:41] mendel_: jmoyers: US only... [07:41] jmoyers: ACTION is in the us [07:41] jmoyers: sorry ;-) [07:42] mendel_: haha I'm not, looks like a nice service but I'm in europe, thnx anyway [07:44] garrensmith has joined the channel [07:46] petrjanda has joined the channel [07:50] a2800276 has joined the channel [07:51] tmedema has joined the channel [07:52] msucan has joined the channel [07:53] nuba has joined the channel [07:55] tahu has joined the channel [07:55] jmoyers: damn network graph has been broken for me for the last 2 days [07:56] __doc__ has joined the channel [07:58] nuba has joined the channel [08:00] darshanshankar has joined the channel [08:03] dnuke has joined the channel [08:03] nuba has joined the channel [08:06] tahu has joined the channel [08:09] jacter has joined the channel [08:13] temp01 has joined the channel [08:13] herbySk has joined the channel [08:13] openpercept has joined the channel [08:15] mraleph has joined the channel [08:17] sWORDs: What would be the best way to build a true dynamic webpage? I want to give the layout from a database using websocket, but what would be the smartest way to build up the html? [08:17] chapel: `v git jadeify @ sWORDs [08:18] v8bot: sWORDs: substack/node-jadeify - GitHub - https://github.com/substack/node-jadeify [08:18] SubStack: work in progress though [08:18] tmedema: With socket.io, is there an event fired on the client side when it is not capable of using any of the allowed transport types? [08:19] SubStack: I'll probably write a microjade clone at some point so I can update attributes on the fly like weld [08:19] sWORDs: I'll have a look at it. Anyone interested in what I'm trying to do? [08:20] tmedema: sWORDs: you let javascript dynamically pull the page's contents? That's horrible for SEO [08:20] springify has joined the channel [08:21] sWORDs: tmedema, or build the page dynamicly on the server and just send updates with websocket [08:21] casperionx has joined the channel [08:21] casperionx: hey all [08:21] tmedema: sWORDs: well that's nothing new, you can just use express or something [08:21] SubStack: or write code using server-side templates then flip a switch and have the rendering take place browser-side [08:21] openpercept has joined the channel [08:22] casperionx: was wondering if anyone has any exposure to socket calling socket [08:22] sreeix_ has joined the channel [08:22] digman543 has joined the channel [08:22] sWORDs: tmedema: No, not new, but very difficult in my case. [08:22] kohai: @bergie: thanks @sh1mmer, was fun playing Power Grid. Looking forward to chatting Node.js and CoffeeScript also in the future [08:23] sWORDs: Substack: Could you explain what you mean with server-side templates then flip a switch? [08:24] SubStack: like github's file viewer [08:25] skm has joined the channel [08:25] sWORDs: SubStack: Will it be possible to use CSS3 HTML5 and jquery with jadeify? [08:25] gozala has joined the channel [08:26] SubStack: jadeify already uses jquery [08:26] sWORDs: Just saw that and saw who's the author ;) [08:26] SubStack: jadeify() returns a jquery handle [08:27] SubStack: and if you pass in a jquery or dom handle in the variables list it does magic outerHTML stringification for you [08:27] SubStack: so it just works™ [08:27] tomtomaso has joined the channel [08:28] casperionx: Im trying to pipe two users from a chat to another server, I was looking at the code ryna used in his blog a little while back explainging pipe - but I cant seem to get it to work [08:29] SubStack: gist what you have [08:31] casperionx: yup one sec [08:32] casperionx: pastebin.com/hwNhr1SC [08:32] casperionx: http://pastebin.com/hwNhr1SC [08:32] tomtomaso has joined the channel [08:32] casperionx: its a bit ugly [08:32] ditesh|cassini has joined the channel [08:33] casperionx: hell its VERY ugly, but im trying to figure out a way to do this, so the second server can handle game work [08:33] ryan[WIN] has joined the channel [08:34] seivan has joined the channel [08:35] tahu has joined the channel [08:35] mscdex: casperionx: you're sending \n\r in the welcome message :P [08:35] casperionx: yeah i know lol [08:36] casperionx: as i said bro...its fuygly code...but should work [08:38] mscdex: so then what's the actual problem? [08:38] _aron has joined the channel [08:38] mscdex: what's happening/not happening? [08:39] casperionx: If Im working piping correctly, I should be piping the two user sockets when called by "game:username1|username2|gametype" [08:39] casperionx: to the second server...but doesnt seem to be working as I invisioned it [08:39] TomY has joined the channel [08:43] casperionx: perhaps Im doing it all wrong [08:43] d0k has joined the channel [08:44] casperionx: basically Im assuming that when I pipe something (like socket.pipe(socket_currently_in)) [08:44] casperionx: it gets sent to that particular socket [08:44] kuya has joined the channel [08:45] mscdex: why are you setting game_listing.player_a twice? [08:45] mscdex: twice in a row [08:46] killfill has joined the channel [08:46] synkro has joined the channel [08:47] casperionx: should be the second one player_b [08:47] casperionx: it is in my current code [08:47] mscdex: can you gist your current code? :s [08:48] mscdex: also i'm curious as to why you chose to not use something like json for client comm [08:49] robhawkes has joined the channel [08:49] casperionx: its not getting handled by the web...yet [08:50] casperionx: hence why no json, less typing for me to do on the command line [08:50] sh1mmer has joined the channel [08:51] casperionx: heres the new pastebin... [08:51] casperionx: http://pastebin.com/zHgrHZhG [08:52] pplante has joined the channel [08:52] casperionx: that errors though [08:52] vdemedes has joined the channel [08:52] casperionx: and breaks [08:52] mscdex: shouldn't line 19 be ref_data[1] ? [08:53] seivan has joined the channel [08:53] Xano has joined the channel [08:53] aurynn has joined the channel [08:54] AhtiK has joined the channel [08:54] cognominal has joined the channel [08:54] casperionx: Yeah your right, fixed that [08:55] casperionx: still dummy spits [08:56] materialdesigner has joined the channel [08:57] casperionx: hmm [08:58] pen has joined the channel [08:58] temp01 has joined the channel [08:59] gozala1 has joined the channel [09:01] casperionx: says that playera.socket.pipe playera is undefined [09:01] hojberg has joined the channel [09:01] casperionx: heres the updated code [09:01] ph^ has joined the channel [09:01] mscdex: casperionx: yeah i saw that [09:01] casperionx: http://pastebin.com/m6qXC5YF [09:02] casperionx: I should be able to pipe from one user to another if I read the details correctly [09:02] `3rdEden has joined the channel [09:02] kohai: @BestManEver: Playfish using Jetty to feed flash. Looking at node.js as event driven model better than blocking threads that are so noticeable. Google V8 [09:05] synkro has joined the channel [09:05] boehm has joined the channel [09:05] coreb has joined the channel [09:06] gozala has joined the channel [09:06] hybsch has joined the channel [09:06] stephank has joined the channel [09:08] eldar has joined the channel [09:09] sreeix_ has joined the channel [09:10] mscdex: casperionx: also why is the game server sending itself its own data? [09:11] casperionx: where you seeing that? [09:11] mscdex: socket_game.on("data" .... [09:12] temp01 has joined the channel [09:14] killfill has joined the channel [09:15] casperionx: ahh i see your meaning. [09:15] mscdex: who is it that's connecting to server_game ? [09:15] dall has joined the channel [09:16] dall: hello everybody! [09:16] casperionx: both user a and user b [09:16] casperionx: for example [09:16] casperionx: it would be called: [09:16] casperionx: game:casper|megatron|standard [09:16] casperionx: so casper and megatron would get sent to the game server for the game to be played [09:16] coreb1 has joined the channel [09:16] tomtomaso has joined the channel [09:18] dall: guys, I'm starting with NodeJS, I have a "basic" question about it...... can i use pure javascript in NodeJS or do i have to use any frameworks like jquery or montools? thank you! [09:18] vdemedes has left the channel [09:19] casperionx: from what i can see [09:19] tomtomaso has joined the channel [09:19] casperionx: the second server isnt even getting called [09:19] killfill has joined the channel [09:20] mscdex: dall: you can use pure javascript [09:20] dall: mscdex, perfect! thank you [09:21] dall: other questions.... is there a book about nodejs? I would like to study it from the fundamentals [09:22] casperionx: there is one from orielly, but its not dead tree till later this year [09:23] abraxas: dall: NodeJS is very easy to use. It really takes you only a few days to get the hang of Node. [09:23] dall: ok [09:23] mscdex: dall: take a look at these links: http://nodebeginner.org/ http://nodetuts.com/ http://www.youtube.com/watch?v=jo_B4LTHi3I http://nodeguide.com/ http://howtonode.org/ [09:23] dall: ooh thank you! ... i will save these urls :) [09:23] kohai: @mgeorgi: @nddrylliog @jensnockert you need linux-tick-processor, i will check it in and add a profile script http://bit.ly/mxMu2r #jsmad #v8 #nodejs (link: http://code.google.com/p/v8/source/browse/branches/3.3/tools/linux-tick-processor) [09:25] casperionx: Ok, Im gonna scrap that code altogether mscdex, Im gonna start afresh, but I guess what im trying to really do here is, how can I use pipe to pass a socket to another server or at least pass data to another server and pass it back again modified... [09:25] dall: oh man these very usefull! thanks [09:26] tomtomaso has joined the channel [09:26] mscdex: casperionx: are these servers going to be on the same machine? [09:26] mscdex: in the same process? [09:26] casperionx: Yeah [09:26] mscdex: then why use two servers? [09:26] casperionx: Hmm, fair point [09:27] casperionx: ok technology for technologies sake = not a good idea [09:27] mscdex: heh [09:27] kohai: @vidmantas: 1 more place to deploy your simple Rails or Node.js app extremely easily (and free for 1 instance!) www.duostack.com [09:32] _jgr has joined the channel [09:34] Twelve-60 has joined the channel [09:35] casperionx: hmm [09:35] casperionx: I just worked out a piece to my over active brains puzzle [09:35] casperionx: awesome [09:36] chjj: ah, lexically scoped servers, that sounds fun just for the hell of it [09:36] casperionx: You referring to me there chjj? [09:36] sudhirjonathan has joined the channel [09:36] chjj: yeah [09:36] casperionx: And yeah, I have a problem, I like to make things for my sel;f [09:37] casperionx: Im attending complicators annonymous [09:37] casperionx: Im slowly working through it ;) [09:39] vdemedes has joined the channel [09:39] vdemedes: how to identify when wget finished? [09:39] vdemedes: exec('wget URL'); [09:40] vdemedes: exec('wget URL', function(){}); [09:40] vdemedes: but callback executes before file was downloaded [09:40] MonsieurLu has joined the channel [09:41] FireFly has joined the channel [09:41] GtoXic has joined the channel [09:41] GtoXic: hi [09:42] GtoXic: I seem to be getting the following error: Error: Cannot find module 'stream-stack' [09:44] tom-tomaso has joined the channel [09:45] asabil has joined the channel [09:46] synkro has joined the channel [09:46] mscdex: vdemedes: why are you using wget to download a file? [09:46] vdemedes: mscdex: faster [09:47] vdemedes: mscdex: did not find snippet to do this with Node [09:47] ewdafa has joined the channel [09:47] vdemedes: mscdex: However, I know that this can be done with ClientRequest [09:49] mscdex: vdemedes: http.get({ host: 'example.com', port: 80, path: '/foo.txt' }).pipe(fs.createWriteStream('foo.txt')); [09:49] mscdex: something like that :) [09:49] vdemedes: mscdex: cool, thanks :-) [09:50] GtoXic: mscdex: can you help me? [09:50] mscdex: GtoXic: what are you trying to do? [09:51] GtoXic: I have stream-stack = require("stream-stack"); [09:51] GtoXic: but I get [09:51] GtoXic: Error: Cannot find module 'stream-stack' [09:51] mscdex: GtoXic: and you've installed with npm or ? [09:51] GtoXic: what, I need to install stream-stack? [09:51] GtoXic: :/ [09:52] casperionx: ok mscdex, got one for you, how can I make the following code not allow the wbe browser to time out [09:52] casperionx: pastebin.com/ph2NMbXF [09:52] casperionx: http://pastebin.com/ph2NMbXF [09:53] casperionx: or more precisely [09:53] casperionx: how can I get multiple webpages to view this, with out it all being weird [09:54] cloudhead has joined the channel [09:55] vdemedes: mscdex: how do I identify when file was downloaded? with your snippet [09:55] dall: guys, could you advice a good IDE/editors to develop in JS ? [09:55] mscdex: GtoXic: install npm and then install it with that [09:55] GtoXic: ok [09:55] casperionx: IDE? What ever does JS good for you [09:55] casperionx: I use komodo [09:56] casperionx: and note pad++ [09:56] stonebranch has joined the channel [09:56] casperionx: and gedit [09:56] mscdex: vdemedes: var stream = http.get({ host: 'example.com', port: 80, path: '/foo.txt' }); stream.on('end', fnCallback); stream.pipe(fs.createWriteStream('foo.txt')); [09:56] casperionx: and nano [09:56] GtoXic: is it https://github.com/isaacs/npm that I want? [09:56] mscdex: vdemedes: iirc [09:56] mscdex: GtoXic: npmjs.org [09:56] GtoXic: ok msc [09:57] casperionx: mscdex++ [09:57] v8bot: casperionx has given a beer to mscdex. mscdex now has 19 beers. [09:59] sudhirjonathan has joined the channel [09:59] dall: what do you think about netbeans? [09:59] dall: good? [09:59] GtoXic: will npm auto-exit when it's finished? [09:59] dall: i could start the server with netbeans and then testing the "client" with socket.io [09:59] GtoXic: (installing cgi) [09:59] mscdex: GtoXic: it should [10:00] GtoXic: so far I see npm WARN stream-stack@1.1.2 package.json: 'modules' object is deprecated [10:00] dall: i try to use it... [10:01] mscdex: GtoXic: guess the module's author needs to update their package.json [10:01] mscdex: casperionx: what do you mean about it being "all weird" ? [10:01] casperionx: lol [10:01] dall: guys, last question.....i know that i have to study hard before think about it.. I thank you again for the tutorials you gave me...but out of curiosity...are there any way to load balancing nodejs ? [10:01] casperionx: Im not good [10:02] vdemedes: mscdex: seems like .on('end', function(){}) [10:02] vdemedes: mscdex: does not work [10:02] vdemedes: mscdex: not called [10:02] casperionx: Basically, how can I get multiple browsers to view the feed [10:03] casperionx: - at the moment only one can view the feed [10:04] casperionx: if I try to connect with a different webbrowser while another web browser is connected to the feed, it tells me no socket available [10:04] mscdex: vdemedes: ok, hrmm try this then: var stream = http.get({ host: 'example.com', port: 80, path: '/foo.txt' }, function(res) {res.on('end', fnDone);}); stream.pipe(fs.createWriteStream('foo.txt')); [10:04] dall: ops i have to go.. [10:04] dall: thank you guys have a great day! [10:04] dall: goodbye [10:04] casperionx: dall++ [10:04] v8bot: casperionx has given a beer to dall. dall now has 1 beers. [10:04] mscdex: casperionx: then don't shift it off the array [10:04] casperionx: casperionx++ [10:04] v8bot: casperionx: Don't cheat! You can't give a beer to yourself. [10:05] casperionx: so I should basically do a foreach loop? [10:05] matjas has joined the channel [10:05] casperionx: or should I keep it as a while [10:05] mscdex: casperionx: for loop [10:06] beawesomeinstead has joined the channel [10:06] beawesomeinstead has joined the channel [10:06] casperionx: but, that wont automatically keep updating would it [10:06] sh1mmer has joined the channel [10:06] mscdex: casperionx: huh? [10:06] MonsieurLu has joined the channel [10:06] casperionx: oh I do the for loop and then the while loop inside [10:07] vdemedes: mscdex: thx [10:08] __jgr has joined the channel [10:08] niftylettuce: \o [10:09] pplante has joined the channel [10:09] vdemedes: mscdex: worked :-) [10:09] sudhirjonathan has joined the channel [10:09] MrNibbles has joined the channel [10:10] mscdex: casperionx: here's another way: https://gist.github.com/ae03ac52f4f9b601c6ca [10:10] JakeyChan has joined the channel [10:10] GtoXic: mscdex: npm's still running, is the npm WARN stream-stack@1.1.2 package.json: 'modules' object is deprecated a bad sign? [10:11] mscdex: GtoXic: if it's still running then it sounds like a bug maybe [10:11] mscdex: GtoXic: i don't have much experience with npm [10:11] GtoXic: should I kill it? [10:11] tomtomaso has joined the channel [10:11] mscdex: i suppose so [10:12] GtoXic: infact, I'll let it run until I get bck [10:12] GtoXic: back* [10:12] GtoXic: then I'll kill it if it's still running [10:12] GtoXic: btw, I'm using http://github.com/tootallnate/cgi-js [10:12] GtoXic: I think that's it [10:13] GtoXic: sorry [10:13] GtoXic: https://github.com/TooTallNate/node-cgi [10:13] GtoXic: if you want to check to see why it aint workin [10:13] kohai: @mrwooster: @tjholowaychuk I think that line is quite common among #nodejs packages [10:14] casperionx: cheers mscdex, will look at it in a sec, missus and me discussing wedding photos [10:15] vdemedes: mscdex: how to enable binary mode for this download? I'm downloading ZIP archive [10:15] kohai: @old_sound: @n1k0 is faster than node.js so it must be [10:16] kohai: @sleeptillseven: @konstantinhaase @daddye when performance is an issue (which isn't for us) #sinatra, #padrino, #eventmachine or #nodejs would be an option. [10:16] mscdex: vdemedes: it should be binary already [10:17] mscdex: ircretary: tell isaacs GtoXic is having an issue with npm not exiting while installing node-cgi [10:17] ircretary: mscdex: I'll be sure to tell isaacs [10:17] vdemedes: mscdex: when I try to unzip, it says: End-of-central-directory signature not found [10:18] skm has joined the channel [10:18] vdemedes: mscdex: zip -F cannot fix it [10:18] MattJ has joined the channel [10:18] tom-tomaso has joined the channel [10:19] mscdex: vdemedes: is this a public url? [10:19] vdemedes: mscdex: yep [10:19] mscdex: vdemedes: let me know what the url is and i'll give it a try [10:20] tomtomas_ has joined the channel [10:20] vdemedes: mscdex: http://downloads.wordpress.org/plugin/platinum-seo-pack.zip [10:20] kjeldahl has joined the channel [10:21] casperionx: you know whats really weird mscdex [10:21] kohai: @fille12: looking for a #nodejs group in #israel during summer [10:21] casperionx: it works, but it doesnt work when you view the page from chrome [10:21] TomY has joined the channel [10:22] aliem has joined the channel [10:24] mscdex: casperionx: define "doesn't work" [10:24] sudhirjonathan has joined the channel [10:24] paul_k has joined the channel [10:25] casperionx: lol, for a guy who works in service desk I really dont explain my self too well ;) [10:25] igl: its de facto working [10:25] igl: doh [10:26] casperionx: I mean, when I load the url, and type text into the terminal window (via telnet), I can see the tex come up in ie, and firefox browsers when pointed to the url localhost:8003 [10:26] casperionx: but in chrome, nothing comes up [10:26] vdemedes: mscdex: how its going? [10:26] mscdex: vdemedes: my mistake, it's too early yet and i have no coffee :) this works: https://gist.github.com/ba744cbd821534a03901 [10:27] vdemedes: mscdex: :-) thank you! [10:27] m00p has joined the channel [10:27] mscdex: casperionx: maybe chrome is buffering the output until the response is ended [10:27] mscdex: which never happens [10:27] mscdex: unless the socket closes [10:28] igl: you can end it by hitting cancel? [10:29] mscdex: casperionx: most people use socket.io or similar to do streaming like that [10:30] kohai: @FrogApp: Hands-on Node.js http://bukzz.com/p/hands-on-nodejs/B004ZURMXY (link: /) [10:30] casperionx: oh and just another question how can I edit the data before it gets piped? Would I alter the data property of the object [10:30] Rodtusker has joined the channel [10:30] casperionx: I know, but I just want a live update of whats coming through - sort of like a live log so to speak [10:30] vdemedes: mscdex: damn, Error: ENOENT No such file ... [10:31] vdemedes: mscdex: before res.pipe() [10:31] vdemedes: mscdex: If createWriteStream points to non-existent file, it will create one or not? [10:31] McMAGIC--Copy has joined the channel [10:31] mscdex: vdemedes: yes it will create it [10:31] vdemedes: mscdex: ok [10:31] __jgr has left the channel [10:32] mscdex: casperionx: if you're mutating the data, you can't just do a straight pipe. you would have to write your own intermediary stream [10:32] mscdex: if you want to keep the pipe mechanism [10:33] casperionx: do you know of anywhere that describes that mscdex? [10:34] hellp has joined the channel [10:36] temp01 has joined the channel [10:36] sh1mmer has joined the channel [10:37] mike5w3c has joined the channel [10:38] paul_k has joined the channel [10:39] cloudhea1 has joined the channel [10:40] saschagehlich has joined the channel [10:41] mscdex: casperionx: i thought there was a snippet of one somewhere, but i can't seem to find it [10:41] casperionx: cause what i want to do is basically add time date to the notes - basically a format [10:41] sudhirjonathan has joined the channel [10:41] casperionx: [dd/mm/yy - hh:mm:ss - socket_id]data [10:43] mscdex: casperionx: you could just do it manually, source.on('data', function(data) { /* prepend timestamp*/ dest.write(data); }); source.on('end', function() { dest.end(); }); [10:43] mscdex: something like that [10:43] mscdex: pipe does a lot more than that, but yeah... [10:44] mscdex: that'd be the simplest way for now [10:44] Emmanuel__ has joined the channel [10:44] casperionx: hmm [10:44] Guest23203 has joined the channel [10:47] temp01 has joined the channel [10:48] sjbreen has joined the channel [10:50] aurynn has joined the channel [10:53] Yoric has joined the channel [10:55] dall has joined the channel [10:55] dall: hello again :) [10:56] dall: guys...can we balance the load of nodejs ? [10:56] dall: is there a load balancing module or somethings like that? [10:57] casperionx: awesomeness , thanks again mscdex++ [10:57] casperionx: mscdex [10:57] casperionx: mscdex++ [10:57] v8bot: casperionx has given a beer to mscdex. mscdex now has 20 beers. [10:57] casperionx: free beer! [10:57] sudhirjonathan has joined the channel [10:58] MattJ has joined the channel [10:58] jomoho has joined the channel [10:58] Opaque has joined the channel [11:00] zhami has joined the channel [11:01] dall: yes - no? [11:02] MrNibbles: dall: you can use nginx [11:03] thalll has joined the channel [11:03] cm: I'm struggling with child processes, could someone take a look at my code and tell me where I'm going wrong? [11:03] cm: http://pastebin.com/HaHcYAUp [11:03] cm: the two data callbacks are never called [11:04] a2800276 has joined the channel [11:05] dall: MrNibbles, yes i could use nginx...it can be a proxy, i'm using nginx for my websites...but how they share the informations ? [11:05] dall: i mean... if i use this configuration: http://codefui.com/system/load-balancing-nodejs-with-nginx [11:06] MrNibbles: dall: thats a lot more complex ;), rumour has it that Ryan is working on a standardised intercommunication lib at the moment [11:06] vdemedes has left the channel [11:06] MrNibbles: there are solutions out there, but i dont think i am the best person to comment on those, i haven't used them much at all [11:06] dall: i could have 2 nodejs servers... [11:06] dall: ah ok [11:07] dall: so at the moment do you think is better to have a single server and wait this module? [11:07] MrNibbles: no, you can do it now, many people have [11:07] MrNibbles: someone else would be better answering this question [11:07] dall: MrNibbles, because if i use server 127.0.0.1:8124; [11:07] dall: server 127.0.0.1:8125; [11:07] mscdex: dall: you could use node to load balance too [11:08] dall: mscdex, could be perfect [11:08] deedubs has joined the channel [11:08] dall: the problem is......if i have 10 users on the first server and 10 users on the second server how could they communicate? [11:08] michaelhartau has joined the channel [11:08] dall: mscdex, any yutorial ? [11:09] wbw72 has joined the channel [11:10] kohai: @intuitio: I want to purchase some good books about pro #javascript #html5 #canvas #nodejs Any suggestions? [11:12] dall: kohai, take a look at these links: http://nodebeginner.org/ http://nodetuts.com/ http://www.youtube.com/watch?v=jo_B4LTHi3I http://nodeguide.com/ http://howtonode.org/ [11:12] Minos has joined the channel [11:12] dall: :D [11:12] dall: I have copied the answer they give to me [11:12] cm: If you want a proper book for Node.js, you're probably out of luck [11:13] cm: the language changes too quickly [11:14] mscdex: !tweet @intuitio http://bit.ly/fC4wF8 http://bit.ly/aOjkoI http://bit.ly/eDdYBL http://bit.ly/hKeeNJ http://bit.ly/8WY5bA [11:14] FesterCluck has joined the channel [11:15] dall: mscdex, do you want to see how many users will click on the tutorials ? :D [11:15] adrianmg has joined the channel [11:15] mscdex: dall: no, why? [11:16] mscdex: dall: i can't seem to find the nodejs load balancer app/module, but you could also use haproxy provided you aren't going to be using websockets [11:16] cm: Anyone know about child processes? :/ [11:16] dall: short urls are also used to check how many users visite that link.. [11:16] mscdex: cm: sure, what's your question? [11:16] gozala has joined the channel [11:17] mscdex: dall: ah, nah, i just used the short urls to make sure it all fit into one tweet :) [11:17] cm: http://pastebin.com/HaHcYAUp [11:17] `3rdEden: mscdex dall it's in the nodejistu repository [11:17] mscdex: `3rdEden: i thought so, but i didn't see one [11:17] cm: Nothing is logged except for 4 - 2 [11:17] `3rdEden: https://github.com/nodejitsu/node-http-proxy [11:17] cm: ./shell is v8-shell [11:18] mscdex: `3rdEden: oh that.... yeah, but you have to implement the load balancing yourself [11:19] `3rdEden: mscdex a round robin isn't that hard to implement [11:19] kohai: @cyberdaz360: @analoghell check out node.js if you haven't already [11:19] mscdex: `3rdEden: true, but more options are better [11:19] dall: yeah round robin, but can these servers communicate between each other ? [11:20] `3rdEden: mscdex there is however loadbalancing documentation in the repo [11:20] `3rdEden: https://github.com/nodejitsu/node-http-proxy/blob/master/docs/balancing-proxy.html [11:20] cm: mscdex: Any ideas? [11:23] dall: have a great day guys! [11:23] dall: bye [11:26] sh1mmer has joined the channel [11:28] alessio_alex has joined the channel [11:28] alessio_alex: Hello [11:28] alessio_alex: How can I verify that a file exists? [11:29] igl: path.exists() [11:30] alessio_alex: oh [11:30] alessio_alex: thank you [11:32] killfill has joined the channel [11:33] gozala has joined the channel [11:34] kohai: @raj_arjun: RSVP my session on #nodejs at @barcampbng next week http://drpl.it/ZNs (link: http://barcampbangalore.org/bcb/bcb10/how-to-node-server-side-javascript) [11:35] kohai: @baudehlo: Anyone interested in helping me do a mailinator equivalent with #nodejs and #haraka? [11:36] maushu has joined the channel [11:37] synkro has joined the channel [11:38] _aron has joined the channel [11:40] sh1mmer has joined the channel [11:45] GtoXic: ok, npm still aint finished [11:46] Guest23203 has joined the channel [11:50] mscdex: cm: i'm not sure why that's happening, why are you wanting to run ./shell anyway? [11:50] mscdex: cm: maybe ./shell is expecting a tty or something [11:51] cm: it's v8-shell [11:51] cm: Yes, I thought I said that? :/ [11:51] cm: actually wait [11:51] cm: no it isn't -__- [11:52] GtoXic: lol [11:53] mscdex: yep, that looks like that's it [11:53] mscdex: if you pass in the process's fds to the v8 child process it works [11:53] mendel_: is there a helper method build in to check if the request is a ajax request? (request.headers['x-requested-with'] == 'XMLHttpRequest') [11:53] cm: wha? [11:53] mendel_: like request.xhr? [11:54] mscdex: mendel_: there's no fool-proof way afaik [11:54] cm: I was talking to mscdex XD [11:54] mendel_: mscdex: oke, so to check the headers is not enough you say? [11:55] mscdex: cm: run this and you'll see what i mean: https://gist.github.com/0c574c5af22964f52cbf [11:55] GtoXic: urgh, it's header-stack that's npm's issue [11:55] mscdex: mendel_: i don't think there's any real way to tell for sure, why are you wanting to differentiate? [11:55] mendel_: render layout: false when it's a xhr request [11:56] mendel_: combination of backbone/express [11:56] mscdex: mendel_: maybe you can set your own custom header before you send the ajax request? [11:56] mscdex: xhr.setRequestHeader() [11:56] zhami has joined the channel [11:56] mscdex: iirc [11:57] mscdex: mendel_: otherwise you could use a url that has a slightly different path for ajax calls [11:57] mscdex: mendel_: then you wouldn't have to worry about headers [11:57] mendel_: but request.headers['x-requested-with'] == 'XMLHttpRequest' is browser depended or something? [11:57] mendel_: yeah that's a good idea too [11:58] kohai: @drypot: Node.js 용 Unit Testing 프레임웍이 40 개쯤. 뭘 쓰지. =,= [11:58] cm: mscdex: That's just started the shell? [11:58] cm: Now I'm confused :/ [11:59] mscdex: cm: you saw the output though right? [11:59] cm: Yes [11:59] cm: well [11:59] mscdex: mendel_: x-requested-with is a non-standard header, so i wouldn't rely on it [11:59] cm: It was just v8-shell, I could type stuff into it [11:59] mendel_: mscdex: ah it's jquery that's adding that, so it's perfect while I'm using jquery for the ajax request [11:59] mscdex: cm: right, i think v8's shell program must expect a tty then [11:59] mendel_: thnx for the feedback [12:00] cm: Okay [12:00] killfill has joined the channel [12:00] cm: So does that mean I can't do it? [12:00] mscdex: cm: doesn't look like it. why are you wanting to shell out to the v8 shell program ? [12:01] cm: Experimenting with IRC bots [12:01] cm: I guess I could just use exec and pass the stuff with -e, though [12:01] mscdex: cm: are you just wanting to run arbitrary javascript code? [12:01] cm: Pretty much [12:02] mscdex: cm: http://nodejs.org/docs/v0.4.8/api/vm.html [12:02] mscdex: cm: and if you really want to protect against malicious javascript, you'd use that in a separate process [12:02] cm: Looked at that, it would be too difficult to protect [12:03] gozala has joined the channel [12:03] cm: I do *not* want to let people anywhere near fs [12:03] mscdex: cm: the vm module doesn't give you access to anything in node by default [12:03] mscdex: cm: it's just plain javascript [12:03] cm: oh, okay [12:03] xandrews has joined the channel [12:04] mscdex: cm: but to protect against someone using a while(true); and tying up the event loop, you'll want to run the code in a separate process [12:04] cm: Okay [12:05] cm: Whats the easiest way to get what the code returns? [12:06] mscdex: cm: the result is returned from vm.runIn*Context() [12:06] spaceinvader: cm: child_process.exec with a timeout looks useful [12:06] lorinc has joined the channel [12:07] dipser has joined the channel [12:10] killfill has joined the channel [12:12] cm: ...I should know this, but how do I get params? [12:12] cm: eg node test.js how do I get these? [12:12] cm: wait [12:13] cm: I scrolled past it -__- [12:13] cm: okay, nvm [12:13] Mrfloyd has joined the channel [12:14] __jgr has joined the channel [12:19] migimunz has joined the channel [12:20] tomtomaso has joined the channel [12:23] tomtomaso has joined the channel [12:24] Zell has joined the channel [12:25] Zell: NOOODEEE won't compile on my leeeeooooopparrrrrddd >< [12:25] junkee[] has joined the channel [12:25] Zell: and i hate pingoo [12:26] GtoXic: lol [12:26] SubStack: you mean to say that node support on leopard is... spotty? [12:27] Zell: i don't know >< [12:27] Zell: i tryed to compile from the git package [12:27] Zell: and using brew [12:27] Zell: both fail >< [12:27] Zell: i feel like a leopard in a cage [12:27] Zell: i hate snow [12:27] GtoXic: what happens? [12:28] Zell: i'm not sure what i should paste [12:28] igl: izi solution: just go right click and then.. ah dang it. nvm [12:28] Zell: Error: Failed executing: make install [12:28] GtoXic: did running "make" work? [12:28] telemachus: Zell: try running just make [12:29] coreb has joined the channel [12:29] telemachus: and copy the errors [12:29] Zell: Build failed: -> task failed (err #1): [12:29] Zell: {task: cxx node_crypto.cc -> node_crypto_5.o} [12:29] Zell: (yeah sorry the other error were generated by brew ) [12:29] telemachus: Zell: Not here, please - use a pasteboard (http://pastie.org) [12:29] Zell: two lines >< [12:29] Zell: ok [12:30] GtoXic: it's classed as spam [12:30] telemachus: yeah, but my next thing was to say it would help to see the larger context - not just a line here or there [12:30] Zell: http://pastie.org/2022198 [12:30] Zell: oh [12:30] Zell: telemachus: just for you http://pastie.org/2022204 [12:31] Zell: and the other people of the channel: http://pastie.org/2022204 [12:31] Zell: (wow not sleeping doesn't make me funny ) [12:31] igl: every compile probs i had yet, were because of missing dependencies/missing paths [12:32] temp01 has joined the channel [12:32] Zell: igl: are you on leopard ? [12:32] igl: but i cant really give help for mac, so gl [12:32] igl: :) [12:32] Zell: haha ^^ [12:32] igl: just my experience [12:32] kohai: @rjrodger: @stuartwatson #nodejs is the way to go :) Grab a free ec2 micro instance, a free db from mongohq and you're off! [12:32] Zell: i got mongo [12:32] Zell: i just need node now :P [12:33] Zell: (and after a better graphic card for webgl, but you graphics they are frivolous like people) [12:33] Zell: (you are not people) [12:33] igl: ha [12:33] telemachus: zell, try brew install openssl perhaps? http://brownsofa.org/blog/archives/334 [12:34] igl: dont think you need alot of graphic accelerations for the webgl probjects out there [12:35] Zell: igl: my mac has 5 years [12:35] Zell: igl: so the gpu inside is like non-existent [12:35] Zell: telemachus: processing [12:36] Zell: igl: i tryed some glgle demo ... it fail miserably i got like 4 fps ... [12:36] Zell: and a black screen [12:36] telemachus: Zell: yup - note at the bottom of that blog post - you will probably need to do 'brew link openssl' and fiddle with your config options in node [12:36] igl: ouch [12:36] telemachus: (i.e., make clean and reconfigure...) [12:36] Zell: >< [12:36] Zell: i will sir [12:36] telemachus: ACTION checks - he isn't wearing a tie [12:36] Zell: igl: no its a very old mac book that has also drink a half glass of bear [12:36] telemachus: sir [12:36] telemachus: foo [12:36] Zell: he did liked it. [12:37] Zell: (it) [12:37] Zell: telemachus: bar [12:37] kohai: @caludio: If your "socket hang up" while talking to a #nodejs http server, you forgot a "/" in front of your path. Lost a f'ing hour on that [12:39] Zell: i heard a lot of good of nodejs and i see a huge community [12:40] Zell: same size as python and ruby which are languages >< [12:40] Zell: that's surprising :P [12:40] Zell: some fool told me go was better than nodejs [12:41] mediacoder has joined the channel [12:42] AlexMax has joined the channel [12:42] telemachus: Is there a pattern for handling json responses that are arrays? If I limit myself to returning only the first response, I'm fine, but when I try to do anything involving iterating over an array, I get weird/inconsistent results. (No doubt due to async issues...) [12:43] jonaslund has joined the channel [12:43] telemachus: I've tried using async with pretty mixed results (it's slow and still doesn't give consistent results) [12:43] telemachus: sorry - async the library that is - https://github.com/caolan/async/ [12:44] killfill has joined the channel [12:45] Zell: telemachus: you just rox my mother flippin computer, thx. [12:45] mendel_: someone used backbone 0.5pre? [12:45] telemachus: Zell: No me - Google :) But cool [12:45] telemachus: s/No/Not/ [12:45] Zell: telemachus: no sleep, google laught at me [12:46] telemachus: Yeah, when Google starts to make fun of you, it's time for a nap, no doubt. [12:46] Zell: telemachus: i ask him stuff he answer text, where is the semantic >< [12:46] Zell: WHERE IS RDF [12:48] deedubs has joined the channel [12:48] sh1mmer has joined the channel [12:50] hojberg has joined the channel [12:51] telemachus: Now I need to Google 'RDF'. Meta? Not me... [12:55] Zell: telemachus: rdf is a language made to be readable by computer (not by humans tho) that can basically be explain by ternary relationship and triple store [12:55] sudhirjonathan has joined the channel [12:55] telemachus: You realize your explanation just gave me two more unknown phrases to look up? [12:55] Zell: telemachus: rdf can rapidely be boring and have a suxy syntax, i recommand you to check RDFa which seem to be the best initiative to improve the web [12:55] pifantastic has joined the channel [12:55] telemachus: Screw it, I'm still trying to figure out how the hell to handle collections in Node. :) [12:55] Zell: arg >< [12:56] Zell: telemachus: all right :P [12:56] Zell: telemachus: mongo collections ? [12:56] telemachus: No offense, but I've been stuck on this for a couple of days now, lol [12:56] telemachus: hmm? [12:56] Zell: couple of days >< [12:56] Zell: wow [12:56] telemachus: No, no Mongo for me, just straight up json [12:57] telemachus: Oh, hell, two days stuck on a problem is nothing for me. I'll go weeks at a time without any glimmer of light. :) [12:57] Zell: telemachus: what are you exactly trying to do ? [12:58] Zell: (if you can represent it by code, in ruby, python or any other language, it could help me to maybe help you [12:58] telemachus: Campfire bot - You give the bot someone's name, it hits the relevant Twitter API and a JSON array is returned. I want then to iterate over that array, popping off the id number of the tweets in turn and have the bot say them into the room. [12:59] telemachus: And I can give you Node code, if you like... [13:00] Zell: telemachus: go on [13:01] telemachus: Zell: https://gist.github.com/1008937 [13:01] telemachus: That works great [13:01] telemachus: lovely [13:01] telemachus: a treat [13:02] kohai: @alasdairnorth: It is also (hopefully) the last thing I'll ever write in PHP. It's Node.js all the way for me now. [13:02] telemachus: but if I try to handle more than one tweet...results are unpredicatable/odd/frustrating as hell [13:02] killfill has joined the channel [13:02] Zell: telemachus: Oo [13:02] Zell: impredicatable ^^ [13:02] Zell: did you dump and log what you were doing ? [13:03] Zell: kohai: don't mix orange and apple [13:04] MrSmurf has joined the channel [13:04] telemachus: I've tried logging various parts, yes, but I haven't hit the issue [13:04] telemachus: kohai is a bot, btw [13:04] Zell: Oo [13:04] Zell: they are bot everywhere now [13:04] Zell: i hate them [13:04] sh1mmer has joined the channel [13:05] Zell: telemachus: if one tweet work, you have pobably a problem of iteration [13:05] telemachus: Zell: Yes - you are true. That's why I started by asking about iteration and collections in Node. [13:06] telemachus: The problem is, I'm guessing, that any sort of sequential iteration is not async...and Node is. [13:07] telemachus: Anyhow, thanks for the thoughts... [13:07] Zell: lol i'm not finish [13:07] spcshpopr8r has joined the channel [13:08] Zell: my processing capability is a little bit low because of my lack of sleep [13:09] Zell: but that seem faisable to me ><, i need more data about node (that i just compile for the first time) [13:11] Zell: telemachus: if you got the json data, i think node is not an issue [13:11] openpercept has joined the channel [13:12] Zell: telemachus: i don't see any while or any for [13:12] level09 has joined the channel [13:13] Zell: telemachus: do you loop on your collection using callbacks ? O o [13:13] telemachus: Zell: I removed the iterative parts - they don't work [13:13] Zell: oh [13:13] level09: any 1 used forever ? [13:13] telemachus: I'm only doing the first returned item now [13:13] Zell: on the example [13:13] telemachus: which is frustrating but works fine [13:13] Zell: all right [13:13] telemachus: yes [13:13] Zell: that had trouble me ^^ [13:13] Zell: but ok :P [13:13] Zell: let try some loop then [13:13] level09: so forever will keep the node server running [13:14] xSmurf has joined the channel [13:14] asabil has joined the channel [13:14] level09: but what makes forever itself running forever ? [13:14] level09: :D [13:14] telemachus: level09: it's turtles all the way down [13:14] Zell: level09: while true [13:14] level09: telemachus: what do you mean ? [13:14] Zell: level09: now go take your level 10 [13:15] kohai: @AnthonySteele: @dylanbeattie next one is "in a very similar vein" - so also node.js then ;)? [13:15] telemachus: level09: Sorry, an old (silly) joke: http://en.wikipedia.org/wiki/Turtles_all_the_way_down [13:15] level09: hmm [13:16] perlmonkey2 has joined the channel [13:16] Zell: level09: you sure you're level 9 ? [13:17] patcito has joined the channel [13:17] telemachus: Zell: https://gist.github.com/1008953 (now I get 3 tweets, and I iterate over them) [13:17] telemachus: I can see in the log that there are three items in the json array, no problem [13:17] telemachus: but...http://cl.ly/7Klg [13:17] Zell: telemachus: and does it fail [13:17] telemachus: check the second link [13:18] level09: I guess we have alot of comedians here :D [13:18] telemachus: picture > 1000 words [13:18] telemachus: it doesn't exactly fail - it's unpredictable in results [13:18] Zell: doubloon [13:18] telemachus: no matter what's in the json array I may get 1, 2 or 3 results in the campfire room [13:19] telemachus: with no clear pattern [13:19] telemachus: kind of makes me want to tear my hair out [13:19] Zell: nnnnoooo [13:19] telemachus: it's ok, not so much hair, lol [13:19] aliem has joined the channel [13:19] Zell: ^^ [13:19] Zell: left ? :P [13:19] pifantastic_ has joined the channel [13:19] telemachus: hah [13:19] seivan has joined the channel [13:20] telemachus: anyhow, in a nutshell, that's the issue -> iteration causes weirdness [13:20] Zell: telemachus: why do you use a callback >< [13:20] telemachus: no idea how to handle it. I'm assuming I'm doing something wrong/unidiomatic for node [13:20] Zell: telemachus: inside your loop [13:20] Zell: i don't know much about node [13:20] jsulak has joined the channel [13:21] Zell: but you should get your json array of twit [13:21] Zell: and then lloop on it [13:21] sirkitree has joined the channel [13:21] telemachus: Zell: callbacks are the name of the game - very common way to handle organization, sequence, flow [13:21] Vertice has joined the channel [13:24] blup has joined the channel [13:26] Zell: telemachus: could you give me the full code ? [13:26] Zell: if you have a git repo [13:27] Zell: or an archive somewhere [13:27] abraxas has joined the channel [13:27] telemachus: No repo for it yet [13:27] telemachus: no worries [13:27] telemachus: I'll keep messing with it [13:27] Zell: ^^ [13:28] kohai: @Christian_Selch: installing #nodejs on my VPS - looking forward to try doing stuff with it, instead of just reading about it! #excited [13:28] stride: telemachus: what's getting passed to your callback in that loop? [13:29] _jgr has joined the channel [13:29] telemachus: stride: A specific value out of one of the json array's members [13:29] telemachus: namely the id_str value on a Twitter's tweet [13:29] stride: okay, and what's the problem? [13:29] telemachus: The problem is that if I try to iterate over 3 tweets (I can see the three items in the json array), I get randomly 1, 2 or 3 of them [13:30] telemachus: I don't get all three - nearly never, though sometimes [13:30] telemachus: the results are unpredictable [13:30] stride: for (var i =0, l = results.length; i6 months ago [16:13] pigmej: no tests [16:13] __jgr has joined the channel [16:14] seivan has joined the channel [16:14] abraxas has joined the channel [16:15] kuya_ has joined the channel [16:16] ss23: I have a flaw in my understanding of Javascript, I think. http://pastie.org/2023054 I want this to print foo bar baz, but it prints baz. I understand why it prints baz, I think, the reason being the data[i] is turned into a tangible value on the next tick rather than at the definition of that anon function. How would I change that code to work how I would expect? [16:17] pigmej: ss23: it's how it works:) [16:17] pigmej: you can't do that in this way:) [16:17] chapel: add var x = i; inside process.nextTick [16:17] chapel: and then data[x] [16:18] iFire has joined the channel [16:18] pigmej: then it will work;] [16:18] ss23: Thanks ^.^ [16:18] swistak: you're creating closure [16:18] pigmej: ss23: nextTick do not 'store state' [16:18] ss23: I reliased it wasn't working liek that :P I just wasn't sure how to fix, my understanding of Javascipt is lacking [16:18] pigmej: it will just 'spawn later' the execution [16:18] swistak: sorry You're NOT creating closure properly, so when you change value of i in next loop [16:18] pigmej: and as the result the data[i] is always the same [16:18] swistak: it changes in all functions that you've schedules [16:18] pigmej: because it will first do the for loop [16:19] chapel: var data = ['1', '2', '3']; for (i in data) { foo(data[i]); }; function foo(line) { console.log(line); } [16:19] pigmej: and then execute nextTick [16:19] ss23: Yeah, I realised what is was doing. I understand why it doesn't work [16:19] chapel: v8: var data = ['1', '2', '3']; for (i in data) { foo(data[i]); }; function foo(line) { console.log(line); } [16:19] swistak: this is my favorite interview question [16:19] pigmej: ;-) [16:19] chapel: `v git dnode [16:19] v8bot: chapel: Delapouite/dnode - GitHub - https://github.com/Delapouite/dnode [16:19] chapel: hmm [16:19] pigmej: swistak: this is the same in 'all' languages:) [16:19] pigmej: same in python [16:19] pigmej: same in js [16:19] pigmej: and others :) [16:19] swistak: pigmej, not really [16:20] swistak: depends how closures are implemented [16:20] pigmej: sure [16:20] bingomanatee: ACTION just needs closure [16:20] pigmej: lambda in python for example 'same issue' [16:20] epopt37 has joined the channel [16:20] ss23: Okay, so I tried adding var x = i inside process.nextTick, however, I experience the same behavour. [16:21] swistak: anyway this is by far most iritating 'gotcha' I've come across, right next to (false == undefined == '0' == 0) == true [16:21] brolin has joined the channel [16:22] gonsfx has joined the channel [16:22] pigmej: swistak: http://wklej.to/zXA0z [16:22] ss23: So, I still think I understand why it happens, but I still can't think of a way around it [16:22] pigmej: same 'issue' in python :) [16:22] pigmej: ss23: the probleme in your situation [16:22] __jgr has left the channel [16:22] pigmej: is how nextTick works that's first :) [16:22] pigmej: if you want to do it in that way [16:23] pigmej: you need to 'store' the temporary `i` value :) [16:23] TomY has joined the channel [16:23] ss23: Yeah, I know that. I realise that this is just how it works, but people must want to do something like what I'm doing? [16:23] pigmej: as someone said before:) [16:23] _jgr has joined the channel [16:24] ss23: I saw what chapel said, but I'm unsure how to implment it. Any way I can think of results in the same thing, but using x instead of i [16:24] bingomanatee: what is the best way to echo an object to get the most info on its properties / methods? [16:24] brweber2 has joined the channel [16:24] pigmej: ss23: just add one line [16:24] pigmej: with var x = i; [16:24] swistak: anyway, i"ll rephrase my previous question, any way to share 'module' variable between different modules? [16:24] gonsfx: is it possible to detect if a request is an xmlhttprequest in node / http? [16:24] pigmej: and use that x [16:24] pigmej: instead of i ;) [16:25] swistak: I'd like several files to share the same namespace [16:25] harsu has joined the channel [16:25] pigmej: the problem ss23 is that your functions will contain the `i` value from the end of loop [16:25] ss23: pigmej: I did. This is what I tried - http://pastie.org/2023101 - and it results in the same behavior [16:25] ss23: pigmej: Yes, I realise that. I understand that. But I'm not sure how to work around it [16:25] swistak: While JS in browsers made polluting global namespace so easy it was pain to deal with. I feel that node.js swung to mush to the other side, and separation is to strong [16:25] ss23: I understand this behaviour, I'm just not sure how to change my code to avoid this problem [16:26] bingomanatee: gonsfx: the only way to do that is by looking at the properties of the request - there is no data in an HTTP request that is not present in the properties of the request object so if you don't put a header / hint in your request that its an xmlhttprequest, there is no way to detect them. [16:26] swistak: ss23: simplest solution is to do for(i in o){ (function(i){ do operations }){(i) } [16:26] swistak: i as in function argument shadows i as a local variable, and is bound by function call [16:27] bingomanatee: If you want to hint to your server side code that its an xmlhttprequest, the best way to do so is to simply set a header as such yourself or a post property. [16:27] pigmej: ah right swistak:) my mistake ss23 ;-) to much python today :) [16:27] gonsfx: sounds good, will set a header so node/http can reply with json on xmlhttpreq and with a redirect otherwise [16:27] gonsfx: thanks :) [16:27] jakehow has joined the channel [16:28] bingomanatee: Personally I just add the .json suffix to all my requests when I want ajax reflection - you could also add .xml if that's what you want. Its the bluntest instrument there is :D [16:28] ss23: swistak: I figured it would do that, but I wasn't sure how to 'hand' that function the variable i. Perhaps it's a language feature of Javascript I'm not familiar with, but in this case, I would do process.nextTick(function(i) { foo }){(i)} and it would work? Or did I misunderstand? [16:29] edgarallanpoe has joined the channel [16:29] swistak: ss23: no becouse you need to pass a function to nextTick and you're instantly executing it [16:30] swistak: you need to double pack it :] [16:30] matjas has joined the channel [16:31] zhami has joined the channel [16:31] ss23: swistak: Sorry, how do I do that? [16:32] H2S04 has joined the channel [16:32] ericnakagawa has joined the channel [16:32] Mrfloyd_ has joined the channel [16:32] snearch has joined the channel [16:33] asabil has joined the channel [16:34] lstrojny_ has joined the channel [16:35] maushu has joined the channel [16:37] brweber2 has joined the channel [16:37] gozala has joined the channel [16:38] __jgr has joined the channel [16:39] swistak: ss23: http://pastie.org/2023158 [16:39] swistak: not tested, but with comment :) [16:40] kohai: @gineshkumar: We simply are not forced to stovepipe our applications into one species any more http://bit.ly/jaq0TW #java #nodejs #mongodb #web #redis (link: http://blog.springsource.com/2011/05/03/using-mongodb-redis-node-js-and-spring-mvc-in-a-single-cloud-foundry-application/) [16:40] ss23: Ah, thank you swistak! I wasn't aware you could pass functions a value like that, but that's perfect! [16:40] ss23: May your days be filled with hot chocolate and cookies! [16:42] igl: olala just read about palm bringin tablets with webOS [16:43] Corren has joined the channel [16:43] Stephen has joined the channel [16:47] swistak: ss23, hehe, thanks, hope it works :) [16:47] ss23: Yep, seems to work awesomely :) [16:48] swistak: and I think I finally solved my problem, looks like I'll simply have to save file to file system and load it with require [16:48] swistak: no way around it :/ [16:48] seivan has joined the channel [16:49] chapel: swistak [16:49] timmywil has joined the channel [16:49] chapel: what's your problem? [16:50] catshirt has joined the channel [16:50] swistak: chapel, I have generated code. I'd like to load it into current context, and at the same time have stackTrace show meaningful information. [16:51] swistak: this eliminates eval. But looks like any other way then require does not do what I'd expect [16:51] chapel: have you looked at vm? [16:51] swistak: checked runInThisContext, createScript + runInThisContext [16:51] chapel: well vm you can pass in anything you need for it [16:52] swistak: and sevaral other solutions, runInThisContext does not set module,exports and other variables I'd expect (allows access to global object though) [16:52] kohai: @NTTAKR: @goloroden Files und Streams haben schon mal async I/O, und was konkretes hast Du noch nicht angeführt. Ich schau mal nach Node.js [16:52] chapel: again, you can pass in those things [16:52] swistak: how? [16:53] jzacsh has joined the channel [16:53] swistak: skipping through fact that I can probably pass those variables (don't know how though) both of these do not allow loaded/executed script access to local scope [16:53] swistak: looks like only way to do this is eval [16:53] Spion has joined the channel [16:53] gonsfx: has anyone worked with futures in node? especially the implementation of coolaj86 [16:54] dve: I have loop that calls a func that has a callback. I want to be able to wait until the loop has completed before calling my own callback... whats the best way of doing this?? I have a sample here... https://gist.github.com/1009145 [16:54] swistak: but eval has horrible flaw that any code that I eval through it - even if it's loaded from file, looses any usefull debugging information [16:54] swistak: like file name and line numbers [16:56] materialdesigner has joined the channel [16:56] chapel: swistak: http://nodejs.org/docs/v0.4.8/api/vm.html#script.runInThisContext hmm maybe that [16:56] chapel: I haven't done much with it tbh [16:56] `3rdEden has joined the channel [16:56] swistak: chapel, I'm experimenting with it since yesterday [16:57] sonnym has joined the channel [16:57] swistak: my OCD is acting up, I'm already reached the stage of digging into node.js code to see how it's done there [16:57] chapel: swistak: what are you trying to do, like give me a use case? [16:57] swistak: I've seen some magic settings like setting __filename and __dirname variables in some code [16:58] swistak: I have code generated from template [16:58] swistak: of coffeescript [16:58] swistak: or* [16:58] swistak: I want to be able to load several files, and for them to share the scope [16:58] swistak: best 2 options I got so far are: [16:58] Remoun has joined the channel [16:58] swistak: generate template - save it to drive and require it [16:59] swistak: but then they don't share same local scope [16:59] swistak: second - generate them, concantate them, save as one file, and require them [16:59] chapel: umm, what templating engine are you using? [16:59] swistak: coffeescript and coffeekup + my own code that is generating js [17:00] yhahn has joined the channel [17:00] chapel: but you are generating it on the fly? [17:00] swistak: yes [17:01] swistak: so I'd like to save it to hard drive only in debug mode [17:01] swistak: I can live without sharing scope - so require would do [17:01] swistak: but looks like I cannot 'require' from memory, i have to save it to hd and read it from there [17:05] edgarallanpoe has joined the channel [17:06] kriskowal has joined the channel [17:06] niftylettuce has joined the channel [17:06] ryanfitz has joined the channel [17:07] sh1mmer has joined the channel [17:07] adambeynon has joined the channel [17:07] dve: SubStack: you around? [17:08] andrewfff has joined the channel [17:08] kohai: @mykola: @tonylukasavage @jonbcampos @seantheflexguy Though honestly if you're looking to learn a new language now, consider JavaScript + node.js [17:11] darshanshankar has joined the channel [17:11] niles|iPod has joined the channel [17:16] gazumps has joined the channel [17:17] kohai: @mykola: @seantheflexguy I'm working on something now that uses Node.js to talk to the Arduino, then uses socket.io to pass data directly back/forth [17:17] sjbreen has joined the channel [17:18] perlmonkey2 has joined the channel [17:18] paznicul has joined the channel [17:19] hasen has joined the channel [17:24] skm has joined the channel [17:26] gsmcwhirter has joined the channel [17:27] cafesofie has joined the channel [17:29] jbpros has joined the channel [17:30] swistak: chapel, looks liek coffee script compiler for exampel uses require.main._compile which is completelly undocumented [17:30] chapel: heh [17:30] chapel: there are a lot of undocumented things [17:30] chapel: :P [17:30] swistak: and have strange behaviour that I cannot figure out [17:30] jamescarr has joined the channel [17:30] swistak: it does pass module exports etc. [17:31] jamescarr: so what is the standard way of deploying and running a node.js app on your own infrastructure these days? [17:31] swistak: but looks liek it changes global [17:31] xeodox has joined the channel [17:31] burg has joined the channel [17:32] burg: hello. let`s say i want to make a websocket server. how is node.js better than c++ or other desktop side language? [17:32] kohai: @andrewchen: @vacanti @launchbit one word: jealousy (: not a "tech" biz, so nerds think it's all tricks. If only they sold node.js hosting. [17:33] jamescarr: burg how is c++ better than python? [17:33] tbranyen: how is pie better than birth? [17:33] jamescarr: how is c++ better than erlang or other desktop languages? [17:33] tbranyen: how is the sky better than water? [17:34] jamescarr: tbranyen, I think he gets the point ;) [17:34] tbranyen: how is car better than speaker? [17:34] burg: jamescarr, i ask because javascript was not intended for desktop/server applications. hence this is something new, i am interested about its performance [17:34] tbranyen: i am being srs [17:35] tbranyen: burg: c++ wasn't designed for high concurrency, hell it was probably unheard of during the 70s [17:35] tbranyen: everyone was hopped up on acid and dreaming [17:36] burg: some are nowadays too, but this wasn`t what i wanted to know [17:36] igl: lol [17:36] caolanm has joined the channel [17:36] tbranyen: although... p much everything that makes node special is c++ [17:36] jamescarr: burg, I wouldn't quite say that about javascript. Ever hear of Netscape LiveWire? [17:36] tbranyen: so i guess you could reinvent the wheel if you wanted [17:36] tbranyen: jscript for classic asp [17:36] tbranyen: is p old too [17:36] igl: wasnt c++ created for a thesis [17:36] burg: i just want to know a reason why someone should use that nodejs with javascript, other than: i like more to write javascript code than other language code [17:37] burg: i am asking about performance [17:37] tbranyen: burg: i think that has been addressed in like every node.js article ever [17:37] tbranyen: have you done any research? [17:37] igl: ^^ [17:37] igl: v8 is great burg [17:37] tbranyen: v8 is scary great [17:37] tbranyen: like better than it has any right to be [17:37] igl: its not C... but so what [17:38] igl: neither is php or jsp [17:38] igl: node.js can compete with big guys on performance i think, and we dont even have 1.0 yet [17:39] sonnym has joined the channel [17:39] tbranyen: most of the time your bottlenecks are i/o bound and not the language [17:39] tbranyen: well i/o and system resources available [17:40] burg: well i am going to write something with node.js and i just wanted to know if i`m making the right choice [17:40] igl: depends i guess [17:40] tbranyen: burg: how much do you have invested in this project? [17:40] igl: no one really recommends to use node on a commercial site [17:40] tbranyen: if you have nothing to lose [17:40] tbranyen: go for it [17:41] burg: tbranyen, that`s for my degree thesis [17:41] tbranyen: oh who gives a shit then, its not like you'll lose your house over a bad idea [17:41] igl: true [17:41] tbranyen: plus its college they love new shit [17:41] igl: haha [17:41] igl: true [17:42] igl: you can talk alot about threads and blocking IO [17:42] igl: sound smart [17:42] jamescarr: lol [17:43] sh1mmer has joined the channel [17:43] kohai: @OhMeadhbh: for peeps interested in such things, here's another UUID generator for #nodejs. this one grabs entropy from /dev/urandom http://j.mp/lHYZ1U (link: https://github.com/OhMeadhbh/node-mug) [17:44] burg: tbranyen, i thought the same thing, but i don`t think that should be the only reason [17:44] _aron has joined the channel [17:44] tbranyen: burg: of course not, but node.js def needs more academic scrutinizing eyes on it [17:44] jamescarr: burg, mess around with it and try it out [17:45] tbranyen: maybe you'll find the whole thing is a sham and you'll be the one with a sweet thesis proving it [17:45] jamescarr: I'm sure sooner or later you'll see enough value to write a large thesis on it [17:45] b_erb has left the channel [17:46] djcoin has joined the channel [17:46] jamescarr: i'm surprised the node.js article on IBM's site hasnt been pulled [17:46] igl: what about it? [17:47] TomY has joined the channel [17:48] jamescarr: nvm... just looked at it and discovered it was rewritten [17:48] tbranyen: igl: it got ripped on heavily [17:48] tbranyen: jamescarr: oh neato [17:48] killfill has joined the channel [17:48] mendel_: hi all, is there a way to check if a file is in use [17:48] jamescarr: still has the webserver example from the node.js home page with 100 lines of comments still though :( [17:49] Croms has joined the channel [17:49] mendel_: I need to loop a folder and read the contents of a file, but it is possible that the file isn't finished uploading [17:49] igl: just found the nodejitsu article ~ reading [17:49] mendel_: I don't control the upload of the file [17:49] jakehow has joined the channel [17:49] kris_will has joined the channel [17:49] `3rdEden: mendel_ maybe with fs.stat? [17:50] mike5w3c has joined the channel [17:50] `3rdEden: it would even possible to use watch file for that to see if it changes over a period of time [17:52] mynyml has joined the channel [17:54] mendel_: `3rdEden: fs.watchFile would work, thnx [17:55] `3rdEden: yw :) [17:57] blup has joined the channel [17:57] pen has joined the channel [17:58] adambeynon has joined the channel [17:58] kohai: @david_whitney: @prototype_359 certainly, but we've been deliberately building it in html5 and JavaScript with node.js on the server as a learning exercise [17:59] arpegius has joined the channel [18:00] ewdafa has joined the channel [18:00] sveimac has joined the channel [18:01] sveimac has joined the channel [18:01] Corren has joined the channel [18:02] tolmasky-macbook has joined the channel [18:02] tolmasky-macbook: is there a recommended options parser? (i see many modules but don't know which most people use) [18:03] kohai: @ilkerde: while housekeeping i could rebuild node.js from sources. let's make it a word and a blow :-) [18:03] simenbrekken: Is there some kind of list that summarizes the runtime optimizations V8 does to my code? [18:07] Marak: igl: looks like they rewrote the article [18:09] openpercept has joined the channel [18:09] openpercept has joined the channel [18:11] hybsch has left the channel [18:11] kris_will: @tolmasky do you mean command-line args? [18:12] kohai: @agnoster: Twitter streaming in node.js is fun :-) [18:13] igl: aye [18:13] kohai: @vicmargar: @lucaspiller Make sure you take the script crapify.sh it converts from Erlang to Node.js [18:13] mundanity has joined the channel [18:13] Marak: !part #Node.js [18:13] kohai has left the channel [18:13] Marak: i think the bots volume might have bugged out, its reporting "100" over here....should never exceed "10" [18:13] Marak: ill bring him back later [18:14] blup has joined the channel [18:14] kohai has joined the channel [18:17] Shrink has joined the channel [18:18] Adman65 has joined the channel [18:19] namelessnotion has joined the channel [18:21] eb4890 has joined the channel [18:21] piscisaureus has joined the channel [18:24] dve: I have loop that calls a func that has a callback. I want to be able to wait until the loop has completed before calling my own callback... whats the best way of doing this?? I have a sample here... https://gist.github.com/1009145 [18:24] ericnakagawa has joined the channel [18:25] MooGoo: call the function after the loop? [18:25] ryankirkman has joined the channel [18:25] arpegius has joined the channel [18:26] Croms has joined the channel [18:27] xandrews has joined the channel [18:27] Marak: dve: use the async module [18:28] Marak: dve: https://github.com/caolan/async ? [18:28] dve: Marak: aha gracias! [18:30] killfill has joined the channel [18:30] TomY has joined the channel [18:33] brianc has joined the channel [18:34] Marak: is that working for you dve ? [18:36] dve: Marak jsut implementing now [18:36] Calvin has joined the channel [18:36] AhtiK has joined the channel [18:36] kriskowal has joined the channel [18:37] rictic has joined the channel [18:38] hkjels: What is the simplest way of retrieving a json document from a url? curl? I'm using express.js and have set up some routes that just output json [18:38] materialdesigner has joined the channel [18:39] also has joined the channel [18:40] kohai: @ilkerde: ok, got #nodejs up and running. next: install #npm from source. [18:42] kblake has joined the channel [18:42] stonebra_ has joined the channel [18:44] dan_manges has joined the channel [18:45] malkomalko has joined the channel [18:46] niles|iPod has joined the channel [18:47] kohai: @NodeKohai: @ilkerde You could just use the one line curl command! [18:47] adambeynon has joined the channel [18:48] dan_manges has joined the channel [18:48] coreb has joined the channel [18:51] kohai: @ilkerde: @NodeKohai i'm totally aware of that, but just wanted to see how the process actually is (with git submodules & cli.js). thank you! [18:52] kohai: @rentacoderuk: Twitter Node.js Set Up--By mmcdonald on Jun 5--Max Bid: $499: I am in need of somebody to help me set up a twitt... http://bit.ly/jXEU6g (link: http://www.vworker.com/RentACoder/misc/BidRequests/ShowBidRequest.asp?txtFromURL=AId_487162&lngBidRequestId=1676276&utm_term=rentacoder&utm_content=jobs+and+freelance+projects&utm_source=twitterfeed&utm_medium=twitter&utm_campaign=rentacoder+uk) [18:53] Spion has joined the channel [18:53] Marak: lets block that guy [18:54] Bradleymeck has joined the channel [18:54] sonnym has joined the channel [18:55] FIQ has joined the channel [18:58] insin has joined the channel [18:59] blup has joined the channel [19:00] mwhooker has joined the channel [19:00] TooTallNate has joined the channel [19:01] also: what's the best way to do timeouts when using http.request() ? [19:03] burg has joined the channel [19:03] killfill has joined the channel [19:05] Bradleymeck has joined the channel [19:06] Yoric has joined the channel [19:07] stonebranch has joined the channel [19:07] sudhirjonathan has joined the channel [19:08] Yuffster has joined the channel [19:09] Melkor_ has joined the channel [19:09] wookiehangover has joined the channel [19:10] eyesUnclouded has joined the channel [19:10] blup has joined the channel [19:10] jmoyers has joined the channel [19:11] garrensmith_ has joined the channel [19:13] digman543 has joined the channel [19:14] openpercept has joined the channel [19:14] openpercept has joined the channel [19:15] amindfv_ has joined the channel [19:15] amindfv_: hi guys [19:16] amindfv_: were in the middle of a hackaton [19:16] amindfv_: and only have a couple minutes [19:16] amindfv_: but we have a question [19:16] amindfv_: helP? :) [19:16] brainproxy: what's the questions? [19:16] amindfv_: we're trying to connect to google personfinder api from node.js [19:17] amindfv_: it involves uploading a file to their server [19:17] amindfv_: we've got everything except for the actual upload [19:17] amindfv_: here's the public pad for our code: [19:17] amindfv_: http://piratepad.net/dMyLZL5zz4 [19:18] amindfv_: can you guys PLEASE take a look? [19:19] amindfv_: (quickly(? [19:19] amindfv_: :) [19:19] dominictarr: so the api docs say you have POST a file? [19:19] amindfv_: yes [19:20] Bj_o_rn has joined the channel [19:21] djazz has joined the channel [19:22] Zell: hey, i just watched the presentation video on node.js, and there is that exemple of the get function which hypothetically do a bunch of stuff, the question is, why do you need callback to expose it ? [19:22] dominictarr: once your at line 16 what is options.data ? [19:22] willwhite has joined the channel [19:22] dominictarr: I can't see what exports.CombineList does [19:24] jmoyers: Zell thats a little vague [19:24] jmoyers: 'get' from which project? which video? [19:24] dominictarr: amindfv: what does exports.CombineList do? [19:24] jmoyers: amindfv_^ [19:24] Zell: jmoyers: my question, or the video presentation ? [19:25] jmoyers: your question [19:25] jmoyers: is it 'get' from express? from node core? [19:27] Zell: jmoyers: it's get from the presentation video from http://nodejs.org/ , at 51 minute on the video [19:28] amindfv_: options.data is the "data' field from the options array [19:28] Zell: until 53 minute [19:28] amindfv_: *options object [19:28] brainproxy: Zell: the callback for http.get in the core NODE API is a listener for the vent 'response' on the http.clientRequest object that's returned by http.get [19:28] dominictarr: I can see that, what sort of object is it? [19:28] amindfv_: exports.CombineList takes a list of XML elements and "stitches" them into a string [19:28] amindfv_: oh sorry - its a string [19:29] jmoyers: Zell you generally have a callback whenever something is a blocking operation [19:29] jmoyers: the reason being, the main v8 context is single threaded [19:29] brainproxy: Zell: it's a convenience rather than having to do myReq.on('response', callback) [19:29] Zell: jmoyers: i know that, but i don't get his example >< [19:29] jmoyers: http.get goes to the network, yes? [19:29] jmoyers: thats going to take a while [19:29] fangel has joined the channel [19:29] jmoyers: so, you hand it a function and say [19:29] jmoyers: when you return, call my function [19:30] Zell: oh [19:30] jmoyers: it doesn't block because it uses a thread pool and libev in the background [19:30] Zell: i sse [19:30] Zell: without callback you can't expose the function [19:30] Zell: it's just impossible [19:30] jmoyers: im not sure what that means. in a typical blocking language it would be [19:30] jmoyers: reponse = http.get(options); [19:31] dominictarr: hey, doesn't http.request take a call back? how do you know when you get a response? [19:31] jmoyers: in node its http.get(options, function(){//callack}); [19:31] Zell: i got it thx :) [19:31] amindfv_: can you see how we would connect? [19:32] brainproxy: dominictarr: the callback in http.request is tied to the 'response' event, i'm pretty sure [19:32] NuckingFuts has joined the channel [19:33] NuckingFuts: Is there some way to check if NPM is installed, and if it is, to make my app call on it to install dependencies? [19:34] NuckingFuts: For modules, that is. My core has none. [19:34] jmoyers: uh [19:34] dominictarr: when you call req.end() it sends the request, but you need to listen to the req.on('response',... event so you know whats happening. [19:34] jmoyers: you could list npm as a dependency [19:34] jmoyers: and use it programatically [19:34] NuckingFuts: Well, I don't intend for my code to NEED NPM. [19:35] NuckingFuts: I just want to take advantage of it, if it's installed. [19:35] adambeynon has joined the channel [19:35] amindfv_: dominictarr: could that help us upload, or would it just tell us what the error was? [19:35] NuckingFuts: My code is designed to run out of the box. [19:35] dominictarr: NuckingFuts: npm is a good solid dependency and you should not be embasassed to depend on it! [19:36] NuckingFuts: dominictarr: How do I state a dependency? :S [19:36] jmoyers: if you're not intending on using npm, for some reason (are you?), you package it up with your project [19:36] jmoyers: if you're using npm, you use package.json [19:37] dominictarr: yeah, you can just bundle you dependencies. [19:37] jmoyers: npm help developers [19:37] NuckingFuts: I'm not releasing via NPM [19:37] jmoyers: you don't have to, to use a package.json [19:37] NuckingFuts: Orly? [19:38] dominictarr: how will you install dependencies if npm ism [19:38] dominictarr: isn't installed? [19:38] NuckingFuts: Tell the user to get NPM or get the dependencies themselves. [19:38] NuckingFuts: lol [19:39] dominictarr: right. you need a package.json [19:39] dominictarr: then they just go into your project and type npm update [19:39] mikeal: did somone ping me [19:39] NuckingFuts: I can figure out detection, I'm mostly wondering if there's any better way to call on NPM than calling up a new process or something >_> [19:39] mikeal: i had a notification but i don't know when it fired :) [19:40] NuckingFuts: Detection shouldn't be too hard, I can probably just try npm -v and see if it's a proper response [19:41] NuckingFuts: But as for calling on it, I'm hoping I won't hafta use a subprocess [19:42] dnuke has joined the channel [19:42] aurynn has joined the channel [19:43] amindfv_: anyone have a fix for our code? [19:43] amindfv_: the hackathon judges are approaching :) [19:43] rfay has joined the channel [19:45] jsulak has joined the channel [19:46] vikstrous has joined the channel [19:46] dominictarr: amindfv: you need to quickly read this: http://nodejs.org/api/https.html#https.request and compare the example to your code [19:47] dominictarr: oops, I'm blind. no syntax highlighting. does the request callback get called? [19:48] kohai: @gnumarcelo: Great article to start understanding Node.js: http://debuggable.com/posts/understanding-node-js:4bd98440-45e4-4a9a-8ef7-0f7ecbdd56cb #nodejs [19:48] piscisaureus_ has joined the channel [19:49] brownies has joined the channel [19:49] NuckingFuts: Ah nuts my NPM is outdated [19:49] NuckingFuts: My nodejs probably is too lol [19:50] NuckingFuts: Wow, my nodejs is still pretty recent yay [19:50] ahti_ has joined the channel [19:50] hellp has joined the channel [19:50] NuckingFuts: I'm on 0.4.7 IIRC [19:51] deedubs has joined the channel [19:52] Zell: NuckingFuts: awesome [19:52] jsulak has joined the channel [19:56] jmoyers: amindfv_ a little more detail is needed [19:56] jmoyers: i see this stack overflow question [19:56] jblanche has joined the channel [19:56] jmoyers: for one, the stuff in the function(res){} block is the data coming BACK from google [19:56] amindfv_: jmoyers: what can I clear up? [19:56] jmoyers: so not sure why you are += options.data [19:56] jmoyers: whats actually happening, are you getting a response? are you getting an error? [19:56] hassox has joined the channel [19:57] clevrmunke has joined the channel [19:57] amindfv_: jmoyers: nothing's happening (except for our own console output). [19:57] jmoyers: so nothing from res.on('data')? [19:57] _aron has joined the channel [19:57] amindfv_: jmoyers: no, nothing. [19:57] jblanche: Hi all, I'm using node (v 0.4.7) and npm (v 1.0.9-1) and when I install a new package, it goes in my ~/node_modules rather than the current dir. Am i missing something ? https://gist.github.com/1009339 [19:58] amindfv_: jmoyers: so are we not "pushing" data at all in our code, just "pulling"? [19:58] jmoyers: no -- you are just interpreting a response as a place to write data [19:58] jmoyers: sec [19:59] fly-away has joined the channel [19:59] jmoyers: you're likely getting something in the 400 range back from google [19:59] kohai: @NodeJSAtSO: Node.js Remote File Upload/POST/Write http://bit.ly/jamPGh (link: http://stackoverflow.com/questions/6245383/node-js-remote-file-upload-post-write?utm_medium=twitter&utm_source=twitterfeed) [19:59] jmoyers: i would dump res.statusCode [19:59] jmoyers: or the entire response object [20:00] jmoyers: https.request(options, function(res){ console.log(res.statusCode); }); [20:00] jmoyers: that should be 200 if things went well [20:00] jmoyers: if its 400 - 500, you have a problem with the structure of data you are pushing to google [20:00] jmoyers: (malformed xml, bad api keys etc) [20:01] kohai: @freelance_php: Twitter Node.js Set Up--By mmcdonald on Jun 5--Max Bid: $499 - http://subdomainz.com/7z8l [20:01] kohai: @hecticjeff: Taking the time to understand what node.js is doing behind the scenes has got my (very simple) test suite run time from 5s to 0.5s #win [20:01] amindfv_: jmoyers: ok, we're trying. Thanks! [20:02] amindfv_: jmoyers: 400 [20:02] jmoyers: so [20:02] jmoyers: thats malformed [20:02] jmoyers: bad request [20:02] jmoyers: i'd look very very carefully at the xml [20:02] asabil has joined the channel [20:02] jmoyers: it needs to be well formed per googles examples [20:05] NuckingFuts: ugh gotta update some shit on cygwin [20:06] Knu_ has joined the channel [20:06] jmoyers: amindfv_ you might want to dump the entire request object to see if you can gleen more specific error information. if you uncomment console.log('BODY ' + chunk); inside res.on('data", function(chunk){}), are you getting anything back? [20:06] Knu_ has left the channel [20:06] AhtiK has joined the channel [20:07] amindfv_: here's our XML: http://piratepad.net/dMyLZL5zz4 (line 50 on) [20:07] dominictarr: for the console.log in the request callback, incase the chunk event does happen. [20:07] amindfv_: it looks right to us [20:07] mawkor2 has joined the channel [20:07] jmoyers: dominictarr they are with statusCode [20:07] jmoyers: getting a 400 back [20:07] mawkor2: eh [20:07] mawkor2: anyone using duostack? [20:08] dominictarr: but 400 is bad request. [20:08] dominictarr: sorry. delete but. [20:09] NuckingFuts: Oh cool looks like I might be able to require('npm') [20:09] NuckingFuts: And I can detect if npm exists with a simple try ... catch [20:10] mynyml has joined the channel [20:10] djazz: is there a webkitview for node yet? [20:10] djazz: gui apps [20:10] NuckingFuts: Uh, I doubt it. Considering Node is in the console mostly :V [20:11] NuckingFuts: I think it'd be cool [20:11] djazz: yeah [20:11] NuckingFuts: But I haven't heard of any GUI toolkits for NodeJS, so I'd stick to ncurses or browser :P [20:12] jdalton has joined the channel [20:12] djazz: why limit V8/node to client/server, why not desktop? [20:12] djazz: :) [20:12] darshanshankar has joined the channel [20:12] NuckingFuts: I agree lol [20:12] jmoyers: amindfv_ thats not valid xml [20:12] NuckingFuts: But really, I can't see it happening [20:12] TooTallNate: djazz: check out topcube [20:12] jmoyers: amindfv_ use an xml validator on the example document from google = it works [20:12] NuckingFuts: Desktop apps ought to be compiled :P [20:12] jmoyers: yours = it doesn't [20:13] jmoyers: amindfv_ you are missing for one [20:13] jmoyers: at the end [20:13] jamescarr: grrr... this is the first time I had issues installing npm :( [20:13] niles|iPod has joined the channel [20:14] NuckingFuts: ugh [20:14] NuckingFuts: home/Peter/node/build/config.log') [20:14] NuckingFuts: ... [20:14] NuckingFuts: ACTION facepalms [20:14] dominictarr: amindfv: http://www.w3schools.com/xml/xml_validator.asp says your xml is invalid [20:15] jmoyers: he's gone ;-) [20:15] jmoyers: lowl [20:15] NuckingFuts: "/home/Peter/node/deps/libeio/wscript:13: error: the configuration failed (see '/home/Peter/node/build/config.log')" [20:15] NuckingFuts: WTF, Node? [20:15] NuckingFuts: Checking for function pthread_create : not found [20:15] NuckingFuts: Do I need that thing? [20:15] jmoyers: ACTION chuckles [20:16] paznicul has joined the channel [20:16] dominictarr: djazz: totally. as long as it's still html + js [20:16] djazz: there's WinBinder for php/windows.. [20:16] jamescarr: nom -g install express [20:17] jamescarr: :-P [20:17] jamescarr: nom nom nom [20:17] jdalton has left the channel [20:17] NuckingFuts: Why won't Node v0.4.8 install under Cygwin for me? [20:18] niles|iPod has joined the channel [20:19] Zell: NuckingFuts: because nodejs don't like you. [20:20] charlesjolley- has joined the channel [20:20] NuckingFuts: How is NodeJS doing under MinGW? [20:21] kohai: @JeromeMayeux: anyone know how to change what require.paths is initialised to by default...? #nodejs [20:22] ahti_ has joined the channel [20:23] clevrmunke has joined the channel [20:23] arpegius has joined the channel [20:24] Mrfloyd has joined the channel [20:24] adambeynon has joined the channel [20:25] kuya has joined the channel [20:26] clevrmunke: (a bit off topic) i'm use to developing desktop apps using a single language, compiling to a single output. is it just me or does html/js/css seem like a fragmented way to develop apps? maybe i haven't wrapped my head around how it all fits together [20:26] jtsnow has joined the channel [20:27] jamescarr: re-asking earlier question. What are people using to manage their node instances in DIY setups? Monit+upstart? [20:27] jmoyers: jamescarr im using forever [20:27] tbranyen: cluster here [20:27] jmoyers: http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever [20:27] TooTallNate: clevrmunke: fragmented how? [20:28] jmoyers: decent set of cli options for log files and such [20:28] jamescarr: thanks, I'll give it a try [20:29] jmoyers: clevrmunke might seem like it at first -- but having markup and css for views, javascript for controller and server logic is actually a good seperation of concerns [20:29] gonsfx: how can i parse out the title of a website when making a request with http.get? [20:29] toadflax has joined the channel [20:29] Rodtusker has joined the channel [20:29] Zell has left the channel [20:30] jmoyers: gonsfx i'll be shot for saying so, but a simple regex will work 95% of the time [20:30] tedsuo has joined the channel [20:30] kohai: @duaiwe: Surreal: googling for a node.js help, reading an irc chat log to find an answer, and seeing the irc nick of someone I know. [20:30] gonsfx: i guess i'll be shot twice - but i don't get where in the response the data is. [20:30] jamescarr: kohai, who? [20:30] gonsfx: :-D [20:31] jmoyers: uh -- build up a string as the response comes in [20:31] tomaw_ has joined the channel [20:32] jamescarr: hmmm [20:32] clevrmunke: @jmoyers so html/css for View, server for Model, and js for Controller. would a javascript mvc framework even be necessary if the layout of tech is inherently MVC? [20:32] jamescarr: forever blocks the current process [20:32] jamescarr: I have to exit [20:32] jamescarr: boo [20:32] jmoyers: no it doesn't james [20:32] jmoyers: use start [20:32] jmoyers: instead of just foreer [20:33] jmoyers: forever start [20:33] Aria has joined the channel [20:33] jamescarr: I did [20:33] jamescarr: forever start test/foo.js [20:33] sirdancealot has joined the channel [20:33] jmoyers: O.o doesn't block for me [20:33] jmoyers: blocks when i don't use 'start' [20:33] jamescarr: jamescarr@leadmanagement:~$ forever test/foo.js [20:33] jamescarr: info: Forever processing file: test/foo.js [20:33] jamescarr: Server running at http://204.232.202.91:80/ [20:34] jmoyers: ACTION chuckles [20:34] jmoyers: you totally don't have 'start' there [20:34] jamescarr: oops [20:34] davidcoallier has joined the channel [20:34] eyesUnclouded has joined the channel [20:34] jamescarr: facepalm [20:34] jmoyers: clevrmunke it becomes necessary [20:34] jmoyers: if you want common code on the server and client [20:34] jmoyers: a nice event system [20:34] brweber2 has joined the channel [20:34] jmoyers: some form of pub sub, a sane templating system [20:34] mustalac has joined the channel [20:35] jmoyers: realtime aspect and plugging that into your application logic, like socket.io [20:35] JoshC1 has joined the channel [20:35] jmoyers: its not super difficult to build one up in a few hundred lines, but backbone.js and spine.js are both ways of doing that [20:36] clevrmunke: so many javascript frameworks to choose from... [20:36] jmoyers: if you're dipping your toe in [20:36] jmoyers: i wouldn't even choose a framework [20:37] jmoyers: the 'frameworks' are usually a few hundred lines, like i mention [20:37] caolanm has joined the channel [20:37] jmoyers: and add a bunch of sugar [20:37] bnoordhuis has joined the channel [20:38] NuckingFuts: The only framework I've ever used in JS was jQuery [20:38] NuckingFuts: And that's mostly for the nice CSS Selector engine, Sizzle. [20:38] clevrmunke: jquery seems to have most of the mindshare [20:38] jmoyers: jquery is a slightly different beast.. [20:38] NuckingFuts: Though the utilities it provides are also nice. [20:38] NuckingFuts: The syntax can, of course, be a tad clunky at times. [20:39] jmoyers: the toolset is mostly dom manipulation [20:39] jmoyers: not really mvc anything [20:39] jmoyers: though jresigs microtemplate thing is cool $.tmpl() [20:39] NuckingFuts: Yeah, I never consciously think about MVC. [20:39] Bj_o_rn has joined the channel [20:39] stepheneb has joined the channel [20:39] clevrmunke: so beyond simple webpages. what about frameworks for RIAs? [20:39] clevrmunke: tech used? [20:39] NuckingFuts: I mostly just let it grow organically into a good MVC-ish structure. [20:40] NuckingFuts: RIA? [20:40] liar has joined the channel [20:40] clevrmunke: rich internet applications... think Flex [20:40] jmoyers: clevrmunke thats backbone.js, spine, sproutcore (heavy), etc [20:40] bergie has joined the channel [20:40] djazz has joined the channel [20:40] jmoyers: people generally add socket.io to the mix if they are doing real time [20:40] jmoyers: or just stick to rest http architecture if not [20:40] NuckingFuts: I wanted to learn Sproutcore, it seemed quite epic, but it was a PITA to hook into NodeJS :/ [20:41] mawkor2 has joined the channel [20:41] charlesjolley-: NuckingFuts: what made it hard? [20:41] mawkor2: anyone know wtf is wrong with duostack? [20:41] jmoyers: ajax.org/sproutcore/cap are a bit too much [20:41] clevrmunke: what do you guys use in personal projects? [20:41] mawkor2: and/or how to clear npm cache in dotcloud? [20:41] NuckingFuts: charlesjolley-: well, Sproutcore wasn't built for NodeJS [20:41] NuckingFuts: I think it was Ruby or Python or something [20:41] NuckingFuts: Can't remember [20:42] gonsfx: how can i access the body when doing http.get(options, function(res) { ... }); ? [20:42] NuckingFuts: Either way, I gave up on that. [20:42] jmoyers: clevrmunke personal projects, i use my own stuff [20:42] charlesjolley-: were you trying to get sproutcore running on nodejs directly [20:42] charlesjolley-: or using nodejs as a backend? [20:42] NuckingFuts: I've been contemplating creating my own UI toolkit, without heavy-ass CSS shit. [20:42] NuckingFuts: charlesjolley-: NodeJS backend [20:43] m00p has joined the channel [20:43] beriberikix: NuckingFuts: check out Ender by @ded [20:43] NuckingFuts: I find that UI toolkits are way too bloated these days. [20:43] beriberikix: https://github.com/ender-js/Ender [20:43] NuckingFuts: And end up providing the kitchen sink, but nothing else. [20:43] luke` has joined the channel [20:44] jmoyers: ui toolkits are kitchen sink [20:44] jmoyers: by definition [20:44] jmoyers: if you didn't want kitchen sink, you'd use html and css [20:44] shajith_ has joined the channel [20:44] uchuff has joined the channel [20:44] clevrmunke: so i'm looking at jquery, mootools, dojo, backbone...anything node.js specific? (ie. integrates really well) [20:45] jmoyers: jquery, mootools, and dojo are mostly client side [20:45] tomtomaso has joined the channel [20:45] NuckingFuts: jmoyers: I want a UI toolkit that will provide me with the features that HTML lacks, such as sliders and such, along with replacements for native elements that are hard to CSS [20:45] Epeli: you can use backbone models on Node.js [20:45] jmoyers: Epeli++ [20:45] v8bot: jmoyers has given a beer to Epeli. Epeli now has 1 beers. [20:46] clevrmunke: well, NuckingFuts mentioned having trouble hooking into node.js...just wondering if there's anything along those lines in the others [20:46] clevrmunke: from sproutcore [20:46] catshirt has joined the channel [20:46] NuckingFuts: clevrmunke: Sproutcore is just really bloated, I think is the problem. [20:46] jmoyers: completely different scale of library [20:46] NuckingFuts: So it's FEASIBLE, but it's just heavy and hard to coerce away from the natural backend. [20:46] sirdancealot has joined the channel [20:46] clevrmunke: backbone would be the most streamlined of all the frameworks mentioned? [20:47] jmoyers: sproutcore is on the order of almost a megabyte [20:47] clevrmunke: wow [20:47] jmoyers: backbone is at most a few k [20:47] NuckingFuts: I basically want a UI engine that would provide me with modern replacements for common features of a Geocities website, like frames. [20:47] jmoyers: thats.. heavy man [20:47] NuckingFuts: I would LOVE for a framework to let me build simple frame-like structures. [20:48] jmoyers: GWT, sproutcore, ajax.org -- thats their bread and butter [20:48] davidcoallier has joined the channel [20:48] jmoyers: you want to stick with more 'native' you go http://jqueryui.com/demos/ and something similar [20:48] NuckingFuts: jQuery UI is far too weak for me :/ [20:48] NuckingFuts: It lacks the things I want most [20:49] NuckingFuts: And it's bloated up with the CSS shit [20:49] jmoyers: heh [20:49] jmoyers: don't know what to tell you [20:49] xandrews has joined the channel [20:49] clevrmunke: u guys ever use Flex 4.5? [20:49] jmoyers: these people are real, and they built tools to solve their own problems [20:49] jmoyers: open source [20:49] charlesjolley-: NuckingFuts: sprout core uses any backend though. it is agnostic [20:49] jmoyers: i've used flex [20:49] jmoyers: not 4.5 [20:50] clevrmunke: which version? [20:50] NuckingFuts: I'll probably build my own UI toolkit [20:50] jmoyers: no idea -- it was about 1.5 years ago [20:50] clevrmunke: probably 3 [20:50] clevrmunke: did u like it? [20:50] NuckingFuts: charlesjolley-: It's built with another backend by default though. [20:50] jmoyers: no [20:50] NuckingFuts: Flash is shit. [20:50] charlesjolley-: NuckingFuts: no its not [20:50] NuckingFuts: I'll just go right out and say that. [20:50] jmoyers: flash isn't shit dude [20:50] tanepiper: ACTION now thinks ExtJS is terrible, Sencha really fsked up 4 [20:50] charlesjolley-: it talks to any backend. The current version ships with build tools which are written in ruby [20:51] MooGoo: yea flash gets a bad rep [20:51] charlesjolley-: but those are run before you deploy the app [20:51] clevrmunke: flash/flex have really nice dev environments [20:51] MooGoo: just like java gets a bad rep from crappy applets [20:51] charlesjolley-: they do not impact the server [20:51] charlesjolley-: But if you are worried about the Ruby build tools, SproutCore 2.0 is much smaller and eliminates the build tools also http://blog.sproutcore.com/announcing-sproutcore-2-0/ [20:51] NuckingFuts: charlesjolley-: Oh, I see, I have to build. That's retarded. Ooh, smaller? [20:51] NuckingFuts: I might try that. [20:51] NuckingFuts: It looked like it had the features I wanted, looking at the examples. [20:51] jmoyers: i didn't like flex mostly because of how they handled doing things like datasouce (web service/database) abstraction, and the fact that its an integrated development environment [20:52] NuckingFuts: And Flash is better than Java, sure, but JS > AS3 [20:52] NuckingFuts: jmoyers: Flex has a separate non-IDE environment too [20:52] jmoyers: yes [20:52] NuckingFuts: I remember using it a while back when I went and tried to teach myself AS3 [20:52] jmoyers: the other thing is that every single application that uses flex [20:52] jmoyers: looks almost identical [20:52] NuckingFuts: Then I gave up because of this one fucking TypeError :/ [20:53] jmoyers: the ui widgets they provide for scrolling, tables, data input [20:53] NuckingFuts: jmoyers: lol so true [20:53] jmoyers: its so easy to use, people don't tend to customize [20:53] jmoyers: which is good and bad [20:53] jmoyers: it costs less to develop [20:53] NuckingFuts: jmoyers: HTML is also easy to use, but people still toss in CSS ;-) [20:53] jmoyers: but you get something that looks middle of the road imo [20:53] clevrmunke: in flex 3 it was very hard to skin your app. flex 4 is a major rewrite. it's now very easy to skin ur app [20:53] jmoyers: dude, i have no idea what you're smoking [20:53] jmoyers: css is completely necessary [20:54] systemfault: Indeed. [20:54] NuckingFuts: jmoyers: Making your site look unique is not. [20:54] jmoyers: haha [20:54] NuckingFuts: You can use CSS without making your site unique, but people still do. [20:54] systemfault: HTML is to form the document, CSS to style it, JS to add behaviors to it. [20:54] systemfault: It's basics.. [20:54] jmoyers: clevrmunke thats good that they've done that [20:54] jmoyers: maybe they'll get traction [20:55] NuckingFuts: God I hope they don't [20:55] jmoyers: i do doubt it though -- browsers are moving about 3 times as fast as they were a few years ago [20:55] NuckingFuts: I would much prefer if we move towards HTML/CSS/JS web apps [20:55] NuckingFuts: So much faster, IMO [20:55] systemfault: Windows 8 seems to go that way. [20:55] MooGoo: oh god [20:55] MooGoo: windows 8 [20:55] MooGoo: that demo made me sad [20:55] jmoyers: flash is still ubiquitous when it comes to games [20:56] NuckingFuts: jmoyers: Sure, it's great for games. [20:56] clevrmunke: i've been using unity for games. i love it [20:56] NuckingFuts: But for building a website or web app? NEVER. [20:56] jmoyers: unity is great [20:56] jmoyers: except [20:56] jmoyers: last time i checked [20:56] MooGoo: I refuse to get a touchscreen desktop computer [20:56] jmoyers: they use a plugin to deploy to the web [20:56] jmoyers: which is ... a non-start [20:56] ebryn has joined the channel [20:57] blup has joined the channel [20:57] digiwano: i've had a lot of fun with impact [20:57] clevrmunke: yes, they're plugin sucks. low penetration too. however, most people use it to build apps for a certain platform (iOS) [20:57] jmoyers: maybe they're contemplating adding webgl support -- if they do that, i think they'll flourish on the web [20:57] tilgovi has joined the channel [20:57] tilgovi has joined the channel [20:57] jmoyers: clevrmunke yes -- its a bad ass environment. especially for the indie developer [20:57] clevrmunke: the big news right now is they'll be supporting molehill (flash 3d api). you will be able to publish unity games to the flash player: http://blogs.unity3d.com/2011/02/27/unity-flash-3d-on-the-web/ [20:58] jmoyers: though they out to use js instead of mono~ [20:58] systemfault: The way I feel is that desktop computers will be soon dead. [20:58] systemfault: All replaced with ipads.. iphones.. etc.. [20:58] jmoyers: thats a 'safe' move for them [20:58] clevrmunke: that's why i like unity. they target any and all platforms or plugins. [20:58] clevrmunke: or even better, no plugin (if possible) [20:58] MooGoo: systemfault does that mean real keyboards are dead too? [20:59] brownies- has joined the channel [20:59] jmoyers: desktops are not dead [20:59] MooGoo: are people going to start typing up thesises on touchscreens [20:59] systemfault: MooGoo: I don't think so, they'll be less used though [20:59] digiwano: i wouldn't say dead at all no [20:59] systemfault: Desktop computers would be for work... [20:59] MooGoo: people still do work [20:59] digiwano: but i do think they're going to start drastically changing in the next 5-10 yrs [20:59] systemfault: devs... secretaries.. [20:59] jmoyers: yes [20:59] jmoyers: but not changing to small devices [20:59] NuckingFuts: Hmmm... I jsut read the Wikipedia article on Windows 8, and it sounded great... And then, I read the part about the new start menu. Fuck that. [21:00] jmoyers: tablets are popular, but they are niche [21:00] jmoyers: changing to web based, yes [21:00] jmoyers: chromeos model [21:00] jmoyers: thats going to take 15 years though [21:00] MooGoo: all I saw about windows 8 was some fucked up touchscreen oriented start page [21:00] systemfault: And even workers, we might see ipad style devices that just need to be docked so you can use real keyboards on them [21:00] digiwano: i think if anythign they'll start being a lot more interoperable with tablets [21:00] MooGoo: that looked like Windows Phone 7 [21:00] systemfault: So the minute you need to show your coworker something, you can just... take the damn screen with you [21:01] MooGoo: I dont want to take my 24" widescreen with me anywhere [21:01] MooGoo: computers were so much cooler back in the 90s [21:02] MooGoo: before normal people started using them [21:02] systemfault: You could have a second bigger screen.. that turns on when you plug your ipad-style device on a dock [21:02] systemfault: But most people.. [21:02] MooGoo: I dont see it like that... [21:02] systemfault: They don't need desktop computers.. [21:02] clevrmunke: jmoyers: my background is flex and given your experience with it, what js framework or style of development (if any) would you recommend that is similar to flex? [21:02] MooGoo: seems like we'd be moving towards having the ipad style device as a simple remote desktop [21:03] systemfault: They're facebook/email/msn/web people [21:03] MooGoo: to some server [21:03] MooGoo: somewhere [21:03] jmoyers: clevrmunke hmm [21:03] jmoyers: well to tell you the truth, i wouldn't recommend that style of development for pure web [21:03] systemfault: MooGoo: That's possible... the whole "cloud" movement. [21:03] jmoyers: but flex is similar to the heavier ui toolkits i mentioned [21:03] MooGoo: once bandwidth is high enough and has sufficent coverage [21:03] systemfault: MooGoo: I fear this will be the end of privacy.. [21:03] MooGoo: yes [21:04] skohorn has joined the channel [21:04] jmoyers: is mxml still around? [21:04] clevrmunke: oh yeah [21:04] MooGoo: then you really will have no control whatsoever [21:04] MooGoo: and "normal" people will eat it up [21:04] systemfault: MooGoo: I mean, even right now.. I can save my things on my HD... but with the cloud. [21:04] jmoyers: there really isn't anything analogous to that [21:04] clevrmunke: html [21:04] remysharp has joined the channel [21:04] systemfault: MooGoo: I become a slave a some company.. [21:04] jmoyers: yes, but html isn't widgets [21:04] clevrmunke: laying out the structure of your view [21:04] jmoyers: in vanilla web dev [21:04] clevrmunke: using markup [21:04] jmoyers: you'd do html to do the layout [21:04] systemfault: MooGoo: If my credit card fucks up when it's payment time, they're going to freeze all my stuff? [21:04] MooGoo: people love the iphone/pad.....and they have no control over the content on the device [21:05] MooGoo: perhaps [21:05] jmoyers: and then if you needed to add say, a calendar widget (some complex javascript), a lot of people would turn to something like jquery [21:05] MooGoo: or [21:05] clevrmunke: yes, i'm saying that would correspond to mxml  [21:05] MooGoo: give you a nice fine [21:05] MooGoo: they like doing that [21:05] jmoyers: and do $('#calendar').calendarize(); with some calendar widget [21:05] systemfault: Pure evil :( [21:05] MooGoo: most people just dont care [21:06] MooGoo: ill always have my unix shell tho [21:06] MooGoo: no one can take that away from me [21:06] jmoyers: http://code.google.com/webtoolkit/ - this is the type of thing that does flexy type stuff. it completely abstracts away the html/css [21:06] bingomanatee has left the channel [21:07] jmoyers: when i interview people, if this is all they have experience with (these types of frameworks), i usually cant hire them [21:07] jmoyers: they cant get down to the bare metal [21:07] clevrmunke: no thx [21:07] kohai: @jerrysievert: updated date-utils for #nodejs to 1.0.0 with an extra formatting goodie and clean jshint. npm install date-utils http://bit.ly/kLVasK (link: https://github.com/JerrySievert/node-date-utils/) [21:09] jmoyers: ajax.org is not java based -- http://ui.ajax.org/#demos [21:09] jmoyers: but they do all sorts of whacky widgets, and data binding, and have their own markup [21:09] jmoyers: etc [21:09] jmoyers: that type of thing seems closest to flex to me -- but maybe thats because im inexperienced with it [21:10] stonebranch has joined the channel [21:13] bingomanatee has joined the channel [21:13] awenkhh has joined the channel [21:13] clevrmunke: jmoyers: thx for all ur answers [21:13] jmoyers: np [21:14] mwhooker has joined the channel [21:14] kohai: @STLJS: STLJS #Meetup :: Have you filled out the Google doc with your preferred recurring date/s? http://t.co/XnFeFXQ #javascript #nodejs #StLouis (link: http://www.meetup.com/passport/?returnUri=http%3A%2F%2Fwww.stljs.org%2Fpolls%2F293001%2F%3FpollId%3D293001) [21:15] rictic has joined the channel [21:20] harth has joined the channel [21:20] mbrevoort has joined the channel [21:29] AvianFlu has joined the channel [21:30] gonsfx: is it possible to cancel a chunked response before response.on('end') ? [21:31] fr0stbyte has joined the channel [21:33] dan_manges has joined the channel [21:34] dan_manges has joined the channel [21:35] Marak: gonsfx: how do you mean cancel? [21:35] jmoyers: gonsfx i'd imagine .abort() [21:35] gonsfx: im retrieving various chunks in response.on('data') callback - i'm parsing those by regex to get the pages title - if i got that, i dont need the other chunks [21:35] xandrews has joined the channel [21:36] gonsfx: im wondering if theres any way to abort the response - or if i'm bound to receive the whole body each time. [21:36] gonsfx: jmoyers: can't find it in the docs :) [21:36] jmoyers: ACTION points [21:36] jmoyers: http://nodejs.org/docs/v0.4.8/api/http.html#request.abort [21:36] Marak: jmoyers: .abort() is for request object no? [21:37] jamescarr has joined the channel [21:37] jmoyers: you don't think it would stop the response stream? [21:37] jmoyers: i'd guess thats what it was for [21:37] jmoyers: but, the docs are one line there ;-) [21:37] Shinuza has joined the channel [21:37] zhami has joined the channel [21:38] rauchg has joined the channel [21:38] Marak: gonsfx: im not sure if you can do that right now with the response object, maybe you can? maybe you want to post to mailing list, get a better answer [21:38] jmoyers: https://github.com/joyent/node/blob/master/lib/http.js#L927-933 [21:38] Marak: gonsfx: i'd imagine you could do it with the net module, but it would require a lot more work [21:39] gonsfx: thanks guys :) [21:41] gonsfx: jmoyers is right, i don't receive any more chunks when aborting the request [21:41] Marak: nice [21:41] mdwright_laptop has joined the channel [21:41] uchuff has joined the channel [21:41] gonsfx: yeah :) [21:42] rictic has joined the channel [21:43] shanez has joined the channel [21:43] niftylettuce has joined the channel [21:44] brownies has joined the channel [21:45] kohai: @phil_parsons: 7 Free E-Books and Tutorials for Learning and Mastering Node.js by @klintron http://t.co/TXJ24pV via @RWW (link: http://www.readwriteweb.com/hack/2011/04/6-free-e-books-on-nodejs.php) [21:50] kohai: @hising: Prediction: 2012 web framework named "xxx" based on Node.js will be the new RoR. [21:50] kohai: @HNTweets: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io): http://bit.ly/jcnGam Comments: http://bit.ly/mfiO7w (link: http://logio.org/) [21:51] kohai: @hnfirehose: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io): http://logio.org/ [21:52] philippkueng_ has joined the channel [21:54] a2800276 has joined the channel [21:59] hij1nx has joined the channel [22:00] devongovett has joined the channel [22:00] devongovett has left the channel [22:00] brownies has joined the channel [22:01] jsulak: Question: What's the standard node package for postgres these days? [22:01] michaelhartau has joined the channel [22:05] devongovett_ has joined the channel [22:05] kohai: @jedisct1: Log.io - Real-time log monitoring in your browser: http://logio.org/ #nodejs [22:06] jamescarr has joined the channel [22:09] davidcoallier has joined the channel [22:10] mike5w3c_ has joined the channel [22:11] jamescarr: hmmm... it's been a long time... how do you use sass with express? [22:12] davidban_ has joined the channel [22:13] timmywil has joined the channel [22:13] jmoyers: jamescarr filter [22:13] jamescarr: example? [22:13] jmoyers: err [22:13] jmoyers: what template engine are you using [22:14] jmoyers: or are you looking to just compile outside of template (not inlined) [22:14] jmoyers: in jade itd be :sass [22:15] jamescarr: compiling outside of the templatr [22:15] jmoyers: then its express.compiler i believe [22:15] jmoyers: app.use(express.compiler({ src: __dirname + '/public/stylo', enable: ['less']})); etc [22:16] Croms has joined the channel [22:17] kohai: @WoodChips: I liked a @YouTube video http://youtu.be/jo_B4LTHi3I?a Introduction to Node.js with Ryan Dahl [22:18] lmorchard has joined the channel [22:19] migimunz has joined the channel [22:19] kohai: @mape: Playing with a prototype starcraft2 poll system used as video overlay for @day9tv. HTML widget and #nodejs = <3 http://day9widgets.mape.me/ [22:20] kohai: @1cdecoder: Сегодня играл в Герои. Двоякое ощущение. В общем получил некоторое удовольствие от процесса. Но с другой стороны, лучше бы #nodejs поколупал [22:20] itissid has left the channel [22:20] Swimming_bird has joined the channel [22:23] djazz has left the channel [22:25] mscdex: NuckingFuts: there are some gui toolkits for node [22:25] mscdex: i think creationix even did bindings to webkitview or something [22:26] kohai: @rodrigoalvieira: Meu site está de pé novamente http://rodrigo3n.com/ #nodejs #nodester [22:27] kohai: @rodrigoalvieira: Meu site está de pé novamente http://rodrigo3n.com/ #nodejs #nodester - Agora é consertar os meus erros com CSS. [22:27] gxblast has joined the channel [22:27] pigmej1 has joined the channel [22:28] kohai: @hnfirehose: Javascript, node.js and for loops: http://bit.ly/kX94HH (link: http://blog.mixu.net/2011/02/03/javascript-node-js-and-for-loops/) [22:30] kohai: @jashkenas: Sweet. Underscore and CoffeeScript take the #1 and #2 spots as Node.js dependencies this afternoon: http://t.co/lb7SiTn (link: http://search.npmjs.org/) [22:31] asabil has joined the channel [22:32] michaelhartau has joined the channel [22:32] norviller has joined the channel [22:33] lmorchard has joined the channel [22:36] pigmej has joined the channel [22:37] hassox has joined the channel [22:37] raidfive has joined the channel [22:37] leere has joined the channel [22:38] leere: ACTION dances [22:38] leere: i had no idea that desktop scriping implementations of javascript existed! [22:39] ian-london has joined the channel [22:39] kohai: @mhsutton: @david_harvey bizarre bug in faye on rails vs faye on node.js - can't be doing with faffing with. #node rocks though. [22:39] gkatsev: leere: welcome to the awesomeness that is node [22:40] kohai: @tek_news: HNews: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io) http://bit.ly/likQYC #monitoring #js (link: http://logio.org/) [22:40] TomY has joined the channel [22:40] kohai: @tomgallacher89: Just updated #gzippo to 0.0.2, no new features just bug fixes. #nodejs #connect #express [22:40] bergie has joined the channel [22:41] leere: http://www.amazon.com/dp/1449398588/ is this a decent book? [22:41] baudehlo: we don't know yet. It's not published. [22:41] leere: gkatsev: thank you! [22:41] leere: oh. [22:41] leere: baudehlo: i somehow didnt notice that [22:42] kohai: @mknittig: Habe gerade die starke Tendenz mein @nodecampeu Ticket abzugeben. Hat jemand Interesse daran? #nodejs [22:42] leere: in the meantime, i need a tutorial for node.js for someone new to javascript [22:42] leere: i know a tiny bit, enough to make colors change [22:43] markwubben has joined the channel [22:43] leere: but i need to be able to open sockets, read and write files, all that fun stuff [22:43] jmoyers: http://howtonode.org/ [22:43] leere: thank you, jmoyers [22:44] leere: i really appreciate it [22:44] jmoyers: also, this old thread http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-nodejs [22:44] jmoyers: 'old' meaning a year ago [22:45] kohai: @newsyc20: Show HN: Log.io (Realtime log monitoring, powered by node.js + socket.io) http://logio.org/ (http://bit.ly/mRFfRe) #trending (link: http://news.ycombinator.com/item?id=2622909) [22:45] leere: ACTION finds http://www.nodebeginner.org/#head3 [22:46] kohai: @tomgallacher89: fyi you can get #gzippo 0.0.2 on npm and on github http://j.mp/jkFs3x #nodejs #connect #express (link: https://github.com/tomgallacher/gzippo) [22:49] hkjels: What library is recommended for json-data modification? [22:50] jmoyers: hkjels what do you mean json-data modification? like modifying properties in an object? [22:51] jmoyers: if its deeply nested, are complex, http://jsonselect.org/#overview [22:51] kohai: @maraksquires: @voodootikigod I just had @dominictarr show me a bad ass #nodejs CI server. We are testing it now...I'll link you shortly... [22:51] hkjels: it's not very complex. I just want to make wrap an existing object and give it a key [22:51] hkjels: (-) make [22:52] jmoyers: var wrapped = {}; wrapped[key] = object; [22:52] jmoyers: unless im misunderstanding [22:53] kriszyp has joined the channel [22:53] davidcoallier has joined the channel [22:53] philtor has joined the channel [22:54] kohai: @MrNibbles: Neat realtime log monitor built in node.js - http://t.co/HqGN0AM (link: http://logio.org/) [22:54] er1c_ has joined the channel [22:54] MrNibbles: jees, id forgotten the bot did that [22:55] MrNibbles: nice work from the URL shortener there, made it longer :[ [22:55] jmoyers: ;-) [22:57] coreb: given a list of objects with the properties foo and bar, what's the easiest way of mapping the objects to another list with just the foo property? [22:58] jmoyers: i'd use map from underscore [22:58] jdalton has joined the channel [22:58] jmoyers: set = _.map(collection, function(c){ return {foo: c.foo}; ); [22:58] jdalton has left the channel [22:58] ian-london has left the channel [22:58] jmoyers: or _.pluck [22:58] MrNibbles: jmoyers++ [22:58] v8bot: MrNibbles has given a beer to jmoyers. jmoyers now has 2 beers. [22:59] coreb: jmoyers: great, I'm not familiar with underscore, is that something in v8? [22:59] jmoyers: no, library [22:59] MrNibbles: coreb: http://documentcloud.github.com/underscore/ [22:59] jmoyers: introduces higher order functional stuff [23:00] MrNibbles: bloody handy [23:00] jmoyers: things that would be nice if they were just on Array.prototype ;-) [23:00] hkjels: jmoyers: I've tried that without much luck [23:00] hkjels: somehow my object is cleared [23:01] digiwano: underscore is one of my very favorite things in the whole world [23:01] jmoyers: not sure, you need to pastebin or gist your code [23:01] jrmiddle has joined the channel [23:03] jrmiddle: Question about the crypto in 0.4.8... any takers? [23:05] MrNibbles: jrmiddle: ssl? [23:05] __tosh has joined the channel [23:06] jrmiddle: nah, just generally creating digests... what are the allowed formats for data? can I use a byte array, a buffer, or do I have to encode to a string prior to calling .update() [23:06] jrmiddle: ? [23:06] eggsby has joined the channel [23:07] m0neyman has joined the channel [23:08] rictic has joined the channel [23:08] jmoyers: jrmiddle https://github.com/joyent/node/blob/master/src/node_crypto.cc#L2560 [23:08] jmoyers: imagine string or buffer [23:09] MrNibbles: http://nodejs.org/docs/v0.3.1/api/crypto.html#signer.update [23:09] pen has joined the channel [23:09] MrNibbles: oh [23:09] jrmiddle: ah sweet [23:09] rictic has left the channel [23:09] perlmonkey2 has joined the channel [23:09] jrmiddle: ACTION was lazy [23:09] MrNibbles: i was linking an old version [23:09] jmoyers: ACTION doesn't care, questions give him procrastination topics [23:09] MrNibbles: http://nodejs.org/docs/v0.4.8/api/crypto.html [23:10] MrNibbles: bah its late i should go to bed [23:10] jrmiddle: yah, i *did* actually look there :) but didn't see any mention of buffers. [23:10] xeodox: What's the best way to split up my app.js into multiple files ? It's getting too big because all my code is in that file. Are there any modules that help with this? [23:10] hkjels: jmoyers: There's quite a bit of code there, so I just gisted an explanation of the issue : https://gist.github.com/1009526 [23:11] jrmiddle: have raw bytes, didn't want them being sent through the utf-8 spanking machine. [23:11] jrmiddle: thanks MrNibbles [23:11] MrNibbles: xeodox: try making some modules yourself, get comfortable with module.exports [23:11] eggsby: does anyone have experience with tobi? for some reason this code isn't working: http://pastie.org/2024751 [23:11] MrNibbles: jrmiddle: welcome [23:11] jmoyers: hkjels there's some other problem them [23:12] jmoyers: *then [23:12] xeodox: MrNibbles: should I just have each "controller" in app.js call a function? (which got exported from another file) [23:12] hkjels: might be restler. I'll have a look [23:12] jmoyers: v8: var d = {}; var d2 = {something:'here'}; d['settings'] = d2; console.log(d); [23:12] v8bot: jmoyers: {settings:{something:"here"}} [23:12] [[zz]] has joined the channel [23:13] jmoyers: xeodox what framework are you using? [23:13] jmoyers: is this an express app? [23:13] eggsby: if not tobi, does anyone know any good test frameworks for node? [23:13] zhami has joined the channel [23:13] xeodox: jmoyers: Express [23:13] jmoyers: there are a few things you can do [23:13] jmoyers: split each route out into a different file is a common one [23:13] jmoyers: then module.exports = function(req, res){} [23:14] jmoyers: then in your main application file, app.get('someroute', require('someroute')); [23:14] jmoyers: another common thing is to read all the files in a particular directory, say routes/ [23:15] jmoyers: then come up with a trival format, say { method: 'post', route: '/someroute', handler: function(req, res){}} [23:15] jmoyers: then load all the routes in programmatically, from that folder [23:15] xeodox: jmoyers: that's really complicated lol. Is there a tutorial for this to split things up? [23:15] mwhooker has joined the channel [23:15] kblake has joined the channel [23:16] jmoyers: haven't seen one.. [23:17] xeodox: If I have a file with 10 functions, how do I export them all, without exporting each one? [23:18] cardona507 has joined the channel [23:18] jmoyers: module.exports = {first:function(){}, second:function(){}} [23:18] xeodox: ahh ok thanks [23:19] xeodox: jmoyers: is there a way to export all? [23:19] xeodox: without copy and psting each one [23:20] jmoyers: uh [23:20] jmoyers: depends on what you mean [23:20] jmoyers: generally, no [23:21] jmoyers: we're talking trivial amounts of code [23:21] coyo|2 has joined the channel [23:21] xeodox: what if I have 100 functions [23:22] jmoyers: 100 functions in a flat namespace? [23:22] xeodox: yea [23:22] jmoyers: you either have to stick them on an object [23:22] jmoyers: or module.exports = name = function(){} [23:23] jmoyers: if its a 'class', meaning you have a bunch of Class.prototype.method = function(){} [23:23] xeodox: i see [23:23] jmoyers: people often just export Class, module.exports.Class = Class; [23:23] jmoyers: at the end of the file [23:23] kohai: @victusfate_feed: Javascript, node.js and for loops « Mixu's tech blog: http://bit.ly/lGxin2 (link: http://blog.mixu.net/2011/02/03/javascript-node-js-and-for-loops/?utm_source=twitterfeed&utm_medium=twitter) [23:24] Melkor_ has joined the channel [23:26] mikeal has joined the channel [23:26] dnuke has joined the channel [23:26] FredrIQ has joined the channel [23:28] xeodox: jmoyers: Suppose I move all the stuff out of app.js into 3 different files and export their functions. [23:28] eggsby has left the channel [23:28] xeodox: Do I have to do "requires" for each of them [23:28] xeodox: I dont want to copy and paste all the requires into 3 files [23:28] TomY has joined the channel [23:29] tbranyen: xeodox: you could pass object references around them [23:29] jmoyers: module scope is not global [23:29] tbranyen: but that would require some kind of init for each one [23:29] jmoyers: it depends on what you need [23:29] jmoyers: if you just need the request and response object [23:29] jmoyers: then you don't need anything [23:29] xeodox: I just want to "share" the requires (redis, mailer, mongoose, drivers, a lot).. [23:29] xeodox: the functions will all use them [23:29] jmoyers: nope [23:30] xeodox: I want to be able to create a universal file with those requires, and then have all the files USE that requires file [23:30] jmoyers: yes...? [23:30] jmoyers: / global.js module.exports.thing = require('thing'); [23:31] jmoyers: require('global').thing [23:31] jmoyers: and list your deps there [23:31] jmoyers: though i'd point out [23:31] jmoyers: thats not much better than just requiring your dependencies directly [23:32] ryanfitz has joined the channel [23:33] kohai: @MMM: Log.io - Real-time log monitoring in your browser, powered by node.js & socket.io http://t.co/7DMEgQE (link: http://logio.org/) [23:34] avalanche123 has joined the channel [23:35] davidban_ has joined the channel [23:36] jgv has joined the channel [23:36] jdgecage has joined the channel [23:36] davidcoallier has joined the channel [23:38] vipaca has joined the channel [23:40] jrmiddle has joined the channel [23:40] leere has joined the channel [23:42] kohai: @lxbarth: Wish i thought of that 4 years ago “@maxogden: i want to rewrite http://t.co/UWToXBy as a couchapp with node.js flavored @mapbox.” (link: http://managingnews.com/) [23:42] abraxas has joined the channel [23:43] jacobolus has joined the channel [23:44] SvenDowideit has joined the channel [23:45] pquerna: has anyone played with using Caja & node? [23:45] digiwano: xeodox: maybe you need to rethink how you're refactoring things here? if its annoying enough to have to have all those require()s, its usually even more annoying duplicating the logic that uses each of them in every module [23:49] mdwright_laptop has left the channel [23:51] lukstr: anyone know of a _working_ oauth2 server implementation? with source code? [23:54] markstory has joined the channel [23:55] F1LT3R has joined the channel [23:55] michaelhartau has joined the channel [23:56] shajith_ has joined the channel