[00:00] sechrist: EGreg: part of connect/express [00:00] EGreg: okay but MethodOverride isn't defined [00:00] micheil: use would be a function [00:00] ukev: isaacs, thanks, I will ask tomorrow, I'm from europe, it's very late here [00:00] tjholowaychuk: EGreg: its methodOverride [00:00] tjholowaychuk: not MethodOverride [00:01] EGreg: see my link [00:01] EGreg: http://howtonode.org/facebook-connect [00:01] tjholowaychuk: use() is just a method that takes the middleare you give it and shoves it in an array [00:01] tjholowaychuk: oh [00:01] tjholowaychuk: that is really old [00:01] EGreg: oh [00:01] tjholowaychuk: really really [00:01] EGreg: MethodOverride isn't even defined, neither is methodOverride [00:02] EGreg: well, how do I use facebook with Node? [00:02] tjholowaychuk: you write code [00:02] isaacs has joined the channel [00:02] EGreg: on server side? [00:05] bingomanatee: EGreg -- "use" is a little vague -- what do you want to do? [00:05] tjholowaychuk: bingomanatee: hes looking at really old middleware [00:05] tjholowaychuk: that might not exist anymore, not sure [00:05] bingomanatee: oh a facebook node module? [00:05] tjholowaychuk: yeah [00:05] bingomanatee: feh [00:06] rauchg_ has joined the channel [00:06] sechrist: I've done a crapload of nodejs stuff with facebook apis [00:06] comster1: facebook client js mostly? [00:06] sechrist: nah serverside fql and stuff on behalf of clients [00:07] sechrist: using their oauth tokens [00:07] sechrist: now I do it with the clientside js lib [00:07] comster1: whats the biggest difference in function? [00:07] EGreg: what exactly is midleware btw [00:08] tjholowaychuk: EGreg: stuff that goes in the middle [00:08] EGreg: bingomanatee: I am looking for a facebook client library for node, similar to how they ahve one for php [00:08] tjholowaychuk: and does something [00:08] tjholowaychuk: :p [00:08] EGreg: okay so where can I get a list of all the Connect middleware [00:08] tjholowaychuk: https://github.com/senchalabs/connect/wiki [00:08] tjholowaychuk: is some [00:09] EGreg: aha, nice! [00:09] EGreg: the thing I like about node.js, is that I can load 1000 modules and it will hardly impact the performance on a request [00:09] EGreg: right? [00:09] EGreg: unless they register hooks in the server processing [00:09] tjholowaychuk: 1000s of middleware? [00:10] EGreg: well as an illustration ,sure [00:10] tjholowaychuk: no [00:10] tjholowaychuk: it will hurt you [00:10] tjholowaychuk: even a logger will shave like 4000rps off [00:10] EGreg: how [00:10] tilgovi has joined the channel [00:10] tjholowaychuk: because they do things [00:10] tjholowaychuk: and things take time [00:10] EGreg: yeah but I said things that DON'T hook into the request lifecycle [00:10] EGreg: I simply load 1000 modules [00:10] tjholowaychuk: oh, well then no, why would it [00:10] EGreg: but don't use them [00:11] bingomanatee: why not just use PHP if you need access to thousands of routines :D [00:11] EGreg: that's my point! it's awesome [00:11] EGreg: but not so for PHP [00:11] tjholowaychuk: that is because php sucks [00:11] EGreg: why use PHP at all, bingomanatee? :) [00:11] tonymilne has joined the channel [00:11] banjiewen has joined the channel [00:11] bingomanatee: Well because it gives you access to thousands of functions. [00:11] bingomanatee: Thats what you want right? [00:11] tjholowaychuk: lets re-parse and evaluate scripts on every request! what a good idea [00:11] EGreg: no [00:11] EGreg: tjholowaychuk: there are opcode cachers [00:12] tjholowaychuk: haha [00:12] EGreg: but guess what [00:12] tjholowaychuk: yeah [00:12] tjholowaychuk: but that is a big fail [00:12] EGreg: Node.js compiled to freaking machine code [00:12] tjholowaychuk: to even need that [00:12] EGreg: AND, [00:12] EGreg: Node.js doesn't do one-thread-per-request that makes apache teh suck [00:12] EGreg: vs nginx [00:12] EGreg: evented all the way baby [00:12] tjholowaychuk: we know :p [00:12] EGreg: not to mention that the front end uses js :) so that clinhes it. [00:12] bingomanatee: Every module is a javascript file. If you load a thousand modules, you are hitting the file system a thousand times. (presuming zero dependencies inside the module file.) At what point does that become painless in your mind? [00:12] EGreg: no erlang, no eventmachine, no twisted. [00:12] EGreg: just pure javascript awesomeness. [00:12] brianc: tjholowaychuk: just getting started here https://github.com/brianc/jade-mode [00:13] sechrist: does eventmachine suddenly make ruby asynchronous? [00:13] tjholowaychuk: brianc: sweet :) [00:13] bingomanatee: It's not like you are just adding a path to a "require" stack. [00:13] sechrist: or does it have the same problem twisted and tornado have -- every other damn lib is blocking? [00:13] tjholowaychuk: sechrist: same issue id imagine [00:14] tjholowaychuk: but ruby IO (last time I checked (months and months ago)) still beat node [00:14] tjholowaychuk: in some cases [00:14] sudoer has joined the channel [00:14] sechrist: with doing what? spitting out canned strings? [00:14] sechrist: I need to do what everybody else needs to do, talk to databases. [00:14] tjholowaychuk: I cant remember, I think it was before buffer, quite a while back [00:15] MikhX has joined the channel [00:16] tjholowaychuk: but that was with thin, so EM [00:20] ysynopsis has joined the channel [00:21] ShiZWeaK has joined the channel [00:22] boaz has joined the channel [00:25] dnolen has joined the channel [00:28] brianleroux has joined the channel [00:31] Aikar: isaacs: https://gist.github.com/742835 is this something broken on your end or pgriess's? [00:31] Aikar: other stuff works fine, just websocket-client is blowing up [00:32] technoweenie has joined the channel [00:32] isaacs has joined the channel [00:34] rpflo has joined the channel [00:34] springmeyer has joined the channel [00:35] guybrush: isaacs: is it possible to pass arguments to the scripts? e.g. `{"scripts":{"start":"spark -n 2"}}` [00:35] bingomanatee: Okay - what is the simplest way to write to unix syslog - or is it simply using filesystem to write to the file directly? [00:36] guybrush: (I am talking about npm btw) [00:36] frodenius: bingomanatee㇀ https://github.com/schamane/node-syslog i guess [00:37] sechrist: mjr_: so is there any task queue systems where the job isn't lost if a workers dies? [00:37] sechrist: ie: it takes it out and if there's no success after a timeout the task is back in? [00:37] frodenius: guybrush㇀ should work fine [00:37] bingomanatee: thx [00:37] mjr_: sechrist: yeah, there are. I've not used them yet. [00:37] sechrist: Know of any off hand? [00:38] sechrist: Project names? I'm looking through solutions [00:38] TheEmpath2 has joined the channel [00:39] brianleroux has joined the channel [00:39] Yuffster has joined the channel [00:39] Rv has joined the channel [00:39] MikhX_ has joined the channel [00:40] mjr_: sechrist: I think restmq is one, and I can't remember the other names offhand. [00:40] mjr_: I'm really out of touch on the current state of message queue technology. [00:41] guybrush: frodenius: I meant is there a way to pass arguments to the script when I call it with npm. Like `npm start packageXY -n 2` - which will do `spark -n 2`. [00:41] mjr_: sechrist: people in #redis would probably know. [00:41] mjr_: sechrist: but it's awful quiet in there. [00:42] frodenius: ah [00:43] bingomanatee: I can pas along a redis question to a group of devs I know at 3crowd ... [00:43] bingomanatee: they use it a lot. [00:44] bingomanatee: +s [00:44] frodenius: guybrush㇀ it does not work, additional parameters to npm start are interpreted as package names [00:44] mw has joined the channel [00:46] mnot has joined the channel [00:46] EGreg: v8> typeof(function () { } ) + typeof([]) [00:46] v8bot: EGreg: "functionobject" [00:46] EGreg: v8> (function() { } ) instanceof Function [00:46] v8bot: EGreg: true [00:46] brianmario has joined the channel [00:46] EGreg: v8> ( [] ) instanceof Array [00:46] v8bot: EGreg: true [00:46] EGreg: v8> ( [] ) instanceof Object [00:46] v8bot: EGreg: true [00:46] EGreg: okay [00:47] springmeyer has joined the channel [00:49] springmeyer has joined the channel [00:49] jvolkman_ has joined the channel [00:52] EGreg: hey guys does it matter [00:52] EGreg: if I do callbacks[i] a lot [00:52] EGreg: or should I assign callbacks[i] to a variable like callback [00:52] EGreg: does v8 optimize this [00:52] aconbere has joined the channel [00:54] tprice: its said if you call callbacks[i] more then once it might help make a new var with it [00:55] tprice: but agina callbacks[i] would eb the fastest way tp call i on callbacks [00:56] tlrobinson has joined the channel [00:58] EGreg: v8: foo: for (var i=0; i<3; ++i) for (var j=2; j<9; ++j) { print(j); continue foo; } [00:58] v8bot: EGreg: CONSOLE: [2, 2, 2], OUTPUT: undefined [00:58] EGreg: nice :) [01:03] isaacs_ has joined the channel [01:03] creationix has joined the channel [01:05] rpflo has joined the channel [01:05] ossareh has joined the channel [01:07] softdrink has joined the channel [01:07] bartt has joined the channel [01:09] Rv has joined the channel [01:10] rburhum has joined the channel [01:13] isaacs: guybrush: Do this: {"scripts":"spartk -n 2 app.js"} [01:13] hobodave has joined the channel [01:13] isaacs: guybrush: there's no way to pass args through `npm start` though, no [01:13] hobodave: hey guys [01:14] hobodave: I'm tinkering around with the CLI interpreter, and I keep getting "stuck" in an indention level. I've double checked that I'm using semi-colons and matching braces, but I can't figure out what I'm doing wrong. Any ideas what I'm screwing up? [01:16] creationix: hobodave: it's pretty flakey, I have trouble with it too [01:17] EGreg: yo doods, I did it [01:17] EGreg: I made Q.pipe [01:17] zentoooo has joined the channel [01:19] kawaz_air has joined the channel [01:20] bingomanatee: okay I have npm'd syslog-module and can see it in npm list but when I :: var Syslog = require('node-syslog').Syslog; [01:21] bingomanatee: I get "cannot find module 'node-syslog'; [01:21] isaacs: bingomanatee: what's `npm config get root` [01:21] isaacs: ? [01:22] EGreg: https://gist.github.com/742888 [01:22] falconair has joined the channel [01:22] rburhum_ has joined the channel [01:22] bingomanatee: it is /root/local/lib/node [01:23] bingomanatee: and yes -- I know -- but there aren't any other users on this server [01:23] falconair: hi, is there a specific channel for socket.io or can i ask my questions here? [01:23] isaacs: bingomanatee: nono, that's fine [01:23] isaacs: bingomanatee: so,go into the node repl and enter this: require.paths [01:23] sudoer has joined the channel [01:23] isaacs: what's that say? [01:24] bingomanatee: the node repl? [01:24] isaacs: yes [01:24] isaacs: type "node" [01:24] isaacs: or: node -e 'require.paths' [01:24] guybrush: isaacs: thx, i will stick with binaries [01:25] ukev: isaacs [01:25] bingomanatee: node -e "require.paths" == reference error: require is not defined [01:25] isaacs: bingomanatee: ok, then do it in the repl [01:25] falconair: two relation questions about socket.io: 1) when I send a string from browser to server, the server prints it as [object Object] instead of the string 2) How can I send a javascript map {key:val,...} through scoket.io? [01:25] bingomanatee: undefined.1 is spit out too [01:26] brianleroux has joined the channel [01:26] isaacs: bingomanatee: wtf? what's node -v say? [01:26] bingomanatee: 0.2.4 [01:26] isaacs: ok... [01:26] isaacs: so, if you type "node" (no arguments) it should drop you into the repl [01:26] bingomanatee: should I be updated from that? [01:26] isaacs: and then if you type: require.paths it should show an array of paths. [01:26] bingomanatee: okay now I am there. I just didn't get it. [01:26] evanmeagher has joined the channel [01:27] isaacs: :) it's kewl [01:27] bingomanatee: [ '/root/.node_libraries', [01:27] evanmeagher: isaacs: did you see my comment about `npm cache ls` being broken? [01:27] isaacs: evanmeagher: yeah. [01:27] bingomanatee: , '/root/local/lib/node' ] [01:27] isaacs: bingomanatee: so... you're running as sudo? and node is installed in /root/local/bin? [01:29] bingomanatee: I == root [01:30] isaacs: bingomanatee: ok... [01:30] isaacs: so... why is npm installing to /usr/local/lib/node? [01:30] boaz has joined the channel [01:30] bingomanatee: yes [01:30] isaacs: and not /root/local/lib/node? [01:30] mikeal has joined the channel [01:30] bingomanatee: I have no idea. [01:30] isaacs: also, what a VERY strange thing you're doing on that poor machine. [01:30] bingomanatee: Yes. [01:30] isaacs: are there multiple copies of node? a file at ~/.npmrc with configs in it? [01:30] bingomanatee: Its part of my terrorist program to get a sysadmin under the hood. [01:30] isaacs: bingomanatee: npm config ls [01:30] isaacs: and gist that, please ^ [01:31] bingomanatee: There shouldn't be. [01:31] isaacs: bingomanatee: how did you install node? and npm? [01:32] elijah-mbp has joined the channel [01:32] bingomanatee: it is gist.github.com/742893 [01:32] bingomanatee: I have an installation regime at http://www.wonderlandlabs.com/wll_drupal/os/node/install.htm [01:33] bingomanatee: If you think I am simply being too antichrist by not having a user I can create a user on the machine and start over. [01:33] dannycoates has joined the channel [01:33] isaacs has joined the channel [01:34] isaacs: oh, ok, so it's at /root/local/lib/node [01:34] isaacs: so, when you install node-syslog, what's in that folder? [01:34] isaacs: (just realized that i mis-read the "root" config when you posted it above. sorry about that.) [01:35] dilvie has joined the channel [01:35] dilvie: any joyent peeps in here? [01:35] dilvie: waiting for an answer in #joyent. [01:36] Insanity5902 has joined the channel [01:36] bingomanatee: there are several references to it in my file system -- 1 sec will gist [01:36] bingomanatee: see comment on same gist [01:38] kawaz_work has joined the channel [01:38] isaacs: bingomanatee: ls -laF /root/local/lib/node/node-syslog [01:39] bingomanatee: just gives me the shortcut a la the gist comment [01:39] isaacs: right, sorry, ls -laF /root/local/lib/node/node-syslog/ [01:39] isaacs: (note the /) [01:39] ukev: does anyone know howto get an http://nodejitsu.com account? ;) [01:40] bingomanatee: isaacs just index.js [01:40] EGreg: https://gist.github.com/742888 [01:41] isaacs: bingomanatee: ok... let's back up. [01:41] isaacs: bingomanatee: when you do "require('node-syslog')" what is the ACTUAL error you see? full stack, plz. [01:41] isaacs: (gist) [01:41] bingomanatee: issaacs bounicing machines one sec [01:41] bingomanatee has joined the channel [01:41] bingomanatee: back [01:42] ossareh has joined the channel [01:43] mw has joined the channel [01:45] isaacs: bingomanatee: !!!!! [01:45] isaacs: this is a problem with node-syslog, not with npm. [01:45] isaacs: hold on. [01:45] bingomanatee: okay [01:46] TheEmpath2: hrmmm anyone reason toJSON breaks jsperf.com? http://jsperf.com/recursive-vs-json-object-comparison [01:47] isaacs: bingomanatee: bug in the package.json's "main" field. [01:47] isaacs: i'll push a fix and send the author a pull req in just a second.. [01:48] bingomanatee: okay thanks. [01:48] isaacs: bingomanatee: hah. https://github.com/schamane/node-syslog/commit/efb4ef9832f3ae35b4c46c9290da5e6cb5ab5449 [01:49] bingomanatee: so is this something I can patch in easily on my own? [01:49] bingomanatee: or should I use npm again to suck what has been patched already? [01:49] isaacs: fixed. [01:50] evanmeagher has joined the channel [01:50] isaacs: bingomanatee: npm rm node-syslog ; npm install node-syslog [01:50] isaacs: should work^ [01:50] aconbere has joined the channel [01:50] EyePulp has joined the channel [01:52] bingomanatee: error persists as before [01:54] Druid_ has joined the channel [01:54] bingomanatee: my on-disk version has " "main": "./lib/node-syslog", " [01:55] bingomanatee: should I edit it? [01:56] EGreg: hey guys [01:56] EGreg: I am thinking of using semaphores for throttling [01:56] EGreg: what do you think? [01:57] cardona507 has joined the channel [01:58] pedrobelo has joined the channel [02:01] isaacs: bingomanatee: oh, derp, it pulled from cache [02:01] isaacs: sure, you can edit it. i mean, you ARE root after all ;) [02:02] bingomanatee: so it should read "main": "./node-syslog", [02:02] isaacs: yeah [02:02] isaacs: bingomanatee: you'll have to edit the index.js, though [02:02] isaacs: the package.json isn't used after install [02:02] isaacs: or, you can npm rm node-syslog ; npm cache clean node-syslog ; npm install node-syslog [02:02] bingomanatee: npm rm node-syslog; npm cache clean node-syslog; npm install node-syslog [02:03] bingomanatee: gack [02:03] isaacs: p=node-syslog; for i in rm "cache clean" install; do npm $i $p; done [02:03] isaacs: hehe [02:03] bingomanatee: now we clean [02:03] isaacs has joined the channel [02:03] isaacs: bash golf time! [02:04] bingomanatee: now we are back to usual bugs thx [02:04] isaacs: weird. [02:05] jamesarosen has joined the channel [02:07] isaacs: bingomanatee: try just a generic "npm cache clean" [02:07] isaacs: then rm it, then install it [02:08] jchris has joined the channel [02:12] bingomanatee: no your work was good [02:13] bingomanatee: I am getting segmentation faults when I run his test script. [02:13] bingomanatee: So now I just think his library is generally f**ked at least in unix and the current node. [02:14] bingomanatee: Thanks Isaacs but I guess I'll just keep my own d**n logs. [02:14] bingomanatee: "to the fs module!" [02:14] jakehow has joined the channel [02:15] capndiesel has joined the channel [02:16] bingomanatee: so how do you append with a writestream, or is that the default behavior for an existing file? [02:17] Floxxx: gah, trying to figure out why my script wouldn't insert into the database, turns out the harddrive died and got remounted read-only >< [02:17] Tobsn has joined the channel [02:17] Floxxx: bingomanatee: mode 'a+' [02:17] bingomanatee: thx. [02:17] bingomanatee: is that a "flags" setting or a "mode" setting? [02:17] Floxxx: flags [02:17] bingomanatee: k. [02:17] Floxxx: mode is permissions [02:18] Floxxx: i.e. 666 [02:26] pydroid has joined the channel [02:28] beta has joined the channel [02:28] tprice: how does node create the abstraction of the nextTick [02:28] alek_br has joined the channel [02:29] dguttman_ has joined the channel [02:29] alek_br__ has joined the channel [02:31] ben_alman has joined the channel [02:32] alek_br_ has joined the channel [02:33] tprice: any takers? [02:34] isaacs_ has joined the channel [02:35] hobodave has joined the channel [02:38] chrisdickinson: tprice: how so? [02:43] softdrink1 has joined the channel [02:46] TheEmpath2: this thread is now about deep clones in javascript.... go [02:46] TheEmpath2: tprice: nextTick is a callback handler that places callbacks in a queue before the main i/o loop [02:47] TheEmpath2: with each main loop iteration, the nextTick queue is ran first [02:47] dilvie: where does npm get installed on OS X? [02:47] rchavik has joined the channel [02:49] sprout has joined the channel [02:51] jashkenas has joined the channel [02:52] Wyverald has joined the channel [02:57] bartt has joined the channel [02:58] aschw has joined the channel [02:59] Aria has joined the channel [03:03] Wyverald has left the channel [03:03] Wyverald has joined the channel [03:05] robmason_ has joined the channel [03:06] tprice: the main i/o loop is in c or javascript? [03:07] tmzt: is there a known issue installing connect-redis from npm? when running a server.js with require('connect-redis') I get unexpected token < in index.html:1 [03:08] mbrochh has joined the channel [03:09] mjr_ has joined the channel [03:11] tmzt: okay so I guess I'm looking for the method to thoroughly clean a package that was installed correctly, npm cache clean and the manual rm it recommended did not work [03:13] BillyBreen has left the channel [03:15] dilvie: hmm [03:16] hobodave: I haven't been this excited about technology in a while :) [03:17] tmzt: this seems to be the problem, /usr/local/lib/node/connect-redis/index.js:var from = "./../.npm/connect-redis/0.2.0/package/index.html" [03:18] dilvie: hobodave: What are you excited about? [03:18] hobodave: node.js and websockets :) [03:18] hobodave: I'm new to this, tinkering with the chat example [03:18] dilvie: ah. [03:18] dilvie: =) [03:18] dilvie: yeah, node is cool. [03:18] tprice: hobodave what websocket are you using? [03:18] dilvie: node + websockets is cool. [03:19] hobodave: tprice: socket.io [03:19] SvenDowideit_ has joined the channel [03:19] tprice: you should try http://github.com/miksago/node-websocket-server [03:19] hobodave: why should I? [03:20] tprice: its a much more raw websocket then socket.io [03:20] tprice: if you like that kinda of thing [03:20] hobodave: I might check it out [03:21] hobodave: the multi transport is what I need though from socket.io [03:22] mikew3c_ has joined the channel [03:22] ShizWeaK_ has joined the channel [03:22] hobodave: thanks for the suggestion tprice [03:23] mrtrosen has joined the channel [03:24] dilvie: where the hell is npm? [03:24] kawaz_work has joined the channel [03:27] dilvie: yay [03:27] dilvie: I found npm [03:27] dilvie: all is right with the universe [03:30] ibolmo has joined the channel [03:31] robmason has joined the channel [03:32] alek_br has joined the channel [03:33] boaz has joined the channel [03:35] langworthy has joined the channel [03:40] dgathright has joined the channel [03:43] jakehow has joined the channel [03:46] wasabist has joined the channel [03:49] pydroid has joined the channel [03:50] hobodave: when working streams, does the data event have any concept of "lines" ? e.g. does it always contain N complete lines of data, or could it contain partial lines? [03:51] tpryme has joined the channel [03:53] bartt: hobodave: There is no concept of lines of data. [03:53] hobodave: thank you bartt [03:53] bartt: You're welcome. [03:54] hobodave: now I need to figure out how to introduce the concept of lines :) [03:54] pydroid has joined the channel [03:55] Floxxx: hobodave: simply put, you don't :) [03:55] hobodave: hehe [03:55] Floxxx: you just concat until EOD [03:55] Floxxx: and then split on \n [03:55] hobodave: well maybe you can guide me here [03:56] hobodave: I'm tinkering with an example application that came with socket.io, it's a simple chat app: client sends message, server broadcasts to all clients [03:56] hobodave: I'm trying to implement a log tailer [03:57] tpryme: Anyone here using lucene/solr with node? [03:57] hobodave: I'm catching the 'data' event on the tail process and broadcasting the buffer (as a string) to the client [03:57] hobodave: how would you handle the potentially incomplete lines at the beginning and end of the string? [03:57] Floxxx: hobodave: something like this: http://pastie.org/1381582 [03:58] hobodave: Floxxx: yea I'm doing something similar, except I'm pushing it to the client in the 'data' event [03:58] hobodave: it's a real-time log tailer [03:58] Floxxx: well, what you could do is use a second var [03:58] Floxxx: hang on [03:59] hobodave: I started to write my client to simply split the data by \n and wrap it in

's [03:59] hobodave: but if lines may be incomplete, then I will potentially get the same line on two separate lines [04:00] SvenDowideit has joined the channel [04:01] Floxxx: http://pastie.org/1381582 [04:01] maushu has joined the channel [04:01] Floxxx: something along those lines [04:02] Floxxx: so you take your data up to the last \n and send that over [04:02] Floxxx: anything left is kept until the next data event and prepended [04:02] hobodave: oh cool [04:02] hobodave: that makes sense [04:03] hobodave: I ws thinking of doing something similar client-side [04:03] hobodave: but with this, I can also implement buffering of my own, buffer up N lines and send them to the client [04:03] jashkenas: What's the current version of Node? 0.2.5 and 0.3.1 are both tagged. The homepage documents 0.3.0. [04:03] Floxxx: yeh [04:03] Floxxx: jashkenas: stable is 0.2.5 [04:03] jashkenas: is that documented anywhere? [04:04] robtmr has joined the channel [04:04] jashkenas: (I'm being annoying about this because I keep fielding questions from folks who are having trouble telling what to install) [04:04] Floxxx: is what documented somewhere? [04:04] Floxxx: what the current version is? [04:04] jashkenas: What the stable version is. [04:04] jashkenas: Yes. [04:04] Floxxx: download page [04:04] jashkenas: ah, thanks. [04:05] Floxxx: http://nodejs.org/#download [04:05] jashkenas: I'm sorry -- my browser had a cached version of that page. [04:05] jashkenas: The new version of the page links to both ... not just 0.3.0 -- much better. Thanks. [04:06] Blackguard has joined the channel [04:06] arrty has joined the channel [04:06] Floxxx: gah, stupid database is pissing me off >< [04:09] SvenDowideit has joined the channel [04:16] m14t has joined the channel [04:20] deepthawtz has joined the channel [04:20] tilgovi has joined the channel [04:23] rchavik has joined the channel [04:26] amerine has joined the channel [04:26] pydroid has joined the channel [04:31] pydroid has joined the channel [04:33] sh1mmer has joined the channel [04:36] dannycoates has joined the channel [04:37] m32311 has joined the channel [04:39] SvenDowideit has joined the channel [04:43] pydroid has joined the channel [04:43] hobodave: Floxxx: I'm making progress :) [04:45] Floxxx: :) [04:46] hobodave: is there a lib to parse config files, either ini, yaml or xml will work [04:47] tekky has joined the channel [04:47] MikhX has joined the channel [04:48] Floxxx: not that i'm aware [04:48] Floxxx: but ini is pretty simple to parse yourself [04:48] justinlilly: there is a node xml library [04:48] justinlilly: libxmljs [04:48] SvenDowideit_ has joined the channel [04:48] ybit has joined the channel [04:48] hobodave: aha [04:48] hobodave: thanks justinlilly [04:49] justinlilly: np hobodave [04:49] justinlilly: also: https://github.com/visionmedia/js-yaml [04:49] justinlilly: and for completeness: https://github.com/shockie/node-iniparser [04:50] hobodave: :D [04:50] hobodave: where are you finding these? [04:50] justinlilly: google. [04:50] hobodave: ah [04:50] justinlilly: "javascript yaml" "javascript ini parser" and I knew libxmljs from someone asking the other day. [04:50] hobodave: ah [04:50] hobodave: I was doing "node yaml" [04:50] hobodave: which was all kinds of useless [04:50] justinlilly: yep. tried that. it was. [04:50] justinlilly: nijj. node is just javascript. ;) [04:51] justinlilly: (not actually true, but works for these purposes :) [04:51] mw has joined the channel [04:54] sudoer has joined the channel [04:54] m14t has joined the channel [04:58] probably_ has joined the channel [04:58] brianleroux has joined the channel [05:02] grim_fandango has joined the channel [05:03] grim_fandango: Hi ... I am having problems with Cradle & passing keys to CouchDB views. For whatever reason the double-quotes around the key values are being encoded as %22 and this is causing CouchDB to fail to match the view key parameter. Has anyone else had this problem or can someone think of a solution for it? [05:08] mikeal has joined the channel [05:08] arrty has joined the channel [05:11] sechrist has joined the channel [05:15] Yurik has joined the channel [05:17] cnus8n has joined the channel [05:18] tekky has joined the channel [05:21] jchris1 has joined the channel [05:24] Figaroo has joined the channel [05:24] Figaroo: Okay, I'm going to install and give NodeJS a go. But I'm not familiar with what cygwin is. [05:26] Figaroo: Is cygwin just a library of linux API for windows? [05:26] ShizWeaK_: Pretty much, yes [05:27] Figaroo: Okay, what's this about a package directory when I install cygwin? [05:27] robmason has joined the channel [05:27] Figaroo: Says, Local Package Directory. [05:27] Figaroo: And it defaults to my Downloads folder. :\ [05:28] pzich has joined the channel [05:29] Figaroo: I'm not sure what to do with this. [05:30] ShizWeaK_: Figaroo: I am not sure, I do not use cygwin - my advice would be to setup a VM or get a cheap linux VPS if you want to play with node - less headaches and more fun :-) [05:30] JusticeFries has joined the channel [05:33] alek_br has joined the channel [05:34] shinmei has joined the channel [05:35] Figaroo: I don't have the money for a cheap VPS, yet. Eventually I will be doing that. But right now, I just want to be able to play around with Node.js. Do you think cygwin will suffice for that? [05:35] mjr_: Figaroo: cygwin is nice if you know what you are doing, but node only works really well under real Unix. [05:35] mjr_: There are lots of little issues with node on cygwin. I recommend avoiding it if you can. [05:38] bart2 has joined the channel [05:39] rchavik has joined the channel [05:40] Figaroo: could I get some examples of the issues? [05:40] ShizWeaK_: Figaroo: Grab VirtualBox and an Ubuntu iso, you'll be up and running quite quickly if your semi-proficient with linux [05:41] Figaroo: I'm not familiar with linux at all really. Also, I'm running on a notebook which might not be that fast. [05:42] Figaroo: I'd like to get a set up similar to WAMP with Node.JS [05:43] themiddleman has joined the channel [05:46] mjr_: Figaroo: I don't know what specific issues you'll find. I know that people come in here all the time with mysterious issues, and quite often it is because they are on cygwin. [05:46] unomi has joined the channel [05:47] mscdex: node.js v0.2.5 works on cygwin, but cygwin is slow [05:48] mscdex: i think 0.3.x may work also, not sure about the latest master branch version though [05:49] mscdex: the one thing you'll probably need to do though is find gcc 4.4+ for cygwin, which isn't available in the official repositories [05:49] mscdex: so either compile it or find a package somewhere on the net [05:50] mbrochh has joined the channel [05:51] mjr_: Surely running linux under virtualbox is as fast, if not faster than running cygwin, no? [05:51] mscdex: i would guess so, but i haven't done any benchmarks [05:52] Figaroo: mjr_, is it. If so, then I just might go with VB. [05:52] mscdex: virtualbox ftw! [05:53] mjr_: That might be the right answer for you. [05:53] mjr_: It'll certainly make it easier for you to get support. [05:54] Figaroo: Are there many people here using virtualbox running node? [05:55] mjr_: I dunno. But it gives you a real linux environment, not a faked out one like cygwin. [05:56] mjr___ has joined the channel [05:56] ossareh has joined the channel [05:58] mscdex: Figaroo: i do for freebsd and openbsd [05:58] ShizWeaK_: Figaroo: Go with VB, it's great - four people here in my office using it specifically for node [05:58] mscdex: i've run node on linux vms also, but i mainly use a real linux machine for node [05:58] bruce has joined the channel [05:59] Aria: Yeah, I use virtualbox for it often (though I use it natively on the mac most) [06:01] langworthy has joined the channel [06:03] sudoer has joined the channel [06:05] probably_ has joined the channel [06:11] cardona507 has joined the channel [06:17] MikhX has joined the channel [06:18] tapwater_ has joined the channel [06:18] dgathright has joined the channel [06:22] dgathright_ has joined the channel [06:35] stagas has joined the channel [06:40] pydroid has joined the channel [06:47] cardona507_ has joined the channel [06:50] faust45 has joined the channel [06:51] derren13 has joined the channel [06:52] Figaroo: will node ever run on winndows? [06:54] ShizWeaK_: Figaroo: no luck with VB? [06:54] sechrist has joined the channel [06:57] Garo_: hiligts :/ [06:58] andrzejsliwa has joined the channel [06:58] Figaroo: Shizweak, well I'm still hessitent to install VB. [07:00] ShizWeaK_: Figaroo: Why hesitant? [07:01] sivy has joined the channel [07:01] SvenDowideit_ has joined the channel [07:05] amerine has joined the channel [07:09] vineyard has joined the channel [07:09] langworthy has joined the channel [07:10] muk_mb has joined the channel [07:13] Figaroo: ShizWeak, because I feel it might be a heavy program and uninstall badly. [07:14] temp01: Figaroo: btw, I installed cygwin and compiled the latest node some days ago without much problem and special setup [07:14] temp01: I did have one mysterious issue with cygwin but google sorted me out [07:15] temp01: it was some cygwin dll thing [07:16] ibolmo has joined the channel [07:17] mscdex: probably having to do a rebaseall [07:17] temp01: ha yes [07:20] Phyllio has joined the channel [07:20] yozlet has joined the channel [07:20] mscdex: yeah that's common [07:21] temp01: should be in the github wiki page then :/ [07:22] temp01: um, apparently, it's there [07:24] prinzdezibel has joined the channel [07:25] hobodave: anyone using underscore.js with node? I'm trying to and I'm getting this error: ReferenceError: _ is not defined [07:27] temp01: are you doing var _ = require("underscore") as stated in the underscore home page [07:27] Figaroo: temp01, I'm wondering if I should continue installing cygwin or go VB. [07:27] hobodave: temp01: nope [07:28] hobodave: thanks temp01 [07:28] Throlkim has joined the channel [07:28] Figaroo: I guess I will need to run VB anytime I want to develop, run my localhost. Also, will I need my IDE to run in VB? [07:29] skohorn has joined the channel [07:29] temp01: you could share the folders and access the files in windows or something [07:30] temp01: but if you don't have enough memory/power to run two systems at a time then just use cygwin [07:30] dguttman has joined the channel [07:31] Figaroo: temp01, I definitely want to keep things lightweight on my localhost. I only need Node to run for testing/playing at first, then eventually I will create an application on localhost, then finally move that to a VPS. [07:32] shinmei has joined the channel [07:33] captain_morgan has joined the channel [07:35] pydroid has joined the channel [07:37] hobodave: I'm following what seems to be a rather dated tutorial. What is the equivalent of posix.cat? I've figured out that fs is now used in place of posix, but that's it [07:38] SamuraiJack has joined the channel [07:39] hobodave: fs.readFile? [07:41] pydroid has joined the channel [07:41] liar has joined the channel [07:47] ivanfi has joined the channel [07:49] Rixius has joined the channel [07:50] micheil has joined the channel [07:50] fangel has joined the channel [07:52] hobodave: sigh [07:52] sechrist: Has anybody done any kind of event stream processing in node? [07:52] sechrist: like esper [07:52] mscdex: hobodave: i would assume so [07:53] hobodave: mscdex: it doesn't seem to be [07:53] mscdex: hobodave: why are you following such an old tutorial? [07:53] hobodave: mscdex: because it's what I'm trying to do [07:53] mscdex: what's that? [07:54] hobodave: use underscore.js and mustache.js with node.js for simple templating [07:54] hobodave: http://boldr.net/create-a-web-app-with-node [07:57] Rixius has left the channel [07:57] mscdex: you don't really need underscore for that [07:57] Figaroo: I don't understand all these packages for cygwin. :\ [07:57] mscdex: you can easily rewrite the two lines that use underscore [07:58] hobodave: I don't even know quite what they do [07:58] hobodave: is it similar to Prorotypes map() method? [07:58] hobodave: that's some obfuscated for loop right? [07:58] mscdex: more like Array.reduce [07:58] mscdex: or something [07:58] aubergine has joined the channel [07:58] mscdex: or Array.filter [07:59] hobodave: mscdex: so is that finding the first action.path that matches the req.url? [07:59] mscdex: basically [08:00] hobodave: ok I'll get rid of that [08:00] hobodave: I assume _.isEmpty is some all-in-one "false/undefined/null" check? [08:00] mscdex: yeah [08:00] mscdex: it checks to make sure something matched is all [08:00] hobodave: yea that's stupid to include that lib just for that [08:01] masahiroh has joined the channel [08:01] mscdex: a lot of functionality in underscore is already implemented in v8 [08:04] hobodave: mscdex: ok I got rid of that [08:04] hobodave: so my error mscdex is with that last block of code, the posix.cat [08:04] Yuffster has joined the channel [08:04] hobodave: the Mustache.to_html(template, action.view) call is doing something internally and attempting to call indexOf on somethin it shouldnt [08:04] hobodave: presumably the template [08:05] hobodave: I'll paste [08:05] hobodave: https://gist.github.com/743185 [08:05] m14t_ has joined the channel [08:05] EnginA has joined the channel [08:06] hobodave: forgot the error, adding [08:07] hobodave: added error https://gist.github.com/743185 [08:07] hobodave: any ideas whats goin on there mscdex? [08:07] mAritz has joined the channel [08:08] hobodave: wait I think I have it, data is a Buffer, which doesn't have indexOf [08:09] hobodave: but when rendered in the log it shows as a string [08:09] hobodave: that confused me :) [08:09] prinzdezibel has joined the channel [08:09] AAA_awright has joined the channel [08:10] sechrist: so hmm [08:11] beawesomeinstead has joined the channel [08:11] beawesomeinstead has joined the channel [08:11] hobodave: this whole waiting on the 'end' event from the request seems kinda dumb to me [08:12] hobodave: is that really necessary? [08:13] mscdex: hobodave: here's an updated gist (untested): https://gist.github.com/743184 [08:13] mscdex: hobodave: what do you mean? [08:13] d0k has joined the channel [08:14] mscdex: hobodave: node is event-driven, that's how it works [08:14] mraleph has joined the channel [08:14] hobodave: mscdex: well I started with a different example that worked differently [08:14] Druid_ has joined the channel [08:15] hobodave: mscdex: https://gist.github.com/0443368bdaed7c9420ab - I started with this, the sample chat app from socket.io [08:15] mscdex: hobodave: ok, updated the gist again, that should fix the file reading problem [08:15] hobodave: notice that it doesn't do any req.on() or req.addListener [08:15] hobodave: it just directly starts wrting the response. Is that not a good practice? [08:16] mscdex: hobodave: it depends. the client may send you data, unless you want to ignore that every time [08:16] mscdex: if you want to ignore it, you can actually remove the end listener [08:16] hobodave: well I'm getting the data later via socket.io [08:16] delapouite has joined the channel [08:17] hobodave: io.on('connection', ... client.on('message', etc. [08:17] hobodave: thanks for the gists :) [08:18] pydroid has joined the channel [08:21] pquerna: 3 hours 39 minutes. [08:21] temp01: Figaroo: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [08:22] EyePulp has joined the channel [08:23] Figaroo: I just installed them all. :\ [08:23] pydroid has joined the channel [08:26] mscdex: pquerna: amount of sleep? ;-) [08:28] aubergine has joined the channel [08:28] pquerna: mscdex: async event [08:28] pydroid has joined the channel [08:34] hobodave: is it possible to use mustache.js to render

  • 's where you just have 1 value for each item [08:34] hobodave: but with an option you'd have two, the value attribute, as well as the innerHTML [08:38] hobodave: actually I think I might be onto the right path [08:39] tim_smart has joined the channel [08:40] faust45 has joined the channel [08:42] virtuo has joined the channel [08:42] adambeynon has joined the channel [08:44] derren13 has joined the channel [08:45] matjas has joined the channel [08:50] hobodave: got it :) [08:52] GasbaKid has joined the channel [08:52] glenngillen has joined the channel [08:54] mikew3c has joined the channel [08:57] aubergine has joined the channel [08:57] stagas has joined the channel [08:58] simme has joined the channel [09:03] stephank has joined the channel [09:04] Throlkim has joined the channel [09:05] Spion_ has joined the channel [09:09] aklt has joined the channel [09:10] augustl has joined the channel [09:13] hellp has joined the channel [09:14] saschagehlich has joined the channel [09:16] markwubben has joined the channel [09:17] mikedeboer has joined the channel [09:18] qFox has joined the channel [09:19] ilpoldo has joined the channel [09:19] mbrochh has joined the channel [09:19] Figaroo: Do I install things *on* cygwin, or is it only a poxy of sorts? [09:21] stagas has joined the channel [09:21] mikew3c_ has joined the channel [09:22] bahamas has joined the channel [09:23] christophsturm has joined the channel [09:26] case__: Figaroo, ??? [09:27] pydroid has joined the channel [09:27] Spion_: its... both [09:27] Figaroo: I'm trying to get familiar with the concept of cygwin and node running on cygwin/windows [09:27] Figaroo: I mean, is cygwin a virtual machine? [09:27] case__: no [09:27] case__: cygwin is more like wine (but the other way) [09:28] Figaroo: So if I install say, git on my windows machine, cygwin will have access to it? [09:28] Spion_: http://www.cygwin.com/ - as it says on their main page, its a DLL, and tools which provide a unix-like environment [09:28] case__: sure [09:28] Figaroo: When I run cygwin though, I get a bash prompt [09:29] case__: btw, i won't trust cygwin for anything serious... [09:29] case__: yes, it bash. on windows. [09:29] Figaroo: no this is just for me to be able to play around with node. And test before code goes to my VPS which I'll eventually get. [09:29] case__: like you can have bash on linux, freebsd, etc. [09:30] Figaroo: So cygwin is a bash program? [09:30] case__: no [09:30] Figaroo: it's a dll, like a library. [09:30] glenngillen: I've not used windows in a few years, can you not install virtualbox, vmware, or something? [09:30] case__: one of the tools distributed along with the cygwin dll is bash, compiled for windows-cygwin [09:30] Spion_: its a DLL which provides linux API, and a kind-of-a package manager with (precompiled) linux software [09:31] Figaroo: glenngillen, I don't want to install a VM and linux just to run node if I can just use cygwin. :\ [09:31] Figaroo: I see. So with the DLL I can use linux commands in the bash prompt? [09:32] case__: the core of cygwin is the dll, but they provide a lot of software you find in linux distro, like bash or gcc [09:32] glenngillen: Figaroo: that's often my preferred path even on osx, as it means when I do move it onto a VPS I can just look at my history and run the *exact* same commands to get it up [09:32] glenngillen: having a linux vm on my machine has a bunch of other benefits too, but I digress [09:32] Spion_: the dll enables the bash package to work. provides the needed function calls for it. [09:32] case__: with the dll you can compile sources that were written for linux, and they provide binary packages for lots of software like those [09:33] Figaroo: glenngillen, for start I'd like to use cygwin. I haven't even gotten my hands on node yet. [09:33] glenngillen: Figaroo: understood. I'll shut my mouth as I can be of no help then ;) [09:33] Spion_: You can treat cygwin as a package manager, on the outside thats how it looks :) [09:34] Figaroo: So once I compile node through cygwin's bash prompt, it will be able to run on *windows* or will I need to somehow run it through bash everytime I want to mess with Node? [09:34] simme has joined the channel [09:34] case__: Figaroo, if you copy the bash executable from a linux system to you windows-cygwin, it won't run, because it's not the same executable file format, so cygwin is not an emulator. you have to recompile stuff for it. but the cygwin project has recompiled a lot of tools already (see the package manager) [09:34] Spion_: through bash. you will need the environment [09:35] Figaroo: glenngillen, I didn't mean anything by it. Just saying I don't want to jump into linux yet. I feel more confortable with something like cygwin at this point. :\ [09:35] case__: Spion_, i think he only need the cygwin dll... [09:35] Spion_: On the other hand, you can re-package node to run stand-alone, by copying some DLLs to the build dir [09:35] Spion_: case__, I tried it yesterday actually :) [09:35] case__: ho, ok :) [09:35] Spion_: there are some other crypto DLLs missing too [09:35] case__: yes your right, you need some other libs [09:36] Spion_: also, what about the niftyness of npm :D i would not give up that :] [09:36] case__: only staticaly linked bins could be run with only cygwin's dll [09:37] case__: Figaroo, by the way, i see no good reason to avoid bash, it way better than anything else on win32 /troll [09:37] glenngillen: Figaroo: seen this? http://codebetter.com/matthewpodwysocki/2010/09/08/getting-started-with-node-js-on-windows/ [09:37] Spion_: you can however make your batch file to run your server by copying the original cygwin.bat and modifying bash to run another command instead of just providing an interactive shell [09:37] aubergine has joined the channel [09:38] Spion_: (that would give you the ability to e.g. run your node server on startup) [09:40] case__: as i said, i won't use cygwin for anything serious... [09:41] case__: (ok, i won't use windows for anything serious either, so i should probably just STFU) [09:42] Figaroo: Is there any benifit to installing git command-line over tortoise git?' [09:42] koalabruder has joined the channel [09:45] bzinger has joined the channel [09:48] Spion_: Figaroo, you will need the cygwin-provided git to follow the installation instructions, but it might be possible to use tortoise git instead. i'm not sure if tortoise git supports certain commands though [09:49] Figaroo: if cygwin provides a version of git, why is the git command in the bash shell undefined? [09:50] Spion_: if you look at cygwin as a package manager, the conclusion is, the git package is not installed :) [09:50] Spion_: (btw, if say... the bash package is not installed you wouldn't be able to run a bash prompt at all) [09:51] Figaroo: so cygwin doesn't include git? [09:51] Spion_: you can run cygwin.exe any time to install extra packages [09:52] Spion_: (including git) [09:52] ollym has joined the channel [09:52] mies has joined the channel [09:53] Spion_: it will both download and install git for you... have you used a package manager before? [09:54] Figaroo: No I haven't, I'm very new to this stuff. :\ [09:54] Figaroo: so by cygwin.exe you mean the setup.exe/installer? [09:54] Spion_: yes [09:54] mraleph has joined the channel [09:55] Spion_: the concept is similar to, well... hmm... the app store for iPhone, in a way, I guess :) [09:55] Figaroo: so I should just leave that hanging around in my downloads folder. :P [09:55] Figaroo: only with out app icons. ;) [09:55] Spion_: yeah. the app store doesn't really include apps, but it provides a mechanism to download and install apps [09:55] Spion_: setup.exe does the same with cygwin packages [09:56] Figaroo: I see. That's a pretty darn good analogy. Makes it less intemidating. :P [09:56] teemow has joined the channel [09:56] Figaroo: I thought that I installed every package though. I left it to default. [09:57] Spion_: default only includes a minimal environment to get bash and some other stuff running. the node-on-windows guide specifies the other packages needed to install node [09:58] Spion_: (note that if you try to install everything you *will* end up with a 20-30 GB download... ever tried to install everything available in the app store? :D) [09:59] Figaroo: Haha, I see. [09:59] Figaroo: Didn't know cygwin was of that scale. [09:59] Spion_: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) (it mentions devel category -> git) [10:00] Figaroo: So if I run setup.exe again will it over write anything or just add to cygwin? [10:00] Spion_: should just add [10:00] sriley has joined the channel [10:00] tek has joined the channel [10:01] Spion_: (if you decide to deselect packages, it will also remove them, but the packages that are already installed should be selected when its run) [10:02] Spion_: automatically selected that is [10:02] ewdafa has joined the channel [10:02] Spion_: off to work [10:02] isaqual has joined the channel [10:03] Figaroo: okay, thanks Spion. I'm going to read/watch some tutorials too. [10:04] yozlet has joined the channel [10:05] Rv: hmm [10:05] lmorchard has joined the channel [10:05] hobodave: :D [10:05] hobodave: my early real time log viewer is working! [10:05] Rv: i try to use sass for css with express.js [10:05] Rv: anyone know good example of this? [10:12] ph^ has joined the channel [10:13] whyme has joined the channel [10:14] Rv: i add app.use(express.compiler({src: __dirname + '/public/stylesheets', enable: ['sass']})); line in my app.js and create style.css.sass but file style.css not compile [10:16] Rv: any advice? [10:16] themiddleman has joined the channel [10:17] A83 has joined the channel [10:18] ncursestest has joined the channel [10:18] ncursestest: hello :) [10:19] mikedeboer has joined the channel [10:21] bingomanatee: Hey thanks isaacs, wherever you are, even though the last one didn't work out. [10:23] saschagehlich has joined the channel [10:24] daglees has joined the channel [10:24] daglees has joined the channel [10:25] InsDel has joined the channel [10:25] zorzar_ has joined the channel [10:27] flashingpumpkin has joined the channel [10:28] sechrist: knox <3 [10:30] EnginAy has joined the channel [10:37] altamic has joined the channel [10:43] everzet has joined the channel [10:47] MattJ has joined the channel [10:49] shinmei has joined the channel [10:49] spetrea has joined the channel [10:49] linnk has joined the channel [10:52] altamic has joined the channel [11:00] stagas has joined the channel [11:00] yarinb has joined the channel [11:00] GasbaKid has joined the channel [11:01] spetrea has joined the channel [11:02] mr_daniel has joined the channel [11:06] Figaroo: what is npm? [11:07] temp01: node's package manager [11:07] gkatsev has joined the channel [11:07] bzinger: Figaroo: is like apt for ubuntu [11:08] Figaroo: not familiar with it. Sorry very new to all this. :\ [11:09] temp01: it allows you to easily manage node modules. install/uninstall/update etc [11:09] temp01: "npm install module-name" vs "download, set it up manually" [11:11] tpryme has left the channel [11:13] Figaroo: couldn't I just decide not to do it through the command line, go to the site, download it, put it in the correct folder, etc? [11:14] temp01: you could [11:16] Figaroo: but if I use npm, why wouldn't I need to specify a URL? [11:16] temp01: it maps the module names it knows to urls/versions.. [11:17] Figaroo: what if I want to install a module not known? [11:18] Rv has joined the channel [11:18] Rv: hi anyone use sass with express.js? [11:18] temp01: Figaroo: then you do it manually [11:18] temp01: see https://github.com/isaacs/npm/blob/master/doc/npm.md [11:20] Figaroo: I see, where's the registery hosted? [11:20] aubergine has joined the channel [11:21] temp01: the raw file? [11:21] temp01: there's http://npm.mape.me if you want to see all available packages [11:22] fly-away has joined the channel [11:22] Figaroo: why is it called node or node.js? [11:23] aubergine has joined the channel [11:23] temp01: you ask way too many questions [11:23] Figaroo: haha [11:24] Figaroo: Just curious as to *why* people call it Node and not NodeJS or Node.JS? [11:25] aubergine_ has joined the channel [11:30] Figaroo: okay, ./configure step here https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) failed with an error [11:31] Figaroo: said died waiting for dll loading [11:31] Figaroo: errno 11 [11:31] temp01: you probably need to do the rebaseall [11:31] temp01: steps are listed below [11:32] temp01: I don't think you have to restart your pc after btw [11:32] temp01: it worked for me without a restart [11:33] Figaroo: how do I do rebase all? [11:33] temp01: steps are listed below [11:34] temp01: on that building nodejs page [11:34] temp01: under "Unable to Remap to Same Address as Parent" [11:34] daglees__ has joined the channel [11:34] Figaroo: oh sorry [11:36] Figaroo: what is rebase? [11:36] temp01: i don't know, why do you care [11:37] skohorn has joined the channel [11:37] altamic has joined the channel [11:38] TomY has joined the channel [11:38] Rv: anyone use sass with express.js? [11:39] Figaroo: I just want to know what all this about. I like know all the ins and outs [11:48] Figaroo: okay I'm rebooting. then I'll try the steps on the nodejs page [11:51] shinmei has joined the channel [11:53] Figaroo has joined the channel [11:53] Figaroo: back [11:57] sth: How do I get a backtrace in node? [11:58] Figaroo: where is node installed after I follow the windows installation instructions? [11:58] cheney has joined the channel [11:58] cheney: good morning [11:58] oal has joined the channel [11:59] cheney: any idea why http fails on port 80 when I execute this code with node.js? http://prettydiff.com/api.js [11:59] cheney: node is not running right now though [12:00] cheney: when I would execute that code the web server would refuse to return a response [12:00] jvolkman_ has joined the channel [12:00] Figaroo: I'm not much of a node dev, but isn't the code listening to port 8000? [12:01] stagas has joined the channel [12:01] altamic has joined the channel [12:01] cheney: Figaroo: yes, i did that on purpose so that while I am testing I am not disturbing PHP on port 80 [12:02] cheney: i am trying to connect by specifying port 8000 after the domain in the browser [12:02] Figaroo: but you said your http fails on port 80. I assume that it would if your only listening to 8000? [12:03] sriley: firewall? [12:04] cheney: oh crap, sorry that was a typo Figaroo [12:04] cheney: i meant to say port 8000 [12:04] Figaroo: oh [12:04] cheney: my bad [12:04] Garo_: hmm, gotta fix that irssi nick hilight [12:04] cheney: i am currently running 'node api.js' [12:04] Figaroo: does the callback get called at all? [12:05] cheney: so if you connect to http://prettydiff.com:8000/api you should get something, but it will just time out [12:07] cheney: sriley: i guess it could be a firewall issue [12:08] Figaroo: hmm, I'm not quite sure. I haven't gotten node up and running yet. [12:09] Figaroo: I can't seem to find the /etc/resolv.conf file in my cygwin installation. :\ [12:09] temp01: it's not there. you'll have to create it. just follow the instructions [12:09] zentoooo has joined the channel [12:09] Figaroo: oh [12:09] Figaroo: I thought it said it came with it empty [12:10] temp01: (you create it by doing "vi /etc/resolv.conf" then saving it) [12:10] Figaroo: I dont' have vi though. I think I skipped that part [12:10] cheney: Figaroo: then try nano [12:10] cheney: vi = archaic [12:11] Figaroo: so I just created a new text file the good old fashioned way, windows explorer. :P [12:12] Figaroo: how do I install nano again? [12:12] temp01: run setup.exe [12:13] Figaroo: ok [12:13] Figaroo: but I created the resolv.conf file and entered: nameserver 8.8.8.8 [12:13] Figaroo: nameserver 8.8.4.4 now what? [12:13] temp01: you compiled it? [12:14] temp01: i.e. step 3? [12:14] g0 has joined the channel [12:14] Figaroo: yeah I did the make, make install part too [12:14] simme has joined the channel [12:15] temp01: if it finished successfully, you should be good to go [12:15] cheney: hummm, i am not having a firewall issue as I can see the incoming requests on port 8000 in my access logs [12:15] prinzdezibel has joined the channel [12:15] cheney: unless I am accepting incoming and only blocking outgoing [12:15] Figaroo: temp01, good to go where? O.o [12:15] temp01: cheney: i removed the requires on line 2,3,4 and ran your file and it worked for me after accepting a firewall message [12:15] Figaroo: Where's my root directory? [12:16] temp01: it responsed with the 405 message [12:16] g0: hi all! what is the correct way to download a file in nodejs. [12:16] eee_c has joined the channel [12:16] stagas has joined the channel [12:16] Figaroo: Or am I missing something? [12:16] cheney: awesome temp01 [12:17] temp01: Figaroo: nodejs.org [12:18] temp01: you can save the helloworld example at top and run it like shown there [12:18] mrduncan has joined the channel [12:22] g0: is there something as simple as http.urlopen('http://somesite.org/', function(data){ fs.open('somefile.html', 'w', function(err, fd) { fd.write(data)}} ) for downloading a file and saving it? [12:23] christophsturm: g0: I'm using this: https://github.com/technoweenie/node-scoped-http-client [12:24] lstrojny has joined the channel [12:25] pquerna: good morning \o/ [12:26] g0: christophsturm: thanks [12:26] Figaroo: works! [12:26] Figaroo: So does node set up the localhost DNS or is that my wamp server doing that? [12:26] Figaroo: Also, how do I get it to run on port 80? [12:28] temp01: huh [12:29] temp01: you can't figure that out from the example? [12:29] stagas has joined the channel [12:30] fermion has joined the channel [12:30] Figaroo: Sorry, yes I did. But I can't seem to exit out of node's command. [12:30] temp01: ctrl+c [12:31] Figaroo: ah [12:31] matjas has joined the channel [12:32] Figaroo: Is there a reference for how to use node command? [12:32] Figaroo: man node isn't very revealing. [12:32] whyme: node --help [12:33] Figaroo: what's the arguments parameter do? [12:35] mies has joined the channel [12:35] Vertice has joined the channel [12:35] Figaroo: Are there other commands like ctrl+c? [12:35] Figaroo: Ugh, I'm asking to many questions... [12:36] cheney: ctrl+c has nothing to do with node, that is a *nix command [12:36] Figaroo: oh. [12:36] Figaroo: ...I need an idiots guide. --_-- [12:36] jmar777 has joined the channel [12:37] Figaroo: so why is it ctrl+c like copy? [12:37] christophsturm: Figaroo: are you using windows? [12:37] Figaroo: there I go with why again. >.< [12:37] cheney: if you can escape with ctrl+c then you are running node as a user application and not a service, which appears the same until you close out of the console [12:37] Figaroo: cristophsturm, unfortunately. [12:38] Figaroo: cheney, how do I run a script as a service? [12:38] cheney: what OS are you using? [12:38] Figaroo: windows [12:38] cheney: oh that is easy [12:38] unomi has joined the channel [12:38] Figaroo: easy is good [12:38] cheney: start -> administrative tools - > services [12:38] cheney: start new service [12:39] Figaroo: wait, will this mean that node as a server will always be on? [12:39] cheney: yes [12:39] cheney: that is the benefit of using services [12:40] stagas has joined the channel [12:40] cheney: ultimately services are not very different between linux and windows once they are executed [12:40] Figaroo: yeah but, I only want to turn it one when I'm developing. I'm very conservative with my comp's resources. XD [12:40] cheney: a service is a persistent process with unique allocation [12:40] christophsturm: usually you dont run node as a service while you are developing [12:40] cheney: then you do not want to run it as a service [12:41] Figaroo: how do I run it but without needing to execute a node command everytime I change my script? [12:42] cheney: i am not sure as i have not installed node on windows [12:43] cheney: but I would imagine you execute it any possible means other than as a service [12:43] cheney: windows is not inherently service oriented [12:43] Figaroo: on linux/unix do you need to call node command everytime you update your script? [12:43] temp01: Figaroo: your script is the server. you'll have to rerun it every time you change it [12:43] Kami_: Figaroo: there are some scripts which watch your files for changes and automatically restart your service [12:44] Kami_: Figaroo: node-supervisor, node-autorestart and many more [12:46] Figaroo: kami_, which is better? [12:46] marlun: Figaroo: I asked the same question yeasterday and node-dev was the best I found. [12:46] marlun: No changes to code I just have to call node-dev app.js instead of node app.js [12:47] cheney: I changed http://prettydiff.com/api.js to listen on port 80 how would a request trigger that file to execute if I have apache running on port 80? [12:47] marlun: Not sure if those two Kami_ needs that but I found some where you needed to change code. [12:47] marlun: those two Kami_ mentioned... [12:48] Figaroo: Thanks, marlun! I'll go with node-dev then, based off your recommendation. [12:48] marlun: Figaroo: Well, I've just started using node so my recommendation might not be the best :) [12:48] Figaroo: Yes, what happens when I'm running an apache server on 80? [12:48] g0 has joined the channel [12:49] temp01: they both can't bind to the same port/host [12:49] cheney: so I would have to turn apache off first otherwise node would fail silently on port 80? [12:49] temp01: it wouldn't fail silently ;) [12:50] Figaroo: it would make a loud vibrator sound [12:51] Figaroo: what's the resolv.conf file do? [12:51] pquerna: http://jobs.rackspace.com/job/San-Francisco-Deployment-Developer-Job-CA-94110/1069997/ [12:52] temp01: Figaroo: the building pages tells you that [12:52] temp01: building nodejs page [12:52] Figaroo: oh so c-ares library needs that file under /etc ? [12:53] Figaroo: I see. [12:53] prinzdezibel has joined the channel [12:57] Figaroo: curl or wget...hmm. [12:59] torvalamo has joined the channel [12:59] vineyard has joined the channel [13:01] m32311 has joined the channel [13:04] jacobolus has joined the channel [13:05] okuryu has joined the channel [13:08] broofa has joined the channel [13:09] Throlkim has joined the channel [13:13] Figaroo: after I run the node command on my script and exit it using ctrl+c, does that mean everything that script did is garbage collected? [13:14] jashkenas has joined the channel [13:15] xla has joined the channel [13:16] peritus- has joined the channel [13:17] aubergine has joined the channel [13:18] davidc_ has joined the channel [13:19] bruse: Figaroo: when the node process dies all the memory it has been using will be freed by the operating system, if that is what you mean [13:21] Figaroo: bruse, yes that's what I mean. I just want to be reassured that I don't have to do anything after I kill a process. [13:21] tanepiper: It's Alive! ALIVE!!! [13:21] Figaroo: Also, when I run a process is my server public? [13:22] bruse: that depends on your network settings and firewall rules and such [13:22] tanepiper: http://twitter.com/nodemodules lives again! [13:22] torvalamo: nodules [13:23] Figaroo: bruse, how so? [13:23] bruse: Figaroo: well, your node server will probably start listening on a port [13:23] bruse: so anyone who can reach that port has access to it [13:23] Figaroo: I see. [13:23] cafesofie has joined the channel [13:23] bruse: if it's on a public server where everyone can reach that port, then yes, it's public [13:23] Figaroo: So how can I check if I have my ports open to the public? [13:24] bruse: if it's on your laptop that's behind a NAT and a firewall and whatever, then probably not [13:24] Figaroo: it's on a laptop, but Idk about the NAT part [13:24] bruse: you can try to reach it from somewhere else on the internet [13:24] matjas_ has joined the channel [13:25] Figaroo: but which IP would it be under, my routers or my computers. [13:25] ianward has joined the channel [13:25] jmar777: Figaroo: if you don't want it to be public, listen on a loop-back address (e.g., 127.0.0.1, localhost, etc.) [13:26] jmar777: Figaroo: if you want it to be public, listen to '0.0.0.0' or some explicit public IP that is assigned to that server [13:26] aubergine has joined the channel [13:26] Figaroo: jmar777, I've been using loopback, but I'd like to know if someoone has my IP, if they'll be able to access it [13:27] Figaroo: Oh, I guess if I explicitly listen on 127.0.0.1 then my http server wont listen to requests to my IP? [13:29] jmar777: Figaroo: correct [13:29] Figaroo: I see. [13:29] iszak has joined the channel [13:29] iszak has joined the channel [13:30] Figaroo: anyone here use node-dev? [13:31] saschagehlich has joined the channel [13:32] Figaroo: how do I stop node-dev from watching a script? [13:34] boaz has joined the channel [13:34] chapel: stop it [13:34] chapel: ctrl+c [13:35] Figaroo: but what if I'm running multiple node scripts/ [13:35] Figaroo: ? [13:35] chrischris has joined the channel [13:36] [AD]Turbo has joined the channel [13:36] zentoooo has joined the channel [13:38] chapel: idk Figaroo [13:39] chapel: node-dev -help doesn't give any info about that [13:43] pHcF has joined the channel [13:44] Figaroo: chapel, I think it's node-dev stop node-file.js [13:44] skm has joined the channel [13:44] skm has left the channel [13:44] arpegius has joined the channel [13:45] skm has joined the channel [13:45] skm: Script.runInNewContext <- does this have access to require()? or do i need to pass it in the sandbox arg? [13:45] skm: i've tested it and it seems it doesnt [13:46] skm: but i just want to make sure [13:46] skm: i will be executing javascript functions provided by users (data manipulation app) [13:46] skm: and want to ensure they can't do anything bad [13:52] strixv has joined the channel [13:55] jmar777: skm: my understanding is that the code will indeed by sandboxed, and will only have access to whatever you pass in threw the sandbox parameter. just make sure that require can't be accessed via something you pass in [13:55] Figaroo: I'm confused on where Node is installed. [13:55] jmar777: skm: also make sure that you're catching any errors that could be thrown, such as syntax errors, otherwise they could kill your process [13:56] jmar777: skm: personally I would probably launch a child_process in your case and use that to do the Script.runInNewContext to provide full isolation [13:56] jmar777: Figaroo: how did you install it? what OS? [13:57] jmar777: Figaroo: try typing 'which node' in the command line [13:59] Figaroo: which node prints /usr/local/bin/node [13:59] Figaroo: I'm using cygwin [13:59] whyme: Figaroo: you might need to learn more about UNIX-y stuff [14:00] Figaroo: whyme, yeah, you're telling me. xP [14:01] Figaroo: I'm just wondering if I should remove the node git repository I downloaded [14:01] jmar777: Figaroo: /usr/local/bin/node is going to be relative to Cygwin's root. been awhile, but I believe that defaults to something like C:\cygwin [14:01] whyme: better not, since you gonna need it when uninstalling node [14:02] whyme: and it's easy to upgrade via git [14:02] hoeru has joined the channel [14:02] whyme: disk is cheap anyway [14:02] Figaroo: jmar777, you're correct. But /usr/local/bin/node only contains an .exe [14:03] whyme: there's no such thing as C:\Program Files\Foo under UNIX-like OS [14:03] jmar777: Figaroo: hmm... never build node on Cygwin but I assume that's the actual node executable. It's anyone's guess where you put the git repo lol [14:03] Figaroo: I put it under /home/UserName [14:04] Figaroo: of course /home is really C:/cygwin/home [14:04] jmar777: Figaroo: i'm confused about what your question is then... it sounds like you know where everything is at [14:04] Figaroo: My question is whether node is using the git repository? [14:04] Figaroo: sorry I didn't make that clearer, it's 6:04 am xP [14:04] jmar777: Figaroo: how did you install it? I'm guessing you did a git clone somewhere, and then ran a build script? [14:05] Figaroo: Yeah I basically followed this: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [14:06] jmar777: Figaroo: then yes (sort of). it would have used the git repo to actually build the executable. when you actually run node, it's going to only use the executable though. so if you were to delete the git repo, you'd be ok unti you needed to build again [14:06] Dave has joined the channel [14:07] Fullmoon has joined the channel [14:07] Figaroo: when will I need to build again, what is build exactly? [14:07] Figaroo: is build the make unix command? [14:07] jmar777: Figaroo: that's what happened when you did the "make", "make install" [14:08] Figaroo: Oh so it takes the source and compiles it into binaries? [14:09] jmar777: Figaroo: yep [14:09] Figaroo: Where does it put the binaries? [14:09] jmar777: /user/local/bin/node [14:10] Figaroo: oh I see [14:10] mAritz: s/user/usr/ [14:10] tanepiper: you may be better doing on build [14:10] Figaroo: so I should only keep the node repo for the source [14:10] tanepiper: ./configure --prefix=$HOME/local [14:10] tanepiper: then it will install to /home//local/bin/node [14:11] Figaroo: ACTION confusion [14:11] tanepiper: that way, you don't need to run it as sudo and it's installed in one place [14:11] jmar777: mAritz: thx [14:11] amacleod has joined the channel [14:12] Figaroo: uh, so in other words the git repo is only the source right now, and I can just delete it, and if I ever want to rebuild it (for w/e reason) I can just do a git clone agian. Am I getting this? [14:13] Guest36761: hello! [14:13] Guest36761: I've a quick question on a Cygwin install, if anyone has a minute? [14:13] Guest36761: Dave here [14:14] Figaroo: you can change your nick to Dave if you want with /nick dave [14:14] jmar777: Figaroo: yes... which is pretty likely if you plan on continuing to use node. I wouldn't bother removing the git repo unless you really need the space [14:15] Guest36761: ah OK, cheers [14:15] Figaroo: jmar777, I'll keep it for now, until it bothers me enough. :P But what about npm repo, will I be building that much? [14:15] Figaroo: dave_m, what's your question? [14:16] dave_m: I was trying to install node.js through cygwin, going by the instructions on gitbuh [14:16] dave_m: *github [14:16] jmar777: Figaroo: i haven't used npm, but i hear good things about it. i have no idea how often it needs to be rebuilt though. [14:16] Figaroo: meh, i'll keep it too then. [14:16] Figaroo: dave_m and? [14:16] dave_m: & when I get try to run the make command, I get: [14:16] dave_m: 'Project not configured (run 'waf configure' first) [14:17] dave_m: (sorry for the slow typing speed) [14:17] Figaroo: did you run ./configure? [14:17] jmar777: dave_m: cd into your node directory, and type './configure' [14:17] dave_m: yes, I'm in node dir [14:17] dave_m: & have ran ./configure [14:17] dave_m: which executes without errors or message [14:17] dave_m: but then doesn't accep the make command [14:17] davidsklar has joined the channel [14:18] dave_m: Is 'waf' a package that I should have installed for cygwin? [14:19] dave_m: someone mentioned on a forum that it could have a windows version of python installed rather than Cygwin version [14:19] dave_m: but I've installed Python through Cygwin [14:19] Figaroo: well, I have to go to bed now. good luck dave_m, these guys should help, they've helped me so much. :) Thanks everyone for your great support to a noob like me. :P I've came out a smartter man through all this. [14:19] dave_m: thanks Figaroo [14:20] dave_m: goodnight! :) [14:20] Figaroo: gnight all! [14:20] Figaroo has left the channel [14:20] emerleite has joined the channel [14:23] cferris has joined the channel [14:27] hunterloftis: Hey guys what's the deal with mongoose? All the examples are in a single document, but when we try to split into separate docs using the same flow we get weird bugs - for example, the mongoose.connect() statement seems like it's supposed to be tied to a particular model, and it also connect immediately instead of using a lazy connect, and multiple connects used even in separate files/objects all collide and end up using the [14:27] hunterloftis: same connection. [14:28] hunterloftis: We're trying to use several separate /models files, each using mongoose [14:31] ysynopsis has joined the channel [14:32] jherdman has joined the channel [14:34] simme has joined the channel [14:35] Floxxx has joined the channel [14:36] boaz has joined the channel [14:36] ben_alman has joined the channel [14:39] beta has joined the channel [14:44] altamic has joined the channel [14:48] kenbolton has joined the channel [14:52] dnolen has joined the channel [14:54] xla has joined the channel [14:55] xla has joined the channel [14:55] kdridi has joined the channel [14:56] kdridi has left the channel [14:56] kdridi has joined the channel [14:56] kdridi: hello [14:56] xla has joined the channel [14:56] kdridi: i was wondering which mysql connector has the "best" performance ? [14:57] thear has joined the channel [14:57] kdridi: do i have to chose a native one or a pure js one [14:57] kdridi: ? [14:57] JusticeFries has joined the channel [14:58] wink_: kdridi: i dunno if there is a c binding, but that'd definitely be the fastest way to go [14:59] wink_: kdridi: i have an odbc binding that could work for you, its pretty basic at the moment, but it'd hit a mysql db and likely be far faster than a js implementation [14:59] wink_: but its missing alot of features [14:59] aheckmann has joined the channel [15:00] kdridi: wink_, hum... i understand [15:00] WhenRaptors has joined the channel [15:00] kdridi: wink_, by the bay, apparently https://github.com/Sannis/node-mysql-libmysqlclient/ is a native client, isn't it ? [15:01] jchris has joined the channel [15:01] hlindset has joined the channel [15:01] wink_: kdridi: at a glance, sure looks like it [15:01] Engin has joined the channel [15:02] kdridi: wink_, i think i'm going to try that solution :) [15:02] wink_: kdridi: it looks reasonable, i bet it'll work like a charm :> [15:02] kdridi: wink_, i was thinking that perhaps the pure js would have poor performance but by introducing some async request it would be better [15:03] wink_: kdridi: even the c binding should be performing async [15:03] akahn has joined the channel [15:03] wink_: thats one of the trickier bits about writing node bindings [15:03] kdridi: wink_, you might be right :) [15:03] mAritz: hey, do you have any other sites than ajaxload.info for generating loading animations? ajaxload has problems with the transparent background option in most cases [15:04] kdridi: ow! one more question :p have you ever tried http://js.io [15:04] kdridi: i had a look at it but i couldn't understand a word :) [15:05] kdridi: the docs are quite poor :/ [15:05] wink_: kdridi: i havent :< [15:05] kdridi: ^^ [15:05] kdridi: wink_, you're working on a particular project ? [15:06] wink_: a few :>, some for fun, some professionally [15:07] kdridi: wink_, but nothing relatted on https://github.com/ry/node/wiki/modules ? [15:07] wink_: kdridi: yeah it looks like that binding should be async just like a js implementaiton, its using the libeio thread pool to do blocking things [15:08] kdridi: wink_, ha ? cool :) [15:08] wink_: kdridi: nothing in that list, i have a fork of one of those modules, but most of my github is stuff i've needed for work [15:08] kdridi: wink_, he :) [15:09] dilvie has joined the channel [15:09] kdridi: wink_, thx a lot for your precious advices, i have to come back to work :p [15:09] kdridi: wink_, see you ! [15:09] wink_: np! good luck with it :> [15:09] kdridi: thx ^^ [15:09] kdridi has left the channel [15:10] jchris has joined the channel [15:12] matjas has joined the channel [15:12] mies has joined the channel [15:14] EyePulp has joined the channel [15:14] eee_c has joined the channel [15:17] booths has joined the channel [15:18] jaw6 has joined the channel [15:20] eee_c1 has joined the channel [15:21] mikew3c_ has joined the channel [15:23] pdelgallego has joined the channel [15:24] BillyBreen has joined the channel [15:24] trotter has joined the channel [15:30] paulrobinson has joined the channel [15:33] femtoo has joined the channel [15:36] davglass has joined the channel [15:37] Esherido has joined the channel [15:37] romeo_ordos has joined the channel [15:38] wasabist has joined the channel [15:38] Spion__ has joined the channel [15:38] MikhX has joined the channel [15:39] rwaldron has joined the channel [15:39] pHcF: algum brasileiro aqui? [15:39] kenbolton has joined the channel [15:43] jchris1 has joined the channel [15:45] cnus8n has joined the channel [15:55] d3x7r0 has joined the channel [15:55] dmcquay has joined the channel [15:56] matt_c has joined the channel [15:56] matt_c has joined the channel [15:58] matt_c has joined the channel [16:00] herbySk has joined the channel [16:01] cferris has joined the channel [16:03] jakehow has joined the channel [16:04] d3x7r0: I'm wondering if someone can help me out with this: I'm trying to reply to every open request with a 500 when an uncaught exception is triggered. I was trying to setup a pool of open requests but I can't get any event to figure out when to get them out of the pool. [16:06] ibolmo has joined the channel [16:06] dgathright has joined the channel [16:07] torvalamo: you should just catch the exceptions [16:07] torvalamo: even if that means making a catch-all in the request handler that just spews out 500's [16:09] d3x7r0: Yeah. I only have this problem cause I'm using cradle as a wrapper for couchdb and it doesn't deal with a refused connection (when couchdb is down for example) [16:09] sonnym has joined the channel [16:10] torvalamo: can't you make a connection handler that checks the availability for you? [16:10] torvalamo: keep the problem where the problem is [16:10] torvalamo: don't force other modules to care [16:10] d3x7r0: It's not meant to be down, I'm just getting ready for the day when it might fail :P [16:10] torvalamo: the day it might fail you restart your server [16:11] eee_c has joined the channel [16:11] slaskis has joined the channel [16:12] d3x7r0: why obviously but I'm not up 24hours a day :P [16:12] torvalamo: no, but run your server under nodemon and you won't have to be [16:13] torvalamo: google "nodemon node.js" [16:13] d3x7r0: hehe true story. :) [16:13] torvalamo: cuz there are two [16:13] mjr___: Rackspace bought cloudkick, I hear? [16:13] jamund has joined the channel [16:13] torvalamo: there's one nodemon which is a cluster/server farm monitor and there's one for node.js [16:14] malkomalko has joined the channel [16:15] daniellindsley has joined the channel [16:15] Engin has joined the channel [16:21] christophsturm has joined the channel [16:23] dguttman has joined the channel [16:24] Insanity5902 has joined the channel [16:25] Anti-X has joined the channel [16:27] probably_ has joined the channel [16:27] tisba has joined the channel [16:27] zomgbie has joined the channel [16:28] deepthawtz has joined the channel [16:32] kevm_ has joined the channel [16:33] davidc_ has joined the channel [16:34] mjr_ has joined the channel [16:37] pzich has joined the channel [16:37] dguttman_ has joined the channel [16:37] sprout has joined the channel [16:40] tjholowaychuk has joined the channel [16:41] glenngillen has left the channel [16:41] tylerstalder has joined the channel [16:45] EyePulp: so let's say I'm trying to eliminate express from the equation on some debugging, and I really only need some simple routing - is node-router still a going project, or is there a better choice? [16:46] MikhX has joined the channel [16:49] mies has joined the channel [16:51] quest88 has joined the channel [16:51] fangel: EyePulp: there is all these: https://github.com/ry/node/wiki/modules#web-frameworks-routers (I've used Choreographer personally, pretty easy to use and their code is dead simple too) [16:52] EyePulp: fangel: thanks for the pointer - are you running choreographer under the current trunk of node? [16:52] tjholowaychuk: EyePulp: plain http.Server and a regexp will do just fine [16:53] fangel: EyePulp: nope.. on a 0.2.4 [16:53] EyePulp: tjholowaychuk: I was headed that way, but thought there's probably a safer route [16:53] EyePulp: safer than my stumbling efforts, at least. [16:54] ibolmo has joined the channel [16:54] fangel: but in my quick review of the code for Choreographer I didn't find anything that screamed "won't work on 0.3.x".. so give it a quick try :) [16:55] jpick has joined the channel [16:55] mjr_: It's really a worthwhile exercise to make your own framework with node's core API. [16:55] mjr_: Then you understand how the parts fit together, and you appreciate an actual framework more. [16:56] fangel: true.. [16:58] zemanel has joined the channel [16:58] stagas has joined the channel [16:58] EyePulp: mjr_: I can agree with that - but don't have the luxury of the time. Plus, it's not as though everyone is diving into node's source to build their own version. Everyone picks the point at which they'll trust another developer. [16:58] mjr_: oh sure [16:58] EyePulp: but your point on routing is a fairly strong one. [16:58] saschagehlich: tjholowaychuk: I have to annoy you again regarding connect.js :/ Did you have a look at the "wrong routing" bug I mentioned a few weeks ago? [16:58] saschagehlich: my users are going angry because of that :( [16:59] tjholowaychuk: i looked at it a bit, super low on time though [16:59] mjr_: I contend that it'll ultimately save you time, but the payback is not always immediate. [17:00] saschagehlich: tjholowaychuk: is anyone else working on connect? [17:00] tjholowaychuk: saschagehlich: not really no [17:00] tjholowaychuk: odd patch here and there [17:00] jdalton has joined the channel [17:01] alek_br has joined the channel [17:01] stagas: hmm is there a way for connect.session to forget when I restart the browser? I want sessions during browsing but not persisting on restart [17:02] m14t has joined the channel [17:02] tjholowaychuk: stagas: you can .destroy() them [17:03] slaskis has joined the channel [17:03] stagas: tjholowaychuk: on server side? how do I know if the user restarted [17:03] brianleroux has joined the channel [17:03] stagas: ah perhaps a second cookie [17:04] aubergine has joined the channel [17:04] tjholowaychuk: not sure what a good solution would be [17:04] tjholowaychuk: ive never wanted that [17:04] hellp has joined the channel [17:04] tjholowaychuk: you could alter the session fingerprint to something short-lived [17:06] tjholowaychuk: or just a short maxAge, it will keep reseting when the user is active [17:08] stagas: but won't I lose the req.session data [17:08] cjm has joined the channel [17:08] Eber has joined the channel [17:09] hobodave has joined the channel [17:09] Floxxx: you could do an ajax post on unload @ stagas [17:09] tjholowaychuk: you should [17:10] Eber: guys. which package do I have to install in order to use node.js with TLS support?!? [17:10] ryah: Eber: nothing really works at the moment [17:10] Floxxx: Eber: nginx? ;) [17:10] elphia has joined the channel [17:11] Eber: ryah: but there are some modules that relly on it, right? [17:12] emerleite has joined the channel [17:12] elphia has joined the channel [17:13] rauchg_ has joined the channel [17:13] broofa has joined the channel [17:13] saschagehlich: tjholowaychuk: if I put a * into the regex, how can I access the value inside the callback? [17:14] elphia has joined the channel [17:14] tjholowaychuk: saschagehlich: req.params is an array [17:14] tjholowaychuk: so [n] [17:14] aurynn has joined the channel [17:15] saschagehlich: tjholowaychuk: well, "/download/:token/*.:format" only gives me the :format inside the callback [17:15] shinmei has joined the channel [17:17] hunterloftis: In mongoose, what does the "hydrate" option do? I'm not familiar with the idea of hydration. [17:17] tjholowaychuk: works for me, I get [ 'bar', format: 'foo' ] [17:17] tjholowaychuk: oh wait no because i had foo.bar [17:17] tjholowaychuk: haha [17:17] tjholowaychuk: thats not right [17:17] shinmei has joined the channel [17:17] tjholowaychuk: the splats basically just turn into (.*?) [17:18] EyePulp: fangel: choreographer seems to do the trick - thanks for the pointer [17:18] fangel: no worries :) [17:18] tjholowaychuk: saschagehlich: you can name capture groups now though '/download/:file(*)' [17:18] tjholowaychuk: but that doesnt help the format thing [17:19] noahcampbell has joined the channel [17:19] jkreeftmeijer has joined the channel [17:19] cardona507 has joined the channel [17:20] aconbere has joined the channel [17:20] saschagehlich: well, what confuses me is that '/download/:token/:file' does not match /download/3rSn0/foo.mp3 [17:21] hoeru has left the channel [17:21] tjholowaychuk: yeah because the regexp turns into something that wont clobber .:format [17:22] tjholowaychuk: so we basically just need to lookahead and see if .:format is present [17:22] tjholowaychuk: and alter the regexp [17:22] tjholowaychuk: but it would be different with .:format? [17:22] jkreeftmeijer_ has joined the channel [17:22] tjholowaychuk: so the issue is a bit more involved [17:23] peritus- has joined the channel [17:23] msekimura has joined the channel [17:24] saschagehlich: tjholowaychuk: well yes, with .:format it works unless i've got a . inside :filename [17:24] saschagehlich: so like my.file.mp3 [17:24] tjholowaychuk: yeah i know [17:24] tjholowaychuk: that is what im talking about [17:24] EGreg_ has joined the channel [17:24] EGreg_: hey guys good news [17:24] EGreg_: I'm almost done with my two super powerful functions :) hehe [17:26] amerine has joined the channel [17:26] ph^ has joined the channel [17:30] mjr_ has joined the channel [17:30] robotarmy has joined the channel [17:31] dgathright has joined the channel [17:32] robotarmy has joined the channel [17:33] EyePulp: fangel: any advice on serving static directory content via choreographer? [17:34] robmason has joined the channel [17:34] fangel: hmm.. you might be able to combine it with node-static or similar.. but I haven't looked into it.. [17:35] EyePulp: no worries [17:36] sprout has joined the channel [17:36] isaacs has joined the channel [17:37] joshpeek__ has joined the channel [17:38] joshpeek__ has left the channel [17:40] rburhum has joined the channel [17:40] slloyd has joined the channel [17:40] fangel: EyePulp: yeah, you totally could.. :) do a macro-function like var static = require('node-static'); function static( directory, options ) { var fileServer = static.Server( directory, options ); return function( req, res ) { req.addListener('end', function() { fileServer.serve(res,req) }); } - and then you can do something like router.get('public', static(__dirname + '/public')); (all code written in irc client, so verify first) [17:40] EyePulp: heh [17:41] fangel: bah [17:41] strixv has joined the channel [17:41] EyePulp: you overrode static there I think =) [17:41] fangel: yeah, code borked, because I called the function the same as I loaded the library is :) [17:42] fangel: *as [17:42] fangel: well, you should be able to work out what I meant, anyways.. :) [17:42] MikhX has joined the channel [17:43] Druid_ has joined the channel [17:43] jakehow has joined the channel [17:43] Druid_ has joined the channel [17:44] mscdex: node.js rules! [17:44] cloudhead has joined the channel [17:45] davglass has joined the channel [17:45] pdelgallego has joined the channel [17:45] sriley has joined the channel [17:46] Druid_ has joined the channel [17:46] herbySk has joined the channel [17:47] desaiu has joined the channel [17:48] ryah: ACTION wonders if mscdex has a script that says that [17:48] mscdex: nonsense! [17:49] Gregor: Idonno, a person capable of running Node.js off a CD in DOS is capable of anything ... [17:49] eee_c has joined the channel [17:50] mscdex: usually it's said after a productive coding session with node [17:50] mscdex: :D [17:51] jacobolus has joined the channel [17:52] _jdalton has joined the channel [17:53] ryah: :) [17:53] ryah: ACTION just made something with node [17:53] ryah: always amazed it actually does stuff [17:53] halfhalo: lol [17:54] jamesarosen has joined the channel [17:54] pquerna: good morning sir ryan [17:54] jchris1 has joined the channel [17:54] chapel: what did you make ryah ? [17:54] ryah: pquerna: good morning and congradulations [17:54] chapel: I am always amazed at how easy it is to make it do things that in c/c++ would be much harder, and the performance is comparable or better [17:55] ryah: chapel: i'll tell you when it's done [17:55] chapel: harder/longer [17:55] JusticeFries_ has joined the channel [17:55] davidc_ has joined the channel [17:56] banjiewen has joined the channel [17:57] tek has joined the channel [17:57] femtoo has joined the channel [17:57] tisba_ has joined the channel [17:57] creationix has joined the channel [17:59] mraleph: when I write in JS I can't stop seeing dreadful pictures of overhead it induces compared C :-) [17:59] dgathright has joined the channel [18:00] robotarmy has joined the channel [18:00] desaiu: Why isn't node.js ready to replace an http server like nginx? [18:00] aguynamedben has joined the channel [18:00] creationix: mraleph: go read some v8 source, there is a lot of JIT code in there [18:00] tjholowaychuk: creationix: I believe he works on v8 lol [18:00] tjholowaychuk: for a living [18:00] mraleph: creationix: doing that everyday and sometime at night ;-) [18:01] creationix: mraleph: sorry, nevermind [18:01] bentruyman has joined the channel [18:01] creationix: but my point is there are certain cases where it seems actually faster than simply written c code [18:01] desaiu: or just ignore me, maybe my question sucks [18:02] creationix: desaiu: in what sense [18:02] chapel: desaiu: I agree, I think node could be used as a server like nginx, might take some time to mature though [18:02] creationix: I replaces my nginx with node about a year ago [18:02] creationix: and node is a lot stabler now [18:02] Phyllio has joined the channel [18:02] creationix: *replaced [18:02] chapel: I dont know enough about the performance stuff and haven't pushed node or js enough to worry about it [18:02] ryah: mraleph: agreed [18:02] ryah: i hate gc [18:02] creationix: yeah, the GC is the real pain [18:03] mraleph: sorry guys [18:03] mraleph: will be fixink [18:03] mraleph: eventually [18:03] mraleph: :-) [18:03] creationix: mraleph: I [18:03] creationix: I'm not sure what you can do, I mean the language is pretty hard to optimize [18:03] creationix: it's so freakin' dynamic [18:03] ryah: better gc will be great [18:03] ryah: (still more than nothing) [18:03] jmar777: mraleph: until then, it's your fault. cheers [18:04] creationix: does crankshaft have a new gc, or use the old one? [18:04] sechrist has joined the channel [18:04] mraleph: old one. [18:05] jmar777: ryah: i think my actual pull request needs to be updated, but have you had a chance to look at http://groups.google.com/group/nodejs-dev/browse_thread/thread/d926c3ab9e96d470 (url.parse update) [18:05] mraleph: we started brewing new one in experimental\gc branch [18:05] creationix: cool [18:05] creationix: I'm glad you guys are still innovating [18:05] tisba has joined the channel [18:06] creationix: it's a shame we can't create a new language that's easy to optimize. Those things just don't stick [18:06] isaacs: i'm quite glad that node gets to piggy back on such a kickass vm [18:06] creationix: isaacs: yeah, could you imagine if we had to maintain and write the vm ourselves [18:06] isaacs: srsly [18:06] isaacs: or the *language*? [18:06] isaacs: gah. [18:06] isaacs: i don't know how ruby or python get ANYTHING done. [18:07] creationix: they had YEARs [18:07] isaacs: i mean, it kinda makes the jvm languages make a lot of sense, when you think about it [18:07] mw has joined the channel [18:07] isaacs: they get to just focus on the language, not the stdlib or the vm [18:07] creationix: true, java has a nice stdlib [18:07] isaacs: s/nice// [18:08] isaacs: but yeah [18:08] creationix: s/nice/large/ [18:08] isaacs: right [18:08] isaacs: there are nice bits [18:08] creationix: the maturity is nice [18:08] creationix: especially compared to something new like node [18:09] creationix: though the v8 debugging protocol helped us a lot with that [18:09] creationix: oh, now I remember why I came in here. And it wasn't to stick my foot in my mouth 3 times in a minute [18:10] creationix: I wanted to ask about my inspect patch proposal [18:10] shimondoodkin has joined the channel [18:10] shimondoodkin has joined the channel [18:11] matjas has joined the channel [18:12] tanepiper: hey isaacs, it took me a couple of months to find the time, but I finally fixed @nodemodules so it won't hammer your couch instance :D [18:12] Somebi has joined the channel [18:13] Somebi has joined the channel [18:13] sechrist: inspect is broken? [18:13] Somebi: hello everyone [18:13] shimondoodkin: hello [18:13] Somebi: How to check if file exists? [18:13] Somebi: Sync [18:14] Somebi: can't figure out :) [18:14] sechrist: also lol,, I am so slow to write python. It's format/syntax makes me write code terribly slow unless I manually configure .vimrc on every server we have [18:14] sechrist: which I can't [18:14] booths has joined the channel [18:14] sechrist: so, *type line*. *enter* *space* *space* *space* *space* *space* *space*, repeat [18:15] yozlet has joined the channel [18:15] shimondoodkin: Somebi look at the manual at nodejs.org something like path.exists [18:16] Somebi: oh so it's path method [18:16] creationix: sechrist: not broken, I just want to add an enhacement [18:16] Somebi: i was looking in fs. [18:16] Somebi: thanks for the tip ;) [18:16] creationix: Somebi: statSync works too [18:16] creationix: just wrap it in a try..catch [18:16] Somebi: yea i was thinking the same ;) [18:17] Somebi: but it's more *dirty* [18:17] dmcquay has joined the channel [18:18] SvenDowideit has joined the channel [18:18] m14t_ has joined the channel [18:18] shimondoodkin: i have a strange problem i have 3 similar instances running thru haproxy to node v0.3.0 on different ports. the problem is that it executes a function randomaly different instances. could it be because of a bug in nodejs v0.3 ? [18:19] shimondoodkin: s/thru/through [18:19] shimondoodkin: maybe a shared cache [18:20] altamic has joined the channel [18:21] shimondoodkin: when i access the production instance it sends and asms as it was sent usind the development enviorment [18:21] shimondoodkin: s/ands and asms/ it sends an sms [18:21] cferris has joined the channel [18:21] shimondoodkin: randomaly [18:22] creationix has left the channel [18:24] bentruyman has joined the channel [18:27] matt_c_ has joined the channel [18:27] tmedema has joined the channel [18:27] tmedema: Hi folks, just posted a thread asking about dns and subdomains, if anyone is interested :) http://groups.google.com/group/nodejs/browse_thread/thread/fdf720ad3c050f25 [18:30] spetrea_ has joined the channel [18:30] brianleroux has joined the channel [18:30] shimondoodkin: clue: there are two dns servers implementations currently on github [18:30] murz has joined the channel [18:30] altamic has joined the channel [18:32] stagas: tjholowaychuk: I used a second cookie with null expire. if it isn't there then user restarted browser. [18:33] tjholowaychuk: stagas: cool cool [18:33] Floxxx: somehow i never got that to work with node [18:34] Floxxx: if i didn't set an expire it would log me off at random intervals [18:34] Floxxx: might have something to do with socket.io though, i use the session from there aswell [18:35] spetrea has joined the channel [18:35] tmedema: shimondoodkin: mDNS? [18:36] zomgbie has joined the channel [18:37] shimondoodkin: ndns [18:37] shimondoodkin: https://github.com/skampler/ndns [18:38] strmpnk_ has joined the channel [18:38] shimondoodkin: tmedema:there was also another one [18:39] tmedema: shimondoodkin: that's great, but I'm not very experienced with dns and it does not seem to have any documentation. Do you think I can use ndns to achieve my goal? [18:39] shimondoodkin: i thinkn you better set up a bind dns [18:40] tmedema: shimondoodkin: does that mean that I don't need ndns? [18:40] shimondoodkin: tmedema:another very simple https://github.com/abrown28/node-dns but there wasn another one little more complicated i think by david [18:41] tapwater has joined the channel [18:42] shimondoodkin: tmedema: i mean it might be not very practical to use node js as dns server it will not give you a result right away. [18:42] shimondoodkin: better to use some standart linux dns server [18:42] reid has joined the channel [18:42] tmedema: shimondoodkin: like bind? that'll allow me to create a database with subdomains and their "nameservers"? [18:43] shimondoodkin: yes [18:43] cagdas has joined the channel [18:44] tmedema: shimondoodkin: alright, so then I can just use node.js to create a new database entry - could you tell me how difficult it would be for me to setup this bind system? I'm not experienced with dns at all - not sure where to look either [18:44] yonkeltron: is it wrong to user caller? [18:44] mikeal has joined the channel [18:45] cagdas has left the channel [18:45] shimondoodkin: yonkeltron: arguments.caller is depriciated by fire fox developers team https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/arguments/caller [18:45] yonkeltron: but function panda() { return panda.caller; } is ok, right? [18:46] jchris1 has joined the channel [18:46] aconbere has joined the channel [18:46] mjr_: tmedema: if you don't know about DNS, I'd recommend getting it hosted somewhere. [18:46] mjr_: DNS hosting is usually thrown in for free from a lot of domain registrars. [18:47] shimondoodkin: tmedema: you can setup a wild card dns like *.yourdoamin.com [18:47] pquerna: api driven dns hosting. [18:47] pquerna: think about it. [18:47] tmedema: mjr_: did you read about my service? [18:47] EnginA has joined the channel [18:47] mjr_: No, I didn't. [18:47] mscdex: yonkeltron: if you want to access the caller use arguments.callee.caller [18:47] ossareh has joined the channel [18:47] mjr_: tmedema: oh, you want to automatically generate new DNS entries from your program. [18:48] tmedema: shimondoodkin: I have that setup already, the problem is that you cannot make subdomains point to external servers that way (by letting the users set their own nameservers) [18:48] yonkeltron: mscdex: i thought callee was wrong? [18:48] tmedema: mjr_: yes, I want to let my users register a free subdomain and make it point to their server by setting their own nameservers [18:48] mscdex: yonkeltron: callee refers to the function itself [18:48] mjr_: tmedema: BIND is a giant pile of extra baggage. I've had good results with tinydns, but there are others. [18:48] aschw has joined the channel [18:48] tmedema: mjr_: what about node.js? [18:49] pquerna: nds [18:49] pquerna: er, nsd. [18:49] mjr_: Yeah, or nsd. Stay away from BIND though. [18:49] pquerna: anyways, if you just want to make a somewhat easy way to have an api driven dns server [18:49] pquerna: we have been using zerigo for 6 months [18:49] pquerna: and love it [18:49] chapel: tmedema: http://www.pointhq.com/ [18:50] chapel: they have an api [18:50] pquerna: http://www.zerigo.com/docs/apis/dns/1.1 [18:50] mjr_: pquerna: I didn' tknow about zerigo. That looks pretty cool. [18:50] mjr_: except XML. Sad. [18:50] pquerna: mjr_: you can also push zone transfers to them.. we actually have a twisted thing that pushes zones straight to them :) [18:51] tmedema: Please keep in mind that I want to allow my users to create thousands of domains, not sure if an external service is a good way of doing this [18:51] pquerna: xml is easy enough in python :) [18:51] mjr_: you kids and your python. [18:51] mscdex: ACTION shakes a fist at xml [18:51] eee_c1 has joined the channel [18:51] pquerna: tmedema: right, but the techinques are the same -- in all cases, you build a zoen file [18:51] aurynn: you xml and your pythons! [18:52] pquerna: tmedema: the difference is, do you push it to your own nsd machines, or to a 3rd party [18:52] tmedema: pquerna: not sure about that, I heard that I can use a database instead of changing zone files so many times [18:52] pquerna: or you can finish node-dns, which would be awesome for other reasons) [18:52] pquerna: tmedema: well, things like PowerDNS can use mysql backends. [18:52] mjr_: It would certainly be the most fun to do it all iln node. [18:52] pquerna: +1 [18:52] yonkeltron: mscdex: jslint says arguments.callee is bad [18:52] shimondoodkin: tmedema: you can red some info about dns here (to learn more about dns): http://cr.yp.to/djbdns/tinydns.html [18:53] shimondoodkin: running a DNS server. [18:53] pietern has joined the channel [18:53] yonkeltron: shimondoodkin: your nick makes me happy [18:53] mscdex: yonkeltron: that's silly [18:53] mscdex: yonkeltron: callee isn't going away anytime soon [18:53] yonkeltron: mscdex: ok, but jslint says no so i assume there's a reason [18:54] tmedema: mjr_: node.js would be most inexpensive, and since I do not earn with my service that'd be a best fit for me - it'd also make things more scaleable and I would have full control. Would this be much more difficult than if I use something like tinydns? [18:54] jarfhy has joined the channel [18:54] mjr_: It'll be more of a different kind of work to do it all in node. [18:54] mjr_: Spitting out tinydns data files is really easy. [18:55] mjr_: As they are not meant to be human readable. [18:55] timemachine3030 has joined the channel [18:55] mjr_: spitting out "zone" files is only slightly harder. [18:55] chapel: if you want any kind of scale, I would say use an existing dns server software [18:55] langworthy has joined the channel [18:55] chapel: node can handle it, but might as well use the right tool for the job [18:56] chapel: node can do all the other stuff and modify tinydns or whatever you use to make changes easily [18:56] mjr_: If you don't need to make a custom response for each query, then you might as well use a dedicated authoritative nameserver. [18:56] tmedema: chapel: alright, I think I will look into TinyDNS then. What kind of dns settings should I make for a subdomain to point to nameservers just like a top level domain would though? [18:57] mjr_: But being able to make custom responses per query would be SOOOO cool. [18:57] chapel: mjr_: aggreed [18:57] mjr_: And have that logic in JavaScript? Amazing! [18:57] chapel: I want to make something like http://www.spambotsecurity.com/ but in node [18:57] pquerna: geeeeeodns [18:58] mjr_: pquerna: or balance my load DNS [18:58] pquerna: damn, found the next startup plan already. [18:58] chapel: whats that pquerna ? [18:58] Spion__: anyone that feels a bit sad about the way JavaScript throws exceptions and them not working quite well with async code? :] [18:58] pquerna: geo + load average dns based balancing; half joking though. [18:58] chapel: if you had the time, I am sure you would be doing it right now :P [18:59] mjr_: I'm going to be in need of that sort of thing soon. [18:59] mjr_: pquerna: now that you've got your exit, it's time to relax and work on fun projects, right? [19:00] muk_mb has joined the channel [19:01] robotarmy has joined the channel [19:01] pquerna: mjr_: not for a bit. turns out companies want you to.. work still. [19:02] bingomanatee_ has joined the channel [19:03] davglass_ has joined the channel [19:03] bingomanatee_: good morining all -- how would I use the http.Client class to send a POST with just a raw body? [19:03] sechrist has joined the channel [19:04] tjholowaychuk: bingomanatee_: same as other streams, write() [19:04] mjr_: pquerna: huh. Weird. [19:06] aschw: friends: I'm just starting to get into express, and I'm wondering - where/how does __dirname get defined? [19:06] tjholowaychuk: aschw: the module system in node defines that [19:07] aschw: oh, ok [19:08] tmedema: mjr_: can I run a dns server and normal webserver on the same machine? [19:08] stagas: tjholowaychuk: there should be a remember option in connect.session to not set an expire at all if false, so a non-persistent cookie is created. cookie expire age and session maxAge are different things imho [19:08] mjr_: tmedema: sure [19:09] tjholowaychuk: stagas: you should be able to pass { cookie: {}} [19:09] tjholowaychuk: with whatever you like [19:09] tjholowaychuk: the maxAge is just a convenience assumption really [19:09] mjr_: tmedema: the real limitation is protocol/port number pairs. HTTP is TCP/80, and DNS is UDP/53. [19:09] tmedema: mjr_: alright, thanks. So what I need to do now is 1) learn about tinyDNs (aka reading http://cr.yp.to/djbdns/run-server.html) 2) learn what entries to make to make subdomains point to given nameservers (how?) [19:09] stagas: tjholowaychuk: no as it is now, cookie.expires is hard coded to take from maxAge. I tried altering it with no luck until I saw the source [19:10] tjholowaychuk: hmm yeah it shouldnt be [19:11] fly-away has joined the channel [19:13] mjr_: tmedema: you are going to need to learn about DNS, like, how it actually works. The tinydns docs assume you already know. [19:13] tmedema: mjr_: I don't, does it really require reading through books for weeks? [19:14] mjr_: tmedema: oh, probably not. I'll bet you can figure it out in a day or so with online reading and some experimentation. Just a heads up that most DNS servers assume you are an expert in DNS. [19:14] stagas: tjholowaychuk: the simplest fix is an extra option, store.cookie.expires can't be set in cookie: { options } because it relies on date and is reset on every access [19:15] tmedema: mjr_: thanks, do you recommend anything I can read? [19:15] stagas: but then again it becomes global [19:15] stagas: hmm [19:15] Somebi: How to encode an array or object into json string? [19:15] mjr_: tmedema: sorry, I don't know. I learned about DNS forever ago, I think from reading RFCs and the BIND source code. I wouldn't recommend that. [19:15] mjr_: Somebi: JSON.stringify(obj) [19:15] tjholowaychuk: Somebi: JSON.stringify() [19:16] tjholowaychuk: haha [19:16] Somebi: :D [19:16] tmedema: mjr_: alright I will google for a bit, thanks again [19:16] Somebi: but it doesn't encodes it [19:16] wink_: tmedema: find the oreilly book [19:16] tmedema: wink_: BIND and DNS you mean? [19:16] mjr_: Somebi: console.log(JSON.stringify(obj)); [19:16] wink_: yeah [19:16] wink_: its probably available through their ebook thing [19:17] Somebi: it should be something like that: K\u0101rsava [19:17] dragunov11_ has joined the channel [19:17] TheEmpath has joined the channel [19:17] TheEmpath: 23 clients, receiving 4 requests per second over 15 hours peaks at 30MB of Physical RAM, 52MB VRAM, and 23MB Heap. Win! [19:17] TheEmpath: i would like to bring to the forefront the topic of deep copies in Javascript. JSON stringify/parse is too slow :( [19:18] wink_: this should be interesting ;) [19:18] Somebi: hmm i guess it's the problem of mysql results... [19:18] Somebi: not utf8 :) [19:18] Somebi: sorry ) [19:19] TheEmpath: i've hit a point where i wrote my own subscription handler for events. when multiple users request the same command from the server, i just register the command to an array and attach subscribers to the command. every interval, the command gets ran and the result gets sent to the clients [19:19] TheEmpath: but only if the result of that command is different than the last time the command was ran [19:19] TheEmpath: this keeps things fast and light [19:19] TheEmpath: sadly, when comparing those last results, trying to compare objects is painful [19:20] pt_tr has joined the channel [19:20] dragunov11 has joined the channel [19:20] Somebi: yea just tried, it's encoding it properly [19:20] TheEmpath: so i do deep copies of objects, but json is like 0.3 milliseconds, so all my gains from the subscription method are erased [19:20] SamHasler_ has joined the channel [19:20] wink_: TheEmpath: what does having a copy of the object have to do with comparing it with another object? [19:21] jspiros_ has joined the channel [19:21] wink_: how is deep copying it going to spare you from having to compare it [19:21] TheEmpath: if i have two values.. current_result and last_result, if {a:7} is the last result, and {a:8} is the current result [19:21] jspiros has joined the channel [19:21] dmcquay has joined the channel [19:21] ncb000gt has joined the channel [19:22] TheEmpath: v8bot:({a:8}) == ({a:8}) [19:22] v8bot: TheEmpath: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [19:22] TheEmpath: v8: ({a:8}) == ({a:8}) [19:22] v8bot: TheEmpath: false [19:22] TheEmpath: you can't compare objects [19:22] stagas: tjholowaychuk: how about this? only line 3 changes: https://gist.github.com/743840 [19:22] ncb000gt: ping ryah [19:22] wink_: sure, deep copying isn't a solution to that though [19:22] ncb000gt: or rather.... [19:23] ncb000gt: ryah: ping :) [19:23] TheEmpath: heres why i need deep copying [19:23] TheEmpath: when the last_results are different than the current results [19:23] TheEmpath: i assign the last_results to the current results [19:23] tjholowaychuk: stagas: can you diff it [19:23] TheEmpath: when dealing with objects, it does this assignment via reference [19:23] TheEmpath: whcih means when i change current_result, it will change last_result with it [19:24] wink_: do your objects contain more than just data? if not, deep copying them should be pretty straightforward [19:24] TheEmpath: they'll contain mostly data [19:25] TheEmpath: and sometimes multiple branches of data [19:25] TheEmpath: undefined, nulls, ints, strings, arrays, objects, bool [19:25] TheEmpath: but no functions [19:25] wink_: afaik you're on your own for a deep copy implementation [19:25] TheEmpath: phooey [19:25] TheEmpath: python has a deepcopy tool... i just wondered if there were plans for a util.deepcopy() [19:25] stagas: tjholowaychuk: nope :) [19:26] wink_: but you should be able to recursively traverse the object copying its data [19:26] wink_: and it would surely be faster than using json to do it [19:26] broofa: isaacs: working through npm-registry setup - you mention doing continuous replication from official CouchDB... what exactly does that involve? (Sorry, I'm not a couchdb guy) [19:26] TheEmpath: im just not comfortable enoguh with the type casting rules [19:27] isaacs: np [19:27] isaacs: you go to the "replication" section in futon (/_utils) [19:27] isaacs: broofa: then set up replication from > remote db: http://isaacs.couchone.com/jsregistry, to> local db: (your registry), and check the "continuous" box [19:27] wink_: TheEmpath: i'd be floored if you couldnt find 800 different implementations [19:28] nonnikcam has joined the channel [19:28] broofa: isaacs: k, thx. [19:28] isaacs: TheEmpath: there used to be a thing like thiat in node. [19:28] isaacs: TheEmpath: no one could decide on how it should handle things like non-enumerable properties, inherited properties, etc. [19:29] isaacs: TheEmpath: js's object model is kinda featureful [19:29] wink_: and that's why there are 800 different implementations ;> [19:29] isaacs: wink++ [19:29] v8bot: isaacs has given a beer to wink. wink now has 1 beers. [19:29] TheEmpath: wink_: that's sort of the problem.. soo many implimentations, which one is comprehensive and reliable? [19:29] TheEmpath: for example [19:29] TheEmpath: v8: typeof({a:7}) == typeof(null) [19:29] v8bot: TheEmpath: true [19:29] TheEmpath: makes me cringe [19:29] wink_: well you really need to figure out what your object looks like [19:30] wink_: if its just a simple container, any of the implementations should work for you [19:30] wink_: but if you want your closures and all of the more advanced js oo model, you will definitely need to pick the subset and an implementation to match [19:32] TheEmpath: i wonder if there is an easier way to compare objects [19:32] stagas has joined the channel [19:32] CrypticSwarm has joined the channel [19:32] wink_: well if your data is just representative of state, and you're persisting it elsewhere, a modified timestamp would be effective [19:32] heavysixer has joined the channel [19:33] wink_: any sort of hash representing the data really... [19:33] wilken_ has joined the channel [19:33] TheEmpath: whats the speediest hash? [19:33] TheEmpath: json is killing my speed :( [19:33] wink_: well i meant hash more conceptually although a literal hash would work [19:34] wink_: just track when your data last changed, then you can just compare times [19:34] TheEmpath: i do track that [19:34] TheEmpath: but i only want to broadcast data when the changes are different [19:34] wink_: well if you know when it changed, and when the last time you saw a change was [19:34] isaacs: TheEmpath: check out the deepEquals in require("assert") if you want to just compare two objects for similarity [19:34] wink_: you can figure out if something changed or not [19:35] TheEmpath: i know when data is changed, and i can tell you when data is about to change, i just can't determine the nature of the change [19:35] TheEmpath: and i use the nature of the chagne to determine my next action [19:35] wink_: so you need to know exactly what changed as well [19:35] wink_: gotcha [19:35] TheEmpath: ay [19:35] wink_: deepEquals could work for you then [19:35] TheEmpath: zinger [19:35] TheEmpath: hopefully its faster that .3 damned ms [19:36] TheEmpath: ACTION grumbles. [19:37] dragunov11: can anyone please help me with this "Error: Cannot find module 'mjsunit'". i tried searching google, no use. [19:37] softdrink has joined the channel [19:37] mwilken has joined the channel [19:38] Somebi: plug in this module i guess :) [19:39] Somebi: or make sure the path is right [19:39] dragunov11: well, couldn't find it :) all i could get was something named mjsunit.runner [19:39] mwilken has left the channel [19:39] Somebi: require('path') etc [19:39] Somebi: require('path to mjsunit') etc [19:39] isaacs: dragunov11: how are you encountering that error? [19:40] dragunov11: am trying to run the test.js in node-crypto lib. [19:40] isaacs: context++ [19:40] v8bot: isaacs has given a beer to context. context now has 1 beers. [19:40] isaacs: dragunov11: why are you using the node-crypto lib? it's internal now. [19:40] aklt has joined the channel [19:40] isaacs: dragunov11: just require("crypto")( [19:40] Somebi: cool) [19:41] Somebi: didn't knew as well [19:41] dragunov11: err..ok, didn't knew about that, just liked it from the node.js wiki module page [19:41] Somebi: so there is sha1 now? [19:41] dragunov11: well, i have another error as well, thats from the node-sqlite module. let me reclone it. [19:44] Throlkim has joined the channel [19:45] InsDel has joined the channel [19:45] jaw6 has joined the channel [19:46] sepehr has joined the channel [19:46] TheEmpath: hey assert is spiffy [19:46] dragunov11: the sqlite driver from orlandov is better, or from grumdrig ? [19:46] isaacs: dragunov11: the only one i've used is `npm install sqlite`, from orlandov [19:47] isaacs: he uses it in production here at joyent, i believe. [19:47] beta has joined the channel [19:47] dragunov11: isaacs: thanks, let me get back on that. [19:48] V1 has joined the channel [19:48] wilken_ has joined the channel [19:49] mscdex: require('spiffy.js') [19:49] MikhX has joined the channel [19:51] matt_c has joined the channel [19:52] beta has joined the channel [19:55] robotarmy has joined the channel [19:55] dragunov11: "Error: out of memory" is the error i get while running a query on a sqlite db file. [19:55] TheEmpath: isaacs: thank you, the deepEquals is perfect [19:56] TheEmpath: now i need to tackle the issue of assigning the current_value to the last_value without assigning by reference [19:57] derren13 has joined the channel [19:57] TheEmpath: basically, object cloning [19:59] SvenDowideit has joined the channel [20:00] hobodave: hey guys, are websockets known to be flaky? [20:00] hobodave: I'm testing a little log tailer that I wrote which uses socket.io. It seems to disconnect the client when I send a boatload of data to them [20:03] jpick has joined the channel [20:04] yonkeltron: let's say i have a function, is there anyway to get a reference to the object it's defined on? at least what that function considers this to be? [20:06] matjas_ has joined the channel [20:06] tjholowaychuk: yonkeltron: they are not bound, so when you pass fn(some.method) fn wont know what method is defined on, its just a function [20:06] GasbaKid has joined the channel [20:07] yonkeltron: but let's say i had [20:07] yonkeltron: var panda = { func: function () {} }; [20:07] yonkeltron: is there anyway to get from that function to panda? [20:07] yonkeltron: from outside that function [20:10] strixv_ has joined the channel [20:11] _mythz has joined the channel [20:12] augustl has joined the channel [20:13] Tobsn has joined the channel [20:13] GasbaKid has joined the channel [20:13] ph^ has joined the channel [20:14] Somebi: As I understand, if I'll substracting rss from vsize(properties from process.memoryUsage()) I'll get swap amount used by nodejs right? [20:14] Somebi: And how does nodejs decides what should be stored in memory and what in a swap? [20:15] Somebi: physical memory is used only for launched application? [20:15] teemow has joined the channel [20:15] ph^ has joined the channel [20:15] unomi has joined the channel [20:15] yonkeltron: doesn't the OS do that? [20:15] mjr_: Somebi: node is not involved in those decisions. [20:15] mjr_: It's up to the kernel's memory manager. [20:15] yonkeltron: indeed. [20:18] Somebi: hmm [20:18] boaz_ has joined the channel [20:19] mdoan has left the channel [20:19] Somebi: OS doing swap only if not enough physical memory right? [20:20] mischief has joined the channel [20:20] Somebi: Or not only [20:20] Somebi: whatever :) nvm [20:20] Somebi: So to calculate overall memory usage I should substract rss value from app start and later rss value anywhere inside my app? [20:20] Somebi: memory usage of app itself [20:21] dragunov11: eh [20:21] dragunov11: node sqlite.js [20:21] dragunov11: Segmentation fault [20:21] Somebi: or it should be calculated somehow differently? [20:22] Somebi: want to track memory leaks etc [20:24] herbySk has joined the channel [20:24] dragunov11: hmm, what should I do with this segmentation fault ? [20:25] desaiu has joined the channel [20:26] Somebi: check google first i think :P [20:27] JusticeFries has joined the channel [20:27] pquerna: dragunov11: do you know how to use gdb? [20:28] dguttman has joined the channel [20:28] mscdex: omgdb! [20:29] ryah: anyone not building head? [20:29] ryah: er - is building head broken for anyone? [20:30] dragunov11: pquerna, gdb ? nopes. [20:30] desaiu_ has joined the channel [20:30] CIA-18: node: 03Ryan Dahl 07master * rea700a8 10/ (97 files in 18 dirs): Upgrade V8 to 3.0.2 - http://bit.ly/ffMS1B [20:30] CIA-18: node: 03Ryan Dahl 07master * rc6406f9 10/ (3 files): (log message trimmed) [20:30] CIA-18: node: Apply V8 r5951 to fix Mac build [20:30] CIA-18: node: From f3973972b727df480697443871d780596aba0201 Mon Sep 17 00:00:00 2001 [20:30] CIA-18: node: From: erik.corry@gmail.com [20:30] CIA-18: node: Date: Wed, 8 Dec 2010 16:23:25 +0000 [20:30] CIA-18: node: Subject: [PATCH] Speed up quoting of JSON strings by allocating a string that is big enough [20:32] boaz_ has joined the channel [20:34] heavysixer has joined the channel [20:34] cafesofie has joined the channel [20:36] iFire has joined the channel [20:39] jacobolus has joined the channel [20:44] martigam has joined the channel [20:46] capndiesel has joined the channel [20:47] davidc_ has joined the channel [20:47] tlrobinson has joined the channel [20:49] grim_fandango has left the channel [20:51] gf3 has joined the channel [20:54] lstrojny has joined the channel [20:54] mikedeboer has joined the channel [20:54] cjm has joined the channel [20:54] Throlkim has joined the channel [20:54] zz_raja has joined the channel [20:55] stagas has joined the channel [21:00] aguynamedben has joined the channel [21:03] stepheneb has joined the channel [21:06] robotarmy has joined the channel [21:07] mraleph has joined the channel [21:08] sh1mmer has joined the channel [21:10] beawesomeinstead has joined the channel [21:13] stagas: ping [21:14] pietern has joined the channel [21:14] warz has joined the channel [21:15] saikat has joined the channel [21:15] rburhum has joined the channel [21:17] pietern_ has joined the channel [21:17] robotarmy has joined the channel [21:19] jamesarosen has joined the channel [21:20] jpiche has joined the channel [21:21] warz has left the channel [21:21] stagas: pong [21:21] mikew3c_ has joined the channel [21:22] mqt has joined the channel [21:24] charlenopires has joined the channel [21:26] aconbere has joined the channel [21:26] stagas: sponge [21:31] TheEmpath: spongecake [21:31] TheEmpath: so about object cloning in javascript [21:32] robotarm_ has joined the channel [21:33] stagas: what about it? [21:33] TheEmpath: v8: var a = {a:7}; var b = a; var a = {a:8}; console.log(b); [21:33] v8bot: TheEmpath: CONSOLE: [{"a": 7}], OUTPUT: undefined [21:33] TheEmpath: thats totally not whats happening to me [21:33] TheEmpath: oh crap [21:33] TheEmpath: lemme check [21:34] stagas: that's not cloning [21:34] TheEmpath: it just looks like my objects are being assigned by reference [21:36] Nomon: objects are always passed by reference, only primitive types are passed as values [21:36] cognominal has joined the channel [21:40] Throlkim has joined the channel [21:42] chrisdickinson: v8: a = {a:'ok'}; b = a; a.a = 'bad'; console.log(b); [21:42] v8bot: chrisdickinson: CONSOLE: [{"a": "bad"}], OUTPUT: undefined [21:42] chrisdickinson: v8: a = {a:'ok'}; b = Object.create(a); a.a = 'bad'; console.log(b); [21:42] v8bot: chrisdickinson: CONSOLE: [{}], OUTPUT: undefined [21:42] aubergine has joined the channel [21:42] chrisdickinson: v8: a = {a:'ok'}; b = Object.create(a); a.a = 'bad'; console.log(b.a); [21:42] v8bot: chrisdickinson: CONSOLE: ["bad"], OUTPUT: undefined [21:44] dnolen_ has joined the channel [21:45] TheEmpath: fml [21:45] JusticeFries_ has joined the channel [21:45] TheEmpath: i spent all that time thinking objects were being assigned by reg [21:45] TheEmpath: ref [21:45] TheEmpath: sgih [21:46] Nomon: sure they are :) [21:46] cferris has joined the channel [21:47] Nomon: v8: var a = {a:7}; var b = a; a = {a:8}; console.log(b); [21:47] v8bot: Nomon: CONSOLE: [{"a": 7}], OUTPUT: undefined [21:47] Nomon: v8: var a = {a:7}; var b = a; a.a = 8; console.log(b); [21:47] v8bot: Nomon: CONSOLE: [{"a": 8}], OUTPUT: undefined [21:48] Floxxx: hmm, the objects themself are not referenced, but the properties inside them are? [21:48] Nomon: But when I do assign a {a:8} I assign it a new value don't I :D [21:48] kgf_ has joined the channel [21:48] Floxxx: you create a new object [21:49] Benvie1 has joined the channel [21:50] Floxxx: v8: var a = {a: 7, b: 8}; var b = a; a.a = 8; b.a = 6; console.log(a); console.log(b); [21:50] v8bot: Floxxx: CONSOLE: [{"a": 6, "b": 8}, {"a": 6, "b": 8}], OUTPUT: undefined [21:50] Nomon: Floxxx: the variable is not referenced, the object is. [21:50] Connorhd_ has joined the channel [21:50] masahiroh has joined the channel [21:51] Floxxx: yay for netsplit :p [21:51] sstreza has joined the channel [21:52] sonnym has joined the channel [21:52] thedjinn has joined the channel [21:52] wereHamster has joined the channel [21:52] aklt has joined the channel [21:52] cyraxx has joined the channel [21:52] frode has joined the channel [21:52] ashb has joined the channel [21:52] Nacho has joined the channel [21:52] charlenopires has joined the channel [21:52] mlangenberg has joined the channel [21:53] inarru has joined the channel [21:55] themissinglinq has joined the channel [21:56] Tobsn has joined the channel [21:56] lstrojny has joined the channel [21:56] Durl has joined the channel [21:57] sstephenson_ has joined the channel [21:57] mrkurt___ has joined the channel [21:58] benh has joined the channel [21:58] wink__ has joined the channel [21:58] nail_ has joined the channel [21:58] slickplaid has joined the channel [21:58] cferris has joined the channel [21:58] aubergine has joined the channel [21:58] aconbere has joined the channel [21:58] mqt has joined the channel [21:58] zz_raja has joined the channel [21:58] cjm has joined the channel [21:58] tlrobinson has joined the channel [21:58] davidc_ has joined the channel [21:58] heavysixer has joined the channel [21:58] unomi has joined the channel [21:58] teemow has joined the channel [21:58] GasbaKid has joined the channel [21:58] _mythz has joined the channel [21:58] SvenDowideit has joined the channel [21:58] beta has joined the channel [21:58] fly-away has joined the channel [21:58] bingomanatee_ has joined the channel [21:58] langworthy has joined the channel [21:58] timemachine3030 has joined the channel [21:58] eee_c1 has joined the channel [21:58] tapwater has joined the channel [21:58] murz has joined the channel [21:58] brianleroux has joined the channel [21:58] slloyd has joined the channel [21:58] sprout has joined the channel [21:58] cardona507 has joined the channel [21:58] noahcampbell has joined the channel [21:58] broofa has joined the channel [21:58] hobodave has joined the channel [21:58] slaskis has joined the channel [21:58] zemanel has joined the channel [21:58] tylerstalder has joined the channel [21:58] pzich has joined the channel [21:58] EyePulp has joined the channel [21:58] akahn has joined the channel [21:58] ben_alman has joined the channel [21:58] ysynopsis has joined the channel [21:58] saschagehlich has joined the channel [21:58] linnk has joined the channel [21:58] MattJ has joined the channel [21:58] yrashk has joined the channel [21:58] bingomanatee has joined the channel [21:58] EGreg has joined the channel [21:58] tmzt has joined the channel [21:58] rednul has joined the channel [21:58] janne has joined the channel [21:58] figital has joined the channel [21:58] case__ has joined the channel [21:58] marlun has joined the channel [21:58] Lorentz has joined the channel [21:58] tprice has joined the channel [21:58] esigler has joined the channel [21:58] shachaf has joined the channel [21:58] castral has joined the channel [21:58] KyleXY has joined the channel [21:58] polyrhythmic has joined the channel [21:58] Twelve-60 has joined the channel [21:58] jimt has joined the channel [21:58] sideshow has joined the channel [21:58] Epeli has joined the channel [21:58] jan____ has joined the channel [21:58] dantalizing has joined the channel [21:58] adamholt has joined the channel [21:58] rbranson has joined the channel [21:58] ajpiano has joined the channel [21:58] viirya has joined the channel [21:58] circut has joined the channel [21:58] sstephenson has joined the channel [21:58] mrkurt__ has joined the channel [21:58] comster1 has joined the channel [21:58] ddollar has joined the channel [21:58] sth has joined the channel [21:58] sefton has joined the channel [21:58] wattz has joined the channel [21:58] papyromancer has joined the channel [21:58] pquerna has joined the channel [21:58] namelessnotion has joined the channel [21:58] nefD has joined the channel [21:58] HAITI has joined the channel [21:58] sugardave has joined the channel [21:58] Sami_ZzZ has joined the channel [21:58] thebigbad has joined the channel [21:58] ashleydev has joined the channel [21:58] nlacasse has joined the channel [21:58] yonkeltron has joined the channel [21:58] er1c_ has joined the channel [21:58] chewbran1a has joined the channel [21:58] pekim has joined the channel [21:58] eirikur has joined the channel [21:58] naneau has joined the channel [21:58] izz has joined the channel [21:58] mif86 has joined the channel [21:58] Tobias| has joined the channel [21:58] Atmoz has joined the channel [21:58] jb55 has joined the channel [21:58] gwoo has joined the channel [21:58] broquaint has joined the channel [21:58] MrWarGames has joined the channel [21:58] r00s has joined the channel [21:58] ryah has joined the channel [21:58] Draggor has joined the channel [21:58] scoates has joined the channel [21:58] inimino has joined the channel [21:58] keeran has joined the channel [21:58] zmack has joined the channel [21:58] dnyy has joined the channel [21:58] thecoon has joined the channel [21:58] sitron has joined the channel [21:58] crodas has joined the channel [21:58] kkaefer has joined the channel [21:58] voodootikigod has joined the channel [21:58] MikeW has joined the channel [21:58] olegp has joined the channel [21:58] deoxxa has joined the channel [21:58] Cainus has joined the channel [21:58] maru_cc_ has joined the channel [21:58] slpsys has joined the channel [21:58] mcarter__ has joined the channel [21:58] FMJaggy has joined the channel [21:58] konobi has joined the channel [21:58] ebi has joined the channel [21:58] wang has joined the channel [21:58] rphillips has joined the channel [21:58] chrisdickinson has joined the channel [21:58] naseviska has joined the channel [21:58] meder has joined the channel [21:58] rubydiamond has joined the channel [21:58] themcgruff has joined the channel [21:58] chilts_ has joined the channel [21:58] russell_h has joined the channel [21:58] shaver has joined the channel [21:58] tk has joined the channel [21:58] steadicat has joined the channel [21:58] walkah has joined the channel [21:58] lianj has joined the channel [21:58] joshthecoder has joined the channel [21:58] zentooo has joined the channel [21:58] brianc has joined the channel [21:58] roger_raymond has joined the channel [21:58] sadiq has joined the channel [21:58] Noya_ has joined the channel [21:58] _alex has joined the channel [21:58] adrienf_ has joined the channel [21:58] Sembiance has joined the channel [21:58] chapel has joined the channel [21:58] lstoll has joined the channel [21:58] elliottcable has joined the channel [21:58] DoubleV has joined the channel [21:58] cce has joined the channel [21:58] mediacod1r has joined the channel [21:58] sstephenson_ has joined the channel [21:58] daniellindsley has joined the channel [21:58] wasabist has joined the channel [21:58] Yuffster has joined the channel [21:58] hellp has joined the channel [21:58] mrkurt___ has joined the channel [21:59] benh has joined the channel [22:01] themissinglinq has joined the channel [22:01] pHcF has joined the channel [22:02] benh has joined the channel [22:03] isaacs: ircretary: hello [22:03] ircretary: isaacs: Hello :) [22:03] isaacs: ircretary: logs [22:03] ircretary: isaacs: Logs can be found at: http://irc.npmjs.org/node.js [22:03] GasbaKid has joined the channel [22:03] isaacs: sweet, ircretary survived the netsplit this time. [22:03] ryah: i'm floating too many v8 patches at the moment [22:03] SvenDowideit has joined the channel [22:03] marienz has joined the channel [22:04] beawesomeinstead has joined the channel [22:04] beawesomeinstead has joined the channel [22:04] stagas: isaacs: showoff! :P [22:04] podman has joined the channel [22:04] JCS0 has joined the channel [22:04] zorzar_ has joined the channel [22:04] wilken_ has joined the channel [22:04] benh has joined the channel [22:04] stagas: ryah: please add the favicon one (not a patch really) :) [22:05] siong1987_ has joined the channel [22:05] stagas: ryah: http://groups.google.com/group/nodejs/browse_thread/thread/3e073eaf22eaa024?pli=1 [22:06] CIA-18: node: 03Ryan Dahl 07master * rc9d3a81 10/ (3 files in 2 dirs): Patch V8 to compile on solaris - http://bit.ly/hJdlFs [22:06] m3nt0r^aw has joined the channel [22:06] [[zz]] has joined the channel [22:08] gf3` has joined the channel [22:09] jakehow has joined the channel [22:09] stalled has joined the channel [22:09] xmux has joined the channel [22:10] Guest52176 has joined the channel [22:10] mgc has joined the channel [22:10] zhesto__ has joined the channel [22:11] stepheneb has joined the channel [22:12] stagas has joined the channel [22:13] _mythz has left the channel [22:15] mape: Isn't V8 used as is wit node? [22:15] a-priori has joined the channel [22:15] tjholowaychuk: apparently not [22:16] mape: *with.. Hmm k [22:19] ryah: i make v8 run on systems other than linux and windows :) [22:19] ryah: er linux and mac [22:20] mape: And that isn't folded back into V8 or is it node specific? [22:20] wink_: probably not pushed upstream, i doubt google has any interest in v8 on solaris [22:22] delapouite has joined the channel [22:23] mape: Well isn't V8 open source? Or is google such a large contrib that they dictate the direction to a large extent? [22:23] statik has joined the channel [22:23] statik has joined the channel [22:23] ryah: it gets pushed up but it takes some time and i'm lazy [22:24] wink_: well there ya go :> [22:24] mape: Hehe k [22:24] CIA-18: node: 03Ryan Dahl 07master * r02aae22 10/ (.gitignore deps/v8/0003-Fix-Solaris-build.patch): Add solaris patch file - http://bit.ly/ffrzmh [22:25] CIA-18: node: 03Ryan Dahl 07master * r2dc17e9 10/ deps/v8/0002-Patch-for-oprofile.patch : Add oprofile patch to repo - http://bit.ly/gW88iI [22:25] aguynamedben has joined the channel [22:26] Phyllio has joined the channel [22:27] eee_c has joined the channel [22:29] aconbere has joined the channel [22:29] omni5cience has joined the channel [22:30] ysynopsis has joined the channel [22:31] micheil has joined the channel [22:31] sudoer has joined the channel [22:32] mikeal: isaacs: when you create directories, what permission level do you use? [22:32] isaacs: mikeal: um... 0755, i think [22:33] isaacs: because i'm lazy and stupid. [22:33] mape: isaacs: And using su is even more lazy and dumb? :P [22:33] mikeal: that works, sweet [22:33] mikeal: awesome [22:34] mikeal: just implemented `couchapp boiler` [22:34] tilgovi has joined the channel [22:35] mikeal: you know what, mkdirSync is really helpful [22:35] mikeal: :) [22:35] stagas: mkdirSync rulez [22:35] stagas: :P [22:36] mikeal: i still write files async [22:36] jesusabdullah: Any of you guys use jison before? [22:37] mikeal: but using mkdirSync means that I can just iterate over the files in order and I don't have to do an additional callback that waits for the directory to be created that a file is going in to [22:37] jesusabdullah: I'm at a geophysics conference, and I learned about this thing called openDAP [22:37] jesusabdullah: and it stores metadata in a stupid format :( [22:37] jesusabdullah: see http://www.opendap.org/user/guide-html/guide_65.html#id4 and http://www.opendap.org/user/guide-html/guide_66.html#id3 [22:37] TheEmpath: ? [22:37] SvenDowideit has joined the channel [22:38] jesusabdullah: No, actually dumber imo [22:38] TheEmpath: that is a pretty stupid format [22:38] jesusabdullah: Yeah [22:38] TheEmpath: thats like xmlrpc [22:38] Hello71 has joined the channel [22:38] TheEmpath: except more violent [22:38] Hello71 has joined the channel [22:38] jesusabdullah: I tried to figure out what format the above is in, but from what I can tell it's actually a wheel-reinvention [22:39] jesusabdullah: actually, two of them; While they're reminiscent of C structs, they both have their own snafus. [22:39] micheil: ryah: with that thing of C++ bindings needing some form of init function or something, can I have one binding file that allows me to access multiple different C++ bindings? [22:39] jesusabdullah: Why they didn't use JSON idk. I mean, there's even a prescedent for using json for geophysical data in geojson! [22:39] jesusabdullah: Fuck, xml would've made more sense [22:39] marienz has joined the channel [22:40] jesusabdullah: ANYWAYS [22:40] Vertice has joined the channel [22:41] wink_: jesusabdullah: what an abomination :p [22:41] jesusabdullah: I know! [22:41] jesusabdullah: Interestingly enough, openDAP is RESTful-ish [22:42] altamic_ has joined the channel [22:42] jesusabdullah: but I think it was an accident ;) [22:42] jesusabdullah: I see a lot of room for improvement in the software side of geophysics after attending this conference [22:42] sepehr has joined the channel [22:43] jesusabdullah: I think a pure JS openDAP client would be pretty boss [22:43] jesusabdullah: but the first thing, imo, should be to convert that terrible format into json [22:43] stagas: sasha rulez [22:43] jesusabdullah: sasha [22:43] jesusabdullah: ? [22:44] wink_: jesusabdullah: should be able to write a converter pretty easily, that'd be the first move to make to get rid of that nasty thing [22:44] stagas: omg a question mark [22:44] jesusabdullah: wink_: I agree. I've just never done anything of the sort before is all [22:45] stagas: jesusabdullah: http://soundcloud.com/sashaofficial/sasha-ministry-of-sound-4-12-10 [22:45] jesusabdullah: Ah [22:48] rpflo has joined the channel [22:49] Eber has joined the channel [22:49] Eber: Guys, is there a nice module for simple authentication on Express?!? [22:50] mape: Eber: auth? [22:50] Eber: mape: yes! [22:51] mape: https://github.com/ciaranj/express-auth [22:51] yonkeltron: b [22:51] yonkeltron: oops [22:51] stagas: ACTION 's origin is being a techno dj [22:51] mape: Possibly https://github.com/ciaranj/connect-auth [22:51] tjholowaychuk: connect-auth is the new one i think [22:51] mape: Yup [22:52] Eber: connect-auth looks great, but I'm getting weird error messages with it... :( [22:52] Eber: I read the examples, did everything the way I supposed to be and got a not so informative error message... but I'll try to dig it a little bit more... [22:53] mape: Eber: I use it for twitter/facebook auth on a tiny chat app I made, worked fine [22:53] Throlkim has joined the channel [22:53] Eber: mape: I need basic auth and custom auth with my own db and stuff... [22:54] mjr_: ryah: get any good info out of oprofile then? [22:54] mape: Eber: Then use sessions and wrap requests in a callback for auth? [22:54] Eber: mape: I was about to do it... It was my last attempt to see if there was something already out there... [22:54] kriszyp has joined the channel [22:55] mies_ has joined the channel [22:55] Eber: mape: or maybe a custom middleware :) [22:55] mape: Yup [23:02] zomgbie has joined the channel [23:03] Alex-SF has joined the channel [23:05] ivan has joined the channel [23:05] hdon has joined the channel [23:06] Yuffster has joined the channel [23:08] jashkenas has joined the channel [23:08] stagas: spongebong hemppants [23:08] Insanity5902 has joined the channel [23:10] nihique has joined the channel [23:14] marienz has joined the channel [23:15] admc_ has joined the channel [23:18] sh1mmer: tjholowaychuk: is there some documentation on what is required to implement an express/connect session-store ? [23:18] sh1mmer: or an interface class [23:19] mape: sh1mmer: Have you looked at any existing stores? [23:19] sh1mmer: yep [23:19] mape: From what I've heard the API is rather simple? [23:19] sh1mmer: it seems simple, but I'd rather model off an interface class [23:19] stagas: sh1mmer: just a .get and .set I think [23:19] tjholowaychuk: sh1mmer: docs/session.md [23:19] sh1mmer: cool [23:19] pedrobelo has joined the channel [23:20] tjholowaychuk: or take a look at connect-redis [23:20] mape: Hmm, where are the AB test results of doc pages? [23:20] dgathright has joined the channel [23:20] sh1mmer: thanks tjholowaychuk [23:21] norviller has joined the channel [23:21] sonnym has joined the channel [23:22] sriley: hey tom [23:22] tjholowaychuk: np! [23:22] micheil: tjholowaychuk: with C/C++ addons, can you have many bindings? [23:22] tjholowaychuk: micheil: ive only done node-canvas [23:23] tjholowaychuk: that was my first c++ project [23:23] tjholowaychuk: lol [23:23] micheil: like, instead of just having one require("binding"), have many for different components? [23:23] tjholowaychuk: ohh [23:23] micheil: oh. [23:23] sh1mmer: hey sriley [23:23] tjholowaychuk: micheil: well could you not just export some more in init() ? [23:24] jherdman has joined the channel [23:24] tjholowaychuk: or have your "main" module require('./a') and require('./b') [23:24] tjholowaychuk: exporting those bindings [23:24] micheil: well, I have a bunch of totally different interfaces, but each one has a set of events [23:24] micheil: then I have a JS wrapper on them [23:24] tjholowaychuk: yeah so you are building them independantly i take it? [23:24] tjholowaychuk: or something [23:24] micheil: i'm not sure [23:25] sriley: saw you up on node camp, thought it looked like you, whatcha up to these days? btw its sam from back in yahoo days if you dont recognize me [23:25] micheil: I have a C class, Phidget [23:25] micheil: I then have a PhidgetInterfacekit and a PhidgetLed [23:25] tjholowaychuk: maybe take a look at node-canvas src/init.cc [23:25] tjholowaychuk: that might be what you are looking for [23:25] mape: Wasen't there a usb interface thingy for node announced lately? [23:26] tjholowaychuk: just deferring initialization to the *::Initialize() statics [23:26] micheil: node-usb [23:26] mape: Yeah [23:26] stagas_ has joined the channel [23:27] markwubben has joined the channel [23:28] sh1mmer: sriley: I did recognise you. This is what I do now. Talk/write about technology most of the time. [23:28] sh1mmer: sriley: writing the node.js book for O'Reilly [23:28] sh1mmer: that's a pretty major project [23:29] sriley: cool [23:29] mape: sh1mmer: Are those things for the greater good/creds/super fun/awsome pay? [23:29] sh1mmer: all of the above :) [23:29] tjholowaychuk: writing a book takes so long [23:29] sh1mmer: tjholowaychuk: fucking-a [23:29] tjholowaychuk: I regret writing the first one I did [23:29] tjholowaychuk: but I guess you learn from everything :) [23:29] tjholowaychuk: now I know not to write books [23:29] mape: sh1mmer: Hehe k, isn't it super hard making money from books? [23:29] aconbere has joined the channel [23:30] sh1mmer: mape: the book doesn't make money [23:30] sh1mmer: well maybe [23:30] tjholowaychuk: I find its a good excuse to learn [23:30] sh1mmer: if node because the next rails [23:30] mape: tjholowaychuk: That is why it is better to make great docs rather then a book? :) [23:30] mape: sh1mmer: Hmm k [23:30] sh1mmer: but it's good for community brownie points and it's good for learning [23:30] tjholowaychuk: mape: ebooks are the way to go :D [23:30] tjholowaychuk: I made 4x as much from my ebook lol [23:30] tjholowaychuk: than my real book [23:30] mape: tjholowaychuk: I'd still bet on awsome docs rather then books [23:30] mape: For the greater good that is [23:30] tjholowaychuk: that too [23:31] mape: Perhaps not for cash [23:31] sh1mmer: mape: true [23:31] micheil: mape: we're working on awesome docs [23:31] sh1mmer: I'm going to be improving the core docs as part of the book work [23:31] FiTNF has joined the channel [23:31] saikat has joined the channel [23:31] sh1mmer: I have a script which prints them into the back of the book as the api ref [23:31] mape: micheil: Yeah, still can't drop that add tons of examples to the docs idea [23:31] sh1mmer: also micheil is doing awesome docs things :) [23:31] sh1mmer: yay community [23:31] mnot: step 1: write script to write books for you. … step 3: $$$! [23:32] micheil: mape: put it this way, no one is being paid to do docs at the moment; so energy is focused else where I guess [23:32] mape: micheil: Yeah know, just saying docs need lots of love since a lot of people love good docs [23:33] micheil: true [23:33] tjholowaychuk: I usually prefer to just jump into source, but when there are no comments at all its kinda hard :( [23:33] tjholowaychuk: node, cough cough [23:33] tjholowaychuk: :p [23:33] micheil: tjholowaychuk: like this? https://github.com/votizen/fb-realtime-api/blob/master/lib/index.js [23:34] sh1mmer: tjholowaychuk: ryah is dead against docs in code [23:34] sh1mmer: I don't agree, but ryah is the boss [23:34] sh1mmer: :) [23:34] tjholowaychuk: micheil: yeah, anything :) [23:34] micheil: those docs are pretty ugly. [23:34] tjholowaychuk: anything helps [23:34] tjholowaychuk: im OCD about inline docs just for whitespace even [23:34] sh1mmer: micheil: I'd prefer that to nothing [23:34] tjholowaychuk: let alone actual documentation lol [23:34] sh1mmer: it's easy to get your text editor to fold away docs you don't want to see [23:36] tjholowaychuk: micheil: https://github.com/visionmedia/should.js/blob/master/lib/should.js [23:36] tjholowaychuk: I go all out [23:36] tjholowaychuk: haha [23:36] tjholowaychuk: but like i said mostly for "white" space [23:36] tjholowaychuk: nothing I hate more than a ball of code [23:36] Esherido has joined the channel [23:36] jchris1 has joined the channel [23:36] tjholowaychuk: and tracing noodle code that conveys no intention [23:37] micheil: tjholowaychuk: wanna do that for jade? :P [23:38] unomi has joined the channel [23:38] tjholowaychuk: micheil: it is documented [23:38] micheil: okay. [23:38] micheil: I'm eventually going to report for the browser. [23:38] tjholowaychuk: i wish it wasnt 4 spaces lol durr sencha days [23:39] mape: Why with the spaces :/ [23:39] mape: Just use tabs and users can set the indentation themselves [23:39] micheil: ACTION uses jslint on everything now.. [23:39] Throlkim has joined the channel [23:39] tjholowaychuk: mape: yeah im not going to lie, tabs do make more sense [23:39] tjholowaychuk: but 2 is pretty standard [23:39] tjholowaychuk: (spaces) [23:39] mape: micheil: What does that mean anyway? [23:40] mape: The default settings? [23:40] tjholowaychuk: ACTION uses jslint on nothing [23:40] micheil: mape: sort of [23:40] mape: So could mean anything? ;) [23:40] tjholowaychuk: is "jsl" the typical cli? [23:40] micheil: I'm just using it as a way to ensure a consistent code style for myself. [23:40] tjholowaychuk: not sure if i even have the right one [23:40] mape: I use jslint on everything! With everything turned off.. :P [23:40] tjholowaychuk: haha [23:40] micheil: no felix. [23:41] micheil: :( [23:41] Aikar: hmm [23:41] Aikar: i think i found a memory leak in node [23:41] mape: I usually just use jslint to find dumb things like trailing comma and whatnot [23:41] dragunov11: anyone know the api documentation link for sqlite lib in node ?? [23:42] Aikar: i had a bunch of console.logs with sys.inspect for debugging, memory rose up and would drop down somne but spike right back up. now removed all bug 1 debug line and my memory has stuck at a steady amount and this is at an even faster rate of testing [23:42] mape: But then again there aren't so many trailing commans if you put them at the beginning of the lines [23:43] mape: console.dir is pretty much sys.inspect without the require no? [23:43] mape: (not that that does much difference) [23:43] Aikar: i was doing like console.log('buffer', inspect(buffer)); [23:43] Aikar: to put it on same line [23:44] Aikar: since console.dir didnt seem to like ('buffer', buffer); ? [23:44] Aikar: https://gist.github.com/744229 [23:44] Aikar: theres gist [23:44] dragunov11: plz anyone know the api documentation link for sqlite lib in node ?? [23:44] Aikar: cpu load dropped drastically too [23:45] aconbere has joined the channel [23:46] saikat has joined the channel [23:49] Aikar: but bleh i guess you guys cant test that code since it uses messagepack which doesnt have an official 3.x yet, i gotta figure out how to get that setup on npm since pgriess said he doesnt wanna continue it anymore [23:49] [[zz]] has joined the channel [23:50] marienz has joined the channel [23:52] saikat has joined the channel [23:53] skm has joined the channel [23:55] TheEmpath: woohoo [23:56] TheEmpath: im monitoring all http/socket req/resp and queues [23:56] Floxxx: hummingbird? [23:56] pedrobelo has joined the channel [23:59] JusticeFries has joined the channel