--- Log opened Thu Mar 28 00:00:35 2013 00:00 < bnoordhuis> trippeh: what's the question? 00:01 < trippeh> bnoordhuis: How to set supported protocol versions for tls.createServer 00:02 < trippeh> (not just supported cipher suites) 00:02 < bnoordhuis> trippeh: you mean tlsv1 vs ssl3 vs ssl2? 00:02 < trippeh> bnoordhuis: For example. And tlsv1.1, v1.2 etc 00:02 < bnoordhuis> trippeh: it's possible if not outright supported 00:03 < bnoordhuis> you have to create a custom SecureContext and pass it a string with the tls/ssl type you want 00:03 < trippeh> aha 00:03 < bnoordhuis> trippeh: the relevant code is in lib/tls.js and src/node_crypto.cc. search for sslmethod in that last file 00:05 < trippeh> bnoordhuis: Ok, thank you! 00:07 < luhx> does someone knows how to fix this error message: xhr.send( ( s.hasContent && s.data ) || null ); ?! 00:14 < enjalot> hi all, for any SF people we are hosting a meetup on derbyjs and sharejs next week http://www.meetup.com/lever-open-source/events/111258232/ 00:16 < trippeh> bnoordhuis: btw, there is an open pull request for tlsv1.1/v1.2 methods (https://github.com/joyent/node/pull/4317) 00:20 < bnoordhuis> trippeh: that PR does a lot more than just add more ssl/tls methods 00:22 < harth> substack: how do I get browserify to not pick up this require: https://github.com/harthur/kittydar/blob/master/kittydar.js#L7 ? 00:24 < substack> harth: "browser": { "canvas": "empty_file" } in your package.json 00:24 < substack> https://gist.github.com/shtylman/4339901#replace-specific-files---advanced 00:24 < substack> actually might need to use "./empty_file.js" 00:24 <@mbalho> ooh didnt realize (require) went away (not that i miss it, that was weird) 00:25 <@mbalho> substack: does empty_file.js have to actually exist? 00:25 < substack> harth: or you could do var require_ = require; require_('canvas') 00:25 < substack> that would also trick it 00:25 < substack> mbalho: yes 00:25 < substack> mbalho: it would be nice if browser-resolve supported `false` as a value 00:25 <@mbalho> ya 00:26 < ugarit> why are most of my url parts null? I do this response.end(JSON.stringify(url.parse(request.url,true,true))); and it returns {"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":"?c=1&d=2&e=[3,4]","query":{"c":"1","d":"2","e":"[3,4]"},"pathname":"/a/a","path":"/a/a?c=1&d=2&e=[3,4]","href":"/a/a?c=1&d=2&e=[3,4]"} 00:27 <@mbalho> ugarit: you are probably just giving it "/a/a?c=1&d=2&e=[3,4]" instead of "http://coolwebsite.com/a/a?c=1&d=2&e=[3,4]" 00:28 < ugarit> @mbalho but my url contains http://hostname:3000/ etc. 00:28 <@mbalho> ugarit: can you paste the full url string? 00:28 < spikeb> request.url doesn't include hostname 00:28 < ugarit> @mbalho but my url contains http://hostname:3000/a/a?c=1&d=2&e=[3,4] 00:28 < harth> substack: thanks 00:30 < ugarit> spikeb according to this http://nodejs.org/docs/latest/api/url.html hostname is included 00:30 < spikeb> that's the docs for the 'url' module 00:30 <@mbalho> >> require('url').parse('http://hostname:3000/a/a?c=1&d=2&e=[3,4]') 00:30 < purr> mbalho: ReferenceError: require is not defined 00:30 < spikeb> request.url coming from Connect, Express etc is just pathname + query 00:30 <@mbalho> dang 00:31 < spikeb> do a console.log request.url 00:31 <@mbalho> >> !!url 00:31 < purr> mbalho: ReferenceError: url is not defined 00:31 <@mbalho> dang 00:31 <@mbalho> well anyway check yoself before you wreck yoself 00:33 < ugarit> mbalho spikeb I'm a newbie wrt node.js/js here's my code 00:33 < ugarit> http://pastebin.com/T2673ri4 00:33 < spikeb> your problem is that request.url does not include the host name, protocol etc 00:35 <@mbalho> ugarit: 17:23 <@mbalho> ugarit: you are probably just giving it "/a/a?c=1&d=2&e=[3,4]" instead of "http://coolwebsite.com/a/a?c=1&d=2&e=[3,4]" 00:40 < NodeNewb> anyone know how to authenticate via socket.io, whereby the user passes a login and password into the socket, where it's verified then the session is set? 00:40 < ugarit> mbalho I think you're right. from this code how I can grab the entire url? http://pastebin.com/T2673ri4 00:41 < NodeNewb> ...also using express, if that helps 00:42 < spikeb> grab the hostname from the 'host' header 00:43 < spikeb> req.get('host') 00:43 < spikeb> and grab the protocol as well 00:56 < xananax> any way to set NODE_PATH from inside a script? not from the shell 00:56 < xananax> I want to dynamically add directories for require() to search in 00:57 < xananax> and apparently require.paths is removed 01:07 < enjalot> i'm trying to include coffee-script with browserify but it can't find module "module", any ideas what i can do? 01:08 <@Nexxy> enjalot, besides not using coffeescript? 01:08 < enjalot> Nexxy: yes. i want to compile scripts on the client for users of my text editor 01:08 < ljharb> :-) 01:19 < fayimora> If node has got a cluster module, why do we need http://learnboost.github.com/cluster/ ?? 01:21 <@Nexxy> fayimora, you don't really 01:21 < chilts> I think that was written before the cluster module in Node.js 01:21 < fayimora> Hmm ok..still trying to figure out what it is lol 01:23 < ningu> wheee my first npm module 01:23 < ChrisPartridge> hi5 01:24 < ningu> a whole 59 lines of code 01:24 < ChrisPartridge> lower the loc the better :P 01:24 < ningu> hehe 01:24 < ningu> I'll be the only one using it for the near future, but that's ok 01:25 < ChrisPartridge> End up using that window function yesterday? 01:25 < ningu> oh, yeah, that was a great solution -- I still needed a subquery but it wasn't so bad 01:25 < ningu> cause I wanted to restrict the results further 01:25 < ningu> outer query, not subquery 01:26 < ChrisPartridge> yup, most of my aggregated views are the same 01:26 < ningu> this was not actually a view but it comes down to the same thing 01:26 < ChrisPartridge> you also generate uuids outside of the db, but that oks ;) 01:26 < ChrisPartridge> postgre ftw 01:26 < ningu> it was for an api response, so, sending pre-formatted objects 01:26 < ningu> I ended up not needing a temporary table at all 01:27 < ChrisPartridge> ah sweet 01:27 < ningu> and only needed a very small amount of manual sql generation 01:27 < ningu> I've been using gesundheit to generate my queries 01:28 < ChrisPartridge> yeah, i got something similar in postgres-cabinet 01:29 < ningu> what does it do, since there is no readme file? :P 01:29 < ningu> can it generate the whole set of normal sql queries? 01:29 < ningu> I suppose that depends on "normal" 01:33 < TehShrike> normal isn't a problem 01:33 < TehShrike> It's the other 10% 01:33 < TehShrike> That ORMs seem to miss completely 01:53 < faceleg|work> speaking of ORM's 01:53 < faceleg|work> gawd doctrine is horrible 01:58 < bnoordhuis> all ORMs are horrible 01:58 < bnoordhuis> i hope they're just a phase we programmers as a group go through 02:01 < substack> mbalho, harth: https://github.com/shtylman/node-browser-resolve/pull/14 02:02 < substack> oh right I was supposed to be working on examples for my talk tomorrow 02:03 < spikeb> what do you guys think about module/file capitalization? If the module exports a constructor, should you PascalCase its filename? 02:04 < TehShrike> spikeb: consensus seems to be it's MyConstructor and nonConstructorFunction 02:04 < TehShrike> oh, you're talking at the module level, duh 02:04 < spikeb> no issues due to case-sensitive vs case-insensitive filesystems? 02:04 < spikeb> ya 02:04 <@Nexxy> 02:04 < TehShrike> right. I dunno, everyone seems to go for lowercase with dashes 02:05 < TehShrike> So that's what I do 02:05 < TehShrike> Just trying to be cool by doing what other people do, y'know 02:05 < spikeb> yea that's what i've seen, but it's gross; a holdover from Ruby. but maybe that's due to the filesystem case issues 02:05 < spikeb> myUtil = require('./lib/my_util') is gross 02:05 < ljharb> spikeb: constructors should have an initial caps 02:05 < TehShrike> So here's what I do, in general, everywhere: 02:05 < spikeb> MyClass = require('./lib/my_class') is gross too 02:05 < ljharb> spikeb: oh you mean the filename 02:05 < ljharb> yeah i'd snake_case it. 02:05 < spikeb> :) 02:06 < ljharb> filenames should always be lowercase, cause case-sensitive filesystems are dumb. 02:06 < TehShrike> If I'm writing code that can be released on systems with case-insensitivity, but also on systems with case-sensitivity, I stay all lowercase. 02:06 <@Nexxy> spikeb, don't leave yet 02:06 < ljharb> :-p 02:06 <@Nexxy> you have 3 more answers coming 02:06 < spikeb> it also introduces some complexity, because based on an identifier i want to auto-require a Model or Collection; that means i always need to be converting between snake_case and PascalCase 02:06 < TehShrike> Because I have seen really really stupid bugs when porting software from a case-insensitive environment to a case-sensitive environment. 02:06 < ljharb> spikeb: auto-requiring is a problem you shouldn't solve. require should always take a string literal. 02:07 < TehShrike> But I can totally understand wanting to give that information up as part of the module name - it would be pretty cool to know if require() was going to be getting me a constructor or not, just by looking at the module name 02:07 < ljharb> TehShrike: if require returns an object, and the constructor's one of it's keys, then it's pretty explicit :-) 02:08 < TehShrike> eh? 02:08 < ljharb> TehShrike: ie module.exports = { Constructor: function () {} }; 02:08 < TehShrike> oh, sure 02:09 < TehShrike> But all the cool kids do module.exports = , right? :-P 02:09 < ljharb> i'm so glad that node doesn't have any of that built-in "we're going to do magic things with your strings, cause screw non-english languages and being able to grep for things!" 02:13 < TehShrike> Anyone used ASM.js yet? 02:13 < chilts> not yet, but it looks cool 02:13 < ljharb> nope, but you wouldn't want to use it unless you're building a minifier 02:13 < ljharb> it's not for human production :-) 02:13 < ljharb> * or a compiler 02:14 < ljharb> i love the concept tho. for once someone built a *subset* of JS instead of a superset. 02:14 < TehShrike> Pretty sure getify is working on one of those right now 02:15 < ChrisPartridge> ningu: yeah, it generates queries for you 02:16 < ChrisPartridge> ningu: i've got a tonne of changes/tests I havent put into the npm package, as I need to refactor the tests to use a test db, instead of my current projects db - latest version also holds a seperate connection for notifications 02:31 < joe-node0> anyone here use ST2? 02:33 < TehShrike> Sublime Text 2? 02:33 < howdynihao> beep 02:33 < TehShrike> boop 02:34 < TehShrike> ...if anybody here does use Sublime Text, check out http://sokolovstas.github.com/SublimeWebInspector/ - it gives me a nice little woody 02:35 < joe-node0> yes 02:35 < joe-node0> I'm trying to use named capture groups i.e. (? regexHere) 02:36 < joe-node0> but cannot find the documentation on accessing them in replace mode 02:36 < ChrisPartridge> TehShrike: it's pretty sweet huh 02:36 < TehShrike> I giggled like a little girl when I was first used it 02:36 < joe-node0> I'v tried {$foo}, {foo}, $foo, $, \foo, \, 02:37 < TehShrike> It's just pcre, isn't it? 02:37 < TehShrike> :-x 02:37 < ChrisPartridge> joe-node0: https://gist.github.com/markhuge/4724990 02:37 < ChrisPartridge> google wins? 02:37 < TehShrike> Nah, but he's talking named groups 02:37 < TehShrike> That's an anonymous group 02:38 < ChrisPartridge> my bad 02:38 < joe-node0> ChrisPartridge: I'm giving it a shot 02:39 < TehShrike> I never find myself using named groups 02:42 < joe-node0> much of what I use regex for is non-trivial 02:42 < joe-node0> I actually like spending time in regex land, and with named groups I'd like it even more 02:42 < TehShrike> I use regex all the time, but I don't usually have so many groups that I name them. I don't usually need nested groups, either, which probably makes my life much easier 02:43 < joe-node0> Hmmm, yeah I use tons of conditionals 02:43 < TehShrike> Oh, I totally understand. Regular expressions are awesome. 02:43 < TehShrike> I just haven't needed named groups badly enough to become acquainted with the syntax 02:43 < leichtgewicht> Is anyone experienced with grunt-livereload? 02:44 < TehShrike> I was incredibly annoyed the other day to learn that gnu regex is different from both POSIX and PCRE 02:44 < joe-node0> when I have 4 inch long regexes with 4 OR pairs, the numbered approach gets sketchy 02:45 < joe-node0> at least with names I can nail them to the wall and move on. 02:46 < ChrisPartridge> TehShrike: the xregexp package should sort you out (in js land) 02:46 < joe-node0> I love that library 02:47 < joe-node0> regexpal.com 02:49 < joe-node0> xregexp needs to supplant refiddle in prominence 02:49 < mscdex> there's also a pcre binding if you're into that 02:49 < mscdex> for node 02:50 < joe-node0> trouble is I couldn't get named groups to even work with regexpal.com (using the documented approach for xregexp online) 02:54 < ljharb> JS doesn't have named groups 03:00 < euoia> on the topic of regex, there's also this which can be useful for js regexes http://www.regexper.com/ 03:03 < joe-node0> 8-0 03:04 < joe-node0> I have more than 2 problems, but I love railroad diagrams 03:05 < Aikar> off topic but i really want to share... https://plus.google.com/114800310452543164210/posts/jnNLqfcYTKN - now back to your regularly scheduled node 03:35 < SrPx> console.log('Oh, it was just suicide\' – no need to worry'). // TIL node.js developers are sadistics 03:38 < TehShrike> :-x 03:43 < joe-node0> euoia: Thank you for that, it helped me deal with a massive html cleanup job. Props for the find! 04:14 < FPSJosh01> hey everyone. (new here) 04:14 < FPSJosh01> Been really happy with node 10.1 so far, thought I would check out the irc channel 04:15 <@mbalho> yo 04:15 < tjfontaine> welcome. 04:15 < FPSJosh01> I was curious if people were familiar with x64 windows installations 04:16 < FPSJosh01> I had a problem installing msnodesql on my dev box at work 04:16 < tjfontaine> what type of problem? 04:17 < FPSJosh01> node-gyp seemed to be the issue 04:17 < FPSJosh01> I couldn't put my finger on it. 04:17 < tjfontaine> you do have some form of vs2010 installed, right? 04:17 < FPSJosh01> Yeah 04:17 < tjfontaine> can you gist the output? 04:17 < FPSJosh01> Tomorrow I can 04:18 < FPSJosh01> I plan on installing Node on a test server and developing Headless Stack testing (zombie!) 04:18 < tjfontaine> people are generally here all the time, so come prepared to create lots of gists with the pertinent info 04:18 < FPSJosh01> and connecting to sql server seemed to be a requirement to use it 04:18 -!- mode/#Node.js [+o TooTallNate] by ChanServ 04:18 < tjfontaine> FPSJosh01: and when all else fails, blame TooTallNate node-gyp is his baby 04:18 < tjfontaine> :) 04:19 < FPSJosh01> TooTallNate lol 04:19 < styol> What does it suggest when setting process.setMaxListeners(0); appears to prevent the leaking of memory? I'm utilizing memwatch and it is throwing notices about potential memory leaks with and without that setting being altered, but while viewing `free -m` it seems like memory is no longer being leaked (with MaxListeners set to 0) 04:20 <@TooTallNate> tjfontaine: FPSJosh01: I am responding to my apparent summoning… 04:20 <@TooTallNate> sup? :p 04:21 < FPSJosh01> Hello! Just ran into an issue installing msnodesql on my x64 dev box at work 04:21 < tjfontaine> TooTallNate: there is no imminent support request, I'm just preparing to funnel everything to you when he has the info :) 04:21 < FPSJosh01> It looks like it's been very well documented already, but I can't replicate the same errors as posted on git 04:21 <@TooTallNate> FPSJosh01: word around the Grapevine is that msnodesql doesn't work on v0.10.x yes 04:22 <@TooTallNate> i'm not sure of the specifics 04:22 < tjfontaine> because the person just back from vacation is the one who deserves to handle windows issues :) 04:22 < howdynihao> styol: think you misunderstand, its warning you that you might be leaking, not that you are, and has no effect on if you are or not 04:22 < FPSJosh01> ah 04:22 <@TooTallNate> tjfontaine: hahaha, i just assigned 5+ committers to node-gyp for just that reason 04:22 < tjfontaine> hehe 04:22 < FPSJosh01> Fair enough :) Would it work if I switched to... say... 0.9? 04:22 < styol> howdynihao: that would make sense indeed. However, without that being set, I do appear to be leaking memory. I just found and uncommented that line "just for fun" and was surprised to find the instance no longer leaked memory 04:22 <@TooTallNate> FPSJosh01: check their issue tracker 04:22 < FPSJosh01> Yeah. 04:23 <@TooTallNate> FPSJosh01: if you find an issue, show me please :) 04:23 < FPSJosh01> Well what do you guys think, should I go back to .9 or document my issue? 04:24 < styol> howdynihao: the documentation reads that it can help to find memory leaks, when it would appear that the default setting of 10 was actually causing a memory leak? 04:24 < tjfontaine> probably .8 if you're not prepared to make it work on .10, .9 is generally some weird nether region between stable releases finding supported things in there is lucky 04:24 < howdynihao> styol: it helps in finding memory leaks because its warning you when you are going above the 'soft limit' if you weren't expecting it to 04:25 < FPSJosh01> Thanks tj 04:26 < styol> howdynihao: gotcha gotcha. Thank you very much for your explanation 04:28 < ChrisPartridge> FPSJosh01: also if you are on a 64bit platform you probably need the win7 64 sdk too, just fyi 04:29 < FPSJosh01> I downloaded it 04:29 < FPSJosh01> actually 04:30 < FPSJosh01> thanks for the help anyway chris, if you find anything else, let me know! 04:31 < FPSJosh01> I'll be on tomorrow 04:31 < FPSJosh01> take it easy! 04:41 < BombStrike> anyone used to debug node processes manually using mdb? 04:42 < XadillaX> I have a problem 04:42 < XadillaX> How can I use MongoDB in sync mode? 04:43 <@mbalho> wat 04:43 < XadillaX> That means I want use some function like this: 04:43 < XadillaX> var item = mongodb.find(foo) 04:43 < XadillaX> not mongodb.find(foo, callback) 04:44 <@mbalho> you can try python or ruby 04:44 < XadillaX> but how can it do that in node? 04:44 < XadillaX> or anyway? 04:44 <@mbalho> node doesnt work that way 04:45 < XadillaX> I call a function that output something 04:45 < ningu> XadillaX: that isn't how node works. 04:45 < XadillaX> and after that function, it will render all the output 04:45 < XadillaX> and if i have a query not in sync mode 04:45 < XadillaX> it won't be rendered 04:46 < ningu> XadillaX: you can't use a car as a boat. 04:46 < ningu> if you want a boat, use a boat. :) 04:46 < XadillaX> so that's impossible? 04:46 < XadillaX> or anyway to block that until the callback function finished? 04:47 < ningu> XadillaX: you put what you want to happen when it's finished in the callback. 04:47 < howdynihao> https://github.com/laverdet/node-fibers 04:47 < ningu> yes, there is that too. :) 04:47 < XadillaX> I tried the "var finished = false; foo.bar(callback); while(finished);" 04:47 < ningu> XadillaX: that's now how you do it. 04:47 < ningu> not* 04:48 < ningu> XadillaX: like I said, put what you want to happen when it's finished *in* the callback. 04:48 < ChrisPartridge> and use an async library, such as async by caolan if things get unweildy 04:48 < XadillaX> i will go and see it 04:49 < ChrisPartridge> and read http://callbackhell.com/ 05:08 < howdynihao> check this out 05:08 < howdynihao> >> (1 == '1') 05:08 < purr> howdynihao: (boolean) true 05:08 < howdynihao> >> var a = {}; a[undefined] = 1; a[undefined]; 05:08 < purr> howdynihao: (number) 1 05:09 <@mbalho> howdynihao: https://github.com/felixge/node-style-guide#use-the--operator 05:09 < howdynihao> >> '' + undefined 05:09 < purr> howdynihao: (string) 'undefined' 05:09 < howdynihao> >> (undefined == 'undefined') 05:09 < purr> howdynihao: (boolean) false 05:09 < howdynihao> makes sense 05:10 < howdynihao> :p 05:10 < howdynihao> it'll do the conversion on just about everything else but == 05:11 < ChrisPartridge> howdynihao: http://www.youtube.com/watch?v=_yZHbh396rc 05:12 < howdynihao> oh i saw that before, does it mention the weird undefined behavior there? 05:13 < howdynihao> i dont remember 05:13 < ChrisPartridge> nah i dont think it mentions that one specifically 05:15 < defaultro> I'm assuming that node.js can be used to connect to an external site to pull a value. Correct? 05:19 <@Nexxy> defaultro, node.js can do anything your heart desires 05:19 <@Nexxy> all it takes is a little imagination 05:19 < ChrisPartridge> node make_pancakes.js 05:19 < kenperkins> for example: npm install -g node-1040ez 05:19 <@mbalho> defaultro: http://bit.ly/YIGuWc 05:20 < ChrisPartridge> haha 05:20 <@Nexxy> mbalho, that image gets better every time I see it 05:23 <@mbalho> its definitely my favorite meme right now 05:24 < kenperkins> http://global3.memecdn.com/baby-baby-baby-oh_o_337074.jpg 05:24 < kenperkins> only applies to moms and dads 05:24 < ChrisPartridge> http://s3-ec.buzzfed.com/static/enhanced/webdr03/2012/12/4/17/enhanced-buzz-18165-1354659423-2.jpg 05:26 < kenperkins> those always creep me out 05:28 <@mbalho> this got weird 05:31 * Nexxy shifts awkwardly 05:31 < Zak> yeah, who wears those sun glasses anymore 05:31 < Zak> totally 1990s fashion 05:41 < Majiir> Hi folks. I've started with Node recently and had a question about conventions. In what situations should I set err in a callback versus returning a null/undefined result? 05:42 < ChrisPartridge> Majiir: when an error occurs 05:43 < BombStrike> anyone using joyent/illumos/smartos/whatever and knowing how to change the max file descriptors for my node process, the default 1024 is clearly not enough 05:44 < Majiir> ChrisPartridge: Heh. So sanity-check me: I'm writing a function to load a session from a socket.io handshake cookie. If no cookie was provided, I'm returning null, and if a cookie was provided with a forged sid, I'm throwing an error; does that sound correct? 05:46 < ChrisPartridge> BombStrike: just google for solaris, should be the same (i think) 05:47 < ChrisPartridge> Majiir: sounds right to me 05:47 < Majiir> Cheers 05:48 < ChrisPartridge> BombStrike: if all else fails, ask over in #smartos 05:49 < BombStrike> hmmm will do, thanks 06:01 < ningu> is there a reason to prefer isNaN to foo === NaN? 06:02 < ningu> oh. because it actually works. hehe. 06:02 < XadillaX> Thx~ I think node-fibers worked~ 06:03 < XadillaX> function conn(callback1) { 06:03 < XadillaX> var mongoServer = new mongodb.Server("127.0.0.1", 27017); 06:03 < XadillaX> var db = mongodb.Db("7zcar", mongoServer); 06:03 < XadillaX> db.open(callback1); 06:03 < XadillaX> } 06:03 < XadillaX> function query(client, callback2) { 06:03 < XadillaX> var coll = new mongodb.Collection(client, "7z_admin"); 06:03 < XadillaX> coll.find({ "adminname" : "XadillaX" }).toArray(callback2); 06:03 < XadillaX> } 06:03 < XadillaX> self["index"] = function() { 06:03 < XadillaX> var connect = Future.wrap(conn); 06:03 < XadillaX> var find = Future.wrap(query); 06:03 < XadillaX> var client = connect().wait(); 06:03 < XadillaX> var coll = find(client).wait(); 06:03 < ningu> XadillaX: don't paste in here 06:03 < ningu> use pastebin or whatever 06:03 < Majiir> When calling a fn(err, result) callback in a 'no result' case, is it better to call fn(null, null) or simply fn()? 06:04 < ningu> Majiir: could there be a result? or is there never a result? 06:04 < ningu> if there is never a result I just do cb() 06:04 < ningu> but if there is a result, but it's null, I would probably do cb(null, null) 06:05 < Majiir> ningu: I sometimes call fn(null, result) with a result, but in some places I call fn knowing that there's no result. (I'm not sure I understand your question) 06:06 < ningu> Majiir: some callbacks just don't ever receive results, they are just triggered when something is done 06:06 < Majiir> ningu: Gotcha. So since sometimes I return a result, I should call fn(null, null) rather than sending undefined parameters. 06:07 < ningu> Majiir: it probably doesn't matter a lot, but yes, that's what I would do. I have no doubt others on here would find a reason to disagree. 06:07 < Majiir> Cheers. I figured it was pedantic, but I wanted to get into good habits. 06:09 < deathgaze> What do you guys think the best resource to learn node.js is? 06:10 < XadillaX> but how can i catch the error? 06:21 < ningu> XadillaX: is your error running? then you better go catch it! 06:31 < TehShrike> deathgaze: depends - how expert are you at JavaScript? 06:31 < deathgaze> TehShrike, I'm meh. Still learning. 06:32 < TehShrike> deathgaze: all right then, that'll be most of it. I'd recommend http://eloquentjavascript.net/contents.html 06:32 < deathgaze> Okies, thanks TehShrike ! 06:32 < TehShrike> JavaScript: The Good Parts would probably be a good thing to absorb as well, taken with a couple grains of salt 06:33 < deathgaze> TehShrike, I see that recommended a lot 06:33 < TehShrike> Those should get you in the realm of other JS developers 06:33 < deathgaze> I'll be certain to pick it up 06:33 < TehShrike> You can absorb those in a full day, though personally I'd sleep on some of the chapters of each (I had to) 06:34 < deathgaze> Wow, really? 1 day? Thats not a lot of time to learn a whole language! 06:34 < deathgaze> You must be an evil genius. 06:34 < TehShrike> Well, what's your programming experience beforehand? 06:34 < deathgaze> TehShrike, I'd best be described as a hobbyist looking to get serious. 06:35 < TehShrike> It's one days reading time. As someone with ~5 years professional programming experience, I had to sleep on several chapters (and ingest various drugs) over a couple weeks before it all made sense 06:35 < TehShrike> So, reading time != absorbing time 06:36 < deathgaze> Ah, gotcha 06:36 < ningu> TehShrike: what drugs would you recommend? 06:36 < deathgaze> ^^ 06:36 < deathgaze> Caffiene, I would wager. 06:37 < TehShrike> ningu: I'm really not sure, I think that's a pretty personal question. Personally, THC helped me break through a few early points of functional programming, and I've found it occasionally useful in refactoring besides. 06:37 < TehShrike> Caffeine is just assumed. 06:37 <@Nexxy> mushrooms are also great for that 06:37 < deathgaze> Cocaine seems like it would be a great coding drug. 06:37 < TehShrike> I've never tried anything harder than alcohol, personally 06:37 <@Nexxy> deathgaze, if you want your code to be horribly depressing in 30 minutes, sure 06:37 < deathgaze> lol 06:38 < TehShrike> I'm sure cocaine and LSD could have positive impacts on your code 06:38 < TehShrike> I haven't tried them 06:39 < ChrisPartridge> :| 06:39 < TehShrike> I won't pretend I'm not curious 06:39 <@Nexxy> there's no way you can program on anything but a very low dose of LSD 06:39 < TehShrike> I've done some reading 06:39 * deathgaze tried coke. Could never get any good LSD. 06:39 <@Nexxy> maybe there is, but I don't think it's very easy 06:40 < TehShrike> And it seems like LSD is mostly useful in changing worldviews for future work, not in doing work while in an altered state 06:40 <@Nexxy> TehShrike, that's true 06:40 < TehShrike> Same for shrooms, but with less chance of nightmarish trips, apparently 06:40 <@Nexxy> although I had a pretty amazing time *trying* to program on mushrooms 06:41 < TehShrike> lol 06:41 <@Nexxy> it's great for recognizing patterns 06:41 < TehShrike> Very interesting 06:41 <@Nexxy> everything is a pattern 06:41 <@Nexxy> (when you're on mushrooms) 06:41 < ChrisPartridge> i painted a whole room while on mushrooms.. in a rental home.. never again. 06:41 < deathgaze> Oh yeah, you've done shrooms alright. 06:41 <@Nexxy> ahaha 06:41 < TehShrike> So, my main impetus for using THC is because I can't turn my mind off, and that makes it really hard to sleep. 06:42 < TehShrike> THC lets my brain not concentrate on everything, and then I can sleep 06:42 < deathgaze> THC just makes my already-horrible ADD even worse. Try to minimize it. :# 06:42 <@Nexxy> modafinil? 06:42 < TehShrike> I haven't done it a lot, but when I have tried coding on THC, refactoring was much more natural 06:43 < TehShrike> Instead of having to think hard, I could just change a few functions around to the way they should be and go back to the rest of the app 06:43 < TehShrike> I didn't feel the cost of refactoring like I usually do 06:43 < TehShrike> I just fixed things 06:44 < TehShrike> And then 15 minutes later I was working with a less stupid version of the code 06:44 <@Nexxy> except it only felt like 15 minutes 06:44 <@Nexxy> it was actually 3 hours 06:44 < TehShrike> I mean, maybe in my top game it would have only taken 5 minutes... 06:45 < TehShrike> But still, it all felt natural :-P 06:45 < TehShrike> Unlike much refactoring I've done 06:45 < TehShrike> I won't claim it makes me more efficient 06:46 <@Nexxy> if it feels like it then that's all that matters :D 06:47 < TehShrike> But some of my earliest functional programming breakthroughs happened while writing some (I assume) pretty horrible code and gaining a realization that a FUNCTION could be applied to a group of THINGS that I had and whatever whatever I was high and then the next day JavaScript made more sense 06:47 <@mbalho> guize you guize everything is a thing oh my god objects are things oh my god 06:47 < TehShrike> Dude my function is a thing and then OH SHIT this other place where I have an array is also just a thing 06:47 < TehShrike> ALL THINGS RELATE TO OTHER THINGS OH MAN 06:49 <@mbalho> Nexxy: heres where i wanna put some raspberry pis http://goo.gl/maps/u8i0d 06:51 < seismo> ohai 06:53 <@Nexxy> mbalho, I support this effort 06:53 <@Nexxy> mbalho, did any of the stuff I mentioned yesterday help? 06:55 <@mbalho> Nexxy: i somehow got my raspi to halt on boot after it tries to read the sd card 06:55 <@mbalho> Nexxy: so im gonna reinstall the OS :( 06:55 <@Nexxy> ;< 06:55 <@mbalho> i wanna figure out if i can have it run in read only mode 06:55 <@mbalho> so that it wont eff up the sd card if i randomly turn it off 06:56 <@Nexxy> yea 06:56 <@Nexxy> you want the media card read only? 06:56 <@Nexxy> or the sd that it's mounted on 06:57 <@mbalho> the os boots from the sd card, i want linux to run in read only mode (with a manual override to go into writable mmode) 06:57 <@mbalho> its what the kindle does by default 06:57 <@Nexxy> ya that makes sense 07:01 <@Nexxy> mbalho, http://nodepdx.org/ 07:01 <@Nexxy> more specifically; https://github.com/nodepdx/nodepdx.github.com/tree/master/proposals 07:01 <@Nexxy> I know I already showed you 07:01 <@Nexxy> but new speakers and you should to 07:02 < deathgaze> Nice glasses. 07:03 <@Nexxy> deathgaze, me? or Ward? 07:03 < deathgaze> Nexxy! :0 07:04 < deathgaze> :) 07:06 <@Nexxy> thanks! :D 07:08 <@Nexxy> s5fs, 07:37 < faceleg> lol @ TehShrike 07:38 < faceleg> my breakthrough was when I realised that i'd never make a good income with psyc 07:46 < ningu> so in SQL ||/ means cube root 07:46 < ningu> just in case you were wondering 07:47 < Havvy> ningu: Wut? 07:48 < Havvy> Is |||/ the fourth root? 07:48 < Havvy> Or is that |/|/ ? 07:48 < ningu> Havvy: nope 07:48 < ningu> but |/ is square root 07:48 < ningu> try select ||/ 27 07:52 < Havvy> Why does SQL need square roots and cubic roots? 08:00 < faceleg> also mysql select 7 / 0 = null 08:01 < faceleg> it seems not only chuck norris may divide by 0 08:01 < ningu> postgres throws an error 08:02 < myhrlin> mysql, endorsed by chuck norris 08:04 < MiracleBlue> Hey all :) 08:17 < faceleg> so 08:17 < faceleg> about that massive "new" debate 08:21 < zaleb> what about it 08:22 < Havvy> faceleg: What 'new' debate? 08:22 < faceleg> it was epic 08:22 < faceleg> with neither side giving ground on what appeared to me to be a matter of opinino 08:22 < faceleg> opinion* 08:22 < faceleg> all very civil 08:23 < faceleg> but funny 08:23 < zaleb> https://www.youtube.com/watch?v=ya4UHuXNygM&t=50m23s 08:23 < Havvy> faceleg: Was that in here, or do you have a link? 08:23 < faceleg> it was in here 08:24 < Havvy> Can you pastebin it? 08:24 <@Nexxy> faceleg is exaggerating 08:24 <@Nexxy> it was just the same old nerd argument 08:24 < Havvy> I can't find it.... :/ 08:24 < faceleg> Nexxy: it was new for me 08:24 <@Nexxy> lol 08:25 <@Nexxy> there are just a lot of highly opinionated people 08:25 < faceleg> Nexxy: gross exaggeration is one of my more positive aspects 08:25 <@Nexxy> that apparently get paid to argue on the internet 08:25 < gildean> Havvy: you should be able to read yesterdays logs 08:25 * Nexxy points to topic 08:25 < faceleg> Havvy: it's not worth it 08:25 < Havvy> My scrollback goes back to 7PM. 08:25 < faceleg> logs.nodejs.org 08:26 <@Nexxy> I'm pretty sure ericelliott was just trying to pitch his blog + talks 08:27 < gildean> Nexxy: nah, i think he really doesn't like constructors for some reason 08:28 < Havvy> gildean: Maybe because when you think about it, they make absolutely zero sense? 08:28 < faceleg> omg please don't start 08:28 * faceleg secretly wishes they do 08:29 < nightfly__> What's a module equivilent/similar to Clojure's compojure? 08:29 < Havvy> faceleg: Maybe when minimax classes are implemented. 08:29 < faceleg> what is minimax? 08:30 < Havvy> It's the name for ES6 class syntax proposal. 08:30 < Havvy> Minimally maximal classes 08:31 < faceleg> wow 08:31 < faceleg> the name, it's beautiful 08:33 < XadillaX> Help -. - 08:34 < XadillaX> what's the deffierence between collection.save() and collection.insert() in mongodb of node.js 08:35 < gildean> XadillaX: save is a shorthand for an upsert, it'll update if present, insert if not 08:35 < XadillaX> :( 08:35 < XadillaX> present? 08:35 < gildean> XadillaX: exists 08:36 < XadillaX> i called save({ "abc": "a" }) 08:36 < XadillaX> and called it again 08:36 < XadillaX> but there're 2 records 08:36 < XadillaX> not update 08:37 < gildean> XadillaX: iirc it needs an _id field to perform an update 08:37 < gildean> yep, it does: http://docs.mongodb.org/manual/reference/method/db.collection.save/ 08:38 < XadillaX> that is 08:38 < XadillaX> thx 08:38 < gildean> np 09:11 < floby> Hello all 09:14 < floby> I have a question regarding streams2 :D 09:14 < floby> I've been looking at the objectMode options for readable and writable streams 09:16 < floby> while it is documented for readable streams 09:16 < floby> no mention of it for writable streams 09:16 < floby> while, this option is still used in the source code 09:16 < floby> for both streams 09:17 < floby> for writable streams, it seems that it's only used to disable encoding and validation 09:17 < floby> my question is 09:17 < floby> because the same option is used in both streams 09:17 < floby> with the same name 09:18 < floby> it seems that there is no way for a duplex stream to have different settings for its readable and writable sides 09:19 < floby> unless I never call Duplex.call(this, options) in my constructor and just do it myself 09:19 < floby> which I wouldn't recommend doing myself 09:22 < mikrowelt> hey guys how r you today? 09:22 < BadDesign> rock and rolling 09:23 < mikrowelt> that awesome)) 09:24 < mikrowelt> have any of you guys tried backbone.js on the node.js backend? 09:24 < floby> no 09:24 < igl1> views are kinda useless in node 09:24 < mikrowelt> if any1 did plz let me know what do you feel about it 09:25 < mikrowelt> u can use models and collections 09:25 < mikrowelt> and also use backbone on frontend 09:26 < BadDesign> igl1: useless?? what about express.js views? 09:26 < mikrowelt> he means backbone views 09:26 < mikrowelt> they r uselesss in node) 09:26 < igl1> aye 09:27 < BadDesign> hmm 09:27 < mikrowelt> im just looking for a good way to organize my code…. 09:33 < igl1> read more about organizing code… backbone alone won't magically solve your problem 09:35 < going_up> mrvisser 09:36 < going_up> mrvisser? 09:38 < BadDesign> No magic.js ? 09:42 < mtsr> backbone on the server is likely to make your code more complicated, not less 09:43 < faceleg> the name, it's beautiturth 09:43 < faceleg> truth* 09:43 * faceleg fistpump 09:54 < [AD]Turbo> hi there 10:45 < ozette> i am currently using node v0.9.6-pre, want to upgrade to node v0.10.1, can I just install v0.10.1 over my current installation? or is there some other way? I've heard about "nvm" is it ok? 10:46 < floby> you're probably safe installing v0.10 over whatever's here 10:46 < floby> but if you want to keep several versions of node, you can go with nvm 10:47 < ozette> aha, ok! i'll be fine with just the latest version 11:10 < mrvisser> Seems on the latest Joyent cloud images, I'm having trouble getting both hiredis and lib-expat installed, using node-gyp: https://gist.github.com/mrvisser/5262382 11:11 < mrvisser> I've already solved the c99 flag for hiredis, which is a PR currently w/ hiredis, but it runs into the same issue lib-expat does, which is: 11:11 < mrvisser> ld: fatal: file Release/obj.target/deps/libexpat/libexpat.a: unknown file type 11:12 < mrvisser> has anyone run into this? 11:15 < Kakera> if my module does not support 0.8, am I supposed to state that in the README, or is the user supposed to look in package.json? 11:26 -!- Topic for #Node.js: JIFASNIF - http://blog.nodejs.org/ - http://logs.nodejs.org - http://stackoverflow.com/questions/tagged/node.js 11:26 -!- Topic set by isaacs [~isaacs@173-203-97-118.static.cloud-ips.com] [Fri Mar 22 04:15:19 2013] 11:26 [Users #Node.js] 11:26 [@isaacbw ] [ cracken ] [ guilleiguaran_ ] [ Lorentz ] [ PhysX ] [ stalled ] 11:26 [@isaacs ] [ creationix ] [ guor ] [ Lorentz_ ] [ pig ] [ standoo ] 11:26 [@mbalho ] [ crescend1 ] [ guybrush ] [ lrvick ] [ Pilate ] [ stanislav ] 11:26 [@Nexxy ] [ crewmoss ] [ gwoo ] [ LuckyBurger ] [ Piotras_ ] [ stbuehler ] 11:26 [@ryah ] [ cronopio ] [ gyaresu_ ] [ luigy ] [ Pitel_IPEX ] [ stef ] 11:26 [ [[zz]] ] [ cTIDE ] [ hackygolucky ] [ luisbug ] [ plato ] [ stephank ] 11:26 [ [AD]Turbo ] [ cxreg ] [ hagbard_celine ] [ Lunar_Lamp ] [ point9repeating ] [ StephenS ] 11:26 [ [null] ] [ d-snp ] [ hakunin_ ] [ luruke ] [ polyrhythmic ] [ stereost1ve ] 11:26 [ \mSg ] [ D4RK-PH0ENiX ] [ halfhalo ] [ lushious ] [ pquerna ] [ stereosteve ] 11:26 [ ^esc ] [ d_d_d ] [ harth ] [ M2Ys4U ] [ prasm ] [ stonebranch ] 11:26 [ __main__ ] [ Daiz ] [ harthur ] [ Mack ] [ prawnsalad ] [ Str1ngS ] 11:26 [ _br_ ] [ daleharvey ] [ hatch ] [ madscientist- ] [ pretty_function ] [ stride ] 11:26 [ _janne ] [ Damn3d_ ] [ Havvy ] [ majek ] [ prettyrobots ] [ stuartmcfarlane ] 11:26 [ _sri ] [ dan_johnsin ] [ heath ] [ maletor ] [ PrgmrBill ] [ Stuk ] 11:26 [ _Steve_ ] [ danheberden ] [ heatxsink ] [ manacit ] [ prismatictrail ] [ stutter_ ] 11:26 [ `3E|BRB ] [ danmactough ] [ herbnerder ] [ manifesTT_ ] [ Proditor ] [ stylus ] 11:26 [ a_suenami ] [ darach ] [ herki1 ] [ ManneW ] [ prosquare ] [ styol ] 11:26 [ AAA_awright ] [ DarkArgon|away ] [ heroux ] [ manuelbieh ] [ Provito ] [ substack ] 11:26 [ Aartsie ] [ darkc0met ] [ hhuuggoo ] [ mape ] [ przemoc ] [ sugyan ] 11:26 [ aboudreault ] [ daslicht ] [ hij1nx ] [ Marak ] [ psino ] [ sunoano ] 11:26 [ abraxas_ ] [ daurnimator ] [ hipertracker ] [ marienz ] [ puddy ] [ superjoe ] 11:26 [ abstractj ] [ dawolf ] [ hipsterslapfight] [ marlun ] [ purr ] [ Sven_vB ] 11:26 [ adrianF ] [ dazoe ] [ Hosh ] [ maru_cc____ ] [ pvankouteren ] [ SvenDowideit ] 11:26 [ adrianlang1 ] [ dcamp ] [ hydrawat ] [ masch_ ] [ pyykkis_ ] [ Swaagie ] 11:26 [ aeberlin ] [ deadalus ] [ iain ] [ matjas ] [ qbit ] [ swajr ] 11:26 [ aesptux ] [ dearess ] [ iaincarsberg_ ] [ matt_c ] [ Quebert ] [ Swizec ] 11:26 [ agu10^ ] [ dec ] [ ianjm ] [ mattijs ] [ queequeg1 ] [ T-Co ] 11:26 [ Aikar ] [ decoder_ring ] [ ianjm_ ] [ mattp__ ] [ queequeg2 ] [ tahu ] 11:26 [ ajpiano ] [ deepy ] [ iapain ] [ maubh ] [ r126f ] [ tanepiper ] 11:26 [ akshayms ] [ defaultro ] [ ickyb0d ] [ Mchl ] [ radiodario ] [ tassmjau ] 11:26 [ alekibango_ ] [ defunctzombie_zz] [ icodefo__ ] [ mdevolving ] [ raffer ] [ tauren ] 11:26 [ alexwhitman ] [ deimos__ ] [ icodeforlove ] [ meckanis1 ] [ rafshar ] [ tbenb ] 11:26 [ aliljet ] [ dekz__ ] [ idefine ] [ med_ ] [ ragulka ] [ tchopper ] 11:26 [ AllStruck ] [ denysonique ] [ igl ] [ medice ] [ raja ] [ TDJACR ] 11:26 [ Amadiro ] [ Derander ] [ igl1 ] [ mekwall ] [ ralphholzmann ] [ teadict ] 11:26 [ aMoniker ] [ derhasi ] [ iksik_ ] [ MelkorNemesis ] [ ralphthe1inja ] [ tec27 ] 11:26 [ andrehjr ] [ dested ] [ ill0 ] [ melter ] [ Ralt ] [ techlife ] 11:26 [ andrew12 ] [ devaholic ] [ ilteris ] [ mephux ] [ rampr ] [ TechnoCat ] 11:26 [ andris9 ] [ devdazed ] [ im0b ] [ MerlinDMC ] [ randallagordon ] [ TehShrike ] 11:26 [ anildigital_work] [ dhpe ] [ inarru_ ] [ mertimor ] [ Rantanen ] [ tellnes ] 11:26 [ AntelopeSalad_ ] [ diffalot ] [ Incip ] [ meso_ ] [ rawtaz ] [ terietor ] 11:26 [ antiparticle ] [ digiwano_ ] [ infynyxx ] [ metadaddy__ ] [ rax0- ] [ terinjokes ] 11:26 [ arduix ] [ diminoten ] [ inimino ] [ metellus ] [ Raynos ] [ terite ] 11:26 [ arielserafini ] [ djazz ] [ inolen ] [ mferranti_ ] [ rcaskey ] [ TeslaTest ] 11:26 [ armetiz ] [ DjMadness ] [ Internet13 ] [ mfrauenh1ltz ] [ rcombs ] [ tg ] 11:26 [ asherkin ] [ djoot ] [ irclogger_com ] [ MI6 ] [ rcs ] [ thatguydan ] 11:26 [ ashnur ] [ dnyy ] [ ircretary ] [ mickhansen ] [ redshadowhero ] [ thedaywillcome ] 11:26 [ aslant ] [ dobber_ ] [ isaacs_ ] [ Miezel ] [ ree ] [ TheFuzzball ] 11:26 [ atatsu ] [ doffm ] [ ivan\ ] [ mihamina ] [ regality ] [ thejefflarson_ ] 11:26 [ average_drifter ] [ don_jones ] [ ivan` ] [ mikeal ] [ reid ] [ TheMoonMaster ] 11:26 [ AvianFlu ] [ DoniRS ] [ j0ni ] [ mikegerwitz ] [ remysharp ] [ therealkoopa ] 11:26 [ avital ] [ DonRichie ] [ jabberwocky ] [ mikey_p ] [ rendar ] [ thl0 ] 11:26 [ avital_ ] [ dooleyburger ] [ jackblack ] [ mikl ] [ retornam ] [ thread ] 11:26 [ awkorama ] [ dpemmons ] [ jaha ] [ mikrowelt ] [ retrostyle|me ] [ threesome ] 11:26 [ Ax_SeS ] [ Draggor ] [ jaket ] [ mirkok ] [ rgl ] [ till__ ] 11:26 [ azend ] [ Drajwer ] [ Jamiltz ] [ MitchW ] [ rgmarcha ] [ till___ ] 11:26 [ azhwkd ] [ drey ] [ jan____ ] [ MitchyNuts ] [ RichardBronosky_] [ tilleps ] 11:26 [ b1eedr ] [ drodger ] [ janmower ] [ mitemitreski ] [ riku ] [ Tim-_- ] 11:26 [ BadDesign ] [ DrPizza ] [ jaredrhine ] [ mjr841 ] [ rioter ] [ tim_smart|away ] 11:26 [ balboah ] [ DrShoggoth ] [ jareiko ] [ mmalecki[out] ] [ rmill ] [ tisba ] 11:26 [ balgarath ] [ drspin ] [ jasonrm ] [ mmarziani ] [ robertj ] [ tjfontaine ] 11:26 [ balgarath_ ] [ drudge ] [ JasonSmith ] [ mnaser ] [ robinson_k ] [ tkaemming_ ] 11:26 [ balupton ] [ dscape ] [ jayk ] [ mokush ] [ roel_ ] [ tklun ] 11:26 [ Bansku ] [ duncanbeevers_ ] [ Jaylee_ ] [ molnarg ] [ roger_rabbit ] [ tlync ] 11:26 [ baranaby ] [ dwierenga ] [ jayne ] [ MonkeyData ] [ roger_raymond ] [ togge ] 11:26 [ barneybook ] [ eb0la ] [ jb_ ] [ monokrome ] [ Rolken ] [ tokuhirom ] 11:26 [ bastinat0r ] [ ebright ] [ jbpros ] [ monteslu ] [ rom1504 ] [ tomaw ] 11:26 [ bbloom ] [ echo| ] [ jden|zz_ ] [ moonlite_ ] [ romainneutron ] [ tomb ] 11:26 [ bear ] [ ecthiender ] [ jefferai ] [ Morkel ] [ rounce ] [ TommehM ] 11:26 [ beau-_ ] [ ed209 ] [ jeffmjack ] [ MoRn ] [ rphillips ] [ toothr ] 11:26 [ beawesomeinstead] [ edr ] [ jesusabdullah ] [ Mortchek ] [ Rubennn ] [ topaxi ] 11:26 [ ben_alman ] [ eff ] [ jetienne ] [ mp_ ] [ rudolfrck ] [ topek ] 11:26 [ benatkin ] [ efoster_ ] [ jez0990 ] [ mpfundstein_ ] [ ruff ] [ topi` ] 11:26 [ bencevans_afk ] [ eighty4 ] [ jgaui ] [ mrkurt ] [ RushPL ] [ torgeir ] 11:26 [ bengl ] [ einaros_ ] [ jgornick ] [ MrMaksimize ] [ russell_h ] [ tornad ] 11:26 [ bentruyman ] [ eins78 ] [ jhgaylor ] [ MrNibbles ] [ russfran1 ] [ Torsten ] 11:26 [ Benvie ] [ ejnahc ] [ jimbot ] [ mrpibb ] [ rvagg ] [ tpatja_ ] 11:26 [ Bergle_1 ] [ elijah-mbp ] [ jimmyff ] [ mrvisser ] [ rwaldron ] [ track7 ] 11:26 [ beuk ] [ elliottc1ble ] [ jimt_ ] [ mscdex ] [ rworth ] [ trepatudo ] 11:26 [ bigkevmcd ] [ emattias ] [ jkarsrud ] [ mtsr ] [ ryanrolds ] [ trippeh ] 11:26 [ Bilge ] [ emilsedgh ] [ jlord ] [ mucker ] [ ryanseddon ] [ triptec ] 11:26 [ billy ] [ enobe ] [ jmaugue ] [ munro ] [ rybnik ] [ trodrigues ] 11:26 [ billybob_han ] [ epa_ ] [ jmoney ] [ myhrlin ] [ ryo ] [ truedat101 ] 11:26 [ bird_ ] [ Epeli ] [ JmZ- ] [ mynameis ] [ s00pcan ] [ ttt_ ] 11:26 [ bitfed ] [ EPIK ] [ joaojeronimo ] [ myndzi ] [ s3shs ] [ tuhoojabotti ] 11:26 [ bitZero__ ] [ ePirat ] [ joe-node0 ] [ n0cturnal ] [ s4muel ] [ tvw ] 11:26 [ blakmatrix1 ] [ er1c_ ] [ joebz ] [ nail_ ] [ s5fs ] [ txdv_ ] 11:26 [ Blorb ] [ ereslibre ] [ Joefish]off ] [ Naked_ ] [ sadtaco ] [ tyler ] 11:26 [ bmatusiak___ ] [ Erriond ] [ jol02 ] [ nanashiRei ] [ salazr__ ] [ tylersmith ] 11:26 [ Bob_Gneu ] [ eschnou ] [ jonaslund ] [ naquad ] [ Sam-T ] [ typesthings ] 11:26 [ Bob_Potato ] [ etiennesamson ] [ Jonghwan ] [ nathan7 ] [ samcat ] [ Typo ] 11:26 [ bodisiw ] [ euphoria|jacked ] [ joschi ] [ Ned_ ] [ SamuraiJack ] [ v^_^v ] 11:26 [ boffbowsh ] [ euskadi31 ] [ joshfinnie ] [ netiul ] [ sandfox ] [ v__ ] 11:26 [ BombStrike ] [ EvanCarroll ] [ joshie ] [ netj ] [ SargoDarya ] [ Validatorian ] 11:26 [ Bonuspunkt ] [ eventualbuddha ] [ joshthecoder ] [ neurom ] [ SargoDarya_ ] [ vervain ] 11:26 [ booo ] [ EvilJStoker ] [ jotadeveloper ] [ niclone ] [ satyr ] [ VesQ ] 11:26 [ booyaa ] [ ewalker ] [ jp232 ] [ nielsbusch ] [ sawjig ] [ vguerra ] 11:26 [ boundsj ] [ exos ] [ JPT ] [ niftylettuce ] [ sawrubh ] [ vigneshwaran ] 11:26 [ brain_shim ] [ extrawurst ] [ jrdn ] [ niggler ] [ sayd ] [ vitsaus ] 11:26 [ brain_shim_ ] [ Ezku ] [ jso ] [ nightfly__ ] [ schredder ] [ VS ] 11:26 [ brainproxy ] [ faceleg ] [ jtwalters ] [ nikkimccavee ] [ scott_gonzalez ] [ vsayer ] 11:26 [ braoru ] [ fairuz ] [ julianduque ] [ nikola ] [ sdboyer ] [ Wa ] 11:26 [ brettlangdon ] [ fastman ] [ juliangruber ] [ niloy ] [ SebastianFlyte ] [ wagtag ] 11:26 [ brianc ] [ faulkner ] [ jvolkman ] [ NimeshNeema ] [ sebmck ] [ wang_ ] 11:26 [ brianloveswords ] [ fcoury ] [ jw___ ] [ ninegrid ] [ sebv ] [ wedgeV ] 11:26 [ brianseeders ] [ fd_ ] [ jxie ] [ nkohari ] [ SecretAgent ] [ wereHamster ] 11:26 [ brocken ] [ fermion ] [ k1ng440 ] [ nlf ] [ Secutor ] [ wesbos ] 11:26 [ brooss ] [ filleokus ] [ Kai` ] [ No9 ] [ segomos ] [ whitedawg ] 11:26 [ brycebaril ] [ firedfox_ ] [ Kakera ] [ nobitanobi ] [ Segrel_ ] [ whyhankee ] 11:26 [ buibex ] [ flagg0204 ] [ Kaltiz ] [ NodeNewb ] [ seismo ] [ willwh ] 11:26 [ Bulk ] [ Fli-c ] [ kanyl ] [ nodokodo ] [ Sembianc1 ] [ willwhite ] 11:26 [ buritica ] [ floby ] [ kanzure ] [ Nodon ] [ Sembiance ] [ Will| ] 11:26 [ bytemask_ ] [ flock3_ ] [ karboh ] [ noducks ] [ seyz ] [ wivlaro ] 11:26 [ C0deMaver1ck ] [ fly-away ] [ karupanerura ] [ notalexgordon_] [ Shadda ] [ wizonesolutions ] 11:26 [ c1b3r1u5 ] [ flyth ] [ kazupon ] [ nuba ] [ Shadeness ] [ wolfeidau ] 11:26 [ Cainus ] [ FMJaggy ] [ kborchers ] [ Nuck ] [ shanlar ] [ wookiehangover ] 11:26 [ calvinfo ] [ Fofr_ ] [ keeto ] [ nullman ] [ shanse ] [ WorkingClassDev ] 11:26 [ candlejackson ] [ forzan ] [ Kester ] [ nutcase ] [ shaunch ] [ wramthun ] 11:26 [ carif ] [ fpuc_ ] [ kevinfagan ] [ NuZZ ] [ shesek ] [ wycats__ ] 11:26 [ carlmro ] [ frd|afk ] [ kinabalu ] [ nym ] [ shihan ] [ xdomox_ ] 11:26 [ carolyns ] [ freeside ] [ Kingdutch ] [ nzjames ] [ shoerain ] [ xfo ] 11:26 [ cce ] [ freethen` ] [ KiNgMaR ] [ o^_^o ] [ Shrink ] [ xk_id ] 11:26 [ ccohn ] [ Frippe ] [ klobucar ] [ obind ] [ shuaib ] [ xorox90 ] 11:26 [ cebor ] [ funkbox ] [ konobi ] [ Oddman ] [ Sicp ] [ xorspark ] 11:26 [ celogeek ] [ Furai ] [ kornnflake ] [ odyniec ] [ silky__ ] [ xSmurf ] 11:26 [ cfq ] [ fusiongrokker ] [ kppullin ] [ ofan ] [ silvers ] [ yacks ] 11:26 [ cha0s ] [ Fuu ] [ kraft ] [ ohcibi ] [ silvers_ ] [ yankhates ] 11:26 [ chakrit ] [ fwg ] [ krishna ] [ olegp_ ] [ simewn ] [ yawnt ] 11:26 [ chaobin ] [ FX80 ] [ kristofers ] [ OliverJAsh ] [ simius ] [ yhpark ] 11:26 [ chapel ] [ gabriel ] [ Kudos ] [ Omega_ ] [ sindresorhus ] [ yhpark_talk ] 11:26 [ chayin_ ] [ Gabriel403 ] [ kuja_ ] [ omni5cience ] [ sir_tyri1n ] [ yorn ] 11:26 [ Cheery ] [ ganzuul ] [ kzrl ] [ ootje_ ] [ sirecote ] [ YoY ] 11:26 [ cheese1756 ] [ garann ] [ L_star ] [ optixx ] [ SirFunk ] [ yuwang ] 11:26 [ chilts ] [ Garo__ ] [ lance|afk ] [ opus_ ] [ siyb ] [ yuya ] 11:26 [ chjj ] [ garren ] [ LanyonM ] [ Orbitrix ] [ skattyadz ] [ zackiv31 ] 11:26 [ chridal ] [ garthk ] [ larpzeit ] [ othiym23 ] [ skebcio ] [ zadark ] 11:26 [ chrisdickinson ] [ gaYak ] [ Lee- ] [ Outsider_ ] [ slajax ] [ Zak ] 11:26 [ Christian87 ] [ gdbz ] [ Leeol ] [ over_ ] [ Slashbunny ] [ zaleb ] 11:26 [ chunhao ] [ gde33|2 ] [ LeftWing ] [ owen1 ] [ SlexAxton ] [ zanea ] 11:26 [ ckknight_ ] [ geb ] [ legind_ ] [ oxyc ] [ slicky ] [ zarac ] 11:26 [ clarkk ] [ gerard0 ] [ leichtgewicht ] [ ozette ] [ Slipo ] [ Zauberfisch-idle] 11:26 [ ClaudioAlbertin ] [ gf3 ] [ LennyLinux ] [ pachet ] [ slurp ] [ zedas ] 11:26 [ clone1018 ] [ ghoti ] [ leo2007 ] [ Pagan ] [ Sly ] [ zeekay_ ] 11:26 [ coaster ] [ gildean ] [ LeoAtWork ] [ pandark_ ] [ smango ] [ zemm ] 11:26 [ codelahoma ] [ gim50 ] [ leonardo ] [ parasight ] [ smi^2 ] [ zenazn ] 11:26 [ codepal ] [ gkatsev ] [ leoncamel ] [ PARLIAMENT ] [ SNow ] [ zenodub ] 11:26 [ codingkevin ] [ glukki ] [ leptonix ] [ passcod ] [ so ] [ zeromodulus ] 11:26 [ Codynyx ] [ gnarf ] [ levi501d ] [ pats_Toms ] [ SomeoneWeird ] [ zinkem_ ] 11:26 [ coffeecup_ ] [ gorillatron ] [ lihnuz ] [ PaulCapestany ] [ Sonderblade ] [ zivester ] 11:26 [ conne ] [ Gottox ] [ linnea_ ] [ pc1oad1etter ] [ sordina3 ] [ zokeber ] 11:26 [ Connorhd_ ] [ graeme_f ] [ linq ] [ pcarrier ] [ sorensen ] [ zomg ] 11:26 [ conradev ] [ grantbow ] [ listochkin ] [ percival ] [ soypirate ] [ zonetti ] 11:26 [ context ] [ greg5green ] [ littlebearz ] [ Pete12 ] [ spencera ] [ zorzar ] 11:26 [ CookieNomster ] [ Gregor ] [ liwen ] [ peterbraden1 ] [ spion ] [ zot ] 11:26 [ copongcopong ] [ Gregor` ] [ ljharb ] [ petschm ] [ Spion_ ] [ Zoull ] 11:26 [ CornishPasty ] [ Grephix ] [ lmjabreu ] [ philips ] [ Spudly ] [ zykes- ] 11:26 [ couchquid ] [ Grun1 ] [ LocalPCGuy ] [ PhilK ] [ SpX ] [ zz_angrysock ] 11:26 [ Couto ] [ gsf ] [ locherm ] [ phI||Ip ] [ squeakytoy ] [ |Gobo| ] 11:26 [ CoverSlide ] [ gshipley ] [ Logicgate ] [ phuu ] [ SrPx ] 11:26 -!- Irssi: #Node.js: Total of 953 nicks [5 ops, 0 halfops, 0 voices, 948 normal] 11:26 -!- Channel #Node.js created Sat Jan 30 07:48:24 2010 11:27 -!- mode/#Node.js [+o ryah] by ChanServ 11:27 -!- Irssi: Join to #Node.js was synced in 26 secs 11:27 -!- Home page for #node.js: http://nodejs.org/ 11:29 < Jamiltz> Hi all. I'm using express's bodyParser and assign the body of a post request to data. Then I pass data to a get request. 11:30 < Jamiltz> but i would like to stream the body of the post to the get request 11:30 < Jamiltz> can i write data = new stream Readable() ? 11:35 -!- ServerMode/#Node.js [+o mbalho] by pratchett.freenode.net 11:41 < ak5> hi guys, can I ask a heroku related question here? 11:41 < ohcibi> hi i'm using zombie.js and whenever i .visit a site that has a script tag init, the script gets loaded twice... anyone an idea whats wrong? 11:41 < talus46> greetings 11:44 < ak5> hi, I have no web processes running for some reason on my very vanilla node.js + express app, I tried `heroku ps:scale web=1` and have a Procfile with 'web: node main.js' (main.js is my hello world app) 11:44 < ak5> sorry, this is on heroku 11:45 < chakrit> why was folder/index.js considered a bad idea? links? 11:45 < chakrit> s/bad idea/npm mistake/ 11:48 < chakrit> ak5: try heroku logs.. also please post some code. 11:49 < pomke> Hello :) 11:49 < chakrit> hi 11:49 < pomke> I'm not sure if anyone is familiar with python-twisted's perspectiveBroker (PB) 11:50 < chakrit> not me :/ 11:50 < chakrit> i think there are quite a few pythonistas here tho 11:50 < pomke> But it has a concept of capability based APIs 11:50 < ak5> chakrit: sure, my code is pretty simple, it's a hello world to test heroku, here you go: https://gist.github.com/5262565 11:50 < ak5> chakrit: that's `cat main.js package.json` 11:50 < ozette> whitespace in the "name" field of a package.json is considered non safe? eg { "name": "hello package" } 11:50 < chakrit> ak5: you have to listen on process.env.PORT 11:50 < chakrit> ak5: that's how heroku works. 11:51 < ak5> oh, ok, thanks 11:51 < pomke> you connect to a service, and when you authenticate, your 'avatar' on the server is blessed with capabilities (APIs you can call from the client). Now in the context of making REST/JSON api servers in node, this is a neat pattern 11:52 < pomke> What I see most (all?) connect based api servers in node doing is something like: define every API anyone could need, then in each, check the current user/session has permission to do this thing, then do it 11:53 < chakrit> pomke: i see what you mean. 11:54 < pomke> I'm wondering if anyone has messed around with the idea of a capabilities based API server, where when you authenticate and have a session, your session is 'blessed' with the APIs it is -allowed- the access, and that is all you can access 11:54 < pomke> I've been trying to work out how to do this with express/connect/etc 11:54 -!- mode/#Node.js [+o piscisaureus_] by ChanServ 11:55 < chakrit> pomke: that's a neat idea. i think you can do with a custom routing system on top of connect 11:55 < pomke> Really? hmm 11:56 < chakrit> pomke: maybe using something like: https://github.com/flatiron/director and plug it as a connect middleware 11:56 < pomke> In my plaing around with connect, it seems it's very much geared toward 'define some middleware with routes, map that to arout if you like' 11:56 < pomke> ooh *clicks* 11:56 < chakrit> pomke: not sure but iirc connect is just a middleware framework without any opinions on routing? 11:57 < chakrit> the one that does routing is expressjs i think 11:57 < pomke> I'm possibly getting them mixed up, Its been a while since I looked at connect appart from express 12:12 < mrvisser> anyone know when node-gyp typically gets installed? Is it bundled with nodejs? 12:16 < Jamiltz> hi, is it possible to pipe the body of a post request to a get request 12:16 < Jamiltz> still not sure what streams can or can't do 12:34 < mrvisser> I see, node-gyp gets bundled w/ NPM 13:03 < MI6> joyent/node: Marcin Kostrzewa master * 1f55704 : util: fix util.inspect() line width calculation Have the formatter filte - http://git.io/v6XGVA 13:44 < slicky> Is there a proper way to run, on windows, in node, the command "start /max http://address.com"? child_process exec/spawn/execFile and fork don't seem to work. 13:44 < slicky> maybe it needs to be "cmd.exe start /max address" 13:47 < inspiron> hello 13:48 < inspiron> I have a grunt task that I told to run in my "postinstall" section. It runs okay. But when I'm in another module that module as a dependency and I do an npm install, it says it can't find the grunt tasks modules 13:51 < tchopper> irssi 13:51 < zot1> sp 13:51 < zot1> doh 13:58 < agu10^> Hello guys! 13:58 < agu10^> I want to run node.js in the same server where I'm running apache 13:58 < agu10^> on the same port (80) 13:58 < agu10^> but for different domains. 13:58 < niggler> you can't agu10^ 13:59 < agu10^> any ideas? 13:59 < niggler> unless you use an intermediary 13:59 < agu10^> such as? 13:59 < GlitchMr> mod_proxy 13:59 < agu10^> ugh 14:06 < shesek> agu10^, you can, if each listens on a different network interface and IP address 14:06 < shesek> but that's probably not the case 14:06 < agu10^> it's not 14:07 < agu10^> what's the easiest way to get node working with apache? 14:07 < agu10^> without installing mods, etc 14:07 < agu10^> not much configuration either 14:10 < shesek> agu10^, the standard way to do that is using mod_proxy 14:10 < shesek> you could also do that with mod_rewrite, but I wouldn't 14:10 < agu10^> why not? 14:10 < agu10^> seems easier 14:10 < shesek> in either case, you have to use a module... and its not that hard to install a module 14:10 < agu10^> ok 14:10 < shesek> its usually just install apache2-XXX 14:18 < agu10^> shesek, how can I leave my node.js server running from the terminal? 14:18 < agu10^> and then stop it whenever i want 14:18 < agu10^> ? 14:18 < pomke> Not sure who I was talking two an hour or so ago about a capabilities based API server library.. but if you're interested I just wrote up some notes on how I see it working https://github.com/pomke/peanutbutter comments welcome before I start implementing it 14:19 < shesek> agu10^, during development, I usually run it inside a screen 14:19 < shesek> for production, I create an init script 14:19 < shesek> agu10^, that is, if you're on linux. are you? 14:19 < agu10^> yes. 14:19 < agu10^> ubuntu server. 14:19 < agu10^> an init script. and then a stop script? 14:21 < shesek> agu10^, you can create a file at /etc/init/APP.conf 14:21 < shesek> than start it with "start APP", stop it with "stop APP" 14:21 < shesek> and also have it automatically run on startup 14:21 < shesek> here's how that file looks: http://pastie.org/7150602 14:22 < shesek> its quite simple, look it up on google for more information 14:22 < shesek> alternatively, you can run it inside a screen - type "screen", run your app, than detach from the screen using ctrl-a ctrl-d 14:22 < shesek> than you can come back to the screen using "screen -r" 14:23 < agu10^> what is that 'screen' ? 14:23 < shesek> you can also open multiple windows inside the screen using ctrl-a ctrl-c, and switch between them using ctrl-a ctrl-" 14:24 < shesek> agu10^, you 14:24 < shesek> agu10^, you'll probably find better information on that on google than what I can provide you with] 14:24 < agu10^> ok 14:24 < pomke> If you're on ubuntu, byobu is a better* screen 14:24 < agu10^> hmm 14:25 < pomke> *better is a subjetive thing 14:25 < pomke> subjective 14:25 < agu10^> is there anything easier than using a screen? 14:27 < shesek> agu10^, using a screen is quite easy, and also pretty useful for a lot of other things 14:27 < shesek> agu10^, if you don't actually close your terminal, you can just set it to the background with an '&' at the end of the command 14:28 < shesek> e.g. "node app.js &" 14:28 < shesek> than come back to it with 'fg' 14:28 < shesek> s/set/send 14:29 < shesek> it'll still send STDOUT/STDERR to your terminal, so you might want to redirect it to /dev/null 14:30 < agu10^> shesek, that's easier. thanks! 14:30 < agu10^> what does fg mean? 14:30 < shesek> foreground 14:30 < pomke> ctrl+z will background it again, after you fg 14:31 < shesek> if you have multiple programs running in the background, you can also use %N (N being the number of the program) to get back to it 14:31 < pomke> er, I tell a lie 14:31 < pomke> ctrl+z then bg 14:32 < shesek> pomke, ctrl-z also suspends it, right? 14:32 < pomke> it suspends it 14:32 < pomke> then bg resumes it in the background 14:32 < shesek> than bg resumts it? 14:32 < pomke> you can also type jobs 14:32 < shesek> oh cool 14:32 < pomke> to list everything in the background/suspended 14:33 < pomke> the numbers returned by 'jobs' correspond to %N 14:33 < joonas> hey 14:33 < pomke> Hello 14:33 < joonas> should I be using `n` or `nvm` for managing my node.js versions? 14:33 < joonas> or something else? :) 14:33 < joonas> on a mac, that is 14:38 < slicky> Doesn't bg sometimes hang certain abilities with node? I think I've experienced that before, but I could be wrong. Might have been something else. 14:39 < agu10^> What's the best way to keep some of my apache websites and still running my node.js main website? 14:39 < slicky> Either way, bg/fg is not a good permanant solution. I'd recommend it only for testing and if you really just want to stash away something temporarily 14:39 < agu10^> and won't one website's error get the whole node.js server down? 14:39 < slicky> agu10^, not if handled properly 14:40 < JohnMcLear> agu10^ I use varnish cache in front of both, nginx is another option, there are many options. 14:40 < agu10^> how does it work? suppose i have two websites. 14:40 < agu10^> JohnMcLear, why do you use that? 14:40 < JohnMcLear> Varnish means I can set expiry headers and store static assets in memory 14:40 < JohnMcLear> Performance and High availability 14:41 < JohnMcLear> Also reverse proxying to various back ends, IE apache/nginx/node 14:41 < agu10^> why is it 'reverse' proxying? 14:41 < pomke> Node can error in ways that will bring down your service even if you carefully handle errors. C libraries you decide to use, database drivers, etc, this isn't erlang.. be prepared to start your service again if for some reason it stops 14:41 < JohnMcLear> because it's incomming traffic, as opposed to outgoing 14:41 < JohnMcLear> I feel like you could of used a search engine to find that out.. 14:42 < JohnMcLear> pomke: See node Domains 14:42 < JohnMcLear> I agree with your sentiment but it sounds like you need to understand how node has built in functionality to mitigate that risk 14:43 * pomke reads about domains. 14:43 < pomke> ty :) 14:43 < JohnMcLear> I'm sure you understand it btw, just wanted to share :) 14:43 < JohnMcLear> np :) 14:47 < pomke> Ok that is something I wasn't aware of that's pretty cool 14:54 < agu10^> Ok, so I did sudo node server.js & 14:54 < agu10^> and then i do 'fg'. How do i put it back again now? 14:56 < [AD]Turbo> did you guy see the following article? http://www.techempower.com/blog/2013/03/28/framework-benchmarks/ 14:58 < shesek> agu10^, ctrl+z then bg 14:59 -!- mode/#Node.js [+o piscisaureus_] by ChanServ 15:03 < kornnflake> I'm fairly new to node, any idea how to access a var outsite the callback? http://paste.pm/5nf.js 15:04 < kornnflake> That one gives me the following error: Cannot call method 'push' of undefined 15:05 < SomeoneWeird> kornnflake, that should work, but use = []; instead of = new Array(); 15:06 < kornnflake> doesn't work sadly, gives me this error: "TypeError: Cannot call method 'push' of undefined" 15:08 < shesek> kornnflake, it should work, there must be something else that's causing your issue 15:08 < Noriandir> hi. I'm using javascript through nodejs to make a script that interacts with the user and sends some data to a server. I'm having some problems debugging it, any sugestions on how to debug this? i'm trying to debug currently with: nodejs debug app.js 15:08 < kornnflake> yea thanks, just tried it with a string var, that works 15:08 < kornnflake> guess i can't use .push on a emtpy array 15:09 < SomeoneWeird> kornnflake, you can 15:09 < SomeoneWeird> >> [].push('lol') 15:09 < purr> SomeoneWeird: (number) 1 15:09 < SomeoneWeird> -.- 15:09 < SomeoneWeird> >> [].push('a'); [] 15:09 < purr> SomeoneWeird: (object) [] 15:09 < SomeoneWeird> lol 15:09 < SomeoneWeird> wat 15:09 < SomeoneWeird> oh der 15:09 < kornnflake> :p 15:09 < SomeoneWeird> >> a = []; a.push('lol'); a 15:09 < purr> SomeoneWeird: (object) ['lol'] 15:09 < SomeoneWeird> there 15:09 < SomeoneWeird> so 15:10 < FPSJosh01> lol 15:10 < FPSJosh01> >> a 15:10 < purr> FPSJosh01: ReferenceError: a is not defined 15:10 < FPSJosh01> :O 15:10 < FPSJosh01> :( 15:12 < zot> best practice: got my C/++ extension thing going, but in order to support EventEmitter pattern and other things, it will be wrapped. Better form/more the normal to: make FunkyCore the extension, and Funky is the exported JS class, which wraps/passes through many funcs, and offers additional functionality where needed, OR just modify the prototypes during load up time, and avoid the pass through funcs? 15:13 < MI6> joyent/libuv: Saúl Ibarra Corretgé v0.10 * a9a23dc : unix: don't clear flags after closing UDP handle - http://git.io/yJag6Q 15:14 < agu10^> How should I upload my files? 15:14 < agu10^> I develop locally but i want to easily update the server files 15:14 < agu10^> but i don't want to upload through FTP :( 15:14 < agu10^> is there any way to 'detect' modified files and send them to server automatically? 15:14 < bnoordhuis> zot: use wrappers 15:14 < agu10^> using git maybe? 15:15 < zot> bnoordhuis: manual passthroughs normal, or are there inheritance/other tricks to use that can avoid the repetitive junks? 15:15 < bnoordhuis> zot: unless your c++ code is prepared to handle cases where args.This() != args.Holder() 15:16 < bnoordhuis> zot: rule of thumb is to export pure JS classes that delegate to binding code 15:16 < zot> since I don't know the difference between This and Holder, probably not. I've mostly used the zookeeper module as a guide, but the code is fairly simply so far. 15:16 < zot> s/simply/simple/ 15:17 < Noriandir> can anyone help me? 15:17 < kornnflake> >> var a = []; a.array = [], typeof a.array 15:17 < purr> kornnflake: (string) 'object' 15:18 < bnoordhuis> zot: f.e. my_binding_func.call({}) will blow up if your function expects that args.This() is an object you created (e.g. with an InternalFieldCount() > 0) 15:18 < FPSJosh01> npm ERR! msnodesql@0.2.1 install: `node scripts/install.js` << Looks like I'm going to have a good day today 15:18 < bnoordhuis> Noriandir: that depends entirely on what you need help with 15:18 < zot> bnoordhuis: kk, tnx. 15:18 < bnoordhuis> Noriandir: i'm not great with tax forms, for example 15:19 < Noriandir> bnoordhuis, i've done the question a little above. but i'll write it again. 15:19 < Noriandir> bnoordhuis, I'm using javascript through nodejs to make a script that interacts with the user and sends some data to a server. I'm having some problems debugging it, any sugestions on how to debug this? i'm trying to debug currently with: nodejs debug app.js 15:19 < julianduque> bnoordhuis: oh thats bad :/ I can't fill my tax forms and I'm frustrated... heheh jk 15:20 < FPSJosh01> noriandir: the best I've done is set up an HTTP server with a html callback to update a log on the page 15:20 < julianduque> Noriandir: use debug; expression and node-inspector 15:20 < Noriandir> bnoordhuis, it seams that the script completelly ignores the user input 15:20 < julianduque> Noriandir: http://docs.nodejitsu.com/articles/getting-started/how-to-debug-nodejs-applications 15:20 < FPSJosh01> or you can do what julianduque says 15:21 < Noriandir> julianduque, with debug it doesnt asks for the user input (at least it didn't seam to do so) 15:21 < FPSJosh01> Was hoping I could get some help debugging this NPM install error. npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "msnodesql" "-g" 15:22 < julianduque> Noriandir: debug is a breakpoint, so you need to execute each steps with node inspector, also, how are you receiving the input from the user? 15:22 < julianduque> Noriandir: prompt? 15:22 < Noriandir> julianduque, and i've already tried node-inspector, through that site. but again, the user input never seams to be asked. 15:23 < Noriandir> julianduque, the user input comes from a linux terminal 15:23 < Noriandir> julianduque, keyboard text 15:23 < FPSJosh01> does anyone know where the scripts go before they get installed using NPM 15:24 < FPSJosh01> so I can at least take a look at what is being run? 15:24 < Noriandir> julianduque, http://pastie.org/7151457 15:26 < FPSJosh01> Guess you guys are really busy :\ 15:27 < Noriandir> FPSJosh01, which OS are you in? 15:27 < agu10^> What deployment tool do you suggest to get my website from windows 8 into my VPS server on ubuntu server? 15:27 < sha0> which http/https client do you recommend? 15:27 < sha0> module i mean 15:27 < FPSJosh01> Windows 7 x64 15:27 < FPSJosh01> node_modules, right? 15:28 < Noriandir> FPSJosh01, no idea. I use a linux system. sry 15:29 < FPSJosh01> noriandir, can I send a screen shot here to show you the output I'm getting? 15:29 < Noriandir> FPSJosh01, sure. put it at a imagehost page 15:30 < zot> bnoordhuis: suggested examples for how to layout/arrange this kind of thing? 15:31 < sha0coder> which is the best module for perform http/https client connections? 15:32 < bnoordhuis> zot: maybe my node-iconv module? 15:32 < FPSJosh01> http://imgur.com/cvjdplI 15:32 < bnoordhuis> there's probably better examples but that's the best i can come up with right now :) 15:32 < FPSJosh01> >> a = "hi" 15:32 < purr> FPSJosh01: (string) 'hi' 15:32 < FPSJosh01> >> a 15:32 < purr> FPSJosh01: ReferenceError: a is not defined 15:33 < FPSJosh01> Oh I see lol 15:33 < FPSJosh01> Cool bot 15:33 < julianduque> Noriandir: well 15:33 < julianduque> Noriandir: put the debugger; directive, then `node --debug-brk yourcode.js` 15:33 < julianduque> Noriandir: then run inspector and you will be fine by now 15:35 < FPSJosh01> msnodesql has compatibility issues with windows 7 x64 on node 0.10.x, I guess I just want to understand exactly what isn't working. 15:35 < Noriandir> julianduque, put the debugger directive? 15:35 < julianduque> Noriandir: the breakpoint 15:36 < julianduque> Noriandir: https://gist.github.com/julianduque/e9c1f4b3b005d92219c7#file-ghcopy-txt-L63-L75 15:36 < zot> bnoordhuis: coolio. just looking to see what's normal, so i can ignore it and claim to do it better, of course ;) 15:36 < julianduque> well, i'm off 15:37 < julianduque> see ya 15:38 < Noriandir> julianduque, tks 15:38 < Noriandir> julianduque, cya 15:49 < MI6> joyent/node: Suwon Chae master * 120e5a2 : os: use %SystemRoot% or %windir% in os.tmpdir() On Windows, respect the - http://git.io/cmolKg 15:49 < draginx> if I'm console.log'ing in a file that's being mocha'd, why is it not showing up anywhere? :/ 15:51 < draginx> And I know for *sure* that one of the tests should be failing but it doesnt :/ 15:52 < zaleb> console overwritten? 15:52 < draginx> no i dont think so 15:52 < draginx> but whats weird is.. if i do asyncrnous testing it actually works 15:53 < draginx> but syncrnous doesnt :/ 15:53 < MI6> joyent/node: bruston v0.10 * e103778 : doc: debugger, dns, http: fix grammar - http://git.io/dqj3Dg 15:54 < MI6> joyent/node: Benjamin Ruston v0.10 * 024a8b0 : doc: debugger, dns, http: fix grammar - http://git.io/SBKISw 15:54 < draginx> let me try throwing in some describes() 16:02 < matbee> I'm having some issues with SockJS.. Anyone know how I could go about using it via bookmarklet? I'm getting an Access-Control-Allow-Origin error. 16:06 < mtsr> matbee: The server hosting the javascript for your bookmarklet should send Access-Control-Allow-Origin: * header 16:07 < matbee> mtsr, Can't happen ^_^, how else could I get it running? Socket.IO runs just fine.. 16:07 < mtsr> And I mean the javascript you're injecting in the bookmarklet 16:08 < matbee> oh 16:08 < matbee> lets see :) 16:08 < mtsr> When injecting additional javascript on another page, the browser rejects it unless the ACAO header is set 16:08 < mtsr> You could do JSONP I guess 16:08 < matbee> I'll try setting the header and see what happens 16:08 < alchimis_> any link to a tutorial for openstack 16:09 < alchimis_> i mean openstack with pkgcloud 16:09 < alchimis_> thanx 16:09 < bdemers> alchimis_: use it or set it up ? 16:10 < alchimis_> using pkgCloud, create instance and ... 16:10 < alchimis_> openstack is already setup 16:10 < kenperkins> streams in 0.10 start paused, right? 16:11 < kenperkins> alchimis_: what's up? i work on openstack and rackspace with node all day :P 16:11 < bdemers> ahh, i see, i cannot help. i've used openstack via a couple chef plugins 16:12 < alchimis_> I am using pkgCloud module to create insetance on amazon ec2, now I want to be able to do the same on opestack 16:12 < bdemers> Is anyone creating a application bundle with npm (or similar tool) which I can then move from server to server (without running npm on each server) 16:12 < alchimis_> I need a simple example like this http://blog.nodejitsu.com/introducing-pkgcloud 16:13 < alchimis_> or something like this https://github.com/nodejitsu/pkgcloud/blob/master/examples/compute/amazon.js , but for opnestack 16:13 < kenperkins> do you have an openstack endpoint you can provision against 16:14 < alchimis_> yes, I have a server, which already run openstack 16:15 < alchimis_> actually i can acess to openstack dashboard and create instance 16:15 < kenperkins> ... 16:15 < alchimis_> but now I wanna be able to do it through pkgCloud, 16:16 < alchimis_> i did a search on google, but i dont find any example how to create an instance using pkgcloud, may be i can see the source code and see what is expecting 16:16 < kenperkins> alchimis_: you just have to configure pkgcloud to use your openstack credentials and endpoint, and then it should be mostly the same as ec2 16:17 < alchimis_> infact that is what I need, i mean for amazon i put this https://github.com/nodejitsu/pkgcloud/blob/master/examples/compute/amazon.js 16:17 < alchimis_> what is the equalent of this for openstack 16:17 < kenperkins> I'll have to look 16:19 < alchimis_> thanx 16:21 < dscape> alchimis_: i could swear pkgcloud had open stack support 16:22 < dscape> https://github.com/nodejitsu/pkgcloud/tree/master/lib/pkgcloud/openstack 16:22 < alchimis_> I know, i just wanted to know of any example of how to use it 16:22 < dscape> alchimis_: ask cronopio 16:22 < dscape> open an issue and ask, he wrote the code 16:22 < Beck_> Hi people! 16:22 < dscape> open stack is similar enough to rackspace though 16:22 < substack> beep boop 16:22 < Beck_> Need help over here :( 16:23 < Beck_> https://github.com/joyent/node/issues/5160 have this kind of problem, was directed here :) 16:23 < Beck_> Have anyone seen this problem before? 16:23 < alchimis_> dscape: thanx, if it is similare to rackspace, then i can maybe use the rackspace example, thanx again 16:23 < Beck_> How to debug node, to see the message, why it port binding was rejected? 16:23 < kenperkins> rackspace compute is openstack, FYI 16:24 < Beck_> *it's 16:24 < kenperkins> I'm working on rackspace and openstack canonical providers, which will be back-integrated into pkgcloud 16:25 < sirkitree> thrash thursday: http://turntable.fm/lullabot \m/ 16:27 -!- mode/#Node.js [+o isaacs] by ChanServ 16:28 < Beck_> isaacs hello) 16:28 < Beck_> i know you can help me :) 16:28 < Beck_> you are one of the main devs out there ) 16:28 < Beck_> aren't you? :) 16:33 < Beck_> silence :D 16:33 < Beck_> ppl what are you all doing here? 16:33 < wallunit> How can I use underscore in a node.js script? I have installed underscore with 'npm install -g underscore', but require('underscore') fails. 16:33 < slicky> sleeping 16:33 < slicky> shhh 16:33 < eXeC001er> Hi. 16:33 < Beck_> so much people online and such silence) 16:34 < Beck_> :D 16:34 < eXeC001er> I have a problem with uv_poll. I cannot call JS-callback from its handler. Is it OK ? 16:34 < Beck_> Can anyone help out here? :) 16:34 < pachet> wallunit: npm install underscore locally 16:34 < pachet> in your project directory 16:35 < wallunit> pachet: Is that the only way? 16:35 < slicky> Beck_, are you sure the network interface has had time to init and be listen-able? 16:35 < wallunit> I mean what is the -g (global) switch useful for then? 16:35 < Beck_> slicky nope 16:35 < Beck_> that's why i'm asking 16:36 < Beck_> i have set my node.js scripts launch into S95 level of boot sequence 16:37 < pachet> wallunit: for running packages and scripts in the shell 16:37 < Beck_> like that: update-rc.d restart.sh defaults 95 16:37 < daurnimator> is there an atexit handler? 16:37 < daurnimator> I found process.on("exit") 16:37 < daurnimator> but I want to capture more things, e.g. dying via ^C 16:38 < wallunit> pachet: So only global installed packages can use global installed libraries? 16:38 < pachet> wallunit: typically global installed packages would have local dependencies 16:38 < Beck_> I guess i have to use another startup manager, which have an option to start after network is ready to be bind to. 16:38 < pachet> wallunit: https://npmjs.org/doc/link.html if you're feeling dangerous 16:41 < slicky> Beck_, my guess is it hasn't had time to init yet and it can't bind to the address you've specified. Try ordering it later if possible or run something else in it's place to give you some output of the status of the interface 16:45 < Beck_> I have remembered that there were an option like this - "start on started mountall" in upstart manager 16:45 < Beck_> from upstart docs 16:45 < Beck_> The upstart-udev-bridge job will at some point emit the "net-device-up IFACE=lo" event signifying the local network (for example, 127.0.0.0 for IPv4) is available. 16:46 < Beck_> guess i'll have to write a proper upstart script for starting nodes 16:46 < Beck_> guess this should be added to node.js wiki 16:46 < Beck_> Here is nice article http://kvz.io/blog/2009/12/15/run-nodejs-as-a-service-on-ubuntu-karmic/ 16:55 < sha0coder> Error: CERT_HAS_EXPIRED 16:55 < sha0coder> how to ignore the cert check 16:55 < sha0coder> on https connections? 16:55 < Bansku> how about fixing the cert problem 16:59 < Beck_> Thank you. I'm out) 16:59 < kenperkins> mikeal did you add streams2 support to request? you don't have a changelog :( 17:00 < sha0coder> BadDesign: is not my host 17:00 < sha0coder> with curl -k ignores the certs problems 17:01 < dayom> oi 17:13 < ganzuul> MAHAHAHA! 17:13 < ganzuul> \o/ 17:13 * ganzuul contines hacking in silence 17:17 < ak5> hi guys, what considerations do I need to make when choosing a templating language? I have looked at haml and jade and both seem pretty similar to me. 17:18 < alchimis_> kenperkins: one question about openstack, if u see this example http://blog.nodejitsu.com/introducing-pkgcloud about rackspace, i think also for openstack i have to be able to provid in auth a token 17:19 < alchimis_> my question is from openstack dashboard, I should be able to download the auth token? 17:19 < kenperkins> alchimis_: let me explain it a bit for you 17:19 < alchimis_> or what the token contains 17:19 < alchimis_> thanx 17:19 < kenperkins> openstack provides no less than 2 ways to authenticate: one with username/password, another with a token 17:19 < kenperkins> if you use username/password in your auth call, you'll get back a token you can use in other requests 17:19 < kenperkins> pkgcloud should be hiding this from you 17:20 < kenperkins> let me look 17:20 < alchimis_> but what is the username/password, the one that I am using for dashboard 17:20 < alchimis_> ok 17:21 < alchimis_> kenperkins: here u r the link https://github.com/nodejitsu/pkgcloud/tree/master/lib/pkgcloud/openstack 17:22 < kenperkins> alchimis_: I already have the source local :D 17:22 < alchimis_> :) 17:22 -!- mode/#Node.js [+o TooTallNate] by ChanServ 17:22 < MI6> joyent/node: isaacs v0.10 * 5ae26f3 : doc: Add 'don't ignore errors' section to domain Also, an example progra - http://git.io/jKVHMw 17:22 <@isaacs> crabdude: ^ 17:22 <@isaacs> crabdude: relevant to your interests :) 17:23 < batabo> hi! 17:24 < batabo> trying to fetch styles 17:24 < deepy> Is anyone using jdub/node-twitter? I am having a hard time figuring out if I can actually make a post from it 17:24 < batabo> using jsdom 17:24 < deepy> oh. right. updateStatus 17:25 * deepy proceeds to facepalm 17:27 < master_op> hi, i'm using express js, how can i redirect from post to get (res.redirect) 17:28 < kenperkins> alchimis_: what are you using for an openstack service? 17:30 < alchimis_> opentack is configured by some one else, how can I understand what I am using, I have account on dashboard 17:30 < batabo> anyone with jsdom experience? 17:31 < MI6> joyent/node: isaacs v0.10 * 929e4d9 : stream: Emit readable on ended streams via read(0) cc: @mjijackson (+1 more commits) - http://git.io/Xb3Rfw 17:31 < kenperkins> alchimis_: what I mean is this: who are you using provide you an openstack experience? 17:31 < kenperkins> who is the service provider 17:31 < batabo> anyone with jsdom experience? 17:32 < trypwire> hey guys. what prevents somebody from distributing copyrighted files via npm? It's essentially a file transfer mechanism… 17:32 < kenperkins> ... 17:32 < alchimis_> it is an internal, configured in university that I am studying 17:32 < alchimis_> so it is an experimental 17:32 < kenperkins> alchimis_: ok, that helps 17:32 < nathan7> trypwire: Angering isaacs. 17:32 < kenperkins> you need to ask what the identity url is 17:32 < ljharb> trypwire: there's far easier ways of doing that 17:33 < kenperkins> alchimis_: it will look something like http:///v2.0/tokens 17:33 < trypwire> ljharb: i suppose that's true 17:33 < trypwire> i'm just curious because i really like OSS 17:33 < trypwire> but the easier we make it to share 17:33 < trypwire> the easier we make it for people to illegally abuse our software 17:33 < ljharb> lol that's not a real problem 17:34 < ljharb> copyright lawsuits are half jokes already anyways 17:34 < trypwire> well i ask cause i'm starting a project to help artists distribute openly licesned tracks (music) 17:34 < kenperkins> alchimis_: https://gist.github.com/kenperkins/5265195 17:34 < trypwire> and at the end of the day this is just another file transfer mechanism 17:35 < batabo> anyone with jsdom experience? 17:35 < trypwire> know what i mean? 17:35 < kenperkins> batabo: are you going to keep asking every 2 minutes? :P 17:35 < nathan7> trypwire: yes 17:35 < batabo> well yeah... hoping someone might appear,,, sorry! :) 17:35 < nathan7> trypwire: You're on IRC 17:36 < nathan7> trypwire: A transfer mechanism for bytes 17:36 < alchimis_> kenperkins: as uername/password, I have to put, the one that I have for dashboard? 17:36 < nathan7> trypwire: IRC file sharing has been around longer than I've been on this planet 17:36 < kenperkins> alchimis_: likely yes, realize you need to change the authRul 17:36 < trypwire> nathan7: heh, true 17:36 < kenperkins> authUrl rather 17:36 < nathan7> GitHub has had DMCAs. 17:36 < trypwire> nathan7: i mean i'll happily accept the answer that worrying about this is a waste of time 17:36 < nathan7> The npm registry is slow. 17:36 < trypwire> but i can't help but being curious 17:37 < nathan7> Plenty of fast places to host shit. 17:39 < alchimis_> yeah, thanx 17:45 < istvanskeri> Hello everyone my node app uses backbone so its a single page app 17:45 < MI6> joyent/node: wicked v0.10 * 39058be : setTimeout: do not calculate Timeout._when property Dramatically improve - http://git.io/yC_7mA 17:46 < istvanskeri> so my app route is app.get('/' but i need to be able to see where exactly which url people are coming in from 17:46 < istvanskeri> because backbone uses a /#/client/1 hastag mount 17:47 < istvanskeri> is there any way to see which hastag mount people are coming in from on the server side? 17:47 < shesek> istvanskeri, no. its not sent to the server in the HTTP request at all 17:47 < shesek> you can only access it from client-side code 17:48 < istvanskeri> so can i set a cookie on the client with the path and then try to access that cookie on the server? 17:48 < istvanskeri> I am trying to verify my socket connections 17:49 < istvanskeri> I want to add everyone who is coming through a hastag to a clients array 17:49 < istvanskeri> to keep track of clients connected through socket 17:49 < istvanskeri> the app also has a backend route /controller 17:50 -!- mode/#Node.js [+o piscisaureus_] by ChanServ 17:50 < istvanskeri> i dont want anyone coming in through /controller route to be added to the clients array 17:51 < istvanskeri> so I need to distinguish between people using my backbone app and admins using /controller 17:52 < batabo> anyone with jsdom experience? 17:55 < SandorKrasna> so basically my question is : How do I keep track of connected socket clients. I want all my socket connections that use bacbkone route #/client/1 to be added to my connected clients array but people who are coming in through other routes (also socket io connections) to not be added to that array 17:56 < SandorKrasna> so I need to know how people are connecting to the socket, I was thinking i could set a cookie on the backbone side and then look for that cookie on the server side 17:56 < SandorKrasna> is there a preferred method to do this? 17:56 < FellowMD> can't you have two different socket endpoints to connect to? 17:57 < FellowMD> Different server routes or something? 17:57 < SandorKrasna> does that mean i have to have two instances of the server running? 17:58 < SandorKrasna> can you have different socket endpoints in one server app 17:58 < SandorKrasna> that would be perfect 17:58 < FellowMD> I haven't done it myself, but I hope you could 17:58 < FellowMD> var io = require('socket.io').listen(80); 17:58 < FellowMD> var io = require('socket.io').listen(8080); 17:58 < FellowMD> var ioAdmin = require('socket.io').listen(8080); rather 17:58 < FellowMD> give it a shot? 17:59 < SandorKrasna> can ioAdmin send messages to io? 18:00 < FellowMD> I don't thins o, because they're both socket.io servers, not clients 18:00 < SandorKrasna> yea 18:00 < SandorKrasna> thats the thing, the admin needs to send messages to the clients 18:01 < gildean> also socket.io requires a http-server instance to listen on, not a port on it's own 18:02 < FellowMD> maybe you'd be better off having separate server processes for admins and clients 18:02 < FellowMD> and using inter-process communication? 18:02 < SomeoneWeird> gildean, not true 18:02 < gildean> SomeoneWeird: no? i thought it needed a server to use 18:03 < SomeoneWeird> it can piggyback on one, yes, pretty sure it doesn't though 18:04 < MI6> joyent/node: Fedor Indutny v0.10 * 4580be0 : tls: handle SSL_ERROR_ZERO_RETURN see #5004 - http://git.io/Mb93AQ 18:05 < SandorKrasna> I can use the referer var in the header to see where the request is coming from 18:05 < SandorKrasna> is the referer is an admin trying to use the socket i can omit it from adding that socket to the connected clients 18:06 < SandorKrasna> all socket clients will be coming in through root / but admins will be making requests with /controller 18:07 < SandorKrasna> so i can check in the handshakeData during io authorization 18:07 < SandorKrasna> does that sound right? 18:08 < FellowMD> sounds fine, give it a shot 18:31 < `3rdEden> can someone ban ClwFngr he's spamming porn PM's when you enter the channel cc/ @isaacbw isaacs Nexxy 18:31 -!- mode/#Node.js [+o bnoordhuis] by ChanServ 18:32 < `3rdEden> or bnoordhuis :) 18:32 -!- mode/#Node.js [+b *!*clwfngr@*.mullvad.net] by bnoordhuis 18:32 -!- ClwFngr was kicked from #Node.js by bnoordhuis [fsck off spammer] 18:32 < `3rdEden> THanks 18:32 <@bnoordhuis> i guess someone should report him to the freenode admins 18:32 < tjfontaine> bnoordhuis: reported to the ones I know 18:32 < SomeoneWeird> i guess most of the active people are in here 24/7 so they don't notice it 18:34 < tjfontaine> bnoordhuis: [03-28] 14:30:03 < tomaw> gone 18:34 <@bnoordhuis> sweet 18:34 -!- mode/#Node.js [-o bnoordhuis] by bnoordhuis 18:37 < zenetik> mscdex: ping 18:38 < styol> Anyone familiar with node-webkit-agent that might be able to shed some light into what it might mean if the Object constructor > builtins > global is retaining the largest amount of memory? 18:39 < bnoordhuis> styol: probably that you're missing a var keyword somewhere 18:39 < bnoordhuis> styol: e.g. `i_think_this_is_a_local_var_but_its_not = new BigObject` 18:40 < styol> bnoordhuis: hrms. I'm using jshint and it should let me know about that. I'm thinking it is something about my general design pattern, but I'm not sure 18:40 < MI6> joyent/node: isaacs v0.10 * dea0634 : npm: Upgrade to v1.2.15 - http://git.io/dI3E6A 18:42 < styol> bnoordhuis: perhaps -- var core = require('./core.js'); core.xyz = require('./xyz.js'); ? It should be and exported object 18:43 < styol> *an 18:43 < bnoordhuis> styol: don't think so. core is function-scoped there, isn't it? 18:44 < bnoordhuis> assuming it lives in a file that is require()d 18:44 < zenetik> mscdex: ping 18:45 < styol> bnoordhuis: I'm not sure i entirely understand. core.js example -- var core = { module: require('module') }; core.utility = function() {}; module.exports = core; 18:46 < bmanatwork> hey guys if i call a node script from a bash script i dont get any output, is this a known issue? 18:47 < MI6> joyent/libuv: isaacs created tag node-v0.10.2 - http://git.io/1-0ASg 18:47 < bmanatwork> does console.log not work like i am expecting? 18:47 * zenetik trying to enable "beep"on irssi, can somebody sent me a test private msg please ? 18:48 < nathan7> bmanatwork: that should Just Work™ 18:48 < bnoordhuis> styol: what i mean is that when you require('core'), the code in core.js runs inside an anonymous function 18:48 < bmanatwork> yeah i dont get it either 18:48 < zenetik> is there any node-ncurses hacker in the room except mscdex ? 18:48 < bnoordhuis> bnoordhuis: i.e. (function(require, global, etc) { /* your code here */ })(...) 18:48 < bnoordhuis> err, styol rather 18:49 < bnoordhuis> styol: so a `var foo = ...` can't leak into the global scope that way 18:50 < MI6> joyent/node: isaacs created branch v0.10.2-release - http://git.io/s7NoCg 18:50 < styol> bnoordhuis: I don't believe so.. uh oh. 18:52 < iwalkbarefoot> any idea how long it normally takes to provision with JoyentCloud ? I have a machine that's been going for about 4.5 hours now 18:52 < mscdex> isaacs: ping 18:52 < mscdex> isaacs: scratch that, nvm :-) 18:53 <@isaacs> mscdex: you should ping creationix about nvm. i only use nave. 18:53 < styol> bnoordhuis: so, for example, var core = require('core.js'); var foo = (function(){ core.utility(function(){ console.log('please no leakie'); }); })(); 18:53 <@isaacs> mscdex: ;) 18:54 < mscdex> ha 18:54 < lacrymology> is there a good logging library for node? something I can tell log.info('stuff'), log.warn('foo'), etc 18:54 < mscdex> console.log! :-D 18:55 < zenetik> zenetik: beep 18:55 < styol> lacrymology: winston is pretty nice, but there are quite a couple options https://github.com/joyent/node/wiki/modules#wiki-logs 18:55 < zenetik> mscdex: ping 18:55 < lacrymology> mscdex: that is so NOT a logging library. 18:55 < mscdex> zenetik: pong 18:55 < lacrymology> styol: thanks! 18:56 < zenetik> mscdex: got a problem to continue tutorial on ncurses, i need you a few minutes, i have to post the code on the wiki and perhaps we can explain my it's not working ? ok for you ? will you have the time to take a look ? 18:58 < mscdex> zenetik: probably, can't guarantee a time though 18:58 < ericelliott> I need to redirect stdio so I can watch it for output. How do I do that? 18:59 < ericelliott> stdout 18:59 < zenetik> mscdex: no prob, me too, i'll ping you when code posted 18:59 < mscdex> ericelliott: normal redirection? node foo.js > something 19:00 < styol> bnoordhuis: just for clarity, the argument passed to core.utility would be a callback as an example 19:00 < ericelliott> mscdex: from inside a node script. 19:01 < bnoordhuis> styol: well, that's not intrinsically leaky 19:01 < bnoordhuis> if it was, node'd be in trouble :) 19:02 < MI6> joyent/libuv: Bert Belder v0.10 * 31ebe23 : 2013.02.04, Version 0.10.3 (Stable) Changes since version 0.10.2: * inc - http://git.io/uySG1Q 19:02 < MI6> joyent/libuv: piscisaureus created tag v0.10.3 - http://git.io/Qsjs3w 19:03 * nathan7 blinks 19:03 < ericelliott> mscdex: any clues? 19:04 < MI6> joyent/libuv: Bert Belder v0.10 * 9e90cde : Now working on v0.10.4 - http://git.io/PyhjoQ 19:04 < mscdex> ericelliott: override process.stdout.write ? 19:04 < styol> bnoordhuis: gotcha, was just curious if the foo example is what you meant I should try. Or maybe its core.utility that needs to be wrapped in anonymous function? var core = {}; core.utility = (function(){})(); module.exports = core; -- var core = require('./core.js'); var foo = function() { core.utility(…); }; -- sorry, I'm a bit new and just a tad confused ;) 19:05 < bnoordhuis> styol: oh, forgot what i said - the thing i mentioned is an implementation detail of the module system 19:05 < bnoordhuis> styol: what you're describing sounds like a global var leak (i.e. a missed `var` keyword somewhere) 19:06 < bnoordhuis> but if you're sure that's not it, well, then i don't know either :) 19:06 < fusiongrokker> trying to learn grunt by doing something simple (automating a series of calls to: npm version, git push, and jitsu deploy), but really stuck... I know I've got to use something like grunt-shell, but I can't figure out how to wire it all together... 19:06 < ericelliott> mscdex: Yeah, that's what I'm trying right now. I was hoping there was an easier way (for example, redirect the stream using .pipe?) 19:07 < ericelliott> I have so far had no luck trying to use .pipe to do it, but I got an echo going with an override. 19:08 < styol> bnoordhuis: ahh i see what you meant now, so the existing design pattern shouldn't be leaking. Hrm! This is asking way too much I'm sure, but any chance you might be willing to glance the node-webkit-agent output while i encourage a memory leak? Perhaps there is something I'm not seeing elsewhere that is indicative 19:09 < MI6> joyent/node: Bert Belder v0.10 * 1b5ec03 : deps: upgrade libuv to v0.10.3 - http://git.io/PQ4sRw 19:09 < EYES> 91 19:11 < bnoordhuis> styol: well, i'm kind of busy fixing all the bugs 19:12 < MI6> joyent/node: isaacs v0.10.2-release * 1e0de9c : 2013.03.28, Version 0.10.2 (Stable) * npm: Upgrade to 1.2.15 * uv: Upgr - http://git.io/65yFmA 19:13 < styol> bnoordhuis: no problem, entirely understandable. I'll keep digging. Could it be that pretty much all the utility functions are indeed defined in a global scope in the main app.js? I'm guessing, but I think I might need to change the general design pattern to make use of creating new instances, prototypes, something other than just a gaggle of functions defined by object keys that potentially depend on eachother 19:17 < styol> bnoordhuis: for example, app.js > var cluster = require('cluster'); if (cluster.isMaster) { … } else { var core = require('./app_child.js'); } -- app_child.js > var core = require('./core.js'); core.xyz = require('./xyz.js'); var various = otherFunctions(){ /* that use things from core, core.xyz, and other core.methods */ }; module.exports = core; 19:17 < MI6> joyent/node: bnoordhuis created branch process-versions-uv-review - http://git.io/Tcs7ow 19:17 < mablae_afk> hi 19:17 < bnoordhuis> styol: was that a question or ? 19:18 < mablae_afk> does anyone use fluent-ffmpeg ? 19:19 < styol> bnoordhuis: yeah haha. Could that design pattern possibly cause this global leak? several children javascript files that expose functionality that potentially rely on the main core file and its required module, all of them smashed into a child and exported to the clustered main app.js 19:19 < styol> *required modules 19:19 < bnoordhuis> styol: you mean cyclic dependencies? not really, the module system handles htat 19:20 < bnoordhuis> *that 19:20 < styol> bnoordhuis: ah ok. I was hoping that I was doing something painfully wrong in the general pattern that might be causing this. Thank you very much for your time and contributions to the community at large. It is much appreciated. 19:21 < bnoordhuis> my pleasure :) 19:28 < jesusabdullah> question 4 u: Suppose I want to "encode" a string so that it's safe to use as a filename in windows and linux. encodeURI and require('ent').encode and QP encoding don't seem to work as quick hacks for this (I'm testing with the colon character) 19:28 < jesusabdullah> Can anyone suggest a "standard" encoding or two for this? 19:28 < jesusabdullah> One that's more or less human-readable, preferrably 19:29 < jesusabdullah> substack: you're a clever dude, any ideas? ^^ 19:34 < vicky32> Hello 19:34 < dylukes> Hiya. 19:34 < dylukes> So I'm looking for something like the Django admin panel, for Node. 19:34 < dylukes> Preferably via Mongoose. 19:35 < dylukes> (er, for Express, on Node) 19:35 < dylukes> Otherwise I'm actually considering just putting a Django app on a subdomain. 19:37 < MI6> joyent/node: Ben Noordhuis v0.10 * 902d6cb : src: tie process.versions.uv to uv_version_string() - http://git.io/mcQejw 19:37 < dylukes> mongoose-admin is like 2 years out of date 19:43 < yorick> hmm, v8 possibly implementing 'yield' 19:43 < yorick> is that a good thing? 19:43 < FellowMD> like generators? 19:43 < daleharvey> its an awesome thing 19:44 < AAA_awright> yield? 19:45 < daleharvey> generators in javascript - https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Iterators_and_Generators 19:46 < daleharvey> also worth looking at http://taskjs.org/ 19:47 < yorick> http://code.google.com/p/v8/issues/detail?id=2355 19:47 < boutell> Hi. I am reading rows from a stream with the 'record' event of node-csv. Trouble is, I want to do async stuff in processing each row, and there is no callback when responding to an event. Which means that more rows are going to come pelting in, and I won't necessarily process them in order. 19:48 < pachet> yorick: very likely to happen 19:48 < boutell> I think maybe I should be creating a writable stream of my own, but streams seem to be all about characters; the idea of a 'record' event seems to be an extension in node-csv. So I dunno. 19:48 < pachet> i'd say its going to be a little icky in places 19:48 < pachet> people thinking its a silver bullet for async 19:52 < DTrejo> check out my post! https://news.ycombinator.com/newest 19:53 < AAA_awright> So... it's... I don't get it 19:53 < AAA_awright> What's wrong with while(next()) 19:53 < ljharb> while loops are blocking 19:53 < ljharb> if you block you're gonna have a bad time 19:53 < jesusabdullah> DTrejo: cute! 19:53 < hello_kitty> is this still the way to use module.exports in the browser as well as the node server? http://paste.ubuntu.com/5656175/ 19:54 < AAA_awright> Uhh 19:54 < jesusabdullah> uuugh I drank like 6 shots of espresso and a mug of tea how can I be ready to crash 19:54 < jesusabdullah> what the sense make 19:54 < AAA_awright> ljharb: I wasn't aware there's such a thing as "non-blocking CPU instructions" 19:54 < jesusabdullah> AAA_awright: guurl 19:55 < hello_kitty> ... also related to my previous question, what are other ways to structure code for both client and server? 19:55 < ljharb> AAA_awright: lol i just had a kneejerk response to "while". 19:56 < daleharvey> DTrejo: heh did I just rickroll someone then? 19:56 < DTrejo> what happened? 19:56 < DTrejo> you sent a picture of rick? 19:56 < daleharvey> I changed the peer-src to http://fc06.deviantart.net/fs70/f/2010/045/c/c/__lmaNever_Gonna_Give_You_Up___by_Hakii.gif 19:57 < DTrejo> nice 19:57 < timkuijsten> can someone help me debug node high load? It has something todo with the supervisor npm 19:58 < DTrejo> daleharvey: oh, the problem is that big images take forever to send 19:58 < DTrejo> daleharvey: so when ppl load from you, they are just not seeing an image for a long time 19:58 < timkuijsten> even running a simple "process.stdio.resume()" with supervisor results in node taking 45% cpu usage, constantly... 19:58 < daleharvey> hmm, even on a normal page load I am not sharing to anyone 19:59 < daleharvey> or from anyone 19:59 < DTrejo> oh, well nvm then, i dunno 19:59 < DTrejo> oh the data is hashed so that wouldnt work, sorry daleharvey 19:59 < DTrejo> unless you collided the hash ;) 20:00 < daleharvey> heh its cool, its a nice idea, looking to muck around with webrtc in a bit 20:04 < MI6> joyent/node: isaacs created tag v0.10.2 - http://git.io/MuyK6g 20:05 < ganzuul> So I have managed to split apart a file on the binary level in node.js and send it to the browser over a websocket... but now I need to stitch the binary back together in the browser. =/ 20:06 < DTrejo> daleharvey: yeah, definitely check out peerjs.com, it's cool 20:07 < ganzuul> Any tips for browser-side binary manipulation in JS? 20:08 < M2Ys4U> ganzuul: I've not had a chance to play with them, but typed arrays sound like your best bet 20:08 < M2Ys4U> https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays 20:10 < ganzuul> M2Ys4U: That's a good tip. Thanks. =) 20:10 < ganzuul> Relevant to my interests too. 20:10 < MI6> joyent/node: isaacs v0.10 * 708e858 : blog: Post about v0.10.2 (+3 more commits) - http://git.io/4gRISQ 20:10 < node123> I'm having a lot of trouble zipping a folder in node. Does anyone know of a straightforward package for this? 20:11 < Kakera> node123, try adm-zip 20:12 < Astraea> I just need to see the plain text of http requests that come in on a certain port. Does anyone have a quick link to how to do that? 20:12 < node123> ok thank you 20:13 < FPSJosh01> Hey tootallnate 20:14 < willwh> Astraea: console.log(req); ? :) 20:14 < FPSJosh01> >> var actions = []; actions.push("Summon Nate"); 20:14 < purr> FPSJosh01: (number) 1 20:14 < Astraea> I'm guessing req is from: var app = http.createServer(function (req, res){}) 20:15 -!- mode/#Node.js [+o piscisaureus_] by ChanServ 20:15 < MI6> joyent/node: isaacs master * 97c70a6 : Merge remote-tracking branch 'ry/v0.10' Conflicts: src/node.cc src/nod (+21 more commits) - http://git.io/1H9tPQ 20:15 < Astraea> In that case, req is a complex object, not just the text of the http request. 20:17 < willwh> Astraea: erm; var util = require('util'); console.log(util.inspect(req, false, null); ? 20:17 < willwh> http://nodejs.org/api/util.html#util_util_inspect_object_showhidden_depth_colors 20:17 < willwh> that should let you find out what you want 20:18 < willwh> and you should be able to just do console.log(req.something); 20:18 < FPSJosh01> Hey guys, if I want to configure a package using node-gyp, how do I do that via command line? 20:18 < willwh> I think :) 20:18 < willwh> Astraea: I just mess with node.js - so I'm learning as I go 20:18 < willwh> maybe more knowledgable folks will chime in 20:19 < Astraea> That's the sort of thing I'm trying (req.something) but I can't seem to find the property that holds the plain text request. It looks like it doesn't exist. 20:20 < willwh> yeah so try that util.inspect 20:20 < willwh> should help you find what you want (I think) 20:20 < willwh> I could be totally wrong :) 20:21 < CoverSlide> Astraea: req and res are streams, you have to listen to their data events to get their payloads 20:21 < willwh> CoverSlide to the rescue ;] 20:22 < Astraea> Okay, I'll give that a shot. 20:22 < Astraea> Thanks for the help, both of you. 20:22 < hello_kitty> what are some options for structuring code files for use in the browser in addition to a node server? one i've found is to wrap the whole file in a closure and mimic 'exports' http://paste.ubuntu.com/5656175/ -- how do y'all do it? 20:23 < MI6> joyent/node: isaacs master * 9100dd4 : lint Fixes lint errors introduced in 120e5a24df76deb5019abec9744ace94f0f - http://git.io/2FYp5g 20:23 < CoverSlide> hello_kitty: use browserify 20:25 <@TooTallNate> FPSJosh01: node-gyp configure 20:25 <@TooTallNate> FPSJosh01: but you probably need to `npm install -g node-gyp` first 20:26 < boutell> Following up on my own question: input streams should support pause() and resume(). As long as those work properly, I can address my issue by pausing at the start of my async processing of each row and resuming when it completes. 20:26 < boutell> node-csv-parser evidently does support them. 20:27 < hello_kitty> ty CoverSlide 20:28 < mrvisser> *should* npm be installed with nodejs, using chrislea's ppa debian bundle? 20:30 < willwh> mrvisser: node -v? 20:30 < willwh> probably 20:30 < mrvisser> 0.8.22 20:30 < willwh> yes, pretty sure it should 20:30 < willwh> apt-cache show node.js ? 20:30 < mrvisser> I have 0.8.22 in precise, but no npm *scratches head* 20:30 < willwh> maybe in description? 20:31 < logicalcat> hey all, what's the conventional place (folder/file structure) to store database-related utility scripts in an Express.js app? 20:32 < CoverSlide> dpkg -L nodejs | grep npm 20:32 < mrvisser> willwh: https://gist.github.com/mrvisser/5266499 20:32 < mrvisser> says it "conflicts" with nodejs-devel and npm 20:33 < mrvisser> there is a 0.10.1 and the 0.8.22. I installed with apt-get install nodejs=0.8.22..... 20:34 < willwh> hmm - I think unless you're commiting on the node source 20:34 < willwh> you want to stick with 8.x currently 20:35 < mrvisser> willwh: I am 20:35 < mrvisser> so I'm installing 0.8.22 20:35 < mrvisser> and it doesn't seem to be coming with npm 20:35 < CoverSlide> mrvisser: did you check dpkg 20:35 < mrvisser> CoverSlide: I have not, what will dpkg tell me? 20:35 < CoverSlide> dpkg -L nodejs | grep npm 20:35 < willwh> mrvisser: honestly 20:36 < kenperkins> mikeal any plans to add a changelog for request? :D 20:36 < willwh> you're almost better to just clone the node source 20:36 < willwh> git checkout v0.8.whatever 20:36 < willwh> ./configure && make && make install ;] 20:36 < ljharb> that's how i istall it. 20:36 < ljharb> *install 20:36 < willwh> and me 20:36 < mrvisser> ah, neat CoverSlide 20:36 < ljharb> i don't understand why you'd bother with something more complex that's never up to date when you've got github + make :-p 20:36 < mrvisser> only npm-related resources installed are in /usr/share/doc 20:37 < mrvisser> so examples and such (blog example) 20:37 < willwh> ljharb: I agree :) 20:37 < CoverSlide> or you could download the binaries and extract to /usr 20:37 < willwh> with something as fast moving as node -> debian/ubuntu package lifecycle 20:37 < mrvisser> package management is quite a bit easier to manage with large amounts of machines 20:37 < willwh> don't fit too well 20:37 < CoverSlide> or $HOME 20:37 < willwh> mrvisser: that's true 20:37 < CoverSlide> and put $HOME/bin in $PATH 20:38 < mikeal> kenperkins: nope 20:38 < mikeal> it's too much work 20:38 < mrvisser> puppet: package { 'nodejs': } done :) 20:38 < kenperkins> you suck :D 20:38 < mikeal> we have git 20:38 < willwh> mikeal: ;] 20:38 < kenperkins> we do :D 20:38 < mikeal> you can see what has changed 20:38 < jocafa> yay git 20:38 < mikeal> between releases 20:38 < mikeal> i do a checkin of only the version change on release 20:38 < mrvisser> I think I'm going to tear the machine down and run it manually a couple times.. might give better insight into how this darn thing installed. 20:38 < mikeal> shouldn't be too hard to figure out what is happening 20:39 < mrvisser> all else fails, download and extract 20:39 < mikeal> we release too often for changelogs, there's usually only a few changes, if there were hundreds there would be value in a summary of the changes 20:40 < mrvisser> thanks for the tips CoverSlide willwh 20:40 < kenperkins> so if I understand the new stream api, I can do this right: var stream = request(url); and later, just do stream.pipe(request('some other url')); 20:46 <@mbalho> kenperkins: later meaning before nextTick 20:47 < kenperkins> ok 20:48 <@mbalho> kenperkins: actually if you are on node 0.10 its easier 20:48 < kenperkins> well, I'm using mikeal's request and I'm authoring a package myself. so trying to get head around 0.10 and pre 0.10 implications 20:49 < ljharb> kenperkins: https://github.com/isaacs/readable-stream 20:49 < ljharb> kenperkins: use that, and then when you want to drop pre-0.10 support, drop that module 20:49 < kenperkins> this readme looks awfully like the streams2 blog post on nodejs.com 20:50 < kenperkins> .org rather 20:52 < ljharb> it's written by the same guy 20:57 < kenperkins> :P 20:57 < kenperkins> that was a little tongue in cheek :D 20:57 < MI6> joyent/node: isaacs created branch v0.11.0-release - http://git.io/oOAcwg 20:57 < context> uh oh 21:05 < lacrymology> is there a way to make a module that is both node and browser compatible? 21:06 -!- mode/#Node.js [+o sblom] by ChanServ 21:07 < ljharb> lacrymology: sure, check out browserify 21:12 < kornnflake> >> var tmp = []; tmp['avg'] = 1; tmp.avg1 = 2; tmp; 21:12 < purr> kornnflake: (object) [] 21:12 < kornnflake> why won't that work? :( 21:13 < kornnflake> oh -.- 21:15 < ljharb> kornnflake: cause it's an array, not an object. and javascript isn't php 21:15 < kornnflake> yea just saw that too ;) 21:20 < kornnflake> http://paste.pm/5nj.js any idea why the obj says emtpy? 21:20 < jayk> kornnflake: because you didn't populate it? 21:21 < jayk> until you call func1, it's never run. 21:21 < jayk> where it = tmp.test = 1 21:22 < kornnflake> don't get it :D 21:23 < gildean> >> var tmp = {}; (function func1() { tmp.test = 1 }()); console.log(tmp); 21:23 < purr> gildean: undefined; Console: {test: 1} 21:23 < gildean> >> var tmp = {}; function func1() { tmp.test = 1 }; console.log(tmp); 21:23 < purr> gildean: undefined; Console: {} 21:23 < gildean> see the difference? 21:24 < kornnflake> yea, thanks ;) 21:24 < gildean> are you sure you need the function tho'? 21:24 < gildean> and not just var tmp = { test: 1 }; 21:25 < kornnflake> that's just an example, i want to cache some db entries in memory and add a few properties 21:28 < jayk> kornnflake: I suggest you pass the object around unless you have a specific reason to do a closure capture. it will be much easier to debug. ;-) 21:29 < shesek> jayk, why do you find referencing variables from the lexical scope harder to debug than passing explicit arguments? 21:30 < jayk> shesek: I don't. 21:31 < shesek> isn't that what you just said? 21:33 < jayk> perhaps I didn't communicate clearly. 21:34 < lrvick> http://pastie.org/7155291 anyone know why 'canvas' hates me? 21:36 < jayk> I think he will likely have an easier time with explicit passing, based on the difficulty he was having with the closure behavior. 21:42 <@TooTallNate> lrvick: you need to install ldconfig 21:42 < NodeNewb> looking for tips on how to best reconnect a socket securely & maintain authentication...I have a form login, which sets session variables...then the socket opens, but if the server hiccups, I don't want to lose persistance... 21:42 < NodeNewb> thinking about using cookies but want to do so securely (no https, btw) 21:43 < MI6> joyent/node: isaacs v0.10 * f1fa756 : blog: Update linux binary tarball shasums I just accidentally the binary - http://git.io/uFp8nA 21:46 < howdynihao> what is a server hiccup and why does it only affect https and not http 21:48 < NodeNewb> server crash or a nodemon restart (while on dev)...no https/ssl means no secure cookies 21:48 < lrvick> TooTallNate: /sbin/ldconfig exists 21:48 < lrvick> TooTallNate: part of glibc. not an issue 21:48 <@TooTallNate> lrvick: is it in your $PATH? 21:48 <@TooTallNate> `which ldconfig` is failing 21:48 < howdynihao> if that happens why does http give you more persistancy 21:49 < NodeNewb> er...let me rephrase, I was thinking about using cookies for persistence, but without SSL I can't use secure cookies 21:51 < jayk> NodeNewb - what are you trying to persist ? 21:51 < howdynihao> is that like boarding up the windows and hoping no one realizes the front door is wide open 21:51 < NodeNewb> jayk -- trying to keep a user authenticated when a socket disconnects 21:52 < NodeNewb> from the server side 21:52 < howdynihao> so just use session cookies, but if you want to make it secure without https, how can you really? 21:52 < jayk> is it not an http connection to the user? 21:53 < jayk> if it is… that's a solved problem. Cookie holding session-id, session id used to look up data server side 21:53 < MI6> joyent/node: isaacs created tag v0.11.0 - http://git.io/ntY5wQ 21:53 < howdynihao> thats not secure 21:53 < NodeNewb> but if the server restarts, the cookie's session id won't match the server's 21:54 < jayk> if you have more than one server, it won't match either. 21:54 < NodeNewb> and if I use "userid" then it can be compromised 21:54 < howdynihao> you use a persistant storage for the session data 21:54 < MI6> joyent/node: isaacs master * caacc19 : Merge branch 'v0.11.0-release' (+1 more commits) - http://git.io/2gxivA 21:54 < howdynihao> NodeNewb: theres no way around that if you dont use https 21:54 < MI6> joyent/node: isaacs master * 46da8c2 : Now working on 0.11.1 - http://git.io/_pLe-A 21:55 < NodeNewb> howdynihao ok, that's what I wasn't sure of...if it was feasible or not...I've read a lot about redis for persistent storage, but I use mongo...any caveats? 21:55 < howdynihao> no i dont think so 21:56 < NodeNewb> great, thanks, as always 21:56 < jayk> NodeNewb: The only other thing you can really do is in-browser data storage - but it still has to go over the wire… without SSL - you are out of luck 21:57 < NodeNewb> jayk ok, thanks...I wasn't sure if there was some other method, I read about handshaking and what not but it didn't quite fit what I am doing 21:57 < MI6> joyent/node: isaacs v0.10 * 1d17ced : blog: v0.11.0 release - http://git.io/nagWdg 21:58 < frittzel> good evening 21:58 < jayk> NodeNewb: yeah… there are some JS only crypto libs out there and you might be able to do something like Diffie-Hellman (or whatever the state of the art is) using one of those… but it seems like a long way to go… 21:59 < NodeNewb> jayk agreed, I think a persistent db-storage should work well, just have to learn it 21:59 < frittzel> the last few hours i have been struggling with "npm install" with very strange errors on expat.h with a dependancy node_expat 21:59 < frittzel> does anyone have some hints to point me in the right direction ? 21:59 < st_luke> frittzel: open an issue on github.com/isaacs/npm with the error log 22:00 < frittzel> st_luke, i will, but that won't help me tonight will it ? 22:01 < talus46> hi does anyone know why a udp socket can't send data after receiving? 22:01 < gdoteof> I am trying to run this: https://github.com/martindale/coinbase-trader but am getting an error: http://pastie.org/pastes/7155498/text 22:01 < gdoteof> i have ran that on another machine, and it went fine 22:01 < gdoteof> i am not sure if i have an old wonked nodejs installed (ubuntu machine) and maybe that's part of the issue? 22:01 < st_luke> frittzel: idk, it might if any of us have a few minutes to take a look. does it seem like a bug with npm? 22:02 < frittzel> st_luke, i don't think it does. It looks like a PEBKAC problem :) 22:02 < jayk> talus46: not telling you anything you don't already know, I suspect, but it should work fine. 22:02 < talus46> http://pastebin.com/PP9ETwkC 22:03 < talus46> I just paste a sample code 22:05 < talus46> it sends a "ping" message and if receives a "ping" message than if should reply a "pong" , ping is always received but not the pong can't understand why 22:06 < talus46> could anyone take a look and see if i missed something? 22:06 < Advant_> If I have, var buf = new Buffer(25); buf.fill(0x00); Why does buf.toString().length return 25 and not 0? 22:06 < bnoordhuis> Advant_: why wouldn't it? it's not a c string 22:06 < ljharb> strings can contain null chars 22:07 < gdoteof> nm i am on an old version of node 22:07 < jayk> talus46: do you get an error, or does it just not work? 22:07 < Advant_> So would I need to write my own string length function that compares each byte to see if it falls in as not null? 22:08 < ljharb> Advant_: why do you have strings with null chars? 22:08 < talus46> just don't work 22:08 < ljharb> Advant_: as in, what are you trying to achieve by using them 22:08 < jayk> talus46: does it print out the 'localresponse' stuff or no? 22:08 < talus46> yes 22:09 < talus46> but the other end never receives the message 22:09 < Advant_> ljharb: I have a field, of a predefined length, as user inputs then buffer bytes are written... 22:09 < talus46> like I send it send the ping but doesn't receive the pong 22:09 < Advant_> So I initialized it with 0x00 22:09 < Advant_> Maybe I should just use a string instead of a buffer 22:09 < ljharb> Advant_: why initialize it? 22:10 < jayk> talus46: I'd suggest getting out netcat and making sure it's not your receiver. 22:10 < kenperkins> mikeal: can you share some insight on why you duplicate all response headers to the new request for pipes? i.e. request(url1).pipe(request(url2)); 22:10 < talus46> i'm using the same code to send and receive 22:10 < Advant_> ljharb: If you create a buffer with without initializing it, then how do you know whats garbage memory and what is legitimately entered? 22:11 < talus46> localhost just different ports 22:11 < ljharb> Advant_: everything's undefined. there's no "garbage memory" 22:11 < Advant_> ljharb: When I created a Buffer() before, and printed it out, there was garbage memory there 22:12 < ljharb> interesting. what if you do buf.fill(null)? or buf.fill(undefined)? or buf.fill('') ? 22:12 < Advant_> ljharb: Docs don't indicate how it is initialized, which means it isn't initialized to anything, just allocated space 22:12 < Advant_> ljharb: let me try those 22:12 < ljharb> ie, using 0x00 in javascript is really weird. don't do that. 22:12 < substack> http://substack.net/images/screenshots/exterminate_comic_sans.png 22:13 < substack> can YOUR terminal output COMIC SANS whenever it FEELS LIKE IT? 22:13 < talus46> jayk if you duplicate the file and change the ports you can test it 22:13 < ljharb> substack: is there anything you won't make a module for? 22:13 < kenperkins> mikeal: specifically line 888, when will that ever be false? 22:14 < Advant_> ljharb: No matter what I try, when I do .toString(), it returns the buffer length even if its an empty string 22:14 < jayk> talus46: I'm going to guess that it's because you misspelled length on line 12? 22:14 < ljharb> Advant_: if the buffer's filled with empty strings, and you toString it, it should be an empty string. what does the string actually look like? 22:14 < ningu> programming is a good way to learn to spell correctly 22:15 < Advant_> ljharb: if I do console.log('>' + str + '<') it prints >< 22:17 < talus46> :) jayk thank you that was the problem 22:17 < jayk> :-D 22:17 < jayk> done that a million times. 22:17 < jayk> ok.. maybe a couple hundred. ;-) 22:19 < talus46> jayk thank you very much for your patience 22:20 < jayk> talus46: no prob. :-D 22:20 < mikeal> line 888 where? 22:22 < Advant_> ljharb: Is that expected behavior, or bug maybe? 22:23 < ljharb> Advant_: the length thing? buffer lengths can do all sorts of things. but a string like that should have length zero 22:25 < Advant_> ljharb: Thats what I thought, maybe I'll try on new node.js and if samething there post on github 22:25 < ningu> is there any reliable way in js to determine if something is an integer rather than a floating point number? 22:25 < ljharb> ningu: ~~foo === foo 22:25 < ningu> hmm ok 22:26 < ljharb> in ES6, that's Number.isInteger(foo) 22:26 < ningu> cool 22:26 < ningu> well I'll use the old way 22:26 < ningu> it still lets in things like 10.0 which is kind of weird, but whatever 22:34 < ljharb> ningu: 10.0 is an integer. 22:34 < ljharb> ningu: you could do parseInt(foo, 10) === foo && String(foo) === String(parseInt(foo, 10)) maybe 22:34 < ljharb> but that's overkill 22:35 < asterick> you can: /^[0-9]+$/.exec(foo) !== null ? 22:35 < ljharb> or much better, /^[0-9]+$/.test(foo) 22:35 < ljharb> .exec is weird. 22:36 < jayk> ljharb++ # beat me to it. 22:36 < asterick> I always forget about test 22:36 < asterick> mostly because if I'm messing with a regexp, I usually want the match afterward. 22:36 < ljharb> you should forget about exec :-p it's never necessary 22:36 < ljharb> asterick: then regex.match(foo) 22:36 < ljharb> sorry foo.match(regex) 22:36 < ljharb> w/e 22:36 < asterick> yep 22:36 < asterick> Point made. xD 22:36 < ljharb> :-p 22:37 < ljharb> isaacs: why can you npm unpublish modules that have dependencies on npm? 22:37 < CoverSlide> >> /^[0-9]+$/('123.212') 22:37 < purr> CoverSlide: TypeError: object is not a function 22:37 < CoverSlide> aww 22:37 <@isaacs> ljharb: because, um, it doesn't check for that? 22:37 < asterick> CoverSlide: you need to put .test 22:37 <@isaacs> ljharb: i dunno 22:38 < kenperkins> mikeal: https://github.com/mikeal/request/blob/master/index.js#L888 22:38 < ljharb> isaacs: lol ok. can it? :-) 22:38 <@isaacs> ljharb: it's tricky, because there's really no way to know that in the db validate_doc_update 22:38 < CoverSlide> asterick: there's an old bug where regexobjects could be called as functions 22:38 <@isaacs> ljharb: there are bigger refactors that need to happen first. 22:38 < CoverSlide> maybe it was in spidermonkey 22:38 < ljharb> isaacs: ok, cool. if you want, and can point me to a file, i'll see if i can make a pr 22:38 <@isaacs> ljharb: that's the thing. 22:38 <@isaacs> ljharb: i'm not even sure how to go about doing that 22:39 < ljharb> lol 22:39 <@isaacs> ljharb: you can't make GET requests in couchdb inside a validate_doc_update 22:39 < ljharb> what response to "npm unpublish"? 22:39 < ljharb> presumably something before it calls validate_doc_update 22:39 <@isaacs> ljharb: so, even if i say "npm unpublish does an extra GET to find dependents, and aborts" 22:39 < ljharb> *responds 22:39 <@isaacs> ljharb: then you can stull curl -X DELETE it 22:39 <@isaacs> and the registry will go ahead and allow it, because you have permission to do that. 22:39 < ljharb> but both are still endpoints, that can choose not to do the deletion, right? 22:40 < ljharb> i probably don't understand the internals of the registry 22:40 <@isaacs> ljharb: another option is to not allow removing the whole doc unless yoeru an admin 22:40 <@isaacs> but you could still delete a *version* that someone depends on 22:40 <@isaacs> since that's an update, not a delete, really 22:40 <@isaacs> registry = couchdb 22:40 < mikeal> kenperkins: yeah, there are plenty of streams you can pipe to that aren't http response objects 22:40 <@isaacs> document = package name 22:40 < ljharb> there's no layer on top? 22:40 < howdynihao> i think thats ok, since it's the owners perogative 22:40 <@isaacs> { name:"foo", versions: { ... }} 22:40 <@isaacs> ljharb: no 22:40 < mikeal> if you write the response to a file that will be false 22:41 < kenperkins> that wasn't my question :D 22:41 < kenperkins> well it was my last question, but not my first 22:41 <@isaacs> ljharb: i mean, it's got some rewrite rules in there 22:41 < kenperkins> is there a reason you forward the headers from the response to the request in their entirety 22:41 <@isaacs> ljharb: but it's all just a matter of routing a request to a specific couchdb _update or _show or _view function 22:42 < shesek> ljharb, I don't think it makes sense for npm not to let an author delete its own package because other people are using it 22:42 < ljharb> i see 22:42 < ljharb> shesek: why? what's the use case for deletion? 22:42 < shesek> ljharb, even if it breaks other people's stuff, its still the author right to delete it if he wants to 22:42 <@isaacs> ljharb: really, this comes down to "you depended on something you probably shouldn't've" 22:42 < ljharb> lol 22:42 < ljharb> but then that means depending on anything in npm is something you shouldn't do 22:42 <@isaacs> ljharb: what if it was a copyright violation? or they just decided to rage quit npm? 22:42 < ljharb> it's the internet. nothing's deleted. 22:42 <@isaacs> ljharb: lol 22:42 < ljharb> so i don't think enabling ragequits is worthy 22:43 < ljharb> and if it's a copyright violation, that should always go through you anyways 22:43 <@isaacs> ljharb: "it's the internet. nothing's deleted." 22:43 < ljharb> im' not saying "MUST NEVER DELETE", just that it shouldn't be easy 22:43 < shesek> ljharb, someone could always just publish a package that just contains some file with "F**K YOU" in it, instead of deleting it 22:43 <@isaacs> ljharb: qv geocities. 22:43 < ljharb> or at least, you should get a warning "are you sure" 22:43 < mmalecki> ljharb: if we're both thinking about the same module, I have its copy 22:43 <@isaacs> oh, wait, you can't quid veritas geocities because ITS GONE NOW 22:43 < howdynihao> as a package owner , they dont own you anything 22:43 < ljharb> shesek: lol but that'd be a different version 22:43 < shesek> ljharb, you do get a warning - you have to use -f 22:43 < shesek> ljharb, you can --force to update an old version 22:43 < mmalecki> ljharb: if this mootools something somthing 22:43 < mmalecki> ? 22:43 < ljharb> ok, well if there's a warning, that's good i guess 22:44 < kenperkins> mikeal: looking more for the reason to copy the response headers to the new request (or how to avoid it) ? 22:44 <@isaacs> ljharb: yeah, npm does kind of tell you it's a bad idea. 22:44 < ljharb> mmalecki: i don't know what prompted it, but someone brought it up in another room, and i just wondered about it on principle 22:44 < mmalecki> ljharb: I see :) 22:44 < ljharb> i just wouldn't expect that if i depended on a version of a module, that anybody would be able to take it away from me 22:44 < ljharb> hence "depending" 22:44 <@isaacs> ljharb: npm WARN using --force I sure hope you know what you are doing. 22:45 < ljharb> lol, also true. 22:45 <@isaacs> ljharb: let me introduce you to my good friend "bundledDependencies" 22:45 < shesek> ljharb, it is the owner right to remove his own stuff... you can't force people to keep their code on npm 22:45 < ljharb> isaacs: right, but then that encourages me to bundle every single dependency for everything, just in case someone decides to be a dick 22:46 <@isaacs> ljharb: you know, this "just in case someone decides to be a dick" thing is kind of a silly desert island argument. 22:46 < ljharb> shesek: i can prevent him from deleting it just by hosting it myself. it's the internet. not sure that's a right i want me or anyone else to have. 22:46 < ljharb> isaacs: i'm just thinking out loud, this isn't a well formed argument or anything :-) 22:46 <@isaacs> ljharb: by similar logic, you should not ever date anyone, or go outside, or eat food you didn't grow in your own dirt from seeds you genetically grafted yourself. 22:46 < jayk> isaacs: hahaha 22:46 < ljharb> see also, self-contained atmosphere 22:47 <@isaacs> ljharb: see, you get it! 22:47 < ljharb> ok, here's a different thought 22:47 <@isaacs> ljharb: the fct is "cases where someone decides to be a dick" are pretty rare, and often can be resolved via talking. 22:47 < ljharb> if a module is deleted, and it's got deps, could the owners of those deps be notified? and could a warning message be displayed on the module whose deps are now gone? 22:47 <@isaacs> ljharb: yeah, not abad idea, but again, there are higher priority things to do 22:48 < brycebaril> presumably you have a copy *somewhere* and it is open source... you could just appoint yourself the new maintainer I suppose 22:48 <@isaacs> ljharb: you an probably do something like this now by just watching the _changes feed 22:48 < ljharb> fair enough 22:48 <@isaacs> i'm not going to any time soon, not because i think it's bad, just because it's > 0 effort 22:48 < shesek> most packages in the node ecosystem are pretty small... you could just write something with the same API to replace it 22:48 <@isaacs> yep 22:48 < ljharb> priority's a whole nother discussion, i'm just throwing things on the list :-) 22:48 < ljharb> also true 22:48 <@isaacs> even take over the name, since it's deleted now :) 22:48 < Purefan> Hi everyone 22:48 < ljharb> haha true 22:48 < ljharb> i guess if i have a local copy, i could just publish my own package with the last version i've got and start a new repo 22:49 <@isaacs> yep 22:49 < JoeAndrieu__> Is there a way to manually compile binary modules? node-gyp can't yet handle my situation (I'm cross-compiling for ARM), but there should be a way to do it manually, no? I got node.js cross-compiled, but am struggling with modules. 22:49 <@isaacs> ljharb: i have no idea why that mootools whatever got removed. 22:49 <@isaacs> ljharb: it wasn't any kind of takedown request that iw as aware of, but it's possible they didn't cc me on teh discussion. 22:49 < ljharb> sure, i don't know anything about it nor do i care about mootools. i was just curious about the general category 22:49 <@isaacs> anarchy is sometimes messy. 22:50 <@isaacs> sometimes it sucks, but imo, it's worth the benefits. 22:50 < mmalecki> github discussion mentioned that this module was a bandaid or something 22:50 < ljharb> i agree, npm's anarchy seems to work remarkably well 22:50 < shesek> isaacs, any thoughts on https://github.com/isaacs/npm/issues/3252? 22:50 < shesek> I do think the ruby guys have some good points 22:50 < tjfontaine> JoeAndrieu__: just look at the makefile that gyp generates and tweak it to poitn to your toolchain 22:50 < Purefan> Quick question (uber tired, melted brain...) Im in node 0.8.15, doing: var oStream = require('fs'); oStram.exists throws error (Object has no method exists), but doing require('fs').exists works 22:51 < Purefan> just wondering if there's any wrongdoing on my part or wtf? :P 22:51 < shesek> isaacs, notifying package owners of changes is a good idea, so is mirroring checksums (if that's not done yet) and signing packages 22:51 < JoeAndrieu__> tjfontaine: Ok. I'll try that. thanks. 22:52 < shesek> that yaml bug really caught Gem by surprise, they had hard time making sure nothing was effected and restoring everything 22:52 < shesek> learning from their mistakes can really make it easier to handle those cases if it ever happens with npm 22:53 <@TooTallNate> JoeAndrieu__: you seem like a smart guy too, i bet you could figure out how to write the patch for node-gyp ;) 22:53 <@TooTallNate> i want to i'm just busy with work ATM 22:54 <@TooTallNate> basically `gyp` just needs to be invoked with `make-linux` instead of `make` as the target 22:54 <@isaacs> shesek: so, some of those are planned, some require some nontrivial work, and some are ok ideas, but not high priority. 22:54 <@isaacs> shesek: in order: Notify gem owners of newly published gems 22:54 <@TooTallNate> but that only really matters if you're cross compiling from OS X 22:54 <@isaacs> shesek: that's a terrible idea. 22:54 <@isaacs> shesek: if i get an email every time i publish, guess where those emails are going to be automatically routed. 22:55 < shesek> how often do people update packages? I would just archive them 22:55 <@isaacs> shesek: what would be nice is to watch the IP address it comes from, and if there's a publich from a new IP, THEN email the author. 22:55 < JoeAndrieu__> TooTallNate: LOL. I might try it. Especially because I think I'd like to use more than just SerialPort. Maybe once I figure out what's actually going on... 22:55 < shesek> it seems to be worth it, for that one case where I got that email if I didn't make the change 22:55 <@isaacs> shesek: right ,but if the email goes to archive without being seen, you're not going to be alerted. 22:55 <@isaacs> shesek: email alerts have to be rare, and have a high likelihood of being important. 22:56 < shesek> no, I mean, manually archive them 22:56 <@isaacs> otherwise, they're worth than nothing 22:56 <@isaacs> ok, well... you probably get a lot less email than I do :) 22:56 <@isaacs> shesek: or maybe your'e just more tolerant of it than i am 22:56 < shesek> yeah, that's true too. perhaps only from different IPs, or even different countries (using geoip) could be a good idea 22:57 <@isaacs> shesek: but a) we have to have way on the server to track the curren tuser's IP address. not sure if couch _update functions have this already or not. 22:57 <@isaacs> shesek: and b) we have to write a thing that monitors the changes feed, and detects new IP blocks, and sends an email 22:57 <@isaacs> shesek: both parts are non-trivial. 22:57 <@isaacs> right 22:57 <@isaacs> if i go to mexico, and then do an npm publish, and get an email about it, then i'm not likely to set up a filter rule because of that. 22:58 <@isaacs> next: 22:58 <@isaacs> Secure developer’s Rubygems.org credentials 22:58 <@isaacs> it'd be nice to have a passphrase. not everyone would use it, probably. 22:58 <@isaacs> but etc, etc, defense in depth, yeah, it's a great idea. patch welcome. 22:58 < shesek> is it even possible to sign packages currently? 22:58 <@isaacs> we're not there yet :) 22:59 < shesek> is it planned? 22:59 <@isaacs> (no, not currently, yes planned, windows makes it hard.) 23:00 <@isaacs> we can go back to encrypting the _auth field, and use a passphrase, now that everyone has crypto in node 100% of the time (as we bundle openssl) 23:00 <@isaacs> that's not all that hard. patch welcome. 23:00 <@isaacs> next: 23:00 <@isaacs> Stop running code on gem install 23:00 <@isaacs> hoooo boy. yeah. i'd love that. but like, i don't see how, really. 23:01 < JoeAndrieu__> TooTallNate: I'm cross compiling from Linux intel to Linux ARM. I think the issue you mentioned in email was that --dest-cpu=arm isn't supported by node-gyp yet. In any case, I got it cross-compiling for node, so I'll look at the makefile for that and see what I can re-use. 23:01 <@isaacs> there IS a plan to only allow `node-gyp` on install, and only for binding.gyp fiels. 23:01 < shesek> yeah, that one is pretty problematic, as also noted on hat post 23:01 <@isaacs> but there's also all this legacy crap that runs `make` and `node-waf` and other stupid things. 23:01 <@isaacs> not to mention packages that bundle coffee-script as a dep, and then do `cake build` or some bullshit. 23:01 <@isaacs> so, that'll be many steps to get there. 23:01 <@TooTallNate> JoeAndrieu__: i think the only changes you would need to make would be in lib/configure.js 23:02 <@isaacs> we can limit what node-gyp is willing to do. 23:02 <@isaacs> TooTallNate: (feel free to weigh in on this point) 23:02 <@TooTallNate> isaacs: what's up? 23:02 <@isaacs> TooTallNate: discussing the points in http://cristianobetta.com/blog/2013/02/02/ruby-gems-are-not-safe-to-use/ wrt npm 23:02 < shesek> yeah, it'll break a lot of packages... you'll probably to wait a few months / years between announcing that and actually doing that 23:02 <@isaacs> TooTallNate: my plan is to make node-gyp eventually the Only One True Way to do binary addons 23:03 <@isaacs> TooTallNate: and only by running `node-gyp rebuild`, nothing else, ever. 23:03 <@isaacs> TooTallNate: the problem is that you can make node-gyp do arbitrary commands. 23:03 <@isaacs> TooTallNate: so we'd have to do something to say that you may only compile a .cc file, and link to .h files etc., but not arbitrary code execution. 23:04 <@TooTallNate> isaacs: hmmm, that'd be hard… gyp allows arbitrary program execution by design 23:05 < bnoordhuis> isaacs, TooTallNate: and it should. how else are you going to run e.g. pkg-config? 23:05 <@isaacs> exactly my point. 23:05 <@isaacs> this is hard. 23:06 < jayk> Just a thought. Why not make something like a confirmed mode that you can turn on as the npm user? Leave 'regular' npm alone and let confirmation happen externally for those who want it? 23:06 <@isaacs> basically, you would end up creating a white-list of commands that are ok to run, and make sure that none of THOSE commands can trigger an arbitrary code expoit. 23:06 <@TooTallNate> isaacs: i'm still trying to read up on the problem exactly 23:06 <@TooTallNate> i guess i need to watch this youtube vid 23:06 <@isaacs> TooTallNate: if you feel so inclined. 23:07 <@TooTallNate> isaacs: do you have the short version? :p 23:07 <@isaacs> but i think the bottom line with this one is, that's not likely to happen any time soon. 23:07 <@TooTallNate> is this in preparation for a build farm thing? 23:07 <@isaacs> TooTallNate: nah, just general "rubygems got haxx0red, how do we not get haxx0red thusly?" 23:08 <@isaacs> shesek: so, it's hard, we can keep thinking about it, not likely any time soon. next: Automatically mirror gems and checksums. 23:08 <@isaacs> shesek: we actually already do this. 23:08 < shesek> oh, that's good 23:08 <@isaacs> shesek: the registry couchdb is replicated many many places, and couch actually keeps a complete history of docs until you compress it 23:09 < shesek> at least we could easily verify everything's okay if somethings does happen 23:09 <@isaacs> rigth 23:09 <@TooTallNate> isaacs: is rubygems ~ npm registry? 23:09 <@isaacs> it would not be trivial, but it would be possible, and we have couchdb experts who would jump in and help (ie, iriscouch) 23:09 <@isaacs> TooTallNate: rubygems.org, yes. 23:09 <@isaacs> next: Force signing of gems 23:10 <@isaacs> we don't have a way to sign npm pacakges currently. 23:10 <@isaacs> the tricky thing is that "signing" is done very differently on unix (where it's gpg is pretty universal) and windows (where there are other ways) 23:10 <@isaacs> some people at microsoft have mentioned lending a hand with making this a reality 23:11 <@isaacs> but basically, someone will have to own it, and it's a nontrivial amount of work. 23:12 <@isaacs> in theory, we could build something in node to do this, using our crypto stuff, but it really ought to use public gpg keys 23:12 <@isaacs> Notify gem users of unsigned/insecure gems: If we had signing, the default would be to have allow-unsigned=false or something 23:13 <@isaacs> that's trivial, once you have signing 23:14 <@isaacs> we could also just use the registry as our key authority, and attach the public key to the owner doc, and make sure that signature checks out when you install it, by fetching it right then. i don't know. it's not trivial. 23:14 < shesek> than the default would be to reject 99% of the packages? sounds somewhat problematic 23:14 < shesek> but I guess there's not much you can do... it'll get better over time 23:14 < mmalecki> let's implement gpg in JS 23:14 * mmalecki ducks 23:14 <@isaacs> well... it'd warn if there's no signature, maybe? 23:14 <@isaacs> the root problem, really, is that we need someone to step up and decide that they're going to own this kind of stuff. for the time being, that's not me. 23:15 < shesek> I guess it could be a warning for some time, until people are used to it and signing is adopted widely enough... than make it an error by default 23:15 <@isaacs> it was actually high on my todo list, before ryah ran off and left me holding the node steering wheel :) 23:15 < shesek> heh :) 23:16 < shesek> is there some issue on it somewhere? 23:16 < shesek> if you opened an issue about that, I'm sure people would help 23:16 <@isaacs> shesek: 1) implementation. 2) once it's widely adopted, start rejecting unsigned publishes. 3) once that's common, start rejecting unsigned installs by default 23:16 <@isaacs> shesek: so, st_luke closed your issue becuase it was kind of vague. 23:16 < shesek> yeah, sounds like a good plan :) 23:17 <@isaacs> shesek: if you want to take any of these ideas, and create a more specific "next step" issue, be my guest. 23:17 < shesek> do you mind if I post the log to that issue I opened? just for the record 23:17 <@isaacs> shesek: go nuts :) 23:17 <@isaacs> shesek: i was planning on it, so you'd be saving me the trouble :) 23:18 < shesek> people are probably going to take it more seriously if you opened the issue tho :) 23:19 < shesek> and yeah, it was pretty vague 23:19 < jayk> One of the things I think is great about npm is the anarchy bit - anybody can add, etc. I think the key is really a way to verify what you are pulling down is valid / trusted. I think making that external to the main npm system would allow for multiple mechanisms to be implemented / changed out over time. including allowing folks with large deployments to specify their own with their own rules. 23:20 <@isaacs> shesek: i'll reopen and link to the discussion in the log 23:21 < shesek> I cleaned it up a little and added the relevant proposal from the post to add some context: https://github.com/isaacs/npm/issues/3252#issuecomment-15621143 23:21 <@isaacs> shesek: Oh! another issue: once i refactor the cache/registry interaction a bit, we can make `npm shrinkwrap` provide byte-level security 23:22 <@isaacs> shesek: ie, if the shasum changes, it'll be considered a shrinkwrap failure. 23:22 <@isaacs> oh, heh, you posted already 23:23 < ningu> isaacs: btw is there a reason if you npm install foo and it depends on bar, but bar is already in node_modules, it will skip putting bar in foo's node_modules? 23:23 < ningu> and then if you rm -rf bar and npm install, it will still not install it so you have to remove foo 23:23 < ningu> and install from scratch 23:23 <@isaacs> ningu: or you could just do `npm install foo` again, but sure 23:23 <@isaacs> (since that'll just clobber the existing one) 23:24 <@isaacs> yeah, it'd be nice if that worked that way. i think there's an issue for it. 23:24 * isaacs shrug 23:24 < ningu> isaacs: iirc it will not clobber the existing one 23:24 < ningu> it sees foo is installed already at the right version and doesn't check for dependencies 23:24 <@isaacs> ningu: not `npm install`. `npm install foo` 23:24 <@isaacs> ningu: i bet it does clobber it :) 23:24 < ningu> ahh 23:24 < ningu> ok 23:24 < asterick> https://twitter.com/estellevw/status/317412563287699456 23:25 < ningu> well it seems like a minor thing and sounds like it's already been addressed, I was just wondering 23:26 <@isaacs> ningu: nah, it's a minor thing, and kind of annoying, and has not been addressed. 23:26 <@isaacs> ningu: `npm install` should traverse deps and make sure they've got what they need. 23:26 <@isaacs> ningu: but it doesn't, so... meh. patch welcome, or i'll get to it some day. 23:27 < ningu> isaacs: and what is the rationale for not installing bar under foo when it's already installed at the same level as foo? 23:27 < shesek> isaacs, I'm off to sleep. good night 23:27 <@isaacs> ningu: there's no need to 23:27 < shesek> and thanks for all the hard work, really appreciate it :) 23:28 <@isaacs> shesek: awesome, thakns for the poke 23:28 <@isaacs> np 23:28 < ningu> ok, but npm isn't exactly geared towards lack of duplication 23:28 <@isaacs> ningu: it isn't geard towards unnecessary duplication 23:28 < ningu> it makes foo less self-contained 23:28 <@isaacs> ningu: there's even a `dedupe` command 23:28 <@isaacs> ningu: it gets excessive when you have a huge number of deps. 23:28 < ningu> ok, I can believe that 23:28 <@isaacs> ningu: many people would prefer to have dedupe happen all the time. 23:29 <@isaacs> imagine if you have 5 deps, each of which have the same 4 deps, and each of those have the same 3 deps. 23:29 <@isaacs> 5 * 4 * 3 = 60 23:29 < ningu> I've been dealing with relatively small numbers of modules where I've been shuffling the deps around -- for example I had any-db but then decided to use gesundheit which wraps it, but I install gesundheit before removing any-db so it didn't put any-db under gesundheit 23:29 < ningu> but that's just two modules obviously 23:31 < ningu> anyway dedupe looks nice for large projects 23:32 < ljharb> oh neat - so if i have a package installed at the root, my deps won't need to download their own? 23:32 < ningu> ljharb: if it's a permitted version, yeah 23:33 < ljharb> spiffy 23:33 < ningu> ljharb: or it looks like you can just have dedupe unwind it all for you afterwards 23:33 < ljharb> right 23:33 < ningu> but I suppose if you know a module's going to be downloaded and installed 10 times you might as well preempt it :) 23:41 < JohnMcLear> anyone can help with a 0.8 to 0.10 migration? Somethings making Etherpad hang on .10 23:45 < CoverSlide> JohnMcLear: 0.10.0 or 0.10.1? 23:45 < CoverSlide> I had a hanging issue in 0.10.0 that went away in 0.10.1 23:47 < JohnMcLear> 0.10 ;\ 23:47 < JohnMcLear> oh 23:47 < JohnMcLear> haven't tried 0.10.1 23:51 < ningu> if I'm returning an object as a JSON response, it's invalid right if I put a newline after the final }? 23:51 < ningu> regardless of pretty printing options within { ... } 23:54 <@isaacs> ningu: it's fine 23:54 <@isaacs> ningu: JSON is whitespace agnostic, outside of "strings" 23:54 < ningu> ok 23:55 < JohnMcLear> hi isaacs 23:55 < ningu> JSON.stringify() won't put it in there so I guess I can just add it 23:56 <@isaacs> yeah 23:56 <@isaacs> i usually tack on a \n just for prettiness :) 23:56 <@isaacs> JohnMcLear: hola 23:56 < ningu> I suppose even if it's not pretty-printed sending an extra byte won't be the end of the world ;) 23:57 < ningu> it screws up the terminal a bit when you're doing it with curl and such if you don't add it, it's a minor annoyance 23:59 < JohnMcLear> installing 0.10.1 --- Log closed Fri Mar 29 00:00:41 2013