[00:00] _olouv_ has joined the channel [00:00] kenperkins: so is anyone deploying modules in production using npm directly? [00:01] CIA-19: node: 03Nathan Rajlich 07master * r928ea56 10/ (2 files in 2 dirs): events: don't delete the listeners array in removeListener() - http://git.io/e0O4Ig [00:03] jetienne has joined the channel [00:04] dephex has joined the channel [00:04] tonymilne: Anyone know how to handle text/xml posted directly to an express server? (i asked in Express channel, hoping wider audience might know) [00:04] subbyyy has joined the channel [00:05] totallymike: tonymilne: try one of the xml parsers? [00:05] githogori has joined the channel [00:05] tonymilne: i don't really need to parse the xml yet, i just need the data that is in the request, can't seem to get at it just yet. [00:06] tonymilne: (xml parsing code is already written, but i did it assuming they'd attach an xml file, not just post xml directly) [00:07] CIA-19: node: 03Charlie McConnell 07master * rc7b8073 10/ (4 files in 2 dirs): [00:07] CIA-19: node: child_process: Separate 'close' event from 'exit' [00:07] CIA-19: node: Currently, a child process does not emit the 'exit' event until 'close' events [00:07] CIA-19: node: have been received on all three of the child's stdio streams. This change makes [00:07] CIA-19: node: the child object emit 'exit' when the child exits, and a new 'close' event when [00:07] CIA-19: node: all stdio streams are closed. - http://git.io/cK0OKg [00:08] tmcw has joined the channel [00:08] Axsuul has joined the channel [00:09] yogig has joined the channel [00:09] vam3c has joined the channel [00:10] totallymike: tonymilne: All I'm saying is an xml parser may be what you want fro extracting the data [00:10] totallymike: for* [00:10] warz has joined the channel [00:10] warz has joined the channel [00:10] tonymilne: totallymike thanks [00:10] vam3c has left the channel [00:10] Phoenixz: ryanrolds_w: problem solved! PassengerEnabled off does the trick... [00:11] Gekz has joined the channel [00:11] Gekz has joined the channel [00:11] vam3c_ has joined the channel [00:11] marcostoledo has joined the channel [00:13] subbyyy has joined the channel [00:13] seanstickle has joined the channel [00:14] boltR has joined the channel [00:14] zivester has joined the channel [00:14] YoY has joined the channel [00:15] cyphase has joined the channel [00:16] zeade has joined the channel [00:16] toothr has joined the channel [00:17] rklancer has joined the channel [00:17] vam3c has joined the channel [00:17] ryanrolds_w: Phoenixz: Nice. [00:17] ryanrolds_w: Phoenixz: In a apache conf? [00:18] boltR has joined the channel [00:18] vam3c has left the channel [00:19] dubenstein has joined the channel [00:20] sorensen__ has joined the channel [00:21] crutex has joined the channel [00:21] crutex has joined the channel [00:21] dubenstein has joined the channel [00:22] CIA-19: node: 03Nathan Rajlich 07master * rbea2e15 10/ tools/js2c.py : [00:22] CIA-19: node: js2c: fix to support files other than ones ending with 2 char extensions [00:22] CIA-19: node: Previously this was basically hard-coded for *.js files, but now we [00:22] CIA-19: node: need to include the 'config.gypi' file in there as well. - http://git.io/erTIZg [00:22] CIA-19: node: 03Nathan Rajlich 07master * r95fd517 10/ node.gyp : node.gyp: include the config.gypi file in the js2c inputs list - http://git.io/dAGiHg [00:22] CIA-19: node: 03Nathan Rajlich 07master * r11d8823 10/ (3 files in 3 dirs): [00:22] CIA-19: node: process: add `process.config` [00:22] CIA-19: node: This is the JS representation of the `config.gypi` file that was used when [00:22] CIA-19: node: compiling node. With this information, you can tell whether the current node [00:22] CIA-19: node: binary has shared or static dependencies, or any other configuration options [00:22] CIA-19: node: that may have been used. - http://git.io/5IICCg [00:22] CIA-19: node: 03Nathan Rajlich 07master * r7cb0f5f 10/ (Makefile tools/installer.js): [00:22] CIA-19: node: install: update install.js to use `process.config` [00:22] CIA-19: node: Now that the node_prefix is available from within node, we can use it :) - http://git.io/yVFMYA [00:23] socketio\test\54 has joined the channel [00:23] CIA-19: node: 03isaacs 07master * r0fb4fb4 10/ doc/api/child_process.markdown : Document ChildProcess exit/close event difference - http://git.io/P8MPPw [00:24] vam3c_ has joined the channel [00:24] c4milo has joined the channel [00:25] PsiliPharm has joined the channel [00:25] nerdfiles1 has joined the channel [00:25] broofa has joined the channel [00:26] rick-_ has joined the channel [00:26] Axsuul has joined the channel [00:26] nerdfiles1 has left the channel [00:26] Axsuul has joined the channel [00:26] Axsuul has joined the channel [00:29] zeade has joined the channel [00:30] jj0hns0n has joined the channel [00:31] zeade has joined the channel [00:32] k1ttty has joined the channel [00:32] s_segawa has joined the channel [00:32] tommyvyo has joined the channel [00:33] sammmy: Why is it that Express seems to catch some thrown errors, but other, more deeply nested errors in callbacks are not captured and sent to the browser? [00:34] enjalot has joined the channel [00:34] YoY has joined the channel [00:35] jtsnow has joined the channel [00:38] TooTallNate: sammmy: express does a try/catch around your middleware [00:38] TooTallNate: but that only catches top-level errors [00:38] TooTallNate: anything async will need to be caught manually and passed to next(err) [00:39] baudehlo has joined the channel [00:40] sammmy: TooTallNate: how do you catch errors that are in a callback? [00:41] TooTallNate: sammmy: well usually you would have some callback with function (err, result) {} [00:41] TooTallNate: so: if (err) return next(err) [00:41] TooTallNate: is a common thing to do [00:41] sammmy: But where do I get next? [00:41] TooTallNate: it's the third argument to any middleware [00:41] TooTallNate: req, res, next [00:42] jyp has joined the channel [00:42] argami has joined the channel [00:43] totallymike: sammmy: you just call next whenever you want the next middleware (get, put, whatever) to handle the request [00:43] sammmy: I see. And the err passes along to each middleware. What happens if there are two errors, one in each middleware? [00:43] mansoor has joined the channel [00:44] dgathright has joined the channel [00:44] TooTallNate: sammmy: once you next(err), then only "error handling" middleware will be invoked for the remainder or the request [00:44] TooTallNate: that is, middleware with 4 arguments defined [00:44] take_cheeze has joined the channel [00:45] TooTallNate: example: [00:45] TooTallNate: err, req, res, next [00:47] willwhite has joined the channel [00:47] Druid_ has joined the channel [00:47] andrehjr_ has joined the channel [00:48] sammmy: TooTallNate: I see. When I use next(err), I get a error http.js:523 [00:48] sammmy: throw new Error("Can't set headers after they are sent."); [00:48] methodfree has joined the channel [00:50] TooTallNate: sammmy: that means you're still calling res.write()/res.end() even after an error has occured [00:51] TooTallNate: be sure to return from the function after calling next() [00:51] sridatta has joined the channel [00:51] jesusabdullah: I don't think you can divide a res.write() by a res.end() ? ;) [00:51] jesusabdullah: do those even return anything? [00:51] myndzi: i've got htmlparser and (optionally) soupselect going now, but i need a way to click links / submit forms. anybody know how? is there something that goes good with these modules? [00:52] AI42 has joined the channel [00:52] jesusabdullah: k fine returning NaN counts in javascript I guess <_< [00:52] artusrocha has joined the channel [00:52] sammmy: jesusabdullah: I think he meant 'or' [00:53] jesusabdullah: sammmy: Oh, that returns `undefined` [00:53] k1ttty_ has joined the channel [00:54] Frostopher has joined the channel [00:55] criswell has joined the channel [00:57] TooTallNate: jesusabdullah: i mean "one of those 2", not divide [00:58] jesusabdullah: TooTallNate: ;) [00:58] TooTallNate: since both of those functions implcitly flush the headers [00:58] TooTallNate: :p [00:59] mapreduce: I'm just starting reading docs, not tried anything out yet, but a question that pops into mind straightaway is.. if one typically listens on the HTTP port from within the node program, can you compose two or more node programs and have them running on the same port as you can with separate PHP clusterf.. programs? [00:59] vicapow has joined the channel [00:59] agnat has joined the channel [00:59] totallymike: I wasn't even aware you COULD have multiple processes listening to a single port . . . [00:59] mapreduce: You can't. [00:59] totallymike: That's what I thought. [01:00] TooTallNate: mapreduce: take a look at the "cluster" module [01:00] TooTallNate: i think that's what you mean [01:00] Knowledge has joined the channel [01:00] mehlah has joined the channel [01:01] piscisaureus_ has joined the channel [01:01] mapreduce: TooTallNate: It is. That looks nifty, looks like the child nodes need no changes at all. [01:02] mapreduce: well, very localised change at startup [01:05] thinkt4nk has joined the channel [01:05] r04r has joined the channel [01:06] achiu has joined the channel [01:08] kvda has joined the channel [01:10] r04r has joined the channel [01:10] r04r has joined the channel [01:11] jlank has joined the channel [01:11] nicholas_ has joined the channel [01:12] igl1 has joined the channel [01:12] subbyyy has joined the channel [01:12] zackattack has joined the channel [01:13] CIA-19: libuv: 03Ben Noordhuis 07master * r6031156 10/ test/runner.c : [01:13] CIA-19: libuv: test: silence compiler warning [01:13] CIA-19: libuv: main_proc is never read without having been initialized first but gcc 4.4.x [01:13] CIA-19: libuv: fails to infer that. - http://git.io/Waz6XQ [01:13] CIA-19: libuv: 03Ben Noordhuis 07master * rc21184c 10/ test/benchmark-ares.c : test: make variables in benchmark-ares static - http://git.io/PlDw7w [01:13] CIA-19: libuv: 03Ben Noordhuis 07master * rdfda500 10/ (7 files in 4 dirs): [01:13] CIA-19: libuv: unix, win: store ares handles in a binary tree [01:13] CIA-19: libuv: Store the uv_ares_task_t handles in a red-black tree, not a linked list. [01:13] CIA-19: libuv: Fixes #72. - http://git.io/Yy0dQw [01:14] boogyman has joined the channel [01:14] boogyman has joined the channel [01:14] yogig has joined the channel [01:14] jlank has joined the channel [01:14] r04r has joined the channel [01:14] socketio\test\94 has joined the channel [01:15] jlank has joined the channel [01:16] jlank has joined the channel [01:17] sammmy: SQL and Node.js is odd together. Maybe that's why most Noders don't use MySQL. Or am I wrong; there are a lot of you using MySQL? [01:18] Octayn: sammmy: I use sqlite frequently [01:18] kirbysayshi has joined the channel [01:18] TooTallNate: sammmy: i think the majority use some nosql solution [01:18] TooTallNate: like mongo or couch [01:18] sammmy: I wonder how hard mongo or couch is to pick up coming from a mysql background? [01:19] whaley has joined the channel [01:19] alejandromg has joined the channel [01:19] totallymike: sammmy: it's different but not hard [01:19] Octayn: It's not relational [01:19] chapel: its worth checking out [01:19] r04r has joined the channel [01:19] r04r has joined the channel [01:19] sammmy: I see. So it'll take some time to go up the learning curve for that? [01:19] chapel: even if you don't use it, its good knowledge [01:19] shinuza has joined the channel [01:19] willwhite has joined the channel [01:19] sammmy: I checked it out before. [01:19] totallymike: sammy http://books.couchdb.org/relax [01:19] TooTallNate: sammmy: i'd say the learning curve is very minimal [01:20] chapel: its really easy to get into [01:20] sammmy: however, I remember that one store about foursquare's mongo database failure...how robust is it? [01:20] chapel: the hard part is figuring out how to architect your data [01:20] Ond: It isn't; mongo is crap [01:20] rummik: ACTION should probably look into some new databases [01:20] totallymike: Which isn't much different from the challenges of SQL databases. They both require their own modes of thinking. [01:20] sammmy: chapel: that's the hard part in MySQL too (sometime), although SQL can be a pain at times too. [01:20] saml has joined the channel [01:21] saml: hey, how easy is it to write an extension (C++) [01:21] totallymike: sammmy: get you some docs [01:21] TooTallNate: sammmy: nosql is nice because altering your models (tables) doesn't usually require any migration [01:21] totallymike: derp [01:21] totallymike: saml get you some docs [01:21] TooTallNate: saml: not too bad [01:21] saml: thanks [01:21] saml: i googled yay [01:21] TooTallNate: saml: http://nodejs.org/api/addons.html [01:22] TooTallNate: saml: also check out https://github.com/TooTallNate/node-gyp#readme [01:22] karterk has joined the channel [01:22] sammmy: I just find SQL strings in JS odd. If maybe the SQL was separated in it's own file (like a template file for sql, like ejs for .sql), then I could have syntax highlighting and cleaner looking JS. [01:22] saml: totallymike, thanks [01:23] saml: and TooTallNate are you the same perosn? [01:23] jlank has joined the channel [01:23] TooTallNate: same as who? [01:23] saml: as totallymike [01:23] TooTallNate: no, not the same [01:23] saml: ah thank you both of you [01:24] r04r has joined the channel [01:24] totallymike: Hitting the docs is just good sense ;) [01:24] sammmy: Also, it would be cool to be able to have multiple SQL statements in a .sql file and have the JS mysql module recognize these statements and process error reporting when thrown by mysql. ;P [01:24] totallymike: sammmy: sounds like you've got a new project [01:25] sammmy: YAY!! This would be an awesome module to blow node-mysql out of the water! Sorry, felixge. xP [01:25] totallymike: I think anybody'd be happy to have a great module. If you get one going and it's rad, it'll get used. [01:25] jlank has joined the channel [01:26] totallymike: I've never used node-mysql, so I have no idea how great it is. felixge does good work though [01:26] TooTallNate: sammmy: no reason not to build something like that on top of node-mysql [01:26] totallymike: The beauty of it is that it's not tremendously opinionated [01:27] sammmy: TooTallNate: I might have to build it on top of node-mysql because I couldn't the socket API for the life of me.. -.- (yet) [01:27] TooTallNate: sammmy: i promise you don't want to implement the mysql protocol from scratch :) [01:27] totallymike: heh [01:28] sammmy: However, I might need to rebuild the whole params API that felixge has going. Check out my issue: https://github.com/felixge/node-mysql/issues/175 [01:28] totallymike: sammmy: that's standard SQL [01:28] sammmy: I could just layer my templating engine on top of it. [01:28] CIA-19: libuv: 03Bert Belder 07reviewme * rb2f478e 10/ src/uv-common.c : [01:28] CIA-19: libuv: Use UV_GENERATE_STATIC instead of UV_GENERATE_INTERNAL [01:28] CIA-19: libuv: Fixes the Windows build. - http://git.io/RcA4cQ [01:28] CIA-19: libuv: 03Bert Belder 07reviewme * r91fa014 10/ (include/uv.h src/unix/error.c src/win/error.c): [01:28] CIA-19: libuv: Add UV_ENOSPC and mappings to it [01:28] CIA-19: libuv: Closes GH-337 - http://git.io/nFvQBA [01:28] r04r has joined the channel [01:29] totallymike: ? params is how you prepare a statement [01:29] TooTallNate: sammmy: i see. as a workaround can't you just pass the value twice? [01:29] sammmy: totallymike: what standard? [01:29] vam3c has joined the channel [01:29] sammmy: TooTallNate: like I said, layer my shit on top of his shit. ;p [01:29] totallymike: By standard I mean common. DB2 does the same thing. [01:29] dodo_ has joined the channel [01:29] heavysixer has joined the channel [01:29] totallymike: You prepare a statement with ? placeholders and pass the params in when you actually execute the transaction [01:29] langworthy has joined the channel [01:30] sammmy: De facto standard is a lesser standard IMO. XD [01:30] totallymike: meh. If it's how the sql engine understands it, then it's standard [01:30] monokrome has joined the channel [01:30] totallymike: ask the mysql docs [01:31] nicholas_ has joined the channel [01:31] sammmy: You mean this was apart of the SQL API. Didn't know that. [01:31] monokrome has joined the channel [01:31] jlank has joined the channel [01:31] totallymike: Yes. [01:31] CIA-19: libuv: 03Bert Belder 07master * raff94a0 10/ (include/uv.h src/unix/error.c src/win/error.c): [01:31] CIA-19: libuv: Add UV_ENOSPC and mappings to it [01:31] CIA-19: libuv: Closes GH-337 - http://git.io/nGc-0g [01:31] sammmy: Regardless, I will still need a templating engine for my .js.sql files or whatever extension I call them. [01:31] monokrome has joined the channel [01:31] totallymike: "SELECT * FROM TABLE1 WHERE BURGLE = ?" [01:31] totallymike: execute('foo') [01:31] totallymike: ^ pseudo-code [01:32] monokrome has joined the channel [01:32] sammmy: I see. Can ? be escaped \? ? [01:32] CIA-19: libuv: 03Bert Belder 07v0.6 * r163d8de 10/ (include/uv.h src/unix/error.c src/win/error.c): [01:32] CIA-19: libuv: Add UV_ENOSPC and mappings to it [01:32] CIA-19: libuv: Closes GH-337 - http://git.io/Hkxhuw [01:32] isaacs has joined the channel [01:32] monokrome has joined the channel [01:33] totallymike: but that's the gist of it. You pass the query to the db server, and it doesn't run it, but it can figure out how to map the query. Then when you execute it you pass in the params and it goes to town [01:33] monokrome has joined the channel [01:33] sammmy: I see. [01:33] monokrome has joined the channel [01:34] totallymike: It seems that felixge's params are in fact NOT prepared statements, but they work the same way. [01:34] sammmy: How did PHP get around this ? thing, or was it always there and I never noticed? [01:34] monokrome has joined the channel [01:34] totallymike: question mark placeholders [01:34] jsurfer has joined the channel [01:34] sammmy: yes question mark placeholders. [01:35] totallymike: That was just a follow-up to my previous statement. I'm looking into mysqli, it's been a few years since I've used it. [01:35] totallymike: Yeah mysqli uses ? prepared statements too [01:35] bic2k has joined the channel [01:35] CIA-19: libuv: 03Ben Noordhuis 07master * r87151c8 10/ (src/unix/linux/inotify.c src/uv-common.c): Use RB_GENERATE_STATIC, not RB_GENERATE_INTERNAL. - http://git.io/frC-jw [01:35] CIA-19: libuv: 03Ben Noordhuis 07master * r681aa83 10/ include/uv-private/tree.h : Mark rbtree functions with __attribute__((unused)). - http://git.io/ZkzXJA [01:35] totallymike: You CAN just do "WHERE foo = " . $bar [01:36] totallymike: or whatever the syntax is, but that eliminates the benefits [01:36] torvalamo: prepared statements is the way to go [01:36] torvalamo: leave the escaping and the sanitizing to the database engine [01:36] chapel: sammmy: why not just write your template thing as a layer over the ? implementation [01:37] chapel: so you would be able to do $0, $1 and map them [01:37] totallymike: The template just sounds like over-complication, really. [01:37] chapel: while directly it would just put the values in the right order, duplicating if necessary [01:37] sammmy: chapel: that's my conclusion. [01:38] dudeinthemirror has joined the channel [01:38] Ragnok has joined the channel [01:38] Ragnok has joined the channel [01:38] totallymike: sammy http://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php [01:39] totallymike: You can also store procedures, if I'm not mistaken. [01:40] CIA-19: libuv: 03Bert Belder 07v0.6 * r4ae316b 10/ src/win/winapi.h : Windows: fix compiler warnings - http://git.io/jfwKUw [01:40] totallymike: Which, if you've got a limited set of queries that you're running often, is probably the way to go. [01:40] brainss has joined the channel [01:41] sammmy: Does node-mysql support the :label syntax? [01:41] shinuza has joined the channel [01:41] totallymike: I don't know what that is. [01:42] dekub has joined the channel [01:42] kriskowal has joined the channel [01:42] polardude_ has joined the channel [01:43] sammmy: "SELECT * FROM table WHERE val = :label" [01:43] westg has joined the channel [01:43] totallymike: Interesting. [01:43] addisonj has joined the channel [01:44] sammmy: In mysqli, you just $stmt->bindParam(':label', $value); $stmt->execute(); [01:44] sammmy: error. [01:44] totallymike: cool [01:44] sammmy: In mysqli, you just $stmt->bindParam(':label', $value); $value = 'hello world'; $stmt->execute(); [01:44] HacDan has joined the channel [01:45] abraxas has joined the channel [01:45] totallymike: It doesn't look like he's got prepared statements implemented yet. [01:45] ehazlett has joined the channel [01:46] sammmy: Yeah, extra cruft to get where you want. But Idk if node-mysql allows for client.query("SELECT * FROM table WHERE col = :label", {label:'cheesecakes'}); Would be cool if it does. [01:46] sammmy: ACTION goes to try it out. [01:46] westg: argh "Can't set headers after they are sent." [01:46] westg: what am I doing wrong [01:46] maxogden: setting headers after they are sent [01:47] polardude has joined the channel [01:47] maxogden: (or, more constructively, trying to write to a response twice or something. hard to tell without code) [01:47] CIA-19: libuv: 03Ben Noordhuis 07master * r379ca42 10/ (5 files): [01:47] CIA-19: libuv: test: fix compiler warnings [01:47] CIA-19: libuv: * remove unused variables and functions [01:47] CIA-19: libuv: * replace %llu with %zu when printing size_t variables - http://git.io/lmXPJg [01:48] westg: https://gist.github.com/2048097 [01:48] Wa has joined the channel [01:48] totallymike: Doesn't .send also end the response? [01:48] westg: I'm posting to /login [01:48] totallymike: does your mailerFunction try to send stuff back to the response? [01:49] westg: nope [01:49] chapel: are you using middleware? [01:49] westg: it only accesses req.user.name to show in the console on message sent success [01:49] admc has left the channel [01:50] westg: https://gist.github.com/2048106 [01:50] AI42: Hi, how should i realize transactions, i'am using postgresql and node module pg, maybe i should use enother module? [01:50] westg: just the standard middleware [01:51] chapel: what about the route declaration ? [01:51] westg: app.post('/login', routes.loginpost); [01:51] westg: I have another get which is in routes.js as well and it works fine [01:52] westg: a get on / [01:52] bizniz98 has joined the channel [01:52] sammmy: Unfortunately, node-mysql doesn't support that goodness. :| [01:53] totallymike: westg: are you sure only one route is being called? [01:53] totallymike: or that the correct route is benig called? [01:54] westg: yea [01:54] westg: I'm posting to /login from a form on / [01:54] westg: it worked before [01:54] westg: but ever since I added the users object to check against [01:54] thinkt4nk has joined the channel [01:54] westg: the route goes in a loop [01:54] westg: on that same error [01:55] westg: the users is just an array with one object [01:56] westg: var users = [ { name: 'John', email: 'john@yahoo.com' } ] [01:56] westg: which is declared right above that exports line [01:56] automata has joined the channel [01:56] totallymike: I dunno, try wrapping it in a closure? [01:57] takumination has joined the channel [01:58] westg: I think it has to do with this line res.send('You have been authenticated: ' + users[0].name); [01:58] westg: but I don't see how users[0].name would cause a problem related to this specific error hmm [01:58] criswell has joined the channel [01:59] totallymike: it sounds like something's causing it to loop [01:59] takumination: hi, anyone can help me with this? i keep getting "Error: write EPIPE at errnoException" and i couldnt find out the reason :( [02:00] westg: https://gist.github.com/2048121 [02:00] westg: this is the looping error [02:00] westg: holy crap [02:00] westg: it's in the mailerFunction [02:02] al3xnull has joined the channel [02:02] chapel: it could be mailerFunction has an error, and is trying to send it [02:03] chapel: and because you already res.send, it gives you the headers error [02:03] AI42: but without transactions everything has no sense, i don't belive! it must be some module that can do this [02:05] sammmy: AI42: You can do transactions in node-mysql, or more conveniently with node-mysql-queues [02:05] Destos has joined the channel [02:06] AI42: what about PostgresClient [02:06] st_luke has joined the channel [02:06] sorensen__ has joined the channel [02:07] blueadept has joined the channel [02:07] blueadept has joined the channel [02:07] AI42: queues != tansactions [02:09] stepheneb has joined the channel [02:11] mikeric has joined the channel [02:11] westg: figured it out [02:12] westg: wasn't passing req to mailerFunction() [02:12] totallymike: hooray! [02:12] vikstrous has joined the channel [02:12] orlandovftw has joined the channel [02:13] JSONB has joined the channel [02:13] vikstrous: Hey guys, how would i go about editing a core module to try to fix a bug? Are the js modules (http specifically) compiled into the node executable? Do I have to recompile every time? [02:13] westg: thanks totallymike and chapel! [02:14] totallymike: I rarely serve as much better than a sounding-board, and mostly provide input for my own learning benefit, but I'm always happy to (attempt to) help :) [02:15] westg: It just seems weird that the error said that it can't set the headers but all i was trying to do was access the req.user object [02:15] westg: I thought it would only be setting headers for res objects [02:16] westg: maybe I haven't set up error handling properly [02:16] sammmy: AI42: Doesn't the node-mysql-queues module use transactions internally? [02:16] sorensen__ has joined the channel [02:17] AI42: dunno it does? [02:18] sammmy: AI42: idk either. x___x [02:19] sammmy: AI42: I looked into the source. It looks like it does. [02:20] AI42: looks like? )) [02:20] totallymike: lol hashish [02:20] blparker has joined the channel [02:22] blparker has left the channel [02:23] unomi has joined the channel [02:24] totallymike: all right time for bed for this one [02:29] chazor has joined the channel [02:30] thinkt4nk has joined the channel [02:31] sammmy: later totallymike [02:31] C0deMaver1ck has left the channel [02:32] nicholas_ has joined the channel [02:32] rurufufuss has joined the channel [02:33] neoesque has joined the channel [02:33] dylang has joined the channel [02:34] vam3c_ has joined the channel [02:35] vam3c has joined the channel [02:35] thinkt4nk has joined the channel [02:37] nqbao has joined the channel [02:37] AvianFlu has joined the channel [02:38] vam3c has left the channel [02:38] nqbao has left the channel [02:39] a_suenami has joined the channel [02:40] sharkbird has joined the channel [02:42] nibblebot has joined the channel [02:42] microp11 has joined the channel [02:44] vam3c has joined the channel [02:46] vam3c_ has joined the channel [02:46] Mulex has left the channel [02:47] joemccann has joined the channel [02:47] kyledr_ has joined the channel [02:47] marcostoledo has joined the channel [02:48] polardude_ has joined the channel [02:50] sammmy: How does node-mysql handle sql injection? [02:51] achiu has joined the channel [02:52] kvda has joined the channel [02:52] daniel` has joined the channel [02:53] daniel`: is there a way to list all pending callbacks? (i.e. a way to ask "why is the process still open?") [02:53] AvianFlu: daniel`, not at present [02:54] AvianFlu: there's been talk of adding it though [02:54] daniel`: AvianFlu: OK, thanks [02:54] daniel`: yeah, seems like it would be very useful [02:54] daniel`: without it it’s kind of hard to bother figuring out how to close everything properly and just brute force it with process.exit() [02:55] dgathright has joined the channel [02:56] daniel`: which can often lead to race conditions [02:57] daniel`: (i.e., if you do something and then exit, did you really do it?) [02:57] AvianFlu: there are ways around that [02:57] AvianFlu: I mean, let's back up a sec [02:58] AvianFlu: what's your process that's hanging trying to do? [02:58] munro: hey, is there an event I can listen on when process.stdout resizes? [02:58] AvianFlu: munro, you mean the window resizes? [02:58] munro: when process.stdout.getWindowSize() changes :) [02:58] AvianFlu: munro, in 0.8 there will be something for that [02:59] joshsmith has joined the channel [02:59] AvianFlu: but not presently [02:59] AvianFlu: I think I just got added to master in the last day - or it's still pending [02:59] munro: nice! [02:59] AvianFlu: that's TooTallNate's country, that stuff [02:59] munro: I'll just do polling for now [03:00] munro: TooTallNate won't be able to sleep at night knowing that [03:00] kvda: Anyone have any experience with Hogan.js under Node? [03:00] Progster has joined the channel [03:00] dfletcher: hi I have a couple quick questions to see if node is appropriate for this project. (1) can it create v8 context from js so eval results don't affect enclosing scope? and (2) is there decent mysql bindings? [03:00] kvda: I cant' seem to figure out how the partials work. [03:04] munro: dfletcher: (1) http://nodejs.org/api/all.html#all_vm_runinnewcontext_code_sandbox_filename (2) https://github.com/felixge/node-mysql [03:05] dfletcher: munro, excellent! thank you. [03:05] vam3c_ has joined the channel [03:05] campo has joined the channel [03:06] mcavage has joined the channel [03:06] rodyhaddad has joined the channel [03:07] daniel`: AvianFlu: hmm, it’s doing a bunch of things: it opens a few TCP servers, accepts a few sockets, reads from stdin, opens files, and pipes between those streams [03:07] AvianFlu: what node version? [03:08] daniel`: 0.6.6 [03:08] elijah-mbp has joined the channel [03:08] lohkey has joined the channel [03:08] daniel`: oh, and it starts child processes [03:09] AvianFlu: hmmm [03:09] vam3c has joined the channel [03:09] daniel`: actually maybe just one [03:09] AvianFlu: try upgrading to 0.6.13... there are various bugs that affect things like this that get fixed [03:09] AvianFlu: before 0.6.6, stdin wouldn't close if you opened it [03:09] daniel`: oh, cool [03:09] AvianFlu: for example [03:10] AvianFlu: but you're on 0.6.6, so that's probably not your problem [03:10] daniel`: ah [03:10] daniel`: I’m doing `process.stdin.pause()` at the end [03:10] vam3c_ has joined the channel [03:11] daniel`: god I love Homebrew [03:12] vam3c has joined the channel [03:12] vbabiy has joined the channel [03:13] dr0id has joined the channel [03:13] vam3c has left the channel [03:15] TooTallNate has joined the channel [03:16] tmike has joined the channel [03:19] rodyhaddad: if I install node on my mac, and use something like express, on which local link will it be served? [03:22] kvda: rodyhaddad something like that should be in the express docs [03:22] Octayn: rodyhaddad: on whichever link the ip happens to be associated with, no? [03:24] daniel`: AvianFlu: ah, I found it. I was simply forgetting to kill the child process. Thanks for your help, and for making me upgrade to 0.6.13 :-) [03:24] rodyhaddad: er�hm, I think i'm getting a problem cz I also have nginx running [03:24] AvianFlu: daniel`, nice :D [03:27] albert has joined the channel [03:28] jerrysv has joined the channel [03:29] satyr has joined the channel [03:30] Axsuul has joined the channel [03:30] rodyhaddad: got it to work, thx I guess :D [03:31] broofa has joined the channel [03:31] takumination has joined the channel [03:35] pizthewiz has joined the channel [03:36] dgathright has joined the channel [03:38] Spion has joined the channel [03:38] philips has joined the channel [03:38] philips has joined the channel [03:38] TheFuzzball has joined the channel [03:39] k1ttty has joined the channel [03:39] jerrysv has joined the channel [03:42] mandric has joined the channel [03:42] IRONkyle has joined the channel [03:42] lohkey has left the channel [03:42] iangreenleaf has joined the channel [03:43] nibblebot has joined the channel [03:44] daniel`: AvianFlu: actually, no... sigh, I’d forgotten one place I was still calling `process.exit()` so now I’m back to square one again: can’t find anything left to close and my process is still running [03:44] AvianFlu: are the children? [03:46] Avanine has joined the channel [03:46] daniel`: yeah, I’m only starting one child process and it gets killed; I double checked against `ps` [03:47] sh1mmer: are you listening for kill signals? [03:47] daniel`: sh1mmer: yeah, SIGINT [03:47] bobbywarner has joined the channel [03:48] sh1mmer: and you process.exit() on SIGINT? [03:48] daniel`: I have to stop listening for SIGINT? [03:48] daniel`: yeah, but I’m not sending SIGINT [03:48] sh1mmer: hm [03:48] sh1mmer: could be a bug [03:49] daniel`: ok, I’ll divide and conquer it later; thanks [03:49] AvianFlu: yeah, a SIGINT listener keeping the process alive is definitely not ideal [03:50] daniel`: oh let me try if that helps [03:50] baudehlo has joined the channel [03:50] AvianFlu: if that's what's doing it, I suggest opening a node issue [03:50] sh1mmer: yeah that seems a little wrong [03:50] AvianFlu: that doesn't seem like the kind of thing that should keep the process up [03:50] sh1mmer: I'm just guessing [03:51] daniel`: nope, didn’t help; let me try that in a separate file [03:52] sammmy: It's annoying that I can't set a breakpoint in my module node-inspector because my module hasn't been required yet. x__x [03:52] daniel`: no, `process.on("SIGINT", function () {})` exits in 0.6.13 [03:53] sh1mmer: sammmy: you can add breakpoint commands [03:53] sh1mmer: sammmy: or you can do debug-brk [03:53] sh1mmer: and break after the require [03:53] sh1mmer: you'll need to refresh the node-inspector window to get an updated list of files [03:53] nerdfiles has joined the channel [03:54] gavin_huang has joined the channel [03:54] nerdfiles has left the channel [03:54] sammmy: sh1mmer: refreshing doesn't help. [03:54] sammmy: how do I add a command? [03:54] sh1mmer: in the source [03:55] sammmy: what's the method? [03:55] sh1mmer: it's just breakpoint [03:55] zackattack has joined the channel [03:55] huggies has joined the channel [03:55] AvianFlu: daniel`, look around in your code for event listeners that you should maybe be removing... stuff like that [03:55] AvianFlu: somewhere, there's a callback pending, most likely [03:55] sammmy: sh1mmer: you mean like, breakpoint;? [03:55] sh1mmer: yes [03:56] AvianFlu: any timers in your app? there have been various weird event loop issues with them at various points [03:56] daniel`: yeah, I’m combing through it another time now [03:56] sammmy: weird. That doesn't seem like valid JS. (it is but it doesn't do anything) [03:56] sh1mmer: sammmy: however, I would say that you can just run with `node debug-brk script.js` [03:56] sh1mmer: and then add the require [03:56] sammmy: breakpoint; is more flexible. ;P [03:56] sh1mmer: no, really it's not [03:57] jzacsh has joined the channel [03:57] jzacsh has joined the channel [03:58] Qzen^ has joined the channel [03:59] sammmy: sh1mmer: it's saying breakpoint defined. [04:00] ank has joined the channel [04:00] sreeix has joined the channel [04:00] takumination has joined the channel [04:01] dephex has joined the channel [04:02] daniel`: AvianFlu: if I get an "end" event, that means I don’t have to worry about that stream any more, right? [04:02] al3xnull has joined the channel [04:02] izepstan has joined the channel [04:02] AvianFlu: daniel`, correct [04:02] AvianFlu: when possible, use stream.pipe, it handles all that for you [04:02] AvianFlu: i.e. pipe from a stream to a stream [04:03] _numbers has joined the channel [04:03] _numbers: what's a good way for my php app to communicate to my node.js socket.io server? [04:03] _numbers: i want to push event notifications from php to node.js [04:04] Octayn: _numbers: open a local domain socket or use pipes or a local tcp socket [04:04] sammmy: sh1mmer: I was talking about the node-inspector tool, just fyi. [04:05] _numbers: Octayn: have been trying that. even read socket.io protocol. but it looks like it works kind of like php, requiring php to accept connections back on random ports. kind of complex [04:05] _numbers: although i guess there's nothing wrong with putting express on the node.js app and then just do regular HTTP POST to it [04:05] daniel`: AvianFlu: yeah, I’m doing stream.pause(); stream.on("error", ..); stream.on("end", ..); ..; stream.pipe(other); stream.resume() [04:05] warz has joined the channel [04:05] warz has joined the channel [04:06] ParadoxQuine has joined the channel [04:06] Octayn: _numbers: err, what. if using a socket from php is complex then they have failed epicly [04:06] bobojam has joined the channel [04:07] _numbers: Octayn: well for example, i can open a connection to the socket server using netcat [04:07] _numbers: Octayn: but the communication is something like this http://hastebin.com/hotamupiyo.sm [04:07] dgathright has joined the channel [04:08] _numbers: thats smashed up notes from reading the protocol doc on github wiki and what i intercepted with wireshark [04:08] _numbers: but you get the idea. have you tried what you are recommending? [04:08] Octayn: that looks like one of socket.io's fallback protocols, not real websockets [04:08] slloyd has joined the channel [04:08] Octayn: _numbers: http://php.net/manual/en/function.fsockopen.php [04:10] sammmy: Why don't errors show me the file and line number where the error occurred all the time? [04:11] CarterL has joined the channel [04:14] boltR has joined the channel [04:14] snoj has joined the channel [04:15] syntaxiko has joined the channel [04:20] jdeibele has joined the channel [04:20] sreeix has joined the channel [04:21] justmoon has joined the channel [04:21] justmoon has joined the channel [04:21] dgathright has joined the channel [04:22] daniel`: AvianFlu: YES, got it! :D I wasn’t closing one server properly due to a typo [04:22] AvianFlu: there you go [04:22] AvianFlu: it's always something [04:22] AvianFlu: if it's not one thing it's another thing. [04:23] daniel`: thanks again for help and encouragement :-) [04:23] AvianFlu: np [04:23] daniel`: yeah...! [04:27] yaymukund has joined the channel [04:27] _numbers: is there a shorter way to write this [04:27] bobojam has left the channel [04:28] _numbers: io.of('/auction').socket.broadcast.to('auction-123').emit('bid', req.body); [04:28] langworthy has joined the channel [04:30] smorin has joined the channel [04:32] MagiC3PO has joined the channel [04:32] dgathright has joined the channel [04:33] tanepiper has joined the channel [04:35] csprite has left the channel [04:38] petschm_ has joined the channel [04:40] Transformer has joined the channel [04:43] djbell has joined the channel [04:44] orlandovftw has joined the channel [04:44] zeade has joined the channel [04:45] insanoid has joined the channel [04:45] orlandovftw has joined the channel [04:47] BRampersad has joined the channel [04:47] BRampersad: hey guys [04:48] djbell has joined the channel [04:48] munichlinux has joined the channel [04:48] orlandovftw has joined the channel [04:48] devgeeks has left the channel [04:49] copongcopong has joined the channel [04:51] akuiraz has joined the channel [04:52] seattleandrew has joined the channel [04:52] msteinert has joined the channel [04:54] ceej has joined the channel [04:55] tekky has joined the channel [05:00] kriskowal has joined the channel [05:00] sorensen__ has joined the channel [05:01] kvda has joined the channel [05:01] polardude has joined the channel [05:04] mikeal has joined the channel [05:05] polardude_ has joined the channel [05:07] _numbers has left the channel [05:10] michaelmartinez has joined the channel [05:17] sreeix has joined the channel [05:21] dgathright has joined the channel [05:21] Emmanuel` has joined the channel [05:23] Magiobiwan has joined the channel [05:26] redir has joined the channel [05:34] shanebo has joined the channel [05:34] descipher has joined the channel [05:35] fluk3 has joined the channel [05:35] jimbot has joined the channel [05:35] shanebo: hey guys is it possible to do concurrent curl calls on a local app? [05:35] Octayn: why not? [05:35] yawNO: use ab [05:35] shanebo: Octayn, I don't know how [05:36] shanebo: yawNO, what's ab? [05:36] zackattack has joined the channel [05:37] kPb_in has joined the channel [05:37] skylamer` has joined the channel [05:41] yawNO: shanebo: apache benchmark [05:45] shanebo: yawNO, yeah i was looking at that… looks way over my head. any idea how to curl concurrently? [05:45] wookiehangover has joined the channel [05:47] fangel has joined the channel [05:47] zeade has joined the channel [05:53] boltR has joined the channel [05:54] TheJH has joined the channel [05:54] noganex has joined the channel [05:56] pvankouteren has joined the channel [05:56] colinwd has joined the channel [05:58] Ond: Yes [05:59] kanthi has joined the channel [06:01] farhad2161 has joined the channel [06:01] farhad2161: hi,is there any free pdf or ebook for start learning node.js ? [06:02] Octayn: farhad2161: do you know javascript? [06:02] farhad2161: yeah [06:02] farhad2161: Octayn: yeah [06:02] Octayn: farhad2161: then you shouldn't have a problem with node at all, there isn't much to it really. check out http://nodemanual.org/latest/ [06:02] jetienne has joined the channel [06:02] al3xnull has joined the channel [06:04] farhad2161: Octayn: thanks a lot [06:07] anubhaw has joined the channel [06:08] redir has joined the channel [06:09] anubhaw: what is max memory limit for a node process on 32bit machine ? [06:10] simenbrekken has joined the channel [06:10] benvie: ominous question is ominous [06:10] benvie: a gig [06:10] anubhaw has joined the channel [06:10] benvie: by default anyway, isn't that the max for v8? you can change it [06:11] benvie: not that you can go multiples higher with 32 bit [06:12] anubhaw: I tried setting setting --max-old-space-size more than 700mb . node proces fails to start [06:12] benvie: think you're missing another setting [06:13] benvie: node --v8-options has all the possibilities, looking to see [06:13] tauren has joined the channel [06:14] redir_ has joined the channel [06:14] nqbao1 has joined the channel [06:14] petrjanda has joined the channel [06:14] skm has joined the channel [06:14] nqbao1 has left the channel [06:16] sharkbird has joined the channel [06:17] benvie: hah --testing_prng_seed (default: 42) [06:17] benvie: yeah I don't see it but I know there's an option [06:18] muddo has joined the channel [06:18] fluk3: Hi everyone! Does anyone work with node.js on windows and has needed access to odbc? [06:19] anubhaw: yeah I couldn't find either. I did quick googling and almost all the places people refer --max-old-space-size flag for increasing mem limit [06:19] mattgifford has joined the channel [06:19] kirbysayshi has joined the channel [06:19] benvie: I can say the 32bit thing shouldn't impose a specific problem since almost all uses of it are 32bit [06:20] amigojapan has joined the channel [06:22] michaelmartinez has left the channel [06:22] hidinginabunker has joined the channel [06:23] anubhaw: well but 500mb upper limit on mem is a bit less, I don't know how do I work around this. My application does need more than 500mb memory in some cases. [06:24] benvie: http://code.google.com/p/v8/issues/detail?id=847 [06:25] benvie: which yeah [06:25] benvie: mentions the same flag as you said, if you can't even hit a gig then no idea [06:26] hgg has joined the channel [06:26] anubhaw: yes I can't set it to more than 700mb and I am running node 0.6.6 [06:26] stevengill has joined the channel [06:27] benvie: simplest thing I'd say is check if that varies with a newer version of node (even if just to test) [06:27] SpikeMeister has joined the channel [06:27] EhevuTov has joined the channel [06:27] benvie: so elimitate a version issue [06:27] fluk3 has joined the channel [06:28] benvie: node is under very heavy development so even that amount of difference could have an impact despite there being binary compabilitity [06:29] jkridner_ has joined the channel [06:29] Zdkroot has joined the channel [06:30] Magiobiwan has joined the channel [06:30] k1ttty_ has joined the channel [06:30] gr4yscale has joined the channel [06:31] anubhaw: I think I have the latest version . there have been minor version released after that but this was fixed long back [06:31] benvie: yeah that issue isn't something I'm aware of being changed [06:32] fangel has joined the channel [06:33] benvie: but I know 0.6.6 isn't the latest and there's been a lot of development. Latest is 0.6.13 and 0.6.6 is around a month and a half? old (with the last month seeing a lot of activity) [06:33] benvie: http://nodejs.org/dist/ [06:34] benvie: er scratch that [06:34] benvie: 0.6.6 is 4 months old [06:35] simenbrekken has joined the channel [06:38] boltR has joined the channel [06:39] SamuraiJack has joined the channel [06:40] amigojapan_ has joined the channel [06:41] redir has joined the channel [06:41] redir_ has joined the channel [06:42] Testerski has joined the channel [06:42] niloy has joined the channel [06:42] sammmy: does app.listen have to be after route method calls? [06:43] Testerski: how can I read bytes from opened file by calling a function out of fs.open's scope ? [06:44] Antaranian has joined the channel [06:45] Antaranian: t [06:45] phluffy has joined the channel [06:47] tornad has joined the channel [06:47] Antaranian has left the channel [06:49] ph^ has joined the channel [06:49] graeme_f has joined the channel [06:50] Hephaistos has joined the channel [06:52] MerlinDMC has joined the channel [06:55] cosmincx has joined the channel [06:57] kanthi has joined the channel [06:57] Mulex has joined the channel [07:02] mattgifford has joined the channel [07:02] aliem has joined the channel [07:02] tonymilne: Does anyone know how to pass input from stdio into a node app? [07:03] tonymilne: *i mean stdin [07:03] tonymilne:  [07:03] tonymilne: (lol, or whatever i mean!) [07:07] k1ttty has joined the channel [07:07] amigojapan has joined the channel [07:09] misza222 has joined the channel [07:10] dobber has joined the channel [07:11] simenbrekken: tonymilne: http://stackoverflow.com/search?q=read+from+stdin+node.js [07:11] velo has joined the channel [07:11] stevengill has joined the channel [07:12] jacoblyles has joined the channel [07:15] take_cheeze has joined the channel [07:16] socketio\test\55 has joined the channel [07:16] graeme_f has joined the channel [07:16] garrensmith has joined the channel [07:16] socketio\test\87 has joined the channel [07:18] socketio\test\55 has joined the channel [07:18] kyledr_ has joined the channel [07:19] Vennril has joined the channel [07:22] Morkel has joined the channel [07:22] aklt has joined the channel [07:23] erujolc has joined the channel [07:23] Ricket has joined the channel [07:23] umren has joined the channel [07:24] Emmanuel` has joined the channel [07:24] mattgifford has joined the channel [07:25] noganex has joined the channel [07:27] joshgillies has joined the channel [07:27] stafamus has joined the channel [07:28] shylent has joined the channel [07:29] mattgiff_ has joined the channel [07:30] redir has joined the channel [07:32] djazz has joined the channel [07:33] deeprogram has joined the channel [07:33] westg has joined the channel [07:34] yaymukund has joined the channel [07:34] tablackmore_ has joined the channel [07:35] enjalot has joined the channel [07:36] briancra_ has joined the channel [07:37] tablackmore_: I'm haveing problems deploying a socket.io server. All works locally. When I deploy it I end up in an endless longpolling loop. example:http://chatty.socket.arctictiger.com/ [07:37] neshaug has joined the channel [07:38] hz has joined the channel [07:38] Cromulent has joined the channel [07:38] dilvie has joined the channel [07:39] EhevuTov: tablackmore_, you might be having a web socket issue with your server [07:40] anubhaw has joined the channel [07:43] tablackmore_: Any suggestion as to the lind of issues? I can see from the server log that I connect respond with what I should,and then I get a warning that client is not handshaken and should reconnect [07:43] Corren has joined the channel [07:46] djcoin has joined the channel [07:48] satyr has joined the channel [07:48] `3rdEden has joined the channel [07:48] amigojapan has joined the channel [07:49] Testerski has left the channel [07:51] josh-k has joined the channel [07:51] herbySk has joined the channel [07:55] disappearedng: anyone here uses node-http-proxy? https://github.com/nodejitsu/node-http-proxy/issues/211 the wiki says that node-http-proxy supports web socket but then it doesn't appear to be the case here [07:55] petrjanda has joined the channel [07:56] tornad has joined the channel [07:57] visnup has joined the channel [07:57] tonist has joined the channel [07:59] mike has joined the channel [08:01] mikecool has left the channel [08:03] thalll has joined the channel [08:03] fangel has joined the channel [08:04] dsabanin has joined the channel [08:07] ericmuyser has joined the channel [08:07] yawNO has joined the channel [08:07] maxogden: tablackmore_: nice kitten background [08:07] xippi has joined the channel [08:07] xippi has joined the channel [08:08] kurtzhong has joined the channel [08:08] joshgillies has joined the channel [08:08] maxogden: tablackmore_: looks like an nginx configuration issue [08:09] maxogden: tablackmore_: also how is sweden lately [08:09] misza222 has joined the channel [08:10] schiffsratte has joined the channel [08:10] [[zzz]] has joined the channel [08:10] mmalecki: disappearedng: this is wrong. I'll comment on the issue [08:10] gasbakid has joined the channel [08:10] tablackmore_: maxogden_: Hi thanks for the tip. Been googling like a mad man [08:11] ziro` has joined the channel [08:11] tablackmore_: maxogden_: Sweden is cool, litterally, but warming slowly [08:11] prasak has joined the channel [08:12] jomoho has joined the channel [08:12] tablackmore_: maxogden_: Hope life on the other side of the pond is good. Shame about the nginx problem. I'm on a hosted server and nginx is out of my control. Will have to look for different hosting. [08:13] ditesh|cassini has joined the channel [08:14] disappearedng: mmalecki: I think I was wrong [08:14] benvie: sweden is multiple ponds away [08:15] mikeric has joined the channel [08:15] deeprogram_ has joined the channel [08:15] Ond: Mere puddles [08:16] schiffsratte has left the channel [08:16] tablackmore_: benvie_ ok ok, but if you were a fish you could swim all the way with out having to cross land.¨ [08:16] benvie: unless I was bad at being a fish [08:17] mmalecki: disappearedng: actually, I'll comment on this later, when I'm home [08:17] benvie: or needed fresh water [08:17] mmalecki: disappearedng: but it supports node-http-proxy [08:17] dob_ has joined the channel [08:17] mmalecki: we successfully run websockets on our platfrom [08:17] benvie: we need to allow for bad fish [08:18] Ond: Why's that [08:18] benvie: cause most fish are bad [08:18] disappearedng: mmalecki: I dun think it's a problem with websocket [08:18] disappearedng: chrome didn't fire any problem [08:18] mmalecki: disappearedng: oh? firefox problem? [08:18] disappearedng: now I completely edited the question [08:18] disappearedng: there's like a 10 second delay for socket.io [08:18] benvie: unless you don't have a quota then you can be selective [08:18] Ond: I find most fish to be very well-mannered [08:19] benvie: oh bad I mean [08:19] [AD]Turbo has joined the channel [08:19] benvie: ineffectual [08:19] [AD]Turbo: hola [08:19] dpino has joined the channel [08:19] Ond: At aquatic activities? [08:19] benvie: yeah, at their activities [08:20] benvie: the things they do, they do "medium" at best [08:20] mmalecki: disappearedng: hm, so it falls back to xhr-polling [08:20] niftylettuce_: any idea why dns.resolve4 is not resolving properly? [08:20] mmalecki: which is the worst fucking idea ever [08:20] niftylettuce_: i followed this to clear my cache http://www.ubuntugeek.com/howto-clearflush-dns-cache-in-ubuntu.html [08:20] benvie: more likely poorly, or destructivelly [08:20] mmalecki: disappearedng: I'll take a look at it when I'm home [08:20] Ond: Example [08:20] benvie: life [08:20] benvie: users [08:20] niftylettuce_: i even tried setting different DNS servers to google's 8.8.8.8 or w/e [08:21] disappearedng: mmalecki: thanks a lot. Does my code seem problematic? [08:21] benvie: don't judge, expect [08:21] mmalecki: disappearedng: yeah, you shouldn't hack it around just for socket.io [08:21] mmalecki: this is tricky stuff [08:21] benvie: user breaks amazing piece of machinery [08:21] mmalecki: because of fucking cross domain thing [08:22] benvie: quesrion: why did user break it? [08:22] benvie: answer: users is a user [08:22] disappearedng: mmalecki: well my app needs real time communication and I want to use rails [08:22] disappearedng: lol this is doable [08:22] Ond: Perhaps the user had a mental disability [08:22] benvie: wrong [08:22] benvie: you designed it wrong [08:22] mmalecki: disappearedng: yeah, it's doable [08:23] disappearedng: mmalecki: Oh you are from nodejitsu nice [08:23] Ond: "Wrong," no [08:23] benvie: or you didn't place disclaimaitory measurements preventing those users to an adequate degree [08:23] Ond: Unaccommodating to every disabled shit-flinging mutant on the planet, perhaps [08:23] benvie: it's ok to leave some by the bus in a blizzard [08:23] Ond: But that would be an enormous waste of resources [08:23] benvie: but you need a sign [08:23] benvie: saying hey, this bus leaves idiots to die [08:24] mmalecki: disappearedng: yeah. it's an interesting use case, actually [08:24] mmalecki: I'll look into it when I'm home [08:24] emattias has joined the channel [08:25] hipsters_ has joined the channel [08:25] benvie: I'm stilling working on my "idiots will die" stuff but for now I just don't let them know I can speak english [08:25] kvda has joined the channel [08:25] fangel has joined the channel [08:26] kjeldahl has joined the channel [08:26] stonebranch has joined the channel [08:26] stagas has joined the channel [08:26] benvie: if I knew klingon I could just fake that but for now I'm a mute [08:26] Ond: What's your native tongue? [08:27] benvie: english [08:27] mikedeboer has joined the channel [08:27] whitman has joined the channel [08:27] benvie: to be fair it is 4:30 am and I type on a keyboard with no printed keys on it [08:29] sd has joined the channel [08:29] niftylettuce_: unsure why, but i keep getting rackspace IP's on dns.resolve4 lookup for ANY domain name, even ones like google.com, https://gist.github.com/c6b96e52bf672f16cfaa [08:29] niftylettuce_: i've tried rebooting router, clearing DNS cache, changing DNS servers to OpenDNS and Google [08:30] niftylettuce_: is there something I need to change on my router itself? Linksys [08:30] benvie: server problem. Bind? [08:30] niftylettuce_: benvie: ? what do u mean [08:30] niftylettuce_: is it my ISP? [08:30] niftylettuce_: my server works ifne. [08:30] niftylettuce_: fine* [08:30] benvie: oh [08:30] niftylettuce_: if i execute dns.resolve4 on my server, its OK, resolved properly [08:31] benvie: important bit of info [08:31] benvie: caching somewhere, local to yuo [08:31] benvie: and wrong [08:31] niftylettuce_: if I do it locally, it gives me results of that gist (e.g. function(err, results)) the array of IP's is the results, the err is null, and the "is domain" just validates that req.body.domain is a domain using node-validator [08:31] niftylettuce_: how can i figure this out? [08:31] benvie: got a third place to bound stuff of [08:32] niftylettuce_: what do u mena [08:32] niftylettuce_: mean [08:32] niftylettuce_: "bound"? third place? [08:32] benvie: all the stuff you did locally, do it through a remote server [08:32] benvie: and see if it' [08:32] benvie: it matches your or not [08:32] niftylettuce_: yeah i just told u above it works [08:32] stagas: niftylettuce_: did you try rebooting? :) [08:32] niftylettuce_: stagas: yeah three times [08:32] benvie: IS THE COMPUTER PLUGGED IN? [08:32] niftylettuce_: rofl [08:33] benvie: ok nevermind, I'm spent [08:33] niftylettuce_: stagas: yea i would clear cache, reboot computer AND router, on every time i changed my local DNS settings to either like default, Google, or OpenVNS [08:33] niftylettuce_: it was working the other day [08:33] niftylettuce_: and now its not working [08:33] niftylettuce_: i didnt change one bit of code [08:33] benvie: another question [08:33] benvie: can you get it to work locally? [08:33] benvie: is that the other stuff or no [08:34] niftylettuce_: ... what?.... i just explained how it wasn't working locally lol [08:34] niftylettuce_: and it works on server [08:34] niftylettuce_: ;) [08:34] benvie: sorry my assumption is the "other stuff" isn't local [08:34] benvie: local being a kind of relative term [08:34] niftylettuce_: what are you talking about other stuff [08:35] niftylettuce_: here is my route for the whois lookup https://gist.github.com/ae8498c19b04bb9c8940 [08:35] niftylettuce_: works fine on server [08:35] benvie: another server with the same IP: local or not? same rack, same country etc. [08:35] niftylettuce_: local returns null, [array of ips] [08:35] niftylettuce_: its obviously a local issue [08:35] niftylettuce_: somewhere between myself and ISP [08:36] niftylettuce_: vs. my server and Linode working fine [08:36] benvie: sorry! =D just most of these aren't that [08:36] chrisdickinson has joined the channel [08:36] stagas: maybe you have a virus [08:36] niftylettuce_: thats what i thought at first [08:36] benvie: last answer: "why is my screen filled with viruses" [08:37] niftylettuce_: b/c why the hell would the IP's be resolving to some rackspace IP's? [08:37] AD7six has joined the channel [08:37] benvie: network engineering hoe but I know there's like [08:38] benvie: loopback stuff. Nevermind I'm quickly going into "zoom in, let me see the pubic hair" mode [08:38] benvie: zoom in, let me see more detail [08:39] niftylettuce_: benvie: ?? [08:40] benvie: nevermind [08:41] niftylettuce_: ok now it is sporadically working [08:41] niftylettuce_: should I be using dns.resolve4 ? [08:41] niftylettuce_: wow wtf now its working -.- [08:41] niftylettuce_: O_O [08:42] niftylettuce_: i rebooted node instance again after restarting [08:42] niftylettuce_: :D [08:43] benvie: I did it with magic [08:43] fluk3 has joined the channel [08:44] niftylettuce_: benvie.magic.stop(); [08:45] benvie: >> fwogfhuwi9bnfuow' [08:45] purr: benvie: SyntaxError: Unexpected token ILLEGAL [08:45] benvie: illegal, the javascript police have been alerted [08:45] spolu has joined the channel [08:46] salva has joined the channel [08:48] nqbao has joined the channel [08:48] icebox has joined the channel [08:48] nqbao has left the channel [08:49] satyr has joined the channel [08:51] pid1 has joined the channel [08:53] benvie: I don't think you're special...well I think you're special, but you fall within a bell curve [08:54] graeme_f has joined the channel [08:55] niftylettuce_: -.- [08:56] uchuff has joined the channel [08:57] datchap has joined the channel [08:59] innociv has joined the channel [08:59] kPb_in has joined the channel [08:59] ccare has joined the channel [09:01] hipsters_ has joined the channel [09:01] jetienne has joined the channel [09:02] upb has joined the channel [09:03] robi42 has joined the channel [09:03] alm0nd has joined the channel [09:03] prasak has joined the channel [09:03] pickels has joined the channel [09:05] velo has joined the channel [09:06] xippi has joined the channel [09:06] xippi has joined the channel [09:07] tokumine has joined the channel [09:08] shinuza has joined the channel [09:08] mikeric has joined the channel [09:09] adrianF has joined the channel [09:12] sammmy: is return the only way to exist out of a function? [09:13] mikedeboer has joined the channel [09:14] Vespakoen has joined the channel [09:14] icebox: benvie: maybe the bell has a long tail :) [09:14] disappearedng has joined the channel [09:15] LordMetroid has joined the channel [09:15] mehlah has joined the channel [09:15] LordMetroid: I just downloaded node-js from https://github.com/aurynn/postgres-js/ [09:15] LordMetroid: How do I install it? [09:16] LordMetroid: so that I can simply make a require("postgre-pure")? [09:16] icebox: LordMetroid: I think you should npm to install the module [09:16] icebox: LordMetroid: *use npm [09:16] LordMetroid: what is npm? [09:17] icebox: LordMetroid: node package manager: http://npmjs.org/ [09:18] fangel has joined the channel [09:18] icebox: LordMetroid: how did you installed the other modules you have been using? [09:18] LordMetroid: This is the first module [09:19] LordMetroid: I just installed node.js [09:19] LordMetroid: and wrote a few lines to test it and now I want to create an application that interfaces with a database [09:19] radiodario: LordMetroid: i recommend you go and read the documentation - node.js is notoriously confusing unless you've read the docs [09:20] LordMetroid: radiodario: I have read the docs quite thoughrally and for a long time. I have had my eye on node.js ever since the first release [09:20] LordMetroid: But now I actually need to write something in it [09:21] icebox: LordMetroid: http://drumcoder.co.uk/blog/2011/jan/10/nodejs-phone-book/ [09:21] takumination has joined the channel [09:23] adambeynon has joined the channel [09:23] LordMetroid: http://pasteit.com/17175 [09:24] rio{ has joined the channel [09:25] radiodario: LordMetroid: its something i say to everybody, just to be safe :D [09:25] icebox: LordMetroid: the chaintool on windows is not complete... the module needs to be compiled... and theres is not the compiler in your configuration [09:26] LordMetroid: ohh dear [09:27] LordMetroid: What do I need? [09:27] jimmysparkle has joined the channel [09:27] Vainoharhainen has joined the channel [09:28] icebox: LordMetroid: visual c++ [09:28] LordMetroid: Do not want [09:28] LordMetroid: I*ll simply write tcp connections manually [09:29] LordMetroid: Seems easier [09:29] Doikor: or just find a pure javascript module [09:29] LordMetroid: I have one [09:29] icebox: LordMetroid: or change db :) [09:30] pickels has joined the channel [09:31] TomY_ has joined the channel [09:32] AviMarcus has joined the channel [09:32] radiodario: or use python ;) [09:32] LordMetroid: NEVER! [09:33] trailrun33 has joined the channel [09:34] arvidkahl has joined the channel [09:34] icebox: radiodario: related to the installation and configuration issues, I think there is the same complexity [09:34] djazz has left the channel [09:34] Ragnok has joined the channel [09:34] Ragnok has joined the channel [09:35] radiodario: i was just messin [09:35] jomoho2 has joined the channel [09:35] gr4yscal_ has joined the channel [09:35] jetienne has joined the channel [09:36] eldios has joined the channel [09:36] icebox: radiodario: :) [09:37] gr4yscal_ has joined the channel [09:38] maritz has joined the channel [09:39] a_meteorite has joined the channel [09:40] madhums has joined the channel [09:41] pgte has joined the channel [09:42] rendar has joined the channel [09:42] robhawkes has joined the channel [09:43] ppcano has joined the channel [09:43] hackband has joined the channel [09:45] RushPL_ has joined the channel [09:45] benvie: I runnin for election to the president of javascript [09:46] benvie: don't throw your vote way away on cheese, vote for me [09:46] maritz: ACTION votes for benvie [09:47] maritz: ACTION hacks voting machines to revert vote and change the vote to yawNO  [09:47] yawNO: maritz: you goddam mad german [09:47] maritz: i forgot to ping you tonight, sorry. [09:48] benvie: this will not be forgotten [09:49] yawNO: benvie: i'll leave the chair to you [09:49] benvie: bombs are the way] [09:49] yawNO: just promise you wont change the name to shim-shim-javascript-president [09:49] yawNO: or something longer [09:49] benvie: nothing will change when the bombs land [09:49] yawNO: well i dont see how [09:49] yawNO: bombs.. well bomb stuff [09:50] benvie: bombs full of HUGS and love [09:50] sammmy: what do you call the post variables passed along with an HTTP post request? [09:50] blup has joined the channel [09:50] benvie: body [09:50] benvie: for men [09:54] Wa has joined the channel [09:55] LordMetroid: I hate presidents [09:55] yawNO: LordMetroid: for president! [09:56] rendar has joined the channel [09:58] argami has joined the channel [10:03] al3xnull has joined the channel [10:06] munichlinux has joined the channel [10:09] benvie: what would LordMetroid do [10:10] mansoor has joined the channel [10:10] yawNO: benvie: free ecmasandwiches for everyone [10:12] markq has joined the channel [10:15] Hephaistos has joined the channel [10:15] Hephaistos has joined the channel [10:16] markwubb_ has joined the channel [10:16] sandfox has joined the channel [10:17] bergie__ has joined the channel [10:18] pid1 has joined the channel [10:20] caioketo has joined the channel [10:21] elio_ has joined the channel [10:22] elio_: some knows how to set default values for npm configs? [10:24] Cadavre has joined the channel [10:24] sreeix has joined the channel [10:24] Cadavre: hello [10:26] dannyamey has joined the channel [10:27] hellp has joined the channel [10:27] benvie: npm config set key value [10:29] tomasztomczyk has joined the channel [10:30] koo5 has joined the channel [10:32] huggies has joined the channel [10:32] huggies has joined the channel [10:33] Lumbendil has joined the channel [10:33] Lumbendil: hi [10:33] __doc__ has joined the channel [10:35] Lumbendil: anyone here has used the passport module? [10:38] fermion has joined the channel [10:38] HardFu has joined the channel [10:40] Vespakoen has joined the channel [10:42] marlun has joined the channel [10:46] HardFu_ has joined the channel [10:46] RushPL has joined the channel [10:47] nicklas_ has joined the channel [10:47] nicklas_: So I installed Visual C++ 2010 express [10:47] heatxsink has joined the channel [10:47] maritz: nicklas_: i'm sorry, my condolences [10:47] nicklas_: hehe [10:48] ccare has joined the channel [10:50] disappearedng has joined the channel [10:52] kurtzhong has joined the channel [10:53] LordMetroid has joined the channel [10:53] benvie: I was alerted that someone's computer is on their death bad, so sad. Pass my heartfeld on [10:55] flou has joined the channel [10:58] satyr has joined the channel [11:00] AntelopeSalad: are there any performance differences between these? http://pastebin.com/QFJyzeFm (very short snippet of exporting modules) [11:01] maritz: AntelopeSalad: bench it? [11:01] dekub has left the channel [11:01] bicranial has joined the channel [11:02] maritz: do note though that it's not as simple as doing a thousand requires in a node.js script since require caches [11:02] AntelopeSalad: i would have to make a thousand fake methods and then call them 1 by 1? [11:02] stonebranch has joined the channel [11:06] fluk3 has joined the channel [11:06] myndzi\ has joined the channel [11:07] abraxas has joined the channel [11:07] eldios has joined the channel [11:08] anubhaw has joined the channel [11:09] larsschenk has joined the channel [11:09] larsschenk has left the channel [11:12] larsschenk1 has joined the channel [11:12] seanstickle has joined the channel [11:13] larsschenk1 has left the channel [11:15] i42n has joined the channel [11:15] ph^ has joined the channel [11:16] fearphage has joined the channel [11:16] munichlinux has joined the channel [11:16] kPb_in_ has joined the channel [11:17] trailrun33 has joined the channel [11:20] whaley has joined the channel [11:23] i42n has joined the channel [11:24] prssn has joined the channel [11:25] stagas has joined the channel [11:29] rurufufuss has joined the channel [11:30] meandi2 has joined the channel [11:30] kurtzhong has joined the channel [11:31] Raydiation has joined the channel [11:31] dylang has joined the channel [11:32] baudehlo has joined the channel [11:33] arduix has joined the channel [11:33] enmand has joined the channel [11:37] riven has joined the channel [11:37] riven has joined the channel [11:39] madhums has joined the channel [11:40] i42n has joined the channel [11:41] DrPheltRight has joined the channel [11:43] mintbridge_ has left the channel [11:43] shanebo has joined the channel [11:44] sreeix has joined the channel [11:44] mintbridge has joined the channel [11:45] erichynds has joined the channel [11:45] ph^ has joined the channel [11:46] joshgillies has joined the channel [11:46] Ragnok has joined the channel [11:47] LordMetroid: So I installed Visual C++ 2010 express [11:47] LordMetroid: But I still can not do npm install pg [11:48] rauchg has joined the channel [11:48] baudehlo has joined the channel [11:48] LordMetroid: http://pasteit.com/17178 [11:49] benvie: node-waf [11:49] benvie: no go my friend [11:49] LordMetroid: What does it mean? [11:49] benvie: pg what is that [11:50] benvie: anyway it needs to upgrade [11:50] benvie: node-waf is the old build system [11:50] benvie: thoroughly deprecated [11:50] benvie: never worked on Windows anyway [11:50] LordMetroid: ok, what do I do? [11:50] benvie: this pg module [11:50] benvie: what is it [11:51] LordMetroid: postgreSQL [11:51] benvie: moment [11:51] neoesque has joined the channel [11:51] briancra_ has joined the channel [11:52] deeprogram has joined the channel [11:53] benvie: wow no ones added Windows for this https://github.com/brianc/node-postgres [11:53] benvie: hmm [11:53] LordMetroid: GREAT! [11:54] benvie: question [11:54] maritz: answer [11:54] benvie: postgres on Windows, is there like a C header [11:54] benvie: bindings [11:54] benvie: something [11:54] benvie: dll [11:54] LordMetroid: bindings.cc [11:54] LordMetroid: that is all [11:55] LordMetroid: *binding.cc [11:55] benvie: as I read the code [11:55] benvie: looks like non-platform specififc [11:55] benvie: moment [11:57] diogogmt has joined the channel [12:00] izepstan has joined the channel [12:00] sreeix has joined the channel [12:01] urlisse has joined the channel [12:02] piscisaureus_ has joined the channel [12:02] broofa has joined the channel [12:03] huggies has joined the channel [12:04] benvie: don't suppose you have a .lib file [12:04] LordMetroid: What is that? [12:05] LordMetroid: nope [12:05] akshayms has joined the channel [12:06] benvie: got it [12:07] markwubb_ has joined the channel [12:08] artusrocha has joined the channel [12:09] c4milo has joined the channel [12:09] CarterL has joined the channel [12:11] FireFly has joined the channel [12:11] tommyvyo has joined the channel [12:11] benvie: this is so many times harder than you know, but working on it [12:11] fairwinds has joined the channel [12:12] fairwinds_ has joined the channel [12:13] mandric has joined the channel [12:13] LordMetroid: I appreciate it [12:13] louissmit has joined the channel [12:14] copongcopong has joined the channel [12:17] krnl has joined the channel [12:18] AntelopeSalad: with the native mongodb driver, in the documentation it says .save() is a shortcut to either insert or update -- does that mean it's exactly the same as doing an upsert with the regular mongo CLI? [12:19] pickels has joined the channel [12:20] benvie: it's amazing how hard it is to find headers and libs for commonly use libs on windows [12:20] maritz: hm, is there an express/connect middleware or sth like that to handle batched API requests? [12:24] apoc has joined the channel [12:25] creationix has joined the channel [12:25] bergie__ has joined the channel [12:25] erichynds has joined the channel [12:26] rklancer has joined the channel [12:27] deeprogram has joined the channel [12:28] justicefries has joined the channel [12:29] DuoSRX has joined the channel [12:29] anubhaw_ has joined the channel [12:29] aheckmann has joined the channel [12:30] thinkt4nk has joined the channel [12:31] Blorb has joined the channel [12:31] yawNO has joined the channel [12:32] yawNO: ohai [12:34] rio{ has joined the channel [12:34] LordMetroid: benvie: I have not abandoned you [12:34] kPb_in has joined the channel [12:34] benvie: yeah just been trying to find the stuff required to compile this [12:35] benvie: and then I hit my head on my keyboard [12:35] LordMetroid: hehe [12:35] yawNO: inb4 protect the president [12:35] benvie: http://www.postgresql.org/docs/8.3/static/libpq.html this is the area roundabouts of it though [12:36] vkareh has joined the channel [12:36] benvie: no one can protect the president from himself [12:36] _insanoid has joined the channel [12:36] benvie: jackey handey quote "I think a good gift for the president would be a chocolate revolver. But he's so busy you'd have to run up to him to get it to him" [12:37] yawNO: benvie: i'd shoot the keyboard [12:39] groom has joined the channel [12:39] benvie: not if it shot you first [12:39] benvie: and removed you brain for good measure [12:39] benvie: one flew over the cuckoo's nest [12:40] benvie: brains ? done : remove brains [12:40] LordMetroid: lol [12:40] maritz: wait what? if you have brains, done, if you don't have brains, remove non-existant brains? [12:41] maritz: i think that'll throw an exception [12:41] harrymoore has joined the channel [12:41] insanoid has joined the channel [12:41] benvie: yeah you see how well the surgery has helped me [12:41] benvie: hint: brains [12:41] crutex has joined the channel [12:42] maritz: BRAAINNNNSSS [12:42] benvie: yeah those are mine [12:42] benvie: give me [12:42] benvie: a.) wear canada shirt b.) get free breakfast [12:43] benvie: c.) don't be from canada [12:43] vargle has joined the channel [12:44] dob_ has joined the channel [12:44] benvie: yesterday I was a giasnt crimson maple leaf lie [12:46] munichlinux has joined the channel [12:46] robhawkes has joined the channel [12:48] jtsnow has joined the channel [12:48] brianseeders has joined the channel [12:49] heavysixer has joined the channel [12:50] sadjow has joined the channel [12:50] wellaware: benvie, where are you from? [12:50] benvie: not canada [12:51] wellaware: obviously! [12:51] benvie: new yoek [12:51] benvie: hmm [12:51] benvie: new yorkish [12:52] wellaware: ah that explains the crazyness :) [12:52] benvie: not THE ny [12:52] benvie: well [12:53] benvie: new york but not new york, new york [12:53] bshelton has joined the channel [12:54] flou has joined the channel [12:55] tvw has joined the channel [12:56] yawNO: http://www.nodejs-news.com/nodejs-tech/Nodejs-Socketio-Building-HTML5-game/ [12:56] tuhoojabotti: no [12:57] tuhoojabotti: I wonder if Socket.io has matured [12:57] tuhoojabotti: I have a bad feeling about it atm [12:57] pocopina has joined the channel [12:57] tuhoojabotti: which could be wrong by now [12:58] pity has joined the channel [12:59] pity: hello, is there any documentation code style for nodejs and documentation parser, which generates some documentation HTML ? [13:01] jetienne has left the channel [13:02] yawNO: http://www.nodejs-news.com/nodejs-tech/Building-Multiplayer-Game-HTML5-Node-Socketio [13:02] jetienne has joined the channel [13:03] tuhoojabotti: pity: I use jsDoc [13:03] jetienne has left the channel [13:03] tuhoojabotti: pity: Example: http://vesq.github.com/cbNetwork-node/doc/index.html [13:05] jetienne has joined the channel [13:07] fluk3 has joined the channel [13:08] seanstickle has joined the channel [13:08] akshayms_ has joined the channel [13:09] flou has joined the channel [13:11] madhums has joined the channel [13:13] CromeDome has joined the channel [13:13] djazz has joined the channel [13:14] djazz: using websocket module "ws" i can connect to it on "localhost" but not from LAN address or outside, it only accept localhost? [13:15] djazz: the client says "Disconnected" with code 1006 [13:15] stepheneb has joined the channel [13:15] Cadavre: hmm, I'm having problem with the zlib module [13:16] tuhoojabotti: djazz: Do you have ports properly forwarded / open [13:16] Cadavre: I can't compress strings correctly it seems [13:16] tuhoojabotti: hmm, not LAN [13:16] Cadavre: I'm trying to communicate with a net-socket to a server which communicates with zlib-compressed strings. [13:16] bobbywarner has joined the channel [13:16] tuhoojabotti: host unreachable [13:17] Cadavre: I can't decompress the data received and neither can the server I'm connecting to with the strings I deflate [13:17] Cadavre: can't seem to find what's causing it. [13:17] djazz: tuhoojabotti: ports are open, but wouldnt affect the LAN :P [13:17] tuhoojabotti: aye [13:18] Cadavre: I want the same results as when I use gzcompress in php. [13:18] tuhoojabotti: djazz: I had similar problem when I ran an http server on a port that was in use. [13:18] tuhoojabotti: or maybe too low [13:18] tuhoojabotti: or something [13:18] tuhoojabotti: I changed the port and it worked [13:18] djazz: i have other on 8000-8020 interval [13:19] djazz: changed to 9005 [13:19] djazz: same issue [13:19] tuhoojabotti: b-but that's over 9000 [13:19] luizlopes has joined the channel [13:19] djazz: yeah? [13:20] lduros has joined the channel [13:20] tuhoojabotti: oh right, port. Not the power level. [13:20] djazz: :P [13:20] tokumine_ has joined the channel [13:21] ph^ has joined the channel [13:22] djazz: I'll try other websocket module [13:22] tuhoojabotti: No. [13:24] _akshayms has joined the channel [13:24] bergie__ has joined the channel [13:25] pgte has joined the channel [13:25] thomblake has joined the channel [13:25] thomblake has left the channel [13:26] shinuza has joined the channel [13:26] Ragnok has joined the channel [13:26] Ragnok has joined the channel [13:26] djazz: tuhoojabotti: other module worked [13:26] wink_ has joined the channel [13:26] tuhoojabotti: impossibruu [13:26] djazz: :P [13:26] ehazlett has joined the channel [13:26] tuhoojabotti: which other module? [13:26] st_luke has joined the channel [13:26] djazz: websocker-node [13:26] tuhoojabotti: :D:D [13:26] djazz: npm install websocket [13:26] tuhoojabotti: websucker-node [13:27] djazz: :P [13:27] tuhoojabotti: that's an awesome name. [13:27] djazz: WebSuckerts [13:27] maritz: is there an express/connect middleware or something like that to handle batched API requests? [13:27] dpino has joined the channel [13:28] madhums has joined the channel [13:29] Rushing has joined the channel [13:30] joshsmith has joined the channel [13:30] davidsklar has joined the channel [13:30] Cromulent has joined the channel [13:31] skm has joined the channel [13:31] arduix1 has joined the channel [13:31] rwaldron has joined the channel [13:33] akshayms_ has joined the channel [13:33] yawNO has joined the channel [13:33] smorin has joined the channel [13:34] yawNO has joined the channel [13:35] madtimber has joined the channel [13:36] baudehlo has joined the channel [13:36] tmike has joined the channel [13:37] hermanjunge: Node uses epoll in linux and kqueue in OSX to be event driven [13:37] hermanjunge: What libraries uses in windows? [13:38] tuhoojabotti: Hmm [13:38] tuhoojabotti: IOCP or osmething [13:38] tuhoojabotti: something* [13:39] tuhoojabotti: Yeah [13:39] tuhoojabotti: IOCP [13:39] carlyle has joined the channel [13:40] hermanjunge: tuhoojabotti: IOCP? [13:40] tuhoojabotti: Yes. [13:40] madhums has joined the channel [13:40] arduix has joined the channel [13:40] tuhoojabotti: Input/Output completion port [13:41] tuhoojabotti: http://en.wikipedia.org/wiki/Input/output_completion_port [13:41] dnolen has joined the channel [13:41] hermanjunge: Excellent [13:41] hermanjunge: thanks for the heads up [13:41] tuhoojabotti: np [13:41] robm_ has joined the channel [13:41] AaronMT has joined the channel [13:42] tuhoojabotti: And it is said to be faster than kqueue or something [13:42] robm__ has joined the channel [13:44] kevwil has joined the channel [13:46] madhums has joined the channel [13:46] nqbao has joined the channel [13:46] _olouv_ has joined the channel [13:46] postwait has joined the channel [13:46] tmcw has joined the channel [13:46] stepheneb has joined the channel [13:47] argami has joined the channel [13:47] nqbao has left the channel [13:48] automata has joined the channel [13:48] pandeiro has joined the channel [13:48] _akshayms has joined the channel [13:49] bkaney has joined the channel [13:49] fumanchu182 has joined the channel [13:49] BRampersad has joined the channel [13:50] BRampersad: hi [13:50] philips has joined the channel [13:51] stafamus has joined the channel [13:51] tornad has joined the channel [13:51] cjm has joined the channel [13:52] josh-k has joined the channel [13:54] HacDan has joined the channel [13:55] vicapow has joined the channel [13:56] madtimber: anyone know how to change the default test timeout in Mocha? Can't find it in the docs anywhere… [13:56] bkaney has left the channel [13:58] jomoho has joined the channel [13:59] ccare has joined the channel [14:00] MerlinDMC: madtimber, --timeout xxx in mocha.opts? [14:00] JSONB has joined the channel [14:01] BRampersad: hey guys [14:01] maritz: you like greeting people, don't you? :D [14:01] maritz: but yeah, hi. [14:01] Destos has joined the channel [14:02] madhums has joined the channel [14:02] takumination has joined the channel [14:03] _rockbot_ has joined the channel [14:03] kirbysayshi has joined the channel [14:04] yawNO: i know this shouldnt be the place but [14:04] bnoordhuis has joined the channel [14:04] yawNO: what do you guys think of goliath? [14:04] al3xnull has joined the channel [14:05] BRampersad: meh [14:07] maritz: i prefer david [14:07] YoY has joined the channel [14:08] trotter has joined the channel [14:08] benvie: I like wings [14:08] bic2k has joined the channel [14:09] relling has joined the channel [14:09] yawNO: thank you [14:09] Poetro has joined the channel [14:09] Poetro has joined the channel [14:09] BRampersad: i have never tried goliath but it looks interesting [14:09] bingomanatee has joined the channel [14:14] argami has joined the channel [14:14] tomasm- has joined the channel [14:15] arduix has joined the channel [14:15] willwhite has joined the channel [14:15] plutoniix has joined the channel [14:15] stagas has joined the channel [14:15] tomasm-: hi, is there any way with nowjs to have multiple windows be identified as the same clientId (something stored in the session), so having multiple windows open to the same node.js server are seen as one, and keeping the windows in sync doesn't involve tracking the list and updating each of them separately? [14:16] yawNO has joined the channel [14:16] nibblebot has joined the channel [14:17] nibblebot has joined the channel [14:17] BRampersad: not sure [14:17] AAA_awright: tomasm-: I'm not aware of any way to have direct page-to-page communication like that [14:18] ank has joined the channel [14:19] tomasm-: for now, in my server, I have to keep track of user_id=>[ multiple clientIds ], and broadcast commands via a loop [14:19] tomasm-: it's kinda like on facebook how having multiple screens open, you see the same chat sessions stay completely in sync [14:20] deeprogram has joined the channel [14:21] r04r has joined the channel [14:22] brainss has joined the channel [14:22] dylang has joined the channel [14:23] jetienne has joined the channel [14:24] socketio\test\00 has joined the channel [14:25] bergie_ has joined the channel [14:26] joshfinnie has joined the channel [14:26] madhums has joined the channel [14:27] daleharvey: why does node provide synchronous options for operations [14:27] socketio\test\27 has joined the channel [14:28] r04r has joined the channel [14:28] daleharvey: like, if they are going to block the event loop, and you 'should' use the async version every time, why expose the sync ones at all, there isnt a context like web workers where it makes sense is there? (unless you do actually spawn new child processes) [14:29] socketio\test\86 has joined the channel [14:29] kvda has joined the channel [14:29] deedubs: daleharvey: I use them for run-once utilities, not for apps, f.e. setup tools, CLI batch processing [14:29] BRampersad: sync versions of functions are good for bootstrapping an app [14:30] daleharvey: ok cool, that makes sense [14:30] daleharvey: thanks [14:31] socketio\test\20 has joined the channel [14:31] jdeibele has joined the channel [14:31] isaacs has joined the channel [14:32] ehazlett has joined the channel [14:32] r04r has joined the channel [14:32] ehazlett has left the channel [14:33] prasak has joined the channel [14:33] kvda has joined the channel [14:33] jocafa has joined the channel [14:33] AAA_awright: tomasm-: That's how an evented model should work, when you get an incoming event you calculate which clients are affected and send outgoing events [14:34] madtimber: MerlinDMC: thanks!! [14:34] argami has joined the channel [14:35] djazz has left the channel [14:35] vam3c has joined the channel [14:36] isaacs: munro: You can listen to process.on('SIGWINCH', ...) [14:36] tomasm-: daleharvey, synchronous functions are also useful when you have to have a bunch of otherwise async functions happen in sequence and nesting callbacks aren't very sensible.... (though nesting callbacks often work out in my case) [14:36] isaacs: munro: that fires when the window resizes [14:36] isaacs: munro: you then have to check tty.getWindowSize() [14:36] Ragnok has joined the channel [14:37] bradleyg has joined the channel [14:38] svnlto_ has joined the channel [14:39] dpino has joined the channel [14:39] tanepiper has joined the channel [14:39] r04r has joined the channel [14:40] dubenstein has joined the channel [14:42] prasak: hey guys, i started playing with node net module and i'm curious about one thing - the callback of socket.send is fired when data is flushed to the kernel buffer. what i need is to have a callback when data is delivered to the other side. is there any way to do it implicitly? i don't want to end up with writing my own acknowledgement mechanism. I thought TCP can do this job for me... [14:42] callumcohen has joined the channel [14:43] Superman234234 has joined the channel [14:43] tmcw has joined the channel [14:44] gsmcwhirter has joined the channel [14:45] levi501d has joined the channel [14:46] dubenstein has joined the channel [14:46] Edy has joined the channel [14:46] Ragnok has joined the channel [14:46] Ragnok has joined the channel [14:47] nqbao has joined the channel [14:47] fatjonny has joined the channel [14:47] benvie: you'll need a kind of message recieopt [14:48] benvie: TCP is kind of lower level than that [14:48] benvie: it ensures delivery on a frame and whatever basis, not entire message [14:50] st_luke has joined the channel [14:51] lupomontero has joined the channel [14:51] rtgibbons has joined the channel [14:52] CIA-19: node: 03Rod Vagg 07master * r6628a3b 10/ doc/api/fs.markdown : doc: fix # links from (and within) api/fs - http://git.io/bF-NpA [14:52] schredder has joined the channel [14:52] CIA-19: node: 03Rod Vagg 07v0.6 * r90b785c 10/ doc/api/fs.markdown : doc: fix # links from (and within) api/fs - http://git.io/SWLC2g [14:52] prasak: benvie: i see... so that basically means i have to do the "ack job" myself. (i guess somebody's done the job already, i'll try to google something.) thanks [14:53] benvie: you may be able to utilize an existing thing [14:53] meso_ has joined the channel [14:53] benvie: but a lot of times the TCP level is covered below node, at the OS level [14:53] benvie: all times maybe? [14:54] EyePulp has joined the channel [14:54] take_cheeze has joined the channel [14:55] aheckmann has joined the channel [14:55] bnoordhuis: prasak, benvie: tcp is stream-based and reliable (add quotes where applicable) [14:56] bnoordhuis: meaning that you're guaranteed to receive messages in the order you sent them [14:56] benvie: was the last thing I said true? [14:56] benvie: about it being often covered by OS? [14:56] benvie: often/always [14:56] theBrettman has joined the channel [14:56] bnoordhuis: benvie: yes, if i understand you right - it's the OS that implements the tcp stack [14:57] benvie: provides the API yeah [14:57] nicholasf has joined the channel [14:57] benvie: and handles it [14:57] nqbao has joined the channel [14:57] benvie: what he was asking for sounds like a way to kind of inject into that level [14:57] benvie: which really: UDP [14:57] bnoordhuis: anyway, my point is that that tcp is reliable and ordered, you're guaranteed that either your messages are received or you get an error [14:58] bnoordhuis: *when* you get that error is another matter though :) [14:58] malcolmva has joined the channel [14:58] bnoordhuis: so most tcp protocols build something on top that sends acks back and forth [14:59] bnoordhuis: *tcp-based, i.e. ftp [14:59] bnoordhuis: also, who broke github? [14:59] ehazlett has joined the channel [14:59] mmalecki: bnoordhuis: works for me? [15:00] bnoordhuis: seems to work intermittently [15:00] phidah has joined the channel [15:01] Destos has joined the channel [15:01] benvie: out of date info but interesting thing I read [15:01] BRampersad: github is back [15:02] benvie: was that Steam uses UDP with various custom encryption just to escape automated ISP level filtering of incoming data [15:02] CIA-19: node: 03Shigeki Ohtsu 07master * r534264d 10/ doc/api/net.markdown : doc: Add condition to emit close event of net.Server - http://git.io/0f5Daw [15:02] benvie: since it's like the 3rd or 4th largest source of data on the internet, but is highly targeted [15:02] prasak: ok, that seams really nice. I understand i get error (net.socket emits error) when i send data and something goes wrong. but is there any way i can "connect" that error to the data it corresponds? i guess this is really difficult to find out due to async. nature of node... [15:02] schredder has joined the channel [15:03] prasak: i think i dons [15:03] prasak: oops [15:03] argami has joined the channel [15:05] soapyillusions has joined the channel [15:05] josh_k has joined the channel [15:05] |Freeman| has joined the channel [15:07] pig_ has joined the channel [15:07] Cromulent has joined the channel [15:07] CIA-19: node: 03isaacs 07master * rec735cb 10/ (124 files in 22 dirs): (log message trimmed) [15:07] CIA-19: node: Merge remote-tracking branch 'ry/v0.6' into merge-v0.6 [15:07] CIA-19: node: Conflicts: [15:07] CIA-19: node: ChangeLog [15:07] CIA-19: node: deps/npm/AUTHORS [15:07] CIA-19: node: deps/npm/html/api/bin.html [15:07] CIA-19: node: deps/npm/html/api/bugs.html [15:07] BRampersad: hi cia-19 [15:07] sorensen__ has joined the channel [15:07] mcavage has joined the channel [15:07] jtsnow has joined the channel [15:08] josh-k_ has joined the channel [15:09] nqbao has joined the channel [15:11] jscheel has joined the channel [15:12] shapeshed has joined the channel [15:14] pig has joined the channel [15:16] mattrobenolt has joined the channel [15:16] mattrobenolt: Anyone have experience with "nock"? [15:16] arduix has joined the channel [15:16] mattrobenolt: Or a dev on nock. [15:16] nqbao has joined the channel [15:17] mattrobenolt: pgte: ping [15:19] BillyBreen has joined the channel [15:19] pig has joined the channel [15:19] jocafa has joined the channel [15:19] JJMalina has joined the channel [15:20] adambeynon has joined the channel [15:21] jerrysv has joined the channel [15:22] nqbao has left the channel [15:22] artusrocha has joined the channel [15:23] pgte: mattrobenolt: pong :) [15:24] anubhaw has joined the channel [15:24] pig has joined the channel [15:24] mattrobenolt: Yo. :) I had a question/recommendation for nock, but wanted to see if there was a reason why you did it the way it was done before I fork it and add it myself. [15:24] pgte: mattrobenolt: sure [15:24] aheckmann has joined the channel [15:24] mattrobenolt: Inside a reply() method, is there a reason why you wouldn't want to supply a callback to build a response based on post vars? [15:25] rwaldron has joined the channel [15:25] mattrobenolt: Say I want to mock a post to /users/add or whatever, and return {'new_user': 'Matt'} [15:25] maritz: is there an express/connect middleware or something like that to handle batched API requests? [15:25] mattrobenolt: Or whatever, based on what I sent. Kind of the ability to do an echo or something similar. [15:25] maritz: (I'll ask this until someone gives me a module that does this) [15:26] pgte: mattrobenolt: you want to reply something dynamic and not just fixtures [15:26] mattrobenolt: Instead of the response always being a fixed arbitrary response. Maybe even render a simple mustache template based on some data. [15:26] emattias_ has joined the channel [15:26] mattrobenolt: pgte: Yeah. [15:26] pgte: mattrobenolt: sounds good to me :) [15:26] mattrobenolt: pgte: Ok, wasn't sure if there was a reason you didn't do that in the first place. :) [15:26] mattrobenolt: I'll fork it and add it today probably. [15:27] pgte: mattrobenolt: never really felt the need for it, but now that you mention it, it makes sense :) [15:27] mattrobenolt: Yeah, haha [15:27] mattrobenolt: It'd allow maybe dynamic fixtures to be loaded in as well. Say mocking a Facebook API or something. [15:27] mattrobenolt: Maybe even go a step further and allow routes, Express style. [15:27] mattrobenolt: Err, Connect, I should say. [15:28] mattrobenolt: .get('/user/:id').reply(function(id){ … }) [15:28] mattrobenolt: If that's a bad idea, feel free to let me know. I'm new to unit testing with mocking http calls, so if I'm missing something, chew me out. [15:28] infynyxx has joined the channel [15:28] pgte: mattrobenolt: yeah, I see the usefulness, but maybe the setup would become complex enough that you would need to test it ;) [15:29] mattrobenolt: Right, haha, you don't want to have to write tests to make sure your test suite is working right. :) [15:29] pig has joined the channel [15:29] mattrobenolt: Good point. [15:29] pizthewiz has joined the channel [15:29] ditesh|cassini has joined the channel [15:30] mattrobenolt: pgte: Have you ever seen the Django test client? [15:30] pgte: mattrobenolt: yes, that sounds like you are implementing a service inside nock. I would want to capture the interaction and make sure the thing I'm testing does A when the remote thing does B. [15:31] pgte: mattrobenolt: and not the other way around :) [15:31] mattrobenolt: Right, haha [15:31] loadTestNode has joined the channel [15:31] mattrobenolt: Django has a clever test client to use for testing http requests. This might be more of an idea for Express rather than nock. Or maybe some type of union between the two. [15:31] pgte: mattrobenolt: but the function callback makes sense. I'm not sure about the rounting though [15:32] pgte: mattrobenolt: s/rounting/routing [15:32] mattrobenolt: Django integrates with the standard unittest framework in Python and provides a client that makes internal http requests to your own app without running a web server. [15:32] pgte: mattrobenolt: no, I'm not familiar with Django too much [15:32] pgte: mattrobenolt: yeah, some testing frameworks in node do that [15:32] pgte: mattrobenolt: expresso does that AFAIK [15:32] mattrobenolt: In your tests, you can basically do: self.client.post('/echo', {'foo': 'bar'}), then test against the response from that. [15:32] rtgibbons has joined the channel [15:33] mattrobenolt: Really? Let me check into that. [15:33] pgte: mattrobenolt: but that's for testing a server, not for testing an HTTP client, which is the use case of nock. [15:33] mattrobenolt: Now that I think about it, that's not really a nock thing anyways. Nock is intercepting outside http requests. Not internal ones. [15:33] pgte: mattrobenolt: :) [15:33] mattrobenolt: Right. [15:34] mattrobenolt: Good call. Let me fork and add the callback and I'll send a pull request. [15:34] Spion_ has joined the channel [15:34] loadTestNode: i'm load testing Node 0.6.13 on Red Hat Enterprise Linux Server release 5.6 and I'm getting a 'connection reset by peer' with ab when c 5000 [15:34] loadTestNode: any ideas? [15:34] mattrobenolt: loadTestNode: ulimit? [15:34] spleeze has joined the channel [15:35] mattrobenolt: loadTestNode: Sounds like you're running out of file descriptors on your system. [15:35] n26 has joined the channel [15:35] loadTestNode: bumped ulimit to 65535 [15:36] mattrobenolt: loadTestNode: If I recall, you can set it to the string "unlimited" if you wanted. [15:36] beeviz has joined the channel [15:37] mattrobenolt: I don't know if that applies to RHEL though. I'm an Ubuntu/Debian guy. [15:37] loadTestNode: i'll report back with ulimit set to unlimited :) [15:38] lduros has joined the channel [15:38] pgte: mattrobenolt: great :) [15:39] geetarista has joined the channel [15:39] broofa has joined the channel [15:41] achiu has joined the channel [15:41] schredder has joined the channel [15:41] Zzaichik has joined the channel [15:42] joemccann has joined the channel [15:43] aheckmann has joined the channel [15:44] ashishg has joined the channel [15:44] YoY has joined the channel [15:44] skm has joined the channel [15:44] michaelmartinez has joined the channel [15:45] pixel13 has joined the channel [15:45] pixel13 has left the channel [15:46] ashishg: is there a way i can let JavaScript execute on the dom using libxmljs? [15:47] rtgibbons has joined the channel [15:47] takumination has joined the channel [15:49] blueadept has joined the channel [15:49] blueadept has joined the channel [15:49] jj0hns0n has joined the channel [15:49] CIA-19: node: 03isaacs 07master * r4637688 10/ (6 files in 5 dirs): Remove hard-coded version number from docs - http://git.io/3fLaSg [15:49] CIA-19: node: 03isaacs 07master * r76a771b 10/ (5 files in 4 dirs): doc: Remove extraneous index.html's from hyperlinks - http://git.io/yy5jIg [15:49] loadTestNode: ulimit set to unlimited is not valid [15:50] springmeyer has joined the channel [15:50] loadTestNode: can't even do a c 2000 w/o getting 'connection reset by peer' from ab [15:50] loadTestNode: with ulimit set to 1000000 [15:50] socketio\test\42 has joined the channel [15:51] mattrobenolt: loadTestNode: What's the command you're running to set ulimit and how are you running the node server? [15:51] carlyle has joined the channel [15:52] carlyle has joined the channel [15:52] [AD]Turbo has joined the channel [15:53] loadTestNode: ab -n 10000 -c 2000 http://... [15:53] loadTestNode: what do you mean by 'how are you running the node server?' [15:54] ehazlett has joined the channel [15:54] pickels: Trying to run a node server from my home pc but I can't see to be able to access it from the internet. The ip I use is 0.0.0.0 and the port 5555 which is forwarded and not blocked by my firewall (canyouseeme.org shows it open). Anything else I could have forgotten? [15:54] mattrobenolt: loadTestNode: You're running a command to start Node on the server you're hitting. [15:54] mattrobenolt: node main.js or whatever. [15:54] retornam has joined the channel [15:54] rtgibbons has joined the channel [15:55] mattrobenolt: ulimit is bound to the user which is running the application. [15:55] loadTestNode: mattrobenolt - yes from the command line: node script.js [15:55] mattrobenolt: Are you using sudo anywhere in this mix? [15:55] loadTestNode: no [15:56] mattrobenolt: Then your ulimit probably isn't being set to what you expect. [15:56] wink_ has joined the channel [15:56] mattrobenolt: It's default (again, not sure about RHEL) to 1024. [15:56] mattrobenolt: You can't increase that without setting a higher limit from root. [15:56] dodo has joined the channel [15:56] garrensmith has joined the channel [15:56] loadTestNode: so node should be run as root? [15:56] mattrobenolt: Even doing ulimit -n 100000 isn't going to increase it past 1024 is root says you can't use more than 1024. [15:57] mattrobenolt: No, you can increase the individual limit. [15:57] loadTestNode: i checked the ulimit...it's set to 1000000 [15:57] mattrobenolt: What's your output for that? [15:57] aheckmann has joined the channel [15:57] alek_b has joined the channel [15:57] loadTestNode: open files (-n) 1000000 [15:58] fangel has joined the channel [15:58] mattrobenolt: I'm not sure then. I'm not a RHEL expert. [15:58] mattrobenolt: Your problem isn't with Node though, almost positive. You're hitting a system limit somewhere. [15:58] YoY has joined the channel [15:59] loadTestNode: ok mattrobenolt...thank you! [15:59] mattrobenolt: A socket connection is technically a file descriptor. It's not going to be allowed to accept anymore incoming connections if it can't open another file descriptor. [15:59] loadTestNode: :) [15:59] loadTestNode: right [16:00] kriskowal has joined the channel [16:00] loadTestNode: how many concurrent have you seen max with node? [16:02] hdon: hi all :) any Sequelize users out there? I can't get Sequelize to work with sqlite3 using examples from the Sequelize site! [16:03] saikat has joined the channel [16:03] AntelopeSalad: random js question that ties into node a bit -- i'm looking at the source code of node and the source code of random people who have made modules (some popular, some not) [16:04] sreeix has joined the channel [16:04] mikeal has joined the channel [16:04] AntelopeSalad: in the node source, they seem to stay pretty far away from using object literals for "classes", but in other people's modules they seem to use them a ton -- is this 100% a style preference? maybe the module developers have done more client JS where this format is more common? [16:06] jergason has joined the channel [16:06] mikeal has joined the channel [16:06] briancra_ has joined the channel [16:07] jnbek has joined the channel [16:07] stagas: AntelopeSalad: you mean when defining an object or a prototype [16:08] tjbell has joined the channel [16:08] AntelopeSalad: i was using this as a ref http://www.phpied.com/3-ways-to-define-a-javascript-class/ [16:09] EhevuTov has joined the channel [16:09] echobucket has joined the channel [16:09] M1l3n1um has joined the channel [16:09] ryanj has joined the channel [16:10] stagas: AntelopeSalad: ok, if your object has methods, and you'll be using more than 1 of these, then it's best if you make a constructor [16:10] dgathright has joined the channel [16:11] AntelopeSalad: that is why the prototype pattern is much more common in the node source? [16:11] bindr has joined the channel [16:11] mattrobenolt: pgte: It looks like you append the requestBody as part of matching a path? [16:12] mattrobenolt: Like: /echo key=val [16:12] tokumine has joined the channel [16:12] pgte: yes [16:12] stagas: AntelopeSalad: it isn't a preference, in case you'd be creating hundreds of objects, then you want them to share the prototype [16:12] mattrobenolt: pgte: What's the reason for that? [16:12] Axefield has joined the channel [16:13] stagas: AntelopeSalad: and also if you'd be inheriting properties etc [16:13] mattrobenolt: If you're doing that, I guess there isn't a real reason to need to have access to the requestBody from within the callback. [16:13] pgte: mattrobenolt: to match requests against the respective responses [16:13] mattrobenolt: You're saying "Only intercept when I pass this specific data." [16:13] AntelopeSalad: ok i think i see what you mean, thanks [16:13] mattrobenolt: You know the data being posted. [16:13] pgte: mattrobenolt: well, right, but you can also change the request body before any matching [16:14] coderarity: AntelopeSalad: well, if you're only going to have 1 object it's not a big deal if they share methods through the prototype [16:14] coderarity: like you might not need that [16:14] mattrobenolt: pgte: How would you do that? [16:14] pgte: mattrobenolt: by providing a regexp or a callback to .filteringRequestBody I think [16:14] AntelopeSalad: i think it's making more sense now [16:14] redir has joined the channel [16:14] rtgibbons has joined the channel [16:14] ewalker has joined the channel [16:14] mattrobenolt: Oh, hmm, let me look into that. [16:14] stagas: AntelopeSalad: if it's like config = { debug: true }; there's no point in making a Config constructor for that [16:15] AntelopeSalad: i was looking through this dude's source code and he uses the literal pattern a lot - example: https://github.com/Raynos/fyp/blob/master/src/modules/io/controllers/post.js [16:15] piscisaureus_ has joined the channel [16:15] pgte: mattrobenolt: but anyway, you'd still get the chance to reply dynamically [16:15] AntelopeSalad: it's ok for him to use this here because in this example it's likely there will only be 1 object of that through out the entire app? [16:15] mattrobenolt: pgte: Yeah, you're right. [16:15] hdon: AntelopeSalad: it's necessary for function definitions to be defined within the constructor scope if they want to have access to "private" variables (local variable scope of the constructor function) 1.1 in your link uses this. 1.0 and 1.2 are not semantically different. [16:15] alvaro_o has joined the channel [16:15] pgte: mattrobenolt: insert a timestamp on the response or something dynamic you may be wanting to do [16:15] hdon: AntelopeSalad: except that in 1.0, Apple.prototype.getInfo is undefined, and in 1.2 it is not [16:16] coderarity: AntelopeSalad: imo, a lot of people make things public that really shouldn't be public, and I'm not sure why... you should read this http://www.crockford.com/javascript/private.html [16:16] hdon: ACTION seconds coderarity's link [16:16] mattrobenolt: pgte: Right. [16:18] AntelopeSalad: ok [16:18] thalll has joined the channel [16:18] hdon: coderarity: in languages with formal semantics defining access rules for member variables, it's usually easy to change the access requirements for a member variable (in C++ for instance, you just put public: or protected: (or private:) behind it) but in Javascript it means moving code around a bit more. i think people who design as they go prefer to use public as much as possible to avoid this extra work in case they make design changes that affec [16:18] hdon: t the accessibility of member variables [16:19] bencc has joined the channel [16:19] mattrobenolt: I need to preserve the original request body then since you alter it before passing it along the chain. [16:20] colinclark has joined the channel [16:20] AntelopeSalad: would it be safe to say going by the link i posted... [16:20] bfraenkel has joined the channel [16:20] coderarity: hdon: you could always add a public function or getter/setter to change a private variable to public [16:21] AntelopeSalad: use 1.2 if you plan to have multiple instances of the object , use 2.0 if you plan to use them in a static sense? [16:21] callumcohen_ has joined the channel [16:21] coderarity: AntelopeSalad: I didn't like the link you sent about 3 ways to define classes because it classifies them into 3 separate ways when you can really use them all [16:21] hdon: coderarity: that's still more work than just making it a publicly accessible property of your objects. when i am doing experimental work i make very sure that everything is public. it reads very differently than code i plan on reusing in the future! [16:22] AntelopeSalad: yeah it was just the first google result when i search for class methods in JS :< [16:22] AntelopeSalad: *searched [16:22] stagas: AntelopeSalad: yes you're safe that way [16:22] hdon: AntelopeSalad: what languages do you like before you came to Javascript? [16:22] joeytwiddle has joined the channel [16:22] AntelopeSalad: none really, i just screwed around with php and wrote functional but spaghetti code [16:23] jtsnow has joined the channel [16:23] jspiros has joined the channel [16:23] coderarity: AntelopeSalad: read Javascript: The Good Parts by Crockford [16:23] hdon: AntelopeSalad: heh well if you are interested in OOP in Javascript (class inheritance etc.) I highly recommend: https://github.com/dfilatov/jquery-plugins/tree/master/src/jquery.inherit [16:23] coderarity: I just read it and it was really useful [16:24] stagas: AntelopeSalad: 3 is stupid and 1.1 in some cases you need an instance only version of a function, in addition to the prototype [16:24] hdon: someone brought that book to my office and said i could read it but it disappeared the next day :( [16:24] Vainoharhainen has joined the channel [16:24] arduix has joined the channel [16:24] coderarity: it's actually not really long, it's pretty short and concise, which is nice [16:24] socketio\test\54 has joined the channel [16:25] hdon: stagas: 3 isn't stupid, it's just fulfills a rare set of needs. it's a singleton with private member variables. how else do you propose doing it? (you don't have to use it as a constructor function, but that is a minor difference.) [16:26] AntelopeSalad: that jquery code example is making my head explode [16:26] stagas: hdon: with 2 [16:26] hdon: stagas: in fact #3 is quite similar to the way CommonJS modules have been designed. a module is a singleton with its own private scope. it's defined as a function which yields an object with all of its publicly accessible properties and methods. [16:26] coderarity: AntelopeSalad: javascript functions are classes isn't too bad of an analogy for beginners, but if you really want to understand it, you should read that book [16:27] coderarity: as classes* [16:27] aheckmann has joined the channel [16:27] hdon: AntelopeSalad: well it's only for very serious OOP people :) [16:27] Monavie_Girl_Jb has joined the channel [16:27] moonlite has joined the channel [16:28] coderarity: hdon: exports can be a function, which is like #1 or #2 also [16:28] harry has joined the channel [16:28] hdon: stagas: "with 2?" [16:29] Monavie_Girl_Jb: hi [16:29] hdon: coderarity: heh, i weighed heavily against exports being allowed to be a function in the CommonJS mailing list when the specs were being proposed/criticized. implementation-wise, for non-Javascript language modules (a module written in C or C++ for instance) there were some barriers to that particular "feature." [16:29] hdon: at least on Spidermonkey [16:29] akshayms has joined the channel [16:30] orlandovftw has joined the channel [16:30] pickels has joined the channel [16:31] AntelopeSalad: hdon: did you want it to always be declared as module.exports instead? [16:31] sharkbird1 has joined the channel [16:31] coderarity: i still don't get the difference between exports and module.exports [16:31] hdon: AntelopeSalad: err.. i think that distinction i didn't feel strongly about, is imply wanted to ensure that module exports had to be an object, and not a function [16:31] piscisaureus__ has joined the channel [16:31] coderarity: i just use whichever one seems to work [16:31] hdon: i* simply* [16:32] AntelopeSalad: often times both work but it confuses me when i see both together, like: var something = module.exports = exports = wtf = function() { ... } [16:32] joshthecoder has joined the channel [16:32] coderarity: hdon: I don't think the idea of forcing it to be a certain type really fits the spirit of Javascript though [16:33] dob_: hello guys, how are you handling forms within express? Will I have to implement every field in jade and write my own validator? [16:33] RLa has joined the channel [16:33] coderarity: dob_: I bet there's a module for that [16:33] Monavie_Girl_Jb has left the channel [16:33] AntelopeSalad: coderarity: this helps us i think -> http://nodejs.org/docs/v0.4.6/api/globals.html#module (google result on exports vs module.exports) [16:33] alexrbarlow has joined the channel [16:33] hdon: coderarity: it does not. it was merely a technical detail of implementing CommonJS modules in Spidermonkey. [16:33] sharkbird1 has left the channel [16:33] dob_: coderarity: me too, but which one should I use? [16:34] AntelopeSalad: "In particular module.exports is the same as the exports object. See src/node.js for more information." [16:34] loadTestNode: found the load test issue [16:34] loadTestNode: was not node [16:34] AntelopeSalad: so these people using module.exports = exports , is for some type of legacy support? [16:34] loadTestNode: was able to do c 10000 easy [16:34] Monavie_Girl_Jb has joined the channel [16:34] Monavie_Girl_Jb has left the channel [16:34] loadTestNode: with peaks of up to 5k requests per second! [16:34] loadTestNode: Node SCREAMS [16:34] loadTestNode: :) [16:34] hdon: coderarity: were it not for implementation difficulties i would say exports should be able to be anything. an object, a function, a string, a number, a boolean, void 0, etc. [16:35] yawNO has joined the channel [16:35] coderarity: dob_: idk, revalidator might work https://github.com/flatiron/revalidator [16:35] coderarity: hdon: I thought it could be [16:35] loadTestNode: no ulimit issue either [16:35] hdon: coderarity: there was a time when the community had not yet made the decision :) [16:35] Borja has joined the channel [16:36] akshayms_ has joined the channel [16:36] RobWC has joined the channel [16:37] mafiya has joined the channel [16:37] hdon: coderarity: see this one: http://wiki.commonjs.org/wiki/Modules/1.1.1 and particularly this part: http://wiki.commonjs.org/wiki/Modules/ScriptModules [16:37] stagas: AntelopeSalad: somewhat. exports = module.exports internally. so if you do module.exports = { ... } then 'exports' will point to the old value, not the one we defined now [16:37] mafiya: Does anyone know how to get the value of