[00:00] Phoenixz: heavyUser: Since there are many projects with "mysql",. maybe I have the wrong one.. Could you give me the node package name, or better, a URL where I could find the one you are using? [00:00] joeytwiddle has joined the channel [00:00] heavyUser: felixge/node-mysql [00:01] Phoenixz: heavyUser: Thats the one I have.. 0.9.5 should be the latest.. But what do you mean with .once and .on ? [00:01] heavyUser: i mean this: [00:01] heavyUser: Phoenixz: im using this syntax: var query = sql.query('some query here'); query.on('row', function(row) { console.log(row); }); query.on('end', function() { /* we have it all */ }; [00:01] arturoml has joined the channel [00:01] heavyUser: or, if its an INSERT/UPDATE query, then i would use this: [00:01] Phoenixz: heavyUser: Let me try that then.. [00:02] hotchkiss has joined the channel [00:02] Phoenixz: heavyUser: So you are not using a callback function? [00:02] heavyUser: sql.query('some UPDATE/INSERT query here', function(error, info) { if(err) throw err; console.log(info); }); // try this out [00:02] heavyUser: Phoenixz: i am using a callback function [00:02] heavyUser: im just assigning it the other way [00:02] heavyUser: a callback for every row [00:03] heavyUser: try it out you'll understand [00:04] Phoenixz: heavyUser: tryin... [00:05] heavyUser: ok [00:06] Phoenixz: heavyUser: http://pastebin.com/u0NDhHDJ Still not working [00:06] Phoenixz: This is a quick test case I wrote [00:06] shinuza has joined the channel [00:06] boltR has joined the channel [00:06] Phoenixz: (And I suppose 'end' has no parameters, but I added one just to see [00:06] Phoenixz: ) [00:07] kbhit has joined the channel [00:07] Phoenixz: heavyUser: http://pastebin.com/9rF1rAit This is the result that I get [00:07] joshfinnie has joined the channel [00:07] kbhit has joined the channel [00:08] Bonuspunkt has joined the channel [00:09] heavyUser: 1 sec [00:09] agnat_ has joined the channel [00:09] jj0hns0n_ has joined the channel [00:09] bnoguchi has joined the channel [00:09] tmcw has joined the channel [00:10] heavyUser: Phoenixz: all seems good except that i dont use the createClient call [00:10] heavyUser: try this way [00:10] boltR has joined the channel [00:11] Phoenixz: heavyUser: Maybe that's the problem? :( [00:11] heavyUser: wait 1 sec i'll check my latest code just to be sure [00:11] heavyUser: im using sql.connect() [00:12] Phoenixz: heavyUser: err... Documentation kinda.. is incomplete, to state it nicely.. Any examples out there? [00:12] mikeal has joined the channel [00:13] heavyUser: do this: mysql = require('mysql'); mysql.host = 'localhost; mysql.user = 'pladeo'; mysql.password = 'pladeo'; mysql.connect(function(){ /* this function gets called when you're connected */ }); [00:13] heavyUser: i have some typos there but you get the point [00:13] RiverraiD has joined the channel [00:14] heavyUser: you require the module, set the host, user and password. the call the .connect() function that takes 1 argument, the callback to be executed when sql connection is ready [00:14] Phoenixz: OKay, okay.. rewriting... [00:14] heavyUser: inside that callback, place your queries like you showed in the pastebin [00:14] kbhit has joined the channel [00:15] nibblebo_ has joined the channel [00:15] heavyUser: i agree that the documentation around all the node.js stuff is very raw [00:16] kbhit has joined the channel [00:16] Phoenixz: heavyUser: TypeError: Object # has no method 'connect' http://pastebin.com/szthchxN [00:17] kbhit has joined the channel [00:17] recur has joined the channel [00:17] heavyUser: my bad [00:17] heavyUser: mysql = new require('mysql').Client; [00:18] heavyUser: change that line, may help [00:18] felixhummel has joined the channel [00:18] heavyUser: im pretty sure it'll work now [00:20] jdeibele has joined the channel [00:20] c0smikdebris has joined the channel [00:20] heavyUser: Phoenixz: so? [00:20] Phoenixz: heavyUser: :) Get this one for .connect: throw new Error('deprecated: use mysql.createClient() instead'); [00:20] nicholasf has joined the channel [00:21] heavyUser: dafuq, im not running the latest? o_O [00:21] heavyUser: are they serious [00:21] heavyUser: changing the API all the time? [00:21] heavyUser: or it's just the createClient [00:22] ekryski has joined the channel [00:23] Phoenixz: heavyUser: 0.9.5 is the latest version, AFAIK [00:23] diminoten: huh so I've got a file called foo.js in the same directory as bar.js, and I want to reference functions in foo.js from bar.js [00:23] diminoten: isn't that as simple as saying, "require('./foo.js');"? [00:23] diminoten: my gui understands but I get errors :( [00:24] diminoten: s/gui/ide/ [00:25] fritzy: require('./foo'); [00:26] diminoten: hm not working [00:26] heavyUser: do you module.export your functions in foo [00:26] diminoten: the functions in foo.js are defined very simply like "function baz() {};" [00:26] diminoten: I do not [00:26] diminoten: should I? heh [00:26] Juan77 has joined the channel [00:26] heavyUser: yes [00:27] heavyUser: simplest example: [00:27] Phoenixz: heavyUser: so no more .Client or .connect() [00:27] heavyUser: module.exports = { baz : function() {} } [00:27] heavyUser: Phoenixz: yes i figured :/ [00:27] diminoten: aha! [00:28] mcav has joined the channel [00:29] Phoenixz: heavyUser: this code http://pastebin.com/mYcJRM9u gives this result: http://pastebin.com/vvPJMrcB [00:30] heavyUser: Phoenixz: you should be able to set callbacks with query.on('row', function(){}); [00:30] westg: how can I export the whole js file and import the whole thing into my main app? [00:30] heavyUser: i see from your output, that [00:30] heavyUser: the returned QUERY object is a EventEmitter so it will emit 'row' and 'end' events [00:30] westg: do i have to wrap a function around all my code and then export it like usual? [00:30] jmar777 has joined the channel [00:30] Phoenixz: heavyUser: That is exactly what I do http://pastebin.com/mYcJRM9u [00:30] Phoenixz: heavyUser: Gives nothing.. [00:30] kbhit has joined the channel [00:31] shivhack has joined the channel [00:31] Phoenixz: heavyUser: It gets weirder even.. When I shut down the mysql server, I get the exact same result.. [00:31] Phoenixz: heavyUser: Its as if its not doing anything at all [00:31] heavyUser: Phoenixz: remove process.exit() ! [00:31] heavyUser: youre stopping the script before it gets a result [00:32] heavyUser: i missed that but that is the real issue there ;) [00:33] shivhack has joined the channel [00:33] heavyUser: just remove process.exit(); [00:33] heavyUser: or place it inside the callback [00:33] kbhit has joined the channel [00:33] heavyUser: you see, in this event-oriented programming model, your process.exit() statement executes before query.on() listeners (because the response is not instant) [00:33] StanlySoManly1 has joined the channel [00:33] shivhack has joined the channel [00:34] kbhit has joined the channel [00:34] jj0hns0n has joined the channel [00:35] nicholasf has joined the channel [00:35] kbhit has joined the channel [00:36] redir has joined the channel [00:36] ohtogo has joined the channel [00:36] kbhit has joined the channel [00:37] shivhack has joined the channel [00:39] shivhack has joined the channel [00:39] themiddleman_itv has joined the channel [00:41] kbhit has joined the channel [00:42] JoshJensen has joined the channel [00:42] subbyyy has joined the channel [00:42] kbhit has joined the channel [00:42] ohtogo has left the channel [00:43] nibblebot has joined the channel [00:44] dodo has joined the channel [00:45] jj0hns0n_ has joined the channel [00:45] Druid_ has joined the channel [00:45] brianseeders has joined the channel [00:47] jj0hns0n has joined the channel [00:47] EyePulp has joined the channel [00:47] kbhit has joined the channel [00:48] thetristan has joined the channel [00:48] meso_ has joined the channel [00:49] kirbysayshi has joined the channel [00:49] kbhit has joined the channel [00:52] illourr has joined the channel [00:53] ChrisPartridge has joined the channel [00:54] thetristan has joined the channel [00:54] warz has joined the channel [00:54] warz has joined the channel [00:54] snearch has joined the channel [00:54] jtsnow has joined the channel [00:56] mcav has joined the channel [00:56] ramitos has joined the channel [00:57] alex_k has joined the channel [00:59] mikeal1 has joined the channel [00:59] markq has joined the channel [01:00] a_suenami has joined the channel [01:03] shivhack has joined the channel [01:04] westg has joined the channel [01:07] shivhack has joined the channel [01:08] avelino has joined the channel [01:10] CIA-102: node: 03Joshua Holbrook 07v0.6 * r4065b24 10/ (doc/api/child_processes.markdown lib/child_process.js): child_process: remove dummy "setsid" option setting - http://git.io/8xDmwQ [01:10] ekryski has joined the channel [01:10] jesusabdullah: oh Hell yeah [01:10] jamescarr has joined the channel [01:11] CIA-102: node: 03Joshua Holbrook 07master * r56cfcea 10/ (doc/api/child_process.markdown lib/child_process.js): child_process: remove dummy "setsid" option setting - http://git.io/XaDc5g [01:12] maxogden: jesusabdullah: now that you have node core commits you get to ask for a 20k/yr raise [01:12] shivhack has joined the channel [01:12] jesusabdullah: ah but that would be cheating! [01:12] maxogden: welcome to the real world [01:12] replore_ has joined the channel [01:12] replore has joined the channel [01:13] Leemp has joined the channel [01:13] jesusabdullah: Haha, I guess! [01:13] jamescarr: sniff [01:13] juyeong_park has joined the channel [01:13] jamescarr: anyone working with elastic_search? [01:13] nibblebot has joined the channel [01:14] maxogden: jamescarr: do you men the database or is that a module name [01:14] maxogden: mean* [01:15] jerrysv has joined the channel [01:16] tvw has joined the channel [01:16] jxie has joined the channel [01:16] ultimatedelman has joined the channel [01:16] ultimatedelman: hi [01:16] ultimatedelman: anyone here? [01:16] KrisJordan has joined the channel [01:17] jerrysv has joined the channel [01:17] ultimatedelman: i'm trying to get node running on my windows box but i'm not quite sure what to do after installing the package on the nodejs website.... [01:17] jamescarr: maxogden, well, I am using elastical [01:17] jamescarr: but using elasticsearch to index mongodb [01:17] ultimatedelman: anyone know what i should do? [01:17] jamescarr: for full text searching [01:18] mcav has joined the channel [01:19] jamescarr: ultimatedelman, here's what you do dude: [01:19] jamescarr: set up env variables [01:19] ultimatedelman: thanks, jamescarr! [01:19] jamescarr: NODE_HOME to where node is installed [01:19] jamescarr: PATH=%PATH%;%NODE_HOME%\bin [01:20] fatih has joined the channel [01:20] jamescarr: now you can run node from the commandline :) [01:20] jamescarr: happy hunting [01:20] ultimatedelman: you may be a lifesaver :) [01:20] sorensen__ has joined the channel [01:20] quackquack has joined the channel [01:21] quackquack: can the "crypto" module do bcrypt password hashing? [01:22] jamescarr: quackquack, I think so... I have done sha1 hashes with it [01:22] jamescarr: which is mostly all I ever need imho [01:22] joaojeronimo has joined the channel [01:22] CIA-102: node: 03Blake Miner 07master * r7343f8e 10/ (doc/api/crypto.markdown doc/api/tls.markdown lib/tls.js): [01:22] CIA-102: node: tls: add `honorCipherOrder` option to tls.createServer() [01:22] CIA-102: node: Documented how to mitigate BEAST attacks. - http://git.io/-z1SyQ [01:23] quackquack: jamescarr: is sha1 safe for passwords? [01:23] jamescarr: I like to believe so. To be honest I always just use mongoose-auth and go strong [01:23] k1ttty has joined the channel [01:23] jamescarr: if you have hackers clever enough to crack sha1, you have other problems [01:24] nibblebot has joined the channel [01:25] ultimatedelman: jamescarr - i added a NODE_HOME variable like you said: NODE_HOME => PATH=%PATH%;%NODE_HOME%\bin [01:25] jamescarr: don't do that [01:25] ultimatedelman: my command line isn't recognizing "node" as a command :\ [01:25] ultimatedelman: oh [01:25] jamescarr: set NODE_HOME to where it installed [01:25] ultimatedelman: :X [01:25] jamescarr: NODE_HOME=C:\node (for example) [01:25] ultimatedelman: haha [01:29] ultimatedelman: jamescarr - i think i figured it out. i deleted the env var i created, uninstalled node (wasn't sure where i installed it, couldn't find it), reinstalled [01:29] jamescarr: hahaha [01:29] ultimatedelman: the confirm message tells you that you have to open up your command line and just type "node" [01:29] ultimatedelman: ha [01:29] ultimatedelman: so i did [01:29] ultimatedelman: and it works [01:29] ultimatedelman: :) [01:29] jamescarr: you can also reinstall and it'll tell you where it's at [01:29] ultimatedelman: thank you for your help [01:29] jamescarr: ran into the same problem setting up my work machines [01:29] jamescarr: no problem [01:29] ultimatedelman: i'm sorry for wasting your time by being a moron [01:29] ultimatedelman: hahaha [01:30] ultimatedelman: good to know people are in here though [01:30] jamescarr: no problem... I dropped into help while hacking tonight [01:30] jamescarr: for karma. :) [01:30] jamescarr: now if only people would respond in #elasticsearch I'd be good :) [01:30] ultimatedelman: haha... wish i could help! you tried stackoverflow yet? [01:31] ts__: soon nodejs will have a computation engine like twitter storm :) [01:31] jtsnow has joined the channel [01:31] ts__: i'm making great progress ! [01:31] jerrysv has joined the channel [01:36] whaley_ has joined the channel [01:36] icewhite has joined the channel [01:37] YoY has joined the channel [01:37] tylerstalder has joined the channel [01:37] jesster7 has joined the channel [01:38] mcav has joined the channel [01:39] jamescarr has joined the channel [01:39] heavyUser: https://gist.github.com/1936852 [01:41] sorensen__ has joined the channel [01:43] heavysixer has joined the channel [01:48] tmike: /win 4 [01:48] tmike: d'oh [01:49] kirbysayshi has joined the channel [01:49] gkatsev has joined the channel [01:50] sdwrage has joined the channel [01:52] QaDeS has joined the channel [01:52] tmike: So when you're deploying a node application, how do you do it? Do you just detach it off into a screen session, daemonize, manage it with some sort of init? [01:52] carlyle has joined the channel [01:53] bnoordhuis: tmike: i personally just use screen [01:54] bnoordhuis: but there are daemonizers and init.d/upstart/what-have-you scripts out there [01:54] tmike: How do you manage it? [01:54] bnoordhuis: just let it run? there's not much managing to be done [01:54] bnoordhuis: there are tools like forever that will restart node for you if it crashes/quits [01:55] Allyz has joined the channel [01:55] tmike: That's really my primary concern, is deploying updates or watching/reporting crashes [01:55] franciscallo has joined the channel [01:55] tmike: Thanks for the pointers. [01:55] bnoordhuis: my pleasure [01:56] kickingvegas has left the channel [01:57] mcav has joined the channel [01:58] teadict: how the crap can I solve the "browserify can't use expressions in require()s" situation? [01:58] teadict: I guess I'll end up using a dictionary [01:58] SubStack: teadict: if you really need dynamic requires you can do that using the browserify api [01:58] teadict: HOW [01:59] teadict: TELL ME [01:59] teadict: I'll pay [01:59] SubStack: bundle.require('something') [01:59] SubStack: before that: var bundle = browserify(...) [01:59] teadict: if I replace my require('./widgets/ + Entity); with bundle.require('./widgets/' + Entity); it will work? [01:59] teadict: and that [01:59] SubStack: no [02:00] SubStack: you would do the bundling in a script that runs in node [02:00] teadict: oh mmm [02:00] alippai has joined the channel [02:00] SubStack: like this except you don't need to use it as a middleware necessarily https://github.com/substack/node-browserify/blob/master/example/simple-middleware/server.js [02:01] SubStack: you can just call bundle.bundle() to get the concatenated output as a string [02:01] teadict: why does this happen? [02:01] SubStack: why? [02:02] teadict: oh, because things build in the server [02:02] SubStack: because browserify is designed for simple static requires [02:02] teadict: okey [02:02] SubStack: but it's possible to do more advanced things, it's just more difficult [02:02] SubStack: probably it will be lots easier if you just change the client source to require() static strings directly [02:03] teadict: my code don't let m [02:03] teadict: e [02:03] dshaw_ has joined the channel [02:04] teadict: the widget to be required() is given by the Backbone Route matched [02:04] _baton_ has joined the channel [02:04] teadict: which is a variant [02:04] ryan_stevens has left the channel [02:05] teadict: I'll use a hashmap [02:05] teadict: thanks anyway [02:07] jaw187 has joined the channel [02:07] jmar777: is the next 0.6.x release going to be bundled with npm 1.1.2? [02:07] boogyman has joined the channel [02:07] boogyman has joined the channel [02:08] jacobolus has joined the channel [02:09] dragon: hope so. [02:10] soapyillusions has joined the channel [02:10] astropirate has joined the channel [02:10] kriszyp has joined the channel [02:10] kurtzhong has joined the channel [02:11] dekub has joined the channel [02:11] abraxas has joined the channel [02:13] isaacs: jmar777: probably 1.1.3, actually [02:13] rurufufuss has joined the channel [02:14] teadict: SubStack: I don't understand how the middleware works [02:14] SubStack: teadict: you don't need to use the middleware, that is just an example of how to use the api [02:14] SubStack: you use that from node [02:14] teadict: but I need dynamic requires( [02:14] SubStack: yes [02:15] SubStack: why don't you back up and explain what you are doing a little more [02:16] teadict: I have a Backbone Router... which matches routes, the route I'm on now is "blah/:entity", the handler for that route must require 2 files, a widgets and a view file [02:16] teadict: there's like 12 entities [02:16] teadict: I'd like to generalize that handler, by require('./widgets/' + entityRouteParam) and the same for views [02:17] muddo has joined the channel [02:18] jmar777: isaacs: awesome, thanks! [02:18] mcav has joined the channel [02:18] ryanfitz_ has joined the channel [02:18] teadict: SubStack: I don't want to create 12 routes and handlers [02:19] slloyd has joined the channel [02:22] rwaldron has joined the channel [02:22] githogori has joined the channel [02:23] SubStack: teadict: probably you can just step back and rearchitecture your code to not use so many require()s in the same place [02:23] jarek has joined the channel [02:23] jarek has joined the channel [02:24] diogogmt has joined the channel [02:24] teadict: why did I know you'd say that? [02:24] SubStack: or barring that just make an index.js file for all the files in a directory and throw down require()s for each of the files [02:24] teadict: okey, I'll see [02:25] SubStack: exports.foo = require('./foo') [02:25] ohtogo has joined the channel [02:25] SubStack: exports.bar = require('./bar') [02:25] SubStack: I've done that a few times [02:25] teadict: exports.beer = I.require('./beer'); [02:26] SubStack: agreed! [02:26] vbabiy has joined the channel [02:27] jesusabdullah: var i = new I; [02:27] jesusabdullah: heh [02:29] wookiehangover: are there any security implications associated with storing an oauth access token (from a 3rd party api) in a database? [02:29] justicefries: yes. [02:29] wookiehangover: hi justicefries [02:29] justicefries: hi. :) [02:30] wookiehangover: you were on my shortlist of ppl who would know the answer to that [02:30] wookiehangover: care to offer any explaination? [02:30] justicefries: so they're low, in that a consumer can choose to expire the OAuth token in the event of any breach. [02:31] wookiehangover: gotcha [02:31] justicefries: that's fine and well, but one thing to do is make it easy to disconnect that service for a user. [02:31] dodo has joined the channel [02:31] justicefries: to expire said token. [02:31] wookiehangover: my gut was telling me it was generally a bad thing [02:31] bulatshakirzyano has joined the channel [02:31] justicefries: well, if you have multi-user scenarios, you have to store it somewhere. [02:31] thinkt4nk has joined the channel [02:32] wookiehangover: ya, but session stores are different [02:32] eee_c has joined the channel [02:32] wookiehangover: and that's actually what I'm doing [02:32] justicefries: oh, sure. [02:32] justicefries: wait so you're wanting to use the OAuth token as the user's session? [02:32] neoesque has joined the channel [02:33] kurtzhong has joined the channel [02:33] akasha has joined the channel [02:33] wookiehangover: no, but have a way to get at it for a user [02:33] wookiehangover: but yes, I'm attaching it to the session object presently [02:33] wookiehangover: https://github.com/bnoguchi/mongoose-auth/pull/80 [02:33] davidban_ has joined the channel [02:33] mikeal has joined the channel [02:34] justicefries: I mean, once you authorize, that oauth token isn't changing. [02:34] TooTallNate has joined the channel [02:35] justicefries: if you need to authorize using the user's token to do permissions-based things, you might as well store it. it's a fairly low risk given that it expires so easily. [02:36] justicefries: this speaks to also only requesting the permissions you need. [02:36] justicefries: you have a much bigger problem if you only need to read tweets, but you request the ability to post, someone gets all of the OAuth tokens and turns them into spambots for an hour. [02:36] c4milo has joined the channel [02:37] rwaldron has joined the channel [02:37] wookiehangover: so i guess there's another use case for this [02:37] hello123 has joined the channel [02:37] jergason has joined the channel [02:38] justicefries: okay [02:38] wookiehangover: a worker or some other process needing to make requests on behalf of the user [02:38] dodo has joined the channel [02:38] AvianFlu has joined the channel [02:38] justicefries: yeah. [02:38] wookiehangover: but I'm still in favor of persisting it through their session [02:39] langworthy has joined the channel [02:39] justicefries: sessions don't really 'persist' though by nature, so I'm not fully sure what you mean.. [02:39] justicefries: next sign in, you have to go request the token again from the provider. [02:39] wookiehangover: ya [02:39] wookiehangover: but its their throughout their entire session [02:40] mcav has joined the channel [02:40] justicefries: so some quick research... [02:41] wookiehangover: in an oauth provider as authentication scenario, it's going to make that request and get a new access token on the next sign in anyway [02:41] justicefries: people seem to use both ways, neither's necessarily better. well, that access token doesn't change. [02:41] justicefries: the access tokens are unique for that user and app authorization. [02:41] justicefries: or [02:41] justicefries: rather [02:41] justicefries: it shouldn't be changing. ;) [02:41] justicefries: now real quick [02:41] justicefries: are you talking about signing in through oauth. [02:41] justicefries: or are you talking about signing in through bcrypt and you've authorized an application. [02:42] justicefries: eh [02:42] justicefries: store it in the session, there's nothing WRONG with it. [02:42] wookiehangover: I'm talking about signing in through oauth via everyauth and then using that api token to make other requests [02:42] justicefries: okay cool. [02:42] justicefries: I wouldn't say there's any major security implications with storing it in the DB, either. [02:42] wookiehangover: pretty much the same scenario in the pull req I linked to [02:43] justicefries: that's just what OAuth is intended for/good for [02:43] justicefries: there are definitely cases where you might want access to it to store it. [02:43] mandric has joined the channel [02:45] xaq has joined the channel [02:48] paulwe has joined the channel [02:48] evlapix has joined the channel [02:49] evlapix: How can I access the request, or session objects outside of a route callback? [02:51] dmwuw has joined the channel [02:52] diva has joined the channel [02:53] pradeepbv has joined the channel [02:57] sharkbird has joined the channel [02:59] stagas has joined the channel [03:02] ericmuyser has joined the channel [03:03] nealstewart has joined the channel [03:04] jmhurley has joined the channel [03:05] hgg has joined the channel [03:05] t0mmyvyo has joined the channel [03:05] RiverraiD has joined the channel [03:06] KrisJordan has joined the channel [03:09] r1ngzer0_ has joined the channel [03:09] coyo has joined the channel [03:09] coyo has joined the channel [03:09] philips has joined the channel [03:10] maxogden: evlapix: make a function call and pass the stuff you want into that function from inside the route callback [03:11] iangreenleaf has joined the channel [03:12] chadskidmore has joined the channel [03:12] evlapix: maxogden: I had assumed there was an easier way. I'm trying to get to .session ultimately. [03:12] evlapix: maxogden: I'll just script up a middleware method that makes session global. Thanks. [03:12] maxogden: evlapix: ur doin it rong [03:13] evlapix: maxogden: I just need to do easily, not necessarily correctly. Thanks. [03:15] KrisJordan has joined the channel [03:15] brianseeders has joined the channel [03:16] slloyd has joined the channel [03:17] criswell has joined the channel [03:17] jerrysv has joined the channel [03:18] jdeibele has joined the channel [03:20] st_luke has joined the channel [03:20] chilts: passing things like req and session stuff into a function is pretty easy/basic/fundamental [03:20] chilts: but your choice :) [03:20] kriszyp has joined the channel [03:20] chilts: I think fundamental is the operative word there [03:21] huggies has joined the channel [03:27] ejholmes_ has joined the channel [03:28] ejholmes_ has left the channel [03:28] sdwrage has joined the channel [03:29] ejholmes_ has joined the channel [03:29] stagas has joined the channel [03:29] ejholmes_ has joined the channel [03:29] ejholmes_ has left the channel [03:30] ejholmes_ has joined the channel [03:30] Kwieb has joined the channel [03:32] ryanfitz has joined the channel [03:35] MatthewS has joined the channel [03:35] vicapow has joined the channel [03:36] cody-- has joined the channel [03:36] vicapow: hey all! I'm supposed to give a presentation tomorrow at the first pittsburgh node.js meet up. what should I talk about? [03:36] ejholmes_ has left the channel [03:37] sven_oostenbrink has joined the channel [03:37] Kwieb: You could talk about what node.js is, and why people should use it? [03:38] spion1 has joined the channel [03:38] sven_oostenbrink: Is there a node funciton that can compare versions, to see if 0.2.11 > 0.1.11, etc? [03:38] sven_oostenbrink: Or should I just do a string comparrisson? [03:39] scrumlord has joined the channel [03:40] Kwieb: I think you should do a string comparison.. [03:40] astropirate: vicapow, lol its tommarow and you dont' have a topic yet? :p [03:40] ChrisPartridge: isn't there a semver lib somewhere? [03:41] vicapow: Kwieb: lol [03:41] vicapow: astropirate: yeah, lol. why, is that bad? [03:41] astropirate: vicapow, sounds like something I would do [03:41] woollybronto has joined the channel [03:41] vicapow: astropirate: haha [03:42] ChrisPartridge: sven_oostenbrink: see here https://github.com/isaacs/node-semver [03:42] vicapow: astropirate: the plan up until now was to just wing it [03:44] astropirate: What ever happened to Nowjs? Thye were very active then bam haven't heard anything from them [03:45] dgathright has joined the channel [03:46] ChrisPartridge: astropirate: last commit was 5 days ago, seems pretty active to me [03:46] beratuslu has joined the channel [03:46] beratuslu: hey everyone [03:46] beratuslu: anybody? [03:46] astropirate: beratuslu, Greetings [03:47] beratuslu: thanks [03:47] skm has joined the channel [03:47] beratuslu: i have a problem [03:47] halfhalo: fire is a solution. [03:47] Hamms has joined the channel [03:47] beratuslu: what u mean? :) [03:47] astropirate: it always is [03:48] Eruadan: helo :D [03:48] broofa has joined the channel [03:49] beratuslu: ../deps/openssl/openssl/crypto/des/enc_read.c:66:1: error: static declaration of ‘_hide_DES_rw _mode’ follows non-static declaration ../deps/openssl/openssl/crypto/des/enc_read.c:66:1: note: previous declaration of ‘_hide_DES_r [03:50] beratuslu: does any one know how to solve this problem [03:52] subbyyy has joined the channel [03:54] jlank has joined the channel [03:54] agnat: beratuslu: looks pretty messed up ... [03:55] agnat: beratuslu: 1. gist the full error somewhere 2. what os/arch/node version &c is this? [03:55] ChrisPartridge: beratuslu: compile node with ssl support? [03:55] m00p has joined the channel [03:56] agnat: it *is* the ssl support that is acting up [03:56] kirli has joined the channel [03:56] agnat: ... at compile time that is ... [03:56] beratuslu: I think its not complete error message [03:56] agnat: I know ... [03:57] beratuslu: How can i paste it [03:57] Kwieb: www.pastebin.com [03:57] beratuslu: thank you [03:57] agnat: don't paste it on the channel ... precisely [03:57] Kwieb: No problem [03:57] beratuslu: http://pastebin.com/vMP4wNwG [03:58] dgathright has joined the channel [03:58] beratuslu: any help appreciated [03:59] sbb has joined the channel [03:59] andrehjr_ has joined the channel [04:00] agnat: well, a bit more context would be good ... os &c. ... [04:00] kirli: i have an idea [04:00] nerdfiles1 has joined the channel [04:00] kirli: berat [04:01] nerdfiles1 has left the channel [04:02] take_cheeze has joined the channel [04:02] _th_n has joined the channel [04:02] blueadept has joined the channel [04:02] blueadept has joined the channel [04:03] kirli: i am checking the stable version [04:03] tmcw has joined the channel [04:03] st_luke has joined the channel [04:03] kirli: for v.0.7.0 it says bump version to v0.7.0 [04:03] tekky has joined the channel [04:03] kirli: is it ok?? [04:04] Skaag has joined the channel [04:05] criswell has joined the channel [04:05] kmiyashiro has joined the channel [04:05] jlank has joined the channel [04:07] boehm has joined the channel [04:07] warz has joined the channel [04:07] warz has joined the channel [04:08] KrisJordan has joined the channel [04:11] TooTallNate has joined the channel [04:13] al3xnull has joined the channel [04:13] timoxley: SubStack how's that epic blog post you were writing going? [04:14] tttthet has joined the channel [04:14] beratuslu: thank you gays [04:14] beratuslu: sorry [04:14] beratuslu: guys [04:14] beratuslu: :P [04:16] abraxas: rude... [04:16] ChrisPartridge: beratuslu: solve it? [04:17] beratuslu: yes [04:17] beratuslu: i think problem was that I was using unstable version [04:17] dthompso99 has left the channel [04:17] thetristan has joined the channel [04:17] beratuslu: latest stable version is seemsto me 0.6.9 [04:18] ChrisPartridge: 0.6.11 [04:18] ramitos has joined the channel [04:19] beratuslu: now i have a new problem [04:19] beratuslu: can you help? [04:19] dthompso99 has joined the channel [04:20] ChrisPartridge: ask away [04:20] beratuslu: http://pastebin.com/1TZMeASw [04:22] elnn has joined the channel [04:22] beratuslu: and than when i say [04:22] beratuslu: ./configure [04:22] beratuslu: it says cygwin not supported cygwin not supported [04:22] Qalqi has joined the channel [04:22] ChrisPartridge: are you using cygwin? [04:23] ChrisPartridge: what OS? [04:24] alexmcpherson has joined the channel [04:25] beratuslu: We are using windows 7 ofcourse [04:25] alexmcpherson has joined the channel [04:25] ChrisPartridge: beratuslu: use the MSI [04:25] ChrisPartridge: and remove cygwin [04:25] alexmcpherson has joined the channel [04:25] beratuslu: what is the path of msi? [04:25] jdparker has joined the channel [04:26] ChrisPartridge: http://nodejs.org/ [04:26] satyr has joined the channel [04:27] jasonw22 has joined the channel [04:27] CarterL has joined the channel [04:28] misza222 has joined the channel [04:31] gerard0 has joined the channel [04:33] polyrhythmic has joined the channel [04:34] stagas has joined the channel [04:34] jmar777: should this be emitting an error, instead of throwing? https://github.com/joyent/node/blob/d18cebaf8a7ac701dabd71a3aa4eb0571db6a645/lib/net.js#L453 [04:35] jdeibele has joined the channel [04:37] gavin_huang has joined the channel [04:37] petschm_ has joined the channel [04:38] sreeix has joined the channel [04:39] sharkbird has joined the channel [04:39] ChrisPartridge: jmar777: looks like it [04:41] timoxley has joined the channel [04:41] jmar777: It looks like other than that line, and a similar one in close(), it's only throwing errors on programmer error [04:41] KrisJordan has joined the channel [04:41] AvianFlu: jmar777, sounds like you just found yourself somethin' to pull request! AWWWW YEAAA [04:42] jmar777: AvianFlu: absolutely :) was just looking for some general consensus [04:44] kickingvegas has joined the channel [04:45] sharkbird has joined the channel [04:45] ChrisPartridge: jmar777: Quick... before AvianFlu beats you to it [04:45] ChrisPartridge: ;-) [04:45] AvianFlu: nah, I've already got other shit to PR :D [04:46] jmar777: Been awhile since I've had one... [04:46] ChrisPartridge: thats what she said [04:46] jasonw22 has joined the channel [04:47] jmar777: snap [04:49] eee_c has joined the channel [04:53] sharkbird has joined the channel [04:53] AI42 has joined the channel [04:54] OmidRaha has joined the channel [04:54] fritzy has joined the channel [04:55] sdqali has joined the channel [04:55] merlin83 has joined the channel [04:58] gerard0 has joined the channel [04:58] jmar777: man, my fork was a good year old. trying to merge upstream/master is a pain in the butt [04:58] jmar777: is there a better approach than that? [04:59] devongovett has joined the channel [05:00] upstream: ACTION yes I am [05:01] gavin_huang has joined the channel [05:02] AvianFlu: jmar777, two [05:02] AvianFlu: one would be to git checkout (your old branch) [05:02] AvianFlu: then git merge -Xtheirs upstream master [05:02] AvianFlu: I think that's the syntax [05:02] jmar777: -Xtheirs? [05:02] AvianFlu: or, delete the fork and fork again [05:03] AvianFlu: yeah, "strategy=theirs" in older versions [05:03] jmar777: ahh, gotcha [05:03] AvianFlu: it means "always go with the other branch on conflict" [05:03] munichlinux has joined the channel [05:03] AvianFlu: although with a fork [05:03] AvianFlu: you'll be creating a pointless merge commit that way [05:03] upstream: stop merging me, it tickles [05:04] AvianFlu: so you should really just re-fork [05:04] meso has joined the channel [05:04] AvianFlu: upstream, 10 internet points to you for lulz, sir [05:05] jmar777: AvianFlu: i think that's probably the way to go. this doesn't seem worth the hassle lol [05:05] AvianFlu: jmar777, yeah, no fuckin' way [05:05] AvianFlu: not for a fork [05:05] upstream: YAY POINTS [05:05] AvianFlu: jmar777, that's a sweet git trick for heavy merges that I learned yesterday, though [05:06] AvianFlu: it's a good one to copypasta somewhere :D [05:06] warz: hm, so variables outside of a callback method cannot have the same name as ones inside the callback, unless you intend to modify them. did not know that. [05:06] jmar777: AvianFlu: the -X theirs trick? [05:06] AvianFlu: jmar777, yep [05:06] AvianFlu: it's -Xtheirs though [05:06] AvianFlu: one word for some reason [05:06] jmar777: AvianFlu: ahh. that does seem pretty nifty [05:06] AvianFlu: there's also "ours" [05:07] AvianFlu: which would be the opposite [05:07] upstream: warz: what you talkin' bout? [05:07] jmar777: ha, tried to fork and it sent me to github.com/jmar777/node-1 (404's) [05:07] swaj has joined the channel [05:07] swaj has joined the channel [05:08] jmar777: must've been a race condition... some sort of async delete going on [05:08] warz: upstream: variable scope. i have a variable in a method that i do some stuff with. then, in that method, i call another method which uses the same variable name. [05:08] warz: and in the callback of that, i continue using my origin variable, but it has been changed by the other method. [05:09] jmar777: warz: can you pastie that? it sounds like you might be redeclaring (hoisting) the variable name in a lower scope [05:09] upstream: yea [05:11] warz: im using coffeescript, so i dont know if you recognize the syntax or not, but here's the code: https://gist.github.com/1938046 [05:11] xaq has joined the channel [05:11] warz: line 51 of router.coffee, for example [05:12] niloy has joined the channel [05:12] maletor has joined the channel [05:12] warz: see above, where i'm console.log'ing the collection, then in the line 11 of model.coffee where i have my ORM-ish function [05:12] warz: and it's been changed once im finished with the database query [05:13] niloy_ has joined the channel [05:13] caffine has joined the channel [05:14] warz: so it looks to me like i'm doing what you're describing. i'm redeclaring that same variable. [05:14] warz: didn't realize the scope worked that way. [05:14] yumike has joined the channel [05:15] warz: glad i learned this now. that'd make for some painful debugging eventually, lol. [05:15] jmar777: warz: ya. i haven't looked into coffeescript at all yet, so i'm not sure what that context/locals stuff is [05:16] jmar777: warz: but in plain ol' javascript terms, variables are function scoped, so if you declare a variable, that declaration takes precedence in the current function, even if there's a variable of the same name higher up [05:16] warz: oh thats just for express.js / hogan.js [05:16] warz: mustache template context stuff [05:17] EyePulp has joined the channel [05:17] copongcopong has joined the channel [05:17] warz: hm, well thats whats happening here, but i guess it never actually returns to the higher up function [05:18] warz: i continue forward into a callback method [05:18] warz: ive only been using nodejs for a few months, so im not very polished on it. i just use it to knock out some things. [05:18] warz: kind of learn as i go [05:19] ChrisPartridge: Don't know coffee - but I thought one of it's pluses was resolving the scope issues [05:20] warz: well, my reasoning for choosing coffeescript initially was to lower the barrier to entry of plain ole javascript. [05:21] warz: and by that i basically mean classes [05:21] warz: but strangely, i think coffeescript has made me feel like switching back to plain js [05:22] warz: because it helped me learn in almost a python -> js type of fashion [05:22] warz: since im used to python and it sort of resembles a mix of the two, imo [05:23] AvianFlu: warz, I think that that's a great use of coffeescript [05:23] AvianFlu: I prefer js vastly [05:23] AvianFlu: because there's magic in the curlies [05:23] AvianFlu: to paraphrase maxogden [05:23] azend has joined the channel [05:24] warz: my main complaints with coffee is just how easily it breaks down into js, anyways [05:24] copongcopong has joined the channel [05:24] warz: degrades, i mean, if you will [05:24] maxogden: "there's magic in the curlies" is how i describe my facial hair actually [05:25] upstream: "facial hair" [05:25] upstream: ;) [05:26] rt7 has joined the channel [05:26] warz: that might be my weekend project. rewrite this in plain js. [05:27] maxogden: upstream: no sexytime implied, i'm _actually_ talking about my beard [05:27] localhost has joined the channel [05:27] AvianFlu: and maxogden has a lot of beard to talk about [05:27] upstream: I mentally redacted my statement promptly - but it was too late :) [05:28] upstream: anyone here do the ctf.stri.pe challenge? [05:29] jmar777: AvianFlu: what do you think of this comment? https://github.com/joyent/node/blob/1eb1fe32250fc88cb5b0a97cddf3e02be02e3f4a/lib/net.js#L858 [05:29] jmar777: i'm guessing that's implying that the throw vs emit is intentional, but i'm not sure what to make of it [05:29] AvianFlu: well [05:29] AvianFlu: this._handle is like, the server itself [05:29] AvianFlu: the low-level parts [05:30] AvianFlu: so not calling .close() on undefined might make sense [05:30] AvianFlu: maybe ping isaacs when he's around [05:30] AvianFlu: ircretary, tell isaacs jmar777 wants to ask about a throw statement in net.js [05:30] ircretary: AvianFlu: I'll be sure to tell isaacs [05:31] AvianFlu: his secretary will take care of it XD [05:31] jmar777: AvianFlu: right - i think the check there makes sense, and it's definitely an error condition [05:32] jmar777: AvianFlu: i'm just wondering why the throw vs. emit (and thanks - i always forget how ircretary works :p) [05:32] AvianFlu: jmar777, I'd rather see all emits and no throws, but it's worth asking [05:33] jmar777: AvianFlu: ya. throw should be programmer error (die early, die hard). but for stuff that can be caused by network conditions, a throw is pretty unfriendly [05:34] jmar777: AvianFlu: there's way too much that extends that code - you practically have to try/catch anything related to HTTP/TCP/IPC/etc. [05:37] AvianFlu: yep [05:37] michaelmartinez has joined the channel [05:40] justicefries has joined the channel [05:41] mgolawala has joined the channel [05:41] kejun has joined the channel [05:44] fmeyer has joined the channel [05:45] looopy has joined the channel [05:47] mcav has joined the channel [05:49] petrjanda has joined the channel [05:52] boltR has joined the channel [05:55] zackattack has joined the channel [05:57] kickingvegas has left the channel [05:59] umren has joined the channel [05:59] localhost has joined the channel [06:00] _baton_ has joined the channel [06:02] davidbanham has joined the channel [06:04] MatthewS has left the channel [06:04] cjm has joined the channel [06:05] zackattack: anyone have experience with these kinds of errors? [06:05] zackattack: FATAL ERROR: v8::HandleScope::Close() Local scope has already been closed [06:06] porco has joined the channel [06:08] copongcopong has joined the channel [06:10] tanepiper has joined the channel [06:10] fangel has joined the channel [06:11] benvie has joined the channel [06:12] shinuza has joined the channel [06:13] benvie has joined the channel [06:15] felixge has joined the channel [06:15] felixge has joined the channel [06:17] boehm has joined the channel [06:17] manuj has joined the channel [06:18] kejun1 has joined the channel [06:19] dilvie has joined the channel [06:20] vbabiy has joined the channel [06:21] vbabiy has joined the channel [06:21] ryan_stevens has joined the channel [06:22] merlin83 has joined the channel [06:22] garrensm_: morning [06:23] replore has joined the channel [06:23] replore_ has joined the channel [06:24] c0smikdebris has joined the channel [06:26] ivanfi has joined the channel [06:26] ivanfi has left the channel [06:26] ChrisPartridge: afternoon [06:26] AvianFlu: evening! [06:27] postwait has joined the channel [06:31] simenbrekken has joined the channel [06:32] icewhite has joined the channel [06:32] tylerstalder has joined the channel [06:32] jmhurley has joined the channel [06:35] jmar777: night [06:35] satyr has joined the channel [06:36] eee_c has joined the channel [06:38] margle has joined the channel [06:39] lohkey has joined the channel [06:41] westg: is Object.create(EventEmitter) = new EventEmitter? [06:42] ohtogo has joined the channel [06:42] westg: === [06:44] westg: ? [06:44] stagas has joined the channel [06:45] isaacs has joined the channel [06:45] Hamms has joined the channel [06:45] westg: is Object.create(EventEmitter) = new EventEmitter? [06:46] merlin83 has joined the channel [06:46] benvie: yeah in this case [06:46] benvie: since EventEmitter has no logic in its constructor [06:46] zackattack: FATAL ERROR: v8::HandleScope::Close() Local scope has already been closed [06:47] westg: in what case would it not work? [06:47] benvie: if function EventEmitter(){ /* had stuff here */ [06:47] benvie: but it doesn't [06:47] benvie: you'd need to do [06:47] benvie: err [06:47] benvie: no [06:47] zackattack: anyone dealt with that? [06:47] benvie: Object.create(EventEmitter.prototype) [06:47] benvie: is what you want [06:47] westg: ah yea [06:48] benvie: if the constructor had logic you could mostly get the result by doing `var emitter = Object.create(EventEmitter.prototype); EvenEmitter.call(emitter)` [06:48] jergason has joined the channel [06:48] benvie: although there's some edge cases that don't work right when doing it that way, but most stuff does [06:48] benvie: moot pointer with event emitter though [06:49] graeme_f has joined the channel [06:50] ditesh|cassini has joined the channel [06:52] ph^ has joined the channel [06:52] icewhite_ has joined the channel [06:54] bnoguchi has joined the channel [06:54] ningu has joined the channel [06:56] superjoe has joined the channel [07:03] maletor has joined the channel [07:06] daglees has joined the channel [07:06] socketio\test\79 has joined the channel [07:06] RobWC has joined the channel [07:07] RobWC has left the channel [07:07] tornad has joined the channel [07:07] zackattack: SubStack: have you ever dealt with the handlescope fatal error? [07:07] margle has joined the channel [07:09] niloy has joined the channel [07:10] niloy_ has joined the channel [07:15] Guest95358 has joined the channel [07:15] Guest95358 has left the channel [07:15] Guest95358 has joined the channel [07:15] SamuraiJack has joined the channel [07:18] shinuza has joined the channel [07:18] tdegrunt has joined the channel [07:19] incon has joined the channel [07:23] bvmount has joined the channel [07:25] gavin_huang has joined the channel [07:27] bnoguchi has joined the channel [07:28] bnoguchi has left the channel [07:28] icewhite has joined the channel [07:29] shinuza has joined the channel [07:29] Morkel has joined the channel [07:31] copongcopong has joined the channel [07:34] dve has joined the channel [07:36] dve has joined the channel [07:37] mehlah has joined the channel [07:37] jetienne has joined the channel [07:40] meso_ has joined the channel [07:40] upstream has joined the channel [07:43] davidbanham has joined the channel [07:45] jetienne has joined the channel [07:45] tonist has joined the channel [07:49] emattias has joined the channel [07:52] andrey-it has joined the channel [07:52] ccare has joined the channel [07:52] icewhite has joined the channel [07:52] dannyamey has joined the channel [07:53] emattias has joined the channel [07:53] stalled has joined the channel [07:53] jomoho has joined the channel [07:54] stagas has joined the channel [07:54] andrey-it: How is stdin and stdout is implemented on Windows? Maybe, someone knows where corresponding source file is so that I could explore it by myself [07:55] strager has joined the channel [07:55] `3rdEden has joined the channel [07:55] benvie: http://stackoverflow.com/questions/5115569/c-win32-api-getstdhandlestd-output-handle-is-invalid-very-perplexing [07:55] groom has joined the channel [07:59] garrensm_ has joined the channel [07:59] porco has joined the channel [08:00] jergason has joined the channel [08:00] pvankouteren has joined the channel [08:01] simenbrekken has joined the channel [08:01] pVi has joined the channel [08:01] fangel has joined the channel [08:02] Hanspolo has joined the channel [08:02] aliem has joined the channel [08:02] rendar has joined the channel [08:03] ablomen has joined the channel [08:04] josh-k has joined the channel [08:05] criswell has joined the channel [08:06] ph^ has joined the channel [08:06] nerdy has joined the channel [08:07] mikeal has joined the channel [08:07] gorekee has joined the channel [08:07] Onkeltem: Hi all. How `npm ls` is depending on the location it was invoked from? [08:07] thalll has joined the channel [08:08] michaelhartau has joined the channel [08:09] Onkeltem: If I do `npm ls` in $home, it prints packages from ~/.npm, but if I do it from a directory with package.json, it 1) prints error messages about missing packages (unmet dependencies) and 2) doesn't see packages from ~/.npm [08:09] spolu has joined the channel [08:11] Onkeltem: If I do 'npm install' it downloads needed packages and places them in the subdir `node_modules`. [08:11] Onkeltem: But why, is it ok? Shouldn't they all go into ~/.npm? [08:11] superjoe: Onkeltem, what are you trying to do? [08:12] tdegrunt has joined the channel [08:12] mraleph has joined the channel [08:12] isaacs: Onkeltem: it never shows packages from ~/.npm [08:13] isaacs: Onkeltem: do you mean ~/node_modules, maybe? [08:13] icewhite has joined the channel [08:13] isaacs: Onkeltem: ~/.npm is a cache folder, you can throw it away if you want. [08:13] Onkeltem: isaacs: yes, ~/node_modules [08:13] isaacs: Onkeltem: read through `npm faq` [08:13] isaacs: Onkeltem: and `npm folders` [08:13] Onkeltem: superjoe: well, I've got some node.js app and gonna launch it. It was failing because of unmet deps. So i firstly decided to install needed packages by hand, via `npm install ` [08:13] isaacs: er, `npm help folders` [08:14] gavin_huang has joined the channel [08:14] isaacs: Onkeltem: you should install them in the root of the project that needs them [08:14] superjoe: Onkeltem, put the dependencies in package.json and then use npm link [08:14] isaacs: Onkeltem: usually not right in your home dir. [08:14] isaacs: npm link is advanced juju :) [08:14] pVi has left the channel [08:14] Onkeltem: isaacs: Ok I see. In the docs you say: Global and Local install. I misinterpreted this thinking Local means Home [08:14] deeprogram has joined the channel [08:16] jmhurley has joined the channel [08:17] Onkeltem: superjoe: so if I use for example express in more then one project, then `npm link` is the way to not get copy of the express in every project, right? [08:18] hz has joined the channel [08:18] superjoe: Onkeltem, you have to get a copy of every dependency, that's the way npm works [08:19] hipsterslapfight has joined the channel [08:19] Onkeltem: superjoe: er.. doesn't npm linking mean symlinking? :) [08:19] benjixx has joined the channel [08:19] superjoe: no [08:19] superjoe: well yes [08:19] Onkeltem: :) [08:19] superjoe: read the docs [08:19] orkz has joined the channel [08:19] Onkeltem: superjoe: ok [08:22] c0smikdebris has joined the channel [08:23] icewhite has joined the channel [08:25] isaacs: Onkeltem: yes, npm link uses symlinks [08:25] isaacs: Onkeltem: which increases complexity a bit, but also convenience [08:27] [AD]Turbo has joined the channel [08:27] [AD]Turbo: hi there [08:28] felixge_ has joined the channel [08:28] felixge_ has joined the channel [08:28] erikzaadi has joined the channel [08:29] littlejim84 has joined the channel [08:29] tokumine has joined the channel [08:32] porco has joined the channel [08:33] dpino has joined the channel [08:34] maqr has joined the channel [08:35] nerdfiles1 has joined the channel [08:36] Kaco has joined the channel [08:37] kylebt has joined the channel [08:37] garrensmith has joined the channel [08:38] shinuza has joined the channel [08:38] jkridner has joined the channel [08:39] pradeepbv has joined the channel [08:39] bergie has joined the channel [08:39] braoru has joined the channel [08:39] stonebranch has joined the channel [08:39] robhawkes has joined the channel [08:40] ryan_stevens has joined the channel [08:40] felixhummel has joined the channel [08:40] merlin83 has joined the channel [08:41] niloy has joined the channel [08:41] niloy_ has joined the channel [08:42] gasbakid has joined the channel [08:42] stafamus has joined the channel [08:42] vanne has joined the channel [08:43] johnhamelink has joined the channel [08:44] yumike has joined the channel [08:45] rio{ has joined the channel [08:45] dve has joined the channel [08:45] c0smikdebris has joined the channel [08:45] snearch has joined the channel [08:47] eddyb has joined the channel [08:47] Kaco has left the channel [08:48] josh-k has joined the channel [08:48] gasbakid has joined the channel [08:49] Topcat has joined the channel [08:49] Vespakoen has joined the channel [08:49] lzskiss has joined the channel [08:51] rudolfrck has left the channel [08:51] tomasztomczyk has joined the channel [08:51] stagas: isaacs: sometimes in windows I have to do `npm install` a few times until it installs everything ok [08:53] stagas: isaacs: but other than that it plays nicely [08:54] Vennril has joined the channel [08:54] Morkel has joined the channel [08:54] gasbakid__ has joined the channel [08:55] josh-k has joined the channel [08:56] Aiden has joined the channel [08:57] graeme_f has joined the channel [08:58] bicranial has joined the channel [08:59] joaojeronimo has joined the channel [08:59] sreeix has joined the channel [09:00] mohiam has joined the channel [09:00] Murugaratham has joined the channel [09:01] Hamms has joined the channel [09:02] tornad has joined the channel [09:03] benjixx_ has joined the channel [09:03] stonebranch has joined the channel [09:03] hipsterslapfight has joined the channel [09:07] yumatov has joined the channel [09:09] stagas has joined the channel [09:09] dobber has joined the channel [09:09] ph^ has joined the channel [09:09] replore__ has joined the channel [09:10] replore_ has joined the channel [09:10] kylebt has joined the channel [09:10] replore__ has joined the channel [09:10] Tricks_ has joined the channel [09:11] GodezInc has joined the channel [09:11] ph^ has joined the channel [09:12] rio{ has joined the channel [09:12] adambeynon has joined the channel [09:13] bnoguchi has joined the channel [09:13] aranw has joined the channel [09:13] whitman has joined the channel [09:14] icebox has joined the channel [09:15] bnoguchi has left the channel [09:16] rlidwka has joined the channel [09:16] isaacs: stagas: sounds like a bug [09:16] mraleph has joined the channel [09:17] ph^ has joined the channel [09:17] jetienne has joined the channel [09:18] jeffmess has joined the channel [09:19] HardFu has joined the channel [09:19] stagas: isaacs: I'll send you a log if it happens again [09:19] isaacs: k [09:19] Morkel has joined the channel [09:20] jabbslad has joined the channel [09:22] shinuza has joined the channel [09:23] paera has joined the channel [09:23] paera has left the channel [09:25] salva has joined the channel [09:25] garrensm_ has joined the channel [09:27] radiodario: morning [09:27] diverdude has joined the channel [09:28] copongcopong has joined the channel [09:28] maritz has joined the channel [09:29] pid1 has joined the channel [09:30] Vainoharhainen has joined the channel [09:33] shinuza has joined the channel [09:35] zackattack: let's say i through an exception in one of my express app routes. how could that potentially screw with my app's behavior? [09:35] EuroNerd has joined the channel [09:36] bicranial has joined the channel [09:36] kwmiebach has joined the channel [09:36] astropirate has joined the channel [09:37] vanne has left the channel [09:39] aaronmcadam has joined the channel [09:39] bergie has joined the channel [09:39] rlidwka: zackattack: it couldn't, express catches all exceptions in routes automatically [09:39] maritz: zackattack: afaik if you don't define an error handling route it'll rethrow [09:40] maritz: rlidwka: but only if you include the exception middleware, right?! [09:40] dshaw_ has joined the channel [09:40] zackattack: ooooh [09:40] __doc__ has joined the channel [09:40] rlidwka: but if you throw something in nested callback, you will get problems :) [09:41] kylebt has joined the channel [09:41] kuya has joined the channel [09:42] rlidwka: zackattack: by default it will just stop current route function (and send an error to user in dev. mode) [09:42] zackattack: huh [09:42] rlidwka: oops... i answered to maritz: [09:44] vguerra has joined the channel [09:44] zackattack: omg [09:44] joshgillies has joined the channel [09:44] zackattack: yes, it totally screwed up my socket io conn [09:44] wingie: anyone here knowing how to create a proper md5 hash of a file like http://upload.wikimedia.org/wikipedia/en/a/a9/Logitech_logo.png [09:44] zackattack: i need to get the exception handling middleware [09:44] zackattack: wingie: hashlib [09:44] wingie: im using crypto.createHash('md5').update(file).digest("hex"); but i can't get it to be 4a82d10503d5a9b15aa60decf1555cd0 [09:44] wingie: it should be 4a82d10503d5a9b15aa60decf1555cd0 [09:44] wingie: according to my CDN [09:45] zackattack: sec.. lemme demo [09:45] kuya has joined the channel [09:46] gasbakid has joined the channel [09:47] bicranial_ has joined the channel [09:47] zackattack: var fs = require('fs'); var hashlib=require('hashlib'); fs.read('image.png', function(err,data){ console.log(hashlib.md5(data); }); [09:48] zackattack: put another ) after the last data [09:48] wingie: zackattack: can't crypto be used? [09:48] kuya has joined the channel [09:48] zackattack: i guess, i like hashlib? [09:48] maritz: zackattack: actually rlidwka was right. it will not rethrow and it should especially not screw with socket.io. i'm guessing there's something else wrong [09:48] wingie: ill test and see what hash i get [09:48] zackattack: maritz: you think so? O_O [09:49] maritz: yes [09:49] sandfox has joined the channel [09:49] johnhamelink has joined the channel [09:49] zackattack: well the exception's def being thrown inside my callback. [09:49] zackattack: is that gonna be a problem? [09:50] pp01bit has joined the channel [09:50] zackattack: @rlidwka it's definitely being thrown inside a nested callback [09:50] rlidwka: zackattack: http://pastebin.com/raw.php?i=BdEqeWEU [09:50] maritz: wingie: don't use hashlib unless you don't care about using package.json to get your dependencies. [09:51] zackattack: rlidwka: why didn't you put parens after throw? [09:51] maritz: zackattack: exceptions in callbacks are always a problem [09:51] zackattack: how can i handle them? [09:51] zackattack: they aren't getting thrown to my console [09:51] maritz: that's why it's common to just callback(err, result) [09:52] rlidwka: zackattack: hm... I use coffeescript and just almost forgot about js syntax :) [09:52] zackattack: haha :) [09:52] eldios has joined the channel [09:52] zackattack: maritz: sorry, i can't make the jump? [09:52] zackattack: to callback(err, result)? [09:52] gasbakid has joined the channel [09:53] wingie: how do i read an image? fs.readFileSync(path); will do? [09:53] maritz: wingie: yes [09:53] tisba has joined the channel [09:53] maritz: zackattack: what? [09:53] zackattack: nvm [09:53] maritz: wingie: unless you wan non-blocking code. then it won't. [09:54] maritz: *want [09:54] zackattack: so maybe i should just do... [09:54] zackattack: process.on('uncaughtException'), fn [09:55] garrensmith has joined the channel [09:55] wingie: maritz: you mean if i don't want unblocking code [09:56] maritz: zackattack: no. especially because that's probably going to be removed. (or is it already in 0.7.x? [09:56] wingie: can't get why the process hangs up when i skip 'utf-8' [09:56] maritz: wingie: no, i mean if you want non-blocking code you'll have to use readFile instead of readFileSync [09:56] wingie: yeah [09:57] hackband has joined the channel [09:57] hellp has joined the channel [09:57] maritz: well, what do you do with the var it returns? [09:58] maritz: (hint: gist it) [09:59] mraleph has joined the channel [09:59] c0smikdebris has joined the channel [10:00] maritz: wingie: btw: the md5sum of your image seems to be d88689940[...] [10:00] jimmysparkle has joined the channel [10:01] wingie: yeah im getting that one too [10:01] robi42 has joined the channel [10:01] wingie: don't get why rackspace is sending me another one [10:01] herbySk has joined the channel [10:01] wingie: perhaps i have to specify content-type [10:02] benjixx has joined the channel [10:04] kejun has joined the channel [10:04] [[zzz]] has joined the channel [10:05] eddyb: my latest project: https://github.com/eddyb/KateSyntax.js [10:05] Kaco has joined the channel [10:05] cosmincx has joined the channel [10:07] josh-k has joined the channel [10:11] maritz: eddyb: input code and get styled html? [10:11] maritz: (showing highlighted code) [10:11] maritz: not sure if i understand that correctly from the readme [10:13] crescendo: What's the up-to-date method of installing node.js on CentOS? [10:13] TomY has joined the channel [10:14] stagas has joined the channel [10:15] ryan_stevens has joined the channel [10:16] kylebt has joined the channel [10:20] wingie: when should i use fs.readSync() vs fs.readFileSync() ? [10:20] markwubben has joined the channel [10:20] wingie: the file uploaded to my CDN is corrupted when using fs.readFileSync() [10:22] joshgillies has joined the channel [10:23] maritz: oh, connect 2.0.0 npm published 16 hours ago. nice. :) [10:24] tuhoojabotti: Yes [10:24] skylamer` has joined the channel [10:24] gwing has joined the channel [10:25] larsschenk has joined the channel [10:27] sugyan has joined the channel [10:28] eddyb: maritz: yes [10:29] eddyb: I have to go to school, that readme was a quick job [10:29] Jitu has joined the channel [10:29] arvidkahl has joined the channel [10:29] maritz: eddyb: seems awesome. but why Kate? :/ [10:30] eddyb: because Kate's highlighting is awesome, and the definitions are easy to parse [10:30] maritz: wouldn't something that is more widely used make more sense because there'll be more templates for it?! [10:30] DrPheltRight has joined the channel [10:30] maritz: (as in different colour palette templates, not language templates) [10:32] larsschenk has left the channel [10:34] parshap has joined the channel [10:34] McMAGIC--Copy has joined the channel [10:36] garrensm_ has joined the channel [10:37] Fannon has joined the channel [10:42] ph^ has joined the channel [10:43] arduix has joined the channel [10:44] fermion has joined the channel [10:44] stagas has joined the channel [10:46] jgaui_ has joined the channel [10:47] joshgillies has joined the channel [10:48] kylebt has joined the channel [10:49] braoru has joined the channel [10:50] tokumine has joined the channel [10:54] pradeepbv has joined the channel [10:55] bobby___ has joined the channel [10:58] joshgillies has joined the channel [10:59] raphael has joined the channel [11:04] dignified has joined the channel [11:05] dekub has left the channel [11:05] zemanel has joined the channel [11:06] aklt has joined the channel [11:06] johnhame_ has joined the channel [11:08] jldbasa has joined the channel [11:09] jzaefferer has joined the channel [11:09] jzaefferer: Any recommendations for a zip module? [11:09] jzaefferer: Needs to be able to compress a folder into a zip file, that's all [11:10] jzaefferer: search.npm yields a bunch of modules without git repos, and adm-zip which doesn't quite work: https://github.com/cthackers/adm-zip/issues/1 [11:10] tdegrunt: any node module for mocking date objects, something like timecop (for ruby) - there is timecop.js, but unpublished... ? [11:11] dignified: hey all..I've got Node running on a Windows machine and can't get it to utilize more than 800Mb of ram despite having set --max-old-space-size=8000 (or any other value for that matter) [11:13] jaw187 has joined the channel [11:15] kuya_ has joined the channel [11:17] maritz: jzaefferer: i think your best bet would be to spawn a child process [11:18] jzaefferer: maritz: as in, spawn a native zip process? I'm trying to make this work cross-platform, so that doesn't seem like the best bet [11:18] pickels has joined the channel [11:20] maritz: why does it need to be zip? [11:20] zemanel has joined the channel [11:20] k1ttty has joined the channel [11:21] rlidwka: node.js does have native gzip module, I'd prefer using it [11:22] jzaefferer: that's not the question, zip is a requirement [11:22] maritz: then you'll either have to write a zip module yourself or spawn a child process [11:23] maritz: or use one of the modules that exist [11:23] maritz: wait, what was your original problem with those? [11:24] margle has joined the channel [11:25] jzaefferer: they all suck? adm-zip at least has a github repo, but doesn't even implement the addLocalFile and addLocalFolder methods it has it its example https://github.com/cthackers/adm-zip/blob/master/adm-zip.js#L116 [11:25] garrensmith has joined the channel [11:25] maritz: jzaefferer: and the other modules all suck? how did you determine that? [11:25] Blkt has joined the channel [11:28] jzaefferer: maritz: no repo or site, so no docs - one has a site link, which is "temp. unavailable" [11:28] M1l3n1um has joined the channel [11:29] jzaefferer: kriskowal's zip module does only unzip, so doesn't help either [11:29] maritz: jzaefferer: you do realize that in order for search.npmjs.org to know about github repos you have to put it into the package.json and that quite a few packages (especially those that were created before that feature was added) haven't done so?! [11:31] jzaefferer: When was that added? [11:31] maritz: i don't know [11:31] illourr has joined the channel [11:32] jzaefferer: also https://github.com/rubenv/zipper/blob/master/package.json vs http://search.npmjs.org/#/zipper [11:32] jzaefferer: its all there, yet doesn't show up in the search? [11:32] jzaefferer: well, good to know a missing link doesn't mean there's no repo [11:32] briancray has joined the channel [11:33] stagas has joined the channel [11:35] WeeJeWel has joined the channel [11:36] garrensm_ has joined the channel [11:36] jzaefferer: so zipper requires a native lib, node-native-zip doesn't implement compression m( [11:36] pickels has joined the channel [11:38] kriszyp has joined the channel [11:38] Emile has joined the channel [11:39] pgte has joined the channel [11:40] satyr has joined the channel [11:40] emile_ has joined the channel [11:40] veturi has joined the channel [11:40] braoru has joined the channel [11:41] GodezInc has joined the channel [11:41] paera has joined the channel [11:42] paera has left the channel [11:42] dehimer has joined the channel [11:44] TXH350 has joined the channel [11:44] maritz: zip is a minefield [11:44] dbrain has joined the channel [11:45] jzaefferer: I'll give zipstream a shot, that claims to use node's built-in zlib module; could build a more highlevel API (like a addLocalFolder method) around that [11:48] dec has joined the channel [11:49] dec: is it bad form to have an EventEmittor emit an event with a callback as an argument, that it expects the listener to execute? [11:49] jzaefferer: maritz: thanks for your help! [11:49] dec: I'm thinking about a generic pluggable backend/frontend setup for an application and am trying to model the communication between the backend and frontend [11:54] sven_oostenbrink has joined the channel [11:55] blubberbob has joined the channel [11:56] AD7six has joined the channel [11:56] misza222 has joined the channel [11:58] paera has joined the channel [11:58] cjroebuck has joined the channel [11:59] maritz: from the standpoint of principle i would say that an event emitter shouldn't care what is done with the event by any listener. [12:00] paera has left the channel [12:01] dec: maritz: that was my first thought - but I realised that my 'backend' 'frontend' model needs to be able to pass state between them. [12:01] deeprogram has joined the channel [12:02] Industrial has joined the channel [12:03] dec: maritz: as an example, a 'backend' database module and a 'frontend' http server module... if the frontend http server emits an event on each request asking for a response from the backend, the backend can't just listen and blindly send a response back - it needs to know which http response object to send it to [12:03] dec: wow that was terribly worded, apologies. [12:03] rlidwka has joined the channel [12:03] Industrial: I'm changing a bit of code from only accepting increaseValue(positiveNumber) to Value(positiveOrNegativeNumber), but I have no idea what to call the method. [12:04] Industrial: apply, I guess :S [12:04] maritz: why are you asking for a response with an event emitter? [12:05] Juan77 has joined the channel [12:05] rauchg has joined the channel [12:05] maritz: Industrial: setValue?! [12:06] fluk3 has joined the channel [12:06] c0smikdebris has joined the channel [12:06] fluk3 has left the channel [12:06] dec: maritz: is that not a similar concept to the builtin http module emitting a 'request' event and wanting a listener to action the response object it's passed? [12:07] skylamer`: when im upadting the embed doc through a some model in mongoose, how to make to just update the embed docum, and not the whole doc,? [12:07] maritz: dec the http server doesn't care what you do with the request/response though [12:07] Industrial: maritz: no, it doesnt set. it increases or decreases [12:07] Industrial: so, just '+', effectively :P [12:08] TomY has joined the channel [12:08] maritz: add?! [12:08] maritz: that's what + stands for, right?! :P [12:09] whaley has joined the channel [12:09] Industrial: never mind :) [12:10] dec: maritz: hmm, well then damnit I'm lost. :) [12:11] garrensmith has joined the channel [12:11] maritz: why don't you just call your backend function and pass a callback?! [12:12] dec: maritz: that's what I started doing before I got sidetracked on emitting events - perhaps I was right the first time... [12:14] Skaag has joined the channel [12:14] gasbakid has joined the channel [12:15] Kiryaka has joined the channel [12:15] Kiryaka: Hello~ [12:15] Kiryaka: I'm having a weird issue with socket.io + nodejs [12:15] maritz: me too :( [12:16] Kiryaka: I'm sending custom events using websockets (not socket.io-client), the problem is that even if node event emitter receives the event once [12:16] Kiryaka: it triggers the content of my function twice [12:17] Kiryaka: Can't find the origin of the problem, like I said : when loggin incoming events, I only receive one [12:17] satyr has joined the channel [12:17] chirag has joined the channel [12:17] Joeysomo has joined the channel [12:18] isufy has joined the channel [12:18] Joeysomo has joined the channel [12:23] icebox has joined the channel [12:23] enmand has joined the channel [12:24] texinwien has joined the channel [12:24] BruNeX has joined the channel [12:26] fairwinds has joined the channel [12:28] cjm has joined the channel [12:30] jeffmess has left the channel [12:31] incon has joined the channel [12:31] spolu has joined the channel [12:35] dannyamey has joined the channel [12:35] zemanel has joined the channel [12:35] kitt has joined the channel [12:37] garrensm_ has joined the channel [12:37] Irshad has joined the channel [12:39] jamescarr has joined the channel [12:39] MartinCleaver has joined the channel [12:39] felixge has joined the channel [12:41] felixge_ has joined the channel [12:41] felixge_ has joined the channel [12:43] felixge_ has joined the channel [12:43] felixge: rauchg: ping [12:43] felixge: rauchg: are you familiar with this error: "The connection to ws://91.65.245.141:8080/socket.io/1/websocket/348791385213242711 was interrupted while the page was loading." ? [12:43] rauchg: weird [12:44] rauchg: sounds like network errors [12:44] rauchg: can you reproduce it ? [12:45] dannyamey has joined the channel [12:45] felixge: rauchg: yeah [12:45] rauchg: how [12:45] felixge: rauchg: well, I'm getting it when the websocket connection is re-established after I turn wifi off and on (using my new patch) [12:45] rauchg: oh [12:45] rauchg: so isn't that a diagnostic message ? [12:45] felixge: rauchg: that being said … it seems like IRC is actually connecting to my machine when this happens and does a portscan on me [12:45] rauchg: identd ? [12:46] aranw has joined the channel [12:46] tvw has joined the channel [12:46] felixge: rauchg: I get a http connection with this req.url = 'http://vlad-tepes.bofh.it/freenode-proxy-checker.txt' [12:46] felixge: I'll try to quit IRC for next test [12:46] felixge: rauchg: but anyway, the error comes after the re-connect [12:47] felixge: so it seems like the first re-connection attempt after wifi is back fails for some reason [12:47] felixge: will let you know more once I do [12:47] felixge: brb [12:48] dannyame_ has joined the channel [12:48] kevbook has joined the channel [12:48] robi42 has joined the channel [12:49] ramitos has joined the channel [12:49] Fannon has joined the channel [12:50] kevbook: hi, new to node - come from php world, in php , php generates runtime errors during script execution and classifies as WARNING, ERROR etc (kind of like Syslog) -- how does runtime error work in node? [12:50] rlidwka: it just crash xD [12:50] benvie: you have more control over it, stderr generally by default [12:50] benvie: which you can listen to if you so choose [12:50] felixge has joined the channel [12:50] felixge has joined the channel [12:51] benvie: it won't crash on the equivelent of a php warning [12:51] eee_c has joined the channel [12:51] benvie: and it won't if you listen to process.on('uncaughtException'_ [12:52] felixge: rauchg: ok, I think it's just some WebSocket error that can't be caught [12:52] felixge: rauchg: wrapping a try…catch along the highlighted code does nothing [12:52] felixge: rauchg: https://github.com/LearnBoost/socket.io-client/blob/master/lib/transports/websocket.js#L66 [12:52] felixge: trying in chrome now [12:52] felixge: (tried ff so far) [12:52] rauchg: yeah looks like something meant for the dev [12:52] kevbook: ok so i can catch it on- process.on('uncaughtException'_ , and then im using connect , use connect logger to log it [12:53] hellp has joined the channel [12:53] felixge: rauchg: anyway, good news is my patch will probably be simple / easy [12:53] felixge: :) [12:53] benvie: er that was a typo [12:53] benvie: process.on('uncaughtException', function(err){ console.log(err) }) [12:53] kevbook: i just dived into node this week [12:53] aranw has joined the channel [12:53] benvie: typo on my part [12:53] felixge: rauchg: (brb, still got to turn wifi on/off a few times) [12:54] icebox: benvie: usually I log err.stack [12:54] benvie: yeah [12:54] benvie: process.on('uncaughtException', function(err){ console.log(err.message, err.stack) }) [12:54] rlidwka: kevbook: just wrap your code that throws exceptions with try..catch [12:54] benvie: or just err.stack [12:54] felixge has joined the channel [12:54] felixge: rauchg: ok, no weird warnings in Chrome [12:54] benvie: yeah preferably you do that [12:54] ithildin has joined the channel [12:54] kevbook: ok [12:54] benvie: most code in js won't throw and you'll need to know hat stuff does [12:54] felixge: rauchg: other Q: When a client re-connects after being disconnected, is it supposed to get the same client id again? [12:54] benvie: but it should usually be scoped bits [12:55] broofa has joined the channel [12:55] rauchg: felixge nop [12:55] rauchg: new session id [12:55] felixge: rauchg: cool, that's what happens [12:55] felixge: rauchg: I should have something for you to look at in a bit [12:56] benvie: this gist has a little trick you can do to get really deep introspection at any time in V8 [12:56] benvie: https://gist.github.com/1846549 [12:56] timoxley has joined the channel [12:56] benvie: it's like error.stack before serialization [12:56] garrensmith has joined the channel [12:56] rickibalboa has joined the channel [12:56] rauchg: felixge nice! [12:56] kevbook: thank you [12:58] erichynds has joined the channel [12:58] ramitos has joined the channel [12:58] c0smikdebris has joined the channel [12:59] rauchg: benvie [12:59] benvie: hey [12:59] rauchg: more info here http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi [12:59] garrensm_ has joined the channel [13:00] yawNO has joined the channel [13:00] benvie: the v8 debugging stuff is great [13:00] yawNO: o/ [13:01] benvie: so who killed catb0t [13:01] benvie: where is the body [13:01] Cromulent has joined the channel [13:02] DamienDeVille has joined the channel [13:02] pvankouteren has joined the channel [13:02] rlidwka: benvie: not so great... I dont see any linenumber-mapping stuff there :( [13:02] benvie: hmm [13:02] benvie: I thought it had it [13:05] qsobad has joined the channel [13:05] TomY has joined the channel [13:06] shinuza has joined the channel [13:06] redir has joined the channel [13:07] qsobad has joined the channel [13:07] QaDeS has joined the channel [13:11] hackband_ has joined the channel [13:12] felixge has joined the channel [13:12] felixge has joined the channel [13:14] felixge: oh noes, where did rauchg go ? ( [13:14] felixge: :( [13:14] arvidkahl: ab-g-raucht [13:15] arvidkahl: entschuldigung. [13:15] zackattack has joined the channel [13:15] yawNO has joined the channel [13:16] felixge: lol [13:16] thinkt4nk has joined the channel [13:17] mmalecki: [13:17] arvidkahl: [13:17] arvidkahl: :D [13:18] bnoordhuis has joined the channel [13:20] kriszyp has joined the channel [13:23] skylamer`: x:) [13:23] brianseeders has joined the channel [13:25] fumanchu182 has joined the channel [13:25] fumanchu182 has joined the channel [13:26] Chel has joined the channel [13:26] crutex has joined the channel [13:26] kriszyp has joined the channel [13:27] nibblebot has joined the channel [13:28] plutoniix has joined the channel [13:30] garrensmith has joined the channel [13:30] al3xnull has joined the channel [13:30] thurmda has joined the channel [13:31] mandric has joined the channel [13:31] teslan: while i could be out of a need hallucinating ;) was there maybe a discussion here a few days back by which one could create/attach/not sure what, a pice of html that effectively side steps around the same origin problem ... from html/javascript code in a couchapp elsewhere, I need to do simple things like search youtube api but NADA outside of jsonp ... am i hallucinating or is there a way, if i recall correctly an advertent back-door that [13:31] eldar has joined the channel [13:32] raphaelT_ has joined the channel [13:33] TomY has joined the channel [13:33] f1gm3nt has joined the channel [13:34] Cromulent has joined the channel [13:36] Kiryaka: Hey. Anyone who really knows how socket.io works ? [13:36] Kiryaka: I'm having some weird issue when connected with default websocket transport... It emits the event twice [13:37] petschm has joined the channel [13:37] rio{ has joined the channel [13:37] Kiryaka: It's really stange because wherever I look, the emit method is called once. [13:37] Kiryaka: It look likes there's some weird mechanism _inside_ it that make it repeat [13:38] benvie: it's **in** the computer? in's in the computer! it's so simple [13:40] yawNO: how can ([].length > 0) be faster than ([].length) [13:40] vanne has joined the channel [13:40] yawNO: o.O [13:40] pendlepants has joined the channel [13:40] arvidkahl: lol benvie :D [13:40] jimmysparkle has joined the channel [13:40] arvidkahl: i would not have expected a quote from that movie here [13:42] rauchg has joined the channel [13:43] vbabiy has joined the channel [13:43] pradeepbv has joined the channel [13:45] bkaney has joined the channel [13:46] rlidwka: yawNO: http://jsperf.com/length-oxij [13:47] rlidwka: it cannot [13:47] philips has joined the channel [13:47] joshfinnie has joined the channel [13:47] braoru has joined the channel [13:48] pradeepbv_ has joined the channel [13:48] yawNO: rlidwka: http://jsperf.com/compare-vs-not [13:48] rlidwka: poor mozilla's js engine... it always sucks at these tests :( [13:48] Fabryz: hello, I have an USB device, is there anything reliable to read serial stream with node? [13:48] Fabryz: https://github.com/schakko/node-usb this? [13:48] yawNO: of course that returns false [13:50] JoshJensen has joined the channel [13:51] heavysixer has joined the channel [13:51] nibblebot has joined the channel [13:51] diva has joined the channel [13:52] vkareh has joined the channel [13:52] sreeix has joined the channel [13:52] rlidwka: yawNO: http://jsperf.com/compare-vs-not/2 [13:52] rlidwka: o_O [13:54] yawNO: rlidwka: this is weird [13:54] yawNO: :| [13:54] yawNO: but hey, thanks.. you supported my idea.. [13:54] yawNO: it seemed impossible that a comparison was faster than a native operation on 0 [13:54] yawNO: which is treated as false [13:54] oht has joined the channel [13:54] EhevuTov has joined the channel [13:55] Fabryz: no one ever tried to use node.js with a PS3 USB controller? [13:55] maritz: yawNO: so, everything went as expected?! [13:55] garrensm_ has joined the channel [13:55] yawNO: maritz: yup [13:56] eldar has joined the channel [13:56] c4milo has joined the channel [13:56] mukul has joined the channel [13:56] rlidwka: maybe "a.length > 0" is optimized by compiler as a always numeric operation but "a.length" is not [13:57] boehm has joined the channel [13:58] jaw187 has joined the channel [13:58] yawNO: WAIT A SEC [13:58] yawNO: i read it the wrong way [13:58] yawNO: it shows indeed that a.length > 0 is faster [13:58] yawNO: oh crap [13:58] yawNO: :< [13:58] yawNO: *me fails* [13:59] arvidkahl: *hug* :D [13:59] pgte has joined the channel [14:00] paera has joined the channel [14:00] paera has left the channel [14:00] piscisaureus_ has joined the channel [14:01] fairwinds has joined the channel [14:01] kitt has joined the channel [14:01] looopy has joined the channel [14:03] garrensmith has joined the channel [14:03] garrettwilkin has joined the channel [14:04] LBRapid has joined the channel [14:06] ovnicraft has joined the channel [14:08] phidah has joined the channel [14:08] hotchkiss has joined the channel [14:09] phidah has joined the channel [14:09] lduros has joined the channel [14:09] lduros has joined the channel [14:11] felixge: 15 [14:11] ts__ has joined the channel [14:12] jxie has joined the channel [14:12] ferai has joined the channel [14:13] BruNeX has joined the channel [14:14] zorzar has joined the channel [14:14] _th_n has joined the channel [14:15] DarkSmith has joined the channel [14:16] jmar777 has joined the channel [14:16] sharkbird has joined the channel [14:16] qsobad has joined the channel [14:16] sharkbird_ has joined the channel [14:17] beawesomeinstead has joined the channel [14:17] cjm has joined the channel [14:19] thinkt4nk has joined the channel [14:19] epokmedia has joined the channel [14:20] sandfox has joined the channel [14:21] felixge: rauchg: ping [14:21] felixge: rauchg: I added the other change you suggested: https://github.com/LearnBoost/socket.io-client/pull/394#issuecomment-4237768 [14:22] thomblake has joined the channel [14:22] thomblake has left the channel [14:23] _ralph has joined the channel [14:23] riebel has joined the channel [14:24] eee_c has joined the channel [14:24] shinuza has joined the channel [14:24] eldar has joined the channel [14:25] klaemo has joined the channel [14:25] gde33 has joined the channel [14:26] apoc has joined the channel [14:26] AaronMT has joined the channel [14:26] ppcano has joined the channel [14:26] KrisJordan has joined the channel [14:27] YoY has joined the channel [14:27] apoc has left the channel [14:28] sharkbird has joined the channel [14:28] crutex has joined the channel [14:28] crutex has joined the channel [14:30] Destos has joined the channel [14:30] take_cheeze has joined the channel [14:30] RiverraiD has joined the channel [14:31] whee has joined the channel [14:32] gerard0 has joined the channel [14:34] kirbysayshi has joined the channel [14:34] sharkbird has joined the channel [14:34] sharkbird_ has joined the channel [14:34] carlyle has joined the channel [14:35] tmike has joined the channel [14:37] BillyBreen has joined the channel [14:38] rwaldron has joined the channel [14:38] mandric has joined the channel [14:38] dgathright has joined the channel [14:38] joshsmith has joined the channel [14:40] Topcat has joined the channel [14:41] c4milo has joined the channel [14:42] level09 has joined the channel [14:42] fmeyer has joined the channel [14:42] baudehlo has joined the channel [14:43] joaojeronimo has joined the channel [14:46] pp01bit has joined the channel [14:46] diva has joined the channel [14:46] devdazed has joined the channel [14:47] emilsedgh: ahm, im new to node and js. is this considered a 'wrong' way of doing things?: Object.create(require('./modem.js')) [14:47] fmeyer has joined the channel [14:48] emilsedgh: (i want an instance of modem, which obviously is exported by ./modem.js) [14:48] jmar777: emilsedgh: looks like javascript to me :) [14:48] AvianFlu: emilsedgh, require() by itself will return an object [14:48] jmar777: emilsedgh: it's probably a little more "idiomatic" to export a constructor function, but you can export whatever you want [14:48] flamboz has joined the channel [14:48] AvianFlu: I don't think you need the Object.create [14:48] emilsedgh: well, i want a new instance, AvianFlu [14:48] AvianFlu: oh, okay [14:48] radiodario: awesome nickname AvianFlu [14:48] AvianFlu: yeah, most people export something specific for that, but it's personal choice [14:49] AvianFlu: lol thanks [14:49] thetristan has joined the channel [14:49] AvianFlu: like, new require('thing').NewThing() [14:49] tmike: you could probably do "new require('./modem.js')(blah)" right? [14:50] nerdfiles1 has joined the channel [14:50] themiddleman_itv has joined the channel [14:50] tmike: I have no idea if that syntax actually works [14:50] emilsedgh: let me explain my exact issue. modem.js is an EventEmitter. i use the above technique to get different instances to it. issue is, i add listeners to different instaces of my modem.js, but when an instance of modem.js emits something, my listener gets called multiple times. [14:51] emilsedgh: (modem1 emits something, i get an event on modem2 and modem3 as well) [14:51] emilsedgh: i can paste my code if you want. [14:51] rlidwka: (new require('./modem.js'))(blah) afair... there's something weird with new keyword priority [14:51] __rockbot__ has joined the channel [14:51] tmike: rlidwka: thank you [14:51] raphaelT__ has joined the channel [14:52] fmeyer has joined the channel [14:53] hermanjunge: OFF TOPIC [14:53] emilsedgh: http://pastebin.kde.org/431330/here is my modem.js [14:53] emilsedgh: argh [14:53] hermanjunge: How do you give in english a witty retort to a topper? [14:53] emilsedgh: http://pastebin.kde.org/431330/ here is my modem.js [14:53] hermanjunge: :P [14:53] andrehjr has joined the channel [14:54] emilsedgh: here is my modem.js: http://pastebin.kde.org/431336/ and here is my application: http://pastebin.kde.org/431330/here [14:55] tmike: I think to instantiate it you'll need to export a function called createModem that does all the stuff modem.js does [14:55] ryanfitz has joined the channel [14:56] tmike: make the modem object, attach the event emitter, generate all the variables and so on [14:56] rlidwka: new(require('./modem.js'))(blah) // this works much better though :) [14:56] pVi has joined the channel [14:56] pVi has left the channel [14:56] tmike: and then you can do var modem = require('./modem.js'); var myModem = new modem.createModem() [14:56] amigojapan has joined the channel [14:57] tmike: so instead of just exporting modem, you export a function that creates modems [14:57] fmeyer has joined the channel [14:58] porco has joined the channel [14:58] tmike: much like jmar777 said above [14:58] deeprogram has joined the channel [14:58] st_luke has joined the channel [14:58] isao has joined the channel [14:59] tmike: emilsedgh: does that make sense? [14:59] emilsedgh: hm. i see. so, whole modem.js should be a single function? [14:59] emilsedgh: which also includes a constructor? [14:59] tmike: well, except for your require statement at the top, and the module.exports = at the bottom [14:59] emilsedgh: of course. [15:00] napperjabber has joined the channel [15:00] tmike: but essentially yeah, wrap the whole thing aside from your requires and exports in a function that returns modem, and then export that function [15:00] emilsedgh: and, would you please tell me if the rest of the code is partially ok? [15:01] mandric has joined the channel [15:01] mekwall: hrm... I've really run my head into the wall now [15:01] sven_oostenbrink has joined the channel [15:01] emilsedgh: i mean, im coming from a php background...i want to mae sure im not doing things in a php-way [15:01] tmike: if it runs the way you want it to, and you like looking at it, I'm sure you're fine. [15:01] emilsedgh: yeah, if i wrap that function it will work good enough i guess :p [15:02] tmike: you might, instead of doing modules.exports = createModem, do exports.createModem = createModem, just to make it clear exactly what's going on in the code that uses modem [15:02] mekwall: I am trying to monkeypatch stylus with a token tree caching. How would you approach this, where you need to create a copy of a very deep object with circular references everywhere? [15:02] emilsedgh: thanks a lot tmike. i appreciate your help :) [15:02] mekwall: I can't seem to get around the "Maxium call stack exceeded" [15:02] tmike: you're welcome [15:02] CarlosC has joined the channel [15:03] fmeyer has joined the channel [15:03] ericmuyser has joined the channel [15:03] booyaa has joined the channel [15:03] booyaa: word [15:04] tmike: pneumonoultramicroscopicvolcanoconiosis [15:04] booyaa: bless you [15:04] tmike: pneumonultramicroscopicsilicovolcanoconiosis* [15:04] ramitos has joined the channel [15:04] tmike: A word for you. [15:05] jmar777: mekwall: if you're getting that you're probably in an infinitely recursing loop [15:05] tmike: *weee* [15:05] redir has joined the channel [15:05] ramitos has joined the channel [15:05] jdeibele has joined the channel [15:06] mekwall: jmar777, not sure what would generate it though... trying to use node-clone [15:06] mekwall: jmar777, https://github.com/pvorb/node-clone/blob/master/clone.js [15:06] emilsedgh: tmike: give me a little help with this. i made createModem(). this, inside it, will now point to the current instance. how can i make it extend EventEmitter? [15:06] tmike: huh? [15:07] emilsedgh: i mean, createModem = function() {} <-- inside this fuction, 'this' already defined, how can i make it EventEmitter? [15:07] mansoor has joined the channel [15:07] jmar777: mekwall: i assume you're not using clone(parent, false)? [15:07] jmar777: mekwall: that is, your'e not setting the circular flag to false? [15:07] tmike: emilsedgh: can you write it out and paste it? [15:07] mekwall: jmar777, tried both... both exceeds the call stack [15:07] emilsedgh: sure tmike [15:08] mekwall: jmar777, only difference is that setting it to false will more or less make it instant :) [15:08] fmeyer has joined the channel [15:08] mekwall: jmar777, when it's default (true) it will take quite some time [15:08] emilsedgh: tmike: http://pastebin.kde.org/431348/ [15:08] Cromulent has joined the channel [15:08] emilsedgh: look at line 6. [15:08] jmar777: mekwall: why are you trying to monkey patch it again? what specifically are you monkey patching? [15:08] emilsedgh: im defining 'modem' as an EventEmitter. but i want to make 'this', an EventEmitter. [15:09] tmike: like in line 15, where you attach an execute function [15:09] tmike: right? [15:09] mekwall: jmar777, I need to cache the token tree that is parsed from stylus code [15:10] tmike: Are you wanting to make sure the this references in those additional functions resolve correctly? [15:10] mekwall: jmar777, comparing sha1 hashed strings to determine if it should be reparsed or if the cache can be used [15:10] robi42 has joined the channel [15:10] emilsedgh: yes. [15:10] tmike: They will. [15:10] tmike: The functions are attached to the modem object that gets returned [15:10] rlidwka: do you have any problems with github now? i'm having some troubles resolving it's dns [15:10] jmar777: mekwall: why not just fork it? [15:10] Skaag has joined the channel [15:11] tmike: github seems to be fine for me [15:11] emilsedgh: tmike: you mean, the instance i get will not be an instance of 'createModem' function, but will be an instance of modem object that gets returned? [15:11] tmike: status.github.com reports operational [15:11] mekwall: jmar777, I will when I'm successful :) [15:11] alippai has joined the channel [15:11] tmike: right; you create var modem = an event emitter [15:11] benvie: new (require('./modem').Function)(params) [15:11] tmike: and then modem.blah = function() {this.stuff} [15:11] mekwall: jmar777, anyhow.. it wouldn't make a difference :) [15:11] jmar777: mekwall: easier to do that initially. you're approach is going to be different if your'e monkey patching vs doing it inline with the original code [15:12] sven_oostenbrink has joined the channel [15:12] emilsedgh: and then the one that uses it says: var modem = new require('./modem.js'); ? [15:12] vicapow has joined the channel [15:12] jmar777: mekwall: if i understand you right, anyway [15:12] ramitos has joined the channel [15:12] tmike: so when you do var modem = new require(), you're not creating a modem object [15:12] tmike: you're getting access to the creator function [15:12] benvie: >>>works new (require('./modem').Function)(params) [15:12] purr: benvie: SyntaxError: Unexpected token new [15:12] emilsedgh: ah damn [15:12] __rockbot__: anyone have any experience with locomotive? [15:12] mekwall: jmar777, nah I'm merely doing the same stuff that's going on in the stylus binary... but with less code so its easier to work with [15:12] jaw187 has left the channel [15:12] tmike: at that point, you do something like var myModem = modem.createModem() [15:12] emilsedgh: tmike: thanks A LOT [15:12] benvie: just wrap it in parens [15:12] benvie: it works [15:13] emilsedgh: thanks a lot dudes [15:13] tmike: and myModem will be the emitter with all the extra stuff attached to it [15:13] tmike: benvie: nice [15:13] mekwall: jmar777, anyhow... it's not a problem and its not what is causing the error :( [15:13] fmeyer has joined the channel [15:13] blubberbob has joined the channel [15:13] tmike: derp [15:14] tmike: var modem = require('./modem.js') [15:14] emilsedgh: tmike: benvie, thans again, A LOT. [15:14] lazyshot has joined the channel [15:14] tmike: var myModem = modem.createModem(); [15:14] senorpedro: i try to save ~20.000 datasets via mongoskin. but i keep on getting the message: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. ... Trace: [15:14] _rockbot_ has joined the channel [15:14] benvie: >> new (Date.bind.apply(null, [1,2,3,4,5])) [15:14] purr: benvie: TypeError: Bind must be called on a function [15:14] emilsedgh: yes yes, i will make it like that [15:14] senorpedro: what is this and how can i fix it? [15:14] jmar777: mekwall: are you trying to do this at the statement level? [15:14] benvie: >> new (Date.apply.bind(null, [1,2,3,4,5])) [15:14] purr: benvie: TypeError: function apply() { [native code] } is not a constructor [15:14] benvie: woops [15:14] louissmit has joined the channel [15:15] tmike: irc: finding new ways to push horrible js on the world since the beginning of time ;) [15:15] mekwall: jmar777, nope [15:16] benvie: >> new (Function.bind.apply(Date, null, [1,2,3,4,5])) [15:16] purr: benvie: (object) Wed Feb 29 2012 15:16:27 GMT+0000 (UTC) [15:16] jscheel has joined the channel [15:17] mekwall: jmar777, a parser object is instanced for every file that has to be parsed, and it takes a string as main argument. It will then parse the string into a token tree through the lexer and return this [15:17] eldar has joined the channel [15:17] CIA-102: libuv: 03Ben Noordhuis 07master * r0459097 10/ src/unix/kqueue.c : [15:17] CIA-102: libuv: unix: fix fs_event refcount bug on darwin [15:17] CIA-102: libuv: The event loop got unref'd twice when the handle was closed. - http://git.io/qDrWOg [15:18] MartinCleaver has joined the channel [15:18] MartinCleaver has joined the channel [15:18] mekwall: jmar777, what I am trying to do is to check if there's a cached token tree available by checking the hashed string ... and if so, return that instead [15:18] CIA-102: node: 03Ben Noordhuis 07master * rebb79cd 10/ test/simple/test-fs-watch.js : [15:18] CIA-102: node: Revert "test-fs-watch: Add faster failure, and link to #2813" [15:18] CIA-102: node: This reverts commit 9a6f936c8a62c1a6edad3bda0faa8d8112b7cf92. - http://git.io/Yx0X_w [15:18] CIA-102: node: 03Ben Noordhuis 07master * rbab59f3 10/ deps/uv/src/unix/kqueue.c : uv: upgrade to 0459097 - http://git.io/mxRnYg [15:18] fmeyer has joined the channel [15:19] jmar777: mekwall: so this is at the template level? [15:19] mekwall: jmar777, from when stylus code has been parsed into a token tree :) [15:20] garrensm_ has joined the channel [15:20] mekwall: jmar777, so I guess that's at the template level? [15:20] _tors has joined the channel [15:20] jmar777: mekwall: right, but Parser(str, options) is constructed using the string representation of the template, and then .parse() returns the tokenized version [15:20] mekwall: jmar777, exactly [15:21] sharkbird has joined the channel [15:21] ryan_stevens has joined the channel [15:21] sharkbird_ has joined the channel [15:21] mekwall: jmar777, in my head.. it should be as simple as storing a copy of the tokenized version and return that instead [15:21] barberdt has joined the channel [15:22] jmar777: mekwall: essentially. does the tokenized version ever get manipulated during renders? if not you shouldn't need to copy/clone it [15:22] mekwall: jmar777, yeah it does... thats why I have to keep it in the state it is right after parse [15:23] jmar777: mekwall: what's your use case here? why not just cache the generated .css and keep stylus out of the mix completely? [15:23] pendlepants has joined the channel [15:23] jmar777: that's basically what express does when you're not in development mode [15:23] mekwall: jmar777, working with a huge framework that has to be regerated after changes are made ... but reparsing all files (even those that hasn't changed) takes close to 2 seconds [15:23] EhevuTov has joined the channel [15:23] mekwall: regenerated* [15:23] fmeyer has joined the channel [15:24] benvie: >> Function.bind.apply(Array,Array(50))().map(Function.call.bind(Number)) [15:24] purr: benvie: (object) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48] [15:24] mitzev_ has joined the channel [15:24] sharkbird__ has joined the channel [15:24] sharkbird_ has joined the channel [15:24] sharkbird has joined the channel [15:24] benvie: sweet that's a better way to make nonsparse arrays [15:24] benvie: never thought of that [15:25] benvie: join and split felt hacky [15:25] mekwall: jmar777, in production its not an issue since we will generate the css and gzip it on deploy. stylus will not even be installed on the web servers [15:25] blup has joined the channel [15:27] dannyamey has joined the channel [15:28] merlin83 has joined the channel [15:28] joshfinnie has joined the channel [15:29] fmeyer has joined the channel [15:29] mukul has joined the channel [15:29] tmike: Is there a relatively simple way to get expressjs to support logging? [15:30] dob_ has joined the channel [15:30] jmar777: tmike: express.logger()? [15:30] mekwall: tmike, what kind of logging? [15:30] tmike: just basic request/error logging, mostly. [15:31] vbabiy has joined the channel [15:31] JamieScript has joined the channel [15:31] jmar777: tmike: it should log errors by default. express.logger() should log requests [15:31] tisba_ has joined the channel [15:31] tmike: cool, thank you. [15:32] jmar777: tmike: and it's really easy to roll your own request logging: [15:32] mekwall: jmar777, so do you have any idea on how to save the state or create a clone of the token tree? [15:32] jmar777: tmike: app.use(function(req, res, next) { console.log('stuff like', req.url); next(); } [15:32] jmar777: ...); [15:32] tmike: I figured it was, but I felt like it would be easier to tie into a structure that existed if there was one [15:32] tmike: nice [15:33] JamieScript: hello guys. one small question, node is not v1.0 and also it's modules are not. so it might still be unstable and new releases make problems if you deploy something. i want to use websockets also which is not supported by most browsers yet. would you anyway risk it to create a serious web project ? [15:33] gasbakid has joined the channel [15:34] fmeyer has joined the channel [15:34] sandfox_ has joined the channel [15:34] jmar777: JamieScript: don't be shy of < 1.0 in node. any 0..x releases are stable (e.g., 0.4.x, 0.6.x) [15:34] gsmcwhirter has joined the channel [15:34] JamieScript: jmar777: so you recommend me to use it serious? because i tried it and it's amazing [15:35] jmar777: JamieScript: websockets is a different issue altogether - even in browsers that support websockets, you end up with issues with proxies hosts, so you need to know your users and environment pretty well to trust that [15:35] jmar777: JamieScript: we use it at my company :) also, lots of others do as well: https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node [15:36] rlidwka: JamieScript: about websockets: use socket.io - there are fallbacks for shitty Intenet Explorers :) [15:36] jmar777: JamieScript: just know that node is *not* one of those systems that refuses to give you enough rope to hang yourself, so read, read, read, test, test, test, etc. [15:36] JamieScript: jmar777: ok thanks :) yes websockets are dangerous for man in the middle attacks. i use socket.io [15:36] jmar777: rlidwka: yep. although the latest versions disable web sockets by default (as i recall, anyway) [15:37] JamieScript: jmar777: i only get websockets run in chrome at the moment [15:37] jmar777: rlidwka: too many issues with everything working great in development on localhost or on a subnet, and then breaking production due to crappy proxies/gateways/etc. [15:37] larsschenk has joined the channel [15:37] larsschenk has left the channel [15:38] rlidwka: JamieScript: websockets should work in latest FF with window.MozWebSocket [15:38] sandfox has joined the channel [15:38] kriszyp has joined the channel [15:38] ohtogo has joined the channel [15:39] JamieScript: jmar777: yes but if everything runs great, i think websockets are amazing. rlidwka: ok thank i'll try firefox soon. they disabled it in case of security issues for a while [15:39] spion has joined the channel [15:39] fmeyer has joined the channel [15:39] jmar777: JamieScript: as long as you're using wss:// (rather than ws://) schemes, you should be safe from man-in-the-middle attacks. same transport security as https at that point [15:40] rlidwka: it was a year ago... now there are no issues afaik [15:40] lz has joined the channel [15:40] lz has joined the channel [15:40] eldios: `3rdEden, I came first.. I'm already at installing phase with windows 8 :) [15:41] eldios: anyway yelling that "you came first" it's problably not the smartest thing to do in public.. lucky me there's no girl in here.. I suppose [15:42] senorpedro: where can this come from: using mongoskin to insert (save) 20000 entries in a mongodb i get a warning about an event emitter memory leak. does anybody know how i can fix that? [15:42] `3rdEden: eldios I already had the old version running [15:42] `3rdEden: so i'm just upgrading ;D [15:42] eldios: noooooou [15:42] FIQ has joined the channel [15:42] `3rdEden: (h) [15:43] Poetro has joined the channel [15:43] ramitos has joined the channel [15:43] sharkbird has joined the channel [15:43] eldios: I downloaded it when it went out as the very first dev release but then I installed and removed it straight away, without much proper use [15:44] fmeyer has joined the channel [15:44] EhevuTov has joined the channel [15:44] raphaelT_ has joined the channel [15:44] chrisvwebdev has joined the channel [15:45] thalll has joined the channel [15:45] skylamer`: Eldios, u like? [15:46] tjholowaychuk has joined the channel [15:46] briancra_ has joined the channel [15:46] eldios: let's wait it finishes "getting my devices ready" -_-" [15:47] eldios: at least there is a brand new boot logo [15:47] eldios: which I suppose it's only for the testing period [15:47] skylamer`: nothing better so far than Windows 8 :) [15:47] wingie: how do you calculate the content length for a HTTP request for a file? [15:48] hackband has joined the channel [15:49] tokumine has joined the channel [15:49] fmeyer has joined the channel [15:50] bizniz98 has joined the channel [15:50] loffe has joined the channel [15:50] rlidwka: are you trying to post a file to a remote server using http.get() [15:50] wingie: rlidwka: that was for me? [15:50] rlidwka: yes [15:51] wingie: rlidwka: im doing a PUT request to a CDN [15:51] Venom_X has joined the channel [15:51] wingie: it uploads the file but the content is corrupted [15:51] rlidwka: wingie: you can call fs.stat() or you can read an entire file to memory and call .length [15:51] wingie: i think it might be that i have to specify content-length [15:52] wingie: rlidwka: will that replace fs.readFileSync() entirely? [15:52] chrisvwebdev has left the channel [15:52] rlidwka: can you show your code? i smell some issues with encoding [15:53] tmcw has joined the channel [15:53] wingie: i just do fs.readFileSync(path) [15:53] wingie: without utf-8 flag [15:53] kevwil has joined the channel [15:54] wingie: rlidwka: btw its a .png image file [15:54] rlidwka: ok... and it returns a buffer. Are you casting this buffer to string anywhere? [15:54] wingie: rlidwka: no [15:54] wingie: i actually don't get what a buffer is =) [15:55] sharkbird has joined the channel [15:55] ccare_ has joined the channel [15:55] mikeal has joined the channel [15:55] wingie: rlidwka: should i cast it to string before sending it in PUT request body? [15:55] rlidwka: file = fs.readFileSync(path); file.length # <-- this will be content-length [15:56] joshthecoder has joined the channel [15:57] DuoSRX has joined the channel [15:58] wingie: still the same issue with corrupted data [15:58] wingie: even with content-length [15:58] wingie: could anyone tell me how to send an image properly in HTTP request body? [15:58] mukul has joined the channel [15:59] rlidwka: ok... you can try to work with strings only using binary encoding [15:59] bizniz98 has left the channel [15:59] raphaelT__ has joined the channel [15:59] skylamer`: put on public and give link [16:00] rlidwka: fs.readFileSync(path, 'binary') and request.write(smth, 'binary') later [16:00] andrehjr_ has joined the channel [16:00] CarterL has joined the channel [16:01] mandric has joined the channel [16:02] nibblebot has joined the channel [16:02] wingie: rlidwka: i didn't use the latter since im using mikeal/request library [16:02] wingie: skylamer`: ill put it on public [16:02] skylamer`: u can do it with sendFile [16:02] stafamus has joined the channel [16:02] wingie: skylamer`: im not on express [16:02] skylamer`: k :) [16:03] epokmedia: look in expressjs how the sendFile is done [16:03] jtsnow has joined the channel [16:03] bradleymeck has joined the channel [16:03] mukul has joined the channel [16:03] nealstewart has joined the channel [16:03] tjholowaychuk: you're going to want more than just a fs.readFile [16:03] wingie: epokmedia: k let me find that method [16:04] cesar_ has joined the channel [16:04] deeprogram_ has joined the channel [16:04] hipsterslapfight has joined the channel [16:06] jocafa has joined the channel [16:06] dob_: Hi folks. [16:06] divoxx has joined the channel [16:06] lzskiss has joined the channel [16:07] wingie: hm this was weird [16:07] dob_: Do you know any modules which solves problems like rendering tables to the gui from datasets and make them sortable? Or any examples how somebody implemented that? The way i would do it is with backbone in the frontend and a socket.io connection to get the data from the backend. [16:07] wingie: the link works .. the preview didn't on the software i was using [16:08] cjm has joined the channel [16:08] wingie: so just for the record what i did is that i used fs.readFileSync(path) and sent that in a PUT request's body .. and it works [16:08] Hanspolo has joined the channel [16:09] wingie: tjholowaychuk: what did you mean that i needed more than fs.readFile(Synch)? [16:09] woodzee has joined the channel [16:09] tjholowaychuk: wingie depends exactly what you need I guess but usually you want conditional GET support in there along with other things [16:10] tjholowaychuk: wingie https://github.com/senchalabs/connect/blob/master/lib/middleware/static.js#L100 [16:10] infynyxx has joined the channel [16:10] tjholowaychuk: definitely dont do that if you have an untrusted path [16:11] ale_ has joined the channel [16:11] wingie: tjholowaychuk: you mean that users could have some malicious code in their files? [16:11] ale_: Hello guys [16:11] paera has joined the channel [16:11] tjholowaychuk: wingie if you have GET /somefile and you're doing fs.readFile(pathname) people can just start reading whatever they want [16:12] TomY has joined the channel [16:12] ale_: I am saving the clients connected to my chat on an array...what will happen if I have 500 people on that array? Will the server collapse?? [16:12] margle has joined the channel [16:12] sorensen__ has joined the channel [16:12] wingie: tjholowaychuk: right [16:13] paera has joined the channel [16:13] wingie: this was more for uploading images to a CDN, and it won't have anything to do with GET requests [16:13] paera has left the channel [16:13] wingie: but point taken [16:13] jamund has joined the channel [16:14] gsmcwhirter: does anyone have a recommendation for a good smtp module? [16:14] gsmcwhirter: (client) [16:14] jetienne has joined the channel [16:14] rlidwka: ale_: nothing will happen, it's just 500 people, right?) [16:14] kwmiebach has joined the channel [16:15] rlidwka: ale_: but searching and removing operations will be slower than it might be [16:15] jetienne_ has joined the channel [16:15] ale_: rlidwka: yes, and if there are 5000 ? [16:15] ale_: Ok... [16:15] ale_: thanks! [16:15] ale_: but server will not collapse, right? [16:15] kriszyp has joined the channel [16:15] rlidwka: it should not [16:16] CarterL has joined the channel [16:16] devongovett has joined the channel [16:16] djbell has joined the channel [16:16] looopy has joined the channel [16:16] ale_: thanks!! [16:17] kaydara has joined the channel [16:18] bizniz98 has joined the channel [16:18] bizniz98 has left the channel [16:19] raphaelT_ has joined the channel [16:19] broofa has joined the channel [16:20] corruptmem has joined the channel [16:20] RLa has joined the channel [16:22] themiddleman_itv has joined the channel [16:22] baudehlo: bnoordhuis: ping [16:22] ddilinger has left the channel [16:23] bulatshakirzyano has joined the channel [16:23] jergason has joined the channel [16:23] RLa: is there a javascript parser for node that gives easy to traverse ast? [16:23] felixge: mikeal: yeah, it's crazy [16:23] felixge: mikeal: you don't get it when clicking the url? [16:24] bkaney has joined the channel [16:24] mikeal: fuck [16:25] felixge: mikeal: I think this happened a bunch of times in the past [16:25] felixge: mikeal: not sure if on this url, but npm spitting out this utf8 error [16:26] mikeal: might be a rewriter problem [16:26] mikeal: http://registry.npmjs.org:5984/registry/_all_docs [16:26] mikeal: yeah, i think that is actually a list view [16:26] mikeal: you need to hit http on 5984 to get the raw couchdb api for that database [16:27] jaha has joined the channel [16:27] raphaelT_: hey all! [16:27] raphaelT_: I'm trying to use mongoose on my small project [16:28] felixge: mikeal: thanks [16:28] raphaelT_: and.... I'm a little bit confused with relation between my objects [16:28] thalll has joined the channel [16:28] felixge: mikeal: ok, that works better. Hopefully now I can debug my problem with publish a new module version [16:28] tjholowaychuk: RLa: walking any AST is pretty much the same [16:28] tjholowaychuk: but [16:28] tjholowaychuk: https://github.com/ariya/esprima [16:28] mukul has joined the channel [16:29] woollybrontosaur has joined the channel [16:29] raphaelT_: is there a best practice on how to handle many-to-many with nodejs / mongoose ? [16:29] mikeal: RLa, tjholowaychuk: a lot of substack's stuff walks the AST, i know dnode does [16:29] tmike: What's the AST? [16:29] mikeal: abstract syntax tree [16:29] tmike: ah [16:30] tjholowaychuk: dnode does? weird [16:30] tjholowaychuk: I know there's that require detective thing [16:30] mikeal: substack is far too comfortable walking the AST :) [16:30] mikeal: browserfiy and his new require-in-the-browser thing do it too [16:31] RLa: tjholowaychuk, thanks for the link [16:32] jasonw22 has joined the channel [16:33] MrNko has joined the channel [16:33] kriszyp has joined the channel [16:33] jergason has joined the channel [16:34] mukul has joined the channel [16:37] CrypticSwarm has joined the channel [16:37] jmar777: tjholowaychuk: nice CMS you got there https://twitter.com/#!/davidwalshblog/status/174878795562627073 :p [16:37] Edy has joined the channel [16:38] jasonw22 has joined the channel [16:38] tobo has joined the channel [16:38] jerrysv has joined the channel [16:38] a0n has joined the channel [16:38] thinkjson has joined the channel [16:39] thinkjson: Has anyone else noticed I/O getting starved under high CPU load? [16:39] tmcw: thinkjson: are you on ec2? [16:39] thinkjson: no [16:39] a0n: whats up with npm - i can't install stuff... [16:39] tmcw: then nope, unfortunately. [16:39] thinkjson: the files sit open, but no data [16:40] thinkjson: until CPU load gets below a certain threashold [16:40] a0n: i think that npmjs.org has some trouble right now, can somebody confirm this? [16:40] tmike: does ec2 have problems with that? [16:40] fmeyer has joined the channel [16:40] alvaro_o has joined the channel [16:40] thinkjson: EBS has horrible I/O performance [16:40] tmike: good to know [16:40] tmike: s3 any better? [16:40] thinkjson: worse [16:41] tmike: thought so [16:41] jmar777: a0n: i just successfully installed something [16:41] thinkjson: you want to use ephemeral storage on EC2 [16:41] jmar777: or do a raid configuration on EBS - that'll give you better random IO [16:41] thinkjson: think of EBS like NAS - you can store stuff there to keep it safe, but you don't want your main data there if it needs to be performant [16:41] tmike: so not ebs-backed images, but store-backed images [16:41] a0n: me and the guy next to me are getting "Error: ucs {bad_utf8_character_code}: …" no matter what package we want to install [16:41] Onkeltem has joined the channel [16:41] thinkjson: and think of S3 like webdav or something like that [16:41] Kwieb has joined the channel [16:41] kaydara: i have a nodejs code that when run with only one request it works perfect, but when i run it with lots and != requests the variables become all mess up and out of roder... i believe my code isn't non-blocking enough, any good reading about nodejs and non blocking code ? [16:42] jmar777: ephemeral is far more performant... but just make sure you know that it is really ephemeral. back that jank up [16:42] tmike: aye [16:42] thinkjson: yes, RAID0 on EBS is supposed to help some [16:42] tmike: very good to know. thank you [16:42] felixge: Stay as fucking far away from EBS as you can [16:42] felixge: :) [16:42] tmike: heh [16:42] thinkjson: kaydara: sounds like scope issues [16:42] RLa: ebs also charges for io ops [16:42] jmar777: kaydara: completely random guess without seeing your code, but usually closure/scope woes [16:42] jasonw22 has joined the channel [16:43] jmar777: kaydara: read up on javascript variable scoping and closures [16:43] thinkjson: felixge: the voice of experience [16:43] tmike: I just have one micro ec2 instance that has a non-destroying ebs image, but perhaps I'll move it to an ephemeral and snapshot out or something [16:43] kaydara: ok thinkjson and jmar777 thanks [16:43] rlidwka: kaydara: no write "non-blocking" code here is quite enough to just avoid Sync methods [16:43] jmar777: felixge: what do you do as a durable alternative? [16:43] Phoenixz: Have I understood this correctly? The way it looks right now, I should use exceptions as little as possible due to many problems with the async calls, and just emit in case of errors? [16:43] felixge: jmar777: S3 [16:43] RLa: btw, for smaller installations, isn't vps (such as linode) more cost effective? [16:43] tmike: how about for couchdb? [16:43] RLa: when you do not need full "cloud" [16:43] baudehlo: also known as stay as far away from EC2 as possible if you're doing any I/O. [16:43] thinkjson: NOOOOOOOO [16:43] felixge: we tried using EBS for mysql before and it was horrible. We're not using RDS which is ol. [16:43] thinkjson: do NOT do CouchDB on EC2 [16:43] felixge: * ok [16:44] rlidwka: kaydara: but if your variables become all mess up, you should probably learn javascript :) [16:44] RLa: tmike, micro instances have horrible cpu stealing [16:44] maletor has joined the channel [16:44] tmike: they do indeed, but it has an extremely low constant [16:44] felixge: in between we used ephermal disks for mysql (with a failover standby), but that's expensive / takes more effort to manage [16:44] RLa: it steals 90% if you go over burst limit [16:44] baudehlo: and micro instances have been known to stall Node.js apps and never recover. [16:44] jmar777: felixge: what about for mongodb or something that needs a file system? we get low IOPS, but trying to not sacrifice on durability [16:44] klaemo has joined the channel [16:45] tmike: So what's a good alternative for couchdb? just suck it up and use dynamo? [16:45] baudehlo: jmar777: why not just buy hosting? [16:45] felixge: jmar777: my advise about EBS extends to mongo :) [16:45] thinkjson: tmike: Cloudant [16:45] felixge: run away from that shit [16:45] felixge: : ) [16:45] felixge: but kidding aside [16:45] thinkjson: don't run a database on EC2 ever [16:45] saikat has joined the channel [16:45] fmeyer has joined the channel [16:45] felixge: thinkjson: yeah [16:45] felixge: mostly yes [16:45] felixge: you can pull it off [16:45] tmike: (I'm cheap, and I like the fact that using you can make ec2 only cost a few bucks a month) [16:45] felixge: but it takes a good bit of ops chops [16:45] felixge: to do so [16:45] thinkjson: you could do bigcouch on ephemeral disks and hope you have enough redundancy to avoid data loss [16:45] jmar777: felixge: so would you instead replicate to several ephemeral disks? [16:46] felixge: jmar777: I think EBS is ok for mongo [16:46] felixge: as mongo is only good as long as you can keep the data set in memory [16:46] sreeix has joined the channel [16:46] felixge: if that's no longer the case, you loose anyway [16:46] klaemo: hey, what's a good way to compute the average of multiple objects with nested properties (containing only numbers of course)? [16:46] RLa: tmike, using smallest linode vps (20$/month) for projects here and i'm way more satisfied than with ec2 [16:46] BruNeX: is npm down? [16:46] baudehlo: tmike: once you start spending any money on EC2, hosting is still cheaper. [16:46] jmar777: felixge: true. IOPS slows way down when we use durable journals though :\ [16:46] thinkjson: Amazon has a guide for running MongoDB on EC2 [16:46] thinkjson: they recommend EBS in RAID0 [16:47] felixge: jmar777: determine what you need right now. [16:47] jmar777: felixge: raid seems to help our random IO reads, but not sequential writes like journals [16:47] thinkjson: RLa: you're not doing things at our scale ;-) [16:47] felixge: If you need maximum performance and durability with Mongo on Ec2, you'll need to do some work [16:47] tmike: I believe that's true, but I'm not doing anything that makes me money, just running a crappy pastebin and experimenting with stuff beyond my own network [16:47] tmike: RLa and baudehlo [16:47] Zzaichik has joined the channel [16:47] felixge: jmar777: yeah RAID is a good idea for journaled writes [16:47] BruNeX: when i try to install something with npm i'm getting - npm ERR! Error: ucs {bad_utf8_character_code}: -/all [16:47] felixge: but you're not going to get great IOPS [16:47] BruNeX: can someone help? [16:47] BruNeX: :s [16:47] jmar777: felixge: true. it's fast enough for now so we've moved on. we just know we're not exactly giving mongo it's "best chance to shine", so to speak [16:47] stephank has joined the channel [16:47] felixge: you will need dedicated hardware /disks for that [16:47] micheil has joined the channel [16:48] tmike: By crappy, I mean I actually like it quite a lot, but if I need to scale up I'll move on to something a little more effective. [16:48] jmar777: BruNeX: i got that to. is there a '-' in the repo name? [16:48] BruNeX: nop [16:48] tmike: little more effective than ec2, that is. [16:48] RLa: thinkjson, tmike, if you need more performance (more users!), you can start spending for better stuff [16:48] mukul has joined the channel [16:48] thinkjson: RLa: which means dedicated hardware, which is the route we went [16:48] BruNeX: jmar777: npm search backbone.io [16:48] jmar777: i think managed mongo replica sets on ec2 would be pretty rad (a la rds) [16:48] bindr has joined the channel [16:48] tmike: So could you just run couch on an ephemeral store and cron the db out to s3 once a minute or something? Or can you just mount s3? [16:49] jmar777: BruNeX: might be the '.' then. seems to be related to non alpha characters [16:49] thinkjson: tmike: um, no [16:49] staar2 has joined the channel [16:49] staar2: hello [16:49] jmar777: BruNeX: actually not sure about that - socket.io works for me [16:50] thinkjson: with a bigcouch cluster, you could keep it on disk, but have more tolerance for nodes going down [16:50] looopy has joined the channel [16:50] tmike: I only recently started experimenting with cloud hosting and all that, and none of this is for professional work, so I'm still just digging around to se ewhat works [16:50] ewj has joined the channel [16:50] thinkjson: tmike: felixge have learned the hard way - lots of money and sleepless nights ;-) [16:50] tmike: if I end up with 50 new documents a month I'll be surprised [16:50] tmike: lol I believe it [16:50] fmeyer has joined the channel [16:50] thinkjson: hah - we get that a second [16:50] thinkjson: actually, nix that [16:50] illourr has joined the channel [16:51] thinkjson: we get 500 reqs/sec with 1000-10000 docs/req [16:51] wasser has joined the channel [16:51] thinkjson: at peak, at leas [16:51] thinkjson: t [16:51] steveoh has joined the channel [16:51] tmike: yeah, I'm not there yet. I'm just using couchdb to host my tiny little probably-nobody-but-me-will-ever-use-it pastebin documents [16:51] thinkjson: I <3 couch [16:51] BruNeX: jmar777: weird i'm getting the same error with socket.io [16:51] BruNeX: :S [16:52] thinkjson: reinstall npm? [16:52] jmar777: i get it with `npm info connect-http-signature` [16:52] BruNeX: hmm [16:52] tmike: the pastebin was mostly to teach myself couch and express, but I do like it a lot [16:52] ekryski has joined the channel [16:52] BruNeX: thinkjson: what is the best way to reinstall npm? [16:52] BruNeX: :P [16:52] tmike: you can curl into it easy as that, and curl back out of it if you have the paste id [16:53] dshaw_ has joined the channel [16:53] wasser: hi people. i'm trying to write a node.js app that exports a function (so it can be imported) but at the same time I want it to run if i run "node module" how can i do that? [16:53] jmar777: BruNeX: `npm update npm -g` [16:53] BruNeX: thanks jmar777 [16:54] Cromulent has joined the channel [16:54] tmike: so I'm moving my couch to cloudant, thanks for the advice [16:54] Aiden has joined the channel [16:54] jaha: would socket.io be overkill for connecting a local node.js server with a locally run browser? [16:54] baudehlo: thinkjson: did you have that equation upside down? [16:55] shadowshell has joined the channel [16:55] Xinphinity has joined the channel [16:55] tmike: I'll probably leave the node instance on ec2, especially now that I don't care too much if it dies suddenly because the data's elsewhere [16:55] Kwieb has left the channel [16:55] BruNeX: is this the last version of npm? [16:55] BruNeX: npm -v [16:55] BruNeX: 1.0.105 [16:55] fmeyer has joined the channel [16:55] Xinphinity: Hey who wants first crack at a complete n00b question about using node NPM on Windows7 command prompt? [16:55] eldios: BruNeX, no [16:55] eldios: 1.1.1 [16:55] eldios: here [16:55] baudehlo: thinkjson: 500 req/sec with 1 doc per 1000 req ? Cos doing 5,000,000-50,000,000 docs/sec would be probably bigger than google scale :) [16:56] nanrehnanreh has joined the channel [16:56] blueadept has joined the channel [16:56] blueadept has joined the channel [16:56] TomY_ has joined the channel [16:56] BruNeX: 'npm update npm -g' is not updating npm to the last version :s [16:56] BruNeX: :s [16:56] micheil: anyone know what's going on with the NPM registry at the moment? [16:56] eldios: Xinphinity, don't ask to ask.. just ask =) [16:56] Xinphinity: When I try to use NPM on the node command line, for instance npm install -g express - i just get ... [16:56] eldios: BruNeX, which OS are you using? [16:57] BruNeX: osx [16:57] thinkjson: baudehlo: a more usable figure - we get ~12GB of data per month [16:57] eldios: Xinphinity, use npm -dg install express [16:57] thinkjson: our peaks are once per week for four hours [16:57] eldios: BruNeX, use rvm [16:57] thinkjson: so it's not like it's like that all the time [16:57] micheil: you may currently be getting this error on NPM: {"error":"ucs","reason":"{bad_utf8_character_code}"} [16:57] BruNeX: rvm? [16:57] Poetro has joined the channel [16:57] Poetro has joined the channel [16:57] eldios: wasn't that the software wich helps to install npm in mac? [16:57] Xinphinity: @eldios same thing when I try that. [16:57] copongcopong has joined the channel [16:57] steveoh has left the channel [16:57] BruNeX: not sure :S [16:58] BruNeX: VM is the Ruby enVironment Manager (rvm). [16:58] nanrehnanreh: @micheil We're seeing it too: Error: ucs {bad_utf8_character_code}: optimist/0.3.1 [16:58] Xinphinity: From w7 command line, I'm saying 'node', which gives me the node command line [16:58] micheil: nanrehnanreh: yeah, I think npm is having issues [16:58] baudehlo: thinkjson: yeah seems reasonable. To be fair I advise people not to use EC2, but we're using it just for easy fast access to S3. We could write our own scalable storage system (or use an open source one) but S3 is just so easy. [16:58] Xinphinity: then saying npm -dg install express and getting ... [16:58] thinkjson: baudehlo: and we probably have smaller batches than that, now that I think of it [16:58] thinkjson: but we def get 500 reqs/sec at peak [16:59] mukul has joined the channel [16:59] eldios: Xinphinity, you shouldn't be in the node REPL to call npm [16:59] Tricon has joined the channel [16:59] eldios: get out of there now :) [16:59] eldios: and just type npm -dg install express in the prompt [16:59] Xinphinity: *headdesk* [16:59] eldios: BruNeX, there you go [16:59] eldios: http://dreamerslab.com/blog/en/how-to-setup-a-node-js-development-environment-on-mac-osx-lion/ [17:00] baudehlo: thinkjson: cool. What's the service if you don't mind me asking? [17:00] thinkjson: baudehlo: I tried to replicate the db the other way. that was fun. ended up having to curl _changes to move the data, which took like 3 days [17:00] thinkjson: the Node.js piece is our distributed logging system [17:00] tmike: on cloudant, are read/write to query and add new documents, and create is for views? [17:00] thinkjson: the actual product is a mobile app called YouVersion [17:00] Xinphinity: Thanks eldios [17:00] tmike: so far as permissions on a db, that is [17:00] eldios: yw Xinphinity [17:00] jmar777: thinkjson: nice - i use that :) [17:00] thinkjson: :) [17:00] snearch has joined the channel [17:01] fmeyer has joined the channel [17:01] jmar777: thinkjson: stability has gotten much better in the last 6 months or so [17:01] thinkjson: on? [17:01] thinkjson: fetching stuff from the server? [17:01] ph^ has joined the channel [17:01] jmar777: thinkjson: Android (used it previously on my samsung galaxy, now on my Droid bionic). and yes, for server interactions [17:01] thinkjson: that's because we're dumping lots of money into infrastructure :-P [17:01] skeptic_ has joined the channel [17:02] thinkjson: it's a lot harder than you think to serve 4000 reqs/sec [17:02] jmar777: thinkjson: used to get random force closes when trying to pull in a reading plan, for example. i still get occasional timeouts, but it works after a try or two [17:02] isaacs has joined the channel [17:02] jergason has joined the channel [17:02] jmar777: thinkjson: is that peak? [17:02] thinkjson: yeah [17:02] thinkjson: Android has gotten a lot better [17:02] thinkjson: iOS gets the most love, though ;-) [17:03] jmar777: thinkjson: oh... any chance of removing the occasional (spam) notifications? lol [17:03] thinkjson: a couple weeks ago we lost a whole data center. that was fun. [17:03] jmar777: thinkjson: ouch [17:03] thinkjson: jmar777: you can opt out in settings [17:04] thinkjson: yeah. and our sysadmin was in the mountains with no cell service. :-P [17:04] mukul has joined the channel [17:04] jmar777: thinkjson: is that the "push notifications" setting? [17:04] thinkjson: yeah [17:04] jmar777: cool. thx [17:04] thinkjson: yup [17:04] isaacs has joined the channel [17:04] thinkjson: most people like those [17:04] hellp has joined the channel [17:04] thinkjson: "oh yeah, I guess I *should* actually use this thing" lol [17:05] mandric has joined the channel [17:05] benvie has joined the channel [17:05] kriskowal has joined the channel [17:05] eldios: this site is so damn hilarious --> http://wtfqrcodes.com I'm totally laughing my aRs off XD [17:06] VesQ: in what version of nodejs is npm capable of doing `npm shrinkwrap`? [17:06] fmeyer has joined the channel [17:06] rwaldron has joined the channel [17:06] christophsturm has joined the channel [17:06] AvianFlu has joined the channel [17:07] christophsturm: is node 0.8 far away? does it make sense to start testing my app on 0.7ß [17:07] isaacs: christophsturm: if you don't depend on domains or customFds, yes, it akes sense. [17:08] rauchg has joined the channel [17:08] isaacs: VesQ: 0.7.5 or 0.6.12 [17:08] thinkjson: lol [17:08] isaacs: VesQ: 0.6.12 is not released yet. [17:08] isaacs: VesQ: but you can update the npm bits separately with `npm i npm -g` [17:08] VesQ: oh, so I got excited too soon :) [17:08] benvie: where's that infamous args slice perf [17:08] mcavage has joined the channel [17:08] mukul has joined the channel [17:09] sylvinus has joined the channel [17:09] dve has joined the channel [17:09] VesQ: isaacs: I prefer not to, in order to give other people the ability to `npm install` it properly [17:09] benvie: cause the thing I'm doing now seems to be like 4x faster [17:09] jmar777: isaacs: is `i` alias for `install`? [17:09] VesQ: it's an open source project and I can't guarantee people wouldn't fail to install it [17:09] mmalecki: benvie: args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) [17:09] mmalecki: benvie: I think it was it [17:09] isaacs: jmar777: yes [17:10] benvie: sec lemme test exactly that [17:10] skylamer`: isaacs, what's the 'alias' for info ?:) [17:10] mmalecki: benvie: http://blog.izs.me/post/7746314700/benchmark-array-ification-of-arguments [17:10] jmar777: ahh, hadn't seen that. so many waisted characters i've typed... [17:10] isaacs: skylamer`: info is an alias for view [17:10] mmalecki: I always google for isaacs arguments array [17:10] skylamer`: ok :) [17:10] robi42 has joined the channel [17:11] fmeyer has joined the channel [17:11] benvie: yeah [17:11] looopy has joined the channel [17:12] benvie: it's still faster than the others but this giant block of shit I made is fast [17:12] jmar777: isaacs: i've got a patch ready to go for this, but i wanted to ask you before i bothered. should this emit('error', ...) instead of throw? https://github.com/joyent/node/blob/master/lib/net.js#L483 [17:12] c0smikdebris has joined the channel [17:12] st_luke_ has joined the channel [17:13] retornam has joined the channel [17:14] mukul has joined the channel [17:14] wendall911 has joined the channel [17:14] markdaws has joined the channel [17:15] slloyd has joined the channel [17:15] micheil: hey isaacs, is there any update as to the status of npm's registry? It appears to be down at the moment? [17:15] jmar777: isaacs: you could always defensively check if the stream is writable first, but it seems like if the network went down and you didn't handle the 'close' event properly, youd' want an error emitted [17:15] diogogmt has joined the channel [17:15] timoxley has joined the channel [17:16] fmeyer has joined the channel [17:16] isaacs: back [17:16] isaacs: micheil: it's back [17:16] micheil: isaacs: do you know what happen? [17:17] davemo has joined the channel [17:18] mukul has joined the channel [17:18] sreeix has joined the channel [17:18] jmar777: woah, is the README in `npm info` new? [17:20] ph^ has joined the channel [17:20] TXH350 has joined the channel [17:21] isaacs: jmar777: it's removed in latest [17:21] isaacs: micheil: no. reading over logs [17:21] mukul has joined the channel [17:21] fmeyer has joined the channel [17:21] shinuza has joined the channel [17:22] Phoenixz: Could anybody give me a link to a a clear and concise and correct document about javascript prototyping? I've seen some 20 documents already, half of them contradict eachother, or are just not clear about how it works.. Meanwhile, I do some tests myself and these tests contradict the documents again.. :( [17:22] ph^ has joined the channel [17:22] nathanielk: i saw one recently, let me dig it up [17:22] isufy has joined the channel [17:22] Phoenixz: Should I use var a = new Object; or var a = Object.create(Object); ? [17:22] BillbadWut has joined the channel [17:23] nathanielk: Phoenixz: i like this reference WRT objects/prototypes http://bonsaiden.github.com/JavaScript-Garden/#object.general [17:23] nathanielk: Phoenixz: it's up to you. Almost everyone uses "new". I use Object.create. [17:23] Phoenixz: nathanielk: What is the difference between them? [17:23] epokmedia: any tutorial on debugging and finding memory leaks in a node app? [17:23] nathanielk: (if you're coding for the browser, too, the latter is unsupported in ie < 9 iirc) [17:23] raenger has joined the channel [17:24] devaholic has joined the channel [17:24] nathanielk: Phoenixz: this does a good job of explaining that https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/create [17:24] nathanielk: Phoenixz: I find the latter to be far clearer. It's also been helpful at my job teaching people new to JS; otherwise, they see the "new" keyword and cannot disassociate it from classical OO [17:24] dob_: I am running a mongoose.save in a mysql row event loop. I have the problem that the save function of mongoose is called on the end of the mysql event loop. I don't understand that. If i just log the object everything works fine. [17:25] mukul has joined the channel [17:25] Phoenixz: nathanielk: I have to support browsers >= IE7.. For me, "new" is not a problem, I just want to know I am doing it right :) [17:25] nathanielk: Phoenixz: :) sure. But there's a polyfill we use for those browsers that just falls back to 'new' on that mozilla page [17:26] joshontheweb has joined the channel [17:26] nathanielk: we also, sadly, support ie >= 7 [17:26] gasbakid__ has joined the channel [17:26] fmeyer has joined the channel [17:26] hsttlrjeff has joined the channel [17:27] zaphod1984 has joined the channel [17:27] DamienDeVille has joined the channel [17:28] ryanfitz has joined the channel [17:28] simenbrekken has joined the channel [17:28] benvie: https://gist.github.com/1942749 check it [17:29] benvie: a new age of slicing [17:29] hotchkiss has joined the channel [17:29] benvie: IS UPON US [17:29] mukul has joined the channel [17:29] RLa: btw, why is slicing used at all? [17:30] RLa: or rather why it's so common [17:30] benvie: so you can use arguments as an array [17:30] jmar777: isaacs: would it be worth submitting a pull request to turn this into an emit('err'r) instead of a throw? https://github.com/joyent/node/blob/master/lib/net.js#L483 [17:30] benvie: you can only use functions that accept arraylikes [17:30] benvie: which not all do [17:30] jmar777: *('error') [17:30] RLa: oh [17:30] benvie: like [17:30] jmar777: i guess a similar question on https://github.com/joyent/node/blob/master/lib/net.js#L891 as well [17:30] benvie: [].concat(arguments) vs. [].concat([1,2,3]) [17:31] timoxley: jmar777 +1 to that, those throws drive me up the wall [17:32] fmeyer has joined the channel [17:32] isaacs: jmar777: it's an easy PR to do and submit. go for it, let's discuss there if it's a problem [17:32] jmar777: timoxley: ya. and they can be really hard to track down. mostly due to network connectivity issues in my experience [17:32] jmar777: isaacs: aight [17:32] isaacs: jmar777: i don't have that bit of code paged in right now :) [17:32] timoxley: jmar777 agree [17:33] mukul has joined the channel [17:33] QaDeS has joined the channel [17:34] timoxley: benvie nice, but will it blend [17:34] jmar777: isaacs: me neither, except for the lines that keep bricking my server :p [17:34] benvie: it pretty much dominates the others [17:35] Phoenixz: nathanielk: Thaks for the link, looks like this one is clear and concise.. [17:35] Phoenixz: Another question about inheritnace in node... I should be able to do the inheritance using util.inherit(target, source); right? [17:36] CIA-102: node: 03Bert Belder 07v8string * ra8600ea 10/ (7 files in 4 dirs): Utf8 encoder - http://git.io/yvzvFQ [17:36] CIA-102: node: 03Bert Belder 07v8string * r2257925 10/ (benchmark_utf8.js deps/v8/src/api.cc src/node_unicode.cc): Optimizations and fixes - http://git.io/zzqeHg [17:36] CIA-102: node: 03Bert Belder 07v8string * radcac38 10/ common.gypi : Compile with NDEBUG - http://git.io/SC_oDA [17:36] CIA-102: node: 03Bert Belder 07v8string * rcc16602 10/ (3 files): Erik's optimization of the v8 encoder - http://git.io/ekSi-Q [17:36] timoxley: benvie i wonder why it doesn't get optimised to that by v8 [17:36] Tricon has joined the channel [17:37] bnoordhuis: baudehlo: pong [17:37] timoxley: Phoenixz yes [17:37] benvie: I dunno, the numbers are much closer in spidermonkey [17:37] fmeyer has joined the channel [17:38] xtianw has joined the channel [17:38] baudehlo: bnoordhuis: is there any reason assigning past the end of a Buffer() does strange things, rather than being a no-op? [17:38] baudehlo: (and yes I realise "don't do that" is the right answer ;-) ) [17:39] gr-eg has joined the channel [17:39] bnoordhuis: heh [17:39] paulwe has joined the channel [17:39] bnoordhuis: what kind of behavior are you seeing? [17:39] baudehlo: basically if I do: var buf = new Buffer(3); buf[5] = 16; I get: [17:40] Phoenixz: timoxley: Question then.. http://pastebin.com/SQDFF7bH Why do I have method "ok" in object a, but not in b? [17:40] baudehlo: interestingly if I dump it first before assigning i get [17:40] bnoordhuis: baudehlo: with what version of node are you seeing this? [17:41] baudehlo: yeah, I wanted to ask first before compiling a new one... That was 0.5-pre - I'm on a slow machine so asking first was faster :) [17:41] bnoordhuis: hah, right [17:41] bnoordhuis: i'm not seeing it with the current master [17:41] mukul has joined the channel [17:41] baudehlo: ok sweet. [17:41] bnoordhuis: to wit: > var b = new Buffer(3); b.fill(0); b[5] = 16; b [17:41] bnoordhuis: [17:42] baudehlo: yeah without the b.fill(0). [17:42] fmeyer has joined the channel [17:42] yawNO has joined the channel [17:42] isao has joined the channel [17:42] trotter has joined the channel [17:42] tmcw has joined the channel [17:42] baudehlo: oh nm. It's clearly just related to not zeroing it. [17:43] baudehlo: I was testing to see if assigning past the end would do bad things or not and clearly got confused, because sometimes it would be zero'd. [17:43] devdazed: hi all, when creating a script using vm.createScript. is it possible to dump the compiled script results to a buffer or string? [17:43] baudehlo: shouldn't buffers be zero'd by default? [17:44] dilvie has joined the channel [17:44] bnoordhuis: baudehlo: no, it's too slow [17:44] devdazed: bnoordhuis: the what exactly are they filled with? [17:44] jmar777: baudehlo: if you know you're going to fill the entire buffer with real data, you want to skip that [17:45] devdazed: ive always wondered that [17:45] mukul has joined the channel [17:45] jmar777: devdazed: whatever was in that memory space before. that space has been released, but it still has whatever was there previously [17:45] bnoordhuis: devdazed: with whatever was on that part of the heap when the buffer got allocated [17:46] devdazed: that doesn't pose some sort of security issue? [17:46] jmar777: devdazed: kind of like when you delete something on your hard drive. the data is still there until you've overwritten it, you've just marked it as available [17:46] bnoordhuis: so if you store passwords in buffers, clear the buffer after you're done [17:46] tmike: I read a really neat paper a while back about using two arrays, one with what you want to store, and a second that had a bunch of pointers so you can use uninitialized arrays without fear and have constant seek time, as well as it taking zero time to reduce the length of the array back to zero again [17:46] devdazed: does it relate only to what has been in the node memory space, or the global memory space? [17:47] Phoenixz: Question about prototyping:. http://pastebin.com/SQDFF7bH Why do I have method "ok" in object a, but not in b? [17:47] Phoenixz: as in, what am I doing wrong here :) [17:47] bnoordhuis: devdazed: the answer to that question is 'it depends' (on your OS among other things) [17:47] fmeyer has joined the channel [17:48] CrisO has joined the channel [17:48] jsurfer has joined the channel [17:48] devdazed: because if it gets the resident memory from a different application, couldn't it pose a security issue? [17:48] cesars has joined the channel [17:48] pickels: Does this do what I think it does? https://gist.github.com/1942861 [17:48] timoxley: Phoenixz I don't actually know what you're trying to do, but I created a simple example that demonstrates calling super and also some inheritance http://pastebin.com/cuJwq174 [17:48] xavia has joined the channel [17:49] timoxley: gtg lunch. [17:49] Phoenixz: timoxley: If you were a girl I would kiss you.. Thanks lots! [17:49] mukul has joined the channel [17:49] pickels: It's okay to kiss a guy. [17:50] Phoenixz: pickels: Don't tempt me :) [17:50] Phoenixz: Just one more question [17:50] bnoordhuis: devdazed: it works like this, the heap at startup is not guaranteed to be zeroed so yes, it can contain data from a previous process [17:50] CrisO has joined the channel [17:50] bnoordhuis: devdazed: and vice versa, your memory might be reused by another process [17:50] CrisO has left the channel [17:50] tmike: http://research.swtch.com/sparse [17:50] Phoenixz: Why is util.inherits(B, A) done outside of the constructor function? Why not inside with util.inherits(this, A) ? [17:51] tmike: There's the paper. [17:51] bnoordhuis: devdazed: that's why you should zero out sensitive information after you're done with it [17:51] devdazed: bnoordhuis: that's an interesting thought. I'll be sure to keep it in mind while developing applications [17:51] ericmuyser has joined the channel [17:51] devdazed: bnoordhuis: does this apply only to buffers? or to all objects? [17:51] AvianFlu has joined the channel [17:52] bnoordhuis: devdazed: all objects really but buffers are the only thing you have influence on [17:52] Poetro has joined the channel [17:52] zanefactory has joined the channel [17:52] timoxley: Phoenixz because 'this' is the object you're creating, and A, B are constructors [17:52] timoxley: Phoenixz util.inherits takes constructors [17:52] exos has joined the channel [17:52] Phoenixz: timoxley: ah! thanks! [17:52] fmeyer has joined the channel [17:52] timoxley: Phoenixz np [17:53] mukul has joined the channel [17:53] satyr has joined the channel [17:53] devdazed: bnoordhuis:ok so does the http module clear buffers? so, if passwords are sent in authorization, will they be cleared? or should I be seroing out the buffer after ever data emit? [17:53] trotter_ has joined the channel [17:53] bnoordhuis: devdazed: the latter [17:53] RobWC has joined the channel [17:54] timoxley: git pull [17:54] timoxley: oops [17:54] themiddleman_itv: Anyone know if express has a way to know when res.send is done sending? Does it fire an event or something maybe? [17:54] Edy: :) [17:54] RobWC has left the channel [17:55] tmike: yay my dns finally updated my couch pointer to point at cloudant instead of my ec2 instance [17:55] epokmedia: themiddleman_itv: don't think so [17:55] mikeal has joined the channel [17:56] t0mmyvyo has joined the channel [17:56] themiddleman_itv: epokmedia: ack :( thanks [17:56] jetienne_ has joined the channel [17:56] pizthewiz has joined the channel [17:57] tdegrunt has joined the channel [17:57] epokmedia: themiddleman_itv: what do you want to do ? [17:57] epokmedia: node-inspector give me "Unexpected end of input" when i try to profile my code... anyone has the same problem ? [17:57] tobo: themiddleman_itv node gives you a "finish" event [17:57] RLa: is there any reason why functions in node api docs are not sorted by name? [17:57] dob_: on a mysql on row event i execute a function to create a mongoose object and save it to mongodb. Everything works find until i execute the myobject.save mongoose function. The save is executed after the mysql event end. I have no idea how i could change this .... Can somebody help me? [17:57] benvie: the sun never sets on npm [17:57] fmeyer has joined the channel [17:57] benvie: or when it does chaos ensues [17:58] kmiyashiro has joined the channel [17:58] tmike: tobo: that's true, you can just use the event emitter on res to watch for the stream being closed. [17:58] adamkittelson has joined the channel [17:58] RLa: dob_, what is the error [17:58] scrumlord has joined the channel [17:58] themiddleman_itv: tobo: awesome, Ill try it [17:59] mukul has joined the channel [17:59] sreeix has joined the channel [17:59] tmike: So I keep hearing that extending the prototype of standard objects, such as array,s is bad bad bad don't do it or you die [18:00] tmike: but it seems that the chat demo does it with Date() [18:00] dob_: I want that mongoose.save is executed on every mysql row event. I create the mongoose object in the event and execute the save function, but mongoose is saving all data after every mysql call has finished. The problem is that there is too much data in my RAM. [18:00] stagas: tmike: it's not bad [18:00] stagas: tmike: for end applications that is [18:00] themiddleman_itv: tobo: nah, finish is fired during res.send [18:01] stagas: tmike: just don't do it secretly in a module :P [18:01] tmike: Well I wouldn't do it in a library [18:01] kriszyp has joined the channel [18:01] tmike: okay, that makes sense [18:01] jmar777: isaacs, timoxley: in case you wanted to comment, here's that pull request: https://github.com/joyent/node/pull/2848 [18:01] tobo: themiddleman_itv yeah because .send() calls .end() [18:01] RLa: dob_, you need to use safe mongo saves and execute next iteration after mongo save completes [18:02] stagas: tmike: I find it actually useful, especially array things like, .sum() .first() .last() and stuff like that when I use them a lot [18:02] lduros has left the channel [18:02] tmike: indeed, I've run into a couple cases where adding a little extractor or something is valuable [18:02] themiddleman_itv: tobo: hmm, I was hoping for something after the client received the response [18:02] fmeyer has joined the channel [18:05] mukul has joined the channel [18:05] ph^ has joined the channel [18:05] stagas: tmike: the fear comes when extending Object where adding stuff to its prototype can break things like for-in [18:06] jergason has joined the channel [18:06] dob_: RLa: What are safe mongo saves? Can you help me on my code? http://pastebin.com/SkGXkpS8 [18:06] bnoordhuis: jmar777, isaacs: that PR is a variation on one that andreas madsen submitted a while ago [18:06] tonist has joined the channel [18:07] bnoordhuis: and that i disagree with because it's a programmer mistake, not a runtime error [18:07] kdlm has joined the channel [18:07] fangel has joined the channel [18:07] RLa: dob_, why is mongo so fast on writes? because it does not save data to disk right when you give it the data [18:07] fmeyer has joined the channel [18:08] dob_: RLa: So that causes that the data from node is not immediately written? [18:08] RLa: hm, you data pileup happens on node or mongo? [18:08] RLa: your* [18:08] kdlm: Hi al [18:09] mukul has joined the channel [18:09] Destos has joined the channel [18:09] RLa: dob_, yes, it might not be written immediately (or in sync) [18:09] dob_: RLa: On node with mongoose's save function [18:09] dob_: so i will have to fire mongoose.save with a special option? [18:10] RLa: yes, with safe: true [18:10] RLa: but, you need something else too [18:11] fangel has joined the channel [18:11] rlidwka has joined the channel [18:11] RLa: you need to pause mysql events somehow while mongoose saves [18:12] ryan_stevens has joined the channel [18:12] fmeyer has joined the channel [18:13] RLa: stream.pause() should do that [18:13] isaacs: bnoordhuis: the issue is that node makes that "programmer mistake" quite often [18:14] isaacs: bnoordhuis: ie, if you're interacting only with http objects, they frequently .write() to closed sockets. [18:14] isaacs: bnoordhuis: if you're piping, etc. [18:14] RLa: dob_, but the hard thing might be getting stream object from mysql interface [18:14] isaacs: bnoordhuis: the correct approach is probably to fix that, of course, but that's a bigger job. [18:14] dob_: RLa: OMG [18:15] tmike: ah here's the primary place I saw the "don't extend native prototypes" rule: [18:15] tmike: nodeguide.com/style.html [18:15] teslan: so if a file and objects are named as JsonRest[.js] should the JSONP version be named JsonP or JsonPRest ? [18:15] tmike: straight from the mouth of felixge ;) [18:15] AviMarcus has joined the channel [18:15] dob_: RLa: Okay, first i will search where i edit the safe: true and the where i can retrieve the stream object. [18:15] dob_: RLa: Thank u very much! [18:15] Poetro has joined the channel [18:15] jmhurley has joined the channel [18:15] tmike: I'd like to hear why he says this [18:16] RLa: dob_, welcome to async world :) [18:17] porco has joined the channel [18:17] tmike: felixge and isaacs also disagree on semi-colons [18:18] gasbakid has joined the channel [18:18] skylamer`: so is there some kind of 'search' in the npm registry in to look only at the 'active developingl' modules and stuffz ? [18:18] fmeyer has joined the channel [18:18] skylamer`: some thing like latest update in the range of one year [18:18] tmike: skylamer`: make one ;) [18:18] jtsnow_ has joined the channel [18:19] tokumine has joined the channel [18:19] skylamer`: may be /updated doing that stuff good [18:19] skylamer`: hmm [18:19] skylamer`: iudk [18:19] isaacs: skylamer`: i think you can sort by date updated [18:19] skylamer`: yes, i thought that after i asked the question [18:19] skylamer`: :) [18:20] isaacs: in teh command line [18:20] skylamer`: ^tmike [18:20] jmar777: bnoordhuis: hmm... i sort of see that [18:20] skylamer`: oh, kay, isaacs, ty :}) [18:20] jmar777: bnoordhuis: i'm not sure that simply because that situation is avoidable, it counts as a programmer error [18:20] adrianF has joined the channel [18:20] jmar777: bnoordhuis: take this example here: http://nodejs.org/docs/latest/api/net.html#server.listen [18:20] bnoordhuis: jmar777: isaacs has a point that due to shortcomings in node it sometimes unavoidably triggers [18:20] jmar777: bnoordhuis: that's a programmer error if the connection closes during that timeout. server.close() will throw [18:20] mukul has joined the channel [18:21] bnoordhuis: but that's something we should fix, not paper over [18:21] jmar777: bnoordhuis: ahh, i didn't see isaacs comments [18:21] bnoordhuis: jmar777: right, that's a good bad example :) it should be fixed [18:22] simenbrekken has joined the channel [18:22] jmar777: bnoordhuis: lol... but it's not unreasonable code :p [18:22] jetienne_: looks like i gonna write a book on node [18:22] benvie has joined the channel [18:22] isaacs: bnoordhuis: really, i think in the net/http area, it's too hairy to rely on every case being handled exactly right. we should emit("error") on those, and change them to throws when they don't show up for a long time :) [18:22] isaacs: bnoordhuis: since net is *usually* a "under the hood" type of thing for most people. [18:23] jmar777: i think that "better" handling of that situation could sit in user land. e.g., buffer the write or close command until the socket is available [18:23] mraleph has joined the channel [18:23] fmeyer has joined the channel [18:23] jmar777: but agree with isaacs that if it's not taken care of in user land, emit is much friendlier and actually has a chance of being handled [18:23] bnoordhuis: sorry guys, we'll have to continue the discussion some other time - i've got to go [18:23] dob_: RLa: FYI safe: true is default in mongoose... I am not sure why i have to pause the stream of the mysql. Shouldn't async mean that I just can fire up the safe function how often i want and it just runs in "background"? [18:24] isaacs: yeah, me too [18:24] jefferai has joined the channel [18:25] RLa: dob_, but data used in calls must be stored in memory [18:25] RLa: dob_, and if you fire too many async calls with lot of data, it will run out of memory [18:26] RLa: in sync world that never happens because per single fetched row you would have single row saved, and rows do not pile up [18:27] dob_: RLa: But I think it's not running async. Cause after I got 1000 row read events i get 1000 mongodb save events. But I think it should nearly be mysql read, mongod save.... [18:27] fritzy has joined the channel [18:27] RLa: save events? after data saved or before? [18:28] dob_: after [18:28] RLa: hm [18:28] dob_: the mongoose save callback [18:28] dob_: like in the code i pasted. [18:28] RLa: then it should work well [18:28] isufy has joined the channel [18:28] fmeyer has joined the channel [18:29] _eddyb_ has joined the channel [18:30] franciscallo has joined the channel [18:30] TooTallNate has joined the channel [18:31] StanlySoManly has joined the channel [18:31] jtsnow has joined the channel [18:32] `3rdEden has joined the channel [18:32] ph^ has joined the channel [18:33] isufy has joined the channel [18:33] hipsterslapfight has joined the channel [18:33] fmeyer has joined the channel [18:34] tauren_ has joined the channel [18:34] kriskowal has joined the channel [18:35] Druid_ has joined the channel [18:35] sarlalian has joined the channel [18:36] jdeibele has joined the channel [18:36] vguerra has joined the channel [18:36] perezd has joined the channel [18:36] dob_: RLa: My problem is that first the complete mysql select is executed and loaded into RAM. On the on row event of mysql every mongoose object is build. And after the mysql on end event the save operations of mongoose are executed. But i already say mongoose save on the row event and not on the end event. [18:37] chadskidmore has joined the channel [18:37] RLa: you must get 1 mongo event after each mysql event [18:37] mrkurt has joined the channel [18:37] RLa: that's why you need to pause mysql before saving and resume after saving [18:38] dob_: okay, then i think i will try to use this fork: https://github.com/piscisaureus/node-mysql [18:38] KrisJordan has joined the channel [18:38] fmeyer has joined the channel [18:39] CarterL has joined the channel [18:39] sarlalian has left the channel [18:39] staar2: hello RLa [18:39] RLa: you could also work with batches of some size using OFFSET and LIMIT [18:39] RLa: hey [18:41] xaq has joined the channel [18:41] tornad has joined the channel [18:42] kickingvegas has joined the channel [18:43] tylerstalder has joined the channel [18:43] graeme_f has joined the channel [18:44] fmeyer has joined the channel [18:45] garrettwilkin has joined the channel [18:46] pandeiro has joined the channel [18:46] RLa: dob_, that's pseudocode i mean: http://pastebin.com/xiqLT7fW [18:46] lohkey has joined the channel [18:47] bshumate has joined the channel [18:47] RLa: dob_, that keeps reads and writes in sync [18:47] Wa has joined the channel [18:48] dob_: Yes, i can do a count and execute a select with offset for every row.... then it's really in sync. Or every 1000 row ... whatever... [18:48] dob_: I think i will do that. [18:49] dob_: RLa: Thank u! [18:49] ProLoser|Work has joined the channel [18:49] ProLoser|Work: hallo [18:49] fmeyer has joined the channel [18:49] ProLoser|Work: is there a framework or library or something that will help me rapidly get common CRUD functionality put together? [18:49] geetarista has joined the channel [18:49] ProLoser|Work: like validation and pagination mostly [18:50] ejholmes_ has joined the channel [18:50] tonist has joined the channel [18:50] ProLoser|Work: i'm 100% new to node [18:50] markq has joined the channel [18:52] patcito has joined the channel [18:52] mandric has joined the channel [18:52] rlidwka: does fs.symlink work everywhere or some shitty OSes might fail it? [18:53] localhost has joined the channel [18:53] bradleymeck: rlidwka don't use it pre windows vista [18:54] fmeyer has joined the channel [18:54] Lee- has joined the channel [18:54] Lee- has joined the channel [18:54] looopy has joined the channel [18:55] spolu has joined the channel [18:56] Hebo has joined the channel [18:56] westg has joined the channel [18:58] satyr has joined the channel [18:59] fmeyer has joined the channel [19:00] petrjanda has joined the channel [19:00] markq has joined the channel [19:01] yawNO: is there an official router for connect? [19:02] bradleymeck: yawnNo, no, but express has a router, flatiron has one (director), and there is restify [19:03] jp232 has joined the channel [19:03] maxogden: npm install routes ftw [19:03] westg has joined the channel [19:03] tobo: yawNO u can find lots on the modules page [19:04] TheJH has joined the channel [19:04] yawNO: bradleymeck: thx cause i thought it had one bundled but looks like i'm wrong [19:04] fmeyer has joined the channel [19:04] tobo: yawNO it used to but there's bazillions of ways to route so i decided to remove it [19:05] rlidwka: isn't the express an official router for connect? :) [19:05] yawNO: thanks tobo [19:05] yawNO: i cant decide whether i should go with http or connect [19:06] tobo: ah it looks like "routes" was "extracted" from connect [19:06] rwaldron has joined the channel [19:06] yawNO: i know it doesnt make sense to reinvent the wheel .. that said, this is nothing but a pet project.. [19:06] tobo: so that would be similar to what was originally in there [19:06] Vespakoen has joined the channel [19:06] Onkeltem: Does anybody use Eclipse for debugging standalone scripts for V8 VM (Node.js) using chromedevtools plugin for Eclipse? I can't get it "work" with local files - it works only with Virtual Project files. I posted an issue: http://code.google.com/p/chromedevtools/issues/detail?id=63&thanks=63&ts=1330541070 and made a screencast: http://www.youtube.com/watch?v=gLi6sIFWEXs . Any help? [19:06] yawNO: so i'm wondering which way would be more proficient [19:06] yawNO: :| [19:06] tobo: do one with regular node first and you'll find out :p [19:06] yawNO: allright [19:07] yawNO: doing all the parsing will be a challenge though [19:07] yawNO: :D [19:07] aaronmcadam has joined the channel [19:08] aranw has joined the channel [19:08] langworthy has joined the channel [19:08] M1l3n1um has joined the channel [19:09] rlidwka: by the way... is there any connect-like stuff for socket.io? :) [19:09] xavia has joined the channel [19:09] fmeyer has joined the channel [19:10] pgte has joined the channel [19:10] rlidwka: i mean middleware support... something that is called before emitting custom user event... [19:11] dshaw_ has joined the channel [19:11] mcav has joined the channel [19:12] wookiehangover has joined the channel [19:14] stagas: rlidwka: no but you can try https://github.com/stagas/simpl which is a websockets framework for doing just that thing you mentioned [19:14] McMAGIC--Copy has joined the channel [19:15] fmeyer has joined the channel [19:15] jocafa has joined the channel [19:15] AndreasMadsen has joined the channel [19:15] squidlicker has joined the channel [19:16] mraleph has joined the channel [19:17] rlidwka: thanks... might be useful [19:17] ericmuyser has joined the channel [19:17] dshaw_ has joined the channel [19:18] whaley has joined the channel [19:18] ceej has joined the channel [19:18] robi42 has joined the channel [19:20] fmeyer has joined the channel [19:20] cgfuh has joined the channel [19:21] Aiden has joined the channel [19:23] pradeepbv_ has joined the channel [19:24] pradeepbv has joined the channel [19:25] fmeyer has joined the channel [19:26] trotter has joined the channel [19:27] petrjanda has joined the channel [19:28] shinuza has joined the channel [19:28] nanrehnanreh has left the channel [19:29] jsurfer has joined the channel [19:29] mjijackson has joined the channel [19:29] icebox has joined the channel [19:30] xavia has joined the channel [19:31] fmeyer has joined the channel [19:31] Vainoharhainen has joined the channel [19:31] petrjanda has joined the channel [19:31] c0smikdebris has joined the channel [19:31] Vespakoen_ has joined the channel [19:32] astrostl has joined the channel [19:32] c0smikdebris has joined the channel [19:34] keeto has joined the channel [19:35] dobber has joined the channel [19:35] take_cheeze has joined the channel [19:36] fmeyer has joined the channel [19:37] Morkel has joined the channel [19:37] michaelh has joined the channel [19:37] whitman has joined the channel [19:38] dobber has joined the channel [19:39] devongovett has joined the channel [19:40] ProLoser|Work has left the channel [19:40] jamund has joined the channel [19:40] relling has joined the channel [19:41] fmeyer has joined the channel [19:41] fatjonny has joined the channel [19:43] Aiden has joined the channel [19:43] ashish_ has joined the channel [19:43] TimTimTim has joined the channel [19:44] CarterL has joined the channel [19:45] isufy has joined the channel [19:46] fmeyer has joined the channel [19:47] BillbadWut has joined the channel [19:48] mikeal has joined the channel [19:50] bvmount_ has joined the channel [19:50] mcav has joined the channel [19:51] fmeyer has joined the channel [19:52] Billbad has joined the channel [19:53] rio{ has joined the channel [19:55] ramitos has joined the channel [19:56] fmeyer has joined the channel [19:56] fangel has joined the channel [19:57] chriswendt has joined the channel [19:57] chjj has joined the channel [19:58] lupomontero has joined the channel [19:58] ningu has joined the channel [19:59] gavin_huang has joined the channel [20:00] MartinCleaver has joined the channel [20:00] MartinCleaver has joined the channel [20:00] adambeynon has joined the channel [20:01] briancra_ has joined the channel [20:01] fmeyer has joined the channel [20:02] pow4h has joined the channel [20:02] pow4h: I have int fd=rb->open("/myfile",O_RDONLY); char array[10]; rb->read(fd,array,1); rb->splashf(100,"%d",fd); rb->splashf(100,"%d",array[0]);. Is char array[10]; the only line of code responsible for displaying the data file's bits as characters? [20:02] herbert_ has joined the channel [20:02] JoshJensen has joined the channel [20:03] pandora17 has joined the channel [20:04] ramitos has joined the channel [20:04] skeptic_ has joined the channel [20:05] kevwil has joined the channel [20:05] daglees has joined the channel [20:05] daglees has joined the channel [20:06] RiverraiD has joined the channel [20:06] Axsuul has joined the channel [20:06] pgte has joined the channel [20:06] fmeyer has joined the channel [20:07] daglees has joined the channel [20:09] bradleyg has joined the channel [20:10] daglees has joined the channel [20:10] bindr has joined the channel [20:10] straley has joined the channel [20:12] fmeyer has joined the channel [20:12] straley: any recommendations on sites where i can post a question regarding node-waf not seeing libpng? [20:12] baudehlo: here. Or the nodejs mailing list. [20:13] baudehlo: or stack overflow, but you're more likely to get an answer in the first two places IME. [20:13] daglees has joined the channel [20:13] straley: I keep getting: "Checking for library png : not found" [20:14] straley: i'm on ubuntu... started with libpng12... then dl'ed and compiled and installed libpng15. [20:14] dnyy has joined the channel [20:14] jergason has joined the channel [20:14] pieterv has joined the channel [20:15] ceej has joined the channel [20:15] warz has joined the channel [20:15] warz has joined the channel [20:15] straley: and I have "conf.check(lib='png', libpath=['/lib', '/usr/lib', '/usr/local/lib', '/usr/local/libpng/lib', '/home/nodeadmin/downloads/libpng-1.5.9'])" is the wscript [20:15] straley: anyone run into this with a lib? [20:15] ph^ has joined the channel [20:15] luismreis_ has joined the channel [20:15] EuroNerd has joined the channel [20:16] EuroNerd has joined the channel [20:16] daglees has joined the channel [20:16] mcavage has joined the channel [20:16] riebel has left the channel [20:17] fmeyer has joined the channel [20:18] ewj_ has joined the channel [20:19] GodezInc has joined the channel [20:19] metanat has joined the channel [20:19] daglees has joined the channel [20:19] StanlySoManly has joined the channel [20:20] josh9 has joined the channel [20:20] rio{ has joined the channel [20:21] JoshJensen has joined the channel [20:21] ramitos has joined the channel [20:21] cjm has joined the channel [20:22] TooTallNate: straley: which module is that? [20:22] bulatshakirzyano has joined the channel [20:22] fmeyer has joined the channel [20:24] misza_ has joined the channel [20:25] garrettwilkin has joined the channel [20:25] victor__ has joined the channel [20:25] artusrocha has joined the channel [20:25] jsurfer has joined the channel [20:26] moura has joined the channel [20:26] ramitos has joined the channel [20:26] victor__: who wants to help me out with some first-try-but-won't-work issues with node on Windows ? [20:27] fmeyer has joined the channel [20:28] skylamer`: victor__, tell and we'll Help :) [20:28] JoshJensen has joined the channel [20:28] fermion has joined the channel [20:29] victor__: I installed Node (MSI) [20:29] metanat has left the channel [20:29] victor__: and opened the console from the nodeJS-folder in prgram files [20:29] mcav has joined the channel [20:29] victor__: made an example.js with a console.log("hello world"); in it [20:30] victor__: and placed it in the same folder [20:30] jefferai has joined the channel [20:30] victor__: then typed in the console: % node example.js expecting to get the hello world message [20:30] pizthewiz has joined the channel [20:30] victor__: but i only got some dots [20:30] victor__: ... [20:30] skylamer`: remove '%' :) [20:31] victor__: so: node example.js [20:31] victor__: ? [20:31] skylamer`: yes [20:31] socketio\test\91 has joined the channel [20:31] victor__: mmm no doesn't work [20:32] timoxley: victor__ what does "doesn't work" mean [20:32] victor__: i still only get: ... [20:32] timoxley: oh [20:32] fmeyer has joined the channel [20:32] timoxley: quit node [20:32] timoxley: first. [20:33] harthur has joined the channel [20:33] timoxley: victor__ you're in the node repl. you should be at your windows commandline [20:33] larsschenk1 has joined the channel [20:33] coderarity: when in doubt spam control-c [20:34] victor__: so I use the windows commandline [20:35] victor__: go to the Node folder? [20:35] timoxley: victor__ nope, go to the folder your example.js file is in [20:35] dephex has joined the channel [20:35] skylamer`: u can start from anywhere, just it add the node foldar to the PATHs :) [20:36] timoxley: victor__ yeah, go to cmd or powershell or whatever [20:36] victor__: so what should i put on the command line from the folder where my example.js is? [20:36] EvRide has joined the channel [20:36] timoxley: node example.js [20:37] victor__: :) [20:37] illourr has joined the channel [20:37] victor__: that did the trick [20:37] victor__: thank you all [20:37] timoxley: hoorah [20:37] coderarity: victor__: should probably use powershell for node.js [20:37] coderarity: victor__: if you installed it with windows azure stuff [20:37] victor__: what is powershell? [20:38] fmeyer has joined the channel