[00:01] balaa has joined the channel [00:03] Swizec has joined the channel [00:04] cafesofie has joined the channel [00:05] weezle has joined the channel [00:06] JKarsrud: jesusabdullah: cool [00:06] JKarsrud: I only started playing around with node today, so ;) [00:06] gazumps has joined the channel [00:09] t|f: Why would this... [00:10] rauchg has joined the channel [00:11] mrryanjohnston-e: JKarsrud: welcome, dude :) [00:11] JKarsrud: thanks :) [00:12] [[zz]] has joined the channel [00:12] tilgovi has joined the channel [00:13] JKarsrud: Is there an easy way to make node apps run all the time, not having to restart the server each time I change a file? [00:13] samBiotic: JKarsrud, dev or production? [00:14] JKarsrud: dev [00:14] samBiotic: npm install node-dev [00:14] samBiotic: node-dev file.js [00:14] JKarsrud: ahh, cool [00:14] samBiotic: there maybe others but that's what i use [00:15] samBiotic: may be* [00:15] tomtomaso has joined the channel [00:15] JKarsrud: cool, works for me :) [00:16] samBiotic: nice [00:16] t|f: Why the difference in behavior shown below, anyone know? [00:16] t|f: (1) Version 1... Assertion message is not printed [00:16] t|f: In module x.js: [00:16] t|f: exports.nodeunit = require('nodeunit'); [00:16] t|f: In y.js.... [00:16] t|f: require('./x').nodeunit.reporters.default.run(['test']); [00:16] t|f: (2) Version 2... Assertion message is printed [00:16] t|f: In y.js.... [00:16] t|f: require('nodeunit').reporters.default.run(['test']); [00:16] JKarsrud: is there something like that for production too? :) [00:17] gavin_huang has joined the channel [00:18] JKarsrud: or would that just be running it on nginx or something? [00:18] jesusabdullah: JKarsrud: You may also find forever to be useful [00:18] jesusabdullah: though I don't remember if it's good for dev like node-dev. It's more production-aimed iirc [00:19] JKarsrud: good to know either way :) [00:22] warreng1 has joined the channel [00:29] tim_smart has joined the channel [00:30] colonelpannick has joined the channel [00:31] colonelpannick: hi everyone. Having trouble building a native module for node with cygwin [00:32] colonelpannick: Anyone like to help? [00:33] level09 has joined the channel [00:35] colonelpannick: $ node-waf configure build /usr/src/wscript: error: Traceback (most recent call last): File "/usr/local/bin/../lib/node/wafadmin/Utils.py", line 274, in load_module exec(compile(code, file_path, 'exec'), module.__dict__) File "/usr/src/wscript", line 5 def set_options(opt) ^ SyntaxError: invalid syntax [00:35] jesusabdullah: I would if I thought I could be helpful, colonelpannick :( [00:36] colonelpannick: nice to know [00:36] colonelpannick: im just trying to compile the example hello.cc and i get this horrible error :( [00:37] stepheneb has joined the channel [00:37] colonelpannick: anyone? [00:38] jesusabdullah: colonelpannick: Actually, I have a suggestion if nobody that knows stuff is at-keyboard [00:38] jesusabdullah: colonelpannick: Check out [00:38] jesusabdullah: colonelpannick: Check out er [00:38] level09 has joined the channel [00:38] jborst has joined the channel [00:38] jesusabdullah: colonelpannick: https://github.com/joyent/node/issues [00:40] jesusabdullah: Is there an obvious way to reverse strings in javascript? I'm kinda herping the derp right now [00:40] jesusabdullah: ex: 'roffle' -> 'elffor' [00:40] SubStack: v8: 'abc'.split('').reverse() [00:40] v8bot: SubStack: ["c","b","a"] [00:40] SubStack: v8: 'abc'.split('').reverse().join('') [00:40] v8bot: SubStack: "cba" [00:41] jesusabdullah: Yeah [00:41] jesusabdullah: >_< [00:42] bitwise_ has joined the channel [00:43] JKarsrud: aight, node is cool :D [00:48] bingomanatee has joined the channel [00:49] bingomanatee: if you have pixel by pixel data in node canvas what is the best way to create a canvas based on that data? [00:50] kimico has joined the channel [00:50] colonelpannick: is there some method to get html from it? [00:50] bingomanatee: this is server side - I have an array of values I want to visualize [00:51] matt4447 has joined the channel [00:51] Sorella has joined the channel [00:52] bbttxu has joined the channel [00:52] matt4447: anybody have tips on a module for interacting with Twitter, but not replacing a site's auth provider / method? [00:52] matt4447: is connect-auth the way to go? [00:55] unlink has joined the channel [00:57] seawise has joined the channel [00:57] JKarsrud: I have a question about express: If I want a route to return json, how would I go about doing that? [00:57] JKarsrud: just res.contentType('application/json'); ? [00:57] crmt has joined the channel [00:58] colonelpannick: probably you can take your values and base64 encode them and use that as content for a canvas tag that you write out [00:59] Bwen: any way to check if the req is from SSL/https ? [00:59] cafesofie has joined the channel [01:04] clifton: when requiring coffeescript for a project (the main file, app.coffee needs the coffee executable), what's the best way to specify that in the package.json ? [01:04] clifton: req.connection.protocol? [01:04] clifton: try console.log(req.connection) [01:04] clifton: should give you any info you need [01:04] hij1nx has joined the channel [01:06] JKarsrud: Meh, need to go to bed, need to work for a few hours tomorrow :/ [01:06] JKarsrud: catch you later, this will not be the last time I'm in here I guess ;) [01:08] Bwen: clifton: so much info in there... how do you know which to base yourself on? O.o [01:09] Bwen: req.connection.pair._secureEstablished ? O.o [01:10] AndyDawson has joined the channel [01:11] blaenk has joined the channel [01:11] blaenk has joined the channel [01:11] nightshift has joined the channel [01:11] mundanity has joined the channel [01:12] kbni has joined the channel [01:12] k1ttty has joined the channel [01:20] colonelpannick: any cpp people here? [01:20] colonelpannick: need some help [01:20] colonelpannick: :( [01:21] colonelpannick: really simple stuff probably. just compiling. [01:21] MikeMakesIt has joined the channel [01:21] pandark_ has joined the channel [01:22] colonelpannick: i am getting really close now [01:23] colonelpannick: why cant the compiler see my .h files??? [01:23] colonelpannick: I just dont get c compilers [01:23] pandark_ has joined the channel [01:25] colonelpannick: join #c++ [01:26] pHcF has joined the channel [01:29] localhost has joined the channel [01:32] bogomips2__ has joined the channel [01:34] zackattack has joined the channel [01:36] bogomips has joined the channel [01:40] hassox has joined the channel [01:40] MikeMakesIt has joined the channel [01:47] skm has joined the channel [01:47] Jakwac has joined the channel [01:52] hij1nx has joined the channel [01:57] Jakwac_ has joined the channel [01:58] meso has joined the channel [01:58] wookiehang0ver has joined the channel [01:59] bogomips2_ has joined the channel [02:00] neoesque has joined the channel [02:00] materialdesigner has joined the channel [02:01] Wa has joined the channel [02:02] bogomips2__ has joined the channel [02:03] kbni has joined the channel [02:03] meso_ has joined the channel [02:04] odie5533 has joined the channel [02:04] ryanmcgrath has joined the channel [02:06] bogomips2_ has joined the channel [02:06] dshaw_ has joined the channel [02:08] maushu has joined the channel [02:08] bogomips has joined the channel [02:09] MikhX has joined the channel [02:10] darshanshankar has joined the channel [02:10] bogomips2__ has joined the channel [02:10] tbranyen: omfg [02:11] tbranyen: today [02:11] tbranyen: is amazing [02:11] tbranyen: nodejs is in arch community repo now [02:11] tbranyen: zomg [02:11] tbranyen: no more AUR bullshit [02:11] ePirat has joined the channel [02:13] bogomips2_ has joined the channel [02:14] jesusabdullah: I avoid AUR bullshit by not using Arch ;) [02:14] jesusabdullah: jk, jk [02:14] jesusabdullah: That's pretty cool [02:14] tbranyen: if you're a dev and you aren't using arch i feel sorry for you :( [02:15] jesusabdullah: Why? [02:15] jesusabdullah: arch is supposedly pretty pants for scientific applications [02:15] jesusabdullah: I guess their ATLAS isn't very well optimized or some such [02:16] tbranyen: scientific applications? well i must be doing it wrong [02:16] tbranyen: jesusabdullah: bleeding edge os [02:16] jesusabdullah: that said, I usually compile from source if I develop things [02:16] jesusabdullah: I *have* considered arch, actually [02:16] tbranyen: compiling node from source gets old tho [02:16] jesusabdullah: I'm just *really* lazy [02:16] tbranyen: unless you really need debug [02:16] jesusabdullah: don't feel like having to think about config scripts and shit [02:16] jesusabdullah: I did that stuff with slackware back in the day [02:16] jga023 has joined the channel [02:17] jesusabdullah: actually, for all I know arch has more noobtools now than it did 5 years ago [02:17] tbranyen: me neither, rc.conf is the only config script i work with [02:17] tbranyen: and afaik was the only one ever [02:17] tbranyen: arch was made to be simple [02:17] jesusabdullah: Maybe when I get a new 'puter for teh minecrafts, I'll throw arch on my netbook and give it a spin [02:17] jesusabdullah: Maybe it'll feel better for setting up xmonad too [02:18] jesusabdullah: I mean, not that xmonad is hard to set up with unbuntuo, but [02:18] tbranyen: yeah i was using awesomewm for a while, but i'm just xfce now [02:18] jesusabdullah: it's mildly pesky [02:18] jesusabdullah: ah [02:18] jesusabdullah: With larger screens I stick with stock wm action, but for a little screen like on my netbook, I really like having xmonad [02:18] jesusabdullah: I'm sure awesome would also be good [02:19] tbranyen: yeah i've got the same setup on my laptop and desktop atm [02:19] Vertice has joined the channel [02:24] bogomips2__ has joined the channel [02:24] sstreza has joined the channel [02:31] cjm has joined the channel [02:32] bogomips2_ has joined the channel [02:35] baoist has joined the channel [02:36] bogomips has joined the channel [02:36] pandark_ has joined the channel [02:36] unlink has joined the channel [02:36] unlink has joined the channel [02:39] jonmaim has joined the channel [02:40] bogomips2_ has joined the channel [02:40] googol has joined the channel [02:41] yhahn has joined the channel [02:44] weezle has left the channel [02:45] AddZero has joined the channel [02:46] zackattack has joined the channel [02:48] tauren: is it currently realistic to develop real apps with websockets? [02:48] tauren: Any thoughts on this flowchart? http://www.flickr.com/photos/iluvrhinestones/5889370258/lightbox/ [02:49] tauren: it seems the websockets would be fine on my own site using socket.io. [02:49] tauren: but if I want to do cross-domain requests, am I out of luck? [02:50] blackdog_ has joined the channel [02:51] blackdog_: hi all, how should i hold a child process open? it used to be openStdin or somesuch now I setInterval which works but that doesn't seem right [02:51] localhost has joined the channel [02:54] AddZero has left the channel [03:01] Skola has joined the channel [03:03] bogomips2__ has joined the channel [03:04] Mrfloyd has joined the channel [03:10] akshatj has joined the channel [03:11] rchavik has joined the channel [03:11] sounko has joined the channel [03:12] infynyxx has joined the channel [03:12] coyo has joined the channel [03:13] TechCel has joined the channel [03:17] Mrfloyd has joined the channel [03:17] Mrfloyd has joined the channel [03:22] bbrandon has joined the channel [03:24] jslatts has joined the channel [03:27] materialdesigner has joined the channel [03:27] micrypt has joined the channel [03:28] pradeek has joined the channel [03:29] sethetter has joined the channel [03:33] CStumph has joined the channel [03:35] catshirt has joined the channel [03:36] AvianFlu has joined the channel [03:43] tk has joined the channel [03:50] jga023 has joined the channel [03:52] BulletBob has joined the channel [03:53] sethetter has joined the channel [03:54] BulletBob_ has joined the channel [03:54] keikubo has joined the channel [03:56] seivan has joined the channel [03:59] sethetter has joined the channel [04:03] zackattack has joined the channel [04:04] wagnersouza has joined the channel [04:05] BulletBob has joined the channel [04:05] towski has joined the channel [04:06] wagnersouza: hi folks, I've tried to compile the node js from git but I got the error #127 [04:06] wagnersouza: someone knows how to fix? [04:07] blackdog_ has left the channel [04:07] jamescarr has joined the channel [04:08] jamescarr: is the zombie module the correct module for zombie.js? [04:08] jamescarr: installing it via npm gets me: npm ERR! Error: EACCES, Permission denied '../../../lib/node_modules/zombie/man7/guts.7' [04:08] jamescarr: no way am I going to let it install crap under a lib dir in the root directory [04:08] Aria: It is. Are you installing with -g or locally? [04:09] zackattack has joined the channel [04:09] jamescarr: -g [04:10] podman1 has joined the channel [04:10] Aria: That'd be why. you can configure npm to put global stuff elsewhere. But issaac has worked hard to make that safe, and for most things, local is preferred. [04:10] jamescarr: yeah... putting it in /lib is odd [04:10] JasonSmith has joined the channel [04:13] bbrandon has joined the channel [04:14] jamescarr: ah well doesnt matter [04:14] jamescarr: doesn't even install right when I foolishly use sudo as it recommended in the error [04:15] AvianFlu: wagnersouza what version of git [04:16] wagnersouza: 1.7.4.4 [04:16] AvianFlu: where'd you see error #127? that's the code bash uses for "file not found" kind of stuff [04:17] wagnersouza: after make command [04:17] dexter_e has joined the channel [04:17] AvianFlu: immediately after? [04:17] AvianFlu: or it runs a while first [04:18] wagnersouza: after line Waf: Leaving directory `/media/storage/GIT&SVNs/GIT/node/build' [04:19] febits[0] has joined the channel [04:20] Swizec has joined the channel [04:21] wagnersouza: resolved, the caractere & on directory name [04:21] wagnersouza: thx [04:22] gazumps has joined the channel [04:26] wookiehangover has joined the channel [04:31] localhost has joined the channel [04:35] Destos has joined the channel [04:36] carbocation has joined the channel [04:36] boehm has joined the channel [04:44] mediahack has joined the channel [04:44] hij1nx has joined the channel [04:50] Skola: could someone send me a Google+ invite? [04:50] jakehow has joined the channel [04:51] Skola: reward = infinite gratitude [04:51] maushu has joined the channel [04:52] shirro has joined the channel [04:52] shirro has joined the channel [04:53] __class__ has joined the channel [04:55] localhost has joined the channel [04:58] JoshC1 has joined the channel [05:06] tayy has joined the channel [05:08] kevmo314 has joined the channel [05:09] kevmo314: Hi, I'm trying to make a node http request to another server with a GET parameter that follows, but I can't figure out how to do it. I've tried http.get(url.parse(urlString), function(data) { ..., but it doesn't seem to work. What's the correct way to do this? [05:09] kevmo314: I've also tried passing in {host: [...], port:80, path: urlParsed.pathname + urlParsed.search} but that doesn't work either. [05:11] bartt has joined the channel [05:11] kevmo314: On a side note, why doesn't http.get(url.parse([...])) work? You'd imagine that they'd output/input the same parameters. [05:12] chjj: kevmo314: you should be passing in host, post, path, etc, but the callback to give gets a response object as its argument [05:12] kevmo314: Anyone here? [05:12] chjj: the callback you give* [05:12] kevmo314: Ah yeah I am. [05:12] chjj: and then you bind events on the response object [05:12] systemfault: no nobody here :) [05:13] kevmo314: Oh okay, I'll try that out. [05:13] kevmo314: Thanks! [05:13] chjj: http.get({...}, function(res) { res.on('data', etc); }); [05:14] dexter_e has joined the channel [05:14] kevmo314: Okay. [05:15] kevmo314: Also, is the fact that http.get(url.parse()) doesn't work just an oversight? [05:15] kevmo314: Since url.parse produces pathname but http.get takes path. [05:15] chjj: yeah, its kind of inconsistent, the "host" you get from url.parse includes the port for example, whereas the host youre expected to give there does not [05:15] boogyman has joined the channel [05:16] chjj: so instead you do: { host: url.hostname } [05:16] chjj: etc [05:16] chjj: i have an old gist of an example http request, 1 sec [05:17] chjj: https://gist.github.com/981977 [05:17] boomboombass has joined the channel [05:17] boomboombass: sup [05:17] kevmo314: Just tried that, doesn't seem like it worked. [05:18] kevmo314: I'll pastebin the section of code I have. [05:18] boomboombass: how do i close a script that I have opened in terminal. The script I executed opened an http server [05:18] zackattack has joined the channel [05:18] boomboombass: so i can regain control of terminal [05:18] wookiehangover has joined the channel [05:18] dexter_e: Control + C [05:18] boomboombass: thanks [05:19] kevmo314: http://pastebin.com/dZrSpGVE [05:20] febits has joined the channel [05:20] kevmo314: I'm not getting the hello or the data output. [05:20] kevmo314: All the examples I've seen just specify pathname, but I need to preserve the parameters as well that come after the path. [05:20] kevmo314: I figured that just tacking it onto the path would work, but apparently not. [05:22] kevmo314: I tried writing this without using the http.get shortcut, but same issue, the request wouldn't respond. [05:22] saikat has joined the channel [05:22] jtsnow has joined the channel [05:22] niftylettuce has joined the channel [05:23] rajivn has joined the channel [05:23] kbni has joined the channel [05:23] chjj: kevmo [05:23] chjj: try the gist i showed you [05:24] chjj: im not sure http.get automatically .ends the request either [05:24] kevmo314: That snippet doesn't preserve the get parameters though...? [05:24] chjj: youre not doing that [05:24] kevmo314: The API docs says it does [05:25] chjj: alright [05:25] kevmo314: But I can try ending it. [05:25] kevmo314: ... for good measure I guess. xD [05:25] chjj: try the gist i showed you anyway, i know that one works [05:25] SubStack: kevmo314: what does the console.log(parameters) show? [05:25] chjj: but yes, you should be able to tack the querystring onto the path [05:25] jacobolus has joined the channel [05:25] chjj: that should work fine [05:26] chjj: because beneath the surface, the path property is whats used on the request line [05:26] kevmo314: SubStack: I get { protocol: ..., slashes: true, host: ..., href: ..., search: ..., query: ..., pathname: ...} [05:26] kevmo314: Alright, give me a sec, I'll try that. [05:28] SubStack: if you visit the url with curl or wget or your browser does it work? [05:28] kevmo314: Yep. [05:28] kevmo314: I have a PHP script that does the exact same thing and it's been working fine. [05:28] kevmo314: The only problem is that it's a comet server. [05:28] kevmo314: And PHP has been failing miserably. [05:29] Nexxy: that's a new one to me [05:29] Nexxy: PHP... failing?! [05:29] Nexxy: ACTION shocked look. [05:29] SubStack: comet? [05:29] igl1: who said php [05:29] jesusabdullah: lol [05:29] jesusabdullah: Someday I'll write something awesome in php just to spite EVERYBODY [05:29] kevmo314: xD [05:29] Nexxy: jesusabdullah, like wordpress? [05:29] jesusabdullah: Nay, TWO wordpresses [05:29] SubStack: comet is the powder that you sprinkle in the toilet bowl [05:29] SubStack: and ajax is for dishes! [05:29] kevmo314: chjj: Your gist has the same issue that my code did, it didn't return data. [05:30] jesusabdullah: SubStack just handed me our ajax [05:30] systemfault: What? [05:30] Nexxy: SubStack, maybe in a world where websockets are standardized and fully supported! [05:30] chjj: kevmo: what node version are you using? [05:30] jesusabdullah: Our ajax is lemon scented! [05:30] systemfault: Comet and Ajax are both cleaning powders :P [05:30] dexter_e: Easiest way to deploy node on Port:80? anyone? [05:30] jesusabdullah: ahaha [05:30] jesusabdullah: systemfault: OUR ajax is a SUPER DEGREASER [05:30] Nexxy: dexter_e, sudo [05:30] kevmo314: I installed it a few days ago, so either v0.4.8 or v0.4.9 [05:31] systemfault: For extra win, you can use "vim" to write ajax and comet. [05:31] dexter_e: Nexxy: Thanks [05:31] systemfault: http://www.figuiere.net/hub/blog/200407/vim.jpg :) [05:32] systemfault: Someone gotta invent windex :/ [05:32] kevmo314: chjj: v0.4.8 [05:32] secoif has joined the channel [05:32] dexter_e: What about the next easiest way on Port:80 that includes automatic restarts and other nice-to-have in production features? [05:33] chjj: oh kevmo: i have the gist limiting the amount of data, if the response is more than 10kb, that might be the problem [05:33] matwill has joined the channel [05:34] kevmo314: chjj: I'm not getting the error either though. [05:34] chjj: the callback just isnt executed? [05:34] kevmo314: chjj: Yep. [05:34] kevmo314: There's no output whatsoever. [05:35] tayy has joined the channel [05:36] MikeMakesIt has joined the channel [05:37] kevmo314: chjj: You can try with http://www.google.com/search?q=test, it literally doesn't do anything, which is incredibly puzzling. [05:37] objectiveous has joined the channel [05:37] tayy has joined the channel [05:38] chjj: try binding to error on the socket, sometimes errors arent emitted for the response object [05:38] chjj: res.socket.on('error', etc) [05:39] tayy has joined the channel [05:40] kevmo314: chjj: Nope, noe rror emitted. [05:40] chjj: you could also try putting headers: { host: 'google.com' } in the options and throwing the raw ip in the url, it could be that dns lookup is failing [05:40] kevmo314: Well, I know dns is working, I have a request later on that doesn't have any get parameters and it works fine. [05:40] chjj: what do you mean get parameters? [05:41] kevmo314: The ?q=test [05:41] kevmo314: Like, http://google.com/search works [05:41] chjj: oh [05:41] kevmo314: But http://google.com/search?q=test doesn't. [05:41] kevmo314: I tried tacking an error handler onto the request object as well, no luck. Looks like it just dies silently... [05:42] chjj: it should work [05:42] chjj: this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n', this._renderHeaders()); [05:42] chjj: thats where the path goes [05:42] chjj: directly on the request line [05:43] kevmo314: Huh. [05:43] kevmo314: Odd. [05:43] fangel has joined the channel [05:44] kevmo314: Does nodejs have a ticketing system? [05:44] objectiveous has left the channel [05:45] kevmo314: Ah, right on github. [05:45] azeroth_ has joined the channel [05:47] Emmanuel_ has joined the channel [05:48] chjj: kevmo: i just tried my require function, works fine with query strings [05:48] chjj: my request function* [05:49] chjj: request('http://google.com/?q=hello', function(err, res) {console.log(err, res);}); [05:49] rajivn has joined the channel [05:50] kevmo314: Huh. [05:50] kevmo314: Then I wonder what's going wrong. [05:50] FredrIQ has joined the channel [05:53] kevmo314: http://pastebin.com/BX5MMTwV <-- It literally cannot get any simpler. [05:53] FIQ has joined the channel [05:54] kevmo314: (value is defined previously, I overwrote it, also renamed to fancyRequest because request was taken) [05:54] jslatts has joined the channel [05:55] kevmo314: chjj: Should I try upgrading to v0.4.9? [05:56] kevmo314: It doesn't seem to mention anything in the changelogs though. [05:57] chjj: im using this with 0.4.8 [05:57] kevmo314: Maybe something else in my code is screwing it up. I'll try it with a new script. [05:58] chjj: https://gist.github.com/981977 [05:58] chjj: theres an updated version [05:58] chjj: thats the exact code i used [05:58] chjj: if that doesnt work, somethings wrong [05:58] kevmo314: Yeah, it worked when I ran it in a blank script. [05:59] kevmo314: So something else is screwing it up. Crap. [05:59] Wa has joined the channel [06:00] FIQ has joined the channel [06:00] Tobsn has joined the channel [06:01] yhahn has left the channel [06:01] pandark_ has joined the channel [06:03] kevmo314: I have no idea what could affect it... do you have any debugging ideas? [06:04] chjj: the only thing i could think of would be if youre making other requests along side that one [06:04] kevmo314: No, that request is the only one that happens. [06:04] chjj: im not sure then [06:05] chjj: what else are you doing? [06:05] kevmo314: It's put in an http.createServer but that shouldn't affect it... [06:05] kevmo314: I'm using formidable to parse a POST form sent to my server. [06:05] chjj: are you sure the request itself is even being executed? [06:05] kevmo314: But that's about it... [06:05] kevmo314: Yeah, it looks that way because if I put a console.log immediately after http.request(opt, function(res) {, it doesn't produce that log. [06:06] chjj: i mean, are you sure the call to http.request is even being executed? [06:06] chjj: i realize the callback isnt [06:07] kevmo314: Well, if I put a console.log directly before and after the http.request, both of those logs appear. [06:07] kevmo314: So... I'd imagine it is... [06:07] chjj: ok [06:07] kevmo314: Unless the computer just got lazy and is deciding not to execute that line xD [06:08] chjj: im not sure, thats really strange, something you are doing along side it is obviously affecting it, you should try to rule things out one by one [06:09] chjj: or you could try the debugger, or node-inspector or something, set break points and step into every call [06:11] Tobsn: does anyone know how i can query mongodb data 24 hours ago? [06:11] Tobsn: Date() kinda doesnt want to do it :/ [06:11] kevmo314: When I comment out all of the formidable stuff, it looks like it works... That's really weird. [06:11] MikeMakesIt has joined the channel [06:17] bogomips2_ has joined the channel [06:18] kevmo314: Oh. I think I figured it out... [06:19] kevmo314: Since JS is single-threaded, when an event is emitted while something is running, does it alternate between the two "threads" or does it complete one then do the other? [06:20] kbni: the latter [06:20] kevmo314: Ah. That's why the request isn't executing. [06:20] kbni: possibly [06:20] kbni: show your code? [06:20] kevmo314: Okay, pastebinning [06:21] kevmo314: http://pastebin.com/tR6pZQVe [06:21] cjm has joined the channel [06:22] MikeMakesIt has joined the channel [06:22] kbni: uhm [06:22] kbni: while() [06:22] kevmo314: So I think what's going on is that the end event is getting called and it's waiting for the http request to complete successfully. I thought js would alternate between the two threads, so I figured it would complete the http request and that while loop would act as a semaphore. [06:22] kevmo314: Apparently not. [06:22] kevmo314: Dangit. [06:23] kevmo314: Gah, how would I implement that? [06:23] kevmo314: If I don't have the while in there, the end callback executes without the http response set. [06:24] kevmo314: ... excluding the fact that it doesn't work right now. [06:24] kbni: well [06:24] kbni: use a callback [06:25] kbni: why dont you check pending in the fancyRequest callback? [06:25] kevmo314: The url parameter is optional. [06:25] kevmo314: It's not always sent? [06:26] kevmo314: Also I do lower pending in the callback, the callback wasn't executing to begin with, so I removed it to see if something in the callback was causing a fuss. [06:26] kbni: that while loop [06:27] kbni: is causing your issues [06:27] kevmo314: Yeah, but I don't know how to write it otherwise. [06:27] kevmo314: Since the http request isn't always made... [06:27] kevmo314: And formidable doesn't seem to provide a list of all parameters, rather processes them one by one... [06:27] kevmo314: I don't know how many parameters there actually are. [06:28] ambroff_ has joined the channel [06:28] kbni: I don't really know what that form object does, but why don't you just tell it you are waiting on a url, and if you are, don't call the callback [06:28] kbni: (call it from the url fetch) [06:29] kevmo314: Uhh okay. That seems like a very odd way to do it but it seems like it'll work. [06:30] _jgr has joined the channel [06:30] dexter_e has joined the channel [06:32] MikeMakesIt has joined the channel [06:34] MikeMakesIt has left the channel [06:35] Me1000 has joined the channel [06:35] kevmo314: Okay. Looks like it worked. [06:36] kbni: <3 [06:36] kevmo314: So there's really no way to have like a mutex or something similar in nodejs? [06:36] kevmo314: (without adding a secondary function, that is) [06:37] kbni: I don't think so [06:37] kevmo314: Ah, alright, hmm. Well, thanks for the help! I would probably have never found that out myself. [06:39] stagas has joined the channel [06:49] Jubb has joined the channel [06:49] nightshift has joined the channel [06:50] Jubb: nightshift [06:50] Lorentz has joined the channel [06:50] nightshift has left the channel [06:51] Locke23rus has joined the channel [06:53] jonaslund has joined the channel [06:57] shimondoodkin has joined the channel [06:57] stagas_ has joined the channel [06:58] MikeMakesIt has joined the channel [06:59] philtor has joined the channel [06:59] Xano has joined the channel [07:00] sfragis has joined the channel [07:00] TechCel has joined the channel [07:05] odie5533: I want to build a web app mostly based on AJAX. Should I build the portal in RoR/Drupal and then build the AJAX in Node.js? Can I build everything in Node.js as easily as I could using one of the other platforms? [07:06] Skola: if you have to ask, it might not be as easy for you as in RoR/whatever [07:06] Skola: that said, it IS pretty easy [07:06] cjm has joined the channel [07:07] odie5533: for the entire site to be built in Node.js? Are any sites currently built entirely this way? All the case studies I found only use it for the backend or serving files or something like that. [07:07] Prometheus: odie5533: you can all of that in pretty much either tool if you want to [07:07] Prometheus: odie5533: look in to express [07:07] Remoun has joined the channel [07:08] Prometheus: https://github.com/visionmedia/express [07:09] odie5533: I come from PHP/Rails. Does Node or one of these web libraries support things like form validations and migrations? [07:11] konobi: if you need to rely on rails/dm migrations... you're screwed already imho [07:12] odie5533: I don't need to. I've written PHP apps from scratch. but I much prefer using rails objects to manipulate the database than writing sql queries. [07:12] fly-away has joined the channel [07:12] carpeliam has joined the channel [07:15] konobi: sql++ # fuck ORMs [07:15] rhdoenges has joined the channel [07:16] blkcat: that's very helpful of you [07:16] clifton has joined the channel [07:17] petrjanda has joined the channel [07:17] blkcat: odie5533: lots of options here - https://github.com/joyent/node/wiki/modules#database [07:18] yozgrahame has joined the channel [07:18] konobi: blkcat: *shrug* it's the truth... understood SQL for many years... then tried a variety of ORMs in several languages... _always_ been bitten [07:18] odie5533: konobi: Then you are using them wrong. I used SQL for a number of years as well. It's hard to imagine going back. [07:19] konobi: odie5533: yeah... i disagree... i've done OLTP and data warehousing style stuff... both with and without [07:19] odie5533: my entire app written in python. spend extra time to make abstraction layers so that everything is pythonic. Then you get to the database and you've got embedded sql queries everywhere? =/ [07:20] odie5533: blkcat: oh wow, there are a lot. and I mean A LOT. thanks [07:20] blkcat: odie5533: no problem. if you're not wedded to any db in particular i highly recommend giving mongoose a try, it's a pleasure to use. [07:20] FIQ has joined the channel [07:20] konobi: the only one that comes close has been dbix-class... because at least the authors understood how a database _actually_ works [07:21] odie5533: I am not. In fact I wanted to try out a different database than MySQL this time around. Was thinking Redi or Mongo already. [07:21] odie5533: *redis [07:21] akshatj_ has joined the channel [07:21] simenbrekken has joined the channel [07:21] MikeMakesIt has joined the channel [07:22] FIQ has joined the channel [07:22] blkcat: konobi++ # perl [07:22] konobi: blkcat: =0P [07:23] odie5533: blkcat: Are any of these web frameworks or database modules particularly popular at this point? [07:24] TomY has joined the channel [07:25] blkcat: odie5533: i'd say express is the most popular framework at the moment, with mongoose on the database end of things [07:25] blkcat: odie5533: express takes a lot of direction from camping and sinatra so bear that in mind [07:27] konobi: just never expect to be able to deal with HEAD requests any differently than any other request [07:28] konobi: well, that _may_ have changed since last i read the connect source... but anywhos [07:28] mikeal has joined the channel [07:29] konobi: ACTION puts his systems engineer/qa hat down for the rest of the weekend [07:29] jacobolus has joined the channel [07:32] ambroff_ has joined the channel [07:36] Skola has joined the channel [07:36] JasonSmith has joined the channel [07:38] Mrfloyd has joined the channel [07:42] apoc has joined the channel [07:43] azend has joined the channel [07:43] andrewfff has joined the channel [07:45] cpolis has joined the channel [07:48] flippyhead has joined the channel [07:58] tokumine has joined the channel [07:59] herbySk has joined the channel [08:03] jvduf has joined the channel [08:09] Spion has joined the channel [08:11] nitram_macair has joined the channel [08:11] dall has joined the channel [08:11] dall: hello [08:13] nitram_macair: anyone know why my make is not working http://pastebin.com/weUhCN7i [08:13] nitram_macair: centos on virtualbox [08:13] nitram_macair: 5.5 [08:15] shimondoodkin: maybe you did not configured it [08:15] shimondoodkin: ./configure [08:16] shimondoodkin: see "/tmp/node/build/default/deps/uv/eio/eio.c:923: undefined reference to `sync_file_range" [08:16] nitram_macair: i did [08:16] nitram_macair: ran ./configure first [08:16] shimondoodkin: http://www.mail-archive.com/ceph-devel@lists.sourceforge.net/msg00431.html [08:17] shimondoodkin: its abug [08:18] shimondoodkin: https://bugzilla.redhat.com/show_bug.cgi?id=518581 [08:19] nitram_macair: thanks il look at that [08:20] shimondoodkin: it means you have an old glibc [08:20] [[zz]] has joined the channel [08:20] gozala has joined the channel [08:20] shimondoodkin: but usually glibc is related to the kernel and recompolation of all programs that use it [08:23] shimondoodkin: http://groups.google.com/group/nodejs/browse_thread/thread/6083a046de4d1ad2/e990e90859583484#e990e90859583484 [08:23] shimondoodkin: oops not related [08:23] shimondoodkin: the last url [08:25] Fredderf has joined the channel [08:25] nitram_macair: ugh guess centos 5 is old now. [08:27] nitram_macair: thanks [08:27] nitram_macair: will try the patch out [08:28] akshatj has joined the channel [08:28] shimondoodkin: actually i am not sure abouth this http://man.flashnux.com/en/centos/5/5.5/man2/sync_file_range.2.html [08:29] shimondoodkin: it is strance your system says it does not have that function but in this documentation there is it [08:29] shimondoodkin: *strange [08:30] nitram_macair: wonder if i could get buy with a older version, seen a few blogs, and it seems to work on centos 5 [08:30] levi501d has joined the channel [08:30] shimondoodkin: it might be simpler to update distro http://lists.centos.org/pipermail/centos-announce/2011-April/017282.html [08:31] nitram_macair: yea i just did a update [08:31] nitram_macair: and rebooted it did not help [08:33] shimondoodkin: can you check which version of glibc you have [08:33] mikeal: apache bench on Lion is broken for me running the test/simple/test-http-full-response.js [08:34] nitram_macair: glibc-2.5-58.el5_6.4 [08:34] shimondoodkin: i guess you have to have a 2.6 [08:34] nitram_macair: yea, [08:35] nitram_macair: maybe il try that patch tomorrow or a older version [08:35] nitram_macair: thanks for the help [08:35] dall: someone use express ? [08:36] shimondoodkin: :) [08:36] dall: do i have to put all the app.use inside the configuration block ? app.configure(function(){ HERE middleware }) [08:36] shimondoodkin: no [08:36] shimondoodkin: it is like app.use [08:36] Aiden has joined the channel [08:37] shimondoodkin: also it is a dsl like app.use().use().use() [08:38] shimondoodkin: http://expressjs.com/guide.html#configuration [08:39] shimondoodkin: it is like a swithc case for the type of the enviorment [08:40] Epeli has joined the channel [08:42] zomgbie has joined the channel [08:43] SamuraiJack has joined the channel [08:43] dall: shimondoodkin, so if i have to change settings about the env...so yes....i have to use configure otherwise no [08:43] dall: ok thank you [08:44] dall: how could i sent production on the server and development on my local pc ? [08:44] shimondoodkin: it think it is about how you run your app like: node server.js production [08:44] tk has joined the channel [08:44] shimondoodkin: no it is $ NODE_ENV=production node app.js [08:45] dall: NODE_ENV=production node app.js [08:45] okuryu has joined the channel [08:45] dall: yes [08:45] dall: but can i set it ONE time without write it for each shell ? [08:45] shimondoodkin: yes [08:45] shimondoodkin: you can use export varname=value [08:45] dall: i have installted node using NVM [08:46] shimondoodkin: export NODE_ENV=production [08:46] dall: and then i can type node app.js [08:46] dall: ? [08:46] shimondoodkin: yes [08:47] dall: ok [08:47] test has joined the channel [08:47] test: test [08:47] test: ;) [08:47] dall: shimondoodkin, then how could i chekc if the "production" started [08:47] dall: i can i start node [08:48] dall: and then is there a command to check which ENV is using [08:48] shimondoodkin: i do not understand your idea [08:48] dall: eheheh [08:48] dall: i mean...AFTER i set the NODE_ENV [08:48] RushPL has joined the channel [08:48] dall: how coul di chekc if "production" env is working? [08:49] shimondoodkin: be createive [08:49] dall: only to do a test if it correcly working [08:49] shimondoodkin: console.log('production') inside configure('production') [08:49] dall: i will check thanks [08:49] shimondoodkin: you can print the envs i think it is like process.env [08:49] dall: ah perfect [08:51] dall: thanks [08:59] steffan has joined the channel [08:59] dall: shimondoodkin, what are the priority? if i use configure() <-- to setting global var then configure('production') ad configure('development') configure() <-- will be execute first and then EXPRESS will call the configure() if the running ENV ? [08:59] admc has joined the channel [09:01] shimondoodkin: i think it is eventemiter, it uses an array as a stack of function to cal [09:01] shimondoodkin: *call it calls tyhem by the adding order [09:02] shimondoodkin: but you can test it write console.log("1") in each [09:02] dall: OK [09:04] jvduf has joined the channel [09:05] random123 has joined the channel [09:05] akshatj has joined the channel [09:06] random123: Is it possible to get libssl-dev in Arch? [09:06] random123: Can't find it or equiv. in pacman [09:06] shimondoodkin: what is arch? [09:07] lmorchard has joined the channel [09:09] mange has joined the channel [09:09] Swizec has joined the channel [09:10] MattJ has joined the channel [09:11] liar has joined the channel [09:14] shimondoodkin: random123: you can download openssl and make it [09:15] odie5533 has joined the channel [09:15] sylvinus has joined the channel [09:17] shimondoodkin: random123: looks like you can install openssl from pacman [09:20] jbpros has joined the channel [09:20] jvduf has joined the channel [09:21] jvduf_ has joined the channel [09:23] random123: Oh, thanks [09:23] random123: Is it OK if port.h, poll.h, and kqueue are not present on my system [09:23] shimondoodkin: yes [09:23] shimondoodkin: as long as it compiles [09:23] random123: Cool, thanks [09:23] steffkes has joined the channel [09:24] shimondoodkin: it is different wasys of doing async io thet some present in some systems and other present in others [09:28] tomtomaso has joined the channel [09:28] mraleph has joined the channel [09:29] Fredderf has joined the channel [09:30] christkv has joined the channel [09:30] sourcode has joined the channel [09:33] carbocation has left the channel [09:42] shinuza has joined the channel [09:43] __doc__ has joined the channel [09:44] zackattack has joined the channel [09:45] etaty has joined the channel [09:49] Bwen has joined the channel [09:53] zomgbie has joined the channel [09:55] seawise has joined the channel [09:57] kbni has joined the channel [09:58] dall: I would like to use a template (layout.ejs) with Express, i see this example: http://pastebin.com/hkaNJNJ6 <%- body %> what does it mean? i know is the code that EJS will render but what is "body" ? variable? object? the of the view i should render? [09:58] jomoho has joined the channel [09:58] augustl: dall: no, it's whatever you tell "body" to be in locals [09:59] Aiden: Is this an appropriate place to ask questions about using socket.io with node? [09:59] augustl: dall: i.e. ejs.render("my template", {locals: {body: "123abc"}}) [09:59] qhead has joined the channel [10:02] JKarsrud has joined the channel [10:02] McMAGIC--Copy has joined the channel [10:04] `3rdEden: Aiden yes and no [10:04] `3rdEden: Socket.io also has it's own channel #socket.io [10:04] `3rdEden: but it's build on node, and this is a node channel :D [10:04] blup has joined the channel [10:04] Aiden: `3rdEden :) thanks [10:04] Aiden: `3rdEden: I'll give it a shot in the other room first then. [10:09] apoc has joined the channel [10:10] snu has joined the channel [10:11] aliem has joined the channel [10:11] jonmaim has joined the channel [10:12] McMAGIC--Copy has joined the channel [10:13] liar has joined the channel [10:13] fumes has joined the channel [10:14] fumes has left the channel [10:17] davidvanleeuwen has joined the channel [10:17] davidvanleeuwen_ has joined the channel [10:22] micrypt_ has joined the channel [10:23] sounko has joined the channel [10:25] squeese has joined the channel [10:26] mAritz has joined the channel [10:26] sourcode has joined the channel [10:27] ryanmcgrath has joined the channel [10:27] yumike has joined the channel [10:28] dwiash has joined the channel [10:34] JKarsrud: anyone here have any experience with expresso? [10:35] ryanmcgrath has joined the channel [10:37] JKarsrud: I'm getting a failed test on a simple assert.length(), where I compare the length of an array [10:38] McMAGIC--Copy has joined the channel [10:40] Wizek has joined the channel [10:41] JKarsrud: tests are here; CanGetAllTodos is the only test that fails.. http://pastie.org/2157865 [10:43] Twelve-60 has joined the channel [10:43] shimondoodkin: you should assert equals [10:43] shimondoodkin: or give array to length [10:46] JKarsrud: oh right [10:47] shimondoodkin: JKarsrud: you should go eat something/refresh yourself [10:47] JKarsrud: orly? [10:47] JKarsrud: :P [10:47] shimondoodkin: :P [10:47] JKarsrud: but yes, good idea, I feel stupid for not seeing that one :( [10:48] odie5533: Is there a Node.js CMS out there, or something with user authentication or templating I could build off of? [10:48] snu: odie5533: http://nodejs.org/docs/v0.4.9/api/appendix_1.html see express and connect [10:49] JKarsrud: odie5533: I'm working with express right now, and it works like a charm [10:49] JKarsrud: :) [10:49] JKarsrud: though it's not a cms, you can definitely speed up your developing time when using it :) [10:49] JKarsrud: Off to take a shower [10:50] hybsch has joined the channel [10:51] shimondoodkin: ther eis a cms but i am not sure of its quality http://calip.so/?utm_source=nodejs&utm_medium=github&utm_campaign=nodejs [10:53] adrianmg has joined the channel [10:53] adrianmg has left the channel [10:54] odie5533: snu: Thanks, looks like what I was looking for. [10:56] sethetter has joined the channel [11:00] markwubben has joined the channel [11:04] thalll has joined the channel [11:05] herbySk has joined the channel [11:06] shimondoodkin: odie5533: have you found something with users mvc already built? [11:07] petrjanda has joined the channel [11:08] stephank has joined the channel [11:09] bogomips2_ has joined the channel [11:11] JKarsrud has joined the channel [11:17] junkee[] has joined the channel [11:23] JKarsrud: which db would you guys recommend? [11:26] Bwen: depends of the use ... [11:26] Bwen: I havent really checked/tested the libs out there for DBs much though [11:26] JKarsrud: needs relations. found node-db that has bindings for drizzle and mysql [11:27] JKarsrud: I don't feel like using mysql tho, and haven't really heard much about drizzle before [11:29] topaxi has joined the channel [11:29] snu: drizzle is based on mysql [11:30] JKarsrud: ah, ok [11:31] JKarsrud: I have been wanting to look at mongodb, but that's document based if I remember correctly [11:32] sethetter has joined the channel [11:36] RC1140: does anyone know if its possible to use socket.io as a client from a seperate node.js app [11:37] RC1140: or am i doing something wrong [11:37] gavin_huang has joined the channel [11:38] snu: RC1140: hmm... why do you want to do that? ;) [11:39] Fredderf has joined the channel [11:41] RC1140: i have 2 node apps that are on separate , i need tome to talk to each other easily [11:41] sethetter has joined the channel [11:41] RC1140: since i already have socket.io in place on one of the apps i was hoping to continue using that [11:44] jborst has joined the channel [11:46] dexter_e has joined the channel [11:48] Mrfloyd has joined the channel [11:48] tayy has joined the channel [11:49] maru_cc has joined the channel [11:51] tahu has joined the channel [11:52] herbySk has joined the channel [11:52] pt_tr has joined the channel [11:52] rauchg has joined the channel [11:53] pen has joined the channel [11:57] snu: RC1140: why not just use normal HTTP? [11:58] snu: i mean, socket.io is to work around the patchy support for websockets/long polling/etc [11:58] `3E|LUNCH: what you are looking for is IPC [11:58] `3E|LUNCH: Inter process communication [11:58] `3E|LUNCH: allowing 2 or more nodes to communicate with each other [11:59] RC1140: `3E|LUNCH, thanks i checked around more and came across the same thing [12:00] sjbreen has joined the channel [12:08] felixge has joined the channel [12:08] Skola: At the risk of sounding like a hobo, could someone send me an invite for Google+? [12:11] Bonuspunk: isnt it open already? [12:11] Skola: is it now? hm [12:12] Skola: it says it's still in "limited Field trial" [12:12] JKarsrud: yeah, they have shut down their invite app for now I think [12:12] JKarsrud: overwhelmed by the response [12:12] JKarsrud: atleast that's what they said in there yesterday [12:12] Skola: yes, that seems to be the case [12:15] jonmaim has joined the channel [12:16] apoc has joined the channel [12:22] odie5533: Do most Node.js programmers use vim? [12:22] Skola: a lot do [12:22] JKarsrud: I use an IDE called webstorm on my mac [12:22] Skola: & textmade & emacs & Sublime Text [12:22] Skola: textmate even [12:22] JKarsrud: but for quick edits I use textmate [12:23] ceej has joined the channel [12:27] sethetter: I like vim a lot, but I'm not pro enough with it yet to be more productive than I am in TextMate [12:27] weezle has joined the channel [12:28] JKarsrud: having some issues setting up mongodb in node with express, can anyone point me to some good guide as to how to get it up and running? [12:29] tayy has joined the channel [12:30] sethetter: http://dailyjs.com/2010/11/08/node-tutorial-2/ [12:30] sethetter: JKarsrud: that covers the basic setup, and the tutorial series continues for more example as well [12:31] JKarsrud: thanks! :) [12:31] sethetter: np :) [12:35] shachaf has joined the channel [12:35] perlmonkey2 has joined the channel [12:36] Skola: sethetter http://vimeo.com/user1690209/videos [12:37] odie5533: so many videos, not sure which one to start with [12:37] simenbrekken has joined the channel [12:38] Skola: start at 1 [12:38] Skola: :p [12:39] Skola: http://www.derekwyatt.org/vim/vim-tutorial-videos/ [12:39] jvduf has joined the channel [12:39] Skola: start @ Novice (obviously), and follow long [12:40] odie5533: ah, didnt see his site with the order listing [12:40] dexter_e has joined the channel [12:41] Skola: makes sense [12:41] Skola: they're quite nice [12:42] sethetter: That's awesome thanks a ton [12:44] Skola: no problemos, good luck [12:45] azeroth__ has joined the channel [12:46] Druide_ has joined the channel [12:50] bnoordhuis has joined the channel [12:52] tayy has joined the channel [12:53] stagas_ has joined the channel [12:53] zeade has joined the channel [12:55] Aaron has joined the channel [12:59] hereicode has joined the channel [12:59] adambeynon has joined the channel [12:59] luke` has joined the channel [12:59] hereicode: in this presentation: http://marcorogers.com/nodeconf-2011/node_addons_presentation.html there is a mention of node_g for debugging addons, does anyone know where i can find that utility? [13:00] awenkhh has joined the channel [13:04] sounko has joined the channel [13:07] micrypt has joined the channel [13:07] pt_tr has joined the channel [13:08] bnoordhuis: hereicode: `./configure --debug && make` builds node_g [13:08] hereicode: thanks! [13:13] pickels has joined the channel [13:13] jonmaim has joined the channel [13:15] bbrandon has joined the channel [13:16] CStumph has joined the channel [13:19] TomY has joined the channel [13:20] jonmaim has joined the channel [13:22] gorakhargosh has joined the channel [13:25] jslatts has joined the channel [13:25] CodyGray has joined the channel [13:27] CodyGray has left the channel [13:32] temp01 has joined the channel [13:34] mapleman has joined the channel [13:35] tayy has joined the channel [13:37] jslatts has joined the channel [13:39] jelveh has joined the channel [13:41] mekwall: usign express+jade and trying to pass a variable to both the layout and page - but can only get it to work in the layout. any ideas? [13:41] rfay has joined the channel [13:41] dexter_e: if I run a HelloWorld node script on port 8000 should it just be publicly accessible via the ip? 23.24.26.27:8000 should work? [13:42] onr: dexter_e: try via anonymouse [13:42] dexter_e: anonymouse? [13:43] mange has joined the channel [13:43] mekwall: dexter_e: if not bound to a specific ip it will be bound to all ips [13:43] onr: anonymouse.org [13:44] mekwall: dexter_e: so yes, it will be accessible from your public ip as well [13:44] jvduf has joined the channel [13:44] dexter_e: so when I run it on a fresh Ubuntu install on port 7999 I simply cannot acccess it via IP [13:44] mekwall: .listen(port, ip) [13:45] JKarsrud: mekwall: in the object you pass to jade, have you by any chance put the variable inside locals: {} ? [13:45] dipser has joined the channel [13:45] mekwall: JKarsrud: no :) [13:45] kbni has joined the channel [13:46] JKarsrud: hmm [13:46] JKarsrud: weird [13:46] dexter_e: mekwall: Thanks a million! that did it [13:46] dexter_e: I was passing "127.0.0.1" and I just passed in "0.0.0.0" Now its visible from outside [13:48] jvduf_ has joined the channel [13:48] mekwall: dexter_e: :) [13:49] bwinton has joined the channel [13:49] dexter_e: Is it weird to run a server totally stripped with only Node on port:80 ? [13:50] igl1: yes [13:50] igl1: ^^ [13:50] dexter_e: why? [13:50] ph^ has joined the channel [13:51] hogeo has joined the channel [13:51] MooGoo: is it really weird? [13:51] MooGoo: or just uncommon [13:51] dexter_e: I just want a barebones simple setup with not many moving parts. [13:51] igl: i guess in the age of the cloud its not that weird anymore [13:52] muk_mb has joined the channel [13:52] dexter_e: Whats wrong with an empty box with node front and center on port:80 ? [13:52] muk_mb: hey guys [13:52] MooGoo: computers generaly don't have too many moving parts [13:52] dexter_e: I mean conceptual moving parts [13:52] admc has joined the channel [13:52] MooGoo: well....you still need stuff like an operating system [13:53] dexter_e: right, barebones Ubuntu + Node on port:80 [13:53] igl: its fine dexter [13:53] dexter_e: :) [13:53] MooGoo: go for it [13:53] Prometheus: what would it do? [13:53] MooGoo: but I still wouldnt call node a decent replacement for apache [13:53] Prometheus: just serve a website? [13:54] dexter_e: it will be a cms server [13:54] Prometheus: there's probably going to be static media? [13:54] dexter_e: some static media [13:54] materialdesigner has joined the channel [13:54] dexter_e: plus alot of stuff thats partials injected with json from couchdb [13:54] Prometheus: why not throw nginx in front (on port 80)? [13:55] MooGoo: yea use a real webserver [13:55] igl: dexter_e: keep in mind node is not even 1.0 yet, nobody recommends it [13:55] dexter_e: hmm [13:55] MooGoo: node can still do work for the webserver [13:55] tshpaper has joined the channel [13:56] dexter_e: good point [13:56] igl: can you proxy node thru nginx and not loose http1.1? [13:57] dexter_e: I dont know :o [13:57] gozala has joined the channel [13:58] Prometheus: don't think so [13:58] MooGoo: just to be sure...I've bee using node .5 for awhile now and it's been perfectly stable [13:59] MooGoo: just some modules I've used, such as sqlite modules seem to have problems [13:59] Prometheus: MooGoo: doesn't mean it should take care of serving static media when a far better solution exists =) [13:59] MooGoo: no it shouldnt [13:59] dexter_e: What about use Node as proxy to Nginx ala--> http://eastmond.org/blog/?p=45 [13:59] MooGoo: there's a great deal of boiler plate code to get node to work anything like apache + mod_php (or mod_anything) [14:00] mrsrikanth has joined the channel [14:00] MooGoo: especily for serving up static files [14:00] dexter_e: How are you guys setup? haproxy ? [14:01] dexter_e: nginx as proxy ? [14:04] Fodi69 has joined the channel [14:04] bnoordhuis: igl: no, nginx's proxy module only supports http/1.0 :-/ [14:05] igl: meh [14:05] bnoordhuis: dexter_e: use an iptables redirect rule that maps port 80 to e.g. 8000 [14:05] dwiash has joined the channel [14:06] igl: dexter_e: using agian node as front kinda defeats the purpose of using nginx at all :) [14:06] odie5533: What server distro does everyone use for node.js? :S [14:06] pdonald`: igl: yes http://www.letseehere.com/reverse-proxy-web-sockets [14:06] dexter_e: I'm on Ubuntu 10.10 [14:07] igl: thx for the link [14:07] igl: odie5533: ubuntu aswell [14:08] odie5533: 10.10? [14:08] odie5533: or 10.04? [14:08] MattJ has joined the channel [14:08] odie5533: wow when ubuntu says LTS they really mean it. 2015... [14:08] igl: hmm *checks cloud panel* :p [14:09] igl: 10.04 [14:10] JoshC1 has joined the channel [14:10] bnoordhuis: odie5533: if you want longevity -> RHEL + extended support [14:11] odie5533: 10 years. [14:11] SoreGums has joined the channel [14:11] bnoordhuis: yep [14:11] odie5533: not sure how any technology can claim anything for 10 years [14:11] bnoordhuis: there are people still running 2.6.11 kernels [14:11] perlmonkey2 has joined the channel [14:12] odie5533: I still run 2.4 [14:12] odie5533: on my wireless router :) [14:12] bnoordhuis: hah, i was just going to say that :) [14:12] CStumph has joined the channel [14:13] justicefries has joined the channel [14:14] marcello3d has joined the channel [14:14] akshatj has joined the channel [14:15] dexter_e: I'm just after a super simple setup.. Like couchapps via couchdb for example. [14:16] hij1nx has joined the channel [14:18] dexter_e: Whats the most recommended tool for keeping Node UP in production? [14:18] dexter_e: Like restarting it when it crashes etc. [14:19] Prometheus: there's a wide range of options for that [14:19] Prometheus: I'd probably go with upstart and monit =) [14:20] dexter_e: Is that what you use now ? [14:20] Prometheus: no, not at the moment [14:20] Prometheus: but should use those =) [14:21] Prometheus: (I have nothing in production, so I don't need anything right now) ;) [14:21] dexter_e: Right on. Monit looked a little intimidating [14:21] dexter_e: It looks like beards only territory [14:22] Prometheus: looks pretty simple to me =) [14:22] igl: if you want something quick and dirty, there is node-dev [14:22] Prometheus: you probably don't want quick and dirty in production [14:22] kbni has joined the channel [14:22] Prometheus: quick and dirty has a tendency to fall over =P [14:23] Prometheus: dexter_e: otoh, there seems to be quite a bit written about monit+upstart for node [14:23] igl: ^^ [14:23] micrypt_ has joined the channel [14:23] Prometheus: "node upstart" came with a bunch of results that also use monit [14:25] Prometheus: dexter_e: and to be honest, the configs for monit look almost like plain english [14:25] Prometheus: so I don't know what could be much easier than that =) [14:25] dexter_e: You're right I'm digging deeper. Thanks! [14:27] djcoin has joined the channel [14:27] sethetter has joined the channel [14:34] odie5533: What OS does the typical Node developer use? I've only seen people using Macbooks so far :s [14:34] `3rdEden: Mac or linux [14:35] Prometheus: anything other than windows =P [14:35] odie5533: :< [14:35] Prometheus: (you can run linux using virtualbox) [14:35] `3rdEden: I tripple boot on my mac [14:35] odie5533: I am installing ubuntu in VMWare right now [14:35] Prometheus: atta boy =) [14:35] `3rdEden: Mac OSX by default, and than windows 7 + unbuntu [14:36] Prometheus: `3rdEden: I just run other stuff inside Vagrant =) [14:36] Prometheus: and Fusion if it's windows.. [14:36] Prometheus: err, w/ Vagrant, inside VirtualBox =) [14:36] Yoric has joined the channel [14:36] `3rdEden: vm's alway suck up allot of memory [14:37] Prometheus: yeah, but it's kind of nice to have best of both worlds [14:37] Prometheus: develop/test on what you deploy to [14:37] Prometheus: while still doing it from behind a pretty GUI (I know not everyone would agree, but..) [14:39] necrodearia has joined the channel [14:40] dexter_e: Is there a global runtime exception handler capability in node? [14:40] igl: haha [14:41] dexter_e: Do we HAVE to kill the process by any runtime error? [14:41] chjj: dexter_e: process.on('uncaughtException', ...) [14:41] broofa has joined the channel [14:41] vid_ has joined the channel [14:41] justicefries: side question. anyone doing their node work on an 11" air? [14:42] dexter_e: chjj: thanks [14:42] Sorella has joined the channel [14:44] CStumph has joined the channel [14:47] chjj: dexter_e: i should also mention, ideally you shouldnt have to use that, but mistakes do happen, its best to write it to stderr and log all output so you can fix it later [14:47] dexter_e: whoa. good idea [14:49] mekwall: anyone using mongoose? I'm having trouble adding embedded documents to an already existing document [14:50] mekwall: getting conflicting update error [14:50] Prometheus: justicefries: I'm not, but why do you ask? [14:50] justicefries: just seeing how people like it. [14:50] Prometheus: from previous MBA experience, I can't really recommend it as a dev machine =) [14:50] Prometheus: perhaps apple has worked out most/all kinks the previous gen had [14:51] Prometheus: I do know someone who uses it for node development (among other things) though [14:51] justicefries: nice. [14:51] Prometheus: but he's not the norm anyhow =P [14:51] justicefries: nope. [14:51] Prometheus: he's a little.. impulsive when it comes to gadgets [14:53] shinuza has joined the channel [14:53] JKarsrud: anyone know why this would happen when using mongodb? TypeError: Cannot read property 'options' of undefined [14:54] tobiassjosten has joined the channel [14:54] m00p has joined the channel [14:54] JKarsrud: full stack trace: http://pastie.org/2158440 [14:56] dexter_e: JKarsrud: maybe an empty result returned by DB? [14:59] havenn has joined the channel [14:59] mapleman has joined the channel [15:00] adammw111 has joined the channel [15:02] leahculver has joined the channel [15:03] smtlaissezfaire has joined the channel [15:07] MattJ has joined the channel [15:08] Charuru has joined the channel [15:08] AAA_awright has joined the channel [15:09] Renegade001 has joined the channel [15:12] Prism has joined the channel [15:13] StephenFalken has joined the channel [15:13] brianseeders has joined the channel [15:13] kersny_ has joined the channel [15:14] StephenFalken has joined the channel [15:16] StephenFalken has joined the channel [15:17] Bj_o_rn has joined the channel [15:17] Bj_o_rn has left the channel [15:18] mrmanager has joined the channel [15:21] perlmonkey2 has joined the channel [15:21] odie5533: I am installing Node.js. Can someone explain what `git checkout origin/v0.4` does? [15:22] snu: man git [15:22] muk_mb: odie5533: that specifically grabs the 0.4 branch of node.js sourcecode [15:22] odie5533: Would that be version 0.4.9? [15:23] snu: it would be the latest code from that branch [15:24] snu: which is probalby later than 0.4.9 [15:26] Zelest has joined the channel [15:26] Zelest has joined the channel [15:28] _janne has joined the channel [15:30] apa- has joined the channel [15:30] marlun has joined the channel [15:30] marlun has joined the channel [15:31] Vertice_ has joined the channel [15:31] Vertice_ has joined the channel [15:32] jbpros has joined the channel [15:32] Aiden_ has joined the channel [15:34] mraleph has joined the channel [15:35] JKarsrud has joined the channel [15:35] thalll has joined the channel [15:35] Spion_ has joined the channel [15:37] Aaron has joined the channel [15:37] mange has joined the channel [15:39] justicefries has joined the channel [15:40] epopt37 has joined the channel [15:42] mraleph has joined the channel [15:43] Validatorian has joined the channel [15:49] Validatorian: Anyone have a suggestion for how I can get a public websocket stream, pass it to socket.io locally, so it will use longpolling, flash, etc for older clients, thus making a websocket stream cross-browser? [15:51] `3rdEden: Validatorian create a websocket server inside node [15:51] `3rdEden: and emit messages to socket.io? [15:51] `3rdEden: when you receive one [15:53] hunterloftis has joined the channel [15:54] hunterloftis: With backbone.js, is anyone familiar with a technique to catch unmatched routes? [15:54] _iori_ has joined the channel [15:54] Validatorian: is there somehting available already for accepting a websocket stream in node? i thought socket.io only sent, not received, a websocket stream [15:55] hunterloftis: Validatorian: Websockets are bidirectional [15:55] _iori_ has joined the channel [15:57] al3xnull has joined the channel [15:58] chjj: Validatorian: theres two socket.io repo's one for the server, one for the client [15:58] Validatorian: aha, thank you, chjj [16:05] iori has joined the channel [16:06] _iori_ has joined the channel [16:06] hunterloftis has left the channel [16:07] maushu has joined the channel [16:09] Xano has joined the channel [16:09] maushu has joined the channel [16:10] patrikkarlin has joined the channel [16:10] mange has joined the channel [16:12] jga023 has joined the channel [16:13] sfragis has joined the channel [16:13] maushu_ has joined the channel [16:14] mcutler has joined the channel [16:14] logii has joined the channel [16:14] logii: how do I solve: UNMET DEPENDENCY socket.io * [16:15] carpeliam has joined the channel [16:15] mandric has joined the channel [16:18] yozgrahame has joined the channel [16:21] AvianFlu has joined the channel [16:24] igl: logii: install the missing dependency [16:25] logii: igl: thanks, i'm quite a dummy i guess [16:25] igl: npm install -d [16:26] pig has joined the channel [16:26] rfvizarra has joined the channel [16:26] jakehow has joined the channel [16:27] apejens has joined the channel [16:27] jtsnow has joined the channel [16:30] rajivn has joined the channel [16:31] pig has joined the channel [16:35] dall has joined the channel [16:35] dall: hi friends [16:38] justicefries has joined the channel [16:39] _iori_ has joined the channel [16:39] quackquack has joined the channel [16:40] itwars has joined the channel [16:42] rajivn has joined the channel [16:43] iori has joined the channel [16:45] iori has joined the channel [16:46] d0k has joined the channel [16:46] Locke23rus has joined the channel [16:47] pig has joined the channel [16:51] matt4447 has joined the channel [16:52] pig has joined the channel [16:52] pHcF has joined the channel [16:54] jzacsh has joined the channel [16:54] jzacsh has joined the channel [16:55] dans has joined the channel [16:56] clifton has joined the channel [16:58] smtlaissezfaire has joined the channel [16:59] dans: I could use some debugging help https://github.com/danielstockton/nodejs-auth-example [16:59] dans: I fill in details on the new user page and click submit, and it just hangs as though a page is loading [16:59] dans: nothing in js console [16:59] samBiotic has joined the channel [16:59] AAA_awright has joined the channel [17:00] blueadept has joined the channel [17:00] jbpros has joined the channel [17:01] dall: app.use(express.staticProvider(__dirname + '/public')); [17:01] dall: TypeError: Object # has no method 'staticProvider' [17:01] dall: �_� [17:02] hij1nx has joined the channel [17:02] rajivn: dall: Isn't it just "express.static"? [17:03] dall: rajivn, really? ops...i found a tutorial with this info... [17:03] dall: i try [17:04] dans: can anyone give me any tips on debugging the above problem [17:04] rajivn: dall: http://expressjs.com/guide.html#configuration [17:04] dall: rajivn, yes perfect, thank you! [17:04] rajivn: dall: you are welcome [17:05] __tosh has joined the channel [17:07] sethetter has joined the channel [17:07] steffan has joined the channel [17:08] bbttxu has joined the channel [17:09] iori has joined the channel [17:09] sjbreen` has joined the channel [17:11] jtsnow has joined the channel [17:11] Druide_ has joined the channel [17:11] sjbreen`` has joined the channel [17:13] iori has joined the channel [17:14] dans: I could use some debugging help https://github.com/danielstockton/nodejs-auth-example [17:14] dans: I fill in details on the new user page and click submit, and it just hangs as though a page is loading [17:14] dans: can anyone give me any tips on debugging? [17:14] hereicode has joined the channel [17:15] jbpros has joined the channel [17:15] dall: rajivn, i get a strange error: http://pastebin.com/dEqZqvTz [17:16] dall: i have app.set('view engine', 'ejs'); [17:16] dall: i have a layout.ejs [17:16] dall: what this error could be? [17:16] Prism has joined the channel [17:19] rajivn: dall: no idea. It seems like it could be a middleware causing this. Which of your middleware might use "IncomingMessage"? [17:19] jetienne: anybody how to press ~ or \ on a macbook ? [17:19] dall: rajivn, no, [17:19] wao: jetienne: shift + key left to z [17:20] wao: jetienne: and \ is on bottom row left to enter [17:20] wao: *at [17:20] bnoordhuis: any people here who've recently had that "�SSL_COMP_get_compression_methods� was not declared in this scope" build error? [17:20] unomi has joined the channel [17:20] jetienne: wao: ok thanks [17:22] foober has joined the channel [17:23] level09 has joined the channel [17:24] foober: Hi All, [17:25] foober: Can anyone point me at a FAQ regarding passing parameters to event callbacks? When an http request timeout on my server, and the client cuts the connection, I'd like to be able to pass an identifier to the event so that I can do something intelligent on the server. [17:26] foober: like this: req.on('end',endchild,parm1, parm2...) [17:27] dall: rajivn, OMG....i found the problem [17:28] dall: i wrote........ express.router instead of app.router [17:28] dall: now it works [17:28] AAA_awright has joined the channel [17:29] rajivn: dall: cool. glad you fixed it. [17:29] iori has joined the channel [17:29] FireFly|n900 has joined the channel [17:30] hereicode has joined the channel [17:31] stepheneb has joined the channel [17:32] zemanel has joined the channel [17:35] devrim has joined the channel [17:35] devrim has joined the channel [17:36] marcello3d has joined the channel [17:37] devrim: hi guys - are mongoose connections persistent by default, or is there an option to do that that i fail to see ? [17:41] Me1000 has joined the channel [17:43] devrim has joined the channel [17:43] towski has joined the channel [17:45] saschagehlich has joined the channel [17:46] bogomips2__ has joined the channel [17:47] ryanmcgrath has joined the channel [17:47] iori has joined the channel [17:49] CIA-110: node: 03Ryan Dahl 07master * r44d30f2 10/ src/node.js : [17:49] CIA-110: node: Fix require with --eval [17:49] CIA-110: node: Caused by bad merging of d6ec8f [17:49] CIA-110: node: Fixes #1261. - http://bit.ly/k8Bnia [17:50] hereicode: is there a node addon that uses qt bindings? [17:51] ryah has joined the channel [17:52] foober: anyone know the event message sent when an HTTP client times out on a connection? [17:54] ryah: foober: "socket hang up" [17:54] foober: Cheers ryah! [17:57] piscisaureus has joined the channel [17:57] dgathright has joined the channel [17:58] logii: i am not getting any client connection prompt via socket.io, is there anyway i can debug this? [17:58] Me1000 has joined the channel [18:00] iori has joined the channel [18:02] smtlaissezfaire has joined the channel [18:03] jvduf has joined the channel [18:03] Aiden has joined the channel [18:04] tomtomaso has joined the channel [18:05] tom-tomaso has joined the channel [18:05] darshanshankar has joined the channel [18:05] CIA-110: node: 03Ryan Dahl 07master * r6d8b43c 10/ (lib/http.js test/simple/test-regress-GH-877.js): [18:05] CIA-110: node: http: Fix agent id creation [18:05] CIA-110: node: Unbreaks test-regress-GH-877.js - http://bit.ly/jrTxPl [18:06] Chani: what's the best way to grab the filename off the end of an absolute path? some stuff with lastIndexOf() or a regex? [18:06] Chani: hmm. probably lastIndexOf. [18:06] tbranyen: Chani: filename.split('.').pop() ? [18:07] tbranyen: oh the filename [18:07] tbranyen: path.split('/').pop() ? [18:07] igl: Chani: require("path").basename [18:08] igl: or [^\/?*:;{}\\]+\.[^\/?*:;{}\\]{1,4}$ [18:08] tbranyen: igl: basename does way more [18:09] tbranyen: like why bother with regexes [18:09] igl: :) [18:09] tbranyen: when that simple split/pop does the same thing [18:09] tbranyen: and most likely less error prone [18:10] Chani: tbranyen: yeah. except it seems like even split is more work than the computer needs to do.. [18:10] tbranyen: compared to a regex? no way [18:10] Chani: why does javascript's String have slice(), subStr() *and* subString()? [18:11] tbranyen: substr is nonstandard its just there for legacy reasons that date back to browser wars [18:11] Chani: tbranyen: compared to substring(lasIndexOf(whatever) [18:11] tbranyen: Chani: thats way less readable, but sure that'd worked too [18:11] Chani: hmm. point. [18:11] dans: can someone tell me if i need an exports or something in my users model? https://github.com/danielstockton/nodejs-auth-example [18:12] dans: like in https://github.com/alexyoung/nodepad/blob/2b8e083a889e3d7b32a81e04689385101e0780f9/models.js [18:13] igl: Oo [18:13] jakehow has joined the channel [18:15] iori has joined the channel [18:17] AAA_awright_ has joined the channel [18:17] jesswa has joined the channel [18:19] googol has joined the channel [18:19] towski has joined the channel [18:19] leahculver has joined the channel [18:19] leahculver has joined the channel [18:22] t|f has joined the channel [18:23] aliem has joined the channel [18:24] c4milo has joined the channel [18:25] t|f: Afternoon all. Anyone have the time for a socket.io question... I am trying to connect to a socket.io server from within a Node app and can't find a client. Is there a socket.io npm package that has a client usable from Node? [18:26] jbergstroem: ryah: did arlolra contact you regarding the upload exception @ buildbots? i talked to him on github [18:27] Bwen: t|f: try #socket.io :) [18:27] CIA-110: node: 03koichik 07v0.4 * r432d549 10/ doc/api/modules.markdown : [18:27] CIA-110: node: Remove duplicate section in modules.markdown [18:27] CIA-110: node: Fixes #1263 - http://bit.ly/iCwnCo [18:27] CIA-110: node: 03koichik 07v0.4 * r38a0145 10/ tools/doctool/markdown.js : [18:27] CIA-110: node: Fix doctool uses RegExp object as a Function [18:27] CIA-110: node: RegExp object is no longer Function. [18:27] CIA-110: node: http://code.google.com/p/v8/issues/detail?id=617 [18:27] CIA-110: node: Fixes #1262. - http://bit.ly/k5O35y [18:28] t|f: Bwen, ty I did not realize they had a room. [18:28] avalanche123 has joined the channel [18:28] gazumps has joined the channel [18:28] ghost has joined the channel [18:32] aliemmo has joined the channel [18:32] lor__ has joined the channel [18:36] sfragis has joined the channel [18:37] Ramosa has joined the channel [18:40] boogyman has joined the channel [18:41] fdenbow has joined the channel [18:43] admc has joined the channel [18:43] jetienne_ has joined the channel [18:46] clifton has joined the channel [18:47] Chani: ACTION is confused [18:47] Chani: TypeError: Bad argument at Object.fsync (fs.js:348:11) [18:48] Chani: I was using fsync just fine... [18:48] socketio\test\69 has joined the channel [18:48] Chani: in my real program, fs.fsync(fd, function(){... works [18:48] davidvanleeuwen has joined the channel [18:48] socketio\test\71 has joined the channel [18:49] Chani: in a little test script, fs.fsync(myWriteStream.fd, function(){... works [18:49] Chani: but in my real program, I get that error when trying to fsync a write stream [18:49] Chani: and I don't even understand the error :/ [18:50] hij1nx has joined the channel [18:51] kriskowal has joined the channel [18:52] bronson has joined the channel [18:53] dans: can people give me some example node applications, especially those that have authentication and use mongoose [18:53] Chani: fs.js:348 binding.fsync(fd, callback || noop); [18:53] Chani: ^^ seriously, how the crap can that go wrong? [18:53] admc has joined the channel [18:54] asabil has joined the channel [18:54] seawise has joined the channel [18:55] jesswa1 has joined the channel [18:56] FireFly|n900 has joined the channel [18:56] chrisdickinson: Chani: what's the error look like? [18:56] avalanche123 has joined the channel [18:57] Chani: chrisdickinson: 11:47 < Chani> TypeError: Bad argument at Object.fsync (fs.js:348:11) [18:57] chrisdickinson: huh. weird! [18:57] Chani: weird indeed. [18:58] chrisdickinson: and `fd` is a valid file handle? [18:58] Chani: if it wasn't, I would get EBADF [18:58] Mrfloyd has joined the channel [18:58] Chani: not a crash [18:59] sub_pop has joined the channel [19:00] jetienne__ has joined the channel [19:00] Chani: problem #2: why is it that when I run two clients simultaneously, only one can connect to the server? the other gets ECONNREFUSED? are they using the same source port? how do I make them not do that? [19:01] Chani: hmm, at least I know my client won't be used in marking... but it does make it kinda hard to run tests [19:01] onr has left the channel [19:01] piscisaureus_ has joined the channel [19:02] niftylettuce has joined the channel [19:02] Chani: but this TypeError thing is a real problem. [19:03] cjm has joined the channel [19:05] dgathright has joined the channel [19:05] FireFly|n900 has joined the channel [19:06] patcito has joined the channel [19:09] skript_ has joined the channel [19:10] jesusabdullah: Anybody in here good with npm? I suspect that I have a broken library somewhere, and I want to be able to figure out where it might be [19:10] shinuza has joined the channel [19:11] espressive_ has joined the channel [19:11] espressive_: Hi there everyone [19:11] Yoric has joined the channel [19:11] Chani: glargh [19:11] espressive_: I need to compile node with openssl support, is there a guide somewhere on how to do this? [19:11] Chani: I can't crash fsync in a test. [19:11] Chani: only in my real program. [19:12] espressive_: I do have the openssl-dev package installed and ./configure does pick it up [19:12] Chani: what does the error even mean? [19:12] Chani: how can the fsync function itself be a bad argument? [19:13] dans: can people give me some example node applications, especially those that have authentication and use mongoose [19:15] Chani: that same fsync call does *not* crash, and does return EBADF, if I send it 9 instead of backup.fd [19:15] Chani: weiird. [19:15] rajivn: dans: Have you looked at mongoose-auth? http://github.com/bnoguchi/mongoose-auth [19:18] dans: rajivn: no I haven't, I'm trying to write my own auth strategy [19:18] Chani: aha. [19:18] Chani: the fd is null [19:18] Chani: now, the question is, why the FUCK does my writestream have a null fd? [19:19] Chani: I... must have missed an error somewhere. [19:19] Chani: and I et I know what it is :) [19:19] bnoordhuis: espressive_: what problem are running into specifically? [19:20] dans: https://github.com/danielstockton/nodejs-auth-example it's just stalling when i try and create a new user, in the app.post('/user', route [19:20] espressive_: Here is the error bnoordhuis [19:20] espressive_: node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: node.js not compiled with openssl crypto support. at tls.js:42:9 at NativeModule.compile (node.js:439:5) at node.js:407:18 at https.js:22:11 at NativeModule.compile (node.js:439:5) at Function.require (node.js:407:18) at Function._load (module.js:281:25) at require (module.js:346:19) at Ob [19:20] dans: im not getting any errors, not sure how i can debug it [19:20] phiggins has left the channel [19:20] Chani: and the lesson is, write functions for EVERY possible error event ever. [19:20] CIA-110: node: 03koichik 07master * r3e2abd1 10/ lib/util.js : [19:20] CIA-110: node: Fixes #1260 [19:20] CIA-110: node: RegExp object is no longer Function. [19:20] CIA-110: node: http://code.google.com/p/v8/issues/detail?id=617 - http://bit.ly/la8N8c [19:20] Chani: ACTION was only checking hte readstream for errors, not the writestream [19:20] espressive_: So, I installed openssl-dev, ran ./configure and then make and make install but still get the same error [19:21] bnoordhuis: espressive_: can you gist or pastie the output of ./configure? [19:21] espressive_: will do [19:21] espressive_: hold on a sec [19:23] espressive_: https://gist.github.com/1062519 [19:23] rhdoenges: /whois CIA-110 [19:24] darshanshankar has joined the channel [19:24] insin has joined the channel [19:25] bnoordhuis: espressive_: you probably need to tell where the openssl headers and library can be found: ./configure --openssl-includes=/path/to/headers --openssl-libpath=/path/to/lib [19:25] bnoordhuis: tell the configure script, that is [19:25] espressive_: ah ok [19:26] espressive_: let me try that [19:26] espressive_: thanks Ben [19:29] jvduf has joined the channel [19:30] fermion has joined the channel [19:32] dans: can anyone immediately see why my app seems to hang loading this route without any error: https://gist.github.com/1062528 [19:33] rajivn: dans: I'll try to take a look at it in a bit. [19:34] kblake has joined the channel [19:36] slickplaid: dans, do you have the bodyParser() middleware being used? [19:37] GammaNu has joined the channel [19:37] GammaNu: hi [19:37] zemanel has joined the channel [19:38] blup has joined the channel [19:38] dans: thanks rajivn [19:38] dans: slickplaid: yes, i do [19:38] mendel_: dans: return UserSaveFailed is correct? that's not returning anything.. or am I a newb [19:39] jesswa1 has left the channel [19:39] GammaNu: i woold like to install node.js on archlinux but # yaourt -S nodejs-npm-git halt on error [19:39] dans: erm, i think i just didnt include that code mendel_ [19:39] mendel_: you did [19:39] mendel_: it's in the gist [19:39] BulletBob has joined the channel [19:40] dans: aaaah mendel_, that could be it [19:40] hellp has joined the channel [19:40] dans: im not sure if it's correct, but i've copied a lot from https://github.com/alexyoung/nodepad/blob/master/app.js [19:41] vid___ has joined the channel [19:43] Chani: hmm. I want to use pipe, but that uses streams, which are async, and I'm in my syncronous recover-from-crash function. suggestions? [19:44] rajivn: dans: I don't get a stall. The account can't be created though. FYI, I cloned nodejs-auth-example from github [19:45] cafesofie has joined the channel [19:45] Chani: I suppose could rework the code so that the code after recovery is in a function.. or I could try to block somehow... [19:45] dans: rajivn: you get the error message? [19:45] marcello3d has joined the channel [19:45] omni5cience_ has joined the channel [19:46] dans: maybe stall was the wrong word [19:46] dans: the window looks like its loading for a long time, before page cannot be found [19:47] shinuza has joined the channel [19:47] 17SAAVF8R has joined the channel [19:48] rajivn: dans: For me I keep getting back to "register" view. The page loads almost instantly. [19:48] dans: i see, so the userSaveFailed is working [19:48] dans: i havent set up the flash messages in the layout [19:49] Chani: oh wait, what am I thinking? I should just use mv. [19:49] rajivn: dans: yup. I even added a console.log there and I do get the message printed on the console. [19:49] FIQ has joined the channel [19:49] FIQ has joined the channel [19:49] dans: do you have any suggestions on how to go about debugging this? [19:49] dans: let me try the console.log [19:50] rajivn: To me its seems like a problem with the user.save method. So maybe look more into the mongoose stuff? [19:51] bingomanatee has joined the channel [19:51] dans: yeah, its strange though....i dont get anything logge din the console inside userSaveFailed [19:51] dans: window just keeps trying to load [19:51] marcello3d: nice app... http://blog.pilotmoon.com/post/4041089648/scroll-reverser-get-in-practice-for-lion [19:51] bingomanatee: what is the best way to extract a series of integers from packed binary file data in node? [19:52] FIQ has joined the channel [19:52] marcello3d: bingomanatee: not sure about a best, they're adding support for that in v0.5.x I believe [19:52] rajivn: dans: when I console.log(err), I get a duplicate key error. Let me clean my db and then try again. [19:52] marcello3d: there are a few modules for it, but I haven't seen any I was crazy about [19:52] marcello3d: I did this: https://github.com/marcello3d/node-buffalo/blob/master/lib/bson.js#L271 [19:53] bingomanatee: Hey Marcello3D - the Mongo engineers were curious as to what efficiencies you got out of mongolian beefcake. [19:53] bingomanatee: you interested in talking to them? [19:54] marcello3d: dunno about efficiencies... I haven't done any profiling/benchmarking/optimization [19:54] marcello3d: I'm focusing on developer efficiency :) [19:55] marcello3d: bingo: but sure? which ones did you talk to? [19:55] mhauri has joined the channel [19:55] dans: thanks rajivn [19:56] rajivn: dans: cool, I got it working. [19:56] mattly has joined the channel [19:57] dans: rajivn: yeah? [19:57] rajivn: dans: first thing you need to do is pull "User" in app.js from mongoose. Don't export it in models/user.js [19:58] rajivn: dans: So after the db is connected to, do User = mongoose.model("User"); [19:58] rajivn: dans: Next in app.post('/user'), after if (err) check, do req.session.user = user; [19:58] dans: I have that line in my app.js [19:59] rajivn: dans: That should get you going. [19:59] dans: i need to define the model first from the schema, and then i can call it with mongoose.model("User") [19:59] dans: so did you move the exports line into app.js as well? [20:00] rajivn: dans: No, you don't need to export anything in the schema but you will need to "require" the file since the schema needs to be defined preferably before the db is connected to. [20:01] rajivn: dans: Let me send you a pull request. Give me 5 minutes. [20:02] devrim-node-irc- has joined the channel [20:02] TomY has joined the channel [20:03] dans: ok, thanks [20:03] dans: strange that you are at least getting the error though...and my page just keeps loading [20:04] igl1 has joined the channel [20:04] rajivn: dans: Are you running the app with "NODE_ENV=development node app.js". This will set the environment. [20:05] Validatorian has joined the channel [20:05] dans: no rajivn, i was just running node app.js [20:05] dans: is default production? [20:06] Validatorian: I can't seem to find the socket.io server module, just the client -- is it in npm? (this would be for capturing a websocket stream in node.js itself) [20:06] dans: i still get the problem in dev [20:07] leahculver has joined the channel [20:07] leahculver has joined the channel [20:07] rajivn: dans: Actually, I'm not sure but I like to be explicit anyways :) [20:08] steffan has joined the channel [20:08] `3rdEden: Validatorian npm install socket.io [20:09] phiggins has joined the channel [20:09] avalanche123 has joined the channel [20:09] onr has joined the channel [20:11] rajivn: dans: I sent you a pull request. Everything seems to be working for me. I kept the console.log statements in. I hope it helps you. [20:11] TechCel has joined the channel [20:12] Validatorian: hrm, everything I find seems to be about using socket.io to publish, not to receive an external stream from a ws: url [20:12] marcello3d: Validatorian: you want a server-side websocket client then? [20:13] dans: thanks a lot rajivn, im sure it will [20:13] Validatorian: yes [20:13] temp01 has joined the channel [20:13] marcello3d: I saw one once [20:13] marcello3d: https://github.com/pgriess/node-websocket-client [20:13] rajivn: dans: no problem. [20:13] marcello3d: from https://github.com/joyent/node/wiki/modules [20:13] oli_ has joined the channel [20:13] marcello3d: there are some others on that page, too [20:15] devrim-node-irc- has joined the channel [20:15] Validatorian: thank you [20:16] springify has joined the channel [20:17] seawise has joined the channel [20:17] devrim: (testing my node-irc server.. ) [20:19] kimico has joined the channel [20:19] mikeal has joined the channel [20:23] zackattack has joined the channel [20:26] MattJ has joined the channel [20:27] jacobolus has joined the channel [20:28] pt_tr has joined the channel [20:31] mkrecny has joined the channel [20:33] mkrecny: are y'all still using NVM - wondering if there's anything newer? [20:34] TomY has joined the channel [20:34] slickplaid: nave i believe is still around [20:35] slickplaid: not sure about newer [20:35] slickplaid: nvm is my tool of choice [20:35] vid_ has joined the channel [20:36] smtlaissezfaire has joined the channel [20:37] topaxi has joined the channel [20:37] dans: rajivn: it must be another problem for me, the page still attempts to load for ages before giving: Unable to load the web page because the server sent no data. [20:38] dans: nothing gets logged in the console [20:38] rajivn: dans: that's weird. Are you sure you have all the modules installed. [20:39] rajivn: dans: That would tell me that a middleware is hanging somewhere along the way. [20:39] skript_ has joined the channel [20:39] criswell has joined the channel [20:39] rajivn: dans: Maybe you can try turning off each middleware and see it that works? [20:40] rajivn: the main middleware that may affect this is bodyParser? [20:40] mange has joined the channel [20:40] dans: ok, ill try looking at that [20:42] FireFly|n900 has joined the channel [20:43] dans: the only modules im using are express and mongoose though [20:44] rajivn: dans: yeah, the modules may not be the problem since you would know this at app startup. [20:44] rajivn: very weird [20:44] dans: yeah :( [20:45] Renegade001 has joined the channel [20:45] dall has joined the channel [20:45] dall: hello [20:45] dans: hello [20:45] leahculver has joined the channel [20:45] leahculver has joined the channel [20:45] vid_ has joined the channel [20:46] dans: could it be my mongodb setup? [20:46] rajivn: what if you add a middleware to the route. We can try this. Turn off, bodyParser() and in app.post('/users'), add a middleware setting req.body.user to some object and then call next(). console.log inside the route and see if that message is printed? [20:47] bogomips2__ has joined the channel [20:47] rajivn: dans: if its a db problem you would know at app startup though. Is the [20:47] rajivn: "express" message being printed when you run node app.js [20:48] vid_ has joined the channel [20:49] hippich has joined the channel [20:49] hippich has joined the channel [20:50] steffan has joined the channel [20:53] dans: how would i set req.body.user to some object? [20:53] asabil has joined the channel [20:54] rajivn: dans: maybe just req.body.user = { email: 'xxx@xxx.com', 'password': 'hjhasdfh' } [20:54] rajivn: although, in the beginning just test if the route is called when you post. [20:55] rajivn: comment out the bodyParser() line and then inside app.post('/user') do console.log('I am here') as the first line. [20:56] dans: the route is called [20:56] dans: i dont even need to comment out bodyparser [20:56] dall: guys, express.static crashs the server [20:56] rajivn: thats good. I guess. [20:56] dall: :-O [20:56] dans: trying the req.body.user thing, i get req is not defined error [20:57] rajivn: Woh!!! req is not defined? that's strange [20:57] dans: 500 ReferenceError: req is not defined [20:57] dans: at testMiddle (/home/daniel/code/node/auth-example/app.js:54:3) [20:57] dall: ab -n 10000 -c 1000 http://127.0.0.1:3000/css/default.css ----> http://pastebin.com/LrXa9RyP [20:58] dall: how can a simple ab test crash the server ? [20:58] dall: ab shown ---> Total of 15 requests completed :-O [20:58] dall: could someone try it ? [21:00] rajivn: dans: Are you sending in req, res, next as params? See you requiresLogin method. That is a route middleware [21:00] dans: sorry, i was being retarded [21:00] dans: new error [21:00] dans: :p [21:00] rajivn: :) [21:01] dans: cannot set property user of undefined [21:01] dans: so req is defined [21:01] dans: but not req.body [21:02] dall: rajivn, what could it be? [21:02] rajivn: So that's bodyParser's job right? What happens if before the req.body.user call, you explicitly set req.body.user to an object I described above? [21:02] Nexxy: why would you do that? ;< [21:02] Nexxy: that's liek request forgery! [21:02] Nexxy: server side [21:03] dans: rajivn: the error is on the line where i explicitly set it [21:04] dans: req.body.user = { email: 'test@test.com', password: 'test' }; [21:04] rajivn: OK. so express.bodyParser is not doing its job I guess. But why? [21:04] dans: maybe i should reinstall express? [21:05] rajivn: dans: yeah maybe [21:05] dans: 2.3.11 im on [21:05] rajivn: dans: I'm on 2.4.0 [21:06] mendel_: does anyone have experience with cloudfoundry? [21:06] mendel_: and with experience I mean, deployed it on your own stack? [21:08] dall: i'm opening a new issue [21:09] rajivn: dall: sorry dude. no idea... [21:09] dall: k [21:09] Vertice has joined the channel [21:09] Vertice has joined the channel [21:09] junkee[] has left the channel [21:10] seawise has joined the channel [21:10] dall: rajivn, opened... [21:11] incon has joined the channel [21:12] rajivn: dall: just struck me that in dev mode, caching of public resources is turned off. Does this happen in production as well? Just a thought. [21:12] Vertice has joined the channel [21:13] avalanche123 has joined the channel [21:13] dall: rajivn, yes caching is turned off (i don't know how to turn it on) but is very strange...the .css file is very very small [21:13] dall: https://github.com/visionmedia/express/issues/734 [21:14] Prometheus: (why wouldn't you just use a real file server) [21:14] Prometheus: that's always beyond me =) [21:15] Prometheus: dall: I think that might be that you are running out of handlers [21:15] Prometheus: file handlers [21:15] rajivn: I agree with Prometheus. [21:15] Prometheus: not an issue w/ express, but rather an OS limitation [21:15] Prometheus: presumably, you are using OS X [21:15] Prometheus: ulimit fixes this [21:15] Prometheus: I think [21:16] dall: one moment... [21:16] dans: rajivn: what version of node? im using 0.5.0-pre [21:16] dall: i really don't think it... [21:16] Prometheus: dall: http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/3793 [21:16] dall: if i do the same test using the home --> [21:16] dall: 127.0.0.1:3000 [21:16] dall: it works perfectly [21:16] Prometheus: oh? [21:17] Prometheus: okay [21:17] Prometheus: dunno then, figured it might be file descriptors =) [21:17] rajivn: dans: I'm using 0.4.9 [21:18] dall: do you think at an OS problem [21:18] level09 has joined the channel [21:18] dall: hmm... [21:18] dall: very strange... [21:18] dall: '/' render a page very quickly it handles 2500 request / second [21:19] dall: i don't understand why after ONLY 15 requests it crashs [21:19] bnoordhuis: dall: what does your `ulimit -a` look like? (add it to the issue) [21:20] unlink has joined the channel [21:20] unlink has joined the channel [21:20] rajivn: dall: does ab also get all the static resources? [21:20] skript_ has joined the channel [21:21] dall: bnoordhuis, https://github.com/visionmedia/express/issues/734 updated [21:21] dall: rajivn, at the moment i only have a .css file [21:22] rajivn: dall: yeah, but when you run ab aginst '/' does it also get '/stylesheets/*.css'? [21:22] bnoordhuis: dall: just in case, does it work when you run `ulimit -n 16384` first? [21:22] skohorn has joined the channel [21:23] dall: rajivn, i don't know it renders the page correctly...this page has .css inside....but i have to check the logs [21:23] dall: bnoordhuis, i try [21:23] niftylettuce has joined the channel [21:23] Nican has joined the channel [21:24] dall: bnoordhuis, :-( sudo: ulimit: command not found [21:25] bnoordhuis: hah [21:25] bnoordhuis: what os / distro do you run? [21:25] dall: ubuntu 11.04 [21:25] bnoordhuis: okay, no need to sudo [21:25] bnoordhuis: it's a bash built-in btw [21:25] dall: if i try using normal use i get operation is not permitted [21:25] dall: i try [21:25] dall: *tried [21:26] dall: bash: ulimit: open files: impossibile modificare il limite: Operazione non permessa [21:26] Prometheus: that's crazy, yo [21:26] dall: impossible to change the limit; operation is not permitted [21:26] dall: Prometheus, yes............ this fucking ubuntu [21:26] dall: what distro are you using? [21:26] Prometheus: punch it right in the dick [21:27] Prometheus: dall: Steve's OS [21:27] azeroth_ has joined the channel [21:27] dall: Prometheus, mac [21:27] dall: hmm [21:28] Prometheus: is it found in /etc/security/limits.conf ? [21:28] dall: y [21:28] Prometheus: maybe you can change it there [21:29] zackattack has joined the channel [21:29] dall: ulimit ?? [21:29] bnoordhuis: dall: add this to your limits.conf: * hard nofile 65536 [21:29] Prometheus: dall: http://www.linuxask.com/questions/increase-the-maximum-number-of-open-files-file-descriptors [21:29] bnoordhuis: then log out and log in again [21:29] Prometheus: =) [21:30] Prometheus: don't have my box up so I can't check [21:31] dall: i'm hating ubuntuuuuuuuuuuuuuuuuuuuuuuuu [21:31] dall: rm -rF / [21:33] mange has joined the channel [21:34] dall: bnoordhuis, nothing....maybe i have to restart �_� [21:34] bnoordhuis: dall: yes, you need to log out of your terminal / window manager session [21:35] dall: bnoordhuis, btw why it crash ? maybe it reached the limit...ok...but it could "wait" or do something...without crashing ? [21:35] dall: bnoordhuis, ok [21:35] gozala has joined the channel [21:36] mkrecny has joined the channel [21:36] mkrecny: does node-http-proxy support sub-domains? [21:37] dshaw_ has joined the channel [21:38] dall: someone could advice me a good linx distro? :-D [21:40] gazumps856 has joined the channel [21:41] akshatj: dall, Ubuntu [21:41] espressive_: Anyone, please. How do I get passed Access-Control-Allow-Origin when testing locally in Chrome? [21:41] espressive_: Driving me insane [21:42] dall: akshatj, :-) other? [21:42] akshatj: dall, Debian :P [21:42] dall: bnoordhuis, btw it's strange because if i test the / all works good! [21:42] dall: akshatj, other? :) [21:42] robhawkes has joined the channel [21:42] espressive_: Trying to connect to node running at 127.0.0.1:1987 from 127.0.0.1 port 80 [21:43] espressive_: I believe there is a way to disable this in Chrome with a start-up flag, just can't remember what it is [21:43] mykul has joined the channel [21:44] espressive_: using socket.io btw [21:45] markwubben has joined the channel [21:46] akshatj: dall, just the ones I use [21:46] sorensen: afternoon` [21:46] dgathright has joined the channel [21:48] Fredderf has joined the channel [21:48] ryanmcgrath has joined the channel [21:50] lor__ has joined the channel [21:51] Prometheus: bnoordhuis: are you related to pnoordhuis by any channce? =) [21:52] bnoordhuis: Prometheus: hah, not that i know of - but we look kinda similar, eerily enough [21:52] Prometheus: bnoordhuis: yeah [21:53] bingomanatee: Where is the Math.ln10 function in Node? [21:54] xerox: Math.ln(x)/Math.ln(10) [21:54] xerox: err [21:55] xerox: Math.log(x)/Math.log(10) [21:55] xerox: you get the idea : ) [21:55] level09 has joined the channel [21:55] bingomanatee: thx [21:57] arnee has joined the channel [21:57] skohorn has joined the channel [21:59] blup has joined the channel [21:59] TomY has joined the channel [22:09] SebastianFlyte has joined the channel [22:09] niftylettuce has joined the channel [22:09] oal has joined the channel [22:10] oal: How can I write to the beginning of a file with fs.write? [22:11] jbpros has joined the channel [22:11] Prometheus: oal: http://nodejs.org/docs/v0.4.8/api/all.html#fs.write [22:11] Prometheus: oh wait [22:11] bnoordhuis: :) [22:11] Prometheus: yeah, that's the one [22:11] bnoordhuis: oal: http://nodejs.org/docs/latest/api/fs.html#fs.write [22:11] Prometheus: ^ [22:11] bnoordhuis: pass in the offset param [22:12] oal: offset = 0? [22:12] Prometheus: wouldn't it be position? [22:12] Prometheus: unless I'm totally misreading that [22:13] oal: I thought I set offset to 0 when I tried, but maybe I was mixing up the arguments [22:13] josephboyle has joined the channel [22:13] bnoordhuis: eh yeah, position [22:13] oal: Because I ended up removing the file's content leaving only the line I wrote [22:13] bnoordhuis: sorry, offset is the position in the buffer [22:13] Prometheus: so a friend of mine (a non-programmer) would like to get started with programming, and I figured I'd point him to node to play with, what would you recommend as "mandatory" reading besides node docs and js the good parts? :) [22:13] oal: Prometheus: coffeescript [22:14] Prometheus: hmm, coffeescript [22:14] bnoordhuis: "k&r c" and "operating systems: design and implementation" [22:14] Prometheus: maybe I'll do that too, though let him read up on JS first =P [22:15] bartt has joined the channel [22:15] Prometheus: k&r c might be a tad heavy for a first timer don't you think? =P [22:15] oal: Prometheus: then he'll be like "why didn't you show me this before?" :P [22:15] Prometheus: oal: then I'll tell him, "all in good time, young one" =P [22:16] Me1000 has joined the channel [22:16] oal: :) [22:17] fdenbow has joined the channel [22:17] JKarsrud: nah, should go to bed [22:17] JKarsrud: oops, wrong channel :) [22:18] Prometheus: bnoordhuis: though, now that you mentioned it, I might have to pick up myself a copy of K&R [22:18] Prometheus: I realized that's one book that's missing from my wishlist =) [22:18] smtlaissezfaire has joined the channel [22:18] bnoordhuis: Prometheus: k&r is okay [22:18] havenn has joined the channel [22:18] bnoordhuis: but my personal bible still is "operating systems..." [22:19] bnoordhuis: ACTION hugs his first print copy [22:19] Prometheus: bnoordhuis: that I actually have somewhere [22:19] adrianmg has joined the channel [22:20] oal: Hmm, I still can't write to the beginning of the file [22:20] oal: I just end up emptying it [22:21] bnoordhuis: oal: how do you open the file? [22:21] hereicode has joined the channel [22:21] Mrfloyd has joined the channel [22:21] oal: open(file, 'w', undefined, function... [22:21] oal: fs.open [22:23] oal: bnoordhuis: shouldn't that work? [22:25] bnoordhuis: oal: no - 'w' opens the file in (O_WRONLY | O_TRUNC | O_CREAT) mode [22:25] bnoordhuis: the relevant part is the truncate flag [22:25] bnoordhuis: you want 'a' or 'a+' [22:25] oal: hmm, which one then? [22:26] oal: ok but I only managed to append to the end with a [22:26] oal: I'll try a+ [22:26] bnoordhuis: 'a' is write-only mode, 'a+' read/write mode [22:26] bnoordhuis: the docs should probably clarify that [22:27] bnoordhuis: want to open an issue for that? [22:28] oal: It says see open(2) so if one is not as lazy as I am, figuring out that shouldn't be too much trouble :P [22:28] oal: But yeah, it wouldn't hurt anyone if it said so in the docs [22:29] bnoordhuis: well, no actually [22:29] bnoordhuis: open(2) doesn't accept strings, only a mode bitmask [22:29] CStumph has joined the channel [22:29] bnoordhuis: it should - at the very least - point to fopen(3) [22:30] oal: Ah, got it [22:30] oal: But I'll open an issue on github [22:30] piscisaureus_: v8: process.binding [22:30] v8bot: piscisaureus_: ReferenceError: process is not defined [22:30] vid_ has joined the channel [22:31] piscisaureus_: v8: setTimeout [22:31] v8bot: piscisaureus_: ReferenceError: setTimeout is not defined [22:31] piscisaureus_: v8: (window || global || module || exports || secret) [22:31] v8bot: piscisaureus_: ReferenceError: window is not defined [22:32] swilson06 has joined the channel [22:32] piscisaureus_: v8: (function() { return this; })() [22:32] v8bot: piscisaureus_: {console:{log:function (x){console.out.push(pp…,out:[]},print:function print(x){console.log(x)…,pp:function pp(o,depth){return pp_r…,pp_r:function pp_r(o,d){var a=[],p if…} [22:33] piscisaureus_: v8: Object.keys((function() { return this; })()) [22:33] v8bot: piscisaureus_: ["console","print","pp","pp_r"] [22:34] oal: bnoordhuis: ok, I opened an issue [22:34] piscisaureus_: 01((function() { return this; })())01.__proto__ [22:34] oal: bnoordhuis: https://github.com/joyent/node/issues/1268 [22:34] piscisaureus_: v8:"01((function() { return this; })())01.__proto__ [22:34] v8bot: piscisaureus_: SyntaxError: Unexpected token ILLEGAL [22:34] arnee has joined the channel [22:35] bnoordhuis: v8bot: "piscisaureus_, stop fucking around" [22:35] v8bot: bnoordhuis: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [22:35] bnoordhuis: there goes the joke :/ [22:35] bnoordhuis: oal: thanks [22:35] LowValueTarget has joined the channel [22:36] wookiehangover has joined the channel [22:36] socketio\test\18 has joined the channel [22:37] shirro has joined the channel [22:37] shirro has joined the channel [22:37] oal: bnoordhuis: when changing to 'a' I got this http://dpaste.com/562586/ [22:37] socketio\test\30 has joined the channel [22:38] bnoordhuis: oal: gist? [22:38] oal: Wait, I think I changed something else as well, 'w' gives the same now [22:38] oal: Sorry [22:38] kuhrt has joined the channel [22:39] kuhrt: anyone here familiar with mongoose? [22:39] konobi: oal: open(2) [22:40] konobi: oal, the docs give reference to that... which means you can just use "man" to get details of the interface [22:42] tmpvar has joined the channel [22:43] konobi: oal: are you talking about wondering what 'r', 'a', 'w' map to in terms of the open(2) constants? [22:44] oal: I think I got it now, but the thing is it should be in the documentation for lazy programmers [22:44] oal: :) [22:44] konobi: oal: meh [22:45] konobi: oal: should we also redo all the docs for javascript as well? [22:45] konobi: i mean, node is just javascript bindings to a unix/posix interface... which is well documented by itself [22:46] bnoordhuis: konobi: that's a cop out [22:46] smtlaissezfaire has joined the channel [22:46] konobi: bnoordhuis: patches welcome [22:46] oal: Correct, but it'll be like an extra line or so in the docs, no problem [22:46] bnoordhuis: and besides, i had to look up in fs.js what 'w' did exactly :-/ [22:46] konobi: c, perl, php, ruby all have the same interface [22:46] mark__ has joined the channel [22:47] bnoordhuis: and they all document it without referring to unix man pages [22:47] bnoordhuis: what's your point again? [22:48] konobi: bnoordhuis: patches welcome [22:48] konobi: =0) [22:48] mark__: I've been using Node v0.2.3 and I'm upgrading to v0.4.7 using the module N, and I'm currently on 0.4.7 ... however NPM is having a "very rare, failed to to unpack tarball" error whenever I install a module - I'm using cygwin. [22:50] mark__: any clue, help, pointers? [22:50] iFire` has joined the channel [22:51] ParadoxQuine has joined the channel [22:51] konobi: bnoordhuis: the point being is that when you work something out that you're not sure about... why not patch the docs so that everyone can know in future and you don't need to remind yourself later [22:52] konobi: https://github.com/joyent/node/tree/v0.4/doc/api [22:54] bnoordhuis: konobi: that's actually why i asked oal to open an issue - so i don't forget to [22:57] jelveh has joined the channel [22:57] konobi: bnoordhuis: JFDI an pull request it [22:59] mikeal has joined the channel [23:01] josephboyle has joined the channel [23:02] fmeyer has joined the channel [23:03] adrianmg has joined the channel [23:05] tauren: I've created a Model.parse() method that converts a date string into a Date object. Works great if I run Model.fetch(). [23:06] adrianmg1 has joined the channel [23:06] tauren: But parse() isn't run if I manually create the model: model = new Model({date: "2011-05-02T12:00:00Z"}) [23:07] tauren: what's the best way to preprocess json when it isn't getting fetched? [23:09] BulletBob has joined the channel [23:16] onr has left the channel [23:16] tauren: My solution is to put the logic in Model.initialize: if (_.isString(this.get('start')) { this.set({start: DateParser.parse(this.get('start'))},{silent: true}); } [23:18] hassox has joined the channel [23:25] materialdesigner has joined the channel [23:25] chjj: v8: Object.prototype.toString.call(Object.__proto__()) === '[object global]'; [23:25] v8bot: chjj: true [23:25] chjj: v8bot, why are you so strange [23:26] webster has joined the channel [23:28] HammHetField has joined the channel [23:28] HammHetField: hi [23:28] HammHetField: I'm searching for a nice tutorial about nodejs that isn't about making a web server, I'd like to make some kind of compiler, like what coffeescript has with the coffee command [23:28] HammHetField: any links or thoughts where I could find tuts about that ? [23:29] chjj: well i think coffeescript uses jison [23:29] stevezd has joined the channel [23:29] jma has joined the channel [23:29] HammHetField: um I know it uses node [23:30] chjj: https://github.com/zaach/jison [23:30] HammHetField: never heard of jison so maybe it uses both I have no idea [23:30] chjj: jison is a parser generator [23:30] squeese has joined the channel [23:30] HammHetField: um [23:30] HammHetField: okay I'll look at that then [23:30] HammHetField: thanks [23:30] jesusabdullah: It uses jison to parse coffeescript into javascript, using node as the runtime, and then uses node again to execute the resulting javascript [23:31] jesusabdullah: You may find other technologies more useful, as iirc jison is not very well documented [23:32] hereicode: is there a standard guide to debugging "undefined symbol: ev_rt_now" addon errors? [23:32] webster has joined the channel [23:33] wink_ has joined the channel [23:33] patrickgamer has joined the channel [23:33] patrickgamer has left the channel [23:33] HammHetField: jesusabdullah: what I'm trying to do is some kind of compiler that would "render" a webpage like a browser would to go trhough it's dom, probably with JQuery do some stuff there, and then save the modified file [23:34] CStumph has joined the channel [23:34] HammHetField: like make an html file with external stylesheet, run a command in the terminal, and all the external style is set inline instead and the file is saved [23:35] level09 has joined the channel [23:35] systemfault: ... [23:35] pHcF has joined the channel [23:36] jesusabdullah: HammHetField: Check out jsdom [23:36] HammHetField: jesusabdullah: that's exactly what I'm looking at right now :) [23:36] jesusabdullah: HammHetField: Also, jade [23:36] HammHetField: oh okay I'll check that [23:36] jesusabdullah: You might be able to get ideas from jade [23:36] jesusabdullah: at any rate [23:38] rajivn has joined the channel [23:38] jacobolus has joined the channel [23:39] level09 has joined the channel [23:39] HammHetField: jesusabdullah: okay great, thanks ! [23:39] bbrandon has joined the channel [23:41] jesusabdullah: No prob yo [23:41] rajivn has joined the channel [23:50] Aria has joined the channel [23:50] rajivn has joined the channel [23:50] kuhrt: in express.js is there a way to pass from submission data that is not a flat json file? [23:50] kuhrt: flat json object i mean [23:51] kuhrt: form submission data* [23:53] wookiehang0ver has joined the channel [23:54] rajivn has joined the channel [23:56] Aria has joined the channel [23:56] ceej has joined the channel