[00:00] jesusabdullah: isaacs: You around? I'm having promblems with an npm install wrt needing old versions, wondering if there's a slick way to get around it [00:00] isaacs: jesusabdullah: hey [00:00] jesusabdullah: Cool! [00:00] isaacs: old versions of what now? [00:00] jesusabdullah: So I'm trying to install a thing that needs forever 0.5.x and apparently only the 0.6 branch is on npm? [00:01] jesusabdullah: and some of the deps also require 0.5.x so I'm wondering if there's a way to tell npm to, idk [00:01] isaacs: jesusabdullah: ah, bug indexzero or someone to publish it, i guess [00:01] isaacs: jesusabdullah: or you can pull it out of git, and bundle the dependency [00:01] nibblebot has joined the channel [00:01] jesusabdullah: Yeah, that's I guess what I'm wondering about. Can you point me in the right direction? [00:02] jesusabdullah: It's complicated a bit by the fact that some of the deps also want 0.5.x [00:02] kenperkins: anyone want an invite to clipboard [00:02] jesusabdullah: What's that? [00:02] SubStack: yeah wtf, I hate it when deps disappear from npm [00:02] jesusabdullah: I mean, I understand trimming the tree I guess, but [00:02] isaacs: jesusabdullah: https://github.com/indexzero/forever/tree/v0.5.6 [00:02] jesusabdullah: man it's inconveniencing me right now :( [00:03] jesusabdullah: isaacs: So what do I do with that? [00:03] isaacs: jesusabdullah: npm install https://github.com/indexzero/forever/tarball/v0.5.6 [00:03] jesusabdullah: oh, okay [00:03] kenperkins: jesusabdullah: it's the startup I'm working for built on nodejs [00:03] isaacs: jesusabdullah: then add "bundleDependencies": ["forever"] to your package.json file [00:03] jesusabdullah: okey-doke! [00:03] isaacs: i've spoiled you all with this registry thingie [00:03] isaacs: i swear. [00:03] jesusabdullah: kenperkins: Is there a url I can look at, read up, etc? [00:04] jesusabdullah: I know you have! [00:04] isaacs: blame mikeal [00:04] jesusabdullah: I've been writing python modules lately, and it suuucks :C [00:04] isaacs: back when I started using npm, we typed the url to our tarballs manually [00:04] kenperkins: not really anything public yet: www.clipboard.com/login is really the only public facing content for now [00:04] isaacs: uphill! both ways! in the snow! [00:04] isaacs: and we were happy! [00:04] jesusabdullah: Liar. [00:04] jesusabdullah: Otherwise we'd still be doing it! [00:04] isaacs: ok, you're right, it was very depressing. [00:04] kenperkins: we're making big use of isaacs npm ;) [00:04] jesusabdullah: ACTION crosses his arms [00:05] jesusabdullah: Yeah dude, npm is pretty boss [00:05] kenperkins: although I still have no idea how to manage to explicit versions in production [00:05] kenperkins: (using NPM) [00:05] SubStack: kenperkins: pfft that's nothing, I'm making big use of isaacs directly [00:05] kenperkins: nice [00:05] SubStack: not just vicariously through npm [00:05] jesusabdullah: kenperkins: I guess I just want some copy so I know what clipboard.com does for me [00:05] isaacs: ACTION feeling used... [00:05] jesusabdullah: hahaha [00:06] jesusabdullah: There has to be an 80s era song about that [00:06] kenperkins: jesusabdullah: think delicious, but with contextual clips and sharing [00:06] jesusabdullah: hmm [00:06] SubStack: I have node-isaacs doing all our support emails now [00:06] jesusabdullah: "oh man this guy's a noob, bring out the node-marak" [00:06] kenperkins: isaacs: is there some authoritative blog post/etc talking about managing your module versions in production with npm? [00:07] isaacs: kenperkins: no, but something like that would be good. i've had some experience with this lately, and there are many different paths that all have their trade-offs [00:07] kenperkins: here's the route I've gone because I'm afraid of things changing out from under me [00:07] kenperkins: I tarball up my known, blessed config [00:07] kenperkins: and avoid npm entirely on my production servers [00:07] kenperkins: lol [00:08] kenperkins: (puppet/chef is great btw) [00:08] kenperkins: even just enumerating those options would be a *great* blog post [00:09] kenperkins: I'd love to author it and have it on our blog as lessons learned, but I might need some help [00:10] [[zz]] has joined the channel [00:10] tmzt: npm then git submodule :) haven't tried it yet but it could work [00:10] jesusabdullah: You can npm bundle a project, right? [00:11] jesusabdullah: and then everything's wrapped up automagically [00:11] johnhamelink has joined the channel [00:11] isaacs: so, you can add deps to your bundleDependencies list, and then call `npm pack` to create a tarball snapshot of your current setup [00:11] jesusabdullah: kenperkins: I'll play with clipboard [00:11] isaacs: then that tarball should be shasummed and hosted and put somewhere [00:11] isaacs: (you can even install it with npm, and it'll Just Work) [00:11] CIA-65: node: 03Ben Noordhuis 07master * r0c4e735 10/ deps/uv/src/ev/ev.c : ev: fix infinite loop in ev_walk() - https://github.com/joyent/node/commit/0c4e7354011ec3dd419a8f0364ada28a3c3a0bf1 [00:11] kenperkins: hook me up with your emails (pm) [00:11] isaacs: but that tarball is just a thing with a single "package" folder containing your stuff. [00:13] chjj: oh, finally that loop got fixed in the event loop ;p [00:13] chjj: was sick of that thing looping all the time [00:13] jesusabdullah: isaacs: Are you still using couch for npm? How's it treating you? [00:13] sonnym has joined the channel [00:14] _bat has joined the channel [00:14] isaacs: jesusabdullah: quite well. i like it [00:14] seivan has joined the channel [00:14] shoe has joined the channel [00:15] jslatts has joined the channel [00:15] jesusabdullah: Right on [00:16] kenperkins: we settled on riak for clipboard, as it has a nice lucene option built in [00:16] isaacs: riak is kinda nice [00:16] kenperkins: it's great for our use, can't say much beyond that [00:17] CrabDude: isaacs: how big is npm's registry? (currently replicating) [00:17] jesusabdullah: riak and roll dude! [00:19] rchavik has joined the channel [00:19] rchavik has joined the channel [00:20] Nuck has joined the channel [00:21] slickplaid: Is there any way to get 'prop' name in js? ie: test.prop = function(){ console.log(test.constructor.name); } // have it return 'prop' not 'test' or however it was called [00:23] slickplaid: test['prop'] = function(){ how do i get 'prop' in here? is it possible? } [00:23] smtlaissezfaire has joined the channel [00:24] stepheneb has joined the channel [00:25] CrisO has joined the channel [00:26] puffpio has joined the channel [00:27] bnoordhuis: slickplaid: var name = 'prop'; test[name] = function() { return name; }; [00:29] ^rcaskey has joined the channel [00:33] vid__ has joined the channel [00:34] vid__ has joined the channel [00:34] davidbanham has joined the channel [00:35] mikeycgto has joined the channel [00:35] mikeycgto has joined the channel [00:38] balaa has joined the channel [00:39] superstructor has joined the channel [00:39] gr-eg_ has joined the channel [00:39] materialdesigner: anyone have any idea why http://pastie.org/2317183 would fail? [00:40] materialdesigner: (where err is created dynamically) [00:40] geetaris_ has joined the channel [00:42] necrodearia has joined the channel [00:43] k1ttty has joined the channel [00:43] tristanseifert has joined the channel [00:45] ditesh|cassini has joined the channel [00:48] kavla1 has joined the channel [00:48] AvianFlu: materialdesigner: inside a new function, `this` has a new meaning [00:48] AvianFlu: you need to do var self = this or something like that in the parent scope in order for it to persist like you want [00:48] AvianFlu: new scope, new this, otherwise [00:49] AvianFlu: also line 9 really doesn't make any sense to me [00:50] ctide: anyone know how to coerce connect.session into storing my cookies as .domain.com instead of domaincom? [00:50] materialdesigner: it's taken almost directly from the express docs http://expressjs.com/guide.html#error-handling [00:52] rickharrison has joined the channel [00:52] materialdesigner: I'm pretty sure it's just a way to create an object that extends Error [00:52] AvianFlu: yeah, now I get it... it's unfamiliar to me cause I don't like 'throw' [00:53] mapleman has joined the channel [00:53] AvianFlu: try 'throw new AuthFailed' instead of your err instanceof thing [00:53] davidascher has joined the channel [00:53] AvianFlu: see if that works [00:54] davida has joined the channel [00:55] cying has joined the channel [00:56] blaenk has joined the channel [00:56] blaenk has joined the channel [00:56] materialdesigner: there is a throw new AuthFailed elsewhere in my code [00:56] materialdesigner: and it catches the error, and then I try to call err instanceof AuthFailed [00:56] materialdesigner: and it is false [00:57] AvianFlu: so where is 'err' defined? [00:57] mehtryx has joined the channel [00:59] materialdesigner: http://pastie.org/2317271 [00:59] materialdesigner: the first part is the piece of my code elsewhere that throws the error [00:59] akshatj has joined the channel [00:59] materialdesigner: the second part is the error handler in express [01:00] jakehow has joined the channel [01:02] neoesque has joined the channel [01:03] airportyh has joined the channel [01:05] AvianFlu: materialdesigner: this worked for me https://gist.github.com/1124283 [01:06] AvianFlu: starting with your first example [01:06] ekryski has joined the channel [01:06] johnduhart has joined the channel [01:06] AvianFlu: as for your second pastie, I find your lack of parentheses and curly braces disturbing :-P [01:07] materialdesigner: it's coffeescript [01:07] tim_smart has joined the channel [01:07] xonev has joined the channel [01:07] TheJH: coffeescript++ :) [01:07] deadman87 has left the channel [01:07] JoshC1 has joined the channel [01:07] AvianFlu: that makes a lot of sense [01:08] tbranyen: lol [01:08] tbranyen: i get coffeeshits sometimes they aren't very pleasant [01:08] AvianFlu: I only tend to write javascript, the coffee is only familiar in my cup [01:09] Nexxy: ACTION prefers tea [01:10] AvianFlu: speaking of which, more coffee [01:10] materialdesigner: grrrr [01:10] materialdesigner: I've made custom error types in express before [01:10] materialdesigner: but now I'm routing them through everyauth [01:10] materialdesigner: and *something* is breaking in between [01:11] cpetzold has joined the channel [01:11] ericmuyser has joined the channel [01:11] Cromulent has joined the channel [01:13] jomoho2 has joined the channel [01:13] cpetzold: is express's .all() broken? i can't find an issue but i'm also having issues having it catch anything.. [01:13] cpetzold: (a github issue) [01:14] cpetzold: or is all() at the connectjs level? [01:16] markwubben has joined the channel [01:17] cpetzold: it almost looks like the method was removed completely, but it's still in the documentation: http://expressjs.com/guide.html#passing-route control [01:17] cpetzold: http://expressjs.com/guide.html#passing-route%20control * [01:17] skm has joined the channel [01:18] materialdesigner: cpetzold: "The app.all() method is useful for applying the same logic for all HTTP verbs in a single call. Below we use this to load a user from our fake database, and assign it to req.user." [01:18] CrisO has left the channel [01:18] materialdesigner: ah, nvm, that's what you already found [01:19] skm has joined the channel [01:19] slickplaid: Is there any way to catch all properties on a given object? so if `var Test = function(){blah}` and we do `var test = new Test();` and call `test.property_that_doesnt_exist()` it'll catch it and do something with it? [01:20] Dreamer3 has joined the channel [01:20] slickplaid: arguing with a friend about ruby vs js >.< [01:22] jesusabdullah: why? [01:22] base698 has joined the channel [01:22] ank has joined the channel [01:23] base698: anyone ever have problems using the mongodb driver and it not saving to files.fs... the data is being saved to chunks but not to file [01:23] base698: ? [01:23] slickplaid: absolutely no reason... just turning this: http://pastie.org/2316342 into this: http://jsfiddle.net/YgpGq/6/ [01:23] slickplaid: bored and ran out of things to do today :D [01:23] TheJH: slickplaid, there's an npm module natively implementing catch-all-getetrs [01:23] TheJH: *getters [01:24] TheJH: !npm search harmony getter [01:24] jhbot: package magic: Magic Method/getter/setters for Node.JS (Basic ES5 Harmony Proxies) [01:24] TheJH: slickplaid, that looks like it [01:24] TheJH: !@slickplaid npm search harmony (proxy|proxies) [01:24] jhbot: slickplaid, package meta-promise: ES Harmony Proxy based promise library. [01:24] jhbot: slickplaid, package magic: Magic Method/getter/setters for Node.JS (Basic ES5 Harmony Proxies) [01:24] jhbot: slickplaid, package node-proxy: A module for node implementing __noSuchMethod__-type handlers, such as object overloading, as part of the Harmony Catch-All Proxies specification found at http://wiki.ecmascript.org/doku.php?id=harmony:proxies [01:24] slickplaid: hmm :) thanks TheJH [01:25] cccaldas has joined the channel [01:25] TheJH: slickplaid, node-proxy looks like it's exactly what you need [01:25] Sorella has joined the channel [01:28] ggg has joined the channel [01:29] slickplaid: He insists javascript isn't good at metaprogramming. Just trying to prove him wrong using his examples. [01:29] ggg: https://gist.github.com/1124311 anyone may know why this isnt working? thank you [01:29] TheJH: slickplaid, what other examples did he give? [01:30] slickplaid: not any code, just a lot of talk aside from that one example i linked [01:31] te-brian has joined the channel [01:31] base698: anyone have experience getting gridfs up with node? [01:32] ggg: never mind [01:32] ggg: its a typo [01:32] ggg: i wrtoe res.sent [01:32] ggg: ahah [01:32] slickplaid: hehe :D [01:33] slickplaid: was just about to say that [01:34] ggg: deleted my shameful gist [01:34] te-brian has joined the channel [01:36] samsonjs has joined the channel [01:39] ecin has joined the channel [01:39] Drakonite has joined the channel [01:40] ditesh|cassini has joined the channel [01:42] jerrysv has joined the channel [01:44] yozgrahame1 has joined the channel [01:44] yozgrahame2 has joined the channel [01:45] TooTallNate has joined the channel [01:45] jasong_at_apache: what is community's favorite (easy) deployment host? I'm looking at Joyent and Heroku atm. Any recommendations? [01:45] jerrysv: there's also nodester and nodejitsu [01:46] theCole has joined the channel [01:46] jasong_at_apache: i forgot to also mention 'perf/$' [01:46] jasong_at_apache: thanks jerry! [01:48] te-brian has joined the channel [01:48] akisma has joined the channel [01:49] isaacs has joined the channel [01:50] airportyh has joined the channel [01:54] xandrews has joined the channel [01:56] brolin has joined the channel [01:57] monokrome has joined the channel [02:00] unlink has joined the channel [02:00] unlink has joined the channel [02:01] jMerliN has joined the channel [02:04] CrabDude: isaacs: yo? [02:04] isaacs: ello [02:04] CrabDude: https://github.com/isaacs/npmjs.org/issues/12#issuecomment-1723753 [02:05] CrabDude: was just curious if this was resolved [02:06] CrabDude: or…. a point in the direction toward fixing / debugging / resolving it =) Looks like a stack trace? [02:07] blaenk has joined the channel [02:07] blaenk has joined the channel [02:07] jtsnow has joined the channel [02:07] bartt has joined the channel [02:07] akisma has left the channel [02:09] isaacs: CrabDude: this was pointing at a local couch? or what? [02:09] CrabDude: yes [02:09] isaacs: npm --registry http://isaacs.iriscouch.com:5984/registry/_design/app/_rewrite install coffee-script [02:09] isaacs: seems to work fine ^ [02:09] CrabDude: local couch [02:09] isaacs: what version of couchdb? [02:10] CrabDude: "version":"1.1.2"} [02:10] isaacs: hmm... [02:11] isaacs: and you get this on the show function? that's strange.. [02:11] isaacs: CrabDude: have you updated teh npmjs.org couchapp lately? [02:11] isaacs: (that is, the _design/app doc) [02:11] CrabDude: yup, i checked them both out today [02:12] isaacs: wild [02:12] isaacs: anything in the couch log? [02:12] isaacs: what version of spidermonkey, you know? [02:14] stepheneb has joined the channel [02:14] CrabDude: hmmmm [02:14] CrabDude: let me look into this a little bit, I'm checking my couch install [02:15] CrabDude: i just thought of something, sorry [02:15] isaacs: np [02:15] sridatta has joined the channel [02:15] jokil has joined the channel [02:15] yumatov has joined the channel [02:15] isaacs: CrabDude: oh! i think i have a pending pull req about this. [02:16] CrabDude: oh, =) that'd be nice [02:17] emmanuel has joined the channel [02:17] jtsnow has joined the channel [02:17] Swizec has joined the channel [02:18] dgathright has joined the channel [02:19] jacobolus has joined the channel [02:20] catshirt has joined the channel [02:23] Me1000 has joined the channel [02:24] isaacs: CrabDude: try with the latest npmjs.org master, perhaps? [02:24] CrabDude: k, sec [02:24] isaacs: CrabDude: or just replicate teh _design/app out of the db :) [02:25] mehtryx has joined the channel [02:25] rickharrison has joined the channel [02:28] rickharrison has joined the channel [02:29] CrabDude: isaacs: no dice. here're the logs http://pastebin.com/G94wYyXw [02:29] CrabDude: I'm using couchbase. trying to build instead right now [02:29] isaacs: CrabDude: ok, so, here's the deal.... [02:29] isaacs: something is throwing in the ddoc.shows.package function [02:30] smathy has joined the channel [02:30] jtsnow has joined the channel [02:30] ericmuyser has joined the channel [02:31] isaacs: CrabDude: or returning some wrong thing [02:31] bobthecoow has joined the channel [02:32] CrabDude: hmm, alright, i'll take a look [02:32] CrabDude: thx for looking at it [02:32] ericmuyser has joined the channel [02:32] __directory: return wrong(thing) [02:33] isaacs: CrabDude: the odd thing is that it *doesn't* crash on admin.npmjs.org:5984, or on isaacs.iriscouch.com [02:34] isaacs: so my first guess in situations like that is either couch version, or spidermonkey version [02:34] CrabDude: makes sense [02:34] CrabDude: and if the couch version is supposedly correct, then it's probably the spidermonkey... [02:34] isaacs: CrabDude: on admin.npmjs.org:5984, i've got spidermonkey 1.8.0 [02:34] isaacs: yeah, you have effectively the same couch version i do [02:35] heavysixer has joined the channel [02:35] levity_island has joined the channel [02:36] ank has joined the channel [02:36] CrabDude: isaacs: any idea how to figure out which spidermonkey i have? [02:36] isaacs: CrabDude: what OS? [02:36] CrabDude: osx lion [02:38] isaacs: how'd you install stuff? [02:39] CrabDude: i dl'd & ran couchbase, then followed the README [02:39] CrabDude: seemed to work, till i tried the replication script [02:39] CrabDude: which failed giving the json_encode error mentioned in the bug [02:40] CrabDude: did i miss something really obvious?… building couchdb seems to take FOREVER on my mbp [02:42] Swimming_bird has joined the channel [02:42] isaacs: CrabDude: you may need to replicate multiple times [02:42] isaacs: CrabDude: like, over and over and over [02:42] CrabDude: lol… err, what? [02:42] CrabDude: run the replicate curl scrip multiple times? [02:43] isaacs: i've found a few issues when the network flakes out a littel [02:43] CrabDude: ahh [02:43] Me1000 has joined the channel [02:43] CrabDude: is the app doc in the repo? [02:43] CrabDude: (i.e., they'll be replaced / fix it?) [02:43] isaacs: it's _design/app [02:44] isaacs: fastest way to update it is via couchapp [02:44] isaacs: but yeah, it'll replicate down [02:44] tk has joined the channel [02:45] CrabDude: i'll give it a shot [02:45] CrabDude: but for what it's worth i tried replicating multiple times before [02:45] CrabDude: cuz there were some failures [02:45] CrabDude: and eventually it seemed to take [02:45] CrabDude: but then when it was done none of the docs were in the repo, even though the disk size was 0.7GB [02:45] CrabDude: weird [02:46] isaacs: yeah, that is odd [02:46] isaacs: also, 0.7GB is tiny [02:50] JoshC1 has joined the channel [02:51] zeiris_ has joined the channel [02:52] CrabDude: so…. FWIW, it looks like calling http://127.0.0.1:5984/registry/ seems to interrupt it while it's replicating [02:52] isaacs: that's weird [02:52] CrabDude: Before I was hitting to to check disk size to make sure it was still dl'ing [02:52] isaacs: you should talk to rnewson in #couchdb [02:52] CrabDude: cool [02:52] isaacs: i think he had some fixes in master [02:52] CrabDude: i'm going to let it run w/o interrupting, maybe it'll work =D [02:52] jerrysv: substack: ping [02:53] isaacs: (of couchdb) [02:53] mjr_ has joined the channel [02:54] Cybrix has joined the channel [02:54] isufy has joined the channel [02:55] boehm has joined the channel [02:55] loveshine has joined the channel [02:56] ns5 has joined the channel [02:56] ifandelse has joined the channel [02:56] Cybrix: Hi, is there a library similar to PHP's TidyHtml in Node.js? [02:57] dominucco has joined the channel [02:57] CIA-65: node: 03Ryan Dahl 07gyp * refbde41 10/ (5 files in 3 dirs): WIP - https://github.com/joyent/node/commit/efbde414699e71bd43e750348438b95167c30752 [02:57] CIA-65: node: 03Ryan Dahl 07gyp * r2d29d6c 10/ (16 files in 6 dirs): Upgrade libuv for gyp support - https://github.com/joyent/node/commit/2d29d6c325bfd7573185d59d65222e71b366b13a [02:57] CIA-65: node: 03Ryan Dahl 07gyp * rc0787ab 10/ (.gitignore deps/http_parser/http_parser.gyp gyp/all.gyp): WIP - https://github.com/joyent/node/commit/c0787abde78f5fe771f92beb83f4f07ae681fa1c [02:57] balupton_ has joined the channel [02:57] seivan has joined the channel [02:57] ns5: How to implement this? Multiple user connection processes push messages to one core process, this core process then handles all messages [02:58] adrianmg: sockets ftw [02:58] __directory: sockets [02:58] ifandelse: Hi everyone. I've been trying to set up eclipse/nodejs debugging. keep running into "Failed to Connect to V8 VM". I'm using nave to manage versions, but have an 0.5.0 install in /usr/local/bin/node - are there known issues with that version of node and eclipse debugging (or w/nave)? [02:58] smtlaissezfaire_ has joined the channel [02:59] ns5: adrianmg, sockets? I think sockets are 1 to 1 connection. [02:59] Cybrix: What is CIA-65? a bot written in node.js? :P [02:59] adrianmg: ns5 [03:00] adrianmg: if you want to be listening new messages, sockets will be great and faster [03:00] adrianmg: one socket per client, sending data to the server, so the server process and broadcast that data to rest clients [03:00] ifandelse: @Cybrix - are you looking to format generated HTML? Or just pretty up code that's hand coded? [03:02] Cybrix: I wanted to do a html parser and I was wondering how to handle poor html. [03:02] ns5: adrianmg: how does the server broadcase data to the other clients? one server process is only connected to one client [03:03] Cybrix: In php, there are a lib called tidyhtml (that i havent tested) that do the job. [03:03] cikacika has joined the channel [03:03] frewsxcv has joined the channel [03:04] Me1000 has joined the channel [03:04] frewsxcv: do normal node.js modules work with client side javascript? like reqwest? [03:05] adrianmg: i would suggest you to read and understand a bit more about sockets after all [03:07] kenperkins has joined the channel [03:07] ifandelse: @frewsxcv - if you mean "can you use the same code in 'http' module on the client side, no, not to my knowledge. There are decent client side abstractions for request, though. check out amplify.js [03:09] ns5: adrianmg: Is sockets really capable of multi to 1 communication? [03:11] adrianmg: y [03:11] frewsxcv: ifandelse: https://github.com/ded/reqwest doesn't seem to rely on http [03:11] frewsxcv: the http module [03:12] ank has joined the channel [03:12] mnaser has joined the channel [03:14] rickharrison has joined the channel [03:16] vid__ has joined the channel [03:17] ifandelse: frewsxcv - i think I misunderstood your question, sorry. I thought you were asking if 'http' module would work on client side. At a quick glance, looks like reqwest might work fine client side. it's using some ES5 constructs though (map) - will break in some IE versions (big surprise!) [03:21] zeropx has joined the channel [03:22] frewsxcv: ifandelse: alright, sounds good [03:22] harthur has joined the channel [03:23] ifandelse: per my eariler node/eclipse debugging question - got it working. however, eclipse doesn't appear to let me set a watch of any kind...? Am I missing something? [03:26] sgimeno has joined the channel [03:26] isaacs has joined the channel [03:29] ifandelse: Ah, Eclipse *does* support watches w/node debug. Expressions window wasn't up. sorry you guys had to hear me talk to myself here. good night all [03:31] jtsnow has joined the channel [03:31] jamescarr has joined the channel [03:33] yuroyoro has joined the channel [03:33] loveshine_ has joined the channel [03:34] TooTallNate has joined the channel [03:34] mattp_ has joined the channel [03:34] ryanj has joined the channel [03:37] Swizec has joined the channel [03:37] kenperkins has joined the channel [03:39] mikeal has joined the channel [03:39] necrodearia has joined the channel [03:40] zanes has joined the channel [03:41] cccaldas has joined the channel [03:42] Peniar has joined the channel [03:46] tobmaster has joined the channel [03:48] namelessnotion has joined the channel [03:50] airportyh has joined the channel [03:52] cafesofie has joined the channel [03:52] orospakr has joined the channel [03:52] monokrome has joined the channel [03:56] wookiehangover has joined the channel [03:57] rickharrison has joined the channel [03:57] ericmuyser has joined the channel [03:57] dshaw_ has joined the channel [03:58] smus has joined the channel [03:58] schizm has joined the channel [03:59] harthur has joined the channel [04:00] schizm: good evening. question for you all from a complete novice. I am aiming to make a webapp that communicates to another device via socket connections. With current tech (and security concerns in a browser?) would I do this communication from the webapp client itself, or would I centralize that on something like a node.js server and have the client only talk to the server to get outside? [04:00] schizm: I poked at socket.io but that doesn't look really like what I want [04:01] jamescarr: schizm, how is socket.io not what you want!? [04:01] schizm: basically I have an existing message library that is used to communicate between devices, and I need to port it to that. [04:01] mykul has joined the channel [04:01] schizm: james: well, the way most of the examples work they communicate directly to a 'server' via a specific port etc, or is it more flexible than that and I just didn't get that far? [04:01] jamescarr: how come socket.io doesn't fit the bill? [04:02] jamescarr: schizm, for the most part you should use socket.io on the client and then on the serverside send the messages to and from the sockets for the connected devices [04:02] schizm: james: it might, if you think it will I'll go back to the docs and try to whip something up. From a cursory look I wasn't sure if it was the right approach so figured I'd come ask the experts :) [04:02] namelessnotion has joined the channel [04:03] schizm: james: is it not desirable to have the client communicate directly with the connected devices? this can be assumed to be running on the same LAN [04:03] schizm: or do I have to go through server for something? [04:03] schizm: I'm experimenting with porting some tools that talk to [04:04] AvianFlu: schizm: you should take a look at http://github.com/hookio/hook.io [04:04] schizm: consoles over to webapps [04:04] d0na1d has joined the channel [04:05] schizm: avian: will do, thanks [04:05] schizm: and I'll poke into socket.io more. I'm not convinced that I need anything to go through a server, unless there is a technical reason why I need to do so [04:06] hide has joined the channel [04:12] smtlaissezfaire_ has joined the channel [04:13] luke` has joined the channel [04:13] d0na1d has joined the channel [04:14] kenperkins has joined the channel [04:14] niftylettuce: when is tj usually on? [04:14] AvianFlu: frequently [04:15] niftylettuce: hrm, well i finally figured out why he called it nib... [04:15] niftylettuce: because a nib goes with a stylus... [04:15] mike5w3c has joined the channel [04:15] niftylettuce: e.g. http://goo.gl/KDsym [04:15] niftylettuce: now we just need 'carat' for something... maybe that is our grid system for node.js based on 960 [04:16] niftylettuce: for stylus* [04:17] squeese has joined the channel [04:19] unlink has joined the channel [04:20] JasonSmith: isaacs: Still a crash/bug on your couch? [04:20] isaacs: JasonSmith: well, there's still that replication error, but i think rnewson found the root cause of that one, and it turns out that you can just keep trying over and over and eventually it'll work [04:21] jerrysv: heya jasonsmith :) [04:21] isaacs: JasonSmith: and the main registry db is herpes-free now :) [04:21] JasonSmith: the filter worked? [04:22] schizm has left the channel [04:22] isaacs: yeah! [04:22] JasonSmith: I guess it must have [04:22] isaacs: i think it probably worked last time, too, except that something in my db was crashing at the proper times to bring it back [04:23] JasonSmith: Hoping the team sticks to their plan of fast release cycles so we can roll out 1.1.1 soon [04:24] jerrysv: anyone from the jshint team around? [04:24] zeropx has joined the channel [04:25] jerrysv: or, isaacs: process.exit(1); -- getting jshint to accept it, any ideas? [04:26] jerrysv: n/m, it's my jshint config [04:26] slickplaid has left the channel [04:31] akshatj has joined the channel [04:34] Determinist has joined the channel [04:35] gg777 has joined the channel [04:37] ank has joined the channel [04:39] davidbanham: Not really node related, but I'm not sure where else to ask. Is there any good way to do anycast or latency based routing across my EC2 instances? [04:40] slickplaid has joined the channel [04:44] jacobolus has joined the channel [04:44] piscisaureus has joined the channel [04:47] slloyd_ has joined the channel [04:49] __directory: maybe i should just use backbone and express resource [04:53] seivan has joined the channel [04:54] firedfox has joined the channel [04:54] slifty has joined the channel [04:55] shanebo has joined the channel [04:55] clu3 has joined the channel [04:56] clu3: guys, nodejs noob here, I just installed http-agent via npm, but where can i find the documentation for this 'http-agent' module? [04:56] isaacs: clu3: npm docs http-agent [04:57] mike5w3c has joined the channel [04:57] clu3: isaacs, beautiful, thanks a lot [05:00] clu3: btw, what's the best web nodejs framework to try out? [05:00] __directory: clu3: express [05:00] isaacs: framework for what? [05:00] isaacs: clu3: yeah, for websites and stuff, it's all about express. [05:00] __directory: if you meant web application [05:00] clu3: ok, i shouldn't have said 'best', most used, or hottest .. [05:00] clu3: yep, web app framework [05:00] isaacs: socket.io is also lovely [05:00] slickplaid: i prefer sexiest [05:01] isaacs: i don't like my code to be sexy. [05:01] isaacs: too distracting [05:01] ericmuyser has joined the channel [05:02] confoocious has joined the channel [05:03] clu3: ok, thanks guys, so is it safe to say "express is the RoR of nodejs web app" ? for now [05:04] __directory: clu3: more of the sinatra [05:04] __directory: but you'll find it more than adequate - plenty of examples and docs out there as well [05:05] _root_ has joined the channel [05:05] smus has joined the channel [05:05] clu3: __directory, thank you [05:06] rurufufuss has joined the channel [05:09] temp01 has joined the channel [05:09] dshaw_ has joined the channel [05:09] seivan has joined the channel [05:10] confoocious has joined the channel [05:10] smtlaissezfaire_ has joined the channel [05:10] ryanfitz has joined the channel [05:12] Wizek has joined the channel [05:12] isaacs: JasonSmith: fuck. [05:12] isaacs: herpes is back. [05:13] isaacs: this is so weird. [05:13] brainproxy: ACTION gets a flamethrower [05:13] isaacs: srsly [05:13] __directory: don't hear that everybody [05:13] srid has joined the channel [05:13] srid has joined the channel [05:13] __directory: "herpes is back" [05:14] isaacs: hahah [05:14] isaacs: a [05:14] isaacs: it's just a record in the couchdb. it's not actually that bad. it's just very hard to get rid of [05:15] marlun: Is there a way of getting the path to the users home directory in node? [05:15] isaacs: marlun: process.env.HOME [05:15] isaacs: marlun: might not be set [05:16] Lorentz: Would windows users even have HOME set [05:16] cpetzold has joined the channel [05:16] __directory: pretty sure windows home is set in win 7 at least [05:17] JasonSmith: isaacs: interesting [05:17] isaacs: JasonSmith: yeah, it's fascinating [05:17] marlun: isaacs: Thanks! [05:17] isaacs: JasonSmith: this showed up in the last few hours [05:18] JasonSmith: isaacs: When I used to get that doc a lot, it was from an _update function that was still creating it. i.e. I would fix the doc, then some cron job or another would create a new one [05:18] JasonSmith: isaacs: replicating, trying to spot the rev_id [05:20] jMerliN: does node use IOCP on windows yet? [05:20] isaacs: jMerliN: that's what libuv is all about [05:21] SamuraiJack has joined the channel [05:22] ank has joined the channel [05:22] jMerliN: ah i see. I was wondering why nothing mentioned use of IOCP since it can handle pretty much all of the I/O in an evented fashion on windows. [05:23] rabidsnail has joined the channel [05:24] rabidsnail: How do I get the file descriptor for the listening socket of a net.Server? [05:24] isaacs: JasonSmith: yeah, it's this, apparently: {"_id":"","_rev":"1-2f11e026763c10730d8b19ba5dce7565","forbidden":"must supply latest _rev to update existing package"} [05:28] ngs has joined the channel [05:29] dgathright has joined the channel [05:30] JasonSmith: isaacs: interesting, what is that "forbidden" field? It looks like a validate_doc_update result, but why would it be inserted into the doc? [05:30] JasonSmith: my wires crossed? [05:30] isaacs: JasonSmith: nono, i'm working it out [05:31] isaacs: so, the update function can return {forbidden:"reason"} which then gets kicked out by the validate_doc_update [05:31] smus has joined the channel [05:32] ank has joined the channel [05:33] JasonSmith: isaacs: that's an internal agreement your update function and validation function have then? [05:33] isaacs: yeah [05:33] JasonSmith: isaacs: perhaps you have a bug where the validate_doc_update is not throwing it as promised? [05:33] isaacs: apparently being emitted from update without an _id is confounding things [05:33] isaacs: maybe [05:33] isaacs: JasonSmith: assert(!newDoc.forbidden || newDoc._deleted, newDoc.forbidden) [05:34] JasonSmith: Assuming the validation function is not properly throwing the exception, you would be creating a document with body {"forbidden":"...the message..."} [05:34] isaacs: JasonSmith: if the newDoc has a "forbidden" field, it gets thrown from vdu [05:34] jhurliman has joined the channel [05:34] Me1000 has joined the channel [05:34] JasonSmith: isaacs: how confident are you about the order of operations and precedence of that assert expression? [05:34] isaacs: i'm gonna change the _id on the forbidden:reason object [05:35] isaacs: JasonSmith: yeah, that's probably what's going on [05:35] isaacs: but there are other changes in the update function that the vdu checks [05:35] pifantastic has joined the channel [05:36] JasonSmith: Not to change the subject *too much* but you might ask whoever wrote that code why they are doing validation in an _update function instead of the validation function :p [05:36] Wizek has joined the channel [05:37] isaacs: JasonSmith: unfortunately, the author of this code is gone. turned into me today. [05:38] JasonSmith: I assumed it was you all along :) [05:39] euforic has joined the channel [05:41] isaacs: JasonSmith: so, this should get refactored pretty significantly. it's a big mes. [05:42] isaacs: copy-pasta all over the place to support old spidermonkey versions [05:42] guillermo has joined the channel [05:42] JasonSmith: isaacs: The good news is, that is almost surely the reason you keep getting the "_id":"" doc over and over [05:42] isaacs: yeah [05:42] JasonSmith: iriscouch spidermonkey (and anything using build-couchdb) is pretty decent. IIRC it uses whichever shipped with the Firefox that came out before 4.0 [05:43] isaacs: yeah, iriscouch is fine. it's every other system that installs sm 1.4 and whatnot [05:43] JasonSmith: Whatever was about to ship when Mikeal showed me how to build spidermonkey from Hg, that was it [05:43] yuroyoro has joined the channel [05:43] JasonSmith: I use [].reduce, Object.keys, Array.isArray and stuff all the time [05:43] mikeal: hehe [05:44] isaacs: yeah, <3 all that stuff [05:44] JasonSmith: function(keys, vals, re) { return vals.reduce(function() { ... }) } // FTW [05:46] squeese has joined the channel [05:46] yuroyoro has joined the channel [05:48] dreamdust has joined the channel [05:49] euforic has left the channel [05:51] jMerliN: A synchronous operation is indicated by returning 0 and WSAGetLastError() returning WSA_IO_PENDING. [05:51] jMerliN: that's an async op* [05:54] raidfive has joined the channel [05:54] odie5533 has joined the channel [05:55] ns5 has left the channel [05:55] rabidsnail: apparently http.Server doesn't have a listenFD method. Is there a way I can get an http server from a tcp server? [05:56] odie5533: I want to implement a line-based protocol in Nodejs. What modules or internal API exist for accomplishing this? [05:58] rabidsnail: odie5533: There's no line reader in the node standard library. Several people have written their own which you can find with some googling, or you can write one yourself. [05:58] davidascher has joined the channel [05:59] DrPizza: man I hayve a horrible feeling this command-line escaping is unfixable [05:59] DrPizza: ugh [05:59] odie5533: rabidsnail: but HTTP, which is part of the standard library, is a line-based protocol so it must have been implemented in the standard library. Perhaps not in a modular form though? [06:01] rabidsnail: That's what I meant, yeah [06:01] odie5533: that's disappointing. [06:01] rabidsnail: it's not that complicated [06:02] rabidsnail: we're talking about maybe 10 lines of boilerplate [06:02] odie5533: perhaps I could make a ticket requesting the http implementation be re-written to use a line-based protocol written in the standard library? [06:02] rabidsnail: you could... [06:03] odie5533: The Python Twisted library provides Line Receiver I think it's called, and its http implementation inherits it. [06:03] odie5533: Line protocls are so common, I would have thought it would be offered :< [06:03] cying has joined the channel [06:03] rabidsnail: like I said, making something that emits lines is really simple [06:04] stephank has joined the channel [06:04] simenbrekken has joined the channel [06:04] odie5533: Yes. But then everyone has to make their own. And you can actually mess it up. Or it could work, but not be the most optimized one possible [06:04] rabidsnail: you can write a function that takes a net.Stream and returns an EventEmitter with a line event [06:04] tonic2 has joined the channel [06:05] rabidsnail: Twisted isn't exactly efficient. just saying. [06:05] odie5533: oh? [06:05] rabidsnail: have you tried scaling a large app on twisted? [06:06] rabidsnail: it's not so easy [06:06] odie5533: No. But they say it scales. [06:06] odie5533: I know Pylons scales. [06:06] rabidsnail: I've done it. We had to strip it down to the bone. [06:06] rabidsnail: and python has issues for certain kinds of load [06:07] rabidsnail: (long-lived cycles are death to python processes) [06:07] jesusabdullah: twisted is annoying imo :C [06:07] odie5533: what!? I luv twisted! [06:07] jesusabdullah: pfffffffsht [06:07] jesusabdullah: Even python people hate twisted [06:07] rabidsnail: especially python people hate twisted [06:07] rabidsnail: it reads like java [06:08] rabidsnail: everything's a factory or an interface [06:08] odie5533: rabidsnail: I found my Python code improved significantly after creating stuff with Twisted. [06:08] rabidsnail: compared to what? [06:08] odie5533: utter crap apparently. [06:09] rabidsnail: twisted is probably better than rolling your own [06:09] odie5533: here we are. 15 different line receivers. and who knows which one is optimized and which is not. http://groups.google.com/group/nodejs/browse_thread/thread/ee363e571fee1d2f [06:09] loob2 has joined the channel [06:10] odie5533: I like this one https://github.com/baudehlo/Haraka/blob/master/line_socket.js but I think that it might fail for protocols which end with \r\n. [06:11] rabidsnail: readable streams should probably have a line event that gets emitted iff something is bound to it [06:11] kenperkins has joined the channel [06:12] rabidsnail: it's doing string concats [06:12] odie5533: that's bad, right? [06:12] rabidsnail: that's a malloc and a memcpy [06:12] rabidsnail: and probably freeing some memory, too [06:13] dnjaramba has joined the channel [06:13] rabidsnail: although probably from the young gen, which isn't too bad [06:13] rabidsnail: two mallocs, actually [06:15] odie5533: in that thread, a couple people uploaded their own personal gists as well. [06:16] odie5533: node-lazy, node-lines, carrier, node-bufferstream =/ [06:16] DrPizza: piscisaureus: I am becoming reasonably convinced that uv_spawn must not do any quoting, it must leave it up to the caller. [06:16] rabidsnail: as long as you split using a regex and use a Buffer for storing your partial lines you should be fine [06:16] DrPizza: piscisaureus: I am working on the test test-cli-eval [06:17] DrPizza: piscisaureus: and coming up against cmd.exe's weird quoting rules for "cmd /c" [06:17] odie5533: rabidsnail: a buffer, rather than concatenating strings right? [06:17] jacobolus has joined the channel [06:17] rabidsnail: yeah. that way you don't have to do any extra memory allocations. [06:17] mattp_ has joined the channel [06:17] rabidsnail: that's what twisted's implementation does. That's also why it has a max line length. [06:17] DrPizza: piscisaureus: "cmd /c" doesn't construct a regular argv, it essentially treats everything after the /c as a single blob (there are some nuances, but that's the thrust of it) [06:18] DrPizza: piscisaureus: this means that the quoting and backslash insertion actually fouls up "cmd /c". The quotes and escapes never get removed, so the spawned command fails. [06:20] mrtazz has joined the channel [06:20] TooTallNate has joined the channel [06:22] DrPizza: piscisaureus: I think the only safe behaviour is for uv_spawn to join each element of the args array with a space, and convert to wchar_t, anything else is too fragile [06:22] seivan has joined the channel [06:27] madsleejensen has joined the channel [06:28] gozala has joined the channel [06:31] __directory: "herpes is back" [06:32] stalled has joined the channel [06:34] blaenk: lol [06:37] CIA-65: node: 03Ryan Dahl 07gyp * r0d1e225 10/ (3 files in 3 dirs): More progress with gyp - https://github.com/joyent/node/commit/0d1e2251a156197ed5fb8a09d2a03bf693ead7d4 [06:38] dodger has joined the channel [06:39] `3rdEden has joined the channel [06:40] Nexxy has joined the channel [06:40] Nexxy has joined the channel [06:41] simenbrekken has joined the channel [06:42] adammw has joined the channel [06:44] adammw111: Hi. I'm trying to rewrite the configure script to support cross-compiling easier. Does anybody know if to build for freebsd/openbsd native kvm is required or only if building on a freebsd/openbsd system? [06:46] jbpros has joined the channel [06:51] e6nian has joined the channel [06:52] groom has joined the channel [06:54] newy has joined the channel [06:54] addisonj has joined the channel [06:55] luke` has joined the channel [06:55] dodger has joined the channel [06:56] cosmincx has joined the channel [06:56] rchavik has joined the channel [06:58] iFire has joined the channel [06:59] meandi2 has joined the channel [06:59] samsonjs has joined the channel [07:01] ank has joined the channel [07:02] tar_ has joined the channel [07:03] iFire has joined the channel [07:04] emattias has joined the channel [07:04] __doc__ has joined the channel [07:05] luke`_ has joined the channel [07:09] fangel has joined the channel [07:09] kenperkins has joined the channel [07:11] luke` has joined the channel [07:13] andree has joined the channel [07:14] Prism has joined the channel [07:15] gg777 has joined the channel [07:16] muhqu has joined the channel [07:16] __tosh has joined the channel [07:16] jslatts has joined the channel [07:19] djcoin has joined the channel [07:19] mjr_ has joined the channel [07:20] jhurliman has joined the channel [07:20] tar_ has joined the channel [07:22] anubhaw has joined the channel [07:24] mike5w3c has joined the channel [07:25] gausby has joined the channel [07:26] dshaw_ has joined the channel [07:26] cosmincx has joined the channel [07:27] seivan_ has joined the channel [07:29] topaxi has joined the channel [07:30] mike5w3c has joined the channel [07:31] [AD]Turbo has joined the channel [07:32] confoocious has joined the channel [07:34] smus has joined the channel [07:36] luke` has joined the channel [07:37] ablomen has joined the channel [07:38] rabidsnail: Is there an equivelent for net.Server.listenFD for http.Server? [07:39] anubhaw has joined the channel [07:40] Marak has joined the channel [07:40] mscdex: rabidsnail: http.Server.listenFD? [07:41] rabidsnail: Why is that not in the docs? [07:41] ohtogo has joined the channel [07:41] TomY has joined the channel [07:41] mscdex: i was just guessing [07:42] mscdex: yep, it's there [07:42] mscdex: rabidsnail: http.Server inherits from net.Server [07:42] rabidsnail: oh [07:42] piscisaureus: DrPizza: hmm [07:42] rabidsnail: that's not at all clear [07:43] Nexxy: are snails even capable of contracting rabies? [07:43] rabidsnail: no [07:43] Nexxy: I didn't think so [07:43] DrPizza: piscisaureus: it's a little vexing [07:43] piscisaureus: DrPizza: I like to prefer unix semantics as much as possible. [07:43] DrPizza: piscisaureus: but "cmd /c" isn't really doing anything wrong, it's just not cracking things into a traditional argv. [07:43] booo has joined the channel [07:43] DrPizza: yes but the way things are, certain thing aren't actually possible. [07:44] mscdex: rabidsnail: you're more than welcome to submit a doc patch to the nodejs-dev mailing list or submit a pull request [07:44] piscisaureus: DrPizza: spawn('cmd', ['/c'].concat(cmdline.split(' '))) doesn't work? [07:45] criswell has joined the channel [07:45] piscisaureus: Hmm. that's probably too tight [07:46] DrPizza: piscisaureus: no, it won't [07:47] DrPizza: check out the special rules for cmd /c quoting in cmd /? [07:47] mpavel has joined the channel [07:47] blup has joined the channel [07:47] Statham has joined the channel [07:48] DrPizza: it basically doesn't parse anything after the /c (it does some escaping using ^ as its escape character, and removes some quote marks in some circumstances) [07:48] piscisaureus: DrPizza: we'll have to discuss this [07:49] piscisaureus: we might have to remove quoting from libuv but then we need to bring it back to node [07:49] DrPizza: in other words, cmd /c is expecting its argument to already have suitable escapes [07:49] DrPizza: so libuv ends up double escaping [07:49] piscisaureus: DrPizza: alternatively we can have something like spawn_shell in libuv [07:49] DrPizza: I'm guessing that's why VC++'s spawn (etc.) doesn't escape either [07:50] ericmuyser has joined the channel [07:50] piscisaureus: Let me check that [07:50] DrPizza: I went through it yesterday to verify the need to escape \t too, if you saw the issue I raised [07:50] whitman has joined the channel [07:51] piscisaureus: DrPizza: no, sorry, will look at it [07:51] DrPizza: does unix have spawn functions that do such escaping? [07:51] piscisaureus: I think so [07:51] [AD]Turbo: hi there [07:52] DrPizza: piscisaureus: https://github.com/joyent/libuv/issues/125 [07:53] DrPizza: piscisaureus: my feeling is that uv_spawn should just do the moral equivalent of args.join(' '), and node should have a helper of some kind "escape this string suitable for the command-line" [07:53] piscisaureus: I need to know how this works on linux [07:55] adammw111: Are ev_* functions supposed to be called in win32 code for 0.5. ? [07:55] schmidp has joined the channel [07:56] piscisaureus: no [07:56] ph^ has joined the channel [07:56] admc has joined the channel [07:57] rchavik has joined the channel [07:57] DrPizza: I don't know where argv splitting gets performed in *nix, do programs get given a single string that they have to split themselves (as on Win32) or do they get directly given an array? [07:58] piscisaureus: DrPizza: btw I also think the way we quote currently is not right [07:58] piscisaureus: because we always escape a backslash with another [07:59] fletchowns has joined the channel [07:59] piscisaureus: while we need to do this only when ambiguities arise, e.g. "c:\program files [07:59] DrPizza: well you kind of have to, don't you? If you're going to do this kind of thing [07:59] piscisaureus: * "c:\program files [07:59] piscisaureus: dammit [08:00] piscisaureus: "c:\program files" is ok [08:00] piscisaureus: is what I wanted to say [08:00] shinuza has joined the channel [08:00] DrPizza: oic you mean you don't restrict escaping to backslashes preceding quote marks [08:01] DrPizza: which are the only ones that are special [08:01] DrPizza: it's possible that changing that will be sufficient, I'm not sure [08:02] scas_ has joined the channel [08:02] cpetzold has joined the channel [08:02] jakehow has joined the channel [08:02] fletchowns: I had a question...does it make sense to use express with cluster (http://learnboost.github.com/cluster/) and forever (https://github.com/indexzero/forever)? [08:02] fletchowns: It seems like there is some overlap in functionality there [08:02] piscisaureus: DrPizza: you know about the #libuv channel right? [08:03] DrPizza: no I did not [08:03] asabil has joined the channel [08:03] JoshC1 has joined the channel [08:03] rabidsnail: Apparently http.Server.listenFD exists, but it behaves the same as http.Server.listen [08:07] dgathright has joined the channel [08:09] bergie has joined the channel [08:11] sebastia_ has joined the channel [08:11] tar_ has joined the channel [08:12] adammw111: Could someone who knows about compiling node with mingw tell me if my build command is sane? [ #1452 ] I keep getting weird errors happening. [08:14] Marak: fletchowns: maybe you should not worry about clustering your app until you hit an actual performance problem [08:15] Guest65727 has joined the channel [08:15] Marak: and when you do, just be a man about it and shard it over some FDs [08:15] Marak: boom [08:15] Marak has left the channel [08:16] fletchowns: just trying to learn about how they would fit together... [08:16] fletchowns: not that i'm going to have an actual use for it right now [08:20] __tosh has joined the channel [08:20] japj has joined the channel [08:20] Charuru has joined the channel [08:21] kulor-uk has joined the channel [08:22] tim_smart has joined the channel [08:22] JoshC2 has joined the channel [08:22] __tosh has joined the channel [08:22] __tosh has joined the channel [08:22] __tosh has joined the channel [08:22] stisti_ has joined the channel [08:22] __tosh has joined the channel [08:23] keyvan has joined the channel [08:24] SvenDowideit has joined the channel [08:25] temp01 has joined the channel [08:27] cosmincx has joined the channel [08:28] sfoster has joined the channel [08:30] zzo has joined the channel [08:31] zzo: o mighty orcacle - any way to make an exec or spawn call synchronous? [08:31] zzo: or a better idea to fiddle with the 'require' call? which currently is synchronous [08:32] Clex: Why would someone do something synchronous? [08:32] zzo: ask 'require'... [08:33] zzo: it is synchronous - i want to replace it w/one of my own devising [08:33] zzo: w/o anyone having to change their code [08:34] altamic has joined the channel [08:38] pickels has joined the channel [08:39] squeese has joined the channel [08:40] iaincarsberg has joined the channel [08:43] schmidp has joined the channel [08:44] margle has joined the channel [08:44] zzo: too zany i guess [08:46] kartmetal: some filesystem calls can be made to be synchronous.. that's how require() does what it does. [08:47] kartmetal: if you could somehow make the node process spawn something, then force it to block on some fs operation that would only unblock once your spawned process is done, you'd get what you want.. [08:48] confoocious has joined the channel [08:48] confoocious has joined the channel [08:48] zzo: yep [08:48] fille has joined the channel [08:48] zzo: execSync [08:48] fille: hello [08:50] fille: started with java @ work, and im really confused, [08:51] fille: no callback to wait for [08:51] framlin: fille: what are you confused about? [08:51] kartmetal: zzo: oh, there's another way.. you could write a native extension that does the fork/exec/wait dance [08:51] bbrandon has joined the channel [08:51] rook2pawn: is it possible to get a list of events on an emitter? [08:51] seivan has joined the channel [08:54] MrTopf has joined the channel [08:54] kartmetal: rook2pawn, kinda.. Object.keys(youremitter._events) would return something related to what you want. [08:54] kartmetal: although it'd only give you events that have listeners attached to them, I think. [08:54] rook2pawn: perfect! [08:54] kartmetal: and it's not guaranteed to keep working. [08:55] framlin: bla._evemts sounds not to be indended to be used ;) [08:55] emmanuel_ has joined the channel [08:55] rook2pawn: ;-) [08:56] fille: framlin im thinking im looking for the callback [08:56] fille: framlin but there is no real callbacks in java [08:57] framlin: what callbck are you looking for ... not every line of code must have callbecks, even if its JavaScript ;) [08:57] newy has joined the channel [08:57] zzo: kartmetal: ya there's that [08:57] fille: im thinking like in this pattern : hrm maybe i need to wait for this to finish before [08:58] jobim: no, I think he's talking about java, not js [08:58] Brandonn has joined the channel [08:58] fille: jobim nod [08:58] kartmetal: ok, I need to stop giving horrible ideas to folks here. [08:59] framlin: ahhhh, I didn get the statement right, sorry fille [08:59] fille: can anyone explain for me whats the fuzz about hook.io [09:01] japj: the idea is to get you hooked [09:02] fille: marak mentioning alot in his twitter feed [09:03] balupton has joined the channel [09:03] bzinger has joined the channel [09:05] balupton_ has joined the channel [09:05] japj: he made it, he should be mentioning it a lot ;) [09:05] fille: ye i know the thing is im making a webbased mudclient in node.js [09:06] fille: and im using regular sockets [09:06] hij1nx has joined the channel [09:06] fille: maybe i will be better of using the hook.io? [09:07] kartmetal: I think the idea is to make your life easier.. it's a layer of abstraction on top of of sockets and a bunch of other possible transport mechanisms. [09:07] jomoho has joined the channel [09:09] fille: seems its some kind fom protocol [09:09] japj: ryah: so how is gyp working out for you? still want to write a build system in javascript or not? [09:10] MrTopf_ has joined the channel [09:11] mpoz2 has joined the channel [09:13] neshaug has joined the channel [09:15] kay_k has joined the channel [09:16] uchuff has joined the channel [09:17] thalll has joined the channel [09:17] paulwe has joined the channel [09:19] schmidp has joined the channel [09:20] FireFly has joined the channel [09:20] Kingdutch has joined the channel [09:21] odie5533: Is Hook.io meant for working across multiple computers, or multiple cpu cores? [09:21] v8bot_ has joined the channel [09:23] alnewkirk has joined the channel [09:26] malditogeek has joined the channel [09:29] ttpva has joined the channel [09:36] muhqu has joined the channel [09:39] sirleamont has joined the channel [09:40] michaelhartau has joined the channel [09:41] versicolor has joined the channel [09:44] dnjaramba has joined the channel [09:47] blaenk: odie5533: multiple dimensions [09:47] TheJH has joined the channel [09:47] odie5533: ahh [09:48] sreeix has joined the channel [09:49] confoocious has joined the channel [09:49] confoocious has joined the channel [09:49] markwubben has joined the channel [09:50] jakehow has joined the channel [09:53] M_ has joined the channel [10:01] balaa has joined the channel [10:03] Squax has joined the channel [10:04] cliffano has joined the channel [10:05] febits has joined the channel [10:05] mikedeboer has joined the channel [10:08] davidbanham has joined the channel [10:09] andrewfff has joined the channel [10:14] malditogeek1 has joined the channel [10:16] rurufufuss has joined the channel [10:17] fly-away has joined the channel [10:18] cjm has joined the channel [10:25] confoocious has joined the channel [10:26] isufy has joined the channel [10:28] bnoordhuis has joined the channel [10:28] cfq has joined the channel [10:29] misterncw has joined the channel [10:33] mpoz2 has joined the channel [10:44] saschagehlich has joined the channel [10:45] seivan has joined the channel [10:45] kwk has joined the channel [10:45] davidbanham: I'm running an express app with a logger set to fire whenever a URL is requested that doesn't match a specific route. I figured it would be handy for diagnosing malformed URLs in my client's configuration files, but I've gotten LOADS of hits. Am I just getting probed or is this something to do with express? [10:45] davidbanham: https://gist.github.com/1124941 [10:45] davidbanham: This is on a subdomain that only got a DNS record about 6 hours ago. [10:46] kwk: Hi there! Simple question: I've followed this guide: "https://github.com/joyent/node/wiki/Installation" but the command "git checkout origin/v0.4.10" gives this error: "error: pathspec 'origin/v0.4.10' did not match any file(s) known to git." Does anybody know why this happens? [10:48] kwk: Here is my git ref-show output: [10:48] kwk: git show-ref | grep 0.4.1 [10:48] kwk: 720c682e38482398054d1cd11b213730a1054412 refs/tags/i0.1.90a [10:48] kwk: 85c32db7db247a246f311b28ba1aeebdf5e49fc6 refs/tags/v0.4.1 [10:48] kwk: 5acf00450cbe8520b49deda34138511d77759819 refs/tags/v0.4.10 [10:49] confoocious has joined the channel [10:49] confoocious has joined the channel [10:50] kwk: Is this command fine as well? "git checkout v0.4.10" [10:51] fermion has joined the channel [10:52] loveshine has joined the channel [10:54] cliffano: davidbanham: have you tried inspecting the referrer? perhaps it's a web crawler [10:54] loveshine: is it normal custom to capitalize the first letter of a module that's a class? [10:54] davidbanham: cliffano: Good idea, thanks. The weird thing is that I can't imagine anywhere it's linked from. [10:55] H4ns` has joined the channel [10:56] micheil has joined the channel [10:57] micheil: hmm, is it possible to have a net.Server listen on a specific network interface (eg, lo1, en0, en1, etc) [10:57] chjj: i never noticed how popular the c# tag is on stackoverflow, almost twice as popular as JS [10:57] cfq has joined the channel [10:57] micheil: (with out me needing to know that interfaces ip address? [10:58] cliffano: davidbanham: one possibility is that 'something' indexes those url paths, and they were somehow executed against your subdomain, but yea, hard to guess without those http headers info [10:58] CrypticSwarm_ has joined the channel [11:00] TheJH: I think that google has some kind of "intelligent url-guesser or so" [11:00] TheJH: I think that I read something like that somewhere, that googlebot automatically learns which words to search for on sites with which keywords [11:00] cliffano: loveshine: usually the module name is all lowercase, e.g. var EventEmitter = require('events').EventEmitter; [11:01] markwubb_ has joined the channel [11:01] xandrews has joined the channel [11:01] TheJH: davidbanham, could you log the IPs and do "whois" on them or so? [11:02] ablomen: micheil, i think you are going to have to use the output of ifconfig INTERFACE to get the ip address and use that output [11:02] micheil: ablomen: hm.. [11:03] micheil: ifconfig would just be calling down to some C level command, so surely this is something we could support in node? [11:03] ablomen: micheil, i'm sure you could make a module for it [11:04] micheil: probably. [11:05] davidbanham: cliffano: TheJH: Looks like some kind of crawler/scanner. All traffic is coming from 120.50.63.10 which is somewhere in Malaysia. I can't seem to find any referrer information in the req object. [11:05] adrianmg has joined the channel [11:05] ablomen: anyway, using child_process to run ifconfig eth0 | grep "inet addr:" and then get the first address should be easy [11:06] hoodoos has joined the channel [11:06] micheil: ablomen: that would be a nasty hack [11:07] thalll has joined the channel [11:07] micheil: there was a proposal to add this feature in about a year back [11:07] micheil: wasn't sure if it got anywhere [11:07] xandrews has joined the channel [11:08] TheJH: davidbanham, there's a contact mail in the whois for the 256-addresses-block, you could mail that person and ask him what he's doing [11:08] ablomen: well there should be a file in /proc/net somewhere too, you could read that [11:09] ablomen: not a lot better though [11:10] jbrokc has joined the channel [11:10] davidbanham: TheJH: Will do. I'm not terribly optimistic about getting a response, though. The mischief within me wants to just start responding to any request from that IP with a 20mb file to tie up their connection. [11:12] TheJH: davidbanham, just 20mb? can't you send a "chunked", gzipped response with only zeroes? when he decompresses... *boom* [11:12] TheJH: (endless response, of course) [11:12] Markavian has joined the channel [11:12] materialdesigner has joined the channel [11:12] industrial: I'm not complaining or anything but why does an npm search lookup take more then 30 seconds? [11:13] TheJH: industrial, which npm version are you using? [11:13] industrial: 1.0.15 [11:13] Markavian: hey, I'm having trouble running a node server script on Windows 7, it springs up: node.js:198 throw e; // process.nextTick error, or 'error' event on first tick [11:14] TheJH: industrial, I'm not sure, but recently, isaacs changed the search function to "cache the db locally and search super-fast", maybe you should update [11:14] kwk has left the channel [11:14] Markavian: I'm just trying to build the example script, any idea why its not working? [11:14] industrial: TheJH: hm, okay [11:15] agnat has joined the channel [11:15] davidbanham: TheJH: Hah! Evil. I love it. [11:18] TheJH: davidbanham, ever heard of 42.zip? it's pretty good at crashing/dos'ing virus-scanning proxies that don't detect it, it's 42kb, but if you recursively unzip all the files, you get a few petabytes [11:19] TheJH: davidbanham, but it's possible to do something even more evil: there's a zip file that, when you unzip it, results in itself :) [11:19] Markavian: nobody able to help me? [11:19] industrial: TheJH: ah, yeah, I see it uses local storage now [11:20] ay has left the channel [11:20] davidbanham: Markavian: Can you provide more of the error message? There should be a full stacktrace. Pop it up on pastebin and link it here [11:20] TheJH: Markavian, windows support is still pretty unstable [11:20] Markavian: sure, will pastebin now [11:20] davidbanham: TheJH: I am aware now! I'll give them a couple of days to respond before I start getting tricky. [11:20] hoodoos has left the channel [11:21] japj: davidbanham: you could also endless redirect them to another url ;) [11:22] fairwinds has joined the channel [11:22] Markavian: http://pastebin.com/kjaYE0A0 [11:22] TheJH: japj, but overflowing their RAM with endless uniform gzip doesn't need that much bandwidth on his side [11:22] japj: true [11:22] TheJH: japj, maybe he even has to pay for traffic [11:23] japj: Markavian: what editor did you use to create the .js file? [11:23] Markavian: EditPlus [11:23] boehm has joined the channel [11:24] ditesh|cassini has joined the channel [11:24] seivan has joined the channel [11:25] MonsieurLu has joined the channel [11:25] japj: what encoding are you using, could it be there is some kind of unicode header in front of the javascript? (since you get an Unexpected token on line 1 [11:25] eee_c has joined the channel [11:26] Markavian: ok, just got it to work [11:26] Markavian: resaved the file using notepad in ANSI [11:26] Markavian: and... presumably that cleared out the dodgey characters at the start of the file [11:26] japj: good ;) [11:26] Markavian: I had my laptop switched to JP language, and since I switched it back some files still open incorrectly [11:27] japj: aha, that explains [11:27] japj: still, I wonder if node shouldn't be able to just read those files [11:28] Markavian: what kind of DB connectivity does node have? [11:28] japj: https://github.com/joyent/node/wiki/modules#wiki-database [11:28] Markavian: I'm interested in setting up an authentication demo [11:28] TheJH: Markavian, there are modules for mongo, couch, mysql and probably a few more [11:28] TheJH: !@Markavian npm search database [11:28] jhbot: Markavian, packages (short format, truncated): resourcer, wurfl-client, keys, postpie, rapid, world-db, cradle-fixed, barricane-db, noblerecord, ron, cradle, orm, chaos, simpledb, permafrost, simple-mime, database-cleaner, couchlegs, jsonfiles, moose [11:28] Markavian: do they need installing on top of node? [11:29] japj: yes [11:29] TheJH: Markavian, you have to install them with npm [11:29] japj: but unfortunately. npm doesnt work on windows yet [11:29] Markavian: hmm, that's a shame [11:29] TheJH: ah, he's on windows, right [11:29] Fuu has joined the channel [11:29] Markavian: I guess I could write a simple game client with node [11:29] wenbert has joined the channel [11:30] japj: until npm works on windows, you could use https://github.com/japj/ryppi but it doesnt support all the features npm has [11:30] Markavian: >user id, chat room, match making, game, back to chat room [11:31] Markavian: nah, that's ok - I'll wait until all that stuff matures, I'm just interested in running a few demos to get a feel for node [11:32] slloyd has joined the channel [11:32] eresair has joined the channel [11:32] MisterLyle has joined the channel [11:35] madsleejensen has left the channel [11:36] robi42 has joined the channel [11:37] mehtryx has joined the channel [11:37] jbpros has joined the channel [11:42] adambeynon has joined the channel [11:43] Poetro has joined the channel [11:46] scott_gonzalez has joined the channel [11:50] adrianmg has left the channel [11:52] kwk has joined the channel [11:53] Poetro has joined the channel [11:53] Poetro has joined the channel [11:53] kwk: Hi, I'm getting this error, when trying to use CPack to build a package: http://www.pasteall.org/23697/bash . Am I doing something wrong or can this problem be fixed? [11:53] kwk: This person had the same issue: http://groups.google.com/group/nodejs/browse_thread/thread/e439c634a8508276?pli=1 [11:54] hebz0rl has joined the channel [11:55] japj: sry, I do ntot use CMake/CPack myself so can't help you there [11:56] malditogeek has joined the channel [11:56] NetRoY has joined the channel [11:56] jtrudeau has joined the channel [11:59] kwk: japj: Is there another way to get a stable (v0.4.10) RPM? [12:01] Ans5i has joined the channel [12:02] shapeshed has joined the channel [12:02] okuryu has joined the channel [12:02] sirleamont has left the channel [12:03] slifty has joined the channel [12:03] shubham has joined the channel [12:04] japj: that might depend on the distribution you're using, but there is no official rpm as far as I know [12:05] maru_cc_ has joined the channel [12:05] tonyskn has joined the channel [12:06] fyskij has joined the channel [12:07] kwk: Is anybody using CMake to build nodeJS? [12:08] kwk: japj: its a rhel6.1 [12:10] japj: I havent tried it myself, you could try the instructions at http://www.chrisabernethy.com/installing-node-js-on-centos-redhat/ [12:15] saschagehlich has joined the channel [12:15] hlindset has joined the channel [12:15] malditogeek has joined the channel [12:15] kwk: japj: I've found the reason for the error I had previosuly. [12:16] japj: great, what was the problem? [12:16] kwk: japj: These three lines https://github.com/joyent/node/blob/v0.4.10/cmake/package.cmake#L28 [12:17] kwk: I've commented out 28,29,30 and replaced 31 with this: [12:17] kwk: set(node_version_string "0.4.10") [12:19] igl has joined the channel [12:20] incon has joined the channel [12:21] slifty has joined the channel [12:21] agnat_ has joined the channel [12:22] japj: ah, it seems the legal header is longer than 1024 bytes. https://github.com/joyent/node/blob/v0.4.10/cmake/package.cmake#L27 will only read the first 1024 bytes I guess [12:24] dnjaramba has joined the channel [12:24] eee_c1 has joined the channel [12:26] japj: kwk: I made an issue for that, thanks for the analysis! [12:26] unomi has joined the channel [12:26] kwk: japj: You're welcome. Were can I find the issue please? [12:27] kwk: ah found it [12:27] seb_m has joined the channel [12:27] scas has joined the channel [12:27] japj: are you ok with how I described it? [12:28] kwk: japj: Yeah sure, it's always great if I can help. thank you again [12:28] malkomalko has joined the channel [12:29] arnee has joined the channel [12:30] smtlaissezfaire has joined the channel [12:31] brianseeders has joined the channel [12:35] skohorn has joined the channel [12:35] fumanchu182 has joined the channel [12:35] xandrews has joined the channel [12:40] febits has joined the channel [12:40] balaa has joined the channel [12:40] febits has joined the channel [12:43] balaa has joined the channel [12:47] MarkMenard has joined the channel [12:48] schmidp has joined the channel [12:50] seivan has joined the channel [12:54] miccolis has joined the channel [12:54] AaronMT has joined the channel [12:56] eee_c has joined the channel [12:57] jbrokc has joined the channel [12:58] CrisO has joined the channel [12:58] kwk: japj: The fix for issue #1455 is already in master: see my comment: https://github.com/joyent/node/issues/1455 [12:58] kwk: japj: I think you can close the issue now. [12:59] kwk: ACTION afk for a while [12:59] hebz0rl has joined the channel [12:59] metaverse has joined the channel [12:59] mnaser has joined the channel [13:00] antimatter_ has joined the channel [13:01] metaverse: Is there any documentation on what exceptions a function will throw? [13:02] mnaser has joined the channel [13:06] mehtryx has joined the channel [13:07] DavidElias has joined the channel [13:10] neorab has joined the channel [13:10] Cromulent has joined the channel [13:10] thalll has joined the channel [13:11] cce has joined the channel [13:11] cce has joined the channel [13:11] davidbanham has joined the channel [13:14] mgrayson has joined the channel [13:16] mhausenblas has joined the channel [13:20] eee_c1 has joined the channel [13:23] shubham_ has joined the channel [13:23] Camacho has joined the channel [13:24] MooGoo has joined the channel [13:25] patrickgamer has joined the channel [13:26] bergie has joined the channel [13:26] patrickgamer has left the channel [13:27] saschagehlich has joined the channel [13:30] ksheurs has joined the channel [13:30] kwk: japj: I could do a patch if you like. Can i checkout the version v0.4.10 from master branch with this command? git checkout v0.4.10 [13:30] kwk: Then I can try to push it. [13:31] seivan has joined the channel [13:31] aconbere has joined the channel [13:33] hwinkel has joined the channel [13:33] unomi has joined the channel [13:36] jslatts has joined the channel [13:38] malkomalko has joined the channel [13:38] davidsklar has joined the channel [13:41] excellentdrums has joined the channel [13:43] sivy has joined the channel [13:43] Anton_ has joined the channel [13:44] jj0hns0n has joined the channel [13:45] pen_ has joined the channel [13:45] slifty has joined the channel [13:45] CIA-65: node: 03Ben Noordhuis 07v0.4 * rd31de05 10/ cmake/package.cmake : [13:45] CIA-65: node: cmake: slurp node_version.h whole, version string is past 1024 bytes boundary [13:45] CIA-65: node: Fixes #1455. - https://github.com/joyent/node/commit/d31de05ec0eeee3687713d176dc1ca15f311a48f [13:46] bnoordhuis: kwk japj: ^ [13:46] micheil: bnoordhuis: hey, question, how could an addon be forced to check for the existence of pkg-config? [13:47] micheil: (we is used to check for other dependencies [13:47] micheil: *which [13:47] kwk: bnoordhuis: too bad I was too late https://github.com/joyent/node/issues/1455#issuecomment-1727002 [13:47] seivan has joined the channel [13:47] bnoordhuis: kwk: hah yes, i pushed the fix just as you posted your comment [13:47] bnoordhuis: micheil: you mean check from the wscript? [13:47] micheil: yeah [13:48] kwk: bnoordhuis: If no one blocks it, my fix will also be on the mailing list [13:48] bnoordhuis: micheil: i don't think waf has explicit checks for that [13:48] micheil: like, the zeromq module uses pkg-config to check for the existence of the zmq libraries, but gets a false positive for it if pkg-config is missing [13:48] kwk: bnoordhuis: What would have been the best way to collaborate with you? I mean is an emailed patch ok? [13:49] malditogeek has joined the channel [13:49] boaz has joined the channel [13:49] bnoordhuis: kwk: preferably an issue in the bug tracker, mailing list items might get lost in the noise [13:49] bnoordhuis: kwk: you'll have to sign the CLA the first time you open a pull request [13:50] kwk: bnoordhuis: do i need to fork node.js to send a pull request? [13:50] brianc has joined the channel [13:50] smtlaissezfaire_ has joined the channel [13:50] bnoordhuis: micheil: you can try to run `pkg-config --version` from the configure() step and set a env flag if it fails [13:50] bnoordhuis: kwk: yes [13:50] kwk: ah ok [13:51] thinkt4nk has joined the channel [13:52] kwk: bnoordhuis: I've just forked node.js but the line is not fixed in it. did i do something wrong? https://github.com/kwk/node/blob/v0.4.10/cmake/package.cmake [13:52] kwk: sorry i mean https://github.com/kwk/node/blob/v0.4.10/cmake/package.cmake#L27 [13:53] micheil: bnoordhuis: that seems like a bit of a hack [13:53] bnoordhuis: kwk: it's in the v0.4 branch [13:53] bnoordhuis: kwk: v0.4.10 is just a tag [13:53] bnoordhuis: micheil: you can leave out the 'a bit of' :) [13:53] kwk: ok, and the tag is referencing what? a branch? or a commit? [13:54] micheil: bnoordhuis: any better ways? [13:54] bnoordhuis: kwk: a commit, tags in git always point to a commit [13:54] bnoordhuis: kwk: or a tree if you want to be pedantic [13:54] kwk: thank you [13:55] bnoordhuis: micheil: don't think so - but i'm not a waf guru, mind you [13:55] micheil: bnoordhuis: yeah, fair point [13:55] thomblake has joined the channel [13:55] thomblake has left the channel [13:55] bnoordhuis: micheil: waf has a check_cfg method that calls pkg-config under the hood [13:55] micheil: bnoordhuis: we ran into this issue when doing some node zmq stuff at pusher.. some dev's had pkg-config, others didn't. [13:56] bnoordhuis: but i'm not sure what it does if pkg-config is absent [13:56] micheil: it returns a false positive. [13:56] micheil: iirc. [13:56] Swimming_bird has joined the channel [13:56] necrodearia has joined the channel [13:56] bnoordhuis: micheil: http://waf.googlecode.com/svn/docs/wafbook/single.html#_configuration_helpers <- section 9.4.4 [13:56] kwk: bnoordhuis: japj: thank you guys for helping me out [13:57] bnoordhuis: apparently you should check for pkg-config first with conf.check_cfg(atleast_pkgconfig_version='0.0.0') [13:57] bnoordhuis: kwk: my pleasure [13:59] micheil: so should be this? conf.check_cfg(atleast_pkgconfig_version='0.0.0') [13:59] bnoordhuis: micheil: i think so, try it [14:00] brez_ has joined the channel [14:00] catb0t has joined the channel [14:00] ph^_ has joined the channel [14:01] micheil: bnoordhuis: check this: https://gist.github.com/1125211 [14:01] micheil: node-waf doesn't fail if configure doesn't meet deps [14:01] micheil: (the second time round libzmq is not found) [14:01] JumpMast3r has joined the channel [14:02] thalll has joined the channel [14:02] bnoordhuis: micheil: right, so you'll need to do a manual check [14:03] micheil: actually, i have wx-config [14:03] Nican has joined the channel [14:04] sonnym has joined the channel [14:05] micheil: hmm.. no that's not it. [14:05] aoberoi has joined the channel [14:05] aheckmann has joined the channel [14:05] piscisaureus has joined the channel [14:05] Camacho has joined the channel [14:06] bnoordhuis: micheil: nowhere in your gist does waf say 'checking for pkg-config version >=' [14:06] micheil: should it? [14:06] micheil: is pkg-config always required? [14:07] geetarista has joined the channel [14:07] micheil: actually, node-waf configure exits with non-zero [14:07] kwk: bye [14:07] bnoordhuis: micheil: no, but it should print a line when you have conf.check_cfg(atleast_pkgconfig_version='0.0.0') in your wscript [14:07] ryanfitz has joined the channel [14:07] micheil: https://gist.github.com/76cacc3633c7a90c5cc4 [14:07] bnoordhuis: kwk: bye [14:07] kwk has left the channel [14:08] rfay has joined the channel [14:09] Xano has joined the channel [14:10] kevwil has joined the channel [14:10] schmidp has joined the channel [14:11] broofa has joined the channel [14:11] Camacho has left the channel [14:13] http402 has joined the channel [14:13] micheil: bnoordhuis: hmm.. looks like I can force it with mandatory=True [14:13] micheil: that way configure exits with non-zero forcing the build to abort. [14:14] explodes has joined the channel [14:16] jbrokc has joined the channel [14:17] JJMalina has joined the channel [14:22] eee_c has joined the channel [14:25] micheil: bnoordhuis: hey, thanks for your help there man I wouldn't have known what to even begin to look for. [14:25] micheil: (It's been an age since I've worked with waf and node.js c/c++ stuff [14:26] balaa_ has joined the channel [14:26] balupton has joined the channel [14:26] bnoordhuis: my pleasure, micheil :) [14:28] yhahn has joined the channel [14:28] balupton has joined the channel [14:28] dexter_e has joined the channel [14:32] TomY has joined the channel [14:32] skohorn has joined the channel [14:32] mgrayson has left the channel [14:33] clifton has joined the channel [14:34] cying has joined the channel [14:38] losing has joined the channel [14:39] sniper506th has joined the channel [14:39] jslatts has joined the channel [14:39] christophsturm has joined the channel [14:39] cafesofie has joined the channel [14:39] shanebo has joined the channel [14:40] ryanfitz has joined the channel [14:40] jj0hns0n has joined the channel [14:41] ph^ has joined the channel [14:42] mapleman has joined the channel [14:42] schmidp_ has joined the channel [14:43] pjacobs has joined the channel [14:43] cosmincx has joined the channel [14:44] BillyBreen has joined the channel [14:46] ohtogo has joined the channel [14:46] fezzle has joined the channel [14:47] CIA-65: node: 03Ben Noordhuis 07master * rf9cfd70 10/ test/simple/test-cli-eval.js : [14:47] CIA-65: node: test: fix bad test in test-cli-eval.js [14:47] CIA-65: node: The test checked that stdout was empty. Forgetting to escape brackets [14:47] CIA-65: node: in the argument to --eval made that true on UNIX systems: the error [14:47] CIA-65: node: was written to stderr. [14:47] CIA-65: node: Props to Peter Bright for reporting the issue. - https://github.com/joyent/node/commit/f9cfd709460e04c8417e7784e6e3b264d3ff6c69 [14:50] sub_pop has joined the channel [14:51] springmeyer has joined the channel [14:52] jtsnow has joined the channel [14:52] EyePulp has joined the channel [14:53] CIA-65: node: 03Ben Noordhuis 07master * rac722bb 10/ (4 files in 3 dirs): [14:53] CIA-65: node: module: strip byte order marker when loading *.js and *.json files [14:53] CIA-65: node: BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception. [14:53] CIA-65: node: Fixes #1440. - https://github.com/joyent/node/commit/ac722bbed6ea846991904ed205a6dc5ece4748c9 [14:55] Destos has joined the channel [14:55] chjj has joined the channel [14:56] bshumate has joined the channel [14:56] bshumate has joined the channel [14:57] smus has joined the channel [14:59] lazyshot has joined the channel [15:01] mikedeboer has joined the channel [15:01] jakehow has joined the channel [15:01] pixel13 has joined the channel [15:02] RORgasm has joined the channel [15:02] smtlaissezfaire has joined the channel [15:03] jj0hns0n_ has joined the channel [15:04] robertfw has joined the channel [15:05] namelessnotion_ has joined the channel [15:08] adambeynon has joined the channel [15:10] jtsnow has joined the channel [15:10] kenperkins has joined the channel [15:10] materialdesigner has joined the channel [15:11] eastender has joined the channel [15:11] zeropx has joined the channel [15:12] colinclark has joined the channel [15:12] mpavel has joined the channel [15:12] hacksparrow has joined the channel [15:13] zanes has joined the channel [15:18] versicolor has joined the channel [15:20] d0k has joined the channel [15:20] jasonw22 has joined the channel [15:21] halfhalo-work has joined the channel [15:22] catshirt has joined the channel [15:22] jj0hns0n_ has joined the channel [15:24] thalll has joined the channel [15:24] unomi has joined the channel [15:24] unomi has joined the channel [15:24] softdrink has joined the channel [15:24] alvaro_o has joined the channel [15:25] alvaro_o has left the channel [15:26] Jippi has joined the channel [15:26] nadirvardar has joined the channel [15:31] progme has joined the channel [15:31] caolanm has joined the channel [15:32] greg has joined the channel [15:32] brianloveswords has joined the channel [15:32] smus has left the channel [15:34] TomY_ has joined the channel [15:37] gazumps has joined the channel [15:37] espacia has joined the channel [15:37] adambeynon has joined the channel [15:38] dgathright has joined the channel [15:40] fangel has joined the channel [15:40] jtsnow_ has joined the channel [15:41] davidsklar has joined the channel [15:41] dodger: mornign [15:41] Pierrot has joined the channel [15:41] Twitter has joined the channel [15:45] booo has joined the channel [15:45] rmustacc has joined the channel [15:46] stephank has joined the channel [15:48] dmwuw has joined the channel [15:49] sbisbee has joined the channel [15:49] malkomalko has joined the channel [15:49] smithrobs has joined the channel [15:50] monokrome has joined the channel [15:53] berasa has joined the channel [15:53] ekryski has joined the channel [15:56] dominucco has joined the channel [15:57] `3rdEden has joined the channel [15:58] Laurent4 has joined the channel [15:58] bradleymeck has joined the channel [15:58] slifty has joined the channel [16:00] losing has joined the channel [16:01] davidascher has joined the channel [16:01] no-gooder has joined the channel [16:01] no-gooder: hey guys [16:01] no-gooder has left the channel [16:01] dherman has joined the channel [16:03] Charuru has joined the channel [16:04] dgathright has joined the channel [16:04] tjholowaychuk has joined the channel [16:06] aoberoi has joined the channel [16:07] ank has joined the channel [16:07] davididas has joined the channel [16:08] creationix has joined the channel [16:09] montylounge has joined the channel [16:09] unlink has joined the channel [16:09] unlink has joined the channel [16:11] ns5 has joined the channel [16:11] TooTallNate has joined the channel [16:11] ns5 has left the channel [16:11] kesla has joined the channel [16:11] ns5 has joined the channel [16:11] MarkMenard has joined the channel [16:12] ns5: I heard that node.js is very memory efficient. How does node.js achieve this while still forks a process for every connection? [16:12] mundanity has joined the channel [16:12] tjholowaychuk: it doesn't fork, at all lol [16:12] tjholowaychuk: where did you get that info? (curious because I've seen this a few times now) [16:14] ns5: tjholowaychuk: node.js does not fork at all? How does it handle say millions of connected sockets? [16:14] ckknight has joined the channel [16:14] ns5: I'm very curious but I know nothing about javascript [16:14] xerox: MILLIONS [16:14] tjholowaychuk: well *you* can choose to "fork" to take advantage of multiple cores etc, with something like cluster, but node itself doesn't [16:14] tjholowaychuk: it's just a single thread, with events, so it's fast and does not spend a lot of time in js-land [16:14] tjholowaychuk: so it can handle many connections [16:15] willwhite has joined the channel [16:15] bjoern_ has joined the channel [16:15] ns5: so node.js by default keeps all socket descriptors in one process? [16:16] tjholowaychuk: yeah [16:16] kersny has joined the channel [16:17] yozgrahame has joined the channel [16:17] xerox: what's better fault-tolerant between socket.io and dnode? Imagining a scenario when the only server drops dead, and takes a while to respawn, could be minutes could be hours [16:18] xerox: (the clients being node processes, not browsers) [16:18] tjholowaychuk: dnode is just socket.io isnt it? [16:20] `3rdEden: yup dnode uses socket.io [16:20] xerox: tjholowaychuk: even when you use it over, say, unix sockets? [16:20] Metal3d has joined the channel [16:20] `3rdEden: than, no :p [16:20] xerox: ^__^ [16:20] newy has joined the channel [16:21] xerox: if the server dies, do the clients keep reconnecting or they just receive an event and it's the programmer's job to implement delayed reconnection? [16:22] hij1nx has joined the channel [16:23] dreamdust has joined the channel [16:24] zomgbie has joined the channel [16:24] dannycoates has joined the channel [16:26] topaxi has joined the channel [16:26] zzo: so i'd like to override the built in 'require' function but 'require' is sync. & my 'require' would need to be async (it uses 'exec') - ideas how to do this? [16:26] pickels_ has joined the channel [16:27] zzo: maybe if I could pipe from readFileSync or something? [16:27] slajax has joined the channel [16:28] isaacs has joined the channel [16:28] ns5: so node.js just accpet() a connections and append the new socket fd into a socket list, and select() on the list and call callback functions when one of them has data arrives, right? [16:29] zzo: too bad (or maybe good - certainly simpler) 'require' isn't async like YUI3 'use' (for my purposes0 [16:29] cjm has joined the channel [16:30] creationix has left the channel [16:31] Kingdutch has joined the channel [16:33] zzo: or any ideas how to 'block' a function that the caller is expecting to by sync? [16:33] BillyBreen has joined the channel [16:34] TheJH: zzo, why should the caller expect that? [16:34] TheJH: ah, nevermind, I should read what people write [16:34] vid__ has joined the channel [16:34] Cleer has joined the channel [16:34] mbrevoort has joined the channel [16:35] TheJH: zzo, fibers could work, but you'll have to wrap the code that does the require() in fiber stuff [16:35] zzo: because the caller is calling 'require' which is a sync function [16:35] zzo: ah so shold i [16:35] jtsnow has joined the channel [16:36] chapel: xerox: dnode with unix sockets has a reconnect option, you can set the frequency and so on [16:36] TheJH: zzo, I don't know [16:37] zzo: also looking at stratified/apollo stuff - i'll look @ fibers [16:38] jtsnow_ has joined the channel [16:38] adambeynon has joined the channel [16:39] dherman has joined the channel [16:40] gozala has left the channel [16:40] dnjaramba has joined the channel [16:43] akshatj has joined the channel [16:44] mikeal has joined the channel [16:44] liquidproof has joined the channel [16:44] bnoordhuis: ns5: in a nutshell, yes [16:45] JumpMast3r has joined the channel [16:46] MarkMenard has joined the channel [16:46] ion- has joined the channel [16:46] jbrokc has joined the channel [16:49] kdng-tr7 has joined the channel [16:51] losing has joined the channel [16:52] isaacs: zzo: you want to prevent the caller from doing require() because it's async? [16:52] rick_h_: anyone know if there's something to help bootstrap xxx.rc file work? For app settings? Checking local dir, /etc/ and then home dir? [16:52] isaacs: *sync [16:52] isaacs: rick_h_: you could check out npm's ini stuff. [16:52] isaacs: rick_h_: i've been meaning to abstract it out, but it's hard. [16:52] smathy has joined the channel [16:52] zzo: isaacs: no i want to override 'require' with a function that does some async stuff - but have it be transparent to caller [16:52] isaacs: zzo: can't be done. [16:52] zzo: isaacs: i think node-sync looks good [16:52] rick_h_: isaacs: cool, will do that then. Just wanted to check before I got writing [16:53] te-brian has joined the channel [16:53] kenperkins has joined the channel [16:53] zzo: isaacs: it's happening hopefully via node-sync [16:53] isaacs: rick_h_: it creates a prototype chain of default -> global config -> user config -> env -> cli config [16:53] isaacs: er, those arrows go the other way ... [16:54] rick_h_: yea, found it. Cool, write/rm? Will it create/remove them? [16:54] isaacs: rick_h_: the last time i looked at it, i think i decided that it'd be best to just rewrite it as a standalone thing, rather than try to pull out npm's code (since there's a *lot* of npm-specific stuff in there), and then port npm to use that instead. [16:54] zzo: isaacs: of course my evil dreamhost acct goes down right when i'm close [16:54] rick_h_: gotcha, ok [16:55] mikedeboer has joined the channel [16:55] isaacs: rick_h_: it's also somewhat tightly coupled to nopt [16:55] isaacs: i'm ok with that, but others might not be. [16:55] the_charlie has joined the channel [16:55] isaacs: er, actually, no, i think it isn't any more... [16:55] gr-eg has joined the channel [16:56] davididas has joined the channel [16:56] rb2k has joined the channel [16:57] smathy has joined the channel [16:57] rb2k: does anybody know of an HTTP client that allows access to the IP that got resolved in the request? [16:57] rb2k: (and: is there something like a "default" http client in node? e.g. the one with the largest user base) [16:58] samsonjs has joined the channel [16:58] eee_c has joined the channel [16:59] aliem has joined the channel [16:59] kdng-tr7 has joined the channel [16:59] bnoordhuis: rb2k: require('http')? [17:00] kdng-tr7: hi [17:00] dguttman has joined the channel [17:00] rb2k: bnoordhuis: I think that might be a bit low-level (e.g. automatic redirects) [17:00] rickharrison has joined the channel [17:00] bnoordhuis: rb2k: maybe mikeal's request lib? [17:00] seivan has joined the channel [17:01] rb2k: bnoordhuis: thanks, I'll take a look :) [17:02] rick_h_: looks like config-defs uses nopt [17:04] CIA-65: libuv: 03Ben Noordhuis 07master * rc01d6f9 10/ src/ev/ev.c : ev: fix infinite loop in ev_walk() - https://github.com/joyent/libuv/commit/c01d6f928ccf70587e620f388f8b6522c48e3a43 [17:05] ryanj has joined the channel [17:05] brolin has joined the channel [17:05] sweetd has joined the channel [17:06] admc has joined the channel [17:08] kevindente has joined the channel [17:08] rb2k: bnoordhuis: I can't seem to find a proper method that would return the IP :( [17:08] cying has joined the channel [17:10] zzo: rb2k: request.connection.remoteAddress [17:10] raidfive has joined the channel [17:10] rb2k: yeah, doesn't seem to work for my client connection [17:10] rb2k: undefined [17:11] bazookatooth1 has joined the channel [17:11] joshthecoder has joined the channel [17:13] stonecobra has joined the channel [17:13] muhqu has joined the channel [17:13] zzo: rb2k: you have a http.ClientRequest ? [17:14] voodootikigod has joined the channel [17:14] JJMalina has joined the channel [17:15] zzo: u need the response i think [17:16] hacksparrow has joined the channel [17:16] newy has joined the channel [17:18] mpavel has left the channel [17:19] zomgbie has joined the channel [17:19] tristanseifert has joined the channel [17:19] rb2k: tried on both [17:21] kersny has joined the channel [17:22] jasong_at_apache has joined the channel [17:23] agnat has joined the channel [17:23] zzo: rb2k: wait a sec you are making a request to a host & you want to know the ip of the host you just requested to? [17:23] rb2k: yes [17:23] stagas has joined the channel [17:23] rb2k: without doing an extra dns request [17:23] rb2k: it has to do one anyway [17:23] jasong_at_apache: I was about to pull the trigger for no.de @joyent but at the end realized they won't take my money as it's in beta still! [17:23] rb2k: I'd like to access that data [17:23] zzo: rb2k: there are hosts behind a vip & you wanna know which one got hit?? [17:24] rb2k: zzo: nope, little web crawler that needs the IP to do geo localisation [17:24] zzo: rb2k: dns should be cache'd locally so the 'extra' dns lookup will come from cache? [17:24] xerox: chapel: oh I see. [17:24] rb2k: "should" [17:24] bradleymeck has joined the channel [17:24] rb2k: not 100% sure about that [17:25] zzo: rb2k: maybe do the dns lookup first & then do the http request using the ip [17:25] rb2k: that breaks on redirects [17:25] heavysixer has joined the channel [17:25] rb2k: I'd like to have the actual URL of the server, not the first hop in the redirect chain [17:26] zzo: welp ya i don't see how to get peer's ip from httprequest/response - that blows [17:26] rb2k: yeah… that's what I thought [17:26] zzo: must be in there somewhere [17:26] rb2k: I'm completely new to node [17:26] rb2k: I'm currently doing it in ruby, but eventmachine is driving me nuts [17:27] dodger: i take it this is really really old: $ nodejs --version [17:27] dodger: 0.1.97 [17:27] dodger: grr ubuntu server. [17:27] joshthecoder: heh that's back when dinos ran the earth [17:27] figital has joined the channel [17:27] dodger: yeah there's no console object even. [17:28] zzo:   this.connection = socket; [17:28] zzo: on response object should have it [17:28] zzo: or res.socket [17:29] zzo: https://github.com/joyent/node/blob/master/lib/http.js [17:29] zzo: lines 213, 214 [17:29] dodger: has anyone done like "metaprogramming in node" just wondering [17:30] joshthecoder: <3 https://github.com/joyent/node/blob/gyp/gyp/all.gyp [17:30] Tobsn has joined the channel [17:31] joshthecoder: that's a neat build tool [17:31] hacksparrow has joined the channel [17:32] kersny has joined the channel [17:32] tjholowaychuk has joined the channel [17:32] softdrink: what is it? [17:33] joshthecoder: .gyp -> gyp -> XCode / VS / Make projects [17:33] rb2k: zzo: it has socket, but I can't seem to find a way to get the IP from it [17:35] HenrikJoreteg has joined the channel [17:35] zzo: http://nodejs.org/docs/v0.4.10/api/net.html#socket.remoteAddress is empty? [17:35] AvianFlu has joined the channel [17:35] bartt has joined the channel [17:36] rb2k: yes [17:36] rb2k: undefined [17:36] Murvin has joined the channel [17:37] rb2k: https://gist.github.com/308ced316dd26197da5d [17:37] rb2k: this is my test [17:37] kavla has joined the channel [17:37] patcito has joined the channel [17:37] mcluskyd_ has joined the channel [17:40] CIA-65: node: 03Ben Noordhuis 07master * r2bbb468 10/ (lib/child_process_uv.js src/process_wrap.cc): [17:40] CIA-65: node: child process: bind to libuv's kill process API [17:40] CIA-65: node: Fixes failing test test/simple/test-child-process-kill.js - http://bit.ly/qfnqtw [17:41] tjholowaychuk has joined the channel [17:41] samsonjs has joined the channel [17:43] sweetd_ has joined the channel [17:43] perezd has joined the channel [17:44] dgathright has joined the channel [17:45] dshaw_ has joined the channel [17:45] simenbrekken has joined the channel [17:46] cpetzold has joined the channel [17:47] bazookatooth1 has left the channel [17:47] reid has joined the channel [17:47] csm_ has joined the channel [17:48] skohorn has joined the channel [17:48] mattly has joined the channel [17:51] mscdex: rb2k: remoteAddress and remotePort are only available for incoming connections for a server on 0.4.x, that is changed in 0.5.x to include all sockets [17:51] rb2k: mscdex: ok, that explains it [17:51] rb2k: weird [17:52] zzo: rb2k: ya wow no idea sorry bizarro [17:52] arnee has joined the channel [17:53] hydrozen has joined the channel [17:53] hydrozen: Hi there. Just wondering, how does it work if you want 2 systems to be connected via socket 24/7? Is this realistic? if the connexion drops it opens it again… etc [17:54] gxdssoft has joined the channel [17:54] softdrink: tjholowaychuk: around? [17:54] tjholowaychuk: yo [17:55] CrabDude has joined the channel [17:55] softdrink: i'm getting some weird output from stylus. am i doing something wrong? https://gist.github.com/1125765 (css and styl files) [17:55] carmony has joined the channel [17:56] pickels has joined the channel [17:56] hacksparrow has joined the channel [17:56] softdrink: nevermind [17:56] tjholowaychuk: woah wtf [17:56] softdrink: i are teh dumb [17:56] Jippi has joined the channel [17:56] kersny has joined the channel [17:56] softdrink: my @keyframes down below are indented [17:57] aconbere has joined the channel [17:57] bobthecoow has joined the channel [17:58] skampler has joined the channel [17:58] androoid has joined the channel [17:59] mnaser has joined the channel [17:59] smtlaissezfaire has joined the channel [18:00] Murvin: anyone from Vancouver? [18:01] ryah: konobi--^ [18:02] reid has joined the channel [18:02] balupton has joined the channel [18:02] jerrysv has joined the channel [18:03] Murvin: how come there is no meet up in Vancouver? sigh... [18:03] tilgovi has joined the channel [18:03] bnoordhuis: Murvin: because you haven't organized it yet? [18:03] ekryski: Come to Calgary today! :-P [18:03] Swizec has joined the channel [18:03] softdrink: same reason there's no meetup in utah [18:03] softdrink: ¬¬ [18:03] ekryski: That's what I did. I just started one. [18:04] Murvin: bnoordhuis: u r right.. may be I should just do it. :) [18:04] jbpros has joined the channel [18:05] ekryski: Murvin: do it. We are having our first one today. Looks like we'll have around 10-15 people. More than I was expecting [18:06] bnoordhuis: Murvin: joyent has an office in vancouver, maybe you can scrounge some sponsoring off them [18:06] tjholowaychuk: Murvin I would come (from vic) if the ferry was not so annoying [18:07] ekryski: Ya. I'm surprised there isn't a group in Van. I forgot that Joyent has an office there. [18:07] Murvin: bnoordhuis: really? joyent has an office in Van? I know there was a meeting or some info session back in March, which I didn't find out until a month later. [18:07] bnoordhuis: Murvin: http://www.joyent.com/about/contact/worldwide-locations/ [18:07] ryah: Murvin: contact emily@joyent.com and cc scottm@joyent.com [18:08] Murvin: ok. have to think of a place to meet up. lol [18:09] geetarista has joined the channel [18:09] guillermo has joined the channel [18:09] Murvin: OMG water street. It was so close to my previous office. [18:09] Laurent4: Hi guys, do you know how could I access the session object for a user in node.js [18:09] Laurent4: ? [18:10] dguttman has joined the channel [18:10] Murvin: ryah: thanks. [18:11] shinuza has joined the channel [18:11] brez_ has joined the channel [18:11] Murvin: tjholowaychuk: let me find it out what the good time for meet up. :) [18:12] metaverse has joined the channel [18:12] parshap has joined the channel [18:12] http402 has joined the channel [18:12] isaacs has joined the channel [18:13] zemanel has joined the channel [18:14] geetaris_ has joined the channel [18:15] ekryski: tjholowaychuk: how long does it take to ride the ferry to van? I've never been to Vic but I heard it's beautiful! [18:15] tjholowaychuk: it's about 2 hours i think [18:15] tjholowaychuk: maybe a bit more [18:15] ekryski: ugh. [18:15] tjholowaychuk: i went to van for a day a few months ago and only got to spend about 1.5 hours there haha [18:15] tjholowaychuk: the rest was travel [18:16] c4milo: oh hai npm server [18:16] c4milo: anyone else is having issues with npm's server? [18:16] TheJH: !npm author npm [18:16] `3rdEden has joined the channel [18:17] TheJH: c4milo, my bot apparently can't connect, too [18:18] TheJH: isaacs, you here? [18:18] isaacs: TheJH: yo [18:18] isaacs: what's up? [18:18] TheJH: isaacs, is the npm server down? [18:18] isaacs: hm... seems reachable [18:18] isaacs: what's happening? what server are you trying to hit? [18:18] c4milo: isaacs: https://gist.github.com/1125821 [18:19] c4milo: isaacs: I'm checking the inet connection of my ec2 instance [18:20] TheJH: !npm author npm [18:20] c4milo: isaacs: just to make sure it isn't the reason [18:20] geetarista has joined the channel [18:20] TheJH: !npm owner npm [18:20] jhbot: owners: isaacs [18:20] isaacs: c4milo: works from here [18:20] kersny has joined the channel [18:21] jtsnow has joined the channel [18:21] c4milo: isaacs: I'm deploying again in my prod env [18:21] TheJH: isaacs, sorry, I'm stupid, I thought that it was down for my bot, too, but I just used the wrong command... argh! [18:21] isaacs: maybe it hiccupped. it'd be odd if an ec2 instance can't see it, since it's hosted on ec2, ultimately :) [18:21] jtsnow_ has joined the channel [18:21] c4milo: isaacs: indeed [18:22] Murvin_ has joined the channel [18:24] Eber has joined the channel [18:24] Eber: Hey guys... Has anyone succeeded installing NPM with the windows build? [18:25] bradleymeck: doesnt work due to tar/gzip missing on windows. basically until windows hits stable, expect not a whole lot. when it does, expect it to fail on anything that uses unix utilities [18:26] Eber: uhm, right... so it will be almost useless? [18:26] kersny has joined the channel [18:26] bradleymeck: no, it will quite usefull, just windows doesnt supply much in terms of utilities so you have to find replacements [18:27] bradleymeck: there are tar/gzip implementations for windows, but you have to manually install them [18:27] TheJH: we need a (core?) module that does gzip in js :) [18:27] bradleymeck: crypto is hard to do 100% right, i hope we leave it to tested code bases [18:27] Eber: I guess I can make it roll with cygwin, but then again, I can install regular node (not the windows binaries) with cygwin as well... [18:27] TheJH: would also be useful for messing around with its code [18:29] gg777 has joined the channel [18:29] patcito_ has joined the channel [18:29] saschagehlich has joined the channel [18:30] Eber: windows guys, or someone should bake cygwin direactly into windows... never gonna happen, but would be awesome to have a unix run time, properly updated... [18:30] Eber: anyway, I love what I can already do with cygwin... [18:31] mrryanjohnston_ has joined the channel [18:31] mrryanjohnston_: If I use multiple modules in my code released under multiple different licenses, how should I include these licenses in the documentation of my code? [18:32] Eber: quit [18:32] slifty has joined the channel [18:32] langworthy has joined the channel [18:33] Generic_Dumbass has joined the channel [18:34] hookdump has joined the channel [18:35] japj has joined the channel [18:35] kenperkins: has anyone had problems with nodemailer and exim4 [18:37] spcshpopr8r has joined the channel [18:39] hkjels_ has joined the channel [18:39] cpetzold has joined the channel [18:40] smithrobs has joined the channel [18:42] jakehow has joined the channel [18:42] c4milo has joined the channel [18:44] Generic_Dumbass has left the channel [18:45] fairwinds has joined the channel [18:46] mikeal has joined the channel [18:46] androoid has joined the channel [18:46] skohorn has joined the channel [18:47] JumpMast3r has joined the channel [18:47] pixel13 has left the channel [18:48] joeshaw has joined the channel [18:49] joeshaw: is there a general convention in node about whether callbacks are called sync and/or async? [18:49] harthur has joined the channel [18:49] joeshaw: the calback to dgram.send() seems to be called async when there's a DNS lookup but synchronously otherwise [18:50] galaxywatcher has joined the channel [18:50] joeshaw: and if you were expecting it to be async, you can get a stack overflow unless you manually defer to the main loop with a setTimeout() or something like that [18:50] gmonnerat has joined the channel [18:51] bradleymeck: joeshaw if you are recursing that much, might want to split up the work anyway [18:51] kjeldahl_ has joined the channel [18:52] joeshaw: bradleymeck: well, the problem is that i didn't think I was recursing, because I was assuming the callback was deferred to the main loop [18:52] monokrome has joined the channel [18:52] malditogeek has joined the channel [18:52] mekwall has joined the channel [18:53] joeshaw: in other words, the work is split up but the callbacks were recursive and immediate, which is unlike most node calls [18:53] kjeldahl_ has joined the channel [18:53] kevind has joined the channel [18:53] bradleymeck: joeshaw: dont ever think you know when something could bexecuted :/ kinda odd to figure out but you get used to it [18:54] joeshaw: the problem with dgram.send() is that it's (kinda) non-deterministic [18:54] joeshaw: only if it's doing a DNS lookup does the callback get called async [18:54] joeshaw: so you have to defer to a setTimeout() in all cases to be safe [18:54] joeshaw: I think I'll file a bug :) [18:55] bradleymeck: well you might not want to defer it since thats a performance hit, and i havent seen a stack overflow when using dgram yet /shrug ticket would be good for discussion [18:57] gmonnerat has left the channel [18:57] pifantastic_ has joined the channel [18:59] Laurent4: Hi guys, I have some errors when issuing node search such as npm ERR! TypeError: Cannot read property 'length' of undefined [19:00] ircretary has joined the channel [19:00] isaacs: ircretary: inst Laurent4 [19:00] ircretary: laurent4: `curl http://npmjs.org/install.sh | sh` (or, if there are permission issues, you can try: `curl http://npmjs.org/install.sh | sudo sh`) [19:01] temp01 has joined the channel [19:01] Laurent4: I installed it already but it gives me error when doing npm search [19:01] isaacs: Laurent4: please gist npm-debug.log file [19:02] adrianolaru has joined the channel [19:02] Laurent4: where do I gist it isaacs? [19:02] isaacs: Laurent4: http://gist.github.com [19:02] isaacs: Laurent4: or pastie, if you prefer. [19:03] mikedeboer has joined the channel [19:03] sweetd has joined the channel [19:04] hydrozen has joined the channel [19:04] Laurent4: ok thx :) [19:05] Laurent4: Here it is https://gist.github.com/1125960 :) [19:06] CIA-65: node: 03Ben Noordhuis 07master * rb8c8e9c 10/ lib/net_uv.js : net_uv: add listenFD shim that throws when called - http://bit.ly/mQ7d0T [19:06] isaacs: Laurent4: do that install command again. you're 4 versions behind :) [19:07] Laurent4: -_- shame on me [19:07] maushu has joined the channel [19:07] maushu_ has joined the channel [19:07] Laurent4: good thing to see things are moving so quick [19:07] joeshaw: bradleymeck: https://github.com/joyent/node/issues/1456 FYI [19:07] Laurent4: thanks isaacs [19:07] jonaslund has joined the channel [19:08] madsleejensen has joined the channel [19:08] isaacs: indeed, we iterate quickly :) [19:09] gxdssoft has joined the channel [19:10] kevindente has joined the channel [19:10] kenperkins: ok, he's a big FU to nodemailer + exim4 [19:10] kenperkins: here rather [19:13] Laurent4: Sweet!! It work like a charm now [19:14] odie5533 has joined the channel [19:15] odie5533: Is net.createConnection a wrapper for net.Socket.connect? If so, that is not clear in the docs. [19:15] exx has joined the channel [19:15] theCole has joined the channel [19:15] exx: ./configure Checking for program g++ or c++ : not found [19:16] exx: I'm getting this error: ./configure Checking for program g++ or c++ : not found when attempting to install node.js [19:16] the_charlie: install g++ [19:16] bksf has joined the channel [19:16] dgathright has joined the channel [19:16] the_charlie: sudo apt-cache search g++ [19:16] the_charlie: oops you dont need sudo for that [19:17] exx: is there a built in macosx compiler i could use? [19:17] the_charlie: I imagine its g++ [19:18] CIA-65: node: 03Ryan Dahl 07master * reeece4f 10/ (104 files in 22 dirs): Upgrade V8 to 3.5.3 - http://bit.ly/qrC6FT [19:18] exx: okay thank you [19:19] anupam has joined the channel [19:19] bksf: i setup my routes like this with express/node: /, /test and /:id ... but i'm trying to serve a few static files. before i was using app.use(express.static(__dirname + "/public")); / but i'm catching everything with /:id now. so i just want to serve three directories with static files. so when someone hits /images/* or /css/* or /js/* .. how cna i serve just those three directories statically? [19:20] tjholowaychuk: bksf typically just app.use(express.static('public')) [19:20] kevind has joined the channel [19:20] tjholowaychuk: GET /javascripts/foo.js GET /stylesheets/foo.css [19:20] tjholowaychuk: etc [19:20] aheckmann has joined the channel [19:20] markwubben has joined the channel [19:21] bksf: tjholowaychuk: im catching everything else with /:id for dyamic content. i can test it fast but then it would interfere? [19:21] tjholowaychuk: if you have a route defined as GET /:id, you'll need to next() [19:21] bksf: let me see.. [19:21] chjj: so v8 started implementing harmony features [19:21] tjholowaychuk: if it's not content you want [19:21] tjholowaychuk: or put the static() above app.use(app.router) [19:21] chjj: https://github.com/v8/v8/commit/2520fa9d819038aa75818ab7f4a17853a83186a6 [19:21] chjj: weakmaps [19:21] tjholowaychuk: chjj ohhH!! [19:21] tjholowaychuk: nice! [19:21] tjholowaychuk: hopefully not proxies! [19:21] tjholowaychuk: haha [19:21] odie5533: Are Nodejs tickets and the mailing list connected in any way? [19:21] kevind has joined the channel [19:21] bksf: i'll never know beforehand the dynamic routes except items in /css/ /images/ [19:22] tjholowaychuk: bksf well i mean if you do some query to a db or something, and determine it's not a user id etc [19:22] tjholowaychuk: it's a design choice of yours [19:22] bksf: ahh good call [19:22] chjj: i dunno, weakmaps actually look useful, implementing them yourself introduces memory leaks [19:22] bksf: yeah, sorry i can't believe i just asked something that boils down to me (thinking about) making a poor design choice [19:22] tjholowaychuk: chjj yeah weakmaps are useful [19:22] bksf: hah, thanks tjholowaychuk [19:22] tjholowaychuk: i just dont want proxies [19:22] tjholowaychuk: but time will tell [19:23] jerrysv: exx: xcode is available for free from the app store, it will install gcc/g++, etc [19:24] exx: jerrysv: thanks [19:24] anupam1 has joined the channel [19:24] simenbrekken: Ugh, is there really no other way of writing dynamic keys to an object other than the array syntax? [19:25] the_charlie: chjj, whats is the const keyword they're using ? [19:25] chjj: the_charlie: who? [19:25] the_charlie: simenbrekken, what would you prefer ? [19:25] jhurliman has joined the channel [19:25] CrabDude: isaacs: looks like I was able to get replication to work using CDB 1.1 [19:26] the_charlie: chjj, that link you posted [19:26] kevindente has joined the channel [19:26] chjj: oh, const is a non-standard feature [19:26] chjj: lets you set a constant, it will be completely immutable [19:26] CrabDude: isaacs: Even with 1.1 though, _design/app didn't work before replication, only after [19:26] chjj: other than that its like a variable [19:26] odie5533: my program calls socket.on('connect', function() { .. });. Is there a way to pass the socket as an argument to the callback? Does the callback have some internal way of knowing about socket? [19:27] chjj: i guess v8 uses it internally, they write a lot of the internal stuff in javascript [19:27] simenbrekken: the_charlie: a magical way to recogize document = {userId: {foo: 'bar'}} :) [19:27] CrabDude: isaacs: and I never got the _utils replication to work, used curl instead, FYI [19:27] edude03 has left the channel [19:27] the_charlie: simenbrekken, that would be nice :), but no I dont think that works :P [19:27] bnoordhuis: odie5533: 'socket' is visible in the scope of your closure [19:28] simenbrekken: the_charlie: I miss python symbols sometimes, like an old friend [19:28] odie5533: bnoordhuis: in this case, yes, but what if I had an array of sockets? I don't want to write functions that require socket be defined in scope for each call. [19:29] odie5533: shouldn't something like function(sock) { ... } work? [19:29] colinclark has joined the channel [19:29] bnoordhuis: odie5533: socket[i].on('connect', (function(sock) { return function() { console.error(sock) } })(socket[i])) [19:30] odie5533: wow is that ugly. [19:30] malditogeek has joined the channel [19:31] edude03 has joined the channel [19:31] odie5533: I guess that's the only way to pass variables to callbacks =/ [19:31] bnoordhuis: just scope them, that's how javascript works [19:31] nphase_ has joined the channel [19:31] nphase_ has joined the channel [19:31] bnoordhuis: you can wrap it up with pretty functions if you like [19:32] odie5533: that's a lot of work to write a generic connect function. [19:32] gxdssoft has joined the channel [19:32] hal1on has joined the channel [19:32] anupam1 has left the channel [19:33] mrryanjohnston_: i'm confused; isn't the socket referred to within the connect event itself? [19:33] bnoordhuis: no, the connect event has no arguments [19:34] odie5533: bnoordhuis: oh. so the data event has a data argument. so technically, the connect event could be re-written to pass the socket. [19:35] mrryanjohnston_: io.sockets.on('connection', function(socket) { socket.on('event', function() { }); }); [19:35] odie5533: yeah, like that, but for regular sockets [19:36] mrryanjohnston_: oop. thought we were talking socket.io. [19:36] bnoordhuis: odie5533: btw, event listeners run in the context of the object they're attached to [19:36] bnoordhuis: iow, this === your socket [19:36] odie5533: that would be what I'm looking for then. [19:37] odie5533: yep :) [19:37] julio has joined the channel [19:37] cying has joined the channel [19:38] julio has left the channel [19:39] odie5533: thank you bnoordhuis. code looks much better now [19:39] slifty has joined the channel [19:40] tracker1 has joined the channel [19:40] zanes has joined the channel [19:41] bnoordhuis: odie5533: my pleasure [19:43] CIA-65: node: 03Ben Noordhuis 07master * r5a49522 10/ lib/child_process_uv.js : [19:43] CIA-65: node: child process: don't send signal if process is already terminated [19:43] CIA-65: node: Fixes failing test test/simple/test-exec-max-buffer.js - http://bit.ly/rnAqDu [19:43] Tommy__ has joined the channel [19:43] thomblake has joined the channel [19:43] thomblake has left the channel [19:44] Bonuspunkt has joined the channel [19:44] bobthecoow has joined the channel [19:45] dephex has joined the channel [19:46] `3rdEden: is there a event that is called when the server has started listening [19:47] `3rdEden: instead of doing a listen with a callback? [19:47] saschagehlich: Is there already an implementation of UPNP for node.js? [19:47] `3rdEden: or did I just make a feature request ;) [19:48] jerrysv: `3rdEden: can always make your callback do an init if there's not :) [19:48] `3rdEden: jerrysv the problem is that I don't control the servers i receive [19:49] `3rdEden: so I just just randomly listen on them [19:49] jerrysv: ah, bummer [19:49] `3rdEden: Yeh, because I need the event to initialize a garbage collector [19:50] japj: bnoordhuis: does simple/test-http-1.0.js ever fail for you with an AssertionError on line 89? [19:50] montylounge has joined the channel [19:50] joeshaw has left the channel [19:51] hwinkel has joined the channel [19:51] `3rdEden: jerrysv yay for hidden api's [19:51] bnoordhuis: japj: seems to work for me [19:51] `3rdEden: there seems to be a undocumented `listening` event on the servers [19:51] hal1on has left the channel [19:51] bnoordhuis: oh, that one [19:52] bnoordhuis: japj: it's a bastard - what error message do you get? [19:52] japj: bnoordhuis: great, I ran it 4 times, 2 times it failed, now it passes ok again.. I hate failures that happen "sometimes" [19:53] csm has joined the channel [19:53] japj: AssertionError: "hello world\n" == "undefined" [19:53] japj: at response_validator (c:\github\node\test\simple\test-http-1.0.js:89:12) [19:53] bnoordhuis: undefined even [19:53] japj: at Object.cleanup [as _onTimeout] (c:\github\node\test\simple\test-http-1.0.js:43:5) [19:53] japj: at Timer.ontimeout (timers_uv.js:84:39) [19:54] te-brian has joined the channel [19:54] hwinkel has joined the channel [19:54] bnoordhuis: japj: what happens if you place a console.error(arguments) at line 88? [19:55] japj: I did that and logged everything, then it stopped failing, undid the changes, stil going ok... AAAAAAAAAAAARGH what kind of testcase is this? [19:55] jetienne has joined the channel [19:55] japj: btw, that test fails on cygwin and on mingw [19:56] japj: for me atleast [19:56] bnoordhuis: japj: on cygwin with and without --use-uv? [19:56] jetienne: flow control in node+browser in 20lines!! https://github.com/jeromeetienne/gowiththeflow.js/blob/master/gowiththeflow.js#L1-20 i just reached the 20lines bar :) [19:57] jetienne: `3rdEden: you got to love that :) [19:57] AvianFlu: do you mean flow control or control flow? :_P [19:57] `3rdEden: jetienne idk it was intentional or unintential [19:57] jakehow has joined the channel [19:57] bnoordhuis: japj: if you want a hard test case to debug: test/simple/test-http-dns-fail.js [19:57] japj: bnoordhuis: yes with and without --use-uv it failes [19:57] jetienne: AvianFlu: i dont understand [19:58] japj: bnoordhuis: I cant debug on windows, it's broken [19:58] bnoordhuis: japj: hangs with --use-uv, works with --use-uv --use-http1, works without both flags [19:58] bencc has joined the channel [19:58] jetienne: `3rdEden: it is purely intentional, the first version was 50 line. and 30 line after cleanup [19:58] AvianFlu: people get the two terms confused a lot, one refers to controlling the flow of program execution (control flow) and the other is more about rate limiting (flow control) [19:58] japj: bnoordhuis: and I'd like an easy bug first ;) [19:58] jetienne: 30 to 20line required actual work [19:58] `3rdEden: lol [19:59] jetienne: AvianFlu: in this case this is "stuff to avoid callbacks to be too ugly" :) [19:59] `3rdEden: code writing is hard work ;) jetienne [19:59] AvianFlu: technically, that's control flow [19:59] jetienne: `3rdEden: im not sure about tha t:) [19:59] `3rdEden: jetienne now do it in 140byets [19:59] `3rdEden: ;D [19:59] jetienne: hehe [20:00] jetienne: it is already too ugly :) [20:00] dreamdust has joined the channel [20:00] lukstr: why do you want to reduce it? [20:00] jetienne: bloginess is largely increased [20:01] japj: bnoordhuis: test-http-client-reconnect-bug fails with a WindowsError: [Error 5] Toegang geweigerd: 'c:\\github\\node\\test\\tmp' for me btw... lovely translated error messages [20:01] jetienne: and i got a bunch of 20liners [20:01] jetienne: all in browser+node [20:02] jetienne: ok thats it nothing more. just wanted ot share [20:02] elifou has joined the channel [20:02] bnoordhuis: japj: no idea why - that test doesn't even access tmp/ i think [20:03] aliemmo has joined the channel [20:03] japj: bnoordhuis: has to do with the tools/test.py pummel/testcfg.py afterRun script [20:03] kulor-uk has joined the channel [20:04] gazumps has joined the channel [20:04] bnoordhuis: japj: it tries to `rm -rf tmp/*` i think? [20:04] japj: bnoordhuis: for test-http-dns-fail I see twice getHostByName ENOTFOUND on the console and then timeout [20:04] bnoordhuis: japj: with --use-uv? [20:05] Aikar: process.on('uncaughtException', function (err) { [20:05] Aikar: is that not the correct way to catch uncaught exceptions? [20:05] booo has joined the channel [20:06] bbrandon has joined the channel [20:06] clifton: thats correct [20:06] TheJH: Aikar, I think it is [20:06] japj: bnoordhuis: that's with running it with make test-uv [20:06] japj: bnoordhuis: if I run it manually, it just hangs after the two getHostByName ENOTFOUND [20:06] Aikar: { stack: [Getter/Setter], [20:06] Aikar: arguments: [ 'Seq' ], [20:06] Aikar: type: 'not_defined', [20:07] japj: bnoordhuis: that's ./node.exe --use-uv test/simple/test-http-dns-fail.js [20:07] slifty has joined the channel [20:07] Aikar: still getting that printed to my console instead of my 'handler' which would print the trace etc [20:07] bnoordhuis: japj: right, that's the same behaviour i'm seeing [20:07] bnoordhuis: japj: but try it with --use-uv --use-http1 and it'll work [20:08] japj: yep [20:08] TheJH: Aikar, "err.stack" contains the error message, the stacktrace, etc. it's a string [20:08] mikeal has joined the channel [20:08] bnoordhuis: japj: but the test also works without --use-uv --use-http1 [20:08] bnoordhuis: it's a right bastard! [20:09] Aikar: TheJH: process.on('uncaughtException', function (err) { [20:09] Aikar: var errMsg = err.message + "\n" + err.stack; [20:09] Aikar: console.error(errMsg); [20:09] japj: bnoordhuis: looking at the test, it is expected to do the dns lookup twice right? so that is normal behaviour [20:09] japj: bnoordhuis: it is just not exiting then [20:09] Aikar: that code is not getting executed [20:09] jacobolus has joined the channel [20:09] bnoordhuis: japj: yeah, the event loop doesn't quit [20:10] bnoordhuis: japj: but the weird thing is that the loop looks identical with and without --use-uv [20:10] TheJH: Aikar, maybe you have two handlers for uncaught stuff or so? [20:10] japj: did we have a "log all things that keeps the event loop from exiting" function? [20:10] Aikar: unless someones lib is doing it... [20:10] Aikar: likely express? [20:10] bnoordhuis: japj: ev_walk() - but it's disabled by default [20:10] bnoordhuis: didn't show anything though [20:11] TheJH: Aikar, I think that it shouldn't - could you add a console.log("test"); or so right before you add the uncaught error handler to make sure that you're editing the right file and so on? [20:11] Aikar: im putting it in my main app.js... lol [20:11] Aikar: before it even starts listening [20:12] TheJH: Aikar, I remember trying to fix a bug for hours until I discovered that I was editing the backup [20:12] Aikar: and the exception doesnt throw until later [20:12] skampler has joined the channel [20:12] Aikar: im sure im editing right file [20:12] TheJH: Aikar, can you gist the whole file? [20:13] japj: bnoordhuis: what does req.end() do and why is it at line 53 in that test? [20:13] Creap has joined the channel [20:13] Aikar: TheJH: sorry work stuff, cant [20:14] TheJH: Aikar, mhm, ok [20:14] Creap: I'm following https://github.com/joyent/node/wiki/Installation but when trying to checkout origin/v0.4.10 I get "error: pathspec 'origin/v0.4.10' did not match any file(s) known to git. [20:14] davidascher has joined the channel [20:14] bnoordhuis: japj: it starts a client http request to a non-existing domain [20:15] Creap: what's the reason for all node virtual machine installers and stuff, why would I need different node versions? [20:15] mc_greeny has joined the channel [20:15] AvianFlu has joined the channel [20:15] stalled has joined the channel [20:15] TooTallNate has joined the channel [20:15] jbpros has joined the channel [20:16] aheckmann has joined the channel [20:16] TheJH: Aikar, could you just try the console.log to be sure? (sorry if that seems like a stupid idea) [20:17] wookiehangover has joined the channel [20:18] monokrome has joined the channel [20:20] drudge has joined the channel [20:20] bobthecoow has joined the channel [20:21] isaacs has joined the channel [20:21] nphase has joined the channel [20:21] nphase has joined the channel [20:22] japj: bnoordhuis: just realised Event: 'error' doesnt seem to be described in the docs for ClientRequest is it? [20:22] parshap has joined the channel [20:22] bnoordhuis: japj: er, perhaps not [20:22] bencc has joined the channel [20:23] japj: indeed perhaps not [20:23] zooozooo has joined the channel [20:24] davve has joined the channel [20:24] japj: it would be nice if you could do: [20:24] japj: req.on('*', function(eventName){ [20:24] japj: console.log(eventName); [20:24] japj: }) [20:25] japj: to log all events that are emitted [20:26] skampler: req.emit = function(eventname) { ... } [20:26] skampler: ;p [20:26] isaacs: japj: coming soon, perhaps [20:26] japj: isaacs: is that the emitter2 stuff? [20:26] davidsklar has joined the channel [20:26] isaacs: japj: req.onAll(function () { console.log(req.event) }) [20:26] isaacs: japj: yeah [20:26] japj: cool [20:27] Croms has joined the channel [20:27] konobi: .on(function(eventname){ ... }); [20:29] clifton: whether eventemitter2 gets merged into core or not, it sounds like we'll still see onAll() [20:29] AvianFlu: EventEmitter2 FTW [20:29] japj: I dont mind what it is called, as long as we can use it to log everything that is emitted ;) [20:30] tjholowaychuk: onAll is weird akward :( [20:31] saschagehlich: wtf why do I get a EAFNOSUPPORT if I try to connect to the ssdp multicast address? :( [20:32] aconbere has joined the channel [20:33] bnoordhuis: saschagehlich: connect to? ssdp is udp based right? [20:33] yozgrahame has joined the channel [20:33] anubhaw has joined the channel [20:33] konobi: tjholowaychuk: any way to detect a HEAD request with connect? [20:34] tjholowaychuk: konobi req.method [20:34] saschagehlich: oops [20:34] konobi: except with router it gets overwritten [20:34] saschagehlich: goddamnit I'm too tired to do this [20:34] saschagehlich: but you're right, yes [20:34] japj: lol, time to get some sleep then? :) [20:34] tjholowaychuk: konobi it's still HEAD but yeah currently they are routed to the GET routes [20:34] tjholowaychuk: to help reduce duplication [20:35] tjholowaychuk: doubling every route for head would be mad but yeah you want to make sure to check it if you're doing something expensive [20:35] smathy has joined the channel [20:35] tjholowaychuk: res.send() etc handle it automatically for you as a fallback [20:35] anubhaw: I am getting following error while pulling some 10000 rows from mongo . [20:35] anubhaw: BinaryParserBuffer.prototype.hasNeededBits = function hasNeededBits (neededBit [20:35] chbrown has joined the channel [20:35] isaacs: tjholowaychuk: that's probably the right thing to do, but it'd be nice if there was app.head() routing [20:36] saschagehlich: japj: nope, time to get lots more coke [20:36] tjholowaychuk: isaacs yeah agreed, i have that in the issues [20:36] anubhaw: "/usr/lib/node/.npm/mongodb/0.9.6-7/package/lib/mongodb/bson/binary_parser.js:351 [20:36] anubhaw: BinaryParserBuffer.prototype.hasNeededBits = function hasNeededBits (neededBit" [20:36] isaacs: oh, kewl :) [20:36] konobi: tjholowaychuk: ah... i see, it doesn't overwrite req.method... gotcha [20:36] anubhaw: though I dont get any error if I try pulling <1000 records [20:37] albertosheinfeld has joined the channel [20:37] ecin has joined the channel [20:38] anubhaw: anybody having experience with node+mongo please help [20:38] chbrown: isaacs: What's the easiest/recommended way to install a github fork of some project that's in NPM? [20:39] isaacs: chbrown: npm install http://github.com/user/project/tarball/commitish [20:39] isaacs: chbrown: you can also put "project": "" in your dependencies hash [20:40] chbrown: Oh, cool. I'll give that a try. [20:40] isaacs: seems like the github user withthe username of "user" should really have a project named "project" with a tag called "commitish" [20:41] MarkVolkmann has joined the channel [20:41] eee_c has joined the channel [20:41] yhahn: lol [20:42] japj: unfortunately, he is a zend person? [20:42] Bonuspunkt has joined the channel [20:42] chbrown: the github user "user" doesn't seem to be very with it. [20:43] ifandelse has joined the channel [20:43] bosphorus has joined the channel [20:43] AAA_awright: With a directory called "ent" [20:44] japj: yep, he is a php developer [20:44] japj: and technical reviewer [20:44] AAA_awright: ACTION waits for the obscure joke to sink in [20:45] ifandelse: quick question regarding EventEmitter. Am I correct in my understanding that the "emit()" call is async? [20:46] japj: isaacs: he does have a sql backup with user 'admin', 'user' and 'blogger' in that beautiful repository [20:46] bnoordhuis: ifandelse: no [20:46] AAA_awright: ifandelse: I think it's guarenteed to call the registered hooks instantly... Async is only for I/O operations [20:46] AAA_awright: Instantly i.e. not even use process.nextTick() [20:47] isaacs: ifandelse: emit is guaranteed to be sync. this is Important. [20:47] kjeldahl_ has joined the channel [20:48] isaacs: ifandelse: otherwise we would not be able toinject functionality between the header and body of an incoming HTTP stream, for instance. [20:48] Swizec has joined the channel [20:51] HotPornYo has joined the channel [20:51] HotPornYo: Check this out: http://bit.ly/HotPornYo [20:52] addisonj: hrm, anyone going to ban/kick him? [20:52] ifandelse: isaacs & AAA_awright - thanks for the explanation. Was getting some confusing info on various blogs saying EventEmitter was asynchronous - had me head scratching [20:53] TheJH: I'll report him in #freenode [20:54] schmidp has joined the channel [20:56] mquin has joined the channel [20:56] reid has joined the channel [20:56] adrianolaru has left the channel [20:57] johnduhart has joined the channel [20:57] schmidp_ has joined the channel [20:59] HotPornYo has joined the channel [20:59] captain_morgan has joined the channel [20:59] Chris-_ has joined the channel [20:59] klovadis has joined the channel [21:00] heavysixer has joined the channel [21:00] EvRide has joined the channel [21:01] TooTallNate has joined the channel [21:02] dgathright_ has joined the channel [21:02] BPower has joined the channel [21:03] BPower has left the channel [21:03] espacia has joined the channel [21:04] arlolra has joined the channel [21:05] fly-away has joined the channel [21:06] Nican has joined the channel [21:06] reid has joined the channel [21:10] srid has joined the channel [21:11] threecreepio has joined the channel [21:14] cccaldas has joined the channel [21:14] pengwynn has joined the channel [21:14] CrisO has joined the channel [21:15] arlolra: tjholowaychuk: does express support signals or hooks? so that in the middle of req/res i can emit an event? [21:15] tjholowaychuk: to do what? [21:16] tjholowaychuk: you could emit events on any arbitrary emitter you wanted [21:19] arlolra: i suppose. i thought maybe there was canonical way of doing it. [21:19] willwhite has joined the channel [21:20] mscdex: anyone know of a module that removes whitespace and newlines from a js file? [21:20] tjholowaychuk: what are you doing? there might be a canonical way [21:20] softdrink: mscdex: i think uglify will do it if you set the options that way [21:20] mscdex: i tried using the google closure compiler service and it doesn't seem to work :S [21:20] mscdex: hrmm [21:20] maqr has joined the channel [21:21] hkjels_ has joined the channel [21:22] mikeal has joined the channel [21:22] materialdesigner has joined the channel [21:23] arlolra: tjholowaychuk: nothing special. just recording activity data from various points in the app [21:23] TheJH: mscdex, uglifyjs removes whitespaces and does more, like variable name mangling [21:24] mscdex: i see that, but i can't do any mangling since i'm actually cleaning up a js object [21:24] mscdex: this seems like it should work well [21:25] Bonuspunkt: any news on Server-Side JavaScript Injection: Attacking NoSQL and Node.js ? [21:26] chjj: news? [21:26] Bonuspunkt: like detail how it was performed [21:27] chjj: huh? [21:27] Bonuspunkt: SSIJ [21:27] Bonuspunkt: https://www.blackhat.com/html/bh-us-11/bh-us-11-briefings.html [21:27] chjj: is this a new buzzword that people think theyve discovered for the first time or something? [21:28] mike5w3c has joined the channel [21:29] AvianFlu: Bonuspunkt: from the description he's probably just gonna talk about noobs using eval() on user input and stuff like that [21:29] Bonuspunkt: thats kinda what i expect, just wanted to verify that [21:29] AvianFlu: somebody finds a buffer overflow in node's HTTP parser, we have a problem; somebody says 'OH NOES NOOBS MIGHT WRITE INSECURE CODE ON THAT PLATFORM!' and you have FUD [21:30] tjholowaychuk: Bonuspunkt or if you allow user input on a template engine compilation [21:30] tjholowaychuk: you could do big dammage that way too [21:30] bksf: i come from a frontend js experience or blocking backend experience. i have a database query here with node-sqlite. db.execute( with a callback. is there a built in function something like "all operations complete" etc that i can call so that my variables arent undefined? [21:30] liquidproof has joined the channel [21:30] AvianFlu: bksf: this blocks: var x = myFn() [21:30] AvianFlu: THis does not: myFn() [21:30] bksf: ie, before i response.send(x) - x needs to be defined first in a previous function body .. [21:30] bksf: ahh [21:30] kkaefer: AvianFlu: that's misleading at best [21:30] AvianFlu: so clarify for me [21:31] Aikar: that makes no sense to me [21:31] Aikar: if you call a sync function, itll blog, if you call an async function, it wont, SYNTAX doesnt change a thing unless the code is designed to detect if you passed a CB or not [21:31] Aikar: block* [21:34] domo has joined the channel [21:35] JoshC1 has joined the channel [21:35] lupomontero has joined the channel [21:36] lor__ has joined the channel [21:37] bksf: does anyone have familiarity with node-sqlite? so if i run db.execute("SQL STATEMENT", function( ... callback ...) .. and have a return in the callback, its not returning? not sure ... [21:37] bksf: ahh [21:37] Aikar: thats called 'understanding asynchronous programming' [21:37] bksf: Aikar: ok i see.  [21:37] Aikar: you cant return a value, you have to pass it along to another function as an argument [21:38] dguttman has joined the channel [21:38] bksf: hmm, ok. [21:39] Aikar: bksf: look at substacks module "seq", you can do seq().seq(function() { db.execute("SQL", this); }).seq(function(result) { .. use result .. }); [21:39] bksf: oh. looks nice will do thanks. [21:39] Creap has left the channel [21:40] jarek has joined the channel [21:40] jarek has joined the channel [21:40] hkjels_ has joined the channel [21:42] dpen has joined the channel [21:42] bksf: seq is really nice, exactly what i'm looking for - [21:42] blup has joined the channel [21:43] reid has joined the channel [21:43] dpen: hi I'm trying to follow ubuntu instructions on https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager and when I run the second command, it says: Error reading https://launchpad.net/api/1.0/~chris-lea/+archive/node.js: [21:43] hij1nx has joined the channel [21:43] dpen: how do i fix this? [21:44] reid_ has joined the channel [21:44] reid has joined the channel [21:45] mike5w3c has joined the channel [21:45] elifou: k [21:45] elifou`` has left the channel [21:46] AvianFlu: dpen: copy-paste from the mailing list: It's not "official", but if you build with cmake (make -f Makefile.cmake) it will create a deb and rpm. [21:47] jj0hns0n has joined the channel [21:47] dpen: avian, what page is that from? [21:48] saschagehlich: is there an easy and quick way to get the servers' network ip address without executing ipconfig/ifconfig? [21:49] jj0hns0n_ has joined the channel [21:50] AvianFlu: dpen: somebody said it on the mailing list in response to "hey, why aren't there packages for specific distros?" [21:50] carmony has joined the channel [21:50] AvianFlu: or a similar question [21:51] AvianFlu: I can't vouch for it but it's worth a shot - go get the source and try it :-P [21:52] dpen: when i try to clone the git repo I get fatal: Unable to look up github.com (port 9418) (Name or service not known) [21:52] eboyjr: Get your internet working? [21:53] dpen: oh yeah that would help [21:53] dpen: im in virtualbox.... i assumed it was okay [21:53] bksf: so sequence looks awesome. i've installed and went according to the example (i guess not?) - this throws an error, the error is ... helpful hah. [object object], [object, object] http://pastebin.com/6pr1FxPZ [21:53] guillermo has joined the channel [21:54] Poetro has joined the channel [21:54] Poetro has joined the channel [21:54] domo has left the channel [21:54] CIA-65: libuv: 03Igor Zinkovsky 07gyp * rfa5876e 10/ (build/all.gyp include/uv-win.h): fix msvs build - http://bit.ly/nsKbVw [21:54] bksf: the first to the stack is the db call, then the db callback [21:54] dpen: thanks avian, eboyjr [21:54] aoberoi has joined the channel [21:55] jarek_ has joined the channel [21:55] AvianFlu: no problem... if you're going straight from github, make sure to do 'git checkout v0.4' if you want stable [21:55] AvianFlu: otherwise it'll v0.5.3 you, which you may not want [21:55] xerox: origin/v0.4 [21:55] AvianFlu: thanks xerox [21:55] dpen: oh no original method worked once internet turned on [21:56] dpen: <-- blockhead today [21:56] AvianFlu: 'git checkout origin/v0.4' [21:56] bksf: instead of db.execute("SQL", callback) now first seq is db.execute("SQL", this) second is (callback, this) [21:56] xerox: also that will get you 0.4.11-pre right now [21:56] xerox: but that's probably fine, it's what I use too [21:56] xerox: checkout origin/v0.4.10 for the latest stable *release* [21:57] zackattack has joined the channel [21:57] zackattack: Yo [21:57] bksf: hmm anyone on seq? :/ [21:57] mike5w3c_ has joined the channel [21:57] guest_605 has joined the channel [21:57] zackattack: Any node.js hackers around? I want to pay someone $50 to write a modification to my app: disable all client-side console.log() statements in _production_. [21:57] malkomalko has joined the channel [21:58] admc has joined the channel [21:59] ajashton has joined the channel [21:59] ryanfitz_ has joined the channel [21:59] losing has joined the channel [21:59] yozgrahame1 has joined the channel [21:59] kkaefer: zackattack: if (process.env.NODE_ENV === 'production') console.log = function() {}; [21:59] brianseeders has joined the channel [22:00] kkaefer: zackattack: in production, start your scripts with: NODE_ENV=production node foo.js [22:00] zackattack: kkaefer: Yeah but I have external javascript files too [22:00] bksf: anyone on seq? :/ [22:00] TheJH: zackattack, and you want them to still be able to use console.log? [22:00] kkaefer: zackattack: oh, you're referring to the browser? [22:00] zackattack: Yes. [22:00] kkaefer: what does that have to do with node.js? [22:01] zackattack: Um [22:01] zackattack: I think because of socket.io? [22:01] bnoordhuis: zackattack: perl -i pe 's/console\.log/if (process.env.NODE_ENV === "production") console.log/g' $(find -name \*.js) [22:01] zackattack: I think that console.log statements get sent to the browser? [22:01] kkaefer: zackattack: basically, the same trick works on the client as well [22:01] bnoordhuis: zackattack: where can i send the bill to? [22:01] zackattack: you didn't modify my app [22:02] zackattack: there's a million ways that can go wrong [22:02] adrianmg has joined the channel [22:02] bksf: "you didn't modify my app" [22:02] TheJH: zackattack, post your app somewhere and we'll see who's the fastest one :) it will probably take a few minutes or less [22:03] zackattack: https://github.com/zackster/CompassionPit--Node-/ [22:03] xerox: -- - [22:04] zackattack: -- - ! [22:05] bksf: anyone on seq ? [22:07] TheJH: zackattack, is the client-side JS the stuff in "static"? [22:07] zackattack: TheJH: Yes,... and I also suspect due to socket.io etc. that there are console.log messages getting pushed to the user (?) [22:08] michaelhartau has joined the channel [22:09] figital: why does this output foo twice? http://pastebin.com/yfVsxy19 [22:09] dguttman has joined the channel [22:10] espacia has joined the channel [22:11] Aikar: figital: your browser is requesting favicon.ico [22:11] dshaw_ has joined the channel [22:11] figital: Aikar ... :) good catch. thx !! [22:12] fostah has joined the channel [22:12] AvianFlu: figital: browsers tend to do a lot you wouldn't necessarily expect, using something like curl will make for saner testing [22:12] figital: right on. props. [22:12] monokrome: isaacs: If you're around, is this a bug? http://paste.pocoo.org/show/452824/ [22:12] aliemmo has joined the channel [22:12] odie5533: bnoordhuis: why is some of buffertools written in c++? [22:12] monokrome: Trying to use adduser to get my account working on my mac. [22:13] bnoordhuis: odie5533: speed [22:13] bksf: is anyone here using seq or a step/non async style library ike that? [22:13] figital: ( i usually dump the uri instead of 'foo' and never ran into that ;)) [22:14] dshaw_1 has joined the channel [22:14] akshatj has joined the channel [22:14] Elems has joined the channel [22:14] odie5533: bnoordhuis: makes it difficult to use on windows. Not that it matters to anyone but me. [22:14] TheJH: Aikar, is config.serveMerged an indicator for production? [22:14] isaacs: monokrome: yeah, update. [22:15] isaacs: ircretary: inst monokrome [22:15] ircretary: monokrome: `curl http://npmjs.org/install.sh | sh` (or, if there are permission issues, you can try: `curl http://npmjs.org/install.sh | sudo sh`) [22:15] bnoordhuis: odie5533: it won't help you now but npm's going to have pre-compiled add-ons [22:15] monokrome: isaacs: Cool. Will try. [22:15] odie5533: bnoordhuis: Yeah I heard that. [22:15] monokrome: Thanks - isaacs, ircretary [22:16] odie5533: bnoordhuis: any chance of node-buffertools being included in the node.js itself? [22:16] losing has joined the channel [22:16] bnoordhuis: odie5533: i doubt it [22:17] bnoordhuis: odie5533: is there anything in particular you need? [22:17] TheJH: Aikar, does this work? https://github.com/zackster/CompassionPit--Node-/pull/21 [22:17] mikeal has joined the channel [22:17] odie5533: I wanted to use node-bufferstream, a module by dodo which uses your node-buffertools. I need to split incoming TCP streams on a delimiter. [22:18] odie5533: bnoordhuis: Some of the code I saw was pretty bad (slow) to accomplish this, performing str = str + data every time it received data. [22:19] jbrokc has joined the channel [22:19] bnoordhuis: odie5533: v8 optimizes string concatenation (well, sometimes anyway) [22:19] bnoordhuis: odie5533: it stuffs the pieces into something it calls a cons string [22:20] bnoordhuis: odie5533: it's like a list of strings presented as a single string [22:22] dgathright has joined the channel [22:22] maqr has joined the channel [22:23] skampler has left the channel [22:24] odie5533: I am trying to use lazy, and was wondering if there is a way of creating a new function in the module without editing his file: https://github.com/pkrumins/node-lazy/blob/master/lazy.js#L170 [22:24] monokrome: isaacs: Updated. Same issue. [22:25] randallagordon has joined the channel [22:25] zanes has joined the channel [22:25] simenbrekken has joined the channel [22:26] dominictarr has joined the channel [22:27] isaacs: monokrome: aha. you're entering the wrong password. you can reset it here: http://admin.npmjs.org/reset [22:27] EyePulp: any faye users in here today? having trouble with wildcard publishing. [22:29] isaacs: monokrome: weird, apparently it's returnign 409 (because the thing exists) rather than returning 403 (because you're not allowed to update the object) [22:29] WrErase has joined the channel [22:32] sechrist: wow transloadit is pretty badass [22:34] csm has joined the channel [22:35] EyePulp: isaacs: I just updated a lot of packages on a project using --verbose, and noticed it made a lot of references to the "/Users/eyepulp/.npm" directory, even though I'm not using -g. has it always used that other .npm directory to cache stuff? [22:35] isaacs: EyePulp: yeah [22:36] gxdssoft has joined the channel [22:36] isaacs: EyePulp: ~/.npm is a cache folder. you can set that with the --cache config [22:36] EyePulp: (versus the local /projects/node_modules/ path) [22:36] isaacs: EyePulp: npm help folders <-- very informative [22:36] yhahn: "npm puts various things on your computer. That´s its job." [22:36] yhahn: lol [22:36] EyePulp: heh [22:37] EyePulp: isaacs: reading - thanks. [22:38] monokrome: isaacs: It does exist already. I am just trying to login here. [22:39] EyePulp: ACTION just saw how some sausage gets made. [22:40] pkrumins: odie5533, what function do you want to add? [22:43] tauren has joined the channel [22:43] odie5533: pkrumins: hey! I want to add a function that would split on a different character than \n [22:43] jasonw22 has joined the channel [22:44] matomesc has joined the channel [22:45] ummm22 has joined the channel [22:46] pkrumins: odie5533: looks like line 179 needs to be changed to do that [22:47] ummm22: hey all, quick question; i'm trying to screen scrape a site, but the main content I want happens after a lot of javascript; after the page's js executes then the content I want is readily available. I know about jsdom, request, etc. for node.js, but is there a way to retrieve a page and use node.js to evaluate the javascript on the page? [22:47] odie5533: pkrumins: Should I change your file? I was hoping there was a way I could just inject my function into the class from my file. [22:48] DoNaLd` has joined the channel [22:48] chjj: ummm22: jsdom is your best bet, if the page is doing anything using the dom, which it surely is, its pretty much your only option [22:48] pkrumins: odie5533: i guess you can do class.function = function () { your function } [22:48] pkrumins: but that wont get access to this [22:49] pkrumins: odie5533: you can do class.prototype.function = function () { ... }, i think you'd get this then [22:49] pkrumins: not sure [22:49] ummm22: chjj: the page is definitely doing a lot to the dom, but can node.js / jsdom process those changes? [22:50] chjj: as far as im aware, jsdom can handle most things [22:51] odie5533: pkrumins: doesn't seem to be working. I'll just edit the file then. Is lazy an efficient way of reading data from a TCP stream? [22:51] chjj: but even if youre executing the scripts on the page in a separate context, it can break your process with something as simple as an infinite loop [22:53] CrisO has joined the channel [22:53] ummm22: that's true, but the site i'm scraping has some pretty well-behaved js. i'll test some more on the capabilities of jsdom, but so far i'm testing with a page that's basically only a document.write('BLAH'), then fetching that via jsdom and dumping the html, but all i see is the script, no 'BLAH' written. [22:55] M_ has joined the channel [22:55] mehtryx has joined the channel [22:55] isaacs: monokrome: hm, seems like something very strange is happening. that PUT request is just dying, without even ever having a "data" or "end" event [22:55] isaacs: or even "error" [22:55] monokrome: :/ [22:55] pkrumins: odie5533: it's fine. [22:55] saschagehlich: rattazong [22:55] monokrome: Would my log help? [22:55] saschagehlich: oops wrong window [22:56] dgathright has joined the channel [22:57] CrisO has left the channel [23:00] cpetzold: anyone know where i can find documentation for subclassing in mongoose? [23:00] Squax has left the channel [23:01] brez_ has joined the channel [23:02] cpetzold: subclassing a model [23:02] ummm22: chjj: just to let you know for future reference, jsdom definitely has this capability via jsdom.jsdom(), as documented in the readme. i should definitely rtfm a little closer in the future haha. [23:03] Nican has joined the channel [23:05] secoif has joined the channel [23:06] pandeiro has joined the channel [23:07] Sorella has joined the channel [23:08] isaacs: monokrome: ah, i see. couch changed from sending a 403 for bad passwords to sending a 401 instead, adn closing the connection immediately, which leads to node emitting "close", but not "end" [23:08] caolanm has joined the channel [23:09] squeese has joined the channel [23:10] coreb has joined the channel [23:10] harthur has joined the channel [23:12] HenrikJoreteg has joined the channel [23:14] AvianFlu: isaacs: I just had two npm installs in two separate terminals stop simultaneously with this error: https://gist.github.com/1126545 [23:15] dcelix has joined the channel [23:15] monokrome: isaacs: So, this means that I had a bad password? [23:15] jasonw22 has joined the channel [23:16] wadey has joined the channel [23:20] Nican__ has joined the channel [23:21] nphase has joined the channel [23:21] nphase has joined the channel [23:22] Nuck has joined the channel [23:23] chbrown has joined the channel [23:23] Nican has joined the channel [23:23] ph^_ has joined the channel [23:25] tar__ has joined the channel [23:27] blaenk has joined the channel [23:27] blaenk has joined the channel [23:31] malditogeek has joined the channel [23:31] cjm has joined the channel [23:33] zemanel has joined the channel [23:34] catb0t has joined the channel [23:34] ryanfitz has joined the channel [23:35] HenrikJoreteg has left the channel [23:36] base698 has joined the channel [23:36] malditogeek has joined the channel [23:37] dominictarr: does anyone know where to go to post a git hub issue to github itself? [23:37] base698: I have a file that is an octet stream. It's a buffer. When I send to a browser, txt files like xml and txt work fine to download, but binary like .gz and .png do not. Any ideas? [23:38] TheJH: dominictarr, maybe https://github.com/contact [23:39] unlink has joined the channel [23:39] blaenk: hey guys, what determines the colors of vows.js? [23:39] unlink has joined the channel [23:39] dominictarr: hmm, I want to post an issue about the issue page. [23:40] patachou__ has joined the channel [23:40] blaenk: oh I see, it's hardcoded, that sucks [23:40] dominictarr: I'd like to do it on an issue page so that other people can get behind it. [23:41] isaacs: monokrome: https://github.com/isaacs/npm/commit/0bba3036e4bd6511cff7228a27face61a755eada [23:41] CIA-65: node: 03Ryan Dahl 07gyp * r377d439 10/ (5 files in 3 dirs): Improve gyp build - now works kind of (+5 more commits...) - http://bit.ly/qLF3sf [23:41] isaacs: fixed in next npm, thanks for the report [23:42] zemanel_ has joined the channel [23:42] azeroth___ has joined the channel [23:42] ph^ has joined the channel [23:42] dshaw_ has joined the channel [23:43] christophsturm has joined the channel [23:43] Cromulent has joined the channel [23:43] shoe` has joined the channel [23:43] sub_pop has joined the channel [23:44] Swizec has joined the channel [23:44] _sorensen_ has joined the channel [23:44] meder has joined the channel [23:44] Dreamer3__ has joined the channel [23:44] yenz has joined the channel [23:44] KrooniX has joined the channel [23:45] odie5533: Is there a nice way to check if a value is in an array? I have 5 number and want to see if a new number is one of those. [23:45] Kester has joined the channel [23:45] vid__ has joined the channel [23:45] isaacs: odie5533: Array.isArray(thing) [23:45] bnoordhuis: v8: [42].indexOf(42) [23:45] v8bot_: bnoordhuis: 0 [23:45] isaacs: oh, IN an array [23:45] isaacs: yeah [23:45] bnoordhuis: v8: [42].indexOf(1337) [23:45] v8bot_: bnoordhuis: -1 [23:45] isaacs: indexOf [23:45] hide has joined the channel [23:46] isaacs: does a === check. [42, "42", 42].indexOf("42") [23:46] isaacs: v8: [42, "42", 42].indexOf("42") [23:46] v8bot_: isaacs: 1 [23:46] jeedey has joined the channel [23:46] s0enke has joined the channel [23:46] odie5533: thank you :) [23:46] odie5533: neat bot [23:47] isaacs: v8: ~[1,2,3].indexOf(100) [23:47] v8bot_: isaacs: 0 [23:47] isaacs: v8: ~[1,2,3].indexOf(1) [23:47] v8bot_: isaacs: -1 [23:47] slickplaid: v8: ~~[1, 2, 3].indexOf(2); [23:47] v8bot_: slickplaid: 1 [23:47] isaacs: v8: ~[1,2,3].indexOf(2) [23:47] v8bot_: isaacs: -2 [23:47] HenrikJoreteg has joined the channel [23:47] slickplaid: v8: ~~[1, 2, 3].indexOf(3); [23:47] v8bot_: slickplaid: 2 [23:47] isaacs: odie5533: ~list.indexOf(thing) is truish if it's there, falsey otherwise. [23:47] slickplaid: v8: ~~[1, 2, 3].indexOf(4); [23:47] v8bot_: slickplaid: -1 [23:47] adrianmg has left the channel [23:47] odie5533: truish? [23:47] isaacs: odie5533: yeah. [23:47] bnoordhuis: truthy [23:48] odie5533: -1 is true? [23:48] bnoordhuis: good trick for rounding numbers btw [23:48] isaacs: odie5533: it's true-ish [23:48] bnoordhuis: v8: ~~13.37 [23:48] v8bot_: bnoordhuis: 13 [23:48] slickplaid: hmm i thought it was ~~ not just ~ [23:48] isaacs: v8: -1 == true [23:48] v8bot_: isaacs: false [23:48] isaacs: v8: -1 === true [23:48] v8bot_: isaacs: false [23:48] isaacs: v8: !! -1 [23:48] v8bot_: isaacs: true [23:48] isaacs: v8: true == -1 [23:48] v8bot_: isaacs: false [23:48] isaacs: hm.. i forgot how to get == to cast to boolean. maybe it doesn't. [23:49] isaacs: v8: -1 ? "truish" : "falsey" [23:49] v8bot_: isaacs: "truish" [23:49] dshaw_: slickplaid: ! != ~ [23:49] isaacs: v8: 0 ? "truish" : "falsey" [23:49] v8bot_: isaacs: "falsey" [23:49] secoif has joined the channel [23:49] chjj: isaacs: what do you mean? [23:49] monokrome: Why doesn't npm update itself? :| [23:49] isaacs: monokrome: npm update npm -g [23:49] isaacs: monokrome: it's globally installed [23:49] monokrome: ah [23:50] isaacs: ircretary: inst monokrome [23:50] slickplaid: v8: if(~~[20].indexOf(1)){ return true; } else { return false; }; [23:50] v8bot_: slickplaid: SyntaxError: Illegal return statement [23:50] odie5533: What is the point of adding the ~ operator? [23:50] odie5533: I don't understand what you were showing there. [23:50] ircretary has joined the channel [23:50] isaacs: ircretary: inst monokrome [23:50] ircretary: monokrome: `curl http://npmjs.org/install.sh | sh` (or, if there are permission issues, you can try: `curl http://npmjs.org/install.sh | sudo sh`) [23:50] isaacs: monokrome: or that^ [23:50] slickplaid: http://dreaminginjavascript.wordpress.com/2008/07/04/28/ look near the bottom [23:50] cjm has joined the channel [23:50] tjholowaychuk: odie5533 ~-1 == 0 [23:51] tjholowaychuk: in the case of indexes [23:51] tjholowaychuk: you want 0 [23:51] isaacs: odie5533: yeah [23:51] AvianFlu: odie5533 it's the bitwise NOT operator [23:51] zemanel has joined the channel [23:51] cjm has left the channel [23:51] slickplaid: explains how it works [23:51] isaacs: odie5533: it adds 1 and then multiplies by -1 [23:51] tjholowaychuk: odie5533 that's why you'll see if (~foo.indexOf()) and if (!~foo.indexOf()) sometimes [23:51] dgathright has joined the channel [23:52] isaacs: odie5533: so ~arr.indexOf(key) will be falsey if it's not found, or truish if it is [23:52] slickplaid: if(~index) return true; else return false; [23:52] slickplaid: doh [23:52] ajashton has left the channel [23:52] isaacs: personally, I prefer if (list.indexOf(key) !== -1) since it's more clear [23:52] chjj: ive actually noticed in benchmarks that, ~str.indexOf('...') is faster than str.indexOf('..') !== -1 [23:52] chjj: or about the same [23:52] chjj: at the very least [23:53] bnoordhuis: it probably depends on the v8 version [23:53] slickplaid: makes more sense to use ~ in my head for some reason [23:53] bnoordhuis: ~~ is sometimes faster than Math.floor(), sometimes not [23:53] dshaw_: odie5533: Suggestion: start with ([1].indexOf(1) > −1) for now. [23:53] isaacs: chjj: if that is your bottleneck in a real application, and it makes a difference worth caring about, i will eat lawn clippings on youtube. [23:53] slickplaid: v8: ~-1 [23:53] v8bot_: slickplaid: 0 [23:53] chjj: isaacs: rofl [23:53] chjj: im not serious, im just saying [23:53] isaacs: ACTION not worried. [23:53] chjj: .. :) [23:53] catb0t: SyntaxError: Unexpected token : [23:53] isaacs: :) [23:54] slickplaid: isaacs: challenge accepted. [23:54] tjholowaychuk: ~ is a little obscure for that stuff [23:54] dshaw_: IMHO, better to understand the code you're writing then 1337 [23:54] tjholowaychuk: but then so is indexOf [23:54] isaacs: slickplaid: it wasnt' a challenge. [23:54] chjj: i think i benchmarked every trivial line of code when writing my selector engine [23:54] tjholowaychuk: .includes(foo) would be nicer [23:54] chjj: including indexOf [23:54] chjj: yeah [23:54] slickplaid: I just want to see isaacs eat grass clippings :D [23:54] dshaw_: _.contains [23:54] cjm has joined the channel [23:54] dshaw_: (ducks) [23:54] tjholowaychuk: hahaha [23:54] tjholowaychuk: would be nice if js could just add some of this stuff [23:54] dguttman has joined the channel [23:54] tjholowaychuk: since people are so worried about altering the protos [23:55] isaacs: Object.define(Array.prototype, "has", { value: function (k) { return this.indexOf(k) !== -1 }, enumerable:false }) [23:55] chjj: yeah that would be nice [23:55] slickplaid: +1 [23:55] isaacs: tjholowaychuk: i think "has" is in es-next, isn't it? i know "some", "many", and a few other things got added. [23:55] chjj: i also like the name "has" better than includes [23:55] tjholowaychuk: isaacs no clue [23:55] isaacs: if (admins.has(user)) ... [23:55] isaacs: [23:55] tjholowaychuk: has is nice and short [23:56] tjholowaychuk: if (roles.has(admin)) [23:56] tjholowaychuk: is kinda weird [23:56] tjholowaychuk: though [23:56] tjholowaychuk: hha [23:56] dshaw_: dshaw.has('no clue') [23:56] tjholowaychuk: if (roles.includes('admin')) [23:56] dshaw_: yeah, sounds odd [23:56] bnoordhuis: if 'admin' in roles > * [23:56] slickplaid: if(can.haz(cheezburgr)){ return noms; } [23:56] isaacs: hahah [23:57] tjholowaychuk: ahahah [23:57] chjj: haz should be implemented just for that [23:57] jhbot: dshaw_: evaluation result: true :P [23:57] chjj: cheezburgr could be a new type [23:57] dshaw_: tks [23:57] slickplaid: ~-1 [23:57] [[zz]] has joined the channel [23:57] jimt has joined the channel [23:57] zackattack has joined the channel [23:58] slickplaid: hehe [23:58] TheJH: slickplaid, ? [23:58] slickplaid: TheJH: ? [23:58] TheJH: slickplaid, why hehe? [23:58] slickplaid: honestly, i keep messing up irssi window splits and sending to the wrong channel lol [23:58] slickplaid: but it fit in here too [23:59] chjj: i dont use split windows on irssi [23:59] towski has joined the channel [23:59] dshaw_: Did you discover the eight strict equals D? [23:59] chjj: i just use the hidden windows and switch between em [23:59] chjj: irssi === best irc client though [23:59] slickplaid: i like to be able to quickly glance while working at this and another channel [23:59] Dreamer3 has joined the channel [23:59] slickplaid: switch from irssi to vim to shell [23:59] chjj: just look at the "Act" message [23:59] chjj: ah