[00:00] derferman_ has joined the channel [00:00] bruse: do you guys think a video of ryans talk will be posted online? [00:01] Booths has joined the channel [00:01] cardona507: they usually are [00:01] ben_alman has joined the channel [00:05] jakehow has joined the channel [00:05] boaz has joined the channel [00:07] marienz has joined the channel [00:08] _announcer: Twitter: "nice over 73 people rsvp yes to LA node.js meetup tonight!" -- temojin. http://twitter.com/temojin/status/4324794451365889 [00:09] banjiewen has joined the channel [00:11] achristianson has joined the channel [00:12] _announcer: Twitter: "good post to clarify what nodejs is and isn't http://dailyjs.com/2010/11/12/node-is-not/ #nodejs #ssjs" -- Régis Gaidot. http://twitter.com/rgaidot/status/4325937793470465 [00:13] rtomayko has joined the channel [00:13] ysynopsis has joined the channel [00:16] _announcer: Twitter: "@ GordoGeek Huhasuehausehaueh! The business is now in a projetinho NodeJS! : P" [pt] -- Pedro Franceschi/pH. http://twitter.com/pedroh96/status/4326946045435904 [00:19] guybrush: tanepiper: i didn't do any webdav with nodejs yet, but others did https://github.com/ajaxorg/jsDAV [00:19] jakehow has joined the channel [00:19] guybrush: ah sry, nvm [00:20] ang has joined the channel [00:23] nbqx has joined the channel [00:23] _mythz has joined the channel [00:25] _announcer: Twitter: "@ginatrapani can I run thinkup on nodejs?" -- Raman. http://twitter.com/rdsethi/status/4329190178426880 [00:29] prettyrobots has joined the channel [00:32] _announcer: Twitter: ""how to create a server in node.js" is the new "10 jquery tabs plugins"" -- Sean McArthur. http://twitter.com/seanmonstar/status/4330939891060736 [00:32] tj has joined the channel [00:33] Akufen has joined the channel [00:33] Akufen has joined the channel [00:33] Tim_Smart has joined the channel [00:33] aubergine has joined the channel [00:34] tony__ has joined the channel [00:36] zomgbie has joined the channel [00:37] Dreamer3 has joined the channel [00:37] rcy has joined the channel [00:38] _announcer: Twitter: "Learning Javascript with Object Graphs - How To Node - NodeJS: http://disq.us/s22di" -- Williamsburg. http://twitter.com/jppommet/status/4332478646984704 [00:41] rauchg_ has joined the channel [00:41] eee_c has joined the channel [00:42] alexfner has joined the channel [00:42] _announcer: Twitter: "@diegoperini yup it made Function.arity deprecated back in 1.4. @tjholowaychuk uses it masterfully in NodeJS Express/Connect." -- Nathan White. http://twitter.com/_nw_/status/4333544901976064 [00:44] mikew3c has joined the channel [00:46] matjas_ has joined the channel [00:49] bwalsh has joined the channel [00:50] isaacs: bruse: there are a lot of videos online of ryan giving that talk, i'm sure [00:50] isaacs: that does look like some cool live-coding demo-y stuff, though. and instagram makes it seem cool. [00:54] bruse: pfft.. i used instagram before it was cool [00:54] _announcer: Twitter: "#SenchaCon node.js session was awesome. :)" -- Jonathan Grimes. http://twitter.com/jsg2021/status/4336477680959488 [00:54] bruse: (not really) [00:55] _announcer: Twitter: "TM video online - TM Talks-Tane Piper on Node.JS http://vimeo.com/16852801" -- Tech Meetup. http://twitter.com/techmeetup/status/4336620291497986 [00:55] bruse: isaacs: do you reckon it's pretty much the same talk as the one from may? [00:55] bruse: "Introduction to NodeJS" [00:55] bruse: http://www.yuiblog.com/blog/2010/05/20/video-dahl/ [00:55] isaacs: bruse: i think he mentioned it'd be mostly intro stuff. but it might be the more advanced talk. [00:56] bruse: i wouldnt mind an updated intro talk, really [00:56] _announcer: Twitter: "@mfeathers node.js is the most awesome thing I've developed with in a LONG time." -- jamescarr. http://twitter.com/jamescarr/status/4336867558297600 [00:56] bradleymeck has joined the channel [00:56] _mql has joined the channel [00:56] isaacs: yeah, looks like the latest yuiconf talk isnt' online [00:58] bwalsh: Hey, mikeal, did you ever get anywhere with the problem here: http://nodejs.debuggable.com/2010-04-12.txt [00:58] bruse: so i recently wrote parts of an implementation for the bittorent distributed hash table in python [00:58] bruse: node would really be perfect for that [00:58] mikeal1: i can't find what you're talking about in these huge logs man [00:58] mikeal1: what was the issue? [00:58] bwalsh: where a request says it has close() (actually end() in my case) [00:59] bruse: i wish i would have started doing it in node instead [00:59] bwalsh: but the listener never fired? [00:59] bwalsh: I'm encountering something that I think is similar trying to upload a .zip ... I *think* that somewhere in the .zip file data is some sort of EOS byte that's ending the stream [01:00] mikeal1: oh that [01:00] mikeal1: that won't be fixed until 0.4 [01:01] mikeal1: it's a problem with readyState getting changed without the event firing [01:01] mikeal1: readyState is removed in 0.3 [01:01] mikeal1: shouldn't be an issue any more [01:01] guybrush: omg just noted that felixge does not maintain node-couchdb any longer, you would recommend to use an other module? [01:01] bwalsh: is there any sort of workaround? [01:02] bwalsh: or, really, I guess what I want to do is make the stream stay alive when it encounters whatever data is problematic [01:03] AAA_awright_ has joined the channel [01:03] rauchg_ has joined the channel [01:04] aho has joined the channel [01:04] softdrink has joined the channel [01:05] jpld has joined the channel [01:05] jpld has joined the channel [01:06] rauchg__ has joined the channel [01:07] bruse: i realized why i try to avoid writing threaded code that requires mutexes [01:07] bruse: (i'm not clever enough to do it by heart and not patient enough to plan it out properly) [01:08] prettyrobots has joined the channel [01:12] devinus has joined the channel [01:12] _mythz has left the channel [01:12] tmpvar has joined the channel [01:14] dgathright has joined the channel [01:15] Tim_Smart has joined the channel [01:16] tmpvar: hola [01:16] bradleymeck: aloha [01:17] SubStack: SHICKA SHICKA KABOOOM [01:17] _announcer: Twitter: "node.js用のKVS。 RT creationix's nstore at master - GitHub http://is.gd/haNns" -- Atsushi Nakatsugawa. http://twitter.com/moongift/status/4342271386324992 [01:17] tylerstalder has joined the channel [01:18] _announcer: Twitter: "node.js向けCouchDBインタフェース。 RT sixtus's node-couch at master - GitHub http://is.gd/haNwX" -- Atsushi Nakatsugawa. http://twitter.com/moongift/status/4342448671162369 [01:18] _announcer: Twitter: "node.js framework for Web. Sinatra style. RT visionmedia's express at master - GitHub http://is.gd/haNGw" [ja] -- Atsushi Nakatsugawa. http://twitter.com/moongift/status/4342631605735424 [01:20] SubStack: Sinatra doesn't get its own style. Sinatra is just the way that all applications except for webapps are usually written. [01:23] zomgbie has joined the channel [01:23] rauchg_ has joined the channel [01:23] softdrink: does node have a way to get the time in microseconds? [01:24] SubStack: Date.now() [01:24] Tim_Smart has joined the channel [01:24] softdrink: that's milliseconds though [01:24] SubStack: ah, well [01:24] shaver: I don't believe that v8 exposes a microsecond-resolution timer [01:24] softdrink: dang [01:24] shaver: there's a proposal for Date.nanotime() or similar in ES.next [01:25] shaver: or you can just return a double from Date.now(), I guess [01:25] shaver: we have been looking at that from Firefox, but it is pretty hard to do cross-platform [01:25] shaver: with anything resembling decent performance [01:25] shaver: like some twisted version of the uncertainty principle or something [01:25] SubStack: could hack together a node c lib that calls some posix thing [01:26] softdrink: yeah mac os x returns a double [01:26] shaver: that doesn't mean that it's actually microsecond resolution, mind you [01:26] shaver: just like on windows it's not ms resolution; you usually get 15ms resolution if you use the system timing [01:26] justinlilly: Date.now() * 1000 ? [01:27] _announcer: Twitter: "Nice, @towns got us tickets for #nodejs camp. Been meaning to take closer look for a while now. @chyekk, @tedd4u you should come.. UI3? ;)" -- rort. http://twitter.com/rort/status/4344647954468866 [01:27] justinlilly: ;) [01:27] softdrink: lol [01:27] tmpvar: shaver, which is funny because its really stupid easy to get high precision timers in win32 [01:27] jamescarr_: so any MBP users here with 10 minutes to spare? [01:27] shaver: tmpvar: not portably back to 2K, last I checked [01:27] jamescarr_: really more like 5 minutes to spare ;) [01:27] shaver: and the multimedia timers are pretty expensive to access [01:27] jamescarr_: please? :) [01:28] tmpvar: shaver, lol [01:28] softdrink: oh well no biggie. i really just want to have an object keyed on timestamps but not waste time looking to see if an element already exists with that timestamp… but i guess i have to, and make them likel 2341234:1 [01:28] softdrink: *like [01:28] shaver: yeah, we still support W2K :-/ [01:28] tmpvar: jamescarr_, why dont you just ask? [01:28] robmason has joined the channel [01:29] jamescarr_: tmpvar, well, if you have a MBP: npm install jasmine ... create a fresh dir and cd to it, run jasmine init, then jasmine mon [01:29] jamescarr_: tell me if a growl notification pops up ;) [01:29] softdrink: ACTION pets jasmine [01:29] jamescarr_: also, whilst it's running, modify one of the specs to fail and save and tell me if a new growl notification comes up ;) [01:30] tmpvar: no growl initially [01:30] MattDiPasquale: ryah: is it safe to run node.js on its own, i.e., not behind nginx, for a simple chat server for an iPhone app? [01:30] jamescarr_: ideally, it should have autospec behavior with growl notifications. I only use linux so I only get libnotify ;) [01:30] micheil: MattDiPasquale: yes, it is fairly safe [01:30] softdrink: web notifications would be handy for the client-side version of jasmine... [01:30] jamescarr_: tmpvar, oh, did you navigate to the url? [01:30] micheil: the no.de instances do this, for instance [01:30] jamescarr_: softdrink, this is all for client side jasmine [01:30] tmpvar: no [01:30] jamescarr_: it's a pure javascript node.js replacement for the gem [01:30] jamescarr_: damn [01:31] jamescarr_: tmpvar, hold on.. [01:31] MattDiPasquale: micheil: cool. i requested one of the no.de instances, but i haven't heard anything yet... hmm... [01:31] softdrink: i meant browser-only [01:31] jamescarr_: tmpvar, type this in your console? which growlnotify [01:31] micheil: MattDiPasquale: yeah, you'd have to check with joyent on that, try in #joyent [01:31] jamescarr_: softdrink, this is for browser only specs [01:31] jakehow has joined the channel [01:31] tmpvar: /usr/local/bin [01:31] jamescarr_: it's just a runner ;) [01:31] MattDiPasquale: micheil: nice. thanks [01:31] micheil: MattDiPasquale: but keep in mind that it is still a beta [01:31] jamescarr_: tmpvar, ah, and that's the problem [01:31] jvolkman-work has joined the channel [01:31] tmpvar: btw: its trying to spawn libnotify [01:31] tmpvar: or use [01:32] MattDiPasquale: micheil: word. yeah, so is the iPhone app i'm building. [01:32] jamescarr_: yeah, the behavior is different than on linux [01:32] softdrink: we're using jasmine at work for running js unit tests in a browser, with no server-side dependencies (save for at least a static file web server) [01:32] MattDiPasquale: micheil: for node, how could i learn about security, etc? so, I know what the holes are? [01:32] bruse: do you need an apple computer to write iphone apps? [01:32] MattDiPasquale: micheil: read source code? :/ [01:33] bradleymeck has joined the channel [01:33] _announcer: Twitter: "written by him Demonaizu nodejs Writing Daemons in Javascript with node.JS - Coding, etc .. http://bit.ly/aGMvlm" [ja] -- Masakazu . http://twitter.com/studiomaestro/status/4346220877189120 [01:33] tmpvar: bruse, if you want to put them in the app store then yes [01:33] justinlilly: bruse: to write native, yes. [01:33] shaver: or you can use openappmkt [01:34] micheil: MattDiPasquale: well, it's not so much that there are "holes" per-say, but more so, that nginx and such have been battle tested, node has not yet been [01:34] malkomalko has joined the channel [01:35] MattDiPasquale: micheil: oh. is node much faster on its own, i.e. not behind nginx? [01:35] micheil: MattDiPasquale: I'm not terrible sure, I've not seen any benchmarks on that to be honest [01:35] micheil: although, I could guess that it may be [01:35] softdrink: MattDiPasquale: depends on how you do it… apparently serving stuff up from raw Buffer objects is just about even with nginx [01:35] MattDiPasquale: bruse: i'm not sure, but i'm pretty sure it's easier to develop them on mac... [01:36] Booths: I'm struggling to install libxmljs. I installed scons, and i try npm install libxmljs and I"m getting "at ChildProcess. (/usr/local/lib/node/.npm/npm/0.2.8-1/package/lib/utils/exec.js:24:18)" [01:36] bruse: man.. developing software is so expensive these days ;) [01:36] justinlilly: lies. [01:36] justinlilly: I just did the math and I can get 100 servers for 5 hours for ~$42 [01:36] MattDiPasquale: bruse: there's gotta be a way to develop on windows, but I'd highly recommend just buying a MacBook rather than struggle w. windows. plus, macs are sweet, imho. [01:37] jvolkman-work_ has joined the channel [01:37] softdrink: if you're developing iphone apps on a mac, you can run the app on the hardware and debug in xcode [01:37] softdrink: pretty handy [01:37] bruse: well, i'd have to buy an iphone as well [01:37] konobi: especially when you have developers who can't work out operational costs from development costs [01:37] bruse: i'm just curious as to what would be necessary to do it [01:37] mbrochh has joined the channel [01:37] softdrink: there's an iphone/ipad simulator included in the sdk, bruse [01:37] micheil: bruse: or just borrow an iphone [01:37] konobi: ipod touch [01:38] micheil: hey konobi [01:38] isaacs: nice, npm has a favicon now. [01:38] micheil: orly? [01:38] jvolkman-work has joined the channel [01:38] isaacs: yeah [01:38] konobi: ACTION makes a dash for home [01:38] bwalsh: bah. looks like you just can't upload .ZIP files via node.js then. [01:38] isaacs: i should use just the "n" for the 32px version, htough. [01:38] micheil: isaacs: I just had to do that. [01:38] bruse: i'm not sure i could make enough money off my ideas to overcome my dislike for apple [01:38] bruse: but thanks for the info [01:38] shaver: bwalsh: how not? [01:38] isaacs: gimp + png2ico ftw [01:39] bwalsh: well, it seems that the data in a zip file includes some sort of end-of-stream bug [01:39] bwalsh: that closes the request [01:39] MattDiPasquale: bruse: you can test out most functionality on the iPhone simulator that comes with the iOS SDK. It runs on ur mac. Like a picture of the iphone and you can click it and stuff. There's things that you can't do though... like take pictures, etc. [01:39] jamescarr_: something is fucked with my package dependencies [01:39] shaver: bwalsh: hrm, master or 0.2.x? [01:39] softdrink: that'd be problematic. [01:39] konobi: bruse... there's always phonegap [01:39] isaacs: jamescarr_: o_O? [01:39] bwalsh: 0.2.x [01:39] jamescarr_: tmpvar, do an npm install jasmine to version 0.0.9, try again? [01:39] micheil: bwalsh: try with 0.3.X [01:39] MattDiPasquale: bruse: to test on your phone, apple requires you to buy a dev account: $99/yr [01:39] bwalsh: can't. production system. [01:40] MattDiPasquale: bruse: it's kinda annoying [01:40] isaacs: bwalsh: can you reproduce this on your local machine? [01:40] micheil: bwalsh: well, don't you have a testing / staging environment? [01:40] MattDiPasquale: bruse: anyway, if u have any other questions about iPhone dev, just ask. [01:40] isaacs: bwalsh: surely you don't *only* have a production env? [01:40] _announcer: Twitter: "I am curious just how awesome node.js is. Probably totally freakin' sweet. Thanks @skevy !!!" -- Nick Hudkins. http://twitter.com/nickhudkins/status/4348031788912641 [01:40] bruse: thanks [01:40] bwalsh: yep, I mean, I am on my local machine -- but the production env is 0.2.x so I'm stuck with that for the time being [01:40] itissid has joined the channel [01:41] MattDiPasquale: where's the code for _announcer? that's pretty sweet. it just searches twitter posts for node.js? cool [01:41] isaacs: bwalsh: right, but does the error occur on dev? or only on stable? [01:41] jamescarr_: tmpvar, yeah, I screwed up [01:41] jamescarr_: can you try it again? [01:42] bwalsh: I'm running v0.2.3, and the production env I'm targeting is going to be running that version for a while yet. [01:43] justin____ has joined the channel [01:43] bwalsh: uploading other files seems fine ... I've tried images, pdfs, text files of various extensions, etc. [01:43] isaacs: bwalsh: ok... so... if you install the latest 0.3.x on your dev box, can you reproduce the error still? [01:43] isaacs: bwalsh: can you reproduce the problem in 0.2.3 reliably? [01:43] bwalsh: I can reproduce the problem in 0.2.3 every time [01:43] isaacs: awesome [01:43] bwalsh: it's extremely consistent [01:44] rauchg_ has joined the channel [01:44] banjiewen_ has joined the channel [01:44] ThePub has joined the channel [01:44] isaacs: what about in other versions? (i realize this isn't an immediate fix for you, i just want ot know whether we need to log the bug.) [01:44] bwalsh: I'd have to rewrite quite a bit of code to get it to work with other versions [01:44] isaacs: also, what about in 0.2.4? [01:44] isaacs: that shouldn't require you to rewrite anything [01:44] shaver: are you in Europe? do you need an adapter? [01:45] shaver: if you put together a bug report, you might be able to get it fixed in a compat release [01:45] isaacs: do you have a simplified reproduction case? i mean, the stream api didn't change *that* much in 0.3.x, and the http api not at all. [01:45] isaacs: the reason i ask is that i am not entirely convinced that there's a magical "kill the stream" bute. [01:45] isaacs: *byte [01:46] bwalsh: could just be filesize I guess [01:46] isaacs: i've uploaded i%256 from 0 to 1024 [01:46] isaacs: like, just streaming bytes. i think there's a test to that effect, even [01:46] isaacs: if you've got an uploaded file that somehow (in itself) kills the http server, that' s a pretty weird and fascinating thing. [01:46] bwalsh: yeah [01:47] isaacs: ACTION is not satisfied with "oh, well, i guess zip files don't work" [01:47] namelessnotion has joined the channel [01:47] micheil: isaacs: who uses zip files anyway? pah!... oh wait, windows and mac folks do. [01:48] isaacs: hehe [01:48] isaacs: and a lot of unix users, even [01:48] pquerna: jar files :| [01:48] shaver: yeah [01:48] isaacs: zips are pretty popular. [01:48] micheil: yeah [01:48] jamund has joined the channel [01:48] bwalsh: I think MS .docx etc are zip files, too [01:48] shaver: zip has some nice properties [01:48] micheil: shaver: is moz. still using jar files? [01:48] shaver: yes, though not compressed [01:48] isaacs: in many ways, it's a much more sane format than tar, though tar is nice in that it's streaming and append-only [01:48] pquerna: xar is interesting as an atlernative if you are making a stoarge format for something like JARs [01:48] shaver: you can stream-decompress zip files an entry at a time [01:49] pquerna: 'seekability' is the key zip feature [01:49] pquerna: pull a random file out easily [01:49] isaacs: shaver: yeah, you can with tars as well, except that's the *only* way you can decompress them [01:49] micheil: ACTION just got mikeal's audio for the next edition of the noded... [01:49] isaacs: tars are just a bunch of files lined up [01:49] siculars has joined the channel [01:49] achristianson: anyone have any thoughts on the patch at this site? http://sikaku444.blogspot.com/2010/11/node.html I'm having the same problem and that patch allowed me to build... but I don't understand the language of that blog [01:50] shaver: isaacs: right, but mostly you see gzip(tar(a, b, c)) rather than tar(gzip(a),gzip(b),gzip(c)) [01:50] softdrink: ok, i *think* i finally have a handle on doing document undo for my stuff [01:50] softdrink: i hope [01:50] gf3 has joined the channel [01:50] isaacs: shaver: yeah, because gzip is most efficient at the end [01:50] shaver: right [01:50] isaacs: shaver: but you can stream gzip [01:50] isaacs: gzip and tar are made for each other ;) [01:50] micheil: Oooohh.. lookie, more buttons! :D http://www.zazzle.com/npm_logo_button-145325726022043093 [01:51] micheil: isaacs: I don't suppose shirt's are coming, by any chance? :P [01:51] isaacs: micheil: you want a shirt with that logo? i can have zazzle make you one. [01:51] isaacs: micheil: and by "make", i mean "sell" [01:51] micheil: isaacs: no, I'm joking. :P [01:51] isaacs: ACTION should have an npm shirt... [01:51] micheil: but I'm sure people would buy them [01:51] micheil: bbl. [01:54] sudoer has joined the channel [01:58] dnolen has joined the channel [01:59] JimBastard has joined the channel [01:59] prettyrobots has joined the channel [02:00] mscdex: if you shipped npm shirts you'd have to package them.... [02:00] mscdex: :p [02:00] isaacs: mscdex: haha [02:00] isaacs: mscdex: i'd let zazzle do that [02:01] bradleymeck: git clone http://shop.npm.org? [02:02] batasrki has joined the channel [02:08] Tim_Smart: I'm kinda liking awesome wm [02:09] softdrink: i haven't had time to get cozy with awesome yet [02:10] softdrink: been meaning to, since it's vim-esque, and i live in vim [02:11] malkomalko: awesome window manager? [02:12] Tim_Smart: malkomalko: Yeah. [02:12] malkomalko: reading up on it right now [02:12] malkomalko: is it just linux or can it replace my screen on mac? [02:13] zentoooo has joined the channel [02:13] Tim_Smart: malkomalko: It is a window manager. I.e. can replace GNOME [02:13] Tim_Smart: I'm using it with ubuntu [02:13] malkomalko: aaaa, ok [02:13] softdrink: you can sorta use it in mac os x, just within x11 [02:13] softdrink: but not for regular apps [02:13] devtime has joined the channel [02:14] ben_alman has joined the channel [02:14] bentruyman has joined the channel [02:14] boaz has joined the channel [02:15] Tim_Smart: softdrink: Once you have your head around the lua configuration API, then you will be fine. [02:15] _announcer: Twitter: "Node.js the moment you try to make & make install" [ja] -- zephiransas. http://twitter.com/zephiransas/status/4356779035074560 [02:15] dgathright has joined the channel [02:15] devtime: isaacs: after "nave use 0.2.4" Node is installed, but then "node" returns "zsh: command not found: node" -- am I missing sth? [02:15] mbrochh has joined the channel [02:15] isaacs: devtime: echo $PATH [02:15] isaacs: devtime: maybe you're overwriting PATH in your zshrc or something? [02:15] evanmeagher has joined the channel [02:16] devtime: yeah I am :) [02:16] isaacs: devtime: nave does `PATH=/path/to/nave/installed/0.2.4/bin sh` [02:16] isaacs: devtime: so, instead of export PATH=blah, do export PATH=$PATH:blah [02:17] prettyrobots has joined the channel [02:17] devtime: so I have to restart the shell after installing nave? [02:18] bradleymeck has joined the channel [02:18] isaacs: devtime: doing `nave use x.y.z` starts a new shell [02:18] isaacs: devtime: then do `exit` to exit it [02:18] jacobolus has joined the channel [02:18] bradleymeck: nothing beats coding outdoors, in winter [02:18] bruse: bradleymeck: where do you live? [02:19] bruse: i think that might be a lethal practise here in sweden [02:19] micheil: jamescarr_: your slides are wrong about node-eventstream, that project is for linking events between 1 server and many clients [02:19] jamescarr_: micheil, yeah, I updated [02:19] jamescarr_: havent uploaded yet [02:19] micheil: okay [02:19] jamescarr_: plus it references my pet project that isnt even on github yet :) [02:19] devtime: isaacs: ah, you're right about the PATH... how stupid of me to overwrite it completely. doh [02:19] alex_b has joined the channel [02:20] jamescarr_: isaacs, is there someway to remove a module and all modules using it? [02:20] bradleymeck: bruse, texas [02:20] derferman has joined the channel [02:20] micheil: jamescarr_: github link or it didn't happen. [02:20] micheil: :P [02:20] isaacs: jamescarr_: npm rm blah --recursive [02:20] jamescarr_: say I want to remove express and any modules using it ;) [02:20] jamescarr_: thanks [02:21] CIA-95: node: 03Ryan Dahl 07master * ra375c6a 10/ src/node.js : [02:21] CIA-95: node: Revert node_module lookup commits [02:21] CIA-95: node: Revert "Add ~/.node_modules as well as ~/.node_libraries" [02:21] CIA-95: node: This reverts commits [02:21] CIA-95: node: 5e14c8bec0b4e1c19d8567cf8b843b215e8796ac. [02:21] CIA-95: node: b0adaff67e492ab9ac583059f5e2dba54de0973b. [02:21] CIA-95: node: 492fc0d7524c0a5b546fb1a16f1b49bb4db73da8. - http://bit.ly/bqxqAB [02:21] CIA-95: node: 03Ryan Dahl 07master * r183f6c2 10/ src/node.js : Add .node_moudles to lookup path again - http://bit.ly/d8nERQ [02:21] isaacs: ;( [02:21] isaacs: bye bye node_modules. we hardly knew ye. [02:21] micheil: hmm, what was wrong with them? [02:22] ryah: too complex [02:22] jamescarr_: micheil, any other suggestions? I'm reworking all the examples [02:22] jamescarr_: after some though, they all blow [02:22] micheil: isaacs: also, on "script" either makes sense, but it should be just one name, not three [02:22] isaacs: node is governed by ryah's obsessively minimalistic esthetic. [02:22] jamescarr_: micheil, I'm mostly a "3 slides and live coding guy" but trying to have some take aways [02:22] isaacs: micheil: ^ [02:22] jamescarr_: isaacs, I think thats a good thing :) [02:22] micheil: (we currently have "eval", "script" and "javascript" [02:22] jamescarr_: I like minimalism [02:22] mjr_ has joined the channel [02:22] isaacs: yeah, i think we all agree with it in principle. [02:22] isaacs: micheil: yeah, that's not great. [02:23] isaacs: i think having the object by "Script" is fine, though [02:23] isaacs: it's a script object [02:23] jamescarr_: its also why I hate my own code... I can never achieve the perfection I desire [02:23] micheil: isaacs: well, yeah, Ideally the Script module should be at: lib/script.js and src/node_script.cc/h [02:23] isaacs: require("javascript").createScript("some codez", {foo:"bar"}, "my-code") [02:23] isaacs: that's kinda rad [02:23] isaacs: i think [02:24] micheil: where as that can't happen with the javascript one too easily, can it? [02:24] isaacs: micheil: it's not the "Script module" [02:24] isaacs: micheil: any more than http is the "Server module" [02:24] micheil: okay, what module is it? [02:24] micheil: http is the http module. [02:24] isaacs: it's the javascript module [02:24] micheil: okay [02:24] isaacs: lib/javascript.js [02:24] micheil: so, it'd be lib/javascript.js and src/node_javascript.cc [02:24] isaacs: i dunno, script/javascript, whatever. [02:25] micheil: that seems to make sense to me. [02:25] isaacs: yeah, if you renamed the binding and moved the code file. but meh. [02:25] isaacs: process.binding is private-ish [02:25] micheil: even so. [02:26] micheil: it makes things easier to understand when starting to work on core. [02:26] _announcer: Twitter: "w00t, going to Node.js Camp! http://camp.nodejs.org/" -- Jimmy Jacobson. http://twitter.com/jimmyjacobson/status/4359597913546753 [02:26] _announcer: Twitter: "Node.js just plug something like this, like can be displayed. http://bit.ly/cWGLQC" [ja] -- Atsushi Nakatsugawa. http://twitter.com/moongift/status/4359638111756288 [02:27] devtime: isaacs: it would be great if nave had a "cur" option like ruby's rvm does -- especially nice for startup scripts -- i.e.: "rvm gems cur" ..in the case of rvm [02:27] ryah: micheil: a lot of people do process.binding('evals') you can't change that [02:27] micheil: I wonder if there's such a thing as a "1 week visa", so you can get it for like conferences and stuff [02:27] micheil: ryah: hmm [02:27] matt_c has joined the channel [02:28] Tim_Smart: Maybe slowly depreciate it. [02:28] micheil: a lot of people do require("sys"), we changed that. [02:28] Tim_Smart: Just have an alias or something. [02:28] ryah: you can change it - you just can't remove it [02:28] ryah: require('javascript') can become require('script') though [02:28] ryah: probably best to avoid trademarks in the code [02:29] shaver: I wouldn't worry about the javascript trademark there [02:29] shaver: but I suppose others might :-) [02:29] Tim_Smart: require('ecmascript') ;) [02:29] shaver: think that's a trademark too! [02:29] micheil: require("js") [02:29] micheil: >_> [02:30] bradleymeck: require("pseudocode") [02:30] dguttman_ has joined the channel [02:30] ryah: require('script') is fine [02:30] micheil: require("lua") :P [02:30] micheil: although, that's the doorway that having a require("script") opens up. [02:30] micheil: and it could be a good thing in an odd way [02:31] micheil: anyway. bbl. [02:31] ryah: require('v8') ? [02:31] indutny has joined the channel [02:31] ryah: require('evals') ? [02:31] shaver: require('larsbak') [02:31] ryah: require('interpreter') ? [02:31] ryah: require('vm') ? [02:31] ryah: i kind of like 'vm' [02:32] indutny: require('brain').start('thinking') [02:32] indutny: hey guys [02:32] ryah: ACTION goes with vm [02:32] ryah: ^^ [02:32] micheil: haha, okay :D [02:32] Anti-X has joined the channel [02:32] micheil: I think that'll confuse people though. [02:32] shaver: everything will confuse people [02:33] shaver: require("meta")? [02:33] indutny: what are you discussing here? [02:33] mscdex: i like "script" personally [02:33] evanmeagher: ^ [02:33] micheil: yeah, I like script too. [02:33] batasrki has joined the channel [02:34] evanmeagher: it's generic enough to not rub anyone the wrong way, but still obvious [02:34] bartt has joined the channel [02:34] indutny: ah [02:34] indutny: that's about old binding('evals') ? [02:34] mscdex: i don't care so much about the binding, i'm mainly concerned about the public facing module [02:35] micheil: hmm, require("eval") [02:35] indutny: may be voting? [02:35] indutny: on dev-list [02:35] indutny: lets collect all variants [02:35] indutny: eval [02:35] indutny: script [02:35] indutny: javascript [02:36] shaver: democracy is a terrible way to name things [02:36] Tim_Smart: require('v8') hehe [02:36] indutny: Tim_Smart: require(void) [02:36] shaver: require("compiler")? [02:36] micheil: shaver: yeah, because then you'd end up with things like require("evalscriptv8") [02:37] indutny: shaver: nono [02:37] ryah: the great thing about node is there is no voting :) [02:37] indutny: :D [02:37] shaver: ryah: quite [02:37] micheil: ryah: gotta love a dictatorship :D [02:37] noahcampbell has joined the channel [02:37] CIA-95: node: 03Ryan Dahl 07master * r8b10828 10/ (12 files in 3 dirs): Rename require('javascript') to require('vm') - http://bit.ly/9rZTmc [02:37] indutny: hahaha [02:37] indutny: :D [02:38] indutny: ryah: why had you asked us? [02:38] indutny: :D [02:38] Tim_Smart: Hopefully ryah doesn't start killing Jews. [02:39] ryah: yeah, i did live in germany after all [02:39] ryah: have to watch out. [02:39] shaver: ryah: the engine of Europe! [02:40] batasrki has left the channel [02:40] Tim_Smart: Does someone know how to take screen captures in awesome? [02:40] ryah: Tim_Smart: gimp? [02:41] _announcer: Twitter: "hey nodejs folks, am I missing something with https://github.com/orlandov/node-sqlite? code != docs?" -- Wez Furlong. http://twitter.com/wezfurlong/status/4363290931109888 [02:41] Tim_Smart: Hmm ok. Seems a little overkill but meh. [02:41] ryah: there's probably a command line one - but i always use gimp [02:42] batasrki has joined the channel [02:42] batasrki: where am i now [02:42] indutny: i agree with ryah [02:43] indutny: batasrki: depends on where you want to be [02:43] batasrki: indutny: sorry, playing around with irssi and its split windows [02:43] indutny: oh [02:43] indutny: cool [02:44] meso has joined the channel [02:44] Tim_Smart: batasrki: Yeah it is pretty easy to get lost with split windows in irssi [02:45] Tim_Smart: I keep on typing in the wrong channel [02:45] konobi: @wezfurlong... patches welcome [02:45] ryah: ACTION wishes irssi had vim bindings for window management [02:45] batasrki: Tim_Smart: yeah, and then you come off crazy asking existential questions [02:46] Tim_Smart: ACTION wishes the world had vim bindings. [02:46] Aikar: lol yeah i mt alot due to split windows in irssi too :3 [02:47] Tim_Smart: Surely a ncurses IRC client in node shouldn't be very hard. [02:47] batasrki: ACTION is looking for world.vim file [02:47] Tim_Smart: (With vim bindings) [02:48] Aikar: no real reason to try to replace irssi tho ;p [02:48] Tim_Smart: Who needs a reason? [02:48] softdrink: the world needs more multimode editors [02:48] softdrink: crazy key combos for common operations FTL [02:48] jamescarr_: softdrink, all the world needs is vim [02:48] Aikar: i bought nodeib.com tho (node IRC Bot) lol, ive currently got phpib.com and my bot core runs great, but it would be so much better to write in node :/ so i doubt ill ever finish the php one [02:49] softdrink: jamescarr_: also love. [02:49] jvolkman_ has joined the channel [02:50] Aikar: heh maybe in a few years when my main project ill be doing in node is released ill finish the php one for the hell of it :( [02:50] batasrki: do you guys know where I can find a module for irssi that lets me underline the last message in a channel? [02:50] jamescarr_: any good commandline arg flag parsers already out there? [02:51] jamescarr_: i.e. mapping --foo bar to {foo:'bar'} [02:51] jamescarr_: easy to do, just asking [02:51] SubStack: optimist! [02:51] SubStack: disclaimer: I wrote it [02:51] SubStack: still, awesome [02:51] SubStack: http://github.com/substack/node-optimist [02:51] rburhum has joined the channel [02:52] jamescarr_: thanks buddy [02:52] jamescarr_: thats what I was lookin for [02:52] SubStack: ^_^ [02:52] SubStack: var argv = require('optimist').argv; console.log(argv.foo) [02:52] SubStack: although, that will only work for --foo=bar [02:53] SubStack: perhaps I'll hack it to work with --foo bar, but then it's harder to do boolean options [02:53] SubStack: and you can always write optstrings with one of those other parsers if you care about that sort of thing :p [02:55] mscdex: Tim_Smart: there's an irc client example in node-ncurses ;-) [02:56] mscdex: although it ought to be updated to use one of the newer node irc modules though [02:56] Anti-X has joined the channel [02:58] softdrink: 36^16 should be fairly unique, right? hehe [02:58] ryah: please someone do a ncurses node irc client [02:59] softdrink: + 256 color support [02:59] softdrink: + mouse interpretation [03:00] mscdex: the ncurses irc client example doesn't have mouse support [03:00] mscdex: and colors wouldn't be hard to implement [03:00] softdrink: my crappy terminal lib does :) [03:00] jesusabdullah: mice?! pffsht [03:00] jacobolus has joined the channel [03:00] softdrink: so much hackery: https://github.com/jocafa/node-term-ui [03:01] mscdex: SubStack: does optimist work with quoted string values, like: --foo="value with strings" ? [03:01] jesusabdullah: I still want node-based web-irc action [03:01] jesusabdullah: mscdex: Should [03:01] jesusabdullah: Pretty sure I've used it that way before [03:02] SubStack: yep [03:02] SubStack: $ node ~/pow.js --foo="bar" [03:02] SubStack: { _: [], '$0': 'node ../../../pow.js', foo: 'bar' } [03:02] vnguyen has joined the channel [03:03] mscdex: er s/strings/spaces [03:03] mscdex: heh [03:03] Tim_Smart: Who needs mouse support when you have vim bindings >.> [03:04] mscdex: maybe i'll work on the irc client example some tonight [03:04] mscdex: need a break from imap [03:04] mscdex: :p [03:04] ajsie: Tim_Smart: hah Vim :P [03:04] SubStack: $ node ~/pow.js --foo=bar\ baz [03:04] SubStack: { _: [], '$0': 'node ../../../pow.js', foo: 'bar baz' } [03:04] SubStack: ^ mscdex [03:04] ajsie: Tim_Smart: are you still going to use Vim when there is Cloud9? [03:05] mscdex: SubStack: so it'd work the same for --foo="bar baz" also? [03:05] SubStack: yes [03:05] mscdex: cool [03:05] SubStack: the shell takes care of all of that before it passes argv to the process [03:05] SubStack: or something does [03:06] Tim_Smart: ajsie: I tried cloud9 and it still doesn't come close to vim. [03:06] jesusabdullah: hah [03:06] Anti-X: nothing comes close to vim [03:06] Anti-X: luckily [03:06] softdrink: i *really* wish that i could instantiate Node elements in a browser. (nothing to do with node.js) [03:06] ajsie: Tim_Smart: lol [03:06] ajsie: give it some more time then [03:07] jesusabdullah: Everyone knows emacs is where it's at [03:07] ajsie: 6 months! then it should beat the hell out of vim [03:07] softdrink: i don't have enough fingers for emacs [03:07] Anti-X: i thought all the emacs users were dead by now [03:07] ajsie: jesusabdullah: an operating system [03:07] deepthawt has joined the channel [03:07] jesusabdullah: Don't worry, I'm not an emacs user [03:07] Tim_Smart: ajsie: Err I was just talking about vim. screen + vim (with awesome) is on another level again. [03:07] SubStack: jesusabdullah: you're such a mercenary! [03:07] jesusabdullah: Used it for a bit, but vim eventually won me over [03:07] softdrink: i have a couple of hardcore emacs friends [03:07] ajsie: Tim_Smart: =) [03:07] jesusabdullah: tbh I use gedit half the time [03:07] SubStack: oh vim won you over eh? [03:08] bruse: i saw in a movie that facebook was written in emacs [03:08] jesusabdullah: but I'd probably use vim more if I actually fucked with the vimrc [03:08] bruse: has anyone ever made that much money using vim or cloud9? [03:08] SubStack: bruse: facebook is also written in php [03:08] SubStack: just because zuck does something doesn't mean that the rest of us should [03:08] softdrink: i giggle at my coworkers that use IntelliJ, about our comparative system resource usage [03:08] Anti-X: also, facebook is not about the technology, but the idea [03:08] jesusabdullah: Maan, there ghoes my joke [03:08] jesusabdullah: "I thought it was written in php! ahahaha" [03:09] jesusabdullah: THOUGH, that makes me wonde3r---has someone written a webserver entirely in emacs lisp? [03:09] softdrink: *courtesy laugh* [03:09] cjm has joined the channel [03:09] softdrink: i wouldn't doubt it jesusabdullah [03:09] jesusabdullah: That's your homework, softdrink [03:09] bruse: last time i saw a coworker use IntelliJ it looked pretty good [03:09] softdrink: noooooooooooooooooooo [03:09] jesusabdullah: while I'm gone in the next 20 minutes [03:09] SubStack: for any future historians skimming over these ancient IRC logs, that is the point where I started refering to famous people with curious nicknames [03:09] jesusabdullah: Research this for me ;) [03:09] SubStack: IT BEGINS [03:09] rbranson: here is how to scales [03:09] rbranson: http://www.violin-memory.com/products/3200-memory-array/ [03:10] Tim_Smart: ryah: Is it possible to update a no.de instance with a new ssh public key? [03:10] Tim_Smart: ryah: I did an OS reinstall lately. [03:10] SubStack: writing php in emacs... the cognitive dissonance must be intense [03:11] Yuffster_work has joined the channel [03:12] MattDiPasquale: Tim_Smart: try asking marsell in #joyent [03:13] Anti-X: SubStack, well try writing emacs in php, that'll keep you fucking busy [03:13] tk has joined the channel [03:14] cjm: hey, new to node.js want to use it to implement coffeescript. What do you guys recommend for hosting? Right no I have Media Temples Grid Service and I was thinking of going to their (ve) server for node.js [03:15] Booths has joined the channel [03:16] MattDiPasquale: bruse: SubStack: they use emacs at Harvard comp sci (they did. prob still do.) with X11. you could tunnel in from a computer at a dorm over PuTTY [03:17] MattDiPasquale: bruse: SubStack: he was building facemash on harvard servers. that's why he got in trouble. well, one of the reasons... [03:17] bruse: they teach emacs one of the first things they do at my CS program [03:17] MattDiPasquale: bruse: SubStack: I guess he could've used vim inside of PuTTY as well... but everyone there used to use emacs [03:17] bruse: i quickly converted my friends to vim [03:18] MattDiPasquale: bruse: haha. yeah, it's the same at Harvard [03:18] bruse: well, not quickly [03:18] bruse: it took a few years [03:18] bruse: but they used gedit and such, not emacs, in between [03:18] MattDiPasquale: bruse: vim is pretty sweet. they both seem pretty powerful... i'm still on TextMate myself... I dream about being a vim master [03:19] softdrink: i got used to vim because i had to develop over ssh for a long time [03:19] eddanger has joined the channel [03:19] MattDiPasquale: softdrink: yeah, i'm getting good at vim cause I use git a lot and never bothered to change the editor [03:20] softdrink: my (outdated) .vimrc: https://gist.github.com/375848 [03:20] _announcer: Twitter: "Word on the street is that Haskell now runs #nodejs? Awesome. As if Erlang wasn't already dying anyway ;) #21stCenturyConcurrencyBaby" -- NodeCore. http://twitter.com/nodecore/status/4373120018292736 [03:20] MattDiPasquale: softdrink: well, i wouldn't say getting good.. but at least i know how to use it. I like the cw change word command [03:20] softdrink: i <3 cw [03:20] CIA-95: node: 03Ryan Dahl 07master * r00a1d61 10/ (src/node.cc src/platform_none.cc): Fix OS::GetExecutablePath for platform_none - http://bit.ly/bl0ltQ [03:20] CIA-95: node: 03Ryan Dahl 07master * r4737219 10/ wscript : Print warning when using platform_none.cc - http://bit.ly/aT4hii [03:20] MattDiPasquale: softdrink: lol... [03:20] softdrink: and ct, and ci... [03:21] softdrink: "cit" is awesome for web dev — "change inside tag" [03:22] CIA-95: node: 03Ryan Dahl 07master * r702a923 10/ doc/api/vm.markdown : Fix docs for vm module - http://bit.ly/ajrY18 [03:22] bruse: MattDiPasquale: whatever gets you through the month to the next paycheck [03:23] Anti-X: paycheck? [03:24] CIA-95: node: 03Ryan Dahl 07master * r879a9e0 10/ (src/platform_sunos.cc src/platform_solaris.cc): solaris -> sunos - http://bit.ly/diJdLP [03:24] Aikar: did __dirname get renamed in .3? [03:24] ryah: no [03:24] sh1mmer has joined the channel [03:24] Aikar: says its not defined o.o [03:24] bruse: Anti-X: you're right.. i dont even get my usual swedish socialist check from the state for studying any more :( [03:25] Anti-X: i get my norwegian socialist check for not having a job [03:25] ryah: Aikar: works or me [03:25] Anti-X: but i don't consider it pay [03:25] Aikar: ryah: in REPL? [03:25] ryah: Aikar: no [03:25] Aikar: its not working in REPL for me [03:26] Aikar: im basically looking for realpath() from PHP so i was testing that require('path').join(__dirname + '../'); worked but it errored on REPL [03:26] mikeal1 has joined the channel [03:26] Tim_Smart: tim@TimsMacBookPro:~/Projects$ node [03:26] Tim_Smart: > __dirname [03:26] Tim_Smart: ReferenceError: __dirname is not defined [03:27] ryah: Aikar: process.cwd() [03:27] Aikar: yeah im trying to get a path out of cwd lol [03:28] Aikar: ie not care if script is spawned in /tmp with /base/apps/script.js (whereas cwd would be /tmp) [03:29] Aikar: in php realpath('../') would return /a/b/c/d if ran under /a/b/c/d/e [03:29] Tim_Smart: Aikar: Something is just weird with the REPL. __dirname works in a module [03:29] langworthy_ has joined the channel [03:29] Aikar: ok well if it works in module its fine then [03:29] Aikar: just lil odd it wont work in repl [03:30] Aikar: i guess __dirname is based off current required() file, and under repl no file is loaded [03:31] _announcer: Twitter: "There were lots of cool things at day one of #senchcon, but none so cool as the sheer enthusiasm of @ryah presenting #nodejs." -- Sean Kellogg. http://twitter.com/probonogeek/status/4375938292785152 [03:31] Aikar: globals.BASEPATH = require('path').join('../'); require.paths.push(BASEPATH + '/libs/'); does this look right to be a "bootstrap" require('./bootstrap'); [03:32] dgathright has joined the channel [03:33] _announcer: Twitter: "Stream an NFL Scoreboard with Node.js - , I was recently inspired by the Node.js Twitter server in the... http://tumblr.com/xgrq94cfb" -- Mason Meyer. http://twitter.com/masonmey/status/4376370385788928 [03:33] alex_b has joined the channel [03:34] _announcer: Twitter: "Node.js Japan User Group website has been updated (thanks to @ masahiroh) http://nodejs.jp/ # nodejs_jp" [ja] -- Toshihiro Shimizu. http://twitter.com/meso/status/4376755997515777 [03:35] Aikar: node sure has got the attention of the japanese community [03:35] ryah: micheil: yt? [03:36] _announcer: Twitter: "You thought while you eat. Node.js HTML5 canvas to raise the roguelike frontend to communicate seobeorang MO game .. Who's booty!" [ko] -- Reiot(윤창필). http://twitter.com/reiot/status/4377139746967552 [03:37] polotek has joined the channel [03:37] Nohryb has joined the channel [03:38] EyePulp has joined the channel [03:38] nsyee has joined the channel [03:38] Anti-X has joined the channel [03:41] justin____ has joined the channel [03:43] derferman has joined the channel [03:46] Tim_Smart: ryah: https://github.com/Tim-Smart/node/commit/bf2c3813e6ef326a317b9de4570b87efb0d99099.patch [03:46] _announcer: Twitter: "I just enjoy it for now node.js right. Like a true event-driven." [ja] -- 今井 虹太郎. http://twitter.com/nijitaro/status/4379793382445056 [03:48] _announcer: Twitter: "JavaScript and PHP so that I feel that quality is maintained at slightly higher threshold, but I thought I wanted a copy and paste the festival. # Nodejs" [ja] -- 今井 虹太郎. http://twitter.com/nijitaro/status/4380146505097216 [03:48] boaz has joined the channel [03:49] sh1mmer has joined the channel [03:50] CIA-95: node: 03Micheil Smith 07master * rade8cf9 10/ (LICENSE Makefile tools/doctool/doctool.js): Build API page into build/doc; simplify doctool. - http://bit.ly/9z9yUW [03:50] ben_alman has joined the channel [03:50] _announcer: Twitter: "@probonogeek What did you think of the node.js talk?" -- Andrew Cantino. http://twitter.com/tectonic/status/4380757137031168 [03:50] Booths: Anyone familiar with libxmljs? Specifically if it provides a non-sax parser. [03:50] ryah: Tim_Smart: hm. i think it should be a getter for cwd [03:50] ryah: or something [03:52] Gruni has joined the channel [03:58] postwait has joined the channel [03:59] robotarmy has joined the channel [03:59] CIA-95: node: 03Micheil Smith 07master * r939fba4 10/ (4 files in 2 dirs): Better doc indexes, fix some links - http://bit.ly/cQW28v [04:00] bruse: ryah: did you ever settle on a signal to use for attaching the debugger? [04:00] robotarm_ has joined the channel [04:01] ryah: no [04:01] ryah: i guess i'll just take USR1 [04:01] ryah: fuck it :) [04:01] ryah: signals are stupid anyway [04:01] bruse: haha [04:02] softdrink: i love it when code fits perfectly in 80 columns :) [04:02] sechrist has joined the channel [04:03] doowttam has joined the channel [04:04] Aikar: anyway for net.Server to assign a random free port to listen on? [04:06] bartt has joined the channel [04:06] pedrobelo has joined the channel [04:07] ryah: Aikar: .listen() ? [04:07] Aikar: so itll assign a random one, then how do you know which port it used? [04:07] Aikar: i saw http server had abil to lookup its current port [04:08] Tim_Smart: Aikar: Math.random(), listen(), check for error, rinse and repeat. [04:11] ryah: Aikar: server.address() [04:11] ryah: server.listen [04:11] ryah: er [04:11] ryah: server.listen(function () { console.log(server.address()) }) [04:12] strmpnk has joined the channel [04:13] Aikar: server.listen(function() { console.log('opened server', server.address()); }); [04:13] Aikar: peError: Bad argument at Object.stat (fs.js:328:11) [04:14] Nohryb has joined the channel [04:14] Aikar: > server.address(); [04:14] Aikar: { address: '�`X+' } [04:14] Aikar: changes every time i call address [04:14] twoism has joined the channel [04:15] mbrochh has joined the channel [04:15] indutny: yep, 0.2.4 [04:15] indutny: bad argument [04:15] Aikar: needs listen(0); [04:15] Aikar: > server.listen(0); [04:15] Aikar: > server.address(); [04:15] Aikar: { address: '0.0.0.0', port: 55950 } [04:16] softdrink: i love having testable code :) [04:16] Aikar: > require('net').createServer().listen(0, function() { console.log(this.address()); }); [04:16] Aikar: > { address: '0.0.0.0', port: 46473 } [04:17] Aikar: k that codes working fine, thanks ryah - may wanna add that to documentation, its not stated on site that you can do this [04:21] jesusabdullah: So it turns out emacs can't really do server sockets on its own [04:22] jesusabdullah: and yet [04:22] jesusabdullah: http://www.emacswiki.org/emacs/EmacsHttpd [04:22] Aikar: im setting up a master to handle the phonebook of each childs ports, i wanna be able to just throw up a new child w/o having to worry about port then it informs masters on how to connect to it [04:22] jesusabdullah: Got fairly close apparently! [04:22] cjm: hey new to node.js, do you have any reccomendations when setting up a new hosting environment for node.js? [04:23] Aikar: not x86 [04:23] Aikar: lol [04:23] CIA-95: node: 03Ryan Dahl 07master * r4144024 10/ (2 files in 2 dirs): Test and fix for self-assigned port from net.Server - http://bit.ly/agz55G [04:23] CIA-95: node: 03Ryan Dahl 07master * r90d1e47 10/ (.gitignore Makefile): make doc improvements - http://bit.ly/bvqNIK [04:23] ryah: Aikar: fixed that problem --^ [04:23] Aikar: i run CentOS 5.3 on x86_64 just fine, just needs a lil bit of manual compiles since centos base repos are strict on latest vers [04:24] saschagehlich_ has joined the channel [04:24] Aikar: so it wont error now ryah ? [04:26] Aikar: cool [04:26] Aikar: guess ill go recompile for hell of it [04:26] Aikar: (im on git master version from like a week or so ago) [04:26] CIA-95: node: 03Ryan Dahl 07master * re5cc638 10/ doc/api/net.markdown : Docs for server.address() - http://bit.ly/cboZBU [04:28] ryah: docs are looking good. [04:29] Aikar: alot get updated? [04:30] jamescarr_ has joined the channel [04:31] alex_b has joined the channel [04:31] Aikar: o.o am i not looking at right place, nodejs.org/api.html still doesnt show that feature [04:31] mw_ has joined the channel [04:32] Aikar: also server.address() isnt documented under server either [04:32] ryah: it's only in the repo [04:32] Aikar: ah ok [04:34] kriszyp has joined the channel [04:35] alex_b has joined the channel [04:38] Aikar: wow, developing C++ extensions for node is seriously that easy? I was already looking at embedding V8 into an application i use to work on as a scripting language to provide to users, and the code looks identical (simple/few lines). I might be having to take advantage of that. i tell you trying to write a PHP extension was no damn joke, i gave up [04:39] bruse: what kind of an extension are you writing? [04:39] Aikar: none lol [04:39] Aikar: i just was looking over docs [04:39] Aikar: and saw how simple it was [04:39] jtoy has joined the channel [04:40] Aikar: but its nice to know if i do need the power of C++ in my app ill be writing, itll be simple to implement [04:40] matt_c has joined the channel [04:41] dgathright has joined the channel [04:41] rtomayko has joined the channel [04:44] atmos_ has joined the channel [04:46] alex_b_ has joined the channel [04:49] matt_c_ has joined the channel [04:51] Aikar: is there any setting in node for uname -n result? [04:52] zikes has joined the channel [04:52] indexzero has joined the channel [04:52] rauchg_ has joined the channel [04:53] zikes: hello, would someone be able to help me with an issue I'm having with running a node app via upstart on ubuntu 10.04? [04:54] Dreamer3 has joined the channel [04:54] zikes: it seems to be related to the node-couchdb module, as it runs successfully when I comment the require out [04:55] indexzero: zikes: I don't know much about upstart, but I wrote a daemon manager in node called forever [04:55] indexzero: http://github.com/indexzero/forever [04:56] zikes: indexzero: I'll give that a look, thanks [04:58] richcollins has joined the channel [04:59] mtmcfarl has joined the channel [04:59] alex_b has joined the channel [05:01] sh1mmer has joined the channel [05:03] intacto has joined the channel [05:04] sudoer has joined the channel [05:04] softdrink: is there a way to trigger garbage collection in node manually? [05:04] foca has left the channel [05:07] Aikar: ryah: anyway to access uname -n in node (system host name) ? [05:07] twoism_ has joined the channel [05:09] dgathright has joined the channel [05:10] Tim_Smart: zikes: Probably something to do with the paths [05:10] richcollins: How do I use node's profiler? [05:10] richcollins: Have a request that is taking way too long [05:11] dguttman has joined the channel [05:12] mjr_: zikes: what is your issue with upstart? [05:13] AAA_awright: The fact someone made it? [05:13] zikes: mjr_, Tim_Smart: when I try to run the process it'll tell me it's started/running and give me a pid, but a ps -A doesn't show the pid and I get no response on the port I assigned to it [05:14] mjr_: zikes: it must be exiting right away and logging something to a place that isn't obvious. [05:14] micheil: ryah: hmm? [05:14] zikes: mjr_: I had the same suspicion, but I've tried to follow it back along the chain and can't find any error messages [05:14] mjr_: zikes: try running the command that's in the script under sudo and make sure that works. If not, then make sure your rsyslogd is logging *.debug to a single file, and tail thatfile while you restart it. [05:15] rauchg_ has joined the channel [05:15] superjudge has joined the channel [05:15] mjr_: zikes: upstart and rsyslogd are kind of bad about letting you know what's failing in cases like these. [05:17] zikes: manual run is successful, will check the rsyslogd [05:20] micheil: ryah: also, server.address() could be kinda hot for XEE. [05:20] gwoo has joined the channel [05:21] micheil: Aikar: also, as for the documentation, I generally release them off to http://static.brandedcode.com/node-doc/ or http://static.brandedcode.com/nodejs.org/ [05:22] micheil: just so I can get feed back on them [05:22] micheil: also, howdy zikes [05:22] zikes: hiya micheil =) [05:22] meso_ has joined the channel [05:23] zikes: mjr_: not having much luck there, can't find anything in the log files either [05:23] zikes: guess I'll have to look at alternatives [05:24] jamescarr_: awesome [05:24] zikes: indexzero, forever keeps giving me the help message when I try to run it, am I missing something? [05:24] indexzero: zikes: What's the command you're running? [05:24] zikes: put +x on the script and a shebang at the top [05:24] zikes: forever start app.js [05:25] jakehow has joined the channel [05:25] zikes: also tried with absolute paths [05:25] indexzero: hmmm... I just updated it, might be a regression [05:25] indexzero: let me try something similar locally, 1 second [05:25] zikes: indexzero, alrighty [05:26] Aikar: anyone used msgpack? for LAN communication between TCP servers of node processes, recommend it over json? msgpack claims its faster [05:26] micheil: Aikar: hmm.. [05:26] micheil: have a look at http://github.com/miksago/ideabin/wiki/Node-Network-Protocol [05:27] micheil: Aikar: also, json is only slow for really large objects, iirc. [05:27] mjr_: zikes: any luck? I'm about to head out. [05:28] zikes: mjr_: no luck, but thank you for your help [05:28] softdrink has joined the channel [05:28] indexzero: zikes: it's a regression, fixing it now [05:28] mjr_: zikes: I suggest putting a line like: *.debug /var/log/messages somewhere in your rsyslog.d [05:29] mjr_: zikes: and delete whatever tha tcomplicated setup ubuntu puts in there that splits ti up over 30 different files. [05:29] Aikar: micheil: i was planning to send messages delimitered by new line, that doc still seems to recommend json, just has string length #'s in it which shouldnt matter if i end every msg with [05:29] Aikar: \n [05:29] zikes: mjr_: ah, I'll try that then [05:29] micheil: Aikar: don't do \n delimins, seriously bad idea. [05:29] rtomayko has joined the channel [05:30] Aikar: why? someone else in here recommended to do that >_< [05:30] micheil: Aikar: the reason: it means you need to actually find \n just to find the end of your message [05:30] micheil: it's easier to just have a length from the get-go [05:30] mjr_: way easier [05:31] mjr_: But if you can't easily know the length in advance, at least use \r\n as the delimiter, and hope the JSON escaping will make it all work out. [05:31] micheil: although, there is still a few issues with it, like how do you find the length of the length of the ... yeah you get the point [05:31] micheil: \0 is a better delim. [05:31] micheil: as it can't appear in json to my knowledge [05:32] mjr_: \0++ [05:32] indexzero: zikes: try reinstalling now [05:32] mjr_: I want to give 1 beers to \0 [05:33] Aikar: anyone got a lib already written for the "NNP" then lol? I was gonna use carrier [05:33] zikes: mjr_: it looks like it's being rejected by the dbus-daemon [05:33] mjr_: Where is the bot to facilitate that? [05:33] Aikar: i guess i can just write it tomorrow, is rather simple [05:33] micheil: Aikar: there is one already, but I'm thinking I can do it better [05:33] micheil: rbranson: wrote the current one [05:34] mjr_: zikes: dbus is probably one of those things that you should disable because it has no place on a server. [05:34] Aikar: but dont you still have to find { or [ for start of the json data to know the indexes for the length in the packet [05:34] micheil: zikes: this for that dAmn protocol? [05:34] micheil: Aikar: not at all. [05:34] micheil: it's n.. numbers then a , [05:34] zikes: micheil: somewhat related, but not exactly [05:35] micheil: then you know that from that , it's exactly n.. length to read [05:35] zikes: micheil: was actually building that bot to use as a component in another project, which is giving me fits now [05:35] micheil: zikes: heh [05:35] Aikar: so read 1 byte at a time until you have a non numeric [05:36] zikes: mjr_: looks like upstart relies on dbus >_< now I get this: start: Unable to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused [05:36] Aikar: well micheil if you write it sometime tomorrow send me a PM with url lol. i'm sure you can prolly write it better than i would too. i needs to get to sleep now >< [05:36] aurynn has joined the channel [05:37] micheil: Aikar: heh, probably not likely, I've gotta get working on some other stuff (that pays) [05:37] Aikar: lol [05:37] Aikar: understood [05:37] Aikar: im just starting basic code so maybe ill just use json with [05:38] Aikar: \n for now and switch to it later [05:38] micheil: use \0 [05:38] Aikar: grr keep hitting enter trying to hit \ [05:38] micheil: if anything. [05:38] Aikar: alright [05:38] zikes: I second \0 [05:38] micheil: as you know that \0 is unlikely to appear in valid json [05:38] Aikar: true [05:38] Aikar: well wouldnt json.stringify() never have \n? [05:39] micheil: not so [05:39] micheil: it'll have \\n [05:39] Aikar: well any data ill be sending over this will be from json.stringify [05:39] micheil: and could if done wrong have \n [05:39] micheil: v8: JSON.stringify("\n") [05:39] v8bot: micheil: ""\\n"" [05:40] niko has joined the channel [05:41] micheil: gossip rings sound somewhat interesting.. [05:42] mikeal1 has joined the channel [05:43] viirya has joined the channel [05:43] zikes: indexzero: forever works like a charm, those folks at Ubuntu ought to hire you [05:43] jesusabdullah: No! We'd lose him to a bunch of UI bullshit [05:43] micheil: zikes: indexzero is already "employed" [05:43] micheil: nodejitsu, iirc. [05:43] jesusabdullah: I hear he's a TA [05:44] jesusabdullah: I'm a TA myself :v [05:44] micheil: TA? [05:44] jesusabdullah: teaching assistant? Grad student. [05:44] justinlilly has left the channel [05:44] halfhalo: ACTION is a Student Assistant at CSUN doing webdev [05:44] halfhalo: \win [05:45] jesusabdullah: student assistant? [05:45] jesusabdullah: Heh [05:45] micheil: ACTION is no longer a student [05:45] jesusabdullah: Undergrad? [05:45] halfhalo: yup [05:45] jesusabdullah: ^5 [05:45] jesusabdullah: Just got outta that myself [05:45] micheil: signed out of high school today. :D [05:45] evanmeagher: under what conditions does node tend to blow up with an ETIMEDOUT? [05:45] jesusabdullah: OH REALLY [05:46] indexzero: micheil: happily over employed and over worked :-D [05:46] jamund has joined the channel [05:46] micheil: indexzero: oh, that wasn't to say I wasn't employed :D [05:46] marshall_law has joined the channel [05:46] jesusabdullah: What's YOUR yob, micheil? [05:47] ryah: micheil: did you already wake up? [05:47] nuba has joined the channel [05:47] halfhalo: ACTION likes what he does. Rails webdev. Well, moving crap php to rails webev [05:47] micheil: ryah: uhh.. I've been awake all day/.. :P [05:47] ryah: isn't it like, 5am? [05:47] micheil: ryah: 5pm [05:47] ryah: oh - heh [05:47] micheil: although, I have on occasion been getting up at 5am [05:47] ryah: okay i haven't figured out how to imagine time in the future [05:48] micheil: it's like a -6 hour difference or something [05:48] micheil: and then just add a day [05:48] micheil: ryah: also, you'd have to come here and experience it :P [05:48] indexzero: micheil: don't get me started on sleep schedules [05:48] micheil: indexzero: ha, no worries :P [05:48] indexzero: JimBastard and I were on 12 - 6am for a while [05:49] micheil: 12? [05:49] jesusabdullah: Rails, eh? [05:49] indexzero: 12pm [05:49] micheil: midnight? [05:49] jesusabdullah: I've never learned ruby [05:49] halfhalo: ACTION is strange in that he has a normallish sleep schedule as a college student [05:49] jesusabdullah: 7:00-11:00 [05:49] indexzero: there's still an edge case in the http parser that was taking down node-http-proxy every 8 hours or so [05:49] jesusabdullah: roughly [05:49] indexzero: that's why I wrote forever :-D [05:49] micheil: I was 3am->11am, 5pm -> 11pm [05:49] indexzero: damn ... I definitely sympathize [05:50] halfhalo: ACTION is usually 11-12pc to 8am [05:50] halfhalo: pm* [05:51] hoang has joined the channel [05:51] devinus has joined the channel [05:51] jesusabdullah: Oh, by sleeptime, not waketime [05:52] jesusabdullah: 11:00pm-->7:00am then! [05:52] jesusabdullah: It's less grueling than the midnight--6, but still unsustainable :( [05:52] hoang: hello, i'm writing a custom filter for Jade and find out that the variable is not yet replace inside the filter. Is it true or something wrong with my filter? [05:52] halfhalo: wait... I don't remember what my alarm is set to anymore... [05:53] indexzero: jesusabdullah: What do you TA? [05:53] softdrink: node's speed scares me sometimes. 100K records in my data model generated, inserted, modified, and deleted (while firing off events for every operation) = 1.428s [05:53] jesusabdullah: indexzero: ES346, Basic Thermodynamics and ME458/658, Energy & the Environment [05:54] halfhalo: jesusabdullah: I was with you up to Thermo [05:54] halfhalo: :p [05:54] micheil: softdrink: try that on importing a few million records into mongodb.. done in about 5 seconds. [05:54] softdrink: crazy [05:54] jamescarr_ has joined the channel [05:55] jesusabdullah: Hah [05:55] micheil: hey jamescarr_ [05:55] jesusabdullah: Basic Thermo isn't too bad [05:55] jesusabdullah: Pretty cool actually [05:55] jamescarr_: sigh... my internets is slow [05:55] jesusabdullah: Students are doing stuff now with basic Carnot cycle calculations [05:55] indexzero: jesusabdullah: Nice. I'm TAing COMS W6998-6: Cloud Computing and Data Center Networking [05:55] jesusabdullah: Sounds really fancy [05:56] jesusabdullah: What're people learning from that? [05:56] halfhalo: ACTION chooses classes based on their relationship to his interests, and/or its relationship to fire [05:57] indexzero: jesusabdullah: Inner workings of some VM stacks: xen, kvm, etc. Also some other "cloud" concepts like differences between iaas, paas, saas [05:57] indexzero: it's kind of scary how clueless some of these graduate students are [05:57] jesusabdullah: Haha, yeah [05:58] hoang: hello, i'm writing a custom filter for Jade and find out that the variable is not yet replace inside the filter. Is it true or something wrong with my filter? [05:58] jesusabdullah: I can relate there. E&tE is like that sometimes [05:58] prettyrobots has joined the channel [05:58] jamescarr_: indexzero, graduate students? Try people out in the world [05:58] siculars has joined the channel [05:58] jesusabdullah: hoang: I'd help you if I knew anything about Jade [05:58] halfhalo: ACTION has to learn prolog. by tomorrow at 3:30 [05:58] indexzero: jamescarr_: haha yeah [05:58] jesusabdullah: Oh geez don't get me started on PEOPLE [05:59] micheil: hoang: try contact I think it's visionmedia on github. [05:59] halfhalo: Heh. I don't have to deal with people [05:59] jamescarr_: nothing is sillier than dealing with a 40 something that can't even get basic OO or concurrency [05:59] micheil: jesusabdullah: does not webscale. [05:59] hoang: tks, i'll try :-) [05:59] jesusabdullah: some people I knew made a wind turbine, and some of the shit people said... [05:59] jesusabdullah: Serious facepalm stuff [05:59] jamescarr_: I remember the day 4 years ago when I sat in a room where a guy was arguing for using FreeBasic :) [05:59] jesusabdullah: micheil: Huh? [05:59] indexzero: jamescarr_: I hear you, but imo age really has nothing to do with it. It's just a state of mind anyone can develop [06:00] micheil: jesusabdullah: the webscale comics.. [06:00] indexzero: that what you know is all you need to know [06:00] jesusabdullah: But yeah, this one guy even suggested turning it into a giant fan to blow smog towards nearby communities [06:00] jamescarr_: that kind of tomfoolery only happens in large companies :) [06:00] jesusabdullah: halfhalo: Whatcha doin' with prolog? [06:00] micheil: http://highscalability.com/blog/2010/9/5/hilarious-video-relational-database-vs-nosql-fanbois.html [06:00] jamescarr_: indexzero, oh I know, it's just annoying. [06:01] halfhalo: jesusabdullah: its for a class called "Concepts of Programming Languages" [06:01] jesusabdullah: Ah [06:01] halfhalo: I think I'm going to put it off till tomorrow... :p [06:01] indexzero: jamescarr_: yeah, I hear you. I dealt with all kinds of those people when I used to be in the financial industry [06:01] jesusabdullah: So you don't need to know it WELL ;) [06:01] micheil: jesusabdullah: no worse then the US govt. advisor saying they should create a dust cloud in the atmosphere to decrease global warming. [06:01] indexzero: they're mindset is kind of scary, like ostriches with their heads in the sand [06:01] jesusabdullah: >_< [06:02] jesusabdullah: That's kind of a "fuck we're desparate and need ideas" kinda suggestion though, not a "I'm some yahoo with a poor understanding of basic physics" kinda thing [06:02] halfhalo: ACTION doesn't support IE6 at work as well. :p [06:02] jesusabdullah: The reverse turbine guy isn't the best example--he's just the only one I can remember [06:02] jesusabdullah: Oh, here's a good one [06:02] jesusabdullah: and a quiz for all of you [06:02] jesusabdullah: Suppose your room is UNCOMFORTABLY HOT [06:03] halfhalo: jesusabdullah: liquid nitrogen [06:03] jesusabdullah: Can you cool the room by opening a refrigerator inside it? [06:03] micheil: no. [06:03] jesusabdullah: Any other answers before I give it away? [06:03] halfhalo: jesusabdullah: bomb [06:03] micheil: refrigerator doesn't cool, it just transfers heat [06:03] nsolsen has joined the channel [06:04] jesusabdullah: micheil: Spot on. And yet, some people don't understand that and are CONVINCED that opening the fridge will COOL THE ROOM [06:04] mjr_: What if your refrigerator is non-blocking, and gives you a callback when it's cooled off enough? [06:04] micheil: mjr_: that would be hot. and sounds like something for human api [06:04] jesusabdullah: instead of making the room HOTTER by pumping heat from the front to the back [06:04] jamescarr_: hmmm [06:04] micheil: (look up HumanAPI actually. [06:05] jesusabdullah: Now, if you point the fridge's butt OUT THE DOOR... [06:05] halfhalo: ACTION wants a macbook air [06:05] jesusabdullah: That's a little different. [06:05] jamescarr_: mjr_, that's called when it beeps when it has cooled off [06:05] jamescarr_: if it was blocking, I'd have to sit there manually checking it, unable to do anything else till it was donw [06:06] halfhalo: sounds like my popcorn maker [06:06] jesusabdullah: Another tidbit that may blow some peoples' minds: A refrigerator moves more heat energy than is required to run it. So, if you figure out the "efficiency" it's usually something like 400% [06:06] derren13 has joined the channel [06:06] jesusabdullah: Anyways: That's my day job. [06:07] mjr_: jesusabdullah: I'd like to make a reference: R14. Is that something? [06:07] jesusabdullah: Sounds like a refrigerant [06:08] halfhalo: and/or poison [06:08] halfhalo: ACTION likes [06:08] fangel has joined the channel [06:09] halfhalo: ACTION takes his melted brain, his coke from mcdonals, and his crumb donuts and watches tv [06:09] mjr_: Oh wait, maybe I'm confusing my terms. There's some measure of insulation efficiency that is prefixed byh a letter. [06:10] jesusabdullah: Oh [06:10] jesusabdullah: R-14 [06:10] jesusabdullah: Sure [06:10] mjr_: My stepdad is an engineer for a refrigerator company, and he's forever going on about how some material has some better R-value than another. [06:10] jesusabdullah: Hah! [06:11] AAA_awright: webr3: Perhaps you would be interested in the project I've been working on [06:11] mjr_: Which I can fully appreciate, because I can forever go on about JavaScript and HTTP and none of my family has any idea what I"m talking about. [06:11] halfhalo: heh, I can do the same... but with basic technology [06:11] jesusabdullah: yeah, R-value is a measure of how many degrees you need to have different across the wall in order to get some amount of heat flow [06:12] jesusabdullah: So, like, fahrenheit/(btu/hr/ft) or some such [06:13] jesusabdullah: There are a few different related ideas there--k, R and some other R, all with slightly different units [06:13] jesusabdullah: I think R-value incorporates insulation thickness [06:13] jesusabdullah: ANYWAYS [06:13] jesusabdullah: R-20/R-40 is more common up here [06:13] mjr_: oh right, R-20, sorry for the confusion. [06:13] jesusabdullah: 'sall good [06:13] jesusabdullah: You're not an engineer [06:14] jesusabdullah: Though you COULD program a "how big of a stove do I need?" calculator in Javascript I'm sure! [06:15] halfhalo: What CAN'T you do in havascript? Besides make toast, that is [06:15] mjr_: I actually did write a little JavaScript program to compute the solar gain of a hot water system. [06:15] derferman has joined the channel [06:15] jesusabdullah: Nice :D [06:16] jesusabdullah: Reminds me: there isn't a good way to get at what you named the arguments for a js function, is there? [06:16] mjr_: I dunno, I don't think so. [06:17] mjr_: 8 years ago, I also wrote a JavaScript program to compute a fuel octane blending table. http://ranney.com/mjr/fuel_blend.html [06:17] jamescarr_: finished up a late night screencast of my node.js based jasmine tool: http://vimeo.com/16877035 [06:17] mjr_: These are programs I wrote before I had kids. [06:17] jesusabdullah: I was making a little project in class today for making these sorts of calculators [06:17] jamescarr_: my screencasting skills are atrocious ;) [06:18] jesusabdullah: and it'd be nice if there was a way to not have to label functions [06:19] jesusabdullah: Nice little calculator, mjr_ ! [06:19] jesusabdullah: https://gist.github.com/701101 [06:19] mjr_: Looking at the code that I wrote 8 years ago makes me cringe. [06:19] jesusabdullah: Because the browser is the only script interpreter some people have! [06:20] jamund: jamescarr_: what do you use to make your screencasts? [06:20] jamescarr_: gtk-recordmydesktop [06:20] jamescarr_: I just discovered it [06:21] jamund: i thought everyone used macs [06:21] jamescarr_: lol.. not I [06:21] micheil: anyone know how nginx's virtual hosts and upstream stuff works internally? [06:21] jamund: this is very hard to take [06:21] jamescarr_: the screencast, or the fact I dont use mac? :) [06:21] jesusabdullah: <--fedora (these days) [06:21] CIA-95: node: 03Ryan Dahl 07master * r84a5a69 10/ doc/index.html : Fix doc links on index.html - http://bit.ly/9mxrYI [06:21] CIA-95: node: 03Ryan Dahl 07master * r9bf93de 10/ TODO : Update TODO - http://bit.ly/buXHA9 [06:22] micheil: jamund: a lot of node.js developers use either mac's or windows [06:22] ryah: micheil: i landed your patch [06:22] micheil: ryah: okay [06:23] micheil: ryah: there'll be more later, as I work through the todo list I've got for the documentation [06:23] jesusabdullah: jamescarr_: Is that an accent? Where are you from? [06:23] frode has joined the channel [06:23] jamund: i knew a nathan carr from liverpool. you related to him? jamescarr_ [06:23] micheil: minds you ryah, https://github.com/ry/node/commit/90d1e47323096b01ae78218e2ea21e7d68690cf8#L1R93 [06:23] ben_alman has joined the channel [06:23] jamescarr_: jesusabdullah, that's the james carr accent. I'm a hodge podge of about a dozen races :) [06:23] ryah: i wish meta+esc went to the last window in irssi [06:23] jamescarr_: I'm from the states though [06:24] ryah: is there a key like that [06:24] jamund: :-/ [06:24] joshthecoder has joined the channel [06:24] jamescarr_: jamescarr_, probably not. Carr is a common surname in Great Britain [06:24] ryah: micheil: thanks [06:24] micheil: ryah: hmm, -1 to EventEmitter.optHandlers. [06:24] konobi has joined the channel [06:24] jesusabdullah: I have a friend like that--Mum's British, Dad's German. Born and raised in Alaska but has the weirdest accent [06:24] micheil: although, a stdin.on("data", enc, function(){}) [06:24] micheil: would work nicely [06:25] micheil: (no real need for it to be a hash) [06:25] gkatsev has joined the channel [06:25] CIA-95: node: 03Ryan Dahl 07master * ra01e095 10/ Makefile : scp should copy the right dir - http://bit.ly/apOfVg [06:25] jesusabdullah: Nice notification [06:26] evanmeagher: is there a common escape char to use in place of periods in key name in mongodb? [06:26] evanmeagher: *names [06:26] jamescarr_: jesusabdullah, thanks, should work in OSX with growlnotify too [06:26] ryah: micheil: why? [06:26] ryah: micheil: oh, okay [06:26] nsolsen has joined the channel [06:26] micheil: well, the options object just seems unneeded, and the less stuff we have in eventemitters, the better [06:26] ryah: just thinking about how to implement it... [06:26] jamescarr_: under the hood it's a lot of fun... it uses websockets to push changes between the server and browser and the server runs inside a WebWorker [06:27] jesusabdullah: hmm! [06:27] micheil: unless you prototyped the function or something.. [06:27] halfhalo: anything with websockets is automatically awesome [06:27] Nomon_: evanmeagher: there shouldn't be a need to, 'key.name' ? [06:28] micheil: anyone done anything with virtual hosting with node? /cc indexzero ? [06:28] evanmeagher: Nomon_: mongo doesn't allow '.' within keys because of the inherent dot-notation of queries [06:28] indexzero: micheil: What's your question? Everything at Nodejitsu is run ontop of the Rackspace Cloud [06:28] micheil: ryah: this is a curious todo too. - process object should be defined in src/node.js not in c++ [06:28] micheil: 19 16 [06:29] Nomon_: evanmeagher: ah so you want to use a . in the actual key name [06:29] micheil: indexzero: well, I'm thinking it'd be cool to have a simple config file which routes different port and host locations to different node instances [06:29] evanmeagher: Nomon_: yes [06:29] ryah: micheil: there is a very hacky thing done in src/node.cc while initializing process [06:29] ryah: micheil: it would look much nicer if it was just defined in JS [06:29] indexzero: micheil: Our load balancer is a very minimal piece of code built on top of node-http-proxy [06:30] indexzero: http://github.com/nodejitsu/node-http-proxy [06:30] micheil: ryah: yeah, I saw, only, it needs to set a bunch of variables from C into that object [06:30] Evet: why dont we just use the HEAD method? [06:30] indexzero: michel: node-http-proxy doesn't have a lookup table, it's just the reverse proxy part, but writing the ip table is really straight forward [06:31] micheil: indexzero: does it do any fd passing or just creates 2 connections per request [06:31] indexzero: micheil: 2 connections, I haven't had the time to dig into the lower level apis [06:31] micheil: okay [06:32] indexzero: but commits are welcome :-D [06:32] Nomon_: evanmeagher: sounds to me like something to avoid. http://www.mongodb.org/display/DOCS/BSON -> 2. A user document element name cannot have a "." in the name. [06:32] micheil: I'm thinking it'd be possible to pass fd's and stuff, but not sure [06:32] indexzero: micheil: that would involve using a tcp server right? [06:32] evanmeagher: Nomon_: I know, that's why I'm asking if there's a defacto escape char that people tend to use [06:32] micheil: indexzero: not sure to be honest. [06:32] Omni5cience has joined the channel [06:33] indexzero: micheil: ok, a couple of people suggested using a tcp server and instantiating the http parser on our own [06:33] micheil: indexzero: currently I'm working on stuff to scale eventemitters horizontally [06:33] indexzero: you mean IPC? [06:33] micheil: IPC? [06:33] indexzero: inter-process communication [06:33] Nomon_: so if you want to do name.first for example it would be {name: {first: '',last: ''}} instead. You should not even try to use the period in a key name [06:33] micheil: indexzero: yeah, pretty much [06:33] meatmanek has joined the channel [06:33] micheil: although, it acts exactly like an eventemitter [06:34] indexzero: micheil: That would be an amazing [06:34] indexzero: being able to listen to events in other processes just like the standard events.EventEmitter [06:34] micheil: currently I'm thinking doing something with a ring setup [06:34] micheil: so, each node would be a tcp server and client [06:35] micheil: or something. [06:35] sanduz2 has joined the channel [06:35] micheil: I haven't really figured it out heaps. but I know I don't want to terribly reduce the number of fd's a server could have open [06:36] micheil: but I'm not wanting to have any central broker. [06:36] mikew3c_ has joined the channel [06:36] indexzero: micheil: Yeah, that's a tricky protocol to design. You should talk to indutny, he was working on something like that [06:36] indexzero: but it was all with websockets [06:37] micheil: oh? [06:37] micheil: indexzero: was it on github? [06:37] micheil: indexzero: the other thing I could do is use dgram and stuff [06:38] indexzero: micheil: udp seems like something that might be appropriate for message passing [06:38] indexzero: although packet loss could be a problem [06:38] micheil: indexzero: at the same time, yeah [06:38] micheil: depends on the exact needs of the project [06:38] micheil: the originating idea was for being able to scale node-websocket-server [06:39] indexzero: micheil: github appears to be unicorning, but the link to that project is here [06:39] indexzero: github.com/donnerjack13589/Koala [06:39] micheil: being that you could stick a load balancer in front of several node processes, I'd then need that inter-process communication [06:39] indexzero: he goes by indutny in the irc though [06:39] micheil: k [06:39] jacobolus has joined the channel [06:39] zikes: indexzero: how long 'til you expect to have forever stop working? [06:40] indexzero: zikes: not sure, maybe a couple of weeks [06:40] micheil: zikes: something that is forever does not need to stop. [06:40] zikes: micheil: helps with development, need to restart the process when I update the .js file [06:41] micheil: indexzero: I wonder if koala uses nws' Manager [06:41] micheil: v8: ~~(Math.random() * 1E9); [06:41] v8bot: micheil: 569371327 [06:41] rednul has joined the channel [06:41] indexzero: micheil: I'm actually trying to implement some of the functionality available in djb supervisor [06:41] micheil: hmm.. I wonder what the total sample space for that would be. [06:41] micheil: djb? [06:41] jshaw has joined the channel [06:42] indexzero: http://cr.yp.to/daemontools.html [06:42] indexzero: he's just some guy [06:42] aabt has joined the channel [06:42] micheil: okay [06:44] pquerna: 'some guy' [06:44] rauchg_: haha [06:44] rauchg_: just some guy.. [06:45] indexzero: pquerna: What? lol. I don't know how to describe people [06:45] micheil: morning pquerna and rauchg_ [06:45] pquerna: good morning [06:45] pquerna: indexzero: i'm actually using runit [06:45] rauchg_: morning [06:45] pquerna: http://smarden.org/runit/ [06:45] pquerna: its a slightly more portable and up to date daemonttools [06:45] micheil: indexzero: you sure that's using websockets? [06:45] pquerna: only slightly :) [06:46] indexzero: micheil: yeah, check github now, seems to be working again [06:46] micheil: hmm.. it doesn't look like it is [06:46] indexzero: it's in the example code, maybe it just attaches to a websocket server [06:47] fangel: .. have you been coding too long, when runit sounds like a unit-testing framework for ruby, rather than Run It? [06:48] micheil: indexzero: it does use a http protocol, but not websockets [06:48] indexzero: micheil: indutny added the websocket support to node-http-proxy 0.3.1 so he might just have his own impl of the protocol [06:48] jesusabdullah: I actually used to know something about process monitors [06:48] jesusabdullah: I should blog about it [06:48] jesusabdullah: even though I haven't used them all, I've done some research [06:48] indexzero: micheil: yeah you're right, he uses a custom protocol it looks like [06:49] DanielSim has joined the channel [06:49] indexzero: https://github.com/donnerjack13589/Koala/blob/master/koala/lib/utils.js#L55 [06:49] technoweenie has joined the channel [06:49] micheil: yup [06:49] ThePub has joined the channel [06:50] indexzero: pquerna: I couldn't quite massage daemontools to my needs, so I updated forever to use daemon.node [06:50] admc has joined the channel [06:50] pquerna: indexzero: meh, the problem with doing it in node is, thats code that changes. daemontoools.. should never change :) [06:50] pquerna: (hence, never be upgraded, hence, never restart a process or child process) [06:51] indexzero: pquerna: Yeah, that's definitely a concern, I'll check out runit [06:51] indexzero: daemon.node is a C++ add-on, so hopefully the v8 apis won't change too much [06:52] pquerna: its really doing different things but meh [06:53] micheil: pquerna: hey, what was that thing you mentioned about firefighting? [06:54] evanmeagher: how can one narrow down the cause of node firing a ETIMEDOUT? the output is unhelpful at best. [06:55] micheil: evanmeagher: depends what you are doing [06:55] indexzero: pquerna: I hear ya, but it gets the job done :-D [06:57] rubydiamond has joined the channel [07:01] pquerna: micheil: cassandra is really cool and everyone should use it [07:01] pquerna: micheil: just next time I'm not going to be the first [07:01] micheil: pquerna: huh? [07:01] pquerna: micheil: right now we are doubling the size of our cassandra cluster; and going multi-datacenter [07:02] micheil: ah [07:02] mraleph has joined the channel [07:02] micheil: tbh, I've never really looked at cassandra [07:02] pquerna: it has been painful; not just from cassandra, but also the new nodes. [07:02] pquerna: cassandra has actually been quite good... but other issues have dominated. [07:02] pquerna: with the hosting company. [07:05] technoweenie: does cassandra have a non thrift api now? [07:05] confoocious has joined the channel [07:05] confoocious has joined the channel [07:05] technoweenie: oh 0.8 has avro [07:07] micheil: hmm.. because of the way node's net.Stream and net.Server work, I could theoretically have IPC across any tcp or unix socket [07:08] cataska has joined the channel [07:09] mbrochh has joined the channel [07:14] blaines has joined the channel [07:19] meso has joined the channel [07:20] springify has joined the channel [07:24] froots has joined the channel [07:28] jvolkman_ has joined the channel [07:36] evanmeagher has joined the channel [07:38] ryah: technoweenie: i don't think so [07:38] ryah: at least that's the rumors i hear [07:39] ryah: and by rumors i mean talks at conferences :) [07:39] micheil: ryah: just going through pull requests and issues, there's a few they could easily be closed [07:39] confoocious has joined the channel [07:39] technoweenie: ryah: oh i was just curious how pquerna was talking to cassandra then [07:39] technoweenie: i assumed he was using node [07:39] rauchg_: he's using python [07:39] micheil: technoweenie: nup, It was just in relation to his "day-job" [07:40] technoweenie: ah ok [07:41] ryah: someone should just figure out the generator and plug in some node stuff. [07:45] SamuraiJack has joined the channel [07:46] jesusabdullah: What's pquerna's day job? [07:47] technoweenie: yahoo isnt it [07:47] jesusabdullah: I dunno [07:47] micheil: no idea. [07:49] mjr_: jesusabdullah: pquerna works at cloudkick [07:49] technoweenie: Bio Apache Member, httpd hacker, Cloudkick kicker [07:49] Evet: i thought node.js speed is comparable to c [07:50] margle has joined the channel [07:50] mikedeboer has joined the channel [07:53] bartt: does fs.createWriteStream() honor the w+ flag? [07:53] ph^ has joined the channel [07:54] bartt1 has joined the channel [07:54] micheil: bartt: I think it may. [07:55] bartt1: micheil: It may honor it, or it may ignore it? [07:55] micheil: may honor [07:55] micheil: but it may not [07:55] micheil: you'd have to test it [07:55] micheil: (and then document it) [07:55] bartt1: My tests say it doesn't [07:56] technoweenie: i love those answers [07:56] technoweenie: if it does, then it does [07:56] technoweenie: if it doesnt, then it doesnt [07:59] bartt: Hmm, so fs.createWriteStream(__dirname + '/log/access.log', {flags: 'w+', mode: '644'}) does NOT append to access.log [07:59] agnat has joined the channel [08:00] technoweenie: shouldnt it be a+ [08:00] mraleph has joined the channel [08:00] bartt: Doh! [08:00] bartt: I've been working too long... [08:01] technoweenie: a+++++ would buy from again [08:02] mjr_: technoweenie: a++ would definitely drink this much again [08:04] benburkert has joined the channel [08:04] stephank has joined the channel [08:04] crohr has joined the channel [08:06] mikeal1 has joined the channel [08:08] prettyrobots has joined the channel [08:09] superjudge has joined the channel [08:12] Jonasbn_ has joined the channel [08:12] Rixius has joined the channel [08:12] Rixius has left the channel [08:15] Rix has joined the channel [08:15] mbrochh has joined the channel [08:15] mbrochh has joined the channel [08:15] Rixius has joined the channel [08:17] Rixius: Hey is there a good very-random RNG module for Nodejs? [08:20] tisba has joined the channel [08:20] aho: Rixius, there is a nice collection of js prngs over here: http://baagoe.com/en/RandomMusings/javascript/ [08:20] Rixius: Thanks Aho [08:20] faust45 has joined the channel [08:21] aho: i'm still a big fan of xorshift... even if it's sub optimal for js :> [08:23] Rixius: Any thoughts on Alea? [08:23] blaines has joined the channel [08:25] aho: well, /he/ says it's awesome and he surely knows a lot more about that topic than i do :> [08:26] kjeldahl has joined the channel [08:28] aho: http://baagoe.com/en/RandomMusings/javascript/time.xhtml [08:28] aho: heh. v8 surely is fast :> [08:29] Rixius: Thanks Aho [08:30] aho: a somewhat relevant article i wronte a while ago: http://kaioa.com/node/53 [08:30] aho: might be interesting [08:30] ivanfi has joined the channel [08:32] case__ has joined the channel [08:33] brianmario has joined the channel [08:33] aho: minefield (or jägermonkey for that matter) is also pretty fast. nice :) [08:34] [AD]Turbo has joined the channel [08:34] [AD]Turbo: hi there [08:37] adambeynon has joined the channel [08:38] Rixius: aho: I'm looking so I can make a more Random Dice Roller [08:38] Rixius: I don't want to trust Math.Random, but I want a javascript Dice Roller [08:40] aho: ye, Math.random isn't very good, but for rolling dice it's probably good enough .> [08:40] fbits has joined the channel [08:41] Rixius: If I use a more Random Dice Roller I won't blame the roller when I do poorly [08:42] fbits has left the channel [08:42] Druid_ has joined the channel [08:43] aho: well... you can use a shufflebag to average it out more quickly [08:43] aho: eg if you add 1-6 3 times and you draw 18 times 1 will be drawn 3 times (and the same goes for 2-6) [08:44] aho: this also means 1 can be drawn up to 6 times in a row, but not 7 times [08:45] aho: (3 times at the end of a full pass... and 3 times at the beginning of the next pass) :> [08:48] jed___ has joined the channel [08:50] foertel has joined the channel [08:50] virtuo has joined the channel [08:54] robmason has joined the channel [08:56] dodgyballz has joined the channel [08:57] serard has joined the channel [08:58] dodgyballz: So i'm having trouble running Node on Amazon EC2 (debian). Cannot see response via http browser (404) yet i dont get any errors running the script 'node example.js'. [08:59] meso has joined the channel [08:59] dodgyballz: any ideas? [09:00] mikedeboer has joined the channel [09:01] rwaldron_ has joined the channel [09:03] delapouite has joined the channel [09:06] tilgovi has joined the channel [09:07] unomi has joined the channel [09:11] Dreamer3 has joined the channel [09:17] Dunk__ has joined the channel [09:23] zomgbie has joined the channel [09:28] aubergine has joined the channel [09:28] aubergine_ has joined the channel [09:29] teemow has joined the channel [09:30] pdelgallego has joined the channel [09:32] TomY has joined the channel [09:34] dgathright has joined the channel [09:36] hellp has joined the channel [09:38] ctp has joined the channel [09:38] bahamas has joined the channel [09:40] markwubben has joined the channel [09:40] christophsturm has joined the channel [09:41] landlessness has joined the channel [09:48] aubergine has joined the channel [09:55] danslo has joined the channel [09:56] Connorhd has joined the channel [09:57] slaskis has joined the channel [09:58] xla has joined the channel [09:59] rnewson has joined the channel [09:59] InsDel has joined the channel [10:01] tekky has joined the channel [10:01] Dreamer3 has joined the channel [10:03] deitch has joined the channel [10:03] lmorchard has joined the channel [10:04] omarkj has joined the channel [10:05] ivanfi has joined the channel [10:06] sivy has joined the channel [10:07] Dunk__ has left the channel [10:08] petercooper has joined the channel [10:09] _mql has joined the channel [10:10] _mql has left the channel [10:14] MattJ has joined the channel [10:15] robinduckett: morning all [10:16] mbrochh has joined the channel [10:18] foertel: mornin [10:18] stride: morning [10:19] robinduckett: I have a date on saturday [10:19] robinduckett: this is significant to me. [10:19] robinduckett: :P [10:20] stride: does she code? [10:20] stride: ;-) [10:20] robinduckett: no but she does swallow. [10:20] stride: hm, tmi. tell twitter [10:21] robinduckett: hah :P [10:21] micheil: robinduckett: they are two totally different leagues, man. [10:21] robinduckett: the only girl I met who could code was completely wasted on beer and mephedrone in a dank assed club, who decided she wanted to go to the toilet, dragged me in there and stripped down to go [10:22] case__ has joined the channel [10:22] robinduckett: she had a really nice body though so there were not much complaints. [10:22] robinduckett: never saw or heard from her again [10:22] saschagehlich has joined the channel [10:22] stephank: to go... code? [10:22] robinduckett: nope. [10:22] foertel: men … what is this about? *g* [10:23] stride: foertel: female ruby coders [10:23] foertel: mh … strange [10:23] foertel: ;) [10:23] robinduckett: she was a comp sci student [10:23] stephank: really? ruby? you'd think they'd have higher standard [10:23] stephank: s [10:23] robinduckett: so it would have been like fortran [10:23] stephank: exactly [10:23] case__: ruby??? *dirty* ... [10:23] robinduckett: she was dirty in the good way [10:24] robinduckett: my nerd heart skipped a beat [10:24] case__: was she throwing exceptions ? [10:24] stride: you learn fortran in the U.S. compsci programs? [10:24] robinduckett: none [10:24] robinduckett: I'm from the UK [10:24] stride: ah, ok [10:27] JojoBoss has joined the channel [10:28] xla has joined the channel [10:28] JojoTheBoss has joined the channel [10:30] altamic has joined the channel [10:33] saschagehlich has joined the channel [10:33] micheil: ~true [10:33] micheil: erm [10:33] micheil: v8: ~true [10:33] v8bot: micheil: -2 [10:34] micheil: v8: ~"a" [10:34] v8bot: micheil: -1 [10:34] micheil: hmm.. [10:34] indutny: v8: ~~-1 [10:34] v8bot: indutny: -1 [10:34] indutny: v8: ~~(-1) [10:34] v8bot: indutny: -1 [10:34] indutny: v8: ~~(1E9) [10:34] v8bot: indutny: 1000000000 [10:34] indutny: v8: ~~(1E120) [10:34] v8bot: indutny: 0 [10:34] indutny: v8: ~~(1E40) [10:34] v8bot: indutny: 0 [10:34] indutny: v8: ~~(3E40) [10:34] v8bot: indutny: 0 [10:34] indutny: v8: ~~(3E40 + 1) [10:34] v8bot: indutny: 0 [10:34] indutny: v8: ~~~~3 [10:34] v8bot: indutny: 3 [10:34] indutny: v8: ~~~# [10:34] v8bot: indutny: SyntaxError: Unexpected token ILLEGAL [10:34] indutny: v8: ~~~3 [10:34] v8bot: indutny: -4 [10:34] indutny: v8: Object.freeze(Object) [10:34] v8bot: indutny: function Object() { [native code] } [10:35] indutny: v8: Object.x = 1 [10:35] v8bot: indutny: 1 [10:35] indutny: v8: Object.freeze(Object); Object.x = 1 [10:35] v8bot: indutny: TypeError: Can't add property x, object is not extensible [10:35] mraleph has joined the channel [10:36] jankoprowski has joined the channel [10:37] micheil: v8: (function(a,b,c){}).length [10:37] v8bot: micheil: 3 [10:37] Gurpartap has joined the channel [10:37] indutny: (function(a,b,c){}).name [10:37] indutny: v8: (function(a,b,c){}).name [10:37] v8bot: indutny: "" [10:38] indutny: v8: (function a(a,b,c){}).name [10:38] v8bot: indutny: "a" [10:38] sveimac has joined the channel [10:38] indutny: v8: (new Function('', 'a', 'b', 'c')).length [10:38] v8bot: indutny: SyntaxError: Unexpected token , [10:39] indutny: v8: (new Function(['a', 'b', 'c'], '')).length [10:39] v8bot: indutny: 3 [10:39] Gurpartap has left the channel [10:40] tony__ has joined the channel [10:41] indutny: var a = [], i = 1E5; while(i--) {a.push('a' + i);}; (new Function(a, '')).length [10:41] indutny: v8: var a = [], i = 1E5; while(i--) {a.push('a' + i);}; (new Function(a, '')).length [10:41] v8bot: indutny: 100000 [10:41] indutny: v8: var a = [], i = 1E9; while(i--) {a.push('a' + i);}; (new Function(a, '')).length [10:41] v8bot: indutny: Error: Timeout [10:41] Ezku\_: how about using something else than this channel for a REPL... [10:42] davidc_ has joined the channel [10:42] indutny: oh, sorry [10:42] indutny: just experimenting [10:45] sth: Ezku\_: damn straight [10:46] javruben has joined the channel [10:46] aubergine has joined the channel [10:50] ewdafa has joined the channel [10:54] landlessness has left the channel [10:58] stagas has joined the channel [11:00] derren13 has joined the channel [11:03] Ori_P has joined the channel [11:03] sixtus42 has joined the channel [11:03] derren131 has joined the channel [11:11] robotarmy has joined the channel [11:14] sixtus42 has joined the channel [11:14] Evet has joined the channel [11:14] zorzar_ has joined the channel [11:15] simme has joined the channel [11:29] dquestions has joined the channel [11:31] saschagehlich has joined the channel [11:32] hellp has joined the channel [11:34] sixtus421 has joined the channel [11:35] malkomalko has joined the channel [11:41] davidc_ has joined the channel [11:46] foertel has joined the channel [11:46] stagas: ping [11:46] foertel: pong [11:48] iszak has joined the channel [11:49] iszak has joined the channel [11:49] jetienne has joined the channel [11:49] jetienne: q. is there a way to get 2.4 doc ? [11:49] micheil: yeah [11:49] stagas: http://nodejs.org/docs/v0.2.4/api.html [11:49] jetienne: t-hx [11:49] micheil: checkout v0.2.4 in the repo [11:49] micheil: or that [11:49] fermion has joined the channel [11:58] foertel has joined the channel [11:58] benburkert has joined the channel [11:59] herbySk has joined the channel [12:00] christophsturm: is there a way to search for npm packages? [12:00] Ori_P_ has joined the channel [12:01] Kami_: christophsturm, npm ls [12:02] christophsturm: thanks [12:03] zemanel has joined the channel [12:07] christophsturm: i moved from homebrew installed node to nvm installed node and now npm does not work for me anymore [12:09] hellp has joined the channel [12:10] mbrochh has joined the channel [12:11] christophsturm: anyone using npm with nvm without problems? [12:12] jetienne: what is nvm ? :) [12:12] christophsturm: https://github.com/creationix/nvm [12:12] jvolkman_ has joined the channel [12:13] jetienne: christophsturm: i think it would be easier to handle the node install by hand [12:13] jetienne: christophsturm: like make install in the version you currently want. [12:13] christophsturm: thanks thats very helpful [12:14] spetrea_ has joined the channel [12:14] jetienne: christophsturm: relax my advice was sincere [12:14] eee_c has joined the channel [12:15] sveisvei has joined the channel [12:17] christophsturm: jetienne: do you run multiple node versions side by side this way? [12:17] jetienne: christophsturm: kindof. i mean i do it from time to time but i use rarely use 0.3.0 [12:18] jetienne: christophsturm: this work if it is for dev only [12:18] jetienne: christophsturm: the point being that if you mix unstable software, you are more likely to hit issues. so removing one may ease your life [12:21] derren13 has joined the channel [12:27] altamic has joined the channel [12:27] robinduckett: oooh [12:29] iszak: I wonder when the 0.3.x branch will be deemed stable [12:33] unomi: not sure if it is a great idea to think of anything that is 0.X as being stable [12:33] iszak: Is there any critical known issues with 0.3.0? [12:35] achristianson has joined the channel [12:36] mAritz has joined the channel [12:36] rednul has joined the channel [12:38] okuryu has joined the channel [12:38] rnewson has joined the channel [12:38] rnewson has joined the channel [12:45] jacobolus has joined the channel [12:46] jetienne: unstable and edge :) [12:47] rtomayko has joined the channel [12:48] Akufen has joined the channel [12:48] Akufen has joined the channel [12:49] ako has joined the channel [12:50] dberlinger|afk has joined the channel [12:50] iszak: jetienne, it's just I've never experienced any issues, that's all. [12:51] jetienne: iszak: the issue i hit are more api stability than actual crash [12:51] iszak: you're right, there's definitely API changes. [12:51] sriley has joined the channel [12:51] Evet has joined the channel [12:54] iszak: I just think that there would hopefully not be a lot of API changes to be made, and migrating software to 0.3.0 would mitigate any programs in the future. [12:55] slaskis has joined the channel [12:56] Booths has joined the channel [13:01] Aikar: .3 has made a few changes [13:01] Aikar: like the process.bindings('script [13:01] Aikar: is now require('vm') [13:01] iszak: wow, heh. [13:02] dgathright_ has joined the channel [13:02] Aikar: .1 to .2 made some backwards incompat changes too [13:02] Aikar: its just something you gotta know going forward and be expected to make code changes [13:02] iszak: Okay so 0.2.4 won't be making any API changes but 0.3.x will? [13:02] Aikar: im glad ryan is doing that, i would rather him break things and get the language in a consistent and enjoyable state then try to keep things 'as they were in beta' to keep backwards compat [13:03] Aikar: s/then/than [13:03] iszak: yeah. [13:03] iszak: too much legacy API is bad, just look at PHP :D [13:03] Aikar: yep... [13:04] iszak: I mean they could've make primitives OO when they introduced OO but they didn't, god knows why, probably BC, still an okay language. [13:04] Aikar: func(needle,haystack), func2(haystack,needle),func3(boolean,haystack,array,neeedle,KILLME) [13:04] iszak: ah yeah, that's really annoying. [13:04] Aikar: ok time to leave for work biab in 30 [13:06] themiddleman has joined the channel [13:08] jetienne: iszak: php is ugly now but stable [13:08] iszak: stable as in API stable? [13:09] jetienne: stability is key for long term code. less important for toy/hobby as their lifetime are small [13:09] iszak: perhaps but it doesn't mean they couldn't have gotten things right. [13:09] jetienne: iszak: yep to get it right the first time is better :) [13:09] iszak: I think a consistent API would be a great plus for any language. [13:09] rauchg_: i think what's important is the process towards stability [13:10] jetienne: rauchg_: and currently nodejs got one ? :)à [13:10] rauchg_: i'm pretty sure more people are having a say on what node.js will look like in a few months/years than for PHP [13:10] rauchg_: yes, you fork, you hack, you submit a patch [13:10] rauchg_: or you email the mailing list with ideas [13:11] iszak: but it doesn't ensure your patch will get submited. [13:11] jetienne: yep, so basically no process. This is good to grow fast, but hardly for stability [13:11] iszak: Lets face it, I doubt PHP is going to get beautified like Ruby anytime soon or even in PHP 6. [13:11] jetienne: iszak: look at the transition time between ruby 1.8 and ruby 1.9 [13:11] jetienne: iszak: same for python [13:11] iszak: I was just searching up Ruby :D [13:12] iszak: But look at Ruby 1.9.2 it has unicode already, right? [13:12] jetienne: maybe, but ubuntu still use 1.8, why ? :) [13:12] iszak: no it doesn't. [13:13] iszak: I just apt-cache search ruby and it has 1.9 and 1.9.1 that's 10.04 [13:13] SubStack: hmmm I am up bit late this morning [13:13] jetienne: iszak: do "ruby -v" [13:13] iszak: I don't have ruby installed. [13:13] jetienne: ruby -v will give you 1.8 [13:13] jetienne: so why ? [13:14] jetienne: because unstability in the API [13:14] iszak: okay you're right, it defaults to 1.8 [13:14] jetienne: the point being that if you break compatibility, the transition will take forever [13:14] iszak: API changes are necessary, we should just migrate sooner rather than later. [13:15] jvolkman_ has joined the channel [13:16] iszak: I guess if you take too long to migrate you may not ever. [13:17] iszak: Take for example all those software packages still relying on IE6, if they upgraded it to IE7/8 then they wouldn't have such a huge cost to migrate it to IE8 which it's probably cheaper to recreate than migrate. [13:22] sth: Hi, for the http.server, does it automatically send the chunk size if I've defined the transfer encoding to chunked? [13:22] robinduckett: sth: experiment with it [13:22] robinduckett: to make an http server takes like four lines lol [13:24] jetienne: sth: no, look at connect to do stuff like that [13:26] beawesomeinstead has joined the channel [13:27] tony__ has joined the channel [13:29] foertel: what are the parts some does definetly have to take a look at? ;) [13:29] foertel: connect, express, Spark? [13:31] sclaflin has joined the channel [13:32] DoNaLd`: works socket.io with server which has ssl mode ? [13:33] jetienne: rauchg_: do you know if socket.io works on an android browser? im having issue and would like to know if it is me or normal issue [13:34] rauchg_: jetienne: it's been reported to work many times [13:34] rauchg_: unfortunately i don't have a testing device [13:34] rauchg_: but i'm working on getting one [13:34] davidc_ has joined the channel [13:34] jetienne: rauchg_: ok [13:35] aubergine_ has joined the channel [13:36] caolanm has joined the channel [13:36] Aikar: jetienne: androud emulator is free :p [13:37] jetienne: Aikar: i got several android devices [13:37] Aikar: if you get the flash fallback setup it should use that on newer devices, and if not, fallback to XHR [13:37] jetienne: in fact the hardest is i dunno how to debug on those [13:37] Aikar: the emu has version selector [13:37] jetienne: all i know is "this page works well on any pc browsers, but failed on android browser" [13:38] jetienne: and fail = socket.io never notifying connect [13:38] kriszyp has joined the channel [13:38] jetienne: no console.log on android device [13:38] jetienne: my debug knowledge is bad on android [13:43] ntelford: when calling http.ServerResponse.write(chunk) are the chunks buffered internally or output immediately? [13:43] ntelford: specifically, if the Transfer-Encoding is "chunked", will the chunk the client receives match up to the chunks being passed in to that method [13:45] sixtus42 has joined the channel [13:49] ajcates: what is the best way todo inheritance in node.js? [13:50] stride: ntelford: it's only buffered at the OS level I think, which should be fine because parsers would buffer them until all bytes are received and/or the delimiter is hit [13:50] ntelford: actually, we've just figured out where the problem has come from [13:51] malkomalko has joined the channel [13:51] ntelford: http.ClientResponse seems to be buffering chunks in to logical chunks of 1448 bytes [13:51] sth: ajcates: objectName.call() [13:52] ajcates: sth: can you show me an example? maybe on a gist or something [13:53] ajcates: also like every article i find explains it differently [13:53] ajcates: very confusing [13:53] jvolkman: that's because there are many ways to do it [13:53] sth: function Foo() { this.foo = 'foo'; } function Bar() { this.bar = 'bar'; Foo.call(this); } [13:53] foertel: mh … read crockford ;) [13:53] Evet has joined the channel [13:53] foertel: he knows how to do it [13:53] sth: new Bar().foo == 'foo' [13:54] Evet has joined the channel [13:56] adambeynon has joined the channel [13:57] mif86 has joined the channel [13:57] Anti-X has joined the channel [13:57] Aikar: ajcates: may want to look at JS.Class [13:57] mbrochh has joined the channel [13:58] Aikar: it provides alot of useful OO functions [13:58] foertel: what about embedJS with mixin-support? [13:58] Aikar: iono, someone told me about js.class and it has mixin support too iirc, its pretty well rounded [13:59] foertel: is it common to use external "frameworks" or toolkits in node? [13:59] ajcates: Aikar: are there any frameworks written on js.class ? [13:59] Aikar: you mean like modules / npm? lol [14:00] Aikar: ajcates: i dunno ive not used it yet [14:00] foertel: no [14:00] Aikar: im still pretty much in research stage of my project [14:00] foertel: external like in … "external" :D [14:00] teemow has joined the channel [14:00] foertel: not modules but frameworks or toolkits which are not intended to work with node [14:01] Aikar: oh, well the syntax is the same so as long as the framework isnt specifically targetted at the DOM it should work [14:01] Aikar: (since there is no DOM...) [14:01] foertel: yep [14:01] Aikar: but alot of libs do have cross browser compatability code which is likely to cause issues [14:01] foertel: embedJS has a non-dom build [14:02] foertel: i will take a look later ;) [14:02] splashs has joined the channel [14:02] foertel: would be great to use allready-known syntax and stuff [14:03] mytrile has joined the channel [14:04] Aikar: you know ive been wondering, howcome npmjs.org doesnt have a list of things available on npm... ? [14:07] Aikar: foertel: theres tons of libs on npm [14:07] Aikar: just sadly npm doesnt seem to have a public listing of whats avail [14:08] zomgbie has joined the channel [14:08] Aikar: oh i guess npm ls works but no description on what it is [14:13] trotter has joined the channel [14:13] demolithion has joined the channel [14:14] cferris has joined the channel [14:14] BillyBreen has joined the channel [14:16] mbrochh has joined the channel [14:17] jshaw: node can't preempt execution in the middle of a closure right? [14:17] Kami_: Aikar, there is nodul.es and npm.mape.me [14:18] BillyBreen has joined the channel [14:19] boaz has joined the channel [14:19] Aikar: Kami_: O.o why are other sites listing it instead of npm itself? [14:19] stephank: jshaw: I'm not sure, but maybe the GC can? [14:20] mape: Aikar: The great war of 02 [14:20] Aikar: i take it mape owns the mape link :P lol [14:20] Aikar: i do remember seeing that page before [14:21] jshaw: stephank: i just wanted to make sure code in a closure is atomic, because I have multiple instances of a closure acting on a shared resource [14:22] jshaw: so i don't want the resource getting corrupted because the closure got preempted by another closure [14:23] ysynopsis has joined the channel [14:24] stephank: jshaw: oh, well, it's single-threaded, so generally not a problem. [14:24] jshaw: yea that was my thought as well [14:24] stephank: jshaw: unless your code executes some library code, that might call into some callback back in your code, that acts on the same resource. :) [14:25] jacobolus has joined the channel [14:26] stephank: jshaw: But IIRC, any of node.js' own APIs try to avoid that kind of thing. [14:27] cjm has joined the channel [14:27] boaz_ has joined the channel [14:27] jamund has joined the channel [14:27] dquestions has joined the channel [14:28] Aikar: say i have entry point script foo.js, and it does require('bar'); is it possible for bar to access foo's variables so stuff like config can be in 1 file? [14:29] DoNaLd`: somebody plz. help me .. i'm experimenting with socket.io and my instance of node server runs on https (ssl layer) .. but in socket.io "documentation" is nothing described about https type connection client. is there some example for this case ? [14:29] Aikar: or do i need to put it all in global. [14:29] Aikar: socket.io should use the same ssl creds as your http server shouldnt it [14:30] ctp_ has joined the channel [14:30] robinduckett: Aikar [14:30] Aikar: robinduckett: [14:30] robinduckett: if you do a module exports in your parent file [14:30] robinduckett: you can access what you export [14:31] robinduckett: can't remember where i saw the documentation [14:31] robinduckett: but if i recall correctly it's like module.exports.parent [14:31] robinduckett: but don't quote me [14:31] Aikar: hmm [14:31] Aikar: that var doesnt sound like it would be right [14:31] Aikar: as module.exports = {} would destroy it [14:34] jchris has joined the channel [14:34] jchris has joined the channel [14:35] splashs has joined the channel [14:36] christophsturm: does node support "use strict" ? [14:36] muhqu has joined the channel [14:36] codelotus has joined the channel [14:37] aubergine has joined the channel [14:37] codelotus has left the channel [14:38] danoyoung has joined the channel [14:38] everzet has joined the channel [14:38] drudge: don't think so christophsturm [14:38] dnolen has joined the channel [14:40] figital has joined the channel [14:41] margle has joined the channel [14:42] bradleymeck has joined the channel [14:43] alex_b has joined the channel [14:43] sth: Does node compile in the lib js file? [14:44] cyraxx: yes [14:44] jherdman has joined the channel [14:44] sth: arse. [14:45] statik has joined the channel [14:47] fangel has joined the channel [14:48] robotarmy has joined the channel [14:48] ceej has joined the channel [14:48] ctp has joined the channel [14:48] jacobolus has joined the channel [14:50] stagas: http://swwwos.stagas.com:8080/ [14:50] postwait has joined the channel [14:51] sonnym has joined the channel [14:53] pagameba has joined the channel [14:54] pagameba: hey there, anyone around that knows about using Buffer in an extension? [14:54] saschagehlich has joined the channel [14:54] tg has joined the channel [14:56] sudoer has joined the channel [14:57] Aikar: stagas: how come no socket.io? [14:57] Aikar: itll do fallback for older browsers :3 [14:58] stagas: Aikar: the network stuff aren't finished yet :) [14:59] pagameba: specifically looking for how to initialize a Buffer with a char * data blob I already have … anyone? [14:59] stagas: Aikar: it's all dummies now for testing [14:59] sth: Anyone know how to set the chunk size in http clientResponse? [15:00] ooooPsss has joined the channel [15:00] stagas: it's arrows and z [15:00] tony__ has joined the channel [15:01] slaskis has joined the channel [15:01] stagas: I need to get a delta state I haven't finished yet and then it'll be multiplayer each connect = player in the field [15:03] stagas: it'll be open sourced [15:04] statik has joined the channel [15:04] sth: ryah: ping? [15:04] MattDiPasquale has joined the channel [15:07] softdrink has joined the channel [15:09] jvolkman_ has joined the channel [15:10] stephank: pagameba: Which version of node are you working with? [15:10] johngbrooks has joined the channel [15:10] d0k has joined the channel [15:10] pagameba: stephank: v0.3.1-pre [15:10] fcoury has joined the channel [15:11] dquestions has joined the channel [15:12] stephank: pagameba: Okay, take a look at node_buffer.h. You can use the third constructor to supply existing data, and callback that notifies you when node no longer references the data. [15:12] Me1000 has joined the channel [15:12] fcoury has joined the channel [15:13] stephank: pagameba: oh, and by constructor I mean Buffer::New. The actual C++ constructor is private. :) [15:13] pagameba: stephank: I get this: ../mapserver_bindings.cc:194: error: no matching function for call to ‘node::Buffer::New(char*&, int&)’ [15:13] pagameba: using Buffer *retbuf = Buffer::New(data, size); [15:14] stephank: pagameba: Hmm.. perhaps it wants you to cast size to a size_t? [15:14] stephank: pagameba: btw, that constructor takes a copy of your data. [15:14] matt_c has joined the channel [15:14] pagameba: stephank: ../mapserver_bindings.cc:194: error: no matching function for call to ‘node::Buffer::New(char*&, size_t)’ [15:14] floyd has joined the channel [15:15] pagameba: stephank: thanks, I'm free'ing data after [15:15] sveimac has joined the channel [15:15] nefD has joined the channel [15:17] stephank: pagameba: Odd stuff. Perhaps it's picking up node 0.2 headers by accident? [15:17] pagameba: ahh [15:17] pagameba: perhaps [15:19] rajeshsr has joined the channel [15:20] charlenopires has joined the channel [15:20] pagameba: install target doesn't copy headers ? [15:21] stephank: pagameba: I've seen that, but it was some time ago, when the autoconf transition was happening. Current master should be back on waf and install should install headers. [15:21] pagameba: oh [15:21] stephank: pagameba: I'll double check, but perhaps you can trying git pull on your side as well? [15:22] softdrink has joined the channel [15:22] jpld has joined the channel [15:22] pagameba: git pull: Already up to date [15:23] pagameba: git status: On branch master Your branch is ahead of 'origin/master' by 176 commits [15:23] foertel: *g* [15:23] pagameba: but I don't seem to have a wscript, I've been using make [15:24] gf3 has joined the channel [15:25] tk has joined the channel [15:26] stephank: pagameba: There should be a wscript, the Makefile just calls into waf. Here it is on github: https://github.com/ry/node/blob/master/wscript [15:26] pagameba: stephank: I'm an idiot, I forked node rather than cloning it … fixing [15:27] stephank: pagameba: :D [15:27] dguttman has joined the channel [15:28] dmcquay has joined the channel [15:28] postwait: For the async stuff in node, does it use fork() or create new threads that are joined? [15:29] Anti-X has joined the channel [15:29] stephank: postwait: Well, were possible, non-blocking file-descriptors. Where blocking library calls are made, libeio is used, which uses threads I believe. [15:30] postwait: libeio... hmm I'll go look at that. [15:30] femtoo has joined the channel [15:31] Kami_: postwait, yeah, it uses thread pool for blocking calls like disk io [15:33] postwait: Kami_: does that pool grow and shrink over the life of the node process? [15:34] Kami_: postwait, I'm not sure, I think it's hard coded to use 5 threads or so [15:36] BillyBreen has joined the channel [15:36] herbySk has joined the channel [15:41] aheckmann has joined the channel [15:42] slaskis has joined the channel [15:42] pagameba: ok, builds now [15:42] pagameba: thanks stephank [15:44] cjm: just starting out with node,js, any reccomendations for good hosting plans to install and try stuff out [15:45] gkatsev: a local VM? also, there is prgmr.com but I have not tried it [15:45] softdrink: i'm running my stuff on linode [15:46] pagameba: amazon aws has free micro instances for one year if you sign up [15:46] jamund has joined the channel [15:46] tj has joined the channel [15:46] drudge: webbynode.com is pretty great [15:46] rbranson: linode++ [15:46] v8bot: rbranson has given a beer to linode. linode now has 1 beers. [15:47] fcoury has joined the channel [15:48] cjm: thanks very much all [15:49] robotarmy has joined the channel [15:50] oal has joined the channel [15:50] cjm: one other question, what os are you guys running? [15:51] prettyrobots has joined the channel [15:51] softdrink: locally or on the server? [15:51] cjm: server [15:51] softdrink: ubuntu 10.10 server [15:52] jacobolus has joined the channel [15:53] cjm: thanks softdrink [15:53] pagameba: ok, 'nother technical Buffer question ... [15:54] pagameba: when I returned the raw data and created a new buffer with 'binary' type then saved it, everything was fine. But that way is deprecated and I'm supposed to return the buffer from my extension. now the file that is written out is not correct [15:54] pagameba: its supposed to be a GIF file [15:55] pagameba: but its getting mangled somehow by the buffer [15:55] zk has joined the channel [15:56] pagameba: I *think* the problem is that the buffer is really an unsigned char * but Buffer wants a char * and I just cast it [15:57] jstemmer has joined the channel [15:58] drudge: cjm: ubuntu 10.04 [15:59] stephank: pagameba: Not sure I follow. The 'binary' parameter in the javascript constructor is really just a way to convert javascript strings. When you `fs.writeFile(somebuffer)`, the file should contain whatever's in the buffer verbatim, and that should be whatever memory you passed to the constructor in C++. (pointer type doesn't matter) [15:59] daniellindsley has joined the channel [16:00] EyePulp has joined the channel [16:00] zk has joined the channel [16:01] stephank: pagameba: (when writing a buffer to a stream, you don't need a type parameter.) [16:01] cjm: thanks drudge [16:02] pagameba: stephank: this is the code in the binding: https://github.com/pagameba/node-mapserver/blob/master/mapserver_bindings.cc#L194 [16:03] pagameba: the msSaveImageBuffer returns unsigned char * [16:03] pagameba: I'm casting it to char * [16:03] pagameba: which I think may be mangling the buffer [16:04] pagameba: I was using this before: https://github.com/taggon/node-gd/blob/master/gd_bindings.cc#L105 [16:04] pagameba: and just return the pointer to the unsigned char * directly [16:04] pagameba: and creating a new buffer in javascript land of type binary [16:04] pagameba: then writing it to a file (which worked, created a valid GIF file) [16:04] mrkurt has joined the channel [16:05] stephank: pagameba: Nah, you're just casting the pointer type. Which means when you dereference the pointer, it'll simply interpret it differently. Casting won't modify the data. [16:05] stephank: pagameba: how are you the writing the buffer in javascript? [16:05] pagameba: but the docs for javascript Buffer say that 'binary' encoidng is dprecated [16:05] pagameba: um … https://github.com/pagameba/node-mapserver/blob/master/tests.js#L12 [16:06] mrkurt: is there a way to determine the target of a cname with the dns lib in recent node.js versions? [16:06] stephank: pagameba: That's odd, because it looks like it should work. [16:07] pagameba: :) ok, maybe I'm not as dumb as I feel then [16:09] ajpi has joined the channel [16:09] lianj_ has joined the channel [16:11] ajpiano has joined the channel [16:12] frodenius: mrkurt: require('dns').resolve4('google.com') for example [16:12] jlee has joined the channel [16:14] mrkurt: frodenius: that gets me the IPs, but not the intermediate cname [16:14] mrkurt: not that google.com would be a cname [16:14] mrkurt: if I have, say, www.google.com cnamed to google.com [16:14] mrkurt: i want to query www.google.com and get google.com back somehow [16:15] frodenius: ah [16:15] stephank: pagameba: Well, I really can't see it. Perhaps you figure out where the error is by looking at where the corruption happens in the GIF? [16:15] pagameba: back to gdb :) [16:15] stephank: heh [16:16] stephank: pagameba: good luck :) [16:16] mbrochh has joined the channel [16:16] pagameba: stephank is there a way to write directly into the buffer's data object? [16:16] bradleymeck has joined the channel [16:16] pagameba: i.e. can I get a pointer to it [16:16] pagameba: I was looking at this: https://github.com/pkrumins/node-png/blob/master/src/png.cpp#L34 [16:17] aubergine_ has joined the channel [16:17] benburkert has joined the channel [16:18] Me1000 has joined the channel [16:18] stephank: pagameba: You can get a pointer using Buffer::Data [16:18] ehaas has joined the channel [16:18] wilmoore has joined the channel [16:19] MattJ has joined the channel [16:19] jacobolus has joined the channel [16:19] pagameba: no matching function for call to ‘node::Buffer::Data(node::Buffer*&) [16:20] jakehow has joined the channel [16:21] stephank: pagameba: It wants an object, so probably: `Buffer::Data(buffer->handle_);` [16:21] pagameba: :o [16:21] malkomalko has joined the channel [16:21] stephank: pagameba: It's a bit odd, but the most common use of buffers in C++ is to fill them and send them off, or the read from them when passed from JS. [16:22] tj: yeah its kindof annoying :( at least pre 0.3.x [16:22] tj: i know it has changed a lot though [16:23] stephank: tj: well, in 0.2 yopu [16:23] stephank: uhm [16:23] stephank: *you had buffer->data() [16:23] tj: ->data() [16:23] tj: yeah [16:24] alek_br has joined the channel [16:24] postwait has joined the channel [16:25] thejefflarson has joined the channel [16:26] sth: Anyone work on the http lib for node other than ryah? [16:26] Anti-X has joined the channel [16:27] ph^ has joined the channel [16:27] stephank: tj: oh, I misread I think. I thought you meant 0.3.x pre. [16:28] tj: oh :p [16:28] tj: nope [16:28] tj: i havent had time to test anything with 0.3.x yet [16:33] ryah: sth: whats up? [16:34] pagameba: stephank: if I do console.log(util.inspect(buffer)) I get this: [16:34] pagameba: \r\n (repeat) [17:13] sth: is a valid json object [17:13] sth: followed by \r\n [17:13] jacobolus has joined the channel [17:13] mjr_: huh, I wonder why I've never seen that [17:13] quirkey has joined the channel [17:14] sth: echo -e "GET /1/statuses/sample.json HTTP/1.1\r\nUser-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3\r\nHost: stream.twitter.com\r\nAccept: */*\r\nAuthorization: Basic \r\n" | nc stream.twitter.com 80 [17:14] sth: for example [17:14] ryah: sth: you want to use the chunk size as a frame - but node transparently removes it [17:14] ryah: both on the sending and recving side [17:14] drostie has joined the channel [17:15] ryah: and i don't particularly want to change that [17:15] drostie: I [17:15] zomgbie has joined the channel [17:15] ryah: sth: you'll need to layer your own framing inside [17:15] mjr_: Yeah, I don't think twitter even works that way, unless I'm really confused. [17:15] drostie: I'm having trouble installing node on FreeBSD 7.2 because ./configure segfaults (!) ... any advice? [17:16] sth: mjr_: It does. [17:16] drostie: like, is this a known problem with waf-light? [17:16] ryah: drostie: that's not enough information [17:16] sth: Or at least, the user streams do [17:16] drostie: ryah: I know. :/ [17:16] mjr_: Looks like JSON\nJSON\n [17:16] mjr_: unless curl is hiding the chunking [17:16] sth: curl hides the chunking [17:16] ryah: drostie: which version of node? [17:17] sth: try it in nc or telnet [17:17] drostie: ryah: 0.2.4, the stable version. It's in their "ports" framework. [17:17] danslo has joined the channel [17:17] drostie: oy. I hate to do this, but I've suddenly got to go. :x [17:18] drostie: never mind, apparently! :< [17:18] mjr_: sth: I see. That seems like a low level implementation detail on twitter's side that is likely to change at any time. [17:18] ryah: drostie: okay - well maybe later [17:18] mjr_: sth: You need to find the newline and split 'em out. [17:18] drostie: thanks. [17:19] sth: mjr_: It's unlikely to change, plus, it's not only twitter. [17:19] Booths has joined the channel [17:19] sth: SixApart, Myspace, Gowalla and a few other services make sure 1 chunk = 1 valid json object [17:20] ryah: meh [17:20] mjr_: I guess that's an interesting optimization. [17:20] ryah: sth: do you have an example? [17:20] ryah: sth: or a link or something? [17:20] jchris has joined the channel [17:21] sth: an example of the other services? [17:21] sth: ryah: echo -e "GET /1/statuses/sample.json HTTP/1.1\r\nUser-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3\r\nHost: stream.twitter.com\r\nAccept: */*\r\nAuthorization: Basic \r\n" | nc stream.twitter.com 80 [17:21] sth: that's twitter's version [17:22] sth: you'll need to set your user/pass as indicated [17:22] mjr_: So I guess you'd need node to only invoke your data callback with a full HTTP chunk then? [17:22] mjr_: Or have some kind of chunk ID? [17:22] sth: node to invoke the data callback only when a full http chunk is available [17:23] sth: (as I expected it to work) [17:24] mjr_: What about things where the entire file is sent as a single chunk? [17:24] mjr_: Node would have to buffer the entire thing. [17:24] ryah: sth: i can't do this any time soon. it requires a bit of work. [17:24] ryah: but, yeah, if people are doing this i guess ew need to support it [17:25] mjr_: I think it's a bad idea for node to support it. [17:25] ryah: the parser needs to get a callback for beginning of chunk [17:25] ryah: (and end) [17:25] sth: yup [17:25] mjr_: Twitter and the like HAPPEN to send things in single chunk boundaries, but nowhere in their specs do they say that their are doing this, and they might very well change it at some point. [17:26] Rixius has joined the channel [17:26] sth: mjr_: It's implied. [17:26] mjr_: If you write a parser than can process newline delimited JSON, then it'll work on all of these services, even if they change. [17:26] mjr_: And it'll also work on services that don't put them in a single HTTP chunk. [17:27] ntelford: mjr_: so you're proposing a hack over adherence to HTTP? [17:27] aliem has joined the channel [17:27] mjr_: not at all. [17:27] mjr_: Just read the body as a body, and parse it out [17:27] sth: mjr_: regardless, it would be much nicer to support whole HTTP chunks [17:27] mjr_: But what about super giant chunks? [17:28] sth: You parse them the same [17:28] ntelford: could have some kind of overflow event that is sent "partial" chunks once they outgrow the buffer [17:28] mjr_: Node would have to buffer the entire giant chunk before the callback. [17:29] sth: mjr_: knowing when a chunk is starting and a chunk is ending would be enough [17:29] mjr_: I can see why you'd want something like this, but I don't think node should do that crazy buffering. You need to be able to deal with partial HTTP chunks. [17:29] sth: the on data event would parse the packet chunks [17:29] sth: (as normal) [17:29] mjr_: A chunk boundary callback I guess could help with this. [17:30] Aria has joined the channel [17:30] sth: I'm not expecting anything like: onHttpChunk(entireChunk) [17:30] matclayton has joined the channel [17:30] stride: why would you want that anyway? you get no guarantee that the chunk contains something that's "complete" [17:30] mjr_: stride: sth claims that you do get one [17:30] sth: stride: there is. at least from the services I'm using [17:31] mjr_: I suggest that a "delimited JSON stream" is a useful format that deserves a library to properly parse it out. [17:31] sth: which are: twitter, myspace, gowalla, sixapart and etc. [17:32] ryah: if we find some docs that say they're are framing with chunks [17:32] ryah: then i suppose there's no choice [17:33] Aria: Heh, wow. Interesting choice of framing, though I suppose it makes sense. [17:35] qFox has joined the channel [17:35] robotarmy has joined the channel [17:36] Rixius has joined the channel [17:36] aubergine has joined the channel [17:36] stride: sth: hmkay, that's weird :) [17:37] Rixius: Which XML parser and manipulator would you suggest for node? [17:37] sth: is e4x supported in node? [17:37] Aria: Nope. Not in v8. [17:37] sth: if so, I'd just use that [17:37] Aria: I keep thinking it might be time to spend some effort on that. [17:39] bartt has joined the channel [17:42] saikat has joined the channel [17:44] saschagehlich has joined the channel [17:45] saikat has joined the channel [17:46] shiemedelbrock has left the channel [17:48] eee_c has joined the channel [17:48] devinus_ has joined the channel [17:49] derren13 has joined the channel [17:52] noahcampbell has joined the channel [17:53] tj: drudge: linkinus is using ~1GB of my ram :( [17:53] tj: rss [17:53] Rixius: how well is jsdom coming? [17:53] Aria: Quite. [17:53] Aria: Very usable. [17:54] alek_br has joined the channel [17:55] drudge: tj: ouch :/ new version is getting close [17:55] tj: drudge: k sweet :) [17:56] drudge: tj: have you tried closing the UI and restarting it (keeping the agent connected so you don't disconnect) [17:56] rwaldron has joined the channel [17:56] tj: drudge: they both seem to use roughly 500mb each [17:56] Booths: Potentially stupid question: How can I return a value from a listener in a function. IE, I'm parsing XML and parser.onend returns the value, but it's not being called. My guess is because it's binding the event and then moving on, and then returning undefined. [17:56] drudge: we used cocoa distant objects in the past and they have abandoned memory issues, we've switched to our own IPC and it's much better. restarting the UI clears a decent chunk of memory [17:57] herbySk has joined the channel [17:57] sriley_ has joined the channel [17:58] davidsklar has joined the channel [17:59] muk_mb has joined the channel [17:59] Rixius: Booths: if your in a callback you have to make a callback afterwords to be able to handle any extra data [17:59] k_f has joined the channel [18:00] tylerstalder has joined the channel [18:01] dguttman has joined the channel [18:01] dgathright has joined the channel [18:01] achristianson has joined the channel [18:01] superjudge has joined the channel [18:02] k_f: hi [18:02] matt_c has joined the channel [18:03] k_f: is there anything like import for nodejs [18:03] alcuadrado: require [18:03] saschagehlich: hmm if I do app.get '/download/:token/:filename.:format' in express.js, it does not react to "/download/abcd/this.is.the.filename.mp3" [18:04] saschagehlich: can I do regex there? [18:04] Booths: Rixius: Not following 100%. If I have a value that is assigned by the function, how do I delay the return until the parser is complete. [18:04] k_f: to insert the content of an other file into the current one as if it was written there [18:04] robmason has joined the channel [18:04] saschagehlich: k_f: do you know "require"? [18:05] alcuadrado: k_f, AFAIK that's not possible [18:05] alcuadrado: well, without using eval [18:05] k_f: yes but it creates a new namespace [18:05] Rixius: Booths: could you make a pastebin or jsbin or etc.? [18:06] derren13 has joined the channel [18:06] softdrink has joined the channel [18:06] temp01 has joined the channel [18:07] k_f: if the js would be included in html i would just include both but hoto do this with node [18:07] springmeyer has joined the channel [18:07] Booths: Rixius: Sure, gimme a sec [18:08] gkatsev: just use require and have a use function or something that you can pass data to the other file [18:11] Booths: Rixius: http://jsfiddle.net/robert/BBmTn/ [18:11] Booths: well, and of course starting the parser, I forgot to include it in that. [18:12] Booths: but basically I want x to be the requested variables and I'm instead getting undefined. [18:12] xicubed has joined the channel [18:12] mraleph has joined the channel [18:13] evanmeagher has joined the channel [18:14] mertimor has joined the channel [18:14] mertimor has left the channel [18:15] cardona507 has joined the channel [18:16] Booths: Rixius: I'm getting the right values through the parser though, I just am not getting it back to the function. When I console.log(returnVal) it gives me what I want... just can't figure out how to get that back to a variable. [18:16] ThePub has joined the channel [18:16] jakehow has joined the channel [18:16] dipser has joined the channel [18:16] k_f: it's a pity that there isn't some command more close to import particularly with regard to that require seems to need me everything into exports [18:17] markwubben has joined the channel [18:18] k_f: foreget: need me to put everything into exports [18:19] drostie: Booths: I don't quite understand your code, but when you are working with callbacks, you have to use callbacks to 'return' parameters as well. [18:19] lakin has joined the channel [18:20] brianmario has joined the channel [18:21] drostie: Booths: also, your code is missing a semicolon after each value = function (params) {} statement. [18:21] stride: k_f: well, that's kind of the reason for require, so you don't mess up a common global context [18:21] strmpnk_ has joined the channel [18:22] drostie: Booths: and it would maybe help to know what the 'parser' global is doing in this script, since it's not a construct that instantly springs to mind. :< [18:22] rednul_ has joined the channel [18:22] banjiewen has joined the channel [18:22] hamsterspider has joined the channel [18:23] pdelgallego has joined the channel [18:23] indexzero has joined the channel [18:23] Booths: drostie: That's not the exact code I just whipped together an example of what I'm trying to do. Essentially parsing a XML file into an array, and then getting the values passed to the function. [18:23] MikhX has joined the channel [18:24] Booths: The main question is, how can I delay the return of that function until the parser finishes, so var x doesn't wind up being undefined. [18:25] Booths: Parser is https://github.com/isaacs/sax-js [18:26] drostie: Well that's what I'm saying, is that that's a callback scenario. I mean, in your parser code, you probably have a parser.parse() function, and the last line of that should be something like parser.onend(); to initiate the callback to onend(). If you want even more, provide the 'even more' as a callback function as well. [18:26] tmpvar has joined the channel [18:27] Booths: so then the body of the function needs to return parser.onend [18:27] aheckmann has joined the channel [18:28] drostie: The problem is that you're even thinking of the idea 'return' in a callback scenario, I think, but let me look through this sax-js parser. [18:28] nsolsen has joined the channel [18:30] dberlinger has joined the channel [18:31] pagameba has joined the channel [18:31] Booths: Well the callback is within a parent function. I want the parent function to return values that aren't yet known until the event fires. [18:32] omarkj has joined the channel [18:32] k_f: stride: but some times a common global context would be nice [18:33] rbranson: meh, no global context plz [18:33] sh1mmer has joined the channel [18:33] rbranson: i _love_ the way node.js does modules [18:33] bradleymeck has joined the channel [18:33] rbranson: nobody can pollute your namespace [18:33] stride: don't know, last time I needed one was in php 3 I think ;) [18:33] gkatsev: k_f: as I said, you can have a .use function that you can pass stuff from the first module to yours [18:34] kjeldahl has joined the channel [18:35] gkatsev: or you can make the module actually be a constructor, so, then you do : var MyModule = require('mymodule'); var myModule = new MyModule(some, stuff); [18:37] pagameba: stephank: still around? still willing? :) [18:37] evanmeagher has joined the channel [18:38] stephank: pagameba: Hey, I was actually trying to run the test.js using mapserver's test.map, but it kept returning null :B [18:38] pagameba: hah [18:38] pagameba: I just pushed a new version with working and non-working versions [18:39] pagameba: working and non-working methods [18:39] pagameba: DrawMapRaw works [18:39] pagameba: DrawMapBuffer doesn't [18:40] vnguyen has joined the channel [18:40] pagameba: and my acid test for 'works' is that the resulting file on disk is a valid GIF file [18:41] drostie: Booths: okay, I see what you're up to. You want getValue() to return something but that something is generated by an asynchronous call. The proper form for this is to make getValue also asynchronous: getValue(expectedVal, callback). [18:41] stephank: pagameba: Okay, I see it. I don't know a lot about mapserver itself. What should I feed loadMap? Can I somehow feed it a test from the mapserver tarball? [18:41] pagameba: I will push some test data, hang on [18:41] Booths: drostie: and then fire callback() within the onend? [18:41] drostie: Booths: yep. [18:42] Booths: Alright, thanks :P [18:42] drostie: Boots: you can't have a blocking function call without blocking all of Javascript, because Javascript is single-threaded. [18:42] jspiros has joined the channel [18:42] alcuadrado: how is the state of mysql dirvers for node? [18:42] alcuadrado: does anyone know? [18:43] Booths: Alright, I was banging my head against the wall I couldn't figure it out, I'll give it a try [18:43] drostie: alcuadrado: um, I believe people don't talk much about any sql flavors? [18:43] brianmario: alcuadrado: afaik https://github.com/felixge/node-mysql is the most mature [18:43] alcuadrado: drostie, yeah, I don't know why... nosql is cool, but it's not a panacea [18:44] Tobsn has joined the channel [18:44] brianmario: it's written in pure JS, so it's quite a bit slower than it could be - although I'm working to change that [18:44] stephank: oh hey, it's brianmario of mysql2 fame! awesome to hear [18:44] brianmario: IMO node should have first-class mysql bindings, if for nothing else to serve as a migration path into node and onto some other data store [18:44] Booths: Awesome drostie. Thanks man. [18:44] drostie: alcuadrado: well I think it's because node talks so well to couchdb natively. :D [18:44] drostie: Booths: sure thing! [18:45] drostie: okay, now my cpu fan is making a nasty noise and I have to go. see you everyone! [18:45] pagameba: stephank: should be data now in git and the tests.js is updated to use it [18:46] pagameba: if it works you should get two gif files on disk test_raw.gif and test_buffer.gif [18:46] alcuadrado: drostie, but there is some data that is clearly relational, and it's "fit" better in a RDBM.. like, I don't know, a CRM's data [18:46] stephank: pagameba: Great, it did write something indeed. I'll take a look :) [18:47] pagameba: stephank: are you on a mac? or did you fix up the wscript file to build on linux? [18:47] stephank: pagameba: I hacked it to work on Linux, yes. [18:48] robmason has joined the channel [18:48] pagameba: stephank: can I integrate that back into my wscript file? pretty please? :D [18:49] stephank: pagameba: I'll upload it, hang on. But I know very little of waf, so I'd be surprised if it still worked on mac. :o [18:50] pagameba: stephank: it took me hours to figure out how to build on mac ;) then I realized there was a 'waf' project and node-waf wasn't just a standalone thing for node … surprising how much that little tidbit would have saved me ... [18:50] gJ|Alex has joined the channel [18:52] k_f: gkatsev: how does a module that is a consrtutor look like? i tried exports = function (){var foo = ...} but i can not access foo [18:52] tisba has joined the channel [18:52] stephank: pagameba: I don't think this will phase you much, but: https://github.com/stephank/node-mapserver/commit/b33d2c95c90115c40b23044877e2b9481e6235d1 [18:52] rbranson: node-mapserver eh? [18:52] rbranson: that's hot [18:53] gkatsev: k_f: you just make a constructor object just like any other js object. Then exports = MyModule [18:53] mattly has joined the channel [18:53] gkatsev: or something like that [18:55] mikeal1 has joined the channel [18:58] k_f: it says TypeError: object is not a function [19:00] pagameba: stephank: thanks :) [19:00] pagameba: rbranson: yeah, exciting! [19:01] sudoer has joined the channel [19:02] Aria has left the channel [19:02] stephank: pagameba: It looks like you've uncovered a subtle Buffer bug. [19:02] gkatsev: k_f: you want something like function MyModule(some, stuff){/*do some stuff*/ return {fun: apiFun1, fun2: apiFun2 ...}; }; [19:03] markwubben has joined the channel [19:03] stephank: pagameba: As a work around, you can manually wrap your SlowBuffer in a regular Buffer. After drawMapBuffer, do: buffer = buffer.slice(0, buffer.length); [19:03] pagameba: stephank: argh! fun stuff … also, what did you mean by "set CXX to include `-I`." in your message? [19:03] stephank: pagameba: CXX="g++ -I/path/to/mapserver -L/path/to/mapserver" node-waf configure [19:04] pagameba: :o nice [19:04] pagameba: ok [19:04] stephank: I really don't know how to handle the waf-beast. :B [19:05] bpot has joined the channel [19:05] femtooo has joined the channel [19:06] pagameba: stephank: works! is there some way I can wrap that up in bindings instead? or in the mapserver.js file? [19:08] bnoordhuis has joined the channel [19:09] stephank: pagameba: Well, I'm looking at fixing the bug, if you can hold out. The way you've set things up, I'm not sure how you'd deal with it in mapserver.js. [19:09] stephank: pagameba: Perhaps you can wrap loadMap in JS, and have it override drawMap [19:09] stephank: (on the new instance) [19:10] siculars has joined the channel [19:11] WRA has joined the channel [19:11] pagameba: stephank: ok, but I don't really want to reproduce the API in mapserver.js as well so perhaps I'll wait for the bug fix and just leave it as is for now - I have it working enough that I can continue to flesh out the API enough to make it useable [19:13] rbranson: should use node-ffi for node-mapserver :O [19:13] pagameba: ACTION google's node-ffi [19:13] malkomalko has joined the channel [19:14] jlee has joined the channel [19:14] pagameba: OMG are you kidding me? [19:14] rbranson: lol [19:14] rbranson: :D [19:14] sechrist has joined the channel [19:15] stephank: pagameba: btw: https://github.com/stephank/node-mapserver/commit/e04a3bf337ce9a60d62cc4dc7fbf304fd6a136c1 [19:15] sechrist has joined the channel [19:15] bradleymeck: anyone know how the multithreading stuff with v8 is coming along? [19:16] UHMA: anyone have advice for scaling node apps? I doesn't make sense to me how I could possibly scale a node horizontally (without storing everything in a db). but how can I possibly scale an javascript array (for example) across machines? [19:16] stephank: bradleymeck: Multithreading stuff? News to me. :) [19:16] rbranson: bradleymeck: I doubt that's going to happen, considering Chrome's process model [19:17] mraleph: bradleymeck: isolates != multithreading with shared state [19:17] bradleymeck: bleh, would be nice for some stuff im doing if i could spawn up a new v8 and just share a function without waiting for a lock [19:17] mraleph: isolates are just several instances of v8 per process [19:17] pagameba: stephank: thanks, got it [19:18] UHMA: what's the largest production node app that you guys know of? maybe I can figure out how they're scaling it [19:18] stephank: bradleymeck: Perhaps this is something Redis is suitable for? [19:18] rbranson: bradleymeck: that'll get easier as more infrastructure for MP gets into node [19:18] bradleymeck: stephank, its language interop bindings, so cant really use that, not a big deal [19:19] pagameba: rbranson: so that loads an existing .so and maps to existing functions therein? [19:19] bradleymeck: yes, that is what a ffi does :) [19:19] stephank: UHMA: I hear wordsquared.com is pretty big :) [19:19] rbranson: pagameba: yeah, you have to specify the function prototypes though [19:19] UHMA: how are you scaling it ? [19:19] CIA-95: node: 03Ryan Dahl 07v0.2 * rba5ac87 10/ (src/node.cc src/platform_none.cc): Fix OS::GetExecutablePath for platform_none (+22 more commits...) - http://bit.ly/chqloi [19:20] UHMA: or is it a single instance? [19:20] stephank: UHMA: I don't know, it's not mine. I thought you were going to figure that out and create a wonderful blog post for us somewhere? ; [19:20] stephank: ;) [19:20] ryah: please test v0.2 branch [19:20] ryah: i will be making a release soon [19:20] saikat has joined the channel [19:20] rbranson: 0.2.5? [19:20] UHMA: hahah im not much of a blog writer, i'll try to figure it out though :) [19:21] sechrist has joined the channel [19:22] superjudge has joined the channel [19:22] jvolkman-work: Does passing JSON.parse() a Buffer avoid the Buffer->string copy? [19:22] noahcampbell has joined the channel [19:22] bradleymeck: no [19:23] matclayton has left the channel [19:24] jvolkman-work: hmm [19:25] aubergine has joined the channel [19:28] liar has joined the channel [19:29] rbranson: ryah: v0.2 HEAD appears to work for all of my stuff [19:30] ryah: rbranson: good [19:30] eee_c has joined the channel [19:30] Tobsn: does anyone here use selenium? [19:30] stephank: ryah: (0.3) Buffer.isBuffer returns false for SlowBuffers. Should it, or should SlowBuffers never ever be exposed? [19:30] rbranson: wow [19:31] rbranson: gcc -Dd -E file.h [19:31] stephank: I'm trying to run the test suite, but I'm getting a ton of errors [19:31] rbranson: is amazing [19:31] ryah: stephank: they shouldnt be exposed, but also it shouldn't return false [19:31] ryah: stephank: will fix [19:32] rbranson: 100% passes for me [19:32] stephank: ryah: okeedo. Can't say if it that passes all tests, having some problems there. [19:32] rbranson: x86_64 GCC 4.2.1 OS X [19:32] rbranson: (10.6) [19:33] cloudhead has joined the channel [19:33] stephank: rbranson: Well, they're all ECONNREFUSED or ENOENT. So I figure something odd's going on. [19:35] admc has joined the channel [19:36] Gruni has joined the channel [19:38] drostie has joined the channel [19:39] drostie: cpu fan crisis: averted. anyone need javascript help? [19:39] ossareh has joined the channel [19:39] drostie: or, anyone want to help me with a segfaulting configurer for node 0.2.4 on FreeBSD? [19:40] atmos has joined the channel [19:42] Me1000 has joined the channel [19:46] meatmanek_ has joined the channel [19:46] mikedeboer has joined the channel [19:47] rbranson: drostie: do you have gdb installed? [19:47] Anti-X: you can help me figure out an algorithm to generate fractal on a sphere [19:48] Anti-X: fractal terrains* [19:48] Me1000 has joined the channel [19:48] cardona507 has joined the channel [19:49] drostie: rbranson: yep, at least on this computer. never really used it before though. :x [19:50] rbranson: gdb ./configure [19:50] rbranson: run [19:51] drostie: the configure is a shell script which calls a python script; gdb used like that just says 'not in executable format / not recognized'. [19:51] rbranson: oh [19:51] rbranson: duh [19:51] rbranson: gdb --args bash ./configure [19:51] rbranson: it MIGHT follow the fork [19:52] rbranson: yeah, it does [19:52] rbranson: or should [19:53] rikarends has joined the channel [19:53] softdrink has joined the channel [19:54] drostie: rbranson: it says a bunch of "(no debugging symbols found)" and then identifies the only line in the node ./configure script as "Segmentation fault: 11". [19:55] drostie: er, "31225 Segmentation fault: 11", if that helps. :/ [19:55] rbranson: can you paste the full output to a pastie/gist? [19:55] k_f: gkatsev: do u know some website i can read about assingning a function to exports [19:56] gkatsev: k_f: I remember seeing it on the peepcode screencast for nodejs [19:56] gkatsev: k_f: you probably want to read about js's prototypal inheritance in general [19:56] tg has joined the channel [19:57] gkatsev: k_f: I am also fairly new to node. [19:57] vilhonen_ has joined the channel [19:57] Aikar: k_f: module.exports.foo = function() { console.log('bar'); }; ? [19:57] vilhonen_: what's the best combination of libraries for web scraping? [19:57] Aikar: require('yourmodule').foo(); [19:57] drostie: rbranson: http://pastebin.com/djdPvMhw [19:57] vilhonen_: it would be nice to able to sizzle (or sizzle like) selectors [19:57] gkatsev: i can find out when I get home or if someone else has the peepcode screencast [19:59] rbranson: drostie: try running: tools/waf-light --jobs=1 configure [19:59] rbranson: drostie: should give you a segfault [19:59] mmurz has joined the channel [19:59] markwubben has joined the channel [19:59] rbranson: drostie: then do a: gdb --args python tools/waf-light --jobs=1 configure [20:01] jlee has left the channel [20:02] k_f: for some reason exports = function (){var foo = ...} give me a function if i do require("path/mod.js") [20:02] Fullmoon has joined the channel [20:02] gkatsev: yes, that's what you want. [20:03] drostie: rbranson: I see where you're going, and it's a little more productive: http://pastebin.com/w6DzYkAj [20:03] rbranson: that's hot [20:03] rbranson: do a bt [20:03] drostie: something going wrong with /usr/local/lib/libcrypto.so [20:03] rbranson: and paste that [20:03] rbranson: (into a pastie) [20:04] gkatsev: k_f: a constructor is a functions. You then do: var mod = new require('path/mod.js')(some, stuff); OR var Mod = require('path/mod.js'); var mod = new Mod(some, stuff); [20:04] drostie: rbranson: http://pastebin.com/ezHJkJf9 [20:04] rbranson: wow [20:05] rbranson: that's a problem in python/libcrypto for sure [20:05] rbranson: are you using ports for both of those? [20:06] rbranson: http://webcache.googleusercontent.com/search?q=cache:qdevsxFeFkoJ:scons.tigris.org/ds/viewMessage.do%3FdsForumId%3D1268%26dsMessageId%3D2644872+EVP_PKEY_CTX_dup+()+from+/usr/local/lib/libcrypto.so.7&cd=1&hl=en&ct=clnk&gl=us [20:06] rbranson: looks like you might need to just rebuild python [20:08] jacobolus has joined the channel [20:10] rcy has joined the channel [20:11] k_f: it seems that u can not make exports and because of this the result of a require statement to work as a function [20:11] drostie: rbranson: what's weird for me is that there is no /usr/local/lib/libcrypto.so as far as I can see o_O. [20:11] danoyoung has left the channel [20:12] fly_ has joined the channel [20:13] fly_: hi [20:13] fly_: where can i read docs for sys.puts? [20:14] drostie: rbranson: wait, false alarm. I did that search in my local console. ._." [20:14] rauchg_ has joined the channel [20:15] k_f: just tried: exports = function(a,b){return a+b;} and console.log(require('add.js')(1,2)); [20:16] amerine has joined the channel [20:16] drostie: k_f: exports might need to be an object in its own right? [20:18] muk_mb has joined the channel [20:18] k_f: but in js functions are objects so it should be possible to assign a function to exports [20:18] skampler has joined the channel [20:18] rikarends1 has joined the channel [20:20] dberlinger has joined the channel [20:22] Ori_P has joined the channel [20:24] drostie: rbranson: thanks for the help, I'm recompiling pythons and openssl from a new ports snapshot. ^_^;; [20:26] k_f: but if i think C exports is a pointer to an object createt by require and then by assingnig the function i make it point to the funtion but require does not import the place exports points to but the place it had made the exports pointer point towhen it createted it [20:28] landlessness has joined the channel [20:31] stephank: k_f: module.exports = function() { ... } [20:31] skohorn has joined the channel [20:31] zemanel has joined the channel [20:33] programble has joined the channel [20:33] programble has joined the channel [20:35] arpegius has joined the channel [20:35] noahcampbell has joined the channel [20:37] k_f: why does this work but exports = function() { ... } does not the commonJS just speaks about exports [20:37] bradleymeck has joined the channel [20:40] drostie: k_f: suppose that you say exports = module.exports = {}, and suppose that the later code of the require() effectively says "return module.exports". If you have reassigned exports, it will not be the thing which module.exports is pointing to, and thus won't be the thing which matters. [20:40] indexzero has joined the channel [20:41] mrkurt: so this is a shot in the dark, but is there any way to get at locally scoped stuff in a node module? [20:41] mrkurt: in particular, the dns one defines: var channel = ... [20:41] mrkurt: is there some way to get at it from outside that module? [20:41] drostie: mrkurt: you could add it to the module.exports within its own code. Without modifying that code, Javascript scope rules would probably prevent it. [20:42] mrkurt: yeah that's what I was afraid of [20:42] mrkurt: I was just hoping to try out a way of patching it without having to figure out wtf the git clone of node wont' build for me :p [20:43] mrkurt: oh look, it's still a plaintext file when it's installed [20:43] mrkurt: that might work! [20:43] mrkurt: oh wait, nm [20:43] mrkurt: I'm retarded [20:44] postwait: http.ServerResponse.write(...) I don't see in the docs what the return value means. [20:45] stephank: k_f: `exports` is just a variable in your module. You can re-assign, but the code that is handling your module doesn't inspect the variable, but simply has a reference to the original object it initialized exports with. That's why module.exports was introduced. [20:45] gf3 has joined the channel [20:45] stephank: k_f: It might help to look at an implementation of commonjs, here's a really simple one: https://github.com/weepy/brequire/blob/master/lib/brequire.js [20:46] aubergine has joined the channel [20:47] Aria has joined the channel [20:51] stagas has joined the channel [20:52] stagas: nodejs apps showcase http://node.stagas.com [20:53] heavysixer has joined the channel [20:54] sh1mmer has joined the channel [20:54] nlacasse has joined the channel [20:55] cardona507: nice work stagas [20:55] mr_daniel has joined the channel [20:55] stagas: cardona507: thanks! [20:56] skampler has joined the channel [20:56] bradleymeck: really wish commonjs would support the module.exports thing [20:56] postwait: I have a http server response object and I'm calling write("some text") and it's returning false. [20:56] rikarends1: assigning module.exports? [20:56] stephank: they don't? [20:57] pagameba has joined the channel [20:57] rikarends1: i wish commonJS would support module.declare :) [20:57] postwait: but then... I keep trying and it returns true. [20:57] postwait: (client still see data, connection is still intact) [20:57] postwait: ideas? [20:57] bradleymeck: i dont want declare really [20:57] maushu has joined the channel [20:58] rikarends1: i do for browser support [20:58] bradleymeck: postwait, the write return values are rather falsified, use the "drain" event if you want some better stuff to work with [20:59] bradleymeck: rikarends, for browser support?? [20:59] vilhonen_: stagas: very nice [21:00] xla has joined the channel [21:00] stagas: vilhonen_: thanks [21:01] postwait: bradleymeck: 'drain' doesn't seem like it would help much with writing. is 'error' emitted if there is an actual write failure? [21:01] postwait: (rather than an EAGAIN) [21:02] bradleymeck: not sure, sorry :/ [21:03] aheckmann has joined the channel [21:08] jakehow has joined the channel [21:12] drostie: does anyone else have any interesting games made purely in HTML + JS with Node? :D [21:12] sonnym has joined the channel [21:13] postwait: so, yes.. you can do a response.connection.once('error', function() { response.has_failure = true; }); [21:13] pzich: I know of a lot of HTML + JS games not utilizing node, but that's about it [21:13] postwait: ignore the return value of response.write... and just check response.has_failure != true after each write. [21:13] pagameba has joined the channel [21:14] mif86 has joined the channel [21:15] Booths: Anyone have any idea why this sort would fail in IE7 but work elsewhere, and if I'm doing it poorly http://jsbin.com/ibuke3/edit [21:17] rikarends1: no JSON.parse? [21:18] kordless has joined the channel [21:18] Booths: JSON is working elsewhere, and the function does get called multiple times by IE when I threw an alert there, but it never makes it past the sort. [21:19] Booths: Also if I reduce the elements to two or three it seems to work... [21:19] Booths: Scratch that, [21:21] Booths: Works up to two, stops working after 3. [21:21] Booths: Although the alerts are still firing but extremely delayed, but the code that is after the sort still hasn't fired. [21:21] bnoordhuis has left the channel [21:21] bnoordhuis has joined the channel [21:22] shaver: IE7's JS is Very Slow [21:22] shaver: is it a big array? [21:22] Booths: Only 3 JSON strings [21:23] Booths: I don't think it's an issue of speed because I've let it go and it just never moves on, even with only a few elements to compare. [21:24] dunk__ has joined the channel [21:25] yeevgen has joined the channel [21:25] springmeyer has joined the channel [21:25] daniellindsley has left the channel [21:26] norviller has joined the channel [21:28] drostie: Booths: I would guess that the jQuery selects are somehow the problem, if not a broken JSON.parse implementation by IE7? [21:28] rednul_ has joined the channel [21:29] willwhite has joined the channel [21:29] yhahn has joined the channel [21:29] bentruyman has joined the channel [21:30] shaver: IE7 doesn't have JSON.parse [21:30] shaver: you need to use json2.js [21:30] shaver: I'm pretty sure [21:30] willwhite: where's the best place to set the NODE_ENV variable on a production server to make sure it gets set if the server needs a reboot? [21:31] willwhite: .bash_profile won't work if node is being run by another user [21:31] Benvie has joined the channel [21:31] tg has joined the channel [21:31] bnoordhuis: willwhite: are you starting your app with a init.d script? [21:32] willwhite: I'm using upstart on ubuntu [21:32] shaver: willwhite: usually the app's start script, or failing that /etc/profile.d/node.sh [21:32] elijah-mbp has joined the channel [21:33] bnoordhuis: willwhite: upstart is backwords compatible with sysv-style init, right? [21:33] bnoordhuis: *backwards, for the love of god [21:34] bnoordhuis: i'd vote for the startup script [21:34] willwhite: great, I'll give that a try. thanks! [21:36] aconbere has joined the channel [21:37] strmpnk__ has joined the channel [21:38] Blackguard has joined the channel [21:39] tilgovi has joined the channel [21:39] cloudhead has joined the channel [21:40] flybyme has joined the channel [21:41] teemow has joined the channel [21:41] flybyme has joined the channel [21:42] altamic has joined the channel [21:42] linnk has joined the channel [21:45] Draggor has joined the channel [21:45] jakehow has joined the channel [21:46] markwubben has joined the channel [21:47] jvolkman-work: Is there any standards compliant way to achieve the same as: var x = {}; x.__proto__ = { foo: 'bar' }; [21:48] jvolkman-work: that is, set an object's prototype directly [21:48] linnk: Hey there, I'm trying to contribute a small patch to node.js through GitHub. ry already looked at it, but I'm afraid that I messed up by not making a separate branch for my change (so now some of my experimental changes will also be pulled, which was not my intention) [21:49] creationix has joined the channel [21:49] petercooper has joined the channel [21:50] jelveh has joined the channel [21:50] [[zz]] has joined the channel [21:50] Evet: can socket.io perform loadbalancing? [21:50] jamund has joined the channel [21:52] linnk: Would be really awesome if someone could help me through getting this commit right. It's my first time, so I want to learn how to do it correctly [21:56] Booths: drostie: I think I'm going to chalk it up to the computer sucking. I created a VM with IE7 and it works fine as well as another computer with IE7. [21:57] jtsnow has joined the channel [21:58] saikat has joined the channel [21:59] mjr_: Does anybody have a stats module for node that does min/max/avg/stddev on an array of data? [21:59] mif86 has joined the channel [22:02] bnoordhuis: linnk: what are you trying to do? [22:02] robotarmy has joined the channel [22:02] stride: mjr_: that's like 4 LoC you lazy man :) [22:02] mjr_: sure [22:02] mjr_: I am lazy [22:02] stride: :) [22:02] bnoordhuis: the hallmark of decent developers [22:03] matthewford has joined the channel [22:03] jesusabdullah: Hah [22:03] linnk: bnoordhuis: I made this pull request after making a simple doc fix https://github.com/ry/node/pull/412#issuecomment-544634 [22:03] jesusabdullah: Yeah, that's pretty easy to do [22:04] bnoordhuis: linnk: you only want to submit all commits? [22:04] bnoordhuis: er [22:04] bnoordhuis: some commits [22:04] bnoordhuis: sorry, tired [22:04] linnk: bnoordhuis: But then I made some more changes, all in the master branch (my mistake), so now ry got to pull those too :/ [22:04] technoweenie has joined the channel [22:05] linnk: Exactly, I just don't know how to fix the pull request without starting all over. Also, I need to wrap the lines and commit that also [22:05] AAA_awright: linnk: If you posted a patch only the changes introduced in the patch will be applied [22:06] rikarends has joined the channel [22:06] AAA_awright: Otherwise maintainers should check out the diff/diffstat before merging [22:07] bnoordhuis: linnk: curiously enough, i did the same thing tonight [22:07] bnoordhuis: easy fix: move your experimental changes to separate branch [22:07] linnk: AAA_awright: Didn't make a patch, just made a pull request on GitHub [22:07] bnoordhuis: delete them from your local master with `git reset --hard commit` [22:08] bnoordhuis: and kill them off github with `git push --force` [22:08] bnoordhuis: --force is a tad dangerous so make sure you get it right [22:08] linnk: I'll try, hmm :/ [22:09] bnoordhuis: or you could just post a comment saying 'only pick these commits: aaa, bbb, ccc' [22:09] justin____ has joined the channel [22:09] felixge has joined the channel [22:09] felixge has joined the channel [22:09] _announcer has joined the channel [22:09] bnoordhuis: the actual merging is handwork anyway [22:09] drostie: mjr: lemme grab my linear regression formulas. :D [22:09] felixge: is there such a thing as a 'drain' event when writing to the stdin of a child process? [22:10] bnoordhuis: felixge: don't think so [22:11] linnk: bnoordhuis: Hehe, might just do that, the other solution sounds a bit daunting. The correct way (for some other time) would be to make a separate branch for each change and only make a pull request for that one branch? [22:11] felixge: bnoordhuis: hm, so there is no way to throttle when piping between two unix processes? [22:11] felixge: bnoordhuis: I mean maybe node doesn't expose it yet, but does the concept exist in unix? [22:11] bnoordhuis: linnk: yes, that's correct [22:11] micheil: is listenFD still in existence? [22:11] bnoordhuis: felixge: sort of [22:12] bnoordhuis: normally the writer block when the pipe is full [22:12] bnoordhuis: *blocks [22:12] bnoordhuis: come to think of it [22:12] ryah: there is such thing as a drain event [22:12] ryah: for child.stdin [22:12] linnk: bnoordhuis: Ok, thanks a lot, very helpful :) [22:13] bnoordhuis: damn ryah, beat me to it [22:13] felixge: ryah: node doesn't expose it yet, does it? [22:13] ryah: it does [22:13] ryah: child.stdin is just a normal net.Stream [22:13] ryah: child.stdin.on('drain') [22:13] spetrea has joined the channel [22:14] ryah: res.pipe(child.stdin) [22:14] ryah: etc [22:14] felixge: ryah: ah, I forgot write can return true if it flushed right away [22:14] felixge: ryah: that's why I didn't see a drain event [22:15] ryah: also felixge: [22:15] ryah: https://github.com/ry/node/commit/006faad2c050ac3cbc6252ec07a4a398dabbe924 [22:15] ryah: ^-- coming soon [22:15] ryah: diff is a bit hard to read. this is better: https://github.com/ry/node/blob/006faad2c050ac3cbc6252ec07a4a398dabbe924/test/fixtures/recvfd.js#L27 [22:16] felixge: ryah: will this be supported by all streams? [22:16] felixge: (btw. I love it) [22:16] ryah: yes [22:16] felixge: ryah: that's really nice [22:17] micheil: wow. nice. https://github.com/ry/node/pull/424 [22:17] mrkurt: yeah, that turned me into a bnoordhuis fanboy :p [22:18] trotter has joined the channel [22:19] drostie: mjr_: http://pastebin.com/G8rdLJde [22:20] drostie: mjr_: should work for what you need it to do, and has some ideas which you might not need. :D [22:20] meatmanek_ has joined the channel [22:21] mjr_: drostie: hey, that looks really cool [22:21] mjr_: You should put that into a stats module in npm [22:21] willwhite has left the channel [22:21] indexzero: ryah: Reading through that code, looks nice. At a high level, what's the scenario? IPC? [22:22] ryah: indexzero: it's an ipc test [22:22] indexzero: I was talking with micheil last night about passing fds for reverse proxying http requests, wondering if it's applicable [22:22] micheil: drostie: ah, so that's who std dev. works. [22:22] micheil: *how [22:23] bnoordhuis: didn't peter griess implement something like this some months ago? [22:23] bnoordhuis: or was that c++ only? [22:24] drostie: mjr_: eh. I could maybe toss it on my github account but I don't know much about the node package manager. [22:24] [[zz]] has joined the channel [22:25] drostie: mjr_: (actually, it *is* on my github account under "essay-seeds", since it's part of a maths essay-seed that actually derives the formulas for linear regression. [22:25] drostie: ) [22:26] micheil: hmm.. [22:26] micheil: v8: 5.length [22:26] v8bot: micheil: SyntaxError: Unexpected token ILLEGAL [22:26] micheil: v8: (5).length [22:26] v8bot: micheil: undefined [22:26] micheil: in which case that paste shouldn't work.. [22:27] drostie: Firebug also complains about 5.length as "missing ; before statement." [22:28] bradleymeck has joined the channel [22:28] liar has joined the channel [22:28] mraleph: v8: 5..length [22:28] v8bot: mraleph: undefined [22:28] micheil: last I knew numbers didn't have like. [22:28] micheil: *length [22:28] micheil: (It's too early in the morning.. :P) [22:28] JimBastard has joined the channel [22:29] rednul_ has joined the channel [22:29] hassox has joined the channel [22:29] micheil: drostie: I just find that code interesting, because when I was in school, I was told to just punch stuff into a calculator, even when I asked for formulas [22:29] Vekz has joined the channel [22:29] drostie: micheil: numbers are instantiations of Number in ECMAScript and thus can be assigned any extra properties you want, like length or height or width. :D [22:30] micheil: drostie: true, but you haven't. [22:30] mraleph: drostie: nope [22:30] drostie: micheil: yeah, so it will return undefined. :P [22:30] mraleph: v8: var n = 5; n.foo = 6; n.foo [22:30] v8bot: mraleph: undefined [22:30] Vekz: Hey are there any solid concurrency benchmark preformance comparison images in circulation? preferable nodejs vs thin [22:30] drostie: or, never mind. o_O. [22:31] bnoordhuis: v8: (42).__proto__ [22:31] v8bot: bnoordhuis: {} [22:31] drostie: Are numbers immutable then? [22:31] mraleph: there is some deep magic here. when you do n.foo temporary Number object is created and then discarded [22:31] drostie: ah. [22:31] mraleph: same for strings [22:31] mraleph: v8: var n = "5"; n.foo = 6; n.foo [22:31] v8bot: mraleph: undefined [22:32] mraleph: v8: var n = new String("5"); n.foo = 6; n.foo [22:32] v8bot: mraleph: 6 [22:32] mraleph: me dislikes all these dark corners *sigh* [22:32] micheil: v8: var n = new Number(5); n.foo = 6; n.foo [22:32] v8bot: micheil: 6 [22:33] drostie: okies. So literals are not actually objects unless they are functions, until they are specifically made into things for which typeof x == "object". [22:33] hellp has joined the channel [22:33] creationix: anybody know how to use fs.sendfile? [22:33] bnoordhuis: v8: (42).constructor.call(1337) [22:33] v8bot: bnoordhuis: 0 [22:33] bnoordhuis: where's the logic in that? [22:33] mraleph: bnoordhuis: there is no logic in JS [22:34] bnoordhuis: only more JS? [22:34] mraleph: s/J/B/ [22:34] drostie: v8: (42).constructor.call(0, 1337) [22:34] v8bot: drostie: 1337 [22:34] bnoordhuis: :) [22:34] drostie: the first element is not an argument but is the 'this' value. :D [22:35] jpld: has anyone come across a webworker lib they could recommend for easily bringing up new node instances? [22:35] creationix: jpld: https://github.com/pgriess/node-webworker [22:35] mraleph: v8: function foo() { return foo.caller.arguments; } function bar() { var arguments = "FUUUUU"; return foo(); } bar(); [22:35] v8bot: mraleph: "FUUUUU" [22:35] drostie: The point is, let's invent a better one with a macro language, so that we can define the macro `scope { }` instead of having to write `(function () { }());` :D [22:35] jpld: creationix: cheers! [22:35] micheil: drostie: anyway, there's no such thing as the mean of a single number [22:35] mraleph: another great example of JS inside JS [22:36] creationix: so no sendfile users here? [22:36] micheil: nup [22:36] creationix: Tim_Smart used it, but he's not here [22:36] micheil: i think he has some code in a repo somewhere [22:36] creationix: yeah, in biggie-router [22:36] drostie: micheil: the mean of the random variable [1] -> [3] is exactly 3. It is perfectly okay to call this random variable "3", since it is 3 all the time. [22:37] mraleph: owww jesus some serious math here [22:37] bnoordhuis: creationix: what about fs.sendfile? [22:37] micheil: drostie: huh? [22:37] creationix: bnoordhuis: do you know how it works or understand it's quirks [22:38] creationix: bnoordhuis: I assume it's undocumented for a good reason [22:38] bnoordhuis: creationix: that's correct :) [22:38] micheil: drostie: my definition of mean was always: "add all terms, then divide by total number of terms" [22:38] bnoordhuis: creationix: but it's really simple: infd must be a file, outfd a socket [22:38] bnoordhuis: write the http response headers first [22:39] bnoordhuis: then loop over fs.sendfile until everything has been written [22:39] drostie: micheil: well if you take a stats class you'll be introduced to lots of distinctions on that general idea, but basically, why are you upset about 'the total number of terms' being 1? [22:39] creationix: bnoordhuis: I [22:39] drostie: micheil: you can divide by 1 perfectly fine. [22:39] creationix: I'm doing that, but it's like the bytes never make it to the socket [22:39] amerine has joined the channel [22:39] creationix: bnoordhuis: even though sendfile it returning with a number written [22:39] bnoordhuis: creationix: gist? [22:39] T-Co: Is process.Promise() obsolete? [22:40] micheil: drostie: yeah, but you're dividing by undefined [22:40] micheil: drostie: although, it's a kinda unneeded operation [22:40] drostie: michiel: sum(array)/array.length for array = [3] gives sum([3])/1 = 3 / 1 = 3. [22:40] creationix: bnoordhuis: https://gist.github.com/c8b07bd77654e788b54b [22:41] creationix: bnoordhuis: it makes it through and logs done on the first loop through (I'm testing with only 5 bytes) [22:41] micheil: drostie: that doesn't indicate that x or y is an array [22:41] creationix: socket it response.connection from the http connection [22:41] bnoordhuis: creationix: Fs.sendfile()? [22:41] bnoordhuis: s/Fs/fs/ [22:42] drostie: micheil: the way my function is written now, sum() will fail if it is given something which has neither a map() function or a .length parameter. :/ [22:42] bnoordhuis: creationix: or do you have a 'Fs = import("fs")' somewhere? [22:42] creationix: bnoordhuis: yeah [22:42] micheil: drostie: good point. [22:42] drostie: er. Sorry. mean() will return NaN with no .length parameter. [22:42] drostie: sum() will probably throw an exception with no .map() function. [22:43] micheil: well, at anyrate, it's interesting to know how std dev actually works. [22:43] drostie: yeah. it's much more tedious to know why you divide the sample variance by n - 1 rather than n. :P [22:43] bnoordhuis: creationix: https://github.com/mhansen/antinode/commit/7dc6d89b3c5cbafc88ee20b77d301cbae048c51b [22:44] creationix: bnoordhuis: that's blocking sendfile [22:45] rnewson has joined the channel [22:45] creationix: bnoordhuis: hmm, interesting, it's using req.connection.fd instead of res.connection.fd [22:45] tony__ has joined the channel [22:45] creationix: is that the same object? [22:46] bnoordhuis: creationix: that was code for 0.1.x and early 0.2.x i think [22:46] liar has joined the channel [22:46] bnoordhuis: the interface might have changed [22:47] bnoordhuis: let me check [22:47] landlessness has joined the channel [22:47] micheil: bbl. breakfast. [22:47] jelveh has joined the channel [22:47] creationix: bnoordhuis: same as far as I can tell (socketfd, filefd, offset, length, callback) [22:48] bnoordhuis: creationix: give me five minutes, i'll see if i can whip up a working example [22:48] creationix: ok [22:49] halfhalo: WOOOO node 0.1.104! [22:49] ryah: does anyone remember this case where you'd get garbage if you tried to fs.write() a bunch of times in a row [22:49] ryah: i can't find the issue [22:50] tony__ has joined the channel [22:50] ryah: where is isaacs :~( [22:53] bnoordhuis: ryah: it was discussed on the mailing list [22:53] bnoordhuis: want a link? [22:54] landlessness has left the channel [22:54] tony__ has joined the channel [22:55] derferman has joined the channel [22:57] ryah: bnoordhuis: please [22:57] eee_c has joined the channel [22:57] bnoordhuis: ryah: http://groups.google.com/group/nodejs/browse_thread/thread/c11f8b683f37cef [22:57] Aikar: ryah: any chance could make node check for an index.js instead of throwing EISDIR [22:58] matt_c has joined the channel [22:58] ryah: Aikar: hm [22:59] ryah: Aikar: let's discuss on nodejs-dev [22:59] ryah: sounds like something people might have opinions about [22:59] ryah: i'm all for it [22:59] Aikar: hmm, why would people oppose to it working vs throwing an error lol. [22:59] Aikar: require() functions that way [22:59] Aikar: i figured node would work already like that [22:59] ryah: javascript people are nazis [22:59] rnewson has joined the channel [22:59] rnewson has joined the channel [23:01] AAA_awright: webr3: You might be interested in a project I've been working on [23:01] Aikar: ryah: did you mean #nodejs-dev lol? [23:01] bnoordhuis: creationix: https://gist.github.com/702695 [23:03] ryah: Aikar: google group [23:05] creationix: bnoordhuis: so that's working for small files? [23:05] bnoordhuis: creationix: yes [23:05] creationix: probably not going to work for things that take up more than one chunk though [23:05] creationix: though that's basically what I'm doing [23:05] creationix: strange [23:05] aubergine has joined the channel [23:06] bnoordhuis: creationix: are you sending the data as-is or chunked? [23:06] bnoordhuis: ryah: https://gist.github.com/702701 [23:06] bnoordhuis: ryah: Server.listen(8080) binds to any random port right now [23:06] Aikar: lol... [23:07] Aikar: thats not my fault! >_> [23:07] creationix: bnoordhuis: as it, with an explicit Content-Length [23:07] creationix: bnoordhuis: hmm, I see you're still using req and I'm still using res [23:07] ryah: bnoordhuis: works for me [23:07] creationix: maybe sendfile needs the req fd [23:08] bnoordhuis: ryah: not for me, i'm at a01e095 (scp something something) [23:08] bnoordhuis: this is on ubuntu 10.04 btw [23:09] creationix: bnoordhuis: me too [23:09] Aikar: > require('net').createServer().listen(8081, function() { console.log(this.address().port); }); [23:09] ryah: bnoordhuis: me too [23:09] Aikar: > 8081 [23:09] gwoo has joined the channel [23:10] ryah: bnoordhuis: oh wait, im on v0.2 [23:10] ryah: sec [23:10] creationix: bnoordhuis: (for sendfile) are you using node 0.3.0 or 0.2.4 or HEAD? [23:10] Aikar: im on the commit JUST after you commited the change to fix listen(); ryah [23:10] bnoordhuis: creationix: head [23:11] Aikar: > require('net').createServer().listen(function() { console.log(this.address().port); }); [23:11] Aikar: > 52301 [23:11] bnoordhuis: ryah: hah, if i add the callback, it does work [23:12] ryah: bnoordhuis: ok [23:12] ryah: glad you caught this [23:12] linnk: Going to bed, thanks for helping me out... see ya :) [23:13] ajcates has joined the channel [23:13] brianmario_ has joined the channel [23:14] creationix: bnoordhuis: hmm, it is sending my data, but before the headers [23:14] creationix: and it doesn't seem to matter if I flush or not [23:14] creationix: same behavior on 0.2.4 and 0.3.0 [23:14] markwubben has joined the channel [23:15] [[zz]] has joined the channel [23:16] christophsturm has joined the channel [23:16] ysynopsis has joined the channel [23:16] bnoordhuis_ has joined the channel [23:16] bnoordhuis_: that'll teach me to brag about linux uptimes... [23:17] zemanel_ has joined the channel [23:18] ryah: creationix: you're aware that sendfile support is going to be ripped out and torn up in the near future? [23:18] creationix: yep [23:18] ryah: ok [23:18] creationix: I'm just trying to serve my static files on creationix.com [23:18] creationix: I don't mind freezing the node version [23:19] creationix: I'm sure it will all look different after the writev stuff [23:19] creationix: then I can update my tiny script [23:19] Booths has joined the channel [23:21] bnoordhuis_: creationix: you do a res.send('')? [23:22] bnoordhuis_: you need to force the headers out [23:22] bnoordhuis_: sorry, res._send('') [23:22] creationix: bnoordhuis_: I know [23:22] mertimor has joined the channel [23:23] creationix: ahh, I was using .send, not ._send [23:23] creationix: .end works too though [23:24] bnoordhuis_: creationix: doesn't .end() also close the fd? [23:26] mertimor has left the channel [23:26] mertimor has joined the channel [23:27] mertimor has left the channel [23:28] creationix: bnoordhuis_: it does, but not before sendfile gets stuff in [23:28] creationix: _send it probably safer [23:28] creationix: I'm not handling the large-file case [23:28] creationix: sendfile is throwing EAGAIN [23:28] creationix: s/not/now [23:29] Aikar: ryah: confirmed its doing it with plain listen(8080) too [23:29] Aikar: s = require('net').createServer();s.listen(8080);setTimeout(function(){console.log(s.address()); }, 3000); [23:30] Aikar: oh the fun EAGAIN :/ [23:30] Aikar: i hate that 'status' (its not really an error) [23:31] Aikar: EAGAIN simply means "try again" lol [23:32] bnoordhuis_: i had a girlfriend like a non-blocking syscall once [23:32] bnoordhuis_: EAGAIN and EAGAIN she wanted [23:32] evanmeagher has joined the channel [23:32] siculars has joined the channel [23:33] Aikar: lol [23:33] atmos has joined the channel [23:33] CIA-95: node: 03Ryan Dahl 07master * rcf05257 10/ (3 files in 2 dirs): Test for server.listen() more carefully, fix bug - http://bit.ly/cD3d95 [23:35] micheil: bnoordhuis_: she could've dropped something like E2BIG [23:35] micheil: or EADDRINUSE [23:35] micheil: or EALREADY. [23:36] Aikar: E2BIG isnt a common response, you meant E2SMALL [23:36] yhahn has joined the channel [23:36] Dreamer3 has joined the channel [23:36] tj: oh god haha [23:36] micheil: http status codes work better. [23:37] tj: i tried that http status code drinking game [23:37] tj: didnt go so well [23:37] micheil: there's a drinking game? wtf? [23:37] halfhalo: Drink when you get a response! [23:38] tj: micheil: http://statuscodedrinkinggame.com/ [23:38] rwaldron_ has joined the channel [23:38] evanmeagher: tj: that's awesome, hahaha [23:39] micheil: hmm, they all end in drinks though.. :P [23:39] evanmeagher: micheil: not 200 [23:39] evanmeagher: 200 OK [23:39] evanmeagher: Calm the fuck down. no one drinks. [23:40] micheil: heh [23:40] halfhalo: hahaha [23:40] bnoordhuis_: somehow i only get 101 Continue [23:40] evanmeagher: shots [23:41] evanmeagher: hitting refresh on this while listening to girl talk's latest makes me want to test the ballmer peak [23:41] justin____ has joined the channel [23:41] creationix: how do I get a drain event on res.connection after a EGAGIN error? [23:41] creationix: res.connection.on('drain', function () {...}) ? [23:42] creationix: doesn't seem to ever fire [23:43] tj: creationix: i dont know how you move so much man lol im getting my first place, and its driving me nuts [23:43] tj: so much paperwork [23:43] creationix: tj" tell me about it [23:43] tj: *bashes face [23:44] Aikar: so this https://github.com/gjritter/nodewiki - i can use connect to ninja that wiki into my web engine? [23:44] Aikar: err connect/express, so like app.get('/wiki', require('nodewiki')); ? [23:44] rburhum has joined the channel [23:44] EyePulp has joined the channel [23:45] mattly has joined the channel [23:46] ryah: the release that i can never get out :~ [23:46] creationix: ahh, I know why drain doesn't work, it's all javascript land code [23:46] itissid has joined the channel [23:46] creationix: it never sees the stuff sendfile it doing [23:46] creationix: I have to use io_watcher from process.binding [23:47] rikarends has left the channel [23:48] keltus has joined the channel [23:51] keltus: I've read a lot of articles saying in node.js we don't have to worry about race conditions. how can that be? in my app, I have a user with hitpoints. missiles can hit him for 5 damage. so when I receive a missile attack event, I get his hitpoints from mongodb, and then decrease it by 5, then save it. what prevents the second missile from reading from the db before the first missile saves the damage given? [23:51] Aikar: its single threaded [23:51] Aikar: only 1 line of code is running at one time [23:51] Aikar: now race conditions getting data to and from your DB is a diff story [23:52] micheil: with mongo, you should be doing a findAndModify request [23:52] tj: micheil: i think that is in the shell only [23:52] sandy__ has joined the channel [23:53] tj: ah, yes "MongoDB shell includes a helper method, findAndModify()" [23:53] tj: oh i see [23:53] tj: nvm [23:54] eee_c1 has joined the channel [23:55] elijah-mbp has joined the channel [23:57] pifantastic has joined the channel [23:58] ajpi has joined the channel [23:58] DanielSim has joined the channel