[00:00] prettyrobots: Where are people having a meaningful discussion of sidejacking? [00:02] sechrist: Anybody know of something that is sort of a DNS proxy but sprays the request amongst multiple dns servers and responds with the fastest one? [00:02] sechrist: I guess similar to a load balancer [00:03] johan_bouveng: sechrist: amazon ec2 [00:03] johan_bouveng: :P [00:03] tanepiper: sechrist: http://www.contentwithstyle.co.uk/content/nodejs-load-balancer-proof-of-concept ? [00:03] sechrist: nah this needs to run on individual machines for people in my company [00:03] sechrist: oh hmm [00:03] tanepiper: google is you friend :p [00:04] sechrist: er [00:04] sechrist: that's not dns [00:04] sechrist: that's http [00:04] halfhalo: psh, http, what a useless tech [00:04] jesusabdullah: I'd imagine some of the steps are still applicable [00:04] twoism has joined the channel [00:05] jesusabdullah: tanepiper: Games, you say? [00:05] sechrist: well the problem is that we have all sorts of crap in our private name server at work, and people dial in with an SSL VPN [00:05] jesusabdullah: I want to make browser games someday [00:05] altamic_ has joined the channel [00:05] sechrist: the problem is that everybody using the ssl vpn has to set their primary dns to the one at the office [00:05] jesusabdullah: Better n' a cisco vpn [00:05] sechrist: which has to hop through the vpn [00:05] sechrist: which is slow as crap [00:05] jesusabdullah: My uni uses a cisco vpn, and the linux client is buggy [00:05] sechrist: so my proposal is something that runs locally that sprays the office's dns and googles [00:05] jesusabdullah: SO buggy that you have to find a patch frmo the blogoblags to even compile it [00:05] sechrist: and responds with the fastest existent recort [00:06] jesusabdullah: and then it still causes kernel panics [00:06] jesusabdullah: :( [00:06] benburkert has joined the channel [00:07] benburkert has joined the channel [00:08] gerad has joined the channel [00:09] robmason_ has joined the channel [00:13] robmason_ has joined the channel [00:14] bnoordhuis: jesusabdullah: is it a cisco easyvpn? [00:14] jesusabdullah: bnoordhuis: I just use the client [00:15] jesusabdullah: vpnclient :v [00:15] jesusabdullah: idk if its an EASY vpn [00:15] jesusabdullah: but it is a vpn, and cisco makes it [00:15] bnoordhuis: jesusabdullah: you can use vpnc for that [00:15] bnoordhuis: way better than the cisco client [00:16] bnoordhuis: doesn't need a custom kernel module either [00:16] BHSPitMonkey has joined the channel [00:17] altamic has joined the channel [00:19] danslo has joined the channel [00:21] jesusabdullah: bnoordhuis: There's like one particular setting that doesn't work with vpnc [00:21] jesusabdullah: Trust me, I tried vpnc. It has gnome integration and all that jazz, so I was pretty pissy when I found out it wouldn't work [00:21] jesusabdullah: :( [00:21] bnoordhuis: jesusabdullah: do you remember what setting that was? [00:23] altamic_ has joined the channel [00:24] Zeph\k0d3 has joined the channel [00:25] jesusabdullah: bnoordhuis: tcp [00:25] bnoordhuis: ah that cisco-proprietary thingy [00:25] bnoordhuis: you're SOL then, yes [00:26] jesusabdullah: Indeed :( [00:26] benburkert has joined the channel [00:28] gedw99 has joined the channel [00:28] gedw99: node in windows OR tiny linux virtual machine ? [00:28] gedw99: any damn small linux distros that work with node ? [00:29] Lorentz: Eh, base debian install with minimal packages installed for nodejs would do. [00:29] Lorentz: Quite tiny as it is. [00:29] gedw99: thanks.. Wil give it a whirl.. [00:30] johan_bouveng: gedw99: get a free instance at amazon [00:30] tanepiper: i was just about to say the same thing johan_bouveng :) [00:30] johan_bouveng: gedw99: easy to setup node + etc on their base linux ami [00:31] johan_bouveng: t1.micro instances are free for a year [00:31] johan_bouveng: rather disruptive [00:31] johan_bouveng: i pay for mine tough. [00:32] Lorentz: I'd just run it in a local VM + linux instance if you're on windows, or just straight-up have a linux box around for these sorts of things. [00:32] Lorentz: Then again, it's because I'm in Australia, and laggy ssh really annoys me. [00:32] johan_bouveng: isnt there a lamp mamp wamp for win? [00:32] johan_bouveng: if u want it local [00:33] Lorentz: Lots of options, yes. [00:33] benburkert has joined the channel [00:33] gedw99: yeah i have a few servers here at home. I think i will just boot one as pure linux.. Cant be bothered with vamazon [00:33] johan_bouveng: tanepiper: u run on amzn? [00:33] johan_bouveng: physical hw is 90s [00:33] johan_bouveng: :P [00:33] tanepiper: johan_bouveng: no, but i signed up for one of the free ones and have installed node on it [00:33] tanepiper: not using it yet [00:34] johan_bouveng: tanepiper: oki. [00:34] johan_bouveng: tanepiper: its neat! [00:34] sh1mmer has joined the channel [00:34] tanepiper: yea, haven't decided what to put on it yet since my own side it on no.de [00:34] johan_bouveng: in da cloudz0r [00:35] johan_bouveng: no.de heh [00:35] ossareh has joined the channel [00:35] johan_bouveng: u german? [00:35] tanepiper: nope [00:35] johngbrooks_ has joined the channel [00:35] tanepiper: no.de is run by joynet [00:35] johan_bouveng: (dont mention the war!) [00:35] johan_bouveng: ok [00:36] drudge_ has joined the channel [00:41] devinus- has joined the channel [00:41] Utkarsh has joined the channel [00:42] benburkert has joined the channel [00:42] benburkert has joined the channel [00:46] danslo has joined the channel [00:55] lakin has joined the channel [00:56] lakin: Hi guys - I have a javascript file that I use both serverside and client side and on the server side I want it to export a few method names. How do I refer to exports in a way that will work in both the browsers and node.js ? [00:57] mAritz: if (typeof(exports) === 'undefined') { exports = {}; } [00:57] mAritz: this way browsers will not throw an error if you add stuff to the exports var. [00:58] lakin: mAritz, perfect, thanks! [00:59] mAritz: np. hope it actually does what you wanted :D [01:01] yhahn has joined the channel [01:01] lakin: Seems like it. :) [01:01] TomsB has joined the channel [01:04] zemanel has joined the channel [01:05] bbttxu has joined the channel [01:07] Utkarsh has joined the channel [01:09] evanmeagher has joined the channel [01:12] mrjjwright has joined the channel [01:14] JimBastard has joined the channel [01:15] dguttman has joined the channel [01:15] zentoooo has joined the channel [01:19] Utkarsh has joined the channel [01:22] meatmanek_ has joined the channel [01:23] CIA-93: node: 03Ryan Dahl 07master * rc6029c7 10/ (6 files): [01:23] CIA-93: node: Remove util.print from docs [01:23] CIA-93: node: Use process.stdout.write() - http://bit.ly/dygJe9 [01:23] prettyrobots_ has joined the channel [01:26] o_o has joined the channel [01:29] prettyrobots_ has joined the channel [01:31] prettyrobots has joined the channel [01:33] Utkarsh has joined the channel [01:36] robotarmy has joined the channel [01:37] jakehow has joined the channel [01:45] elijah-mbp1 has joined the channel [01:48] slaskis_ has joined the channel [01:50] sirevanhaas has joined the channel [01:54] kawaz_work has joined the channel [01:54] mape_ has joined the channel [01:56] nsm has joined the channel [01:57] twoism has joined the channel [01:58] MikhX has joined the channel [02:01] tanepiper: hmm: https://github.com/palm/webos-samples [02:02] Utkarsh has joined the channel [02:02] stagas_ has joined the channel [02:04] indutny has joined the channel [02:05] bpot has joined the channel [02:05] smtlaissezfaire has joined the channel [02:08] danslo has joined the channel [02:08] gf3 has joined the channel [02:09] SvenDowideit has joined the channel [02:10] Draggor has joined the channel [02:11] mikeal has joined the channel [02:15] jakehow has joined the channel [02:17] Twelve-60 has joined the channel [02:17] Utkarsh has joined the channel [02:20] gkatsev: so, once you have a node project working. How do you run it on a server? Do you deamonize it somehow or just open a screen session and type 'node server.js' in it? [02:21] jimt has joined the channel [02:21] firede has joined the channel [02:24] chewbran1a has joined the channel [02:24] dquestions has joined the channel [02:25] rbranson: gkatsev: search for "daemon" on this page: https://github.com/ry/node/wiki/modules [02:28] gkatsev: is that what people generally do? [02:31] zentoooo has joined the channel [02:31] dgathright has joined the channel [02:34] mopemope has joined the channel [02:34] mopemope has left the channel [02:34] Utkarsh has joined the channel [02:38] Yuffster has joined the channel [02:39] aurynn: Is there a icalendar module yet? [02:40] rbranson: icalendar is stupid simple format [02:41] firede_ has joined the channel [02:41] meso has joined the channel [02:42] isaacs: oh, this is so weird [02:42] isaacs: that write corruption problem [02:43] isaacs: i can reproduce it even if i trap a reference to the buffer.. [02:43] isaacs: so it's not gc [02:44] mattonrails has joined the channel [02:45] aurynn: yes, it is stupid simple [02:45] aurynn: but I am also lazy [02:45] mattonrails has left the channel [02:46] mbrochh has joined the channel [02:46] noahcampbell has joined the channel [02:46] benburke_ has joined the channel [02:49] gkatsev: wow, there are a lot of mobules on that page [02:50] devinus_ has joined the channel [02:54] aurynn: I have totalk to creationix about that [02:54] aurynn: we're using my postgres-js instead of his [02:56] dmachi has joined the channel [02:56] tilgovi has joined the channel [03:03] bpot has joined the channel [03:09] Me1000 has joined the channel [03:13] cataska has joined the channel [03:13] smtlaissezfaire has joined the channel [03:15] bartt: Given a Buffer, how could I find the mime-type for the contents of the buffer? [03:16] smtlaissezfaire: How does javascript actually hash objects in an object? I'm really surprised by this behavior: https://gist.github.com/667342 [03:17] smtlaissezfaire: I'm looking for something like Ruby's Object#hash or smalltalk's #hashcode. [03:19] smtlaissezfaire: Ah - just found this post: http://stackoverflow.com/questions/194846/is-there-any-kind-of-hashcode-function-in-javascript [03:21] Aria: Indeed. I just dealt with that myself. Define toString(), essentially, since all object keys are strings. [03:21] Aria: Without it, you have hash["[Object object]"] [03:22] smtlaissezfaire: I'm a little wary of redefining toString on all of my objects - it seems like an ugly hack and something that I'm going to kick myself for 6 months from now. [03:23] halorgium has joined the channel [03:23] evanmeagher has joined the channel [03:24] halorgium has left the channel [03:24] Aria: Yeah. The other solution is to define a uid() or something like that. [03:25] Aria: And always use a hash[obj.uid()] [03:25] gkatsev: smtlaissezfaire: maybe this will help: https://github.com/ry/node/wiki/modules#security [03:26] smtlaissezfaire: gkatsev: Oh - awesome. [03:26] smtlaissezfaire: https://github.com/michaelsbradleyjr/Hash [03:27] ajsie has joined the channel [03:27] smtlaissezfaire: gkatsev: Thanks. I'm actually writing this for the browser but testing it with node. [03:27] ajsie_ has joined the channel [03:27] ajsie_: i know there is a way to chain methods in js asynchronously: http://www.dustindiaz.com/async-method-queues/ [03:28] ajsie_: but is there a framework/library for it? [03:28] ajsie_: to make things easier [03:28] gkatsev: it should possibly/probably help out anyway. Also, i'm sure there are a bunch of crypto libs for js. [03:28] yeevgen has joined the channel [03:29] gkatsev: I am using a message queue at work, currently. It's great. [03:34] tapwater_ has joined the channel [03:36] message144 has joined the channel [03:37] evanmeagher: what's the "standard" way to pass an inline error object to a callback? [03:37] benburkert has joined the channel [03:37] message144: Hi, for some reason the following returns an empty string: var d = fs.readFileSync('/proc/stat', 'ascii'); Any ideas? BTW, I am on linux, and the file does exist. [03:37] evanmeagher: something like cb({name: 'Error', message: 'something bad happened'})? [03:39] Zeph\k0d3 has joined the channel [03:41] indutny: evanmeagher: something like cb(new Error('message')); [03:42] evanmeagher: indutny: thanks. I thought I'd seen it done both ways, but I'll go with that for now. [03:42] indutny: message144: Actually it should return a Buffer object [03:42] message144: indutny, if I leave out the 2nd argument it returns an empty buffer [03:42] indutny: message144: Have you tried it without enforced encoding? [03:42] indutny: ok [03:42] message144: indutny, so if I do: var d = fs.readFileSync('/proc/stat').toString(); it returns an empty buffer [03:43] indutny: have you tried on other files? [03:43] message144: indutny, ... no will try right now [03:44] message144: indutny, yes it works on a normal file [03:44] message144: it seems to just not work on /proc files [03:44] message144: indutny, im guessing it doesnt work on non-disk files [03:44] indutny: yep, looks like that [03:44] indutny: can you create an issue? [03:45] message144: yeah i will... ill try a Readable Stream also [03:45] message144: see if that works [03:45] indutny: ok [03:46] indutny: v8: fs [03:46] v8bot: indutny: ReferenceError: fs is not defined [03:46] benburkert has joined the channel [03:46] indutny: v8: require('fs').readFileSync('/proc/stat').toString() [03:46] v8bot: indutny: ReferenceError: require is not defined [03:48] Tprice: how do i require() a new module from inside a function [03:49] Tprice: how do i call a fresh copy of require()? [03:49] Tobsn has joined the channel [03:49] Aria: Fresh in what way? [03:50] Tprice: the content of the file changes [03:50] Tprice: i have a function that updates a file [03:51] Tprice: then i want to requery the updated file [03:52] indutny: good question [03:52] Tprice: to give you an idea [03:52] Tprice: http://pastebin.com/8PQy0FSE [03:52] Tprice: that if is inside a function [03:52] dquestions has joined the channel [03:52] Aria: Ah! [03:53] Tprice: it onnly updates the require() when i restart node [03:53] Aria: right. Because require() caches it. [03:54] Tprice: can i make it not cache? [03:54] Aria: I'm reading the source of node.js to see. [03:55] Tprice: maybe i should read teh file and not require it [03:55] Tprice: but then its 5 lines and not one [03:55] Aria: That's definitely an option. Run it with the script binding. [03:56] Aria: Sure, but you can make that a library ;-) [03:56] Utkarsh has joined the channel [03:56] Tprice: haha i find things turn into librarys a lot [03:57] Aria: Of course. [03:57] Aria: That's called 'good code' [03:58] Tprice: reuse the code its amazing! [03:58] Tprice: haha [03:58] Aria: Especially in Javascript, where you can keep code so nicely compartmentalized... [03:59] Aria: Ah, the cache is in a closure. You're not gonna be able to get at it. [03:59] Aria: (Short of hacking node) [03:59] smtlaissezfaire has joined the channel [03:59] indutny: You're definitely not able to clear cache [04:02] Aria: Ooh. In 0.3.0 you might be able to. [04:04] indutny: yes [04:04] indutny: :) [04:04] dquestions has joined the channel [04:04] indutny: v8: /* Say */ "Yes!" [04:04] v8bot: indutny: "Yes!" [04:05] Aria: Ooh, you can in 0.3.0. [04:05] aconbere has joined the channel [04:05] Aria: delete require.cache['full real path of file loaded'] [04:14] path[l] has joined the channel [04:19] dquestions has joined the channel [04:21] saschagehlich_ has joined the channel [04:21] jchris has joined the channel [04:22] stoneg has joined the channel [04:24] indutny: how many people are there now? [04:25] mikew3c_ has joined the channel [04:26] isaacs has joined the channel [04:34] richcollins has joined the channel [04:35] robmason has joined the channel [04:38] captain_morgan has joined the channel [04:40] aho has joined the channel [04:40] bpot has joined the channel [04:45] AAA_awright has joined the channel [04:45] dgathright has joined the channel [04:45] dquestions has joined the channel [04:47] iszak has joined the channel [04:53] smtlaissezfaire has joined the channel [04:53] shouvik has joined the channel [04:55] jevin has joined the channel [04:55] jevin has left the channel [04:57] dquestions has joined the channel [04:59] mbrochh has joined the channel [05:04] tekky has joined the channel [05:09] MikhX has joined the channel [05:13] necrodearia has joined the channel [05:16] richcollins has joined the channel [05:17] shouvik has joined the channel [05:17] shouvik: Hi all [05:18] shouvik: having some problems with node.js install [05:18] shouvik: am I supposed to do just make or sudo make? [05:18] MikhX has joined the channel [05:18] shouvik: when I do just make, it starts showing me errors like files missing, macros.js [05:19] shouvik: while it actually exists in the location the error is pointing to [05:19] shouvik: while on a sudo make its successful [05:22] s33n has joined the channel [05:24] JimBastard has joined the channel [05:25] JimBastard: we totally just got our first round of real funding :-) [05:25] JimBastard: wooooooooot [05:25] JimBastard: take that YC! [05:26] jesusabdullah: :o Nice! [05:26] jesusabdullah: ^5 [05:27] JimBastard: we require additional node.js modules [05:27] SubStack: \o/ [05:27] SubStack: JimBastard: I'm on it [05:28] SubStack: hmmm I might spin off this resource allocation lib to npm [05:28] ang: JimBastard: congrats and good luck :) [05:28] JimBastard: thanks ang ! [05:28] JimBastard: we gotta raise a bit more before end of year [05:28] indutny: JimBastard: really congrats :) [05:28] JimBastard: but its looking goood [05:28] JimBastard: im totally spending all the money on free hosting for you guys [05:29] JimBastard: so start thinking up some resource intensive apps [05:29] ajsie_: JimBastard: congrats [05:29] JimBastard: back to coding! [05:29] JimBastard: thanks guys! [05:31] ajsie_: what arguments and in which order does an asynch function have [05:31] ajsie_: is it function asynch(error, data, callback) ? [05:31] jesusabdullah: Oh no not a test! D: [05:31] jesusabdullah: Usually it's function(inputs, callback) and the callbaCK IS OF FORM CB(ERR, DATA) [05:32] jesusabdullah: oh snap capslock [05:33] aurynn: ouch :( [05:33] jesusabdullah: hmm? [05:33] ajsie_: jesusabdullah: but if its nested callbacks [05:33] SubStack: maybe I can run my resource-intensive startup on JimBastard's free servers without him noticing [05:34] SubStack: MAYBE [05:35] ShiZWeaK has joined the channel [05:35] ShiZWeaK has left the channel [05:37] ajsie_: oh now i get it [05:37] fcoury has joined the channel [05:37] ajsie_: there are action functions, and callback functions [05:37] MikhX has joined the channel [05:37] ajsie_: i thought action functions could also be callback functions [05:37] ajsie_: but maybe that is not the case [05:38] jesusabdullah: the only real distinction between functions is how you use them. In the end, they're just functions, and you can do it however you want [05:39] jesusabdullah: having the callback be the last arg, and having callbacks take an error as first argument, is all just a convention [05:39] SubStack: protip: functions are actually objects [05:39] SubStack: in that they can have attributes >_> [05:40] SubStack: ACTION abuses that fact perhaps too often [05:41] jesusabdullah: gurl [05:41] jesusabdullah: YOU are an ABUSIVE WSPOUSE. [05:42] SubStack: me and MY RENEGADE WAYS [05:42] brianc has joined the channel [05:42] brianc has left the channel [05:42] brianc has joined the channel [05:42] jesusabdullah: indeed [05:42] kjeldahl has joined the channel [05:54] gwoo has joined the channel [05:54] gwoo has joined the channel [05:55] yhahn has left the channel [05:58] breccan has joined the channel [05:59] boaz has joined the channel [06:01] indutny: anyone interested in nodeapp here? [06:01] indutny: :) [06:01] indutny: I'll be pleased to tell about it to anyone [06:05] richcollins: Anyone know how to get jsdom working with node? I get "undefined is not a function" when I try to jQuerify [06:06] Aria: Which version of node? [06:10] Tprice: Aria: how does “ delete require.cache['full real path of file loaded']” work? [06:10] Tprice: i dont understand [06:10] richcollins: Aria: v0.3.1-pre [06:11] Aria: richcollins: I've not tested it with anything so new. It works well under 0.2.4 [06:12] richcollins: Aria: OK I'll try that [06:12] ajsie_: is it possible to chain like this in node.js while keeping it asynch: User.creates_file('file.jpg').renames_file('renamed.jpg').append('Hello World') [06:12] ajsie_: or more like this: File.create('file.jpg').rename('renamed.jpg').append('Hello World') [06:12] Aria: ajsie_: Not exactly, but there are libraries like step that wrap things up nicely. [06:13] jesusabdullah: nodeapp? [06:15] ajsie_: Aria: yeah but i wanted to have method chaining [06:15] ajsie_: a pity its hard to do that [06:15] Aria: Yes, but what you want is to have all that state stored automatically -- and what node lets you do is make sure you have it as tight as possible. [06:15] Aria: So that you only store the state you NEED [06:17] richcollins: Aria: Same thing [06:17] Aria: Hrm. [06:17] richcollins: I installed jsdom and htmlparser using npm [06:17] richcollins: Do I need to reinstall npm after downgrading node? [06:17] mape_: Anyone here had issues with socket.io fallbacking to xhr-polling even if that isn't in the transports list? [06:18] Aria: You shouldn't. [06:18] isaacs: richcollins: you shouldn't [06:18] Aria: Just rebuild any binary extensions. [06:18] Aria: (npm rebuild) [06:18] isaacs: richcollins: you may need to "npm rebuild" any compiled extension [06:18] isaacs: s [06:18] isaacs: thanks, Aria :) [06:18] isaacs: grrrrr EC2 is such wallmart service. [06:18] isaacs: couchone needs to ditch that zero and get themselves a hero [06:19] richcollins: https://gist.github.com/7f1ed5c04a72024e37d7 [06:19] SubStack: isaacs: what you say!! [06:19] pkrumins has joined the channel [06:19] pkrumins: ACTION appears [06:19] richcollins: Aria: isaacs: ^^^ [06:20] MikhX has joined the channel [06:20] isaacs: richcollins: yeah, i didn't write any of the programs that are erroring there [06:21] Aria: Hm. That's a newer jsdom than I've used, I think. [06:22] ajsie_: what does "this" mean here: http://pastie.org/1280875 [06:23] Aria: I don't know -- I'd have to step through code or ask tmpvar. [06:26] shouvik has joined the channel [06:26] AAA_awright: ajsie_: Chaining is evil [06:27] SubStack: chaining is AWESOME, morelike [06:27] AAA_awright: The function return value no longer has any semantic meaning and it's destructive all around [06:27] richcollins: Looks like it was just happening to mikeal: http://nodejs.debuggable.com/2010-10-29.txt [06:27] SubStack: * AAA_awright [06:27] richcollins: mikeal: Did you figure this out? [06:27] SubStack: no wait [06:27] SubStack: anyways >_< [06:28] mikeal: jsdom thing? [06:28] mikeal: it all works for me now [06:28] richcollins: mikeal: How did you fix it? [06:28] richcollins: I'm just doing this: https://gist.github.com/7f1ed5c04a72024e37d7 [06:28] SubStack: ajsie_: 'this' is used by step as an implicit parameter [06:29] mikeal: which error? [06:29] richcollins: undefined is not a function [06:29] SubStack: you can call a function with any 'this' value you want with Function.prototype.{apply,call} [06:29] richcollins: mikeal: (stack is in the gist: https://gist.github.com/7f1ed5c04a72024e37d7) [06:29] Tprice: how would i un-chache a require? [06:29] richcollins: looks like the exact some problem that you were having [06:31] intacto has joined the channel [06:31] richcollins: mikeal: So how did you fix your jsdom issue? [06:31] richcollins: mikeal: Different version of jQuery? [06:31] mikeal: yeah, i pulled the one out of the jsdom tests [06:32] fangel has joined the channel [06:32] richcollins: mikeal: OK great ... thanks [06:32] ajsie_: AAA_awright: Validator['expects'](string)['to have']('maximum characters of')(100) [06:33] ajsie_: doesnt look very evil [06:33] ajsie_: but beautiful and understandable [06:33] AAA_awright: ajsie_: That's taking the return value and using it, that's fine [06:33] AAA_awright: That's good [06:34] AAA_awright: Method chaining,returning /this/ isn't of any help to the developer, however [06:34] richcollins: mikeal: Worked great -- thanks [06:35] mikeal: awesome [06:35] ajsie_: AAA_awright: you are wrong .. it returns this [06:35] ajsie_: Validator['expects'](string)['to have']('maximum characters of')(100) [06:35] ajsie_: or another object .. but its an object that have a method called 'to have' [06:36] peutetre has joined the channel [06:36] AAA_awright: "another object" is great, "this" isn't, there's a difference :) [06:37] ajsie_: even if it returns this maybe that object is modified with the first method .. so the returned object could be used with another method to make yet another transformation [06:37] ajsie_: File.create('hello.jpg').append('hello world') [06:38] ajsie_: its returning this but the append() method needed it to return this [06:38] ajsie_: so its not only to write beautiful and understandable code but also it has a functional purpose [06:39] ajsie_: since every method() should change the object's state [06:40] jameshome: any mongoose users? [06:40] jameshome: curious about the 1.0 branch [06:41] jameshome: seems pretty different [06:41] ehaas has joined the channel [06:42] MikhX has joined the channel [06:44] shouvik: any one worked with socke.io here? [06:46] Aria has left the channel [06:49] twoism has joined the channel [06:50] MikhX has joined the channel [06:52] meatmanek_ has joined the channel [06:55] mape has joined the channel [07:00] indutny: yep, we are [07:00] indutny: shouvik: i mean, i am [07:00] Yuffster has joined the channel [07:00] shouvik: okay [07:00] shouvik: need some help! [07:00] mbrochh has joined the channel [07:01] shouvik: https://github.com/pascalopitz/whiteboard can u see if you can run this [07:01] shouvik: ? [07:01] LionMade0fLions has joined the channel [07:01] sveimac has joined the channel [07:02] mraleph has joined the channel [07:03] indutny: shouvik: one moment [07:04] shouvik: indutny: okay, take ur time [07:09] indutny: shouvik: IT WORKS! ) [07:10] shouvik: why is it not working for me?! [07:10] indutny: what's the problem? [07:10] indutny: what error do you get? [07:10] shouvik: I posted the issue on git [07:10] shouvik: check the issues tab [07:11] indutny: shouvik: could you post a link? [07:11] shouvik: https://github.com/pascalopitz/whiteboard/issues#issue/1 [07:11] dgathright has joined the channel [07:12] MikhX_ has joined the channel [07:14] mAritz: http://www.reddit.com/r/coding/comments/e2tj0/hey_progreddit_do_you_have_the_want_to_give_back/ [07:14] mAritz: *selfplug* [07:16] indutny: shouvik: ok [07:16] indutny: shouvik: have you run git submodule update --init [07:16] shouvik: yeah [07:17] indutny: shouvik: it should help [07:17] shouvik: but I did not get this via git [07:17] shouvik: I jut downloaded the folder [07:17] kjeldahl has joined the channel [07:17] shouvik: git needs to run? [07:17] indutny: yep [07:17] indutny: there're submodules [07:17] shouvik: aah [07:17] indutny: that you must fetch [07:18] indutny: git clone ... --recursive [07:18] indutny: will do this job [07:18] shouvik: but in that case should it not already be done when I download the entire thing in a zip from git? [07:18] indutny: don't know [07:18] indutny: i haven't tried this [07:19] indutny: but your error looks like that [07:19] shouvik: okay [07:19] shouvik: guess I will need to get it :/ [07:25] nsolsen has joined the channel [07:25] jesusabdullah: mAritz: Reminds me of Improv Everywhere for some reason [07:28] mAritz: well, it would have some similarities. we could even do local meetups for these events to make them more awesome/productive. [07:29] jesusabdullah: Heh [07:29] jesusabdullah: What's #sitenite? [07:29] rikarends has joined the channel [07:34] [[zz]] has joined the channel [07:34] mAritz: it was a short idea on r/webdev to get a bunch of people together to create a website in one night. [07:35] MiiCode2 has joined the channel [07:36] iszak: For that to work there'd need to be a lot of planning before hand. [07:36] iszak: The actual implementation in one night is possible, the planning however is not imho. [07:36] mAritz: the problem emerged, that we couldn't agree on an idea for the website. it kinda ended with the initiator of it deciding on one thing not many people liked and nothing happened. that was kinda the point where i had that idea and brainstormed together with thezanman on how to possibly approach this. [07:37] iszak: it sounds cool however, what was it built in? node.js? [07:37] mAritz: well, as i said: nothing happened. [07:37] iszak: what would it have been built in then. [07:38] mAritz: probably ruby. wasn't set in stone though. [07:38] iszak: typical. [07:39] mAritz: yeah, when i saw it going downhill i recommended using K. somehow not many people were in favor of that. :( [07:41] iszak: K? what is that? [07:42] matjas has joined the channel [07:43] Throlkim has joined the channel [07:47] faust45 has joined the channel [07:49] jesusabdullah: Yes, what is K? [07:56] mraleph has joined the channel [07:58] shouvik: indutny: u there? I am facing trouble with git too! [07:58] shouvik: Permission denied (publickey). [07:58] shouvik: fatal: The remote end hung up unexpectedly [07:58] shouvik: know why this is happening [07:58] indutny: :) [07:59] shouvik: sorry [07:59] shouvik: never use git [07:59] indutny: try this: git clone http://github.com/pascalopitz/whiteboard.git --recursive [07:59] shouvik: not big fan of anything like it, svn git [08:00] shouvik: Wow, u be genius :D [08:00] nsolsen has joined the channel [08:00] ph^ has joined the channel [08:00] kjeldahl has joined the channel [08:00] indutny: shouvik: worked? [08:00] shouvik: yeah [08:00] shouvik: downloading [08:01] mif86 has joined the channel [08:01] shouvik: I need to do the git submodule update --init [08:01] shouvik: after? [08:01] shouvik: or --recursive takes care of it? [08:02] indutny: recursive should [08:02] shouvik: ok [08:02] shouvik: lets see :) [08:02] fangel has joined the channel [08:03] shouvik: ooh! Works :) [08:03] shouvik: thanks a ton :) [08:03] indutny: you're welcome [08:04] shouvik: u there here all the time, coz I am just starting off with socket.io [08:04] shouvik: I will need to really badger someone will all my questions [08:04] shouvik: they get pretty dumb [08:05] shouvik: and you seem to be nice, atleast for now : [08:05] shouvik: :P [08:06] indutny: shouvik: I'm here from 2 to 11 (GMT+0) [08:06] indutny: am [08:06] faust45 has joined the channel [08:06] mAritz: iszak and jesusabdullah: http://en.wikipedia.org/wiki/K_(programming_language) however what i wanted to say was http://en.wikipedia.org/wiki/J_(programming_language) (since k is proprietary) [08:06] shouvik: nice :) [08:06] shouvik: indutny: working late today? [08:07] mAritz: disclaimer: i have no fucking clue why someone would want to learn j/k. [08:08] indutny: shouvik: no-no, i'm living in russia [08:08] indutny: shouvik: GMT+6 here [08:08] dquestions has joined the channel [08:09] jesusabdullah: mAritz: because j/k lol? [08:12] mAritz: jesusabdullah: well, if you're going for the lulz, make it lolcode or brainfuck! :D [08:13] sixtus42 has joined the channel [08:13] shreekavi has joined the channel [08:13] iszak: mAritz, do you want to cause people to go insane with those languages? [08:14] mAritz: they already did. [08:14] mAritz: do you know projecteuler? [08:14] jesusabdullah: mAritz: https://github.com/jesusabdullah/lolcode [08:14] mAritz: jesusabdullah: NICE! :D [08:14] mAritz: what a coincidence [08:15] margle has joined the channel [08:16] JimBastard has joined the channel [08:16] virtuo has joined the channel [08:19] jfd1 has joined the channel [08:21] viktors has joined the channel [08:22] shouvik has joined the channel [08:24] teemow has joined the channel [08:24] Ori_P has joined the channel [08:26] mytrile has joined the channel [08:27] mAritz: guys, quick: call it r/coderaid or r/bugberserkers? (or do you have a better idea?) [08:28] shouvik: indutny: Mine is GMT+ 5.30 [08:28] shouvik: and its 2 here [08:28] shouvik: 2PM [08:29] mAritz: 9:30 am here. haven't slept yet :( [08:32] SamuraiJack has joined the channel [08:33] nsolsen has joined the channel [08:35] fbits has joined the channel [08:36] simme has joined the channel [08:36] indutny: :) [08:36] indutny: shouvik: where're you from? [08:43] rikarends has joined the channel [08:46] Druid_ has joined the channel [08:47] liar has joined the channel [08:48] springify has joined the channel [08:49] dgathright has joined the channel [08:54] altamic has joined the channel [08:58] mikedeboer has joined the channel [08:58] d0k has joined the channel [09:00] mbrochh has joined the channel [09:01] faust45 has joined the channel [09:05] mlangenberg: I would like to reuse client objects returned from http.createClient(port, ip). But I noticed that the callback set on client.on('error', callback) is only called once! [09:06] indutny: hey man [09:06] ntelford has joined the channel [09:06] indutny: mlangenberg: [09:06] indutny: mlangenberg: there is a module called pool [09:06] indutny: mlangenberg: give it a chance [09:07] markwubben has joined the channel [09:08] Throlkim has joined the channel [09:09] mlangenberg: indutny: How would that help me? Since the error callback on a client is executed only once ... I can never reuse an http client. [09:10] dquestions has joined the channel [09:11] jeromegn has joined the channel [09:12] indutny: mlangenberg: but it will help you to reuse not broken connections [09:12] indutny: mlangenberg: btw it looks like a bug [09:12] indutny: mlangenberg: I've seen it before, can you please create an issue? [09:13] mlangenberg: just a sec, I'll show you some code. [09:13] indutny: ok [09:14] indutny: can you create a gist? [09:14] mlangenberg: indutny: https://gist.github.com/667515 [09:14] mlangenberg: there you go. [09:15] indutny: ok [09:15] indutny: reading [09:20] mlangenberg: indutny: any ideas? [09:22] indutny: mlangenberg: socket is destroyed [09:22] indutny: mlangenberg: that's why error isn't calling after [09:23] indutny: mlangenberg: what version of nodejs are you using? [09:24] mlangenberg: I think 0.2.3 [09:25] mlangenberg: Yeah, 0.2.3 [09:26] indutny: ok [09:26] indutny: try with 0.3.0 [09:26] pdelgallego has joined the channel [09:26] xla has joined the channel [09:28] sixtus42 has joined the channel [09:29] mlangenberg: indutny: the reason I am reusing the client, is because I can reuse the socket ... so if the on('error', function() {}), callback always means the socket has been closed, I should create a new client, right? [09:29] shripadk has joined the channel [09:30] aubergine_ has joined the channel [09:31] aliem has joined the channel [09:32] mlangenberg: indutny: alright, same issue with 0.3.0 [09:32] SvenDowideit has joined the channel [09:32] indutny: mlangenberg: post issue! [09:32] indutny: mlangenberg: socket is destroyed [09:32] indutny: actually [09:32] indutny: so you can't reuseit anyway [09:33] indutny: and may be this is not nodejs issue [09:33] Ori_P has joined the channel [09:33] adambeynon has joined the channel [09:34] mlangenberg: indutny: Why is that? [09:39] indutny: mlangenberg: sorry, I have no time to dig in now [09:40] SamuraiJack_ has joined the channel [09:40] mlangenberg: indutny: ok, will post the issue to github. [09:41] mraleph has joined the channel [09:42] xla_ has joined the channel [09:42] omarkj has joined the channel [09:45] T-Co: Does someone know of a better xml parser than this: https://github.com/robrighter/node-xml [09:48] olivvv has joined the channel [09:49] indutny has joined the channel [09:51] MikhX has joined the channel [09:52] themiddleman has joined the channel [09:53] rikarends: http://github.com/ajaxorg/node-o3-xml works great for us [09:54] indutny: don't like xml [09:54] indutny: :-P [09:54] rikarends: its a DOM parser though not a SAX parser. [09:55] mape: FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory [09:55] mape: :/ [09:57] indutny: v8: global [09:57] v8bot: indutny: ReferenceError: global is not defined [09:57] indutny: v8: 1++ + 2 [09:57] v8bot: indutny: ReferenceError: Invalid left-hand side expression in postfix operation [09:57] indutny: v8: 2 + 1++ [09:57] v8bot: indutny: ReferenceError: Invalid left-hand side expression in postfix operation [09:57] indutny: v8: a = 1; 2 + a++ [09:57] v8bot: indutny: 3 [09:58] indutny: v8: function abc() {}; abc.name [09:58] v8bot: indutny: "abc" [09:58] indutny: v8: Function.prototype.test = 1; [09:58] v8bot: indutny: 1 [09:58] indutny: v8: Function.prototype.test [09:58] v8bot: indutny: undefined [09:59] mochidino has joined the channel [09:59] mlangenberg: indutny: ok, as a temp. workaround, I have chosen to create a new client whenever an error occurs. Else I reuse the http client. Seems work fine. :) [10:02] markwubben has joined the channel [10:05] benburkert has joined the channel [10:06] mikedeboer has joined the channel [10:08] aubergine has joined the channel [10:09] JimBastard: hey ajsie_ [10:09] MikhX has joined the channel [10:09] JimBastard: we are like online and operational [10:09] delapouite has joined the channel [10:09] JimBastard: gonna test more and send out some invites i hope [10:09] JimBastard: >.> [10:12] aubergine_ has joined the channel [10:12] indutny: JimBastard: Marak, is that you? [10:12] JimBastard: :-D [10:12] JimBastard: >.> [10:13] JimBastard: fedor? [10:13] indutny: yep [10:13] JimBastard: dropping governments [10:13] JimBastard: holler [10:13] indutny: :-D [10:13] JimBastard: im making a quick command line tool for inviting people by email [10:14] rikarends: SPAMMER [10:14] JimBastard: SubStack: [10:14] JimBastard: https://github.com/substack/node-optimist <3 [10:14] JimBastard: fucking awesome [10:15] unomi has joined the channel [10:16] indutny: yeah [10:16] shouvik has joined the channel [10:16] indutny: like it [10:16] shouvik: Does anyone knoe a goof source of tutorial for socket.io? [10:17] indutny: no :) [10:17] indutny: may be start learning node.js [10:17] indutny: if you know it well [10:17] indutny: it wouldn't be a problem to learn socket.io [10:17] shouvik: node.js is seriously confusing [10:18] JimBastard: shouvik: :-D [10:18] JimBastard: its not that bad! [10:18] JimBastard: whats the confusing part [10:18] shouvik: I wish I knew! =( [10:19] rikarends: when is 0.3 stable? [10:19] saschagehlich has joined the channel [10:19] [[zz]] has joined the channel [10:19] shouvik: quite frankly what I would like to start off with is how do I host a page using node.js on a localhost port [10:20] JimBastard: shouvik: i got you [10:20] indutny: shouvik: try nodeapp :-D [10:20] indutny: http://github.com/donnerjack13589/nodeapp [10:20] JimBastard: shouvik: https://github.com/cloudhead/node-static/blob/master/examples/file-server.js [10:20] indutny: :D [10:20] JimBastard: npm install node-static [10:21] JimBastard: that will server a public www folder for you [10:21] JimBastard: as a static file server [10:21] JimBastard: but then, you can just start hacking at it and change up stuff based on the incoming request [10:21] JimBastard: right? [10:21] shouvik: k [10:21] shouvik: so its all on my computer right!? [10:22] shouvik: just being clear [10:22] shouvik: when you say a www folder [10:22] JimBastard: im not sure where anything is [10:22] JimBastard: you starting a http server on localhost port 80 [10:22] shouvik: it will take a port on my computer localhost [10:22] JimBastard: you tell me where that is [10:22] shouvik: yeah we are on the same page :D [10:22] shouvik: sorry [10:23] shouvik: I may seem a little retarded with the tech terms, but this is all very new to me [10:23] shouvik: just jumped the wagon coz I needed to do something interesting [10:23] shouvik: :) [10:24] unomi: shouvik: perhaps you should look at https://github.com/robrighter/node-boilerplate [10:25] mikew3c_ has joined the channel [10:25] indutny: so many self-promoting messages :P [10:26] shouvik: :D [10:26] shouvik: unomi thanks [10:26] shouvik: will have a look [10:26] JimBastard: self-promoting is okay, if you have something that works [10:26] JimBastard: or is suppose to work tomorrow [10:26] JimBastard: nodejitsu [10:26] indutny: :) [10:26] indutny: #nodejitsu [10:26] unomi: heh, I have nothing to do with boilerplate, tbh I haven't even used it, it just looks like something helpful for people who want to get 'something' up [10:28] ebi has joined the channel [10:28] indutny: you all should really give a chance to nodeapp [10:28] indutny: it's quite usefull and interesting [10:28] indutny: i swear you [10:28] ebi: Hi all. Is there something like daemon.node in the npm repositories? [10:29] res99 has joined the channel [10:30] masm has joined the channel [10:31] margle has joined the channel [10:34] InsDel has joined the channel [10:40] mAritz: JimBastard: have you joined r/coderaid yet? :D [10:40] mAritz: holy shit it's exploding :D [10:41] MattJ has joined the channel [10:42] JimBastard: mAritz: no [10:42] JimBastard: is that for coders with aids? [10:42] mAritz: no :D [10:42] JimBastard: <.< [10:43] JimBastard: is it reddit [10:44] JimBastard: i hate reddit [10:49] caolanm has joined the channel [10:49] shouvik: Well, I have no clue what I am supposed to be following!? [10:50] shouvik: why can't somebody just write a simple app [10:50] shouvik: for a multiplayer game [10:50] shouvik: I have developed the game [10:50] shouvik: now I want to make it multiplayer [10:50] shouvik: so what do I refer to!? [10:50] shouvik: indutny: you had a look at the app I downloaded [10:51] shouvik: it seems like something I want to work with [10:51] shouvik: but now I am seriously confused as to what is what in that app! [10:51] shouvik: https://github.com/pascalopitz/whiteboard [10:52] shouvik: this is the app I got for everyones reference! [10:52] hellp has joined the channel [10:55] stride: that app is pretty straightforward. app.js initializes lib/static_server.js which is a HTTP server that makes the client side stuff in the static directory available. the other one is lib/socket_server which includes and handles socket.io events [10:56] stride: within socket_server.js it receives messages and broadcasts them to all connections [10:57] disq has joined the channel [10:58] pkrumins has joined the channel [10:58] shouvik: okay [10:58] shouvik: so what are the directories that I need to write [10:58] shouvik: what is just copy paste [10:59] stride: not sure what you mean. for running the app? git clone https://github.com/pascalopitz/whiteboard.git && cd whiteboard && node app.js should be enough [10:59] shouvik: I know about running the app! [10:59] shouvik: :) [10:59] shouvik: well this is what I intend to do [11:00] shouvik: I have a js script [11:00] shouvik: and a HTML file [11:00] shouvik: they are collectively my web page, stand alone that works on the browser [11:00] mbrochh has joined the channel [11:01] shouvik: Now I would like people who make changes on this HTML page say with the canvas board [11:01] shouvik: do it so that other people can see the changes too and make them too [11:01] shouvik: that is the app, right? [11:01] shouvik: so now given I have the first part, i.e my stand allone app [11:02] shouvik: how do I intgrate with web sockets so that it becomes multiple people support! [11:02] shouvik: do you get my point? [11:02] sixtus42 has joined the channel [11:02] stride: I think so. basically you just follow the few steps on http://socket.io/ for client and serverside integration of socket.io and then you pass messages between your users [11:03] stride: what those messages contain or how they affect your app is up to you [11:03] shouvik: :) [11:03] shouvik: Now I am lost [11:03] shouvik: I pass messages in the sense, my objects that are getting changes on one client [11:03] Lorentz: It doesn't make the game protocol for you. It'll do the handshake and give you a transport and some simple things, but that's it. [11:04] shouvik: are passed using these messages to the other client? [11:04] shouvik: oh, I will design the game protocol :) [11:04] shouvik: that is not the issue [11:04] shouvik: the issue is [11:04] pkrumins has left the channel [11:04] shouvik: if you have had a look at the app, which I sent [11:04] shouvik: they have folders [11:05] shouvik: a lot of them [11:05] shouvik: among them what are the libraries [11:05] stride: that whiteboard demo? that's just an example structure [11:05] shouvik: ok [11:05] shouvik: in that structure where is the app, the white board app [11:06] shouvik: please bear with me [11:06] shouvik: I know it can be a little frustrating [11:06] stride: what you see in the browser? that's in the directory called "static" [11:06] shouvik: http://www.damonkohler.com/2008/12/javascript-painting-with-canvas.html [11:06] Lorentz: As for the server, it's in lib. [11:06] shouvik: have a look [11:06] shouvik: this is the source for the white board [11:07] zomgbie has joined the channel [11:07] shouvik: do you mean to say that, each and every function n here will get rewritten here so that it passes a object for the action that is commited at one client [11:08] shouvik: so that on the other client the changes are reflected? [11:08] mattly has joined the channel [11:08] sixtus42 has joined the channel [11:08] Lorentz: Pretty much, as I see it. [11:09] shouvik: what are the socket_server.js and static_server.js files? [11:09] stride: given the blog posts on the 37signals whiteboard app thingy broadcasting each mouse would be highly impractical. you'd presumably be better of pushing them aggregated every x milliseconds [11:09] shouvik: ok [11:09] shouvik: I don't intend to replicate the same app [11:09] shouvik: I have a different one in mind [11:09] shouvik: but this is more a less a base structure [11:10] Lorentz: Or on every draw event, as in, buffer what people do between clicking down the mouse and leaving it, and only pass that along. [11:10] Lorentz: Lots of ways to skin this cat [11:10] aubergine has joined the channel [11:10] shouvik: http://jsfiddle.net/3GC5h/3/ [11:11] shouvik: check this [11:11] shouvik: this is rudimentary example of my end app [11:11] shouvik: when I destroy the red tiles in this pafe [11:11] shouvik: page* [11:11] JohnDav has joined the channel [11:11] shouvik: I would like the same reflected on the other client to [11:11] shouvik: too* [11:11] stride: heh, I wonder if I can get him to write a operational transform module :> [11:12] shouvik: donno what it means [11:12] shouvik: but if you have concept I will give it a try ;) [11:12] Lorentz: ... pass off the event to websocket instance and make it duplicate on others. [11:12] shouvik: okay [11:12] shouvik: so I can do that on this very script right? [11:13] Lorentz: I mean, it's your code. Anything's do-able. [11:13] shouvik: :) [11:14] shouvik: yeah, I am so utterly confused, and I think its getting really tough to explain to you exactly how big a dummy I am on websockets! [11:14] shouvik: :D [11:14] zorzar_ has joined the channel [11:14] shouvik: this will be simpler to explain! [11:14] shouvik: This is my script right! [11:15] Lorentz: Think of it as a tcp-only protocol that you pass data around in. I mean, it's just a raw socket in essence. [11:15] shouvik: so now If I had to replace this script with some script on the whiteboard app [11:15] shouvik: which one would I replace?! [11:15] Lorentz: That'll be your homework. [11:15] shouvik: :D [11:16] shouvik: I am not asking you ti replace it [11:16] shouvik: trust me, I have a ton of home work [11:16] shouvik: and I would be in deep trouble if people got to know what my homework was :D [11:17] shouvik: I am just trying to understand what is the equivalent script that I should be editing on whiteboard application for this script [11:17] okuryu has joined the channel [11:18] shouvik: plus something else that is seriously disturbing is the 3rdparty directory [11:18] stride: shouvik: identify the information client A has that client B needs to recreate the behaviour client A sees and when / where in your code you get this information. afterwards set up client and serverside to pass any message from one client to the other, you can do that following the whiteboard code or the examples on the socket.io website). after that you can gradually extend your code to exchange said information [11:18] stride: and that's about it [11:18] shouvik: thanks [11:18] shouvik: stride I realize I have lived out my welcome [11:19] stride: the 3rdparty directory is just there to hold external git repositories so people using it get an up to date version of socket.io, you get it filled by using the --recursive option when cloning the repository [11:19] shouvik: ok [11:19] shouvik: so that is not a part of the white board app right? [11:19] stride: shouvik: what? nope :) I'm just trying to poke you into the right direction here, feel free to ask when you get stuck [11:19] slaskis has joined the channel [11:20] stride: nope, socket.io is maintained in another repository so it would make little sense to include a static version inside the whiteboard app [11:20] aliem has joined the channel [11:20] shouvik: I am begining to get the feeling that I have actually managed to frustrate people without getting them to understand my issue! [11:21] shouvik: so the directories that i need to concern myself with are just the lib and static, I am assuming [11:21] stride: yep, mostly [11:21] shouvik: cool [11:21] shouvik: that is progress, a lot! [11:22] shouvik: :D [11:22] stride: :) [11:22] shouvik: also lib are going to be included, and I don't mess with them [11:22] shouvik: I am assuming static is where the original app is modified to allow muti user support [11:23] jankoprowski has joined the channel [11:24] shouvik: so basically client.js is the script I need to replace with mine so that I can reflect the multiuser support :) [11:24] shouvik: got it [11:24] shouvik: ! [11:24] jasondavies has joined the channel [11:25] shouvik: Just one last question... Is using mootools with the socket.io functions going to work? [11:28] shouvik: ACTION feels dumb about annoying people into radio silence =/ [11:29] Fullmoon has joined the channel [11:30] abstractj has joined the channel [11:33] mr_daniel has joined the channel [11:36] path[l] has joined the channel [11:39] John[Dav]: what is the best way to get rid of a referenced array element in node [11:39] John[Dav]: delete users[xyz] [11:39] John[Dav]: ? [11:41] sixtus42: John[Dav]: that will shrink the array, but yes, it will do the trick [11:41] sixtus42: John[Dav]: and technically, that's a JS question, not a node one ;-) [11:43] Anti-X has joined the channel [11:44] SamuraiJack has joined the channel [11:46] shouvik: is socket.io built using jquery? [11:47] Anti-X: no [11:47] shouvik: k thanks [11:49] stride: shouvik: mootools shouldn't affect you using socket.io nope [11:50] shouvik has joined the channel [11:50] unomi has joined the channel [11:51] shouvik: stride: thanks, I think jquery is included for the application whiteboard [11:51] shouvik: never used it so did not know :) [11:52] shouvik: I think I have a very good idea. maybe in a couple of days I will be able to modify my existing example [11:52] shouvik: :) [11:52] aliem has joined the channel [12:09] rikarends_ has joined the channel [12:09] agnat has joined the channel [12:10] donnerjack has joined the channel [12:11] indutny has joined the channel [12:12] indutny has joined the channel [12:14] necrodearia has joined the channel [12:15] indutny has joined the channel [12:15] superman has joined the channel [12:18] rikarends has joined the channel [12:20] captain_morgan has joined the channel [12:30] JimBastard has joined the channel [12:31] eee_c has joined the channel [12:35] ben_alman_ has joined the channel [12:35] rnewson has joined the channel [12:41] Sami_ZzZ has joined the channel [12:42] matjas_ has joined the channel [12:42] superman has left the channel [12:43] pdelgallego has joined the channel [12:46] captain_morgan has joined the channel [12:46] John[Dav]: could deep references be the cause of a CPU spike ? [12:49] indutny: What does it mean : deep references? [12:50] shripadk: hello all, how best do i improve this code? Its a simple background processing module.. I basically don't want to use setInterval (see line 42 of the file) as it skips jobs that have the same time assigned to it. http://github.com/shripadk/NodeQ/blob/master/lib/NodeQ.coffee [12:50] shripadk: Here is an example gist: http://gist.github.com/667666 [12:50] indutny: Accessing car from outer outer outer scope is sliver,than from current scope [12:50] indutny: Car=var [12:53] abstractj has joined the channel [12:55] aurynn has joined the channel [12:55] unomi has joined the channel [12:55] fermion has joined the channel [12:57] path[l]2 has joined the channel [12:57] Ezku\_: shripadk: you should definitely use => in TaskScheduler.execute on line 58 [12:58] kriszyp has joined the channel [12:58] Ezku\_: that way you can use @ to access self and skip a lot of the verbosity [12:59] Ezku\_: actually you have quite a few instances of self, all of which seem to be replaceable with => and @ [12:59] shripadk: yep you are right! will refactor... :) [13:00] mbrochh has joined the channel [13:00] mbrochh has joined the channel [13:01] shripadk: there are definitely failing jobs when there is a huge queue of jobs assigned to the same time... i mean.. is it possible in real world to actually have lots of jobs queued up for the same instant? should i worry about it? [13:01] shripadk: *instance [13:03] margle has joined the channel [13:04] Ezku\_: shripadk: it's tough to tell what's going on in the code due to your variable names, but i'm guessing you're just not doing things right with the job execution or polling; there's nothing wrong with settimeout [13:05] shripadk: well i m using setInterval actually for polling... [13:05] shripadk: i did better refactor my code... definitely hard to read with all the @ and self lying around... [13:17] Utkarsh has joined the channel [13:25] altamic_ has joined the channel [13:26] unomi has joined the channel [13:28] mbrochh: Hi guys... I would love to get my hands dirty on Node.js and CouchDB [13:29] mbrochh: I want to create a simple one page coming soon website with a little bit of ajax-like user interaction... am I right that node.js + couchdb are good tools to do this? [13:30] shreekavi has joined the channel [13:37] tanepiper: mbrochh: yes is the short answer [13:37] mbrochh: that's what i wanted to hear :) [13:37] mbrochh: I just stumbled upon npm and immediately had to think about package hell [13:37] mbrochh: short googling led me to nave... am I right that it is recommended to use that? [13:38] bradleymeck has joined the channel [13:38] Utkarsh has joined the channel [13:38] mbrochh: I usually use python and love virtualenv / virtualenvwrapper... is nave the node equivalent of that? [13:39] sixtus42: mbrochh: node and couch go extremely well together [13:39] ebi: How do you guys do user authentication with node JS? We have a PHP app that does the basic authentication and actually the users should come from there but connection to that app every time would suck big time so I guess we could share the session ids? [13:40] mbrochh: sixtus42, thanks! that's great :) how do you manage your installed node packages... when using npm they all go to some global location i guess.. how do i ensure that one project uses a definit set of packages with definit versions? [13:40] meandi has joined the channel [13:41] sixtus42: mbrochh: npm takes care of that, you reference a package in a certain version as dependency [13:41] shripadk: ebi: http://gist.github.com/652819 [13:41] guybrush: mbrochh: this is how i handle different node-versions/modules https://gist.github.com/574872 [13:43] chandru_in has joined the channel [13:44] guybrush: but installing node as described on http://nodejs.org and installing npm will work very well [13:44] Tprice: how to add color to console.log? [13:44] mikedeboer has joined the channel [13:45] JimBastard: im getting a little nervous, we are starting to get traffic on a new blog post on the new platform [13:45] JimBastard: please dont crash [13:45] chandru_in: When I pump a file to node-compress and pump node-compress stream to http.ServerResponse, it freezes the response when the file is large (140MB). Works fine for small files. It also works fine with a file writestream. Any clue why? [13:46] ebi: shripadk, thanks :) I guess our way would be to put the session id and infos we need into redis than read from node [13:46] mbrochh: maybe i'm just thinking too much... but let's say i use a certain version of node... i npm install a certain version of express.js and maybe some other decendencies. all works well for my project. a year later i start another project and I want to use some fancy new dependency with only works if I update my express.js package... but updating that package might break something in my first project... [13:46] Tprice: chandru_in: you need a buffer [13:46] Tprice: and it need to be chunked [13:46] chandru_in: Tprice, buffer for what? node-compress seems to queue data internally and implements pause and resume just fine [13:47] guybrush: mbrochh: it is possible to use multiple versions of the same node-module at the same time [13:48] mbrochh: guybrush, i see... neat... [13:48] sixtus42: mbrochh: since modules are pulled not pushed into the namespace, you could even use different versions of the same lib in one app [13:48] mbrochh: sixtus42, sounds awesome... i will just install everything using npm and don [13:49] mbrochh: don't worry about package hell for now :) [13:49] TomY has joined the channel [13:50] chandru_in: guybrush, you can use different versions of the same module installed through npm by requiring it with require('module@version') [13:51] guybrush: chandru_in: ok :D [13:51] sixtus42: mbrochh: enjoy. Also couch just got the feature to manage external processes (see https://github.com/davisp/couchdb/commit/a791356c271857c67872e4013d4efbfb333e19c9 ), i.e. you can use couch to manage your node process [13:51] shripadk: ebi: yep that would be the right way... [13:52] mbrochh: sixtus42, yep... i'm already following several node sources for quite some time and read about this some days ago and thought "d'oh! tha's super awesome!" [13:52] Athox has joined the channel [13:53] mbrochh: sixtus42, but still i would need some other process that watches the coudhdb process :) [13:53] sixtus42: mbrochh: couch is written in erlang… don't worry about that one [13:53] chandru_in: Tprice, is it possible that node-compress's stream doesn't behave as pump expects all read streams to. I glanced through the source but couldn't find any. [13:54] dnolen has joined the channel [13:54] sixtus42: mbrochh: executive summary: worry less, code more, enjoy :-) [13:55] mbrochh: sixtus42, o_O is this the reason it works so well with couchDB? because their slogan is "relax"? :) [13:57] davidsklar has joined the channel [13:57] sixtus42: mbrochh: don't you worry, there are downsides to couch as well… but still, couch+node should not be a reason to get fired ;-) [13:58] guybrush: mbrochh: there is a cool video where isaac introduces npm http://vimeo.com/14120299 [13:58] MattJ: Maybe it's just me, but CouchDB gaining the ability to manage processes is a reason I /wouldn't/ like to use it :/ [13:59] sixtus42: MattJ: they are just exposing the capabilities of erlang, besides they have been using that stuff for their js engine since well they started using js (i.e. couch v0.7) [13:59] sixtus42: MattJ: and if there is one thing erlang is known for, it's stability [14:00] MattJ: *choke* [14:00] MattJ: Not at my desk it's not :) [14:00] MattJ: But anyway [14:00] sixtus42: MattJ: your milage may vary :-D [14:01] Gruni has joined the channel [14:01] MattJ: Indeed, some bad experiences [14:02] MattJ: But either way, I don't like the abandonment of "do one thing and do it well" nowadays [14:02] altamic has joined the channel [14:03] sixtus42: MattJ: I agree, but I would also argue, that the referenced commit is a step into the unix way of doing things (as you can define conditions when to get restarted) [14:04] sixtus42: MattJ: more like an event mechanism then an initd (i.e. the processes are jobs not daemons) [14:04] MattJ: Right, but let us not forget that CouchDB is a database :) [14:05] MattJ: I could make my mail server start running system backups for me, after all it's always running... [14:06] ajsie_: JimBastard: hey [14:06] ajsie_: just woke up =) [14:06] JimBastard: hee hee [14:06] JimBastard: im still going [14:06] JimBastard: lots of stuff to do! [14:06] JimBastard: :-D [14:06] ajsie_: =) [14:06] JimBastard: accounts coming soooo soooon [14:06] ajsie_: yippie kae [14:06] ajsie_: you called me earlier on [14:06] ajsie_: you wanted something? [14:07] Aikar: what is your guys opinion on mongodb? im gonna be starting a project soon on node but gotta research best db [14:07] ajsie_: Aikar: i have tested it before [14:07] ajsie_: but then i switched to couchdb [14:07] Aikar: lol [14:08] danoyoung has joined the channel [14:08] sixtus42: Aikar: "mongo" is the german (non-pc) word for retard, and my technical analysis would say, mongodb did a good job at naming the project [14:08] Aikar: LOL [14:09] ajsie_: Aikar: just fits my need better .. open standards: Restful API, MVCC (versioning of documents), you can cut the power anytime the data will still be there [14:09] guybrush: sixtus42: rofl [14:10] ajsie_: Aikar: there are lots of things to consider .. but i would say look at the query language used .. mongodb is creating another SQL that you have to understand .. even if you understood that it wont help you for using other servers [14:10] ajsie_: but Restful API is universal [14:11] ajsie_: the more you work with couchdb the better you will be on doing web things .. and that web is the future (javascript, json, map reduce, restful api, failsafe) [14:11] sixtus42: Aikar: if you are looking for nosql+node, I would strongly suggest going with couch [14:11] ajsie_: also it has a very very good Web interface! [14:11] Aikar: thanks, yeah im new to nosql and node both [14:11] Aikar: so i have no preference lol [14:11] ajsie_: like phpmyadmin but better =) [14:11] Aikar: just wanting to research stuff [14:11] sixtus42: Aikar: but each of the options has different design goals [14:11] guybrush: you can build a restful api upon mongodb, so thats not the killer-feature of couchdb imho [14:11] ajsie_: in mongodb you are forced to use console for doing DB stuff i really dont understand that [14:11] ajsie_: in couchdb you just use the web GUI for that [14:12] ajsie_: if you want to automatize with your app you use Restful API [14:12] ajsie_: and you can also create applications WITHIN couchdb all in javascript [14:12] sixtus42: The killer feature of couch is offline-by-default replication and http+json all the way [14:12] guybrush: sixtus42: right, thats pretty neat [14:12] ajsie_: first i didnt get couchdb .. thats why i was using mongodb [14:12] Aikar: mainly just looking for a highly scalable fast db [14:13] Utkarsh has joined the channel [14:13] Aikar: im coming from the php/mysql world... so yeah looking for faster [14:13] ajsie_: give couchdb a shot , its worth it! http://guide.couchdb.org/draft/index.html [14:13] ajsie_: they even have a free online book [14:13] guybrush: using couchdb + nodejs + client-javascript, is like everywhere javascript+json - that is very cool [14:13] ajsie_: guybrush: yeah im using Sproutcore for frontend [14:13] Aikar: thats one of my goals is to dev this in pure js [14:13] ajsie_: Sproutcore + Node.js + Couchdb + Phonegap really rocks [14:14] ajsie_: you have the world with javascript =) [14:14] ajsie_: JimBastard: it will be finnished today? [14:14] JimBastard: never finished! [14:14] ajsie_: i mean released=) [14:14] JimBastard: working, perhaps! [14:14] JimBastard: indexzero swears people can deploy apps [14:14] ajsie_: ok [14:15] JimBastard: i'll make sure to send your invite on the first round [14:15] tanepiper: I'm using ExtJS + node + couchdb and it works very well [14:15] ajsie_: yeah . .. im a huge fan of nodejitsu [14:15] wink_: extjs + node + mongo works great too ;> [14:15] ajsie_: even if I never have tried it =) [14:15] JimBastard: im begging more people for money today [14:15] ajsie_: tanepiper: okay [14:16] ajsie_: JimBastard: =) [14:16] sixtus42: ajsie_: fast !== scalable [14:16] dgathright has joined the channel [14:17] Aikar: hmm so sproutcore is very similiar to extjs it looks like? [14:17] ajsie_: JimBastard: just make sure people can code/deploy app easily without worrying about linux/npm installs/github workflow (i want to use someone's git library, i just pick it from the list and hit install and i can use it in my node files) etc and it will be a success [14:18] JimBastard: thats the idea! [14:18] ajsie_: can pretty much guarantee you that since i know that i will pay for it =) [14:18] JimBastard: im not letting YOU pay [14:18] JimBastard: at least for a while [14:18] JimBastard: :-D [14:18] ajsie_: JimBastard: yeah =) [14:18] ajsie_: but i want to .. later on [14:19] ajsie_: so you can focus on making it better! [14:19] ajsie_: and easier for me [14:19] faust45: hi guys [14:19] faust45: have a question [14:20] faust45: i PUT file to CouchDB this code http://friendpaste.com/2FK3fJxjbbuY0gWz6neRBn, but don't know the best way handle server error [14:21] boaz has joined the channel [14:22] faust45: handle server error to stop send data from readStrem [14:22] ajsie_: i told the cloud9 guys this: "New" button opens a new Github project, I code my app and hit "Save" and it will be commited to Github, I hit "Open" and it will open an existing Github project that I have created earlier on, I hit "deploy" and it will deploy my app...maybe if I hit "Install" it will integrate other Github projects so I can use them in my script eg. underscore [14:22] shripadk: JimBastard: i signed up for nodejitsu long back... any chance of getting to beta test? [14:23] JimBastard: shripadk: for suuuuuurre [14:23] JimBastard: we haven't sent out any accounts yet, making sure everything is in tip top shape [14:23] JimBastard: but i think today is the day [14:23] ajsie_: JimBastard: also after you has deployed you have a site to manage and see statistics and so on [14:23] JimBastard: indexzero passed out at 5am to take a nap [14:23] ajsie_: JimBastard: that would be like the coolest development + deployment + production environment [14:24] shripadk: JimBastard: cool :) [14:24] tanepiper: ajsie_: that's a nice idea [14:24] JimBastard: i will implement awesome features until i run out of money, max out every credit card, have rackspace knocking down my door, bloody fingers [14:24] ajsie_: JimBastard: haha [14:24] ajsie_: we are counting on ya [14:25] JimBastard: Disregard social life, acquire node.js modules. [14:25] shripadk: JimBastard: btw my email happens to be assortmentofsorts at gmail dot com! in case you choosy about who gets invited :P [14:25] markwubben has joined the channel [14:25] JimBastard: shripadk: good to know! we are very close. i got a command line tool for creating invites [14:25] JimBastard: okay, back to it! [14:25] JimBastard: :-) [14:25] shripadk: JimBastard: awesome :) [14:26] bradleymeck has joined the channel [14:26] ajsie_: i hope nodejitsu gets as big or even bigger than heroku .. uploading an app is good. Developing + deploying + maintaining it will be better...and only node.js/javascript can do that [14:27] everzet has joined the channel [14:27] trotter has joined the channel [14:28] jherdman has joined the channel [14:28] femtoo has joined the channel [14:30] ajsie_: tanepiper: yeah .. i think that is the future [14:30] ajsie_: just fire up an IDE and do your javascript .. dont bother platform things [14:31] everzet has joined the channel [14:31] everzet has joined the channel [14:33] Ari-Ugwu has joined the channel [14:34] jetienne has joined the channel [14:34] danslo has joined the channel [14:35] mbrochh: is anybody here using express.js? [14:35] mbrochh: if so: is there an irc channel dedicated to it or a subreddit? [14:36] sixtus42: mbrochh: I guess that part of the world is sleeping right now [14:36] javruben: JimBastard: what is nodejitsu going to be? [14:36] tanepiper: nopem just ask away in here mbrochh [14:36] tanepiper: there is a google group for it though [14:37] Fullmoon has joined the channel [14:37] JimBastard: javruben: automagic application hosting and deployment for node.js apps [14:37] JimBastard: also, an open-source market place where developers get paid for making awesome oss apps [14:37] JimBastard: oss node.js apps that is [14:37] javruben: cool, how will it be different from joyents no.de? [14:38] JimBastard: our agility is unrivaled [14:38] sixtus42: javruben: why did I see that question coming? [14:38] shreekavi has joined the channel [14:38] sixtus42: competition is always good [14:38] JimBastard: we can move several factors faster and our UX is unstoppable [14:38] JimBastard: also, honestly [14:38] guybrush: JimBastard: you pay devs for opensource-contributions? sounds awesome [14:38] JimBastard: i want to use no.de as one of our cloud utility provider [14:39] JimBastard: nodejitsu would run on top of something like no.de [14:39] JimBastard: if you want a vps with full control, you should go get one [14:39] JimBastard: we cant compete with that [14:39] mbrochh: tanepiper, zep sure, alreadz subscribed to the google group, thanks! [14:39] Utkarsh has joined the channel [14:39] smtlaissezfaire has joined the channel [14:40] shreekavi has left the channel [14:40] JimBastard: developers developers developers! [14:41] javruben: ok cool, might find some cool integration for cloud9 [14:41] JimBastard: ohh yeah [14:41] bradleymeck: oh lord no balmerness [14:41] JimBastard: i already started playing with having an embedded cloud9 editor on the site [14:41] rikarends: ACTION throws a chair [14:41] JimBastard: got a prototype working, but its not ready for prod [14:41] javruben: brb [14:42] robotarmy has joined the channel [14:42] Athox: noders of the world, asynchronize! [14:42] sixtus42: Athox: You forgot to pass a callback [14:42] case__: :) [14:42] JimBastard: /* fire and forget, the callback goes nowhere */ [14:43] ajsie_: JimBastard: get it ready Jim. i want to hear it say Hello World [14:43] diggersf has joined the channel [14:43] Anti-X: it can't talk! [14:43] ben_alman has joined the channel [14:43] Anti-X: anyone know of any blind programmers? how do they do it? [14:44] JimBastard: Anti-X: really? [14:44] MattJ: Anti-X: Quite well [14:44] JimBastard: with a really good idea [14:44] JimBastard: err [14:44] JimBastard: with a really good ide [14:44] Anti-X: just in case i lose my sight [14:44] rikarends: i mean imagine a programmer who is not distracted by reddit, facebook, porn, news [14:44] rikarends: he could be typing 1 character a minute and still win :) [14:44] Anti-X: ha [14:44] ajsie_: LOL =) [14:45] case__: hu hu hu [14:45] ebi: Unless he gets distracted by THE REAL WORLD!!! ;) [14:45] Anti-X: that's what curtains are for [14:45] ajsie_: he wins on logic, but not GUI experience [14:45] figital has joined the channel [14:46] c4milo has joined the channel [14:46] Anti-X: well maybe he's not writing software for angsty teens [14:46] sth: Is there anything in node for connectiong to UDP streams? [14:46] Anti-X: yeah [14:46] Anti-X: datagram [14:47] Anti-X: http://static.brandedcode.com/node-doc/dgram.html [14:48] abeee has joined the channel [14:48] abeee: hello [14:49] sth: thanks [14:50] ajsie_: Anti-X: since he is blind its like talking in a cell phone right..you want see anything...just talk [14:50] ph^ has joined the channel [14:50] abeee: does any one here understand direct server return load balancing ? (dsr) [14:50] ajsie_: so maybe he will be the first one that creates a voice-interactive IDE and voice-interactive Webapp [14:51] ajsie_: that is far better than clicking around [14:51] Anti-X: yeah, but.. he may well be able to keep the structure of the code in his head, but when he then starts changing stuff in the middle of it, he's gotta have excellent memory [14:53] Anti-X: i imagine to make it work you'd need more of a modular approach, where you sort of say "this data should become this, so run it through x, y and z functions using parameters so and so" [14:53] Anti-X: instead of focusing on code [14:53] Anti-X: maybe you'd even need a "blind" programming language [14:54] Anti-X: because if you can stay focused and keep up when the screen reader starts talking about nested brackets [14:54] Anti-X: you're really good [14:54] jtsnow has joined the channel [14:56] dmachi1 has joined the channel [14:57] sivy has joined the channel [14:57] Utkarsh has joined the channel [14:57] bradleymeck: is nodejobs dead? [14:57] mlangenberg: Whoo! Our Node based chat backend is ready to be deployed to production! [14:57] Anti-X: i didn't even know nodejobs existed [14:57] Anti-X: so maybe that's the problem [14:57] ajsie_: Anti-X: actually that is what im building at the moment, a modular Restful, OOP, service oriented, js grammar oriented framework [14:58] ajsie_: that will be like building LEGO =) [14:58] bradleymeck: OOP in JS means just JS [14:58] Anti-X: you like buzzwords, don't you [14:58] Anti-X: why can't you say what it actually is [14:58] ajsie_: yes but i like the concepts more [14:58] Anti-X: instead of what it's made from [14:58] bradleymeck: People always tell me, OOP JS isnt normal JS [14:58] Aikar: lol i was about to say 'woo buzzwords' [14:58] ajsie_: its LEGO for programming =) [14:59] saikat: am i right in thinking that make install doesn't do anything more than copy node into /usr/local/bin? [14:59] Aikar: yes thats what it does saikat [14:59] bradleymeck: pretty much [14:59] Aikar: on almost all build scripts [14:59] Aikar: not just node [15:00] oal has joined the channel [15:00] abeee: hello, does anyone here know anything about load balancing? [15:00] bradleymeck: who knew getting a Javascript job would be so hard if you say you can hand code but don't like to use tons of libraries [15:00] mbrochh has joined the channel [15:00] Anti-X: yeah it's because it's the library fans that are the bosses [15:01] unomi has joined the channel [15:01] Aikar: because never using libraries is silly and a waste of an employers time [15:01] kgf: "but...but... don't you love jQuery? and the unmaintainable piles of crap we have written in it by some random consultant person who claimed to know stuff?" [15:01] kgf: oh, sorry, my bias is showing [15:01] Aikar: you should say "i know when its appropriate to use libraries and use them correctly" [15:02] SubStack: well javascript "libraries" are rarely ever just libraries [15:02] kgf: bradleymeck: I expect I'll be in your uncomfortable position next I find myself in the market [15:02] bradleymeck: aikar I spend more time fixing libraries than not [15:02] unomi: bradleymeck++ [15:02] v8bot: unomi has given a beer to bradleymeck. bradleymeck now has 0 beers. [15:02] SubStack: extensive frameworks that don't play nicely with others aren't exactly libraries [15:02] rikarends: its a difficult balance between NIH and Library madness [15:02] Anti-X: jquery isn't a library it's a framework [15:02] unomi: Anti-X: lol.. [15:02] Anti-X: you're supposed to be able to make everything in jquery 'code' [15:02] bnoordhuis has joined the channel [15:02] aheckmann has joined the channel [15:02] r00s has joined the channel [15:02] Tprice: why do i never get a file.on("end", function(){}) [15:02] Anti-X: it even has plugins ffs [15:02] kgf: see I still don't get that distinction. and I don't feel right calling jquery a framework... [15:02] unomi: Anti-X: jquery is the browser lib version of IE6 [15:03] simme has joined the channel [15:03] abeee: jquery has a great interface [15:03] kgf: a library that isn't pluggable shouldn't be called a library either IMO [15:03] sixtus42: unomi: rotfl [15:03] r00s: hi. [15:03] kgf: any of these things need to be pluggable to be taken seriously [15:03] bradleymeck: jquery looks nice, but good god if you ever need hand coding [15:03] Tprice: how do i know when to response.end() [15:03] Anti-X: libraries even have jquery plugins, so that retards who don't know what a function is, can use it [15:03] kgf: the problem with jquery is it solves small atomic problems, but what happens when you need to build an actual RIA that scales and is maintainable? [15:03] bradleymeck: tprice, when you are done [15:04] r00s: does express have a mechanism to directly store logfiles in the log directory, or am i expected to pipe stdout to a logfile manually? [15:04] bradleymeck: ie: dont wait on the client if you are done, also, timeout the client pref [15:04] abeee: to build a scalable app with jquery you need to split the app up yourself using something like the singleton pattern to define modules [15:04] johngbrooks has joined the channel [15:04] kgf: there's a bunch of things you have to bring in really, if you want to get OOTB what some other larger libs give you [15:05] kgf: i.e. a module loader, a minifier/concatenator, etc [15:05] Aikar: im getting a bit of buzzword overload, who else is getting drunk on buzzwords?! [15:05] kgf: e.g.* [15:05] abeee: whats OOTB? [15:05] kgf: out of the box [15:05] abeee: yeah [15:06] bradleymeck: kgf, the real question is, even with all those, is it easier to maintain those modules/is it faster than simple hand stuff/does your dev know wtf is going on [15:06] abeee: but jquery is pretty light i think. It makes the dom nice and ajax nice [15:06] kgf: bradleymeck: in my case I am the dev who knows wtf is going on :) [15:06] bradleymeck: $() in jquery is one expensive function [15:06] abeee: and provides nice ways to chain things [15:06] bradleymeck: compared to hand [15:06] unomi: jquery is trying to emulate what some of the better libs can get you, but unfortunately their user / dev base simply don't seem to know what is actually required for the job [15:06] kgf: bradleymeck: if you ask me, jquery is the one where you don't need to know wtf is going on. lol [15:07] abeee: thats how any api should work [15:07] kgf: because jquery makes itself approachable by people who don't code [15:07] unomi: as with the 1.4.3 .data() snafu [15:07] abeee: hide the inner workings [15:07] bradleymeck: i think its true for most of these libraries considering the JS "experts" ive worked with [15:07] Tprice: it should emit end should it not on a file read? [15:07] bradleymeck: abeee, hide yes, make it detached, no [15:07] JojoBoss has joined the channel [15:07] bradleymeck: Tprice, generally yes [15:07] abeee: how do you mean, detached? [15:09] bradleymeck: I mean that jquery takes the JS DOM which is well know, gives a well documented interface ontop of it, but Fs with your dom and expects the DOM to maintain itself. It intentionally causes side-effects [15:09] bradleymeck: that is not hidden [15:09] saschagehlich_ has joined the channel [15:09] Utkarsh has joined the channel [15:09] EyePulp has joined the channel [15:10] saikat: i'm suddenly getting lots of errors like this - https://gist.github.com/667783 [15:10] saikat: has anyone seen this before? [15:10] podman has joined the channel [15:10] matt_c has joined the channel [15:10] tapwater has joined the channel [15:10] Lorentz: So, should I use dojo instead then? [15:10] bradleymeck: by using the DOM as the storage medium it can interact with Stylesheets etc., but it in general will break what would appear to be well defined code if not written for jquery. [15:10] Anti-X: i prefer to make an element() function myself that is a shortcut to getelementbyid [15:10] abeee: Im not sure I understand the problem really. Is it to do with mixing standard javascript dom interactions with jquery dom interaction and getting some wierd stuff going on? [15:10] Lorentz: Or are people here expecting me to just hand code everything [15:10] bradleymeck: Lorentz, no [15:10] deepthawtz has joined the channel [15:11] bradleymeck: Use the tool for the job, I hate all of them equally but I use them as needed [15:11] Anti-X: i hate tools too [15:11] Anti-X: why can't we all write assembler! [15:11] bradleymeck: assembler is nice if done right XD [15:11] kgf: to quote phiggins, "your library sucks...but you should use it" [15:11] Lorentz: Why can't we just not ues computers, but rather walk to places and talk to people. [15:11] Lorentz: See the world etc. [15:12] Anti-X: you mean like in WoW? [15:12] abeee: does any one understand loadbalancing? [15:12] Lorentz: Yes, real life WoW indeed [15:12] Anti-X: hm [15:12] abeee: can node be used as a load balancer? [15:12] Anti-X: can i be hunter? [15:12] Anti-X: :p [15:12] unomi: but without teleport hack :( [15:12] Anti-X: i bet no dinosaurs either [15:13] Lorentz: No rides either [15:13] Anti-X: i'm pretty sure you can ride stuff [15:13] mlangenberg: abeee: depends on the application. [15:14] StanAngeloff has joined the channel [15:14] Anti-X: node can be used as a load balancer, yes [15:15] abeee: mlangenberg: Id like to use node as a load balancer and have direct server return [15:16] bentruyman has joined the channel [15:16] Anti-X: as in, node just passes the socket along? [15:16] abeee: I dont want node to proxy the data as I fear a bottle neck. I want the request to go to node and the responce come direct from another server to the client [15:16] Anti-X: are they on the same machine? [15:16] abeee: Yeah I gues pass the socket along.... I really dont know how to achieve this [15:16] abeee: no not on the same machine [15:17] rbranson: only way to accomplish that is some network fu [15:17] rbranson: like serious shit [15:17] bradleymeck: yea [15:17] Anti-X: also i guess there are hardware units for this [15:17] rbranson: I don't think node supports raw socket stuff yet [15:17] bradleymeck: would be interesting to do, I have a book that would probably have the info on how to do it, but would be ugly [15:17] ryah: mikeal: yt? [15:17] bradleymeck: rbranson, i would think datagram support would be enough [15:18] podman has left the channel [15:18] mape: Anyone here played with express and sessions? Seems it keeps being overwritten [15:18] mochidino has joined the channel [15:18] abeee: hmm I dont want to proxy via node as im delivering video [15:18] rbranson: bradleymeck: for TCP? you'd have to hack the headers [15:18] abeee: thanks for the the info though. [15:18] bradleymeck: exactly, tcp can be fully hacked if interpreted as udp [15:19] rbranson: you'd still have to change the IP headers [15:19] rbranson: to mark it as a TCP connection [15:19] abeee: can node do this? [15:19] abeee: (or can it be done in node even) [15:19] mlangenberg: abeee: What information would you use to direct traffic? Or just round-robin? [15:19] abeee: Its for a security mechanism [15:19] bradleymeck: abeee, long story yes, short story no [15:19] Sami_ZzZ has joined the channel [15:20] abeee: i want node to check a token on the url [15:20] rbranson has left the channel [15:20] mlangenberg: I don't see any reason why it would not be possible to pipe two sockets together using Node. [15:20] mlangenberg: abeee: so it's HTTP traffic? [15:20] abeee: then pass the request onto s3 to deliver video [15:20] tj has joined the channel [15:20] bradleymeck: we dont want to pipe we want to pass the socket onto another server [15:20] Anti-X: abeee, this can be done with routers [15:20] Anti-X: some routers at least [15:20] sveimac has joined the channel [15:21] mlangenberg: What about a simple GET to retrieve the S3 uri? [15:21] stride: bradleymeck: didn't somebody already do this with node? [15:21] stride: some shared socket or whatnot (if that's what you mean) [15:21] abeee: well I dont think you can have scripts running off s3 [15:21] prettyrobots has joined the channel [15:21] abeee: so I cant check the query string etc [15:22] bradleymeck: stride its not true passing, its a pipe to my knowledge, indexZero and substack might know better [15:22] mlangenberg: but you do have node server running somewhere, right? [15:22] Anti-X: if you look at various video sites, you'll see that they simply embed the given video url in the html page, and then let the html page itself call the given server [15:22] abeee: right now we are not using node, we are using IIS but i thought node might be pretty handy to do this kind of thing [15:23] mape: tj: Around? [15:23] kjeldahl has joined the channel [15:23] tj: mape: whats up [15:23] bradleymeck: dont think low enough is exposed right now, since a lot of that is OS level [15:23] Anti-X: abeee, does IIS pass the socket off? [15:24] abeee: well.... we arent using IIS to actually deliver the video (I dont think). We get the video from amazon S3 [15:24] abeee: a cdn [15:24] meatmanek_ has joined the channel [15:24] mape: tj: I'm poking around with connect-auth and connect-redis, and it works fine, except for when i set req.session.chat = {}; and then res.redirect('/'); and then console.log(req.session) in / it is empty (but other auth stuff from connect-auth is still there) [15:25] mape: Do I have to Save it in some way? [15:25] tj: mape: hmm, mayb connect-auth just assigns to req.session without a merge :s [15:25] tj: i dunno [15:25] tj: but nope, it should commit on response for you [15:26] abeee: sorry actually i dont it comes from s3 it comes from the amazon cloud front ... which gets it from s3 [15:26] mape: tj: but I set the session stuff after everything else is done.. hmm [15:26] tj: hmm, not to sure :s I have not used connect-auth [15:27] mape: Guess I'll have to hijack javajunky for an answer [15:27] tj: I would definitely try commenting it out, and making sure it works without connect-auth and then at least we know it is doing something [15:27] abeee: We dont want to reveal the actual location of the video to the client... hence why I thought it might be worth making the request via node [15:27] mape: tj: Hmm yeah seems to work when I'm not using it. Well that is rather dumb.. [15:28] bradleymeck has joined the channel [15:28] abeee: I could proxy the video via node but this would be a bottleneck... so i thought it might be better to do direct server return [15:28] tj: mape: he might be proxying writeHead() or something, maybe with some closure action going on there he overrides anything you set [15:28] tj: not sure [15:28] abeee: What what I need to look into ? Im not sure where to start? is it even possible [15:29] mape: req.session.auth= auth; but that shouldn't clean everything else out [15:29] tj: weird :s [15:31] boaz_ has joined the channel [15:31] mape: Seems it keeps the session I set before. Not cleaning that away. [15:32] abeee: thanks for replies anyway.. [15:34] benburkert has joined the channel [15:34] softdrink has joined the channel [15:35] eee_c has joined the channel [15:35] inky_ has joined the channel [15:35] softdrink: note: vim keys do not work in adium [15:36] BillyBreen has joined the channel [15:37] mape: tj: so how does the redis store know when the session object has been changed? [15:37] zomgbie has joined the channel [15:37] tj: mape: it just saves it on response unless there is no object [15:37] tj: nothing fancy [15:38] bradleymeck has joined the channel [15:38] mape: so on res.redirect('/') ? [15:38] tj: any writeHead() [15:38] indutny has joined the channel [15:39] abstractj has joined the channel [15:40] path[l] has joined the channel [15:42] mape: tj: Ah.. there was a writeHead before I saved the date, guess it only saves on the first one? [15:43] tj: mape: ah yeah that would be it. it would be nice to add the ability to defer the commit, the api wouldnt look to great but we could have maybe req.session.defer() before a writeHead() call [15:43] tj: and then you can do whatever you need after response and req.session.save() or something [15:43] tj: bit of a gotcha [15:43] tj: but prevents us from requiring everyone to manually save sessions all over [15:46] ph^ has joined the channel [15:51] daniellindsley has joined the channel [15:53] unomi has joined the channel [15:58] eee_c has joined the channel [15:59] Gruni has joined the channel [16:00] tapwater_ has joined the channel [16:02] jakehow has joined the channel [16:03] eee_c has joined the channel [16:05] ehaas has joined the channel [16:08] Utkarsh has joined the channel [16:10] indutny has joined the channel [16:11] bpot has joined the channel [16:13] bradleymeck has joined the channel [16:14] aubergine_ has joined the channel [16:15] benburkert has joined the channel [16:16] aubergine__ has joined the channel [16:17] TylerE has joined the channel [16:18] TylerE: Is there a guide somewhere with a startup script for running a node.js app on FreeBSD? [16:21] Anti-X: you install node, then run your script [16:22] jchris has joined the channel [16:22] aubergine has joined the channel [16:24] Viriix has joined the channel [16:24] boaz has joined the channel [16:24] Me1000 has joined the channel [16:25] TheEnd2012 has joined the channel [16:26] viktors has joined the channel [16:26] Yuffster has joined the channel [16:27] Aikar: TylerE: pretty much same as any script interpreter [16:27] fangel has joined the channel [16:27] Aikar: install node, cd /path/to/js/code then 'node myfile.js' [16:28] Aikar: or #!node at top of file and chmod +x myfile.js and ./myfile.js [16:29] gf3 has joined the channel [16:30] bradleymeck has joined the channel [16:31] TylerE: Aikar: I don't want to have to run it from console [16:31] TylerE: I want the system boot scripts to take care of it [16:31] TylerE: Like any other server process [16:31] amerine has joined the channel [16:32] dguttman has joined the channel [16:32] rauchg_ has joined the channel [16:33] Kami_: TylerE, you could create your own script and corresponding rc file and put for example, it in prefix/etc/rc.d/node_yourapp, but I would recommend you to use a process manager - e.g. supervisor [16:34] Kami_: TylerE, supervisor comes with a rc script so if you want to automatically run it at startup you need to put supervisor_enable="YES" in the rc.conf file [16:34] TylerE: Kami_: Thanks, that sounds perfect. [16:35] Kami_: TylerE, np. You will still need to configure supervisor settings for your node app though [16:35] TylerE: Kami_: That's ok, and expected. [16:36] virtuo has joined the channel [16:36] Kami_: TylerE, k. There are also some more lightweight process managers like runit, but I prefer supervisor (written in python) [16:37] sprout has joined the channel [16:37] rauchg__ has joined the channel [16:37] temp01 has joined the channel [16:38] mikew3c has joined the channel [16:38] TylerE: Kami_: python is definatly a + in my book ;) [16:40] deepthawtz has joined the channel [16:40] matjas has joined the channel [16:40] indutny: hey everyone! [16:40] indutny: glad to see you here! :) [16:40] indutny: i'm going to promote something [16:40] indutny: to find, what I've missed [16:42] gwoo has joined the channel [16:42] sep0 has joined the channel [16:42] sonnym has joined the channel [16:42] indutny_ has joined the channel [16:43] indutny_: sorry, i've disconnected [16:43] indutny_: ok [16:43] indutny_: I'd like to tell you about nodeapp [16:43] indutny_: Here comes link: http://github.com/donnerjack13589/nodeapp [16:43] xicubed has joined the channel [16:44] langworthy has joined the channel [16:44] indutny_: and here comes live demo: [16:45] indutny_: http://gmaptalk.ath.cx/ [16:45] mraleph: indutny_: you should have called it Node Baboon ;-) [16:45] zomgbie has joined the channel [16:46] indutny_: i'll think about it :) [16:47] indutny_: btw, why baboon? [16:47] indutny_: :) [16:47] path[l] has joined the channel [16:47] mraleph: indutny_: I tried to reference Brass Baboon from Donnerjack ;-) [16:47] voodootikigod: ryah: you looking for me before [16:47] voodootikigod: ? [16:48] indutny_: mraleph: haha! nice! [16:48] aconbere has joined the channel [16:48] indutny_: actually i've read it on Russian [16:48] Neil has joined the channel [16:48] indutny_: so this name is not much familiar to me [16:49] indutny_: :) [16:49] mraleph: indutny_: я тоже :-) [16:49] indutny_: mraleph: хаха [16:50] aubergine has joined the channel [16:51] indutny has joined the channel [16:51] indutny: where are you from? [16:52] matt_c has joined the channel [16:55] mikeal has joined the channel [16:58] sveisvei has joined the channel [16:58] indutny: any questions about nodeapp? [16:59] indutny: has someone found something interesting in it? [16:59] indutny: anybody? [17:00] pquerna has joined the channel [17:05] dmcquay has joined the channel [17:07] benburkert has joined the channel [17:07] jamescarr has joined the channel [17:07] jamescarr: is it safe to continue using sys.inherits? [17:08] jamescarr: and if not, what's the proper way of mixing EventEmitter behavior into a class? [17:08] jamescarr: frak [17:08] jamescarr: I mean object prototype :) [17:08] fangel: well, since 0.3 it should be util.inherit [17:08] jamescarr: doh [17:08] jamescarr: I know, but regardless :) [17:09] Utkarsh has joined the channel [17:09] jamescarr: should we use util.inherit either? [17:09] sep0: hey, after installing node under windows in wich folders i have to put my code files? [17:09] jamescarr: since it is undocumented, I guess no [17:09] SubStack: jamescarr: I just do Moo.prototype = new EventEmitter [17:09] jamescarr: sep0, anywhere you want [17:10] jamescarr: SubStack, yeah, that is what I normally go with ;) [17:10] fangel: jamescarr: well, theres really nothing stopping you from using Child.prototype = new Parent(); (though this can have side effects if the constructor of Parent has any) [17:10] SubStack: then in Moo you can pull the ol' `if (!(this instanceof Moo)) return new Moo` trick so you can do Moo() and new Moo() [17:10] fangel: (or, more specifically - it _will_ have side-effects if the construct of Parent has any) [17:11] jamescarr: SubStack, another thing I have been doing is just initializing a local copy and assigning this.on and this.emit [17:11] jamescarr: composition over inheritance [17:11] SubStack: also works [17:11] SubStack: you can also just return the value you [17:11] SubStack: 're building up [17:11] SubStack: `new` just uses the value you return so it works the same as calling it [17:12] SubStack: var self = new EventEmitter; self.moo = 42; return self [17:12] bpot has joined the channel [17:13] path[l] has joined the channel [17:13] stephank has joined the channel [17:13] twoism has joined the channel [17:13] fangel: the only difference between util.inherit(Child, Parent) and Child.prototype = new Parent() is that util.inherit copies Parent into Child.super_, and doesn't call the constructor for Parent, because it uses Object.create instead.. [17:16] jakehow has joined the channel [17:19] qFox has joined the channel [17:19] softdrink: any recommendations for code documentation aside from javadoc? [17:20] d0k has joined the channel [17:20] fangel: I'm quite partial to Docco - but it's a very different approach to code documentation [17:22] fjakobs has joined the channel [17:23] jamescarr: you know [17:23] unomi has joined the channel [17:23] jamescarr: is there anything wrong with just using process.emit/process.on to route messages in an app??? [17:24] faust45 has joined the channel [17:25] fangel: technically, there shouldn't be.. but why wouldn't you just create your own "message broker" in the form of your own instance of an EventEmitter? [17:26] jamescarr: fangel, yes, this is what I am considering. As convenient as process's event emitters are, I might opt to drop in that websocket backed emitter [17:27] daniellindsley has joined the channel [17:28] bradleymeck has joined the channel [17:28] mAritz has joined the channel [17:28] dmcquay has joined the channel [17:31] jamescarr: just trying to think of a way to expose event emitter in a sane way while using the revealing module pattenr [17:31] jamescarr: *pattern [17:32] jamescarr: I guess an init method that takes the emitter would work [17:34] mape: tj: When using the redis store, should I be able to do store.get(auth) and auth is the connect.sid cookie value? [17:34] masahiroh has joined the channel [17:35] sep0: sorry guys i installed node under windows, after executing this : console.log('hello'); i get an Unexpected token Ilegal at Module._compile.... [17:35] sep0: why [17:35] tj: mape: yeah you should be able to grab it through the store interface [17:35] stride: sep0: what editor did you use? [17:35] mape: tj: Hmm k getting undefined, guess It must be the hash that is incorrect then [17:35] sep0: etexteditor [17:36] cagdas has joined the channel [17:36] sep0: stride : should i change encoding or something like that in editor? [17:37] sprout has joined the channel [17:37] stride: sep0: does node run at all? you can test by starting it without specifying a script [17:37] sep0: yes node is running [17:37] charlenopires has joined the channel [17:37] sep0: i tried some console.log in theconsole direct [17:38] mape: tj: Nm, you should just stop responding to me and I'll figure out it's me being dumb :P [17:38] stride: sep0: okay, try notepad or something to write your file as plain ascii and see if that helps [17:38] sep0: stride: okay i tray [17:38] sep0: tray [17:38] sep0: try [17:38] stride: might be a byte order mark inserted by your editor, not sure if node is okay with them [17:38] banjiewen has joined the channel [17:39] springmeyer has joined the channel [17:39] nsm has left the channel [17:39] dnolen has joined the channel [17:40] sep0: stride: Thanks, that worked [17:40] jelveh has joined the channel [17:41] stride: np [17:41] eee_c has joined the channel [17:42] jackson_ has joined the channel [17:42] ajsie has joined the channel [17:48] jamescarr: rgh [17:48] jamescarr: sometimes vows feels unconventional [17:49] fangel: yeah.. it does a lot of thing by convention only.. [17:49] robotarm_ has joined the channel [17:50] mattly has joined the channel [17:50] breccan_ has joined the channel [17:50] fangel: which then makes it hard to do a lot of things if you dont abide by those conventions [17:50] robmason has joined the channel [17:50] softdrink: ACTION rages [17:51] cferris has joined the channel [17:51] intacto has joined the channel [17:52] robmason has joined the channel [17:52] CrabDude has joined the channel [17:52] aconran has joined the channel [17:54] sechrist has joined the channel [17:55] noahcampbell has joined the channel [17:57] twoism has joined the channel [17:57] webr3 has joined the channel [17:58] guybrush: gf3: ping [17:58] gf3: pong [17:58] Me1000 has joined the channel [17:58] guybrush: i have a problem with your irc-lib and ZNC [17:58] guybrush: i guess ZNC does not implement irc properly? [17:58] gf3: what's ZNC? [17:59] guybrush: http://en.znc.in/wiki/ZNC [17:59] gf3: mmm [17:59] gf3: guybrush: what kind of issues are you having? [18:00] guybrush: i want to connect to my znc-server with a jerk-bot [18:00] guybrush: running the bot doesnt say anything on the shell, it just kinda hangs [18:01] gf3: hmm [18:02] guybrush: well, it is not that big problem for me if it doesn't work at all - don't bother [18:02] gf3: guybrush: I've gotta run right now, but I will check it out later. Can you make an issue for me? https://github.com/gf3/IRC-js/issues [18:02] guybrush: just thought you may have a clue [18:03] guybrush: i will, ty [18:03] gf3: guybrush: I haven't played with ZNC, but I'll give it a shot [18:03] John[Dav]: what is the best way to delete an object [18:03] John[Dav]: users[sessionId] = null [18:03] guybrush: gf3: nice :) ty [18:03] John[Dav]: users[sessionId] = undefined [18:03] rcy has joined the channel [18:03] gf3: delete users.sessionid [18:03] John[Dav]: or delete users[sessionId] [18:03] gf3: guybrush: np [18:03] John[Dav]: ah k.. tx [18:04] gf3: John[Dav]: http://perfectionkills.com/understanding-delete/ [18:05] ossareh has joined the channel [18:06] John[Dav]: gf3: thnx [18:06] gf3: np, good read [18:06] murz has joined the channel [18:07] halfhalo has joined the channel [18:08] nodejs-log has joined the channel [18:08] softdrink has joined the channel [18:08] trentm has joined the channel [18:09] dylang has joined the channel [18:10] pquerna: ryah: http://www.aminutewithbrendan.com/pages/20101108 [18:13] Gehhilfe has joined the channel [18:14] abstractj has joined the channel [18:15] altamic has joined the channel [18:16] ceej has joined the channel [18:17] agnat has joined the channel [18:19] rauchg_ has joined the channel [18:19] mif86 has joined the channel [18:19] cardona507 has joined the channel [18:20] derferman has joined the channel [18:22] linkwright has joined the channel [18:23] unomi: nice talk [18:23] hellp has joined the channel [18:24] MikhX has joined the channel [18:25] langworthy has joined the channel [18:25] rauchg__ has joined the channel [18:28] rauchg_ has joined the channel [18:29] jameshome_ has joined the channel [18:29] rauchg_ has joined the channel [18:30] meandi2 has joined the channel [18:30] isaacs has joined the channel [18:30] Nohryb has joined the channel [18:32] halfhalo has joined the channel [18:33] nodejs-log has joined the channel [18:33] devinus_ has joined the channel [18:34] hassox has joined the channel [18:34] robmason has joined the channel [18:34] halfhalo has joined the channel [18:34] saschagehlich has joined the channel [18:35] devinus_ has joined the channel [18:36] Zeph\k0d3: http://www.blokmodular.com/dev/test23.htm more progress on canvas.. (compare to builds yesterday -> http://www.blokmodular.com/dev/test21-abstractart.htm and http://www.blokmodular.com/dev/test22.htm ) [18:36] dguttman has joined the channel [18:36] femtoo has joined the channel [18:36] admc has joined the channel [18:36] ajsie: anyone that is using an asynch library for abstracting creation of asynch code? [18:37] MikhX has joined the channel [18:37] Anti-X: wtf? [18:37] Anti-X: you mean like step? [18:37] Zeph\k0d3: the main new testcase yesterday was -> never destroy the canvas object - just do save/restore around each test to see if the state is properly handled all the way through the tests. [18:39] devinus has joined the channel [18:39] zomgbie has joined the channel [18:40] chewbranca has joined the channel [18:41] javruben: try this: https://github.com/fjakobs/async.js [18:41] javruben: ajsie: we use async.js for all our node.js projects [18:41] necrodearia has joined the channel [18:42] ajsie: javruben: it looks nice [18:42] ajsie: but is that for using my own methods for callbacks to? [18:42] ajsie: too [18:43] isaacs: micheil: i don't know how to answer this in a non-snarky way: "Do we really need node to be in a linux package manager?" [18:43] javruben: yes, its just a helper for doing async stuff [18:43] javruben: whatever it is that you do [18:43] bartt has joined the channel [18:43] Throlkim has joined the channel [18:43] javruben: i love for instance the async for each [18:44] javruben: which is just a lib, not a client [18:44] javruben: but maybe gitter is also just a lib [18:44] ajsie: javruben: oh now i see..waterfall, serial, parallell [18:45] ajsie: great stuff! [18:45] javruben: yes [18:45] ajsie: was looking for this without knowing it [18:45] ajsie: javruben: have you looked at the other libraries? [18:45] javruben: oops the gitter stuff was for a different channel :) [18:45] ajsie: https://github.com/fjakobs/async.js [18:45] ajsie: https://github.com/shimondoodkin/node-inflow [18:45] ajsie: https://github.com/kriszyp/node-promise [18:45] modular has joined the channel [18:45] ajsie: https://github.com/coolaj86/futures [18:45] ajsie: https://github.com/willconant/flow-js [18:45] javruben: fabian who wrote that lib looked at many libs [18:46] javruben: and decided to make that one :) [18:46] ajsie: okay [18:46] ajsie: ill try and compare which one ill use...so far i have filtered out 4-5 unpopular/unmaintained libraries [18:47] ajsie: these ones left is what is acceptable as candidate [18:47] springmeyer has joined the channel [18:47] ajsie: but asynch defeinitely looks hot [18:47] vnguyen has joined the channel [18:47] javruben: alright good luck, i'll notice your fork/watch when you decide :) [18:48] kriszyp: https://github.com/kriszyp/node-promise is kind of superceded by https://github.com/kriszyp/promised-io, btw [18:49] ajsie: javruben: i will watch the winner yeah [18:49] ajsie: but how do you see which one im watching [18:50] javruben: https://github.com/kriszyp/promised-io/watchers [18:50] rauchg_ has joined the channel [18:51] javruben: anyway, it was just a loose remark ;) [18:54] ooooPsss has joined the channel [18:56] jetienne has joined the channel [18:58] teemow has joined the channel [18:58] mattc has joined the channel [18:58] hassox has joined the channel [18:58] derferman has joined the channel [18:59] Throlkim has joined the channel [19:00] ajsie: javruben: definitely https://github.com/caolan/async [19:00] ajsie: has everything others have and is popular, not only one contributor and i like the documentation [19:00] Zeph\k0d3: http://www.blokmodular.com/dev/test24.htm linear gradients properly transform [19:01] ajsie: javruben: are you using other good stuff for node.js ? im quite new to node.js thing and havent a good feel about good libraries [19:01] bradleymeck has joined the channel [19:02] devinus has joined the channel [19:02] devinus: yikes [19:02] devinus: http://arewefastyet.com/ [19:03] devinus: impressive [19:03] bradleymeck: bleh, until spidermonkey gets a decently usable API im staying away [19:04] JohnDav has joined the channel [19:04] bradleymeck: tried to use it several times, and each time the API killed me [19:05] devinus: bradleymeck: yeah, don't get me wrong...i've looked at the SM code before and it looks awful, and i'm sure they havent optimized the memory use of the new engine *at all* but it's still impresive [19:05] devinus: impressive* [19:05] rauchg_ has joined the channel [19:05] devinus: beating an old crusty codebase into shape that fast [19:06] bradleymeck: indeed, some of its optimizations are very nicer than v8 (math/typed arrays/closure hoodoo) [19:06] rikarends: V8 was the quick way home to make a fast JS engine [19:06] rikarends: very impressive how they've beaten the old horse Spidermonkey into the current speed [19:06] bradleymeck: well it wasnt soo crusty, it was just not generating real nice code [19:07] devinus: well [19:07] bradleymeck: i remember back in the day spidermonkey was compiling to bytecode rather than native, i got laughed at saying they should just go straight to native [19:07] devinus: if what brendan eich says is true [19:07] rikarends: i wonder how much faster they will get than v8 [19:07] devinus: i dont think the v8 team is looking at making it any faster anymore [19:07] Zeph\k0d3: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=luajit&lang2=v8 bah.... I prefer luajit -> easy to embed, insanely fast ;) [19:07] ajsie: what is sunspider? [19:07] bradleymeck: well the v8 team is focused on several other concerns, its plenty fast for most things now [19:07] fangel: Mozilla's JS engine [19:07] jfd1 has joined the channel [19:08] bradleymeck: GC is a huge concern right now [19:08] ajsie: isnt it called spidermonkey? [19:08] ajsie: and rhino for the java version [19:08] Zeph\k0d3: sunspider is a benchmark set [19:08] fangel: oh sorry yeah [19:08] fangel: my bad [19:08] devinus: bradleymeck: sounds like the v8 team is looking to make v8...multithreaded [19:09] fangel: I keep mixing those two up.. too many things called stuff with monkey coming out of that group.. [19:09] bradleymeck: kind of, they are looking into that, but execution of non-pure functions would remain single threaded [19:09] devinus: something about coroutines, erlang style actors or some such... i couldn't really hear him talking b/c im in the office [19:09] bradleymeck: code gen / gc / workers on multiple threads would be nice [19:09] JohnDav: im using socket.io [19:09] JohnDav: and in [19:09] bradleymeck: from what I understand they are avoiding coroutines [19:09] JohnDav: im keeping a users array [19:09] dnolen has joined the channel [19:10] JohnDav: users[client.sessId]["client"] = client; [19:10] JohnDav: do you think this could cause deep references ? [19:10] Zeph\k0d3: but really.. luajit is still 10x faster than v8.. after they have been trying to optimize v8 js for a long time. either the coders at google totally suck (unlikely) or js is not really the ideal language to run fast at all [19:10] devinus: Zeph\k0d3: lua is incredibly simple and JS is incredibly dynamic [19:10] Zeph\k0d3: lua is arguably more dynamic than js.. [19:10] ajsie: what does the different browsers mean here: http://arewefastyet.com/ [19:10] bradleymeck: Zeph\k0d3, i thought so til i noticed a ton of the bindings used in those benchmarks, forget who pointed it out [19:10] devinus: plus mike pall is arguable the #1 in this field [19:10] rikarends: js is not a nice language to run fast [19:11] ajsie: v8 is run on chrome only .. i dont get the browser curves for other browsers [19:11] rikarends: the key to running fast is knowing the type. [19:11] bradleymeck: js w/o eval and bitwise ops is just as viable for speed as lua, however, we have those [19:11] devinus: ajsie: SM is now the fastest on sunspider about about to overtake v8 on v8bench [19:11] TomsB has joined the channel [19:12] Zeph\k0d3: bradleymeck: in my own tests I was able to run realtime DSP at competitive rates to C in luajit.. stock lua and v8 choked the CPU to a halt [19:12] ajsie: rikarends: the key is to make it fast to code =) [19:12] ajsie: human oriented [19:12] Zeph\k0d3: lua and js are not that far apart in terms of standard lib [19:12] rikarends: ajsie: the key to 'making it fast' not the key to 'global domination' [19:12] ajsie: rikarends: for whom? [19:12] ajsie: humans or computers [19:12] rikarends: ajsie: hell if its global domination you want, all we need is a well executed marketing campaign :) [19:12] Zeph\k0d3: and a manual that fits on a single sheet of paper is definately a plus [19:12] bradleymeck: they are incredibly far apart in runtime Zeph\k0d3 [19:13] rikarends: ajsie: make it fast for computers [19:13] ajsie: the more for humans, the slower it will be [19:13] bruse: would it be possible to design v8 in a way where you could just turn off eval and bitwise operations and make it very much faster, or is it a deeper design problem? [19:13] Zeph\k0d3: bradleymeck: explain? [19:13] bradleymeck: deeper design issue [19:13] rikarends: ajsie: thats a dangerous rule to throw around blindly. Often its optimizable fine [19:14] ajsie: no its a general rule [19:14] ajsie: the more near humans the more abstractions right? [19:14] ajsie: aka middle layers [19:15] Zeph\k0d3: humans are very bad at handling abstractions.. [19:15] bradleymeck: Zeph\k0d3, the ability to do type coersion must be checked at runtime, the ability to modify code inside of a closure at runtime is present in JS, the ability to use numbers for bitwise operands means 2 storage systems for numbers [19:15] ajsie: so the more near humans the more slower for computers [19:15] rikarends: what zephod said. [19:15] Zeph\k0d3: bradleymeck: lua can do all those... [19:15] rikarends: Humans suck at abstraction. Actually very simple ASM code is much easier to follow than many of the abominations we now call functional dynamic languages :) [19:15] bradleymeck: lua can emulate those [19:15] Zeph\k0d3: no, actually do them too [19:15] bradleymeck: overloading operators is not type coersion [19:16] bradleymeck: bitwise ops are a library [19:16] bartt has joined the channel [19:16] SubStack: rikarends: hah you haven't done very much assembly programming then [19:16] bradleymeck: not standard [19:16] rikarends: SubStack: actually a fair bit [19:16] bradleymeck: modification of closures is not present, only variable setting [19:16] rikarends: SubStack: thats why i said 'very simple' asm code [19:16] SubStack: then you're doing functional design wrong :p [19:16] fangel: I suck at following ASM.. but then, I've hardly done any of it.. [19:16] SubStack: well sure for very simple things very simple languages tend to do well [19:16] Zeph\k0d3: bradleymeck: but that is still not even close to an excuse for a factor 10 in speedloss [19:16] SubStack: but few solutions to problems are very simple [19:17] rikarends: I would argue that a statemachine to a certain complexity level is fundamentally easier than Mathematical structures for humans [19:17] fangel: but functional programming, like in Standard ML, I've done a bit of.. and depending on coding-style it doesn't have to be that hard to follow but can be very.. [19:17] bradleymeck: Zeph\k0d3 type coersion alone is [19:17] Zeph\k0d3: hmmm.. not for me :) [19:17] bradleymeck: checking each operation at runtime [19:17] bradleymeck: every single one [19:17] SubStack: pipeline style <3 [19:18] bradleymeck: then you get into serious memory issues with JS's habit of throwaway funcs [19:18] rikarends: SubStack: pipelining is not really a nice problem to put on the asm coder [19:18] derferman has joined the channel [19:18] rikarends: SubStack: modern CPU's do the pipelining largely by themselves now [19:19] rikarends: SubStack: thats also why V8 can be nice and fast with relatively stupid ASM. Intel is good at dealing with stupid asm. [19:19] hassox has joined the channel [19:19] Zeph\k0d3: as soon as you start to use smart asm things collapse since all cpus respond wildly different [19:19] Zeph\k0d3: I like DSP chips for that reason... at least I still have a grasp on whats happening [19:19] SubStack: rikarends: no, different kind of pipelining [19:19] SubStack: this kind -> | [19:20] SubStack: or in haskell you use $ [19:20] SubStack: or . [19:20] deepthawtz has joined the channel [19:22] bradleymeck: one major thing i would love to see is function construction time to be sped up, there is little excuse right now for how costly that stuff is [19:22] ajsie: hmm why can't i use util.inspect(persons); [19:22] InsDel has joined the channel [19:22] ajsie: it prints out nothing..persons is an array containing objects [19:22] ajsie: anyone? [19:22] bradleymeck: did you print it?, is persons actually undefined? [19:22] prettyrobots has joined the channel [19:22] bradleymeck: console.log(typeof persons);console.log(persons); [19:23] ajsie: bradleymeck: no eyes.inspects() works .. oh yeah .. i have to use console.log(util.inspect(persons)); [19:23] rnewson has joined the channel [19:23] rnewson has joined the channel [19:23] ajsie: forgot util.inspect just return it [19:24] onar has joined the channel [19:24] bradleymeck: anyone seen rauchg_ around recently? [19:25] rauchg_: rauchg_: me [19:26] jamund has joined the channel [19:26] ajsie: isnt https://github.com/cloudhead behinds nodejitsu [19:26] ajsie: good stuff they make [19:27] gretagail has joined the channel [19:27] mraleph: apparently I just missed some nice language implementations battle... *sigh* [19:28] tmpvar has joined the channel [19:28] bradleymeck: indexzero and jimbastard are the big ppl mouth wise behind nodejitsu [19:29] rauchg__ has joined the channel [19:30] tj: haha mouth wise [19:30] rauchg___ has joined the channel [19:32] hassox has joined the channel [19:32] ajsie: anyone that uses https://github.com/joose/joose ? [19:32] ajsie: is it a good idea to simulate classes? or is it better to just use pure javascript? [19:33] ajsie: so that you understand prototype based programming [19:33] rauchg_ has joined the channel [19:33] ajsie: thoughts? [19:33] thejefflarson has joined the channel [19:34] rikarends: prototype [19:34] tanepiper: don't try munge javascript with classes [19:34] tanepiper: just use it's natural beauty [19:34] ajsie: tanepiper: it looks so clean : https://github.com/joose/joose [19:34] rauchg__ has joined the channel [19:35] tj: tanepiper: agreed [19:35] ngw has joined the channel [19:35] tanepiper: The secret sauce ajsie is it's not really classes [19:35] tanepiper: It's just an object [19:35] tanepiper: it's basically {'Person': {'foo':bar'}} [19:35] bradleymeck: ajsie, prototype, classes will just make you cry in the end [19:37] rikarends: in the end its not about classes, its about structured re-use [19:37] Zeph\k0d3: OOP is more a state of mind than a set of syntax anyway... [19:37] rikarends: prototype are a different way [19:37] rikarends: +s [19:38] bradleymeck: Zeph\k0d3++ [19:38] gretagail: I'm relatively new to node, can anyone point me in the right direction to solve this error? ECONNREFUSED, Connection refused [19:38] jameshome_: your database is down [19:39] femtooo has joined the channel [19:39] mAritz has joined the channel [19:39] gretagail: hmm, it seems to happen after I've successfully opened a connection to my db though [19:39] dgathright has joined the channel [19:40] rikarends: well that error is a TCP socket error so see what tries to do a connection to something [19:40] dgathright has joined the channel [19:40] Anti-X: announcer clean the tubes [19:40] _announcer: Cleaning the tubes for great justice! [19:40] Anti-X: someone feel like rewriting the bot to use oauth? [19:40] Anti-X: :p [19:41] mikeal has joined the channel [19:41] Zeph\k0d3: http://blokmodular.com/dev/test25.htm <- radial gradient transformation matrix almost correct [19:41] Zeph\k0d3: http://blokmodular.com/dev/servervoronoi4.png hurrah for radial gradients [19:42] abstractj has joined the channel [19:42] mikeal has joined the channel [19:42] aconbere has joined the channel [19:44] aubergine has joined the channel [19:45] ngw_ has joined the channel [19:45] ajsie: bradleymeck , tanepiper : but isnt there a way to use object literals to create objects instead in a memory efficient way: http://pastie.org/1282397 [19:45] aubergine has joined the channel [19:45] ajsie: isnt there a library for that [19:45] mikeal has joined the channel [19:46] rbranson has joined the channel [19:46] siculars has joined the channel [19:46] ajsie: cause i dont understand why js force you to separate method creations .. it looks really ugly [19:46] robmason has joined the channel [19:46] rikarends: js was created in 10 days! never forget. [19:46] rbranson: ugly is beautiful [19:46] tilgovi has joined the channel [19:47] rikarends: rbranson: thats a rather odd way to justify girlfriends :) [19:47] rbranson: girlfriends aren't programming languages :P [19:47] kgf: programming languages actually sometimes tell you why they're mad. [19:47] kgf: only sometimes. [19:47] pedrobelo has joined the channel [19:47] ajsie: rikarends: yeah i know but it has gone quite some time now =) [19:47] rbranson: yeah, so queue all the latent stand up comedians here [19:47] rbranson: :D [19:48] ajsie: rikarends: they should fix the bad parts once and for all .. "we dont want to break the web" break the MF apart!! [19:48] rbranson: no, that's a bad idea [19:48] ajsie: bad parts have to make way for good parts [19:48] Ezku\_: ajsie: there are lots of ways to do that. I've used John Resig's and found it ok. http://ejohn.org/blog/simple-javascript-inheritance/ [19:48] rbranson: the nice part about using JS for server and client is that they're the same language [19:48] unomi: there should be a gfLint [19:48] Zeph\k0d3: after web2.0 we will get javascript2.0 [19:48] ajsie: or at least have a better version while maintaining the old stuff [19:49] Zeph\k0d3: javascript++ [19:49] v8bot: Zeph\k0d3 has given a beer to javascript. javascript now has 1 beers. [19:49] hsuh has joined the channel [19:49] mikeal has joined the channel [19:49] rbranson: ajsie: you should check out coffeescript [19:49] hassox has joined the channel [19:49] altamic_ has joined the channel [19:50] ajsie: j++ [19:50] v8bot: ajsie has given a beer to j. j now has 1 beers. [19:50] ajsie: rbranson: i dont like that it turns js into another syntax.. want to use js [19:50] ajsie: j-- [19:50] v8bot: j is getting too many beers. Don't let j get drunk! [19:50] ajsie: =) [19:50] Ezku\_: rbranson: yeah, I find it pretty awesome because among other things you get standardization on how to do classes and won't need to think about it [19:51] rbranson: i mean I prefer JS [19:51] MikhX has joined the channel [19:51] rbranson: the complaints people have about JS are non-issues for me [19:51] rbranson: I understand where they're coming from, but they don't bother me [19:51] sschuermann_ has joined the channel [19:51] sschuermann_: hello [19:52] ajsie: i like the idea of prototypes .. but not how you are forced to make them [19:52] rbranson: var ClassName = function() { /* constructor */; } ClassName.prototype.method = function() { }; works for me [19:52] mikeal has joined the channel [19:52] ajsie: rbranson: yeah .. it works .. but could it be simpler and more elegant? yes [19:52] rbranson: there are plenty of things that make it even easier [19:52] ajsie: php works too =) [19:52] rbranson: like Prototype's Class scheme [19:53] kgf: uh, PHP isn't prototypal? [19:53] ajsie: no [19:53] rbranson: var ClassName = Class.create(inheritFromThisClass, { methodName: function() { } }); [19:53] pedrobelo has joined the channel [19:53] kgf: dojo.declare makes it pretty nice too. essentially along the same lines. [19:53] rbranson: yeah, I don't see how it can get any easier than that honestly [19:54] rbranson: you are using classes built on a prototype system [19:54] rbranson: it's not going to be built-in [19:54] bartt1 has joined the channel [19:54] mikeal has joined the channel [19:56] justin_ has joined the channel [19:56] programble has joined the channel [19:56] programble has joined the channel [19:57] ajsie: rbranson: what library did you use? prototype? [19:57] bradleymeck: ajsie sorry to get back to you so late, yes, it is somewhat more memory efficient in that it does not have a prototype chain (that means slightly better performance at cost of construction time) (but it is a singleton so its 1 object for all things with that prototype, not some monsterous leaky thing). and with constructor functions you gain some control over non-public closures, can use setup that require external resources (ajax) [19:57] mikeal has joined the channel [19:58] mikedeboer has joined the channel [19:58] rbranson: ajsie: I use that notation I talked about first, with a function as the constructor and then add methods to the prototype [19:58] rbranson: I have used Prototype before though [19:58] tanepiper: One method I do like it ExtJS's way of doing it [19:58] bradleymeck: but a lot of what you *get* with classes are emulations that are not very performant overall and lead to an idea that javascript objects are inferior, when they actually tend to be more memory efficient and speedy if used right [19:58] tanepiper: Ext.ns('My.Namespace') [19:58] tanepiper: My.Namespace.Panel = Ext.extend(Ext.Panel, { }); [19:59] rbranson: bradleymeck: yeah, like the constructor in Prototype.js is pretty expensive [19:59] bradleymeck: just remember, mixins are costly time and memory wise, and those are how most class systems work [19:59] chrisdickinson: bradleymeck: i wasn't aware there was a (big) perf downside to prototype chains [19:59] bradleymeck: chrisdickinson, there can be [19:59] ajsie: i just want js to allow me create prototypes like classes .. its about syntax here and ease of writing code .. not about class vs prototype [19:59] bradleymeck: never use the "in" operator [19:59] bradleymeck: and there isnt [19:59] ajsie: tanepiper: but does Extjs work on node.js? [19:59] ajsie: rbranson: and does prototype work on node? [20:00] bradleymeck: ajsie, could you explain what you want exactly? ie. how prototypes do not allow it [20:00] tanepiper: ajsie: not, it's just client side, but i'm sure you could use the same code if you wanted to [20:00] tj: ew no [20:00] V1 has joined the channel [20:00] tj: lol [20:00] tanepiper: it's LGPL [20:00] rbranson: no, prototype won't work on node [20:00] chrisdickinson: hm. i was along the line of thinking that if you use prototype chaining and try (whenever possible) to use Object.keys(myObj), (and to avoid "with") you shouldn't incur a whole lot of penalty for chaining [20:00] mikeal has joined the channel [20:01] markwubben has joined the channel [20:01] rbranson: ajsie: http://howtonode.org/prototypical-inheritance [20:01] SubStack: this stuff honestly matters? [20:01] rbranson: no [20:01] bradleymeck: nope [20:01] jameshome_: heh [20:01] bradleymeck: except when ppl tell me that JS can have real classes [20:01] rauchg_ has joined the channel [20:02] tanepiper: SubStack: it's unfortunatly like the semi-colon, or comma at the end or beginning of the line argument [20:02] ajsie: bradleymeck: it allows .. i dont get why i have to do it in different lines (clearly a design flaw due to 10 days creation period): http://pastie.org/1282397 [20:02] tanepiper: it's personal taste, but people will alwasy argue their way is right [20:02] gkatsev: ACTION slaps people who try to make js do classical OOaround a bit with a large trout [20:02] gkatsev: ACTION slaps people who try to make js do classical OO around a bit with a large trout [20:03] bradleymeck: ajsie, why not User.prototype = {greet:...,kill:...} ? [20:03] SubStack: use whatever works, I say [20:03] bradleymeck: they dont need a ton of lines [20:03] eee_c1 has joined the channel [20:03] SubStack: I like prototypes. They work. [20:03] kixxauth has joined the channel [20:03] markwubben1 has joined the channel [20:03] SubStack: anyways, back to writing [20:03] mikeal has joined the channel [20:03] bradleymeck: plus if you set the prototype like that you can save some speed [20:04] V1: rauchg_: Do you want the FlashPolicy server to be enabled by default? [20:04] ajsie: bradleymeck: thx for that didnt know you could [20:04] softdrink: anyone using jasmine? [20:04] superjudge has joined the channel [20:05] ajsie: have just seen people having multiple lines .. that will be the case when something is not simple enough for you to understand .. then people wont understand it .. pretty simple [20:05] rauchg_: V1: let's try{} catch{} it, if no permissions, then serve it inline [20:05] ajsie: i hope js could be even more simple in the future [20:05] polyrhythmic has joined the channel [20:05] heavysixer has joined the channel [20:05] ajsie: getting rid of the bad parts [20:06] sschuermann_: setting up my node box for my travelling on thursday [20:06] V1: rauchg_: I now got server enabled by default, with inline as fallback, users can disable it by setting the "flashPolicyServer" option to false [20:07] mikeal1 has joined the channel [20:07] tanepiper: ajsie: no language ever gets rid of teh bad parts [20:07] tanepiper: see: C, C++, Java [20:07] V1: rauchg_: also you don't need to wrap it with try catch if you just add error listener to the server [20:07] tanepiper: hell, C++ made even more bad parts (STL) [20:07] ajsie: tanepiper: but always looking to moving bad parts [20:08] rbranson: ruby is perfect [20:08] rbranson: anyone who argues is a stupid head [20:08] ajsie: rbranson: except it isnt =) [20:08] tanepiper: you're a stupid head [20:08] rbranson: already 2 stupid heads [20:08] rbranson: who else wants to get a piece of this e-thug action? [20:09] ajsie: i like the usage of js functions more than ruby blocks and lambdas [20:09] altamic_ has joined the channel [20:09] rbranson: JS doesn't have yield... bam [20:09] tanepiper: ajsie: js functions can be lambdas [20:09] gkatsev: js does have yield [20:09] ajsie: js doesnt have to have yield =) [20:09] tj: boo ruby [20:09] tj: lol [20:09] gkatsev: at least, js 1.8.5 [20:09] bradleymeck: yield is the bane of my js [20:09] ajsie: f() [20:09] bradleymeck: ff got yield /shudder [20:09] mikeal has joined the channel [20:10] ajsie: yielding:another_function() [20:10] ajsie: i meant: yielding_another_function() [20:10] rbranson: I yield my time to the function from the other class [20:10] gkatsev: ah, it was added in js 1.7 even [20:10] rbranson: JS >1.5 is irrelevant [20:10] gkatsev: but yes, ff only it seems [20:10] gkatsev: same with let [20:10] rbranson: everyone codes in old school IE6-lovin JS [20:11] bradleymeck: yielding is fing evil when mapping program flow [20:11] gkatsev: I dont care about yield as much, but let would be awesome if it was supported everywhere [20:11] prettyrobots has joined the channel [20:11] gkatsev: would be very useful [20:11] tanepiper: ajsie: https://github.com/tanepiper/jquery-password-meter/blob/master/source/digitalspaghetti.password.js#L89 lambdas :) [20:11] rbranson: I was trolling, but honestly, yield is just syntactic sugar [20:12] rbranson: callbacks can do all the same fun functional nonsense [20:12] sideshowcoder has joined the channel [20:12] gkatsev: yeah, probably [20:12] rikarends: yield is also not really usable to break codeflow since they only jump one up [20:12] gkatsev: hence why I said let would be awesome if it was supported everywhere [20:12] rikarends: its just a fun way to invert iterators [20:12] rikarends: i mean i cant use yield to make async codeflow look sync [20:12] mikeal has joined the channel [20:13] rbranson: def f(&block); yield; end is roughly def f(&block); block.call; end [20:13] V1: rauchg_ pull requested: https://github.com/LearnBoost/Socket.IO-node/pull/94 [20:13] rauchg_ has joined the channel [20:13] CrabDude has joined the channel [20:13] V1: rauchg_: pull request send: https://github.com/LearnBoost/Socket.IO-node/pull/94 [20:13] hellp has joined the channel [20:13] rauchg_: boom [20:14] Anti-X: ACTION ducks. [20:14] rbranson: which would be function(callback) { callback(); } in JS... bfd [20:14] SubStack: ACTION quacks [20:15] gkatsev: ACTION geese [20:15] sveisvei has joined the channel [20:15] rikarends: tj: almost there :) http://blokmodular.com/dev/test25.htm [20:15] mikeal has joined the channel [20:16] tj: nice nice [20:16] tj: late weekend work i see lol [20:16] delapouite has joined the channel [20:16] ajsie: gkatsev: looking at yield [20:16] SubStack: what's a weekend? [20:16] rikarends: tj: yep hard to find real commercial reasons to do this ;) [20:17] ajsie: why doesn this work: http://pastie.org/1282488 [20:17] ajsie: on node.js [20:17] ajsie: its an example from mozilla [20:17] tj: rikarends: then why do it :p [20:17] rbranson: yield is FF only [20:17] rikarends: tj: utility, lots of ideas to use it [20:17] rikarends: tj: and finishing something we already had lying around gathering dust [20:17] ajsie: oh i c [20:17] jameshome_: ajsie: what's "document" in the context of node? [20:17] ajsie: then its not usable ? =) [20:18] ajsie: ah yeah =) [20:18] ajsie: didnt see that [20:18] ajsie: :( [20:18] ajsie: i guess i have to use jsdom =) [20:18] Zeph\k0d3: tj: I dont do regular workweeks anyway ;) [20:18] rauchg_: V1: [20:18] rauchg_: make test fails [20:18] rauchg_: under a non-root user [20:18] rauchg_: permission denied stuff [20:18] rauchg_: we should catch that [20:18] V1: rauchg_: which node version are you running? [20:19] mikeal has joined the channel [20:19] rauchg_: guillermo:socket.io-node rauchg$ node --version [20:19] rauchg_: v0.2.4 [20:19] V1: odd, it gives no issues here [20:19] V1: v0.3.1-pre rauchg_ [20:19] Me1000 has joined the channel [20:19] altamic has joined the channel [20:20] Zeph\k0d3: tj: up next, constructing the gradient transformation matrix for cone-radial gradients [20:20] dgathright has joined the channel [20:20] rauchg_: V1: are you sure you're not sudoing it [20:20] rauchg_: or running as root [20:20] V1: rauchg_: [20:20] V1: Arnout-Kazemiers-iMac:Socket.IO-node V1$ node example/server.js [20:20] V1: The 'sys' module is now called 'util'. It should have a similar interface. [20:20] V1: 8 Nov 21:19:04 - Your node instance does not have root privileges, the flash policy file will only be served inline. [20:20] V1: 8 Nov 21:19:04 - socket.io ready - accepting connections [20:21] rauchg_: how about [20:21] rauchg_: `make test` [20:21] V1: It seems to catch the error propperly [20:21] V1: rauchg_: Already did that: 100% 31 tests [20:21] rikarends: tj:the nice thing about this canvas component is that we can use it in all of the envs we have our C++ stuff running [20:21] mikeal has joined the channel [20:22] Zeph\k0d3: without having to compile cairo on stock win32 [20:22] Zeph\k0d3: ACTION shudders [20:22] rikarends: tj: its the eternal missing image component to do anything imageprocessing [20:22] Zeph\k0d3: the one time I did that we ended up having to port halve of cygwin back to windows [20:22] V1: rauchg_: I guess 0.3.X does better error handling than 0.2.4 < [20:23] tj: Zeph\k0d3: not my fault windows sucks lol [20:23] rikarends: windows is awesome! [20:23] rikarends: oh no now you've done it :) [20:23] Zeph\k0d3: tj: nothing to do with windows.. the cairo coders went all out to make part of thier stuff unportable [20:23] Zeph\k0d3: writing portable code is a black art... [20:23] rikarends: cairo is just typical for opensource shitstack. it depends on everything for simple stuff [20:23] Zeph\k0d3: writing it unportable on purpose is just sad [20:24] rikarends: not saying cairo is slow or bad, its not slow. but the codesize/dependency chain is completely hilarious [20:24] Zeph\k0d3: cairo with the opengl backend is really cool [20:24] tj: no one on my team had any trouble with it what so ever [20:24] tj: so... k? [20:24] mikeal has joined the channel [20:25] tj: does anyone use your stuff? (o3) [20:25] Zeph\k0d3: maybe things have changed in the past year, but cairo on windows was not pretty for a long time [20:25] rikarends: tj: not really, its only been released essentially since node-o3-xml [20:25] tj: i dont get why you guys are constantely complaining [20:26] rikarends: nah we are just opinionated assholes :) [20:26] tanepiper: Node Tea Baggers [20:26] Zeph\k0d3: I am not complaining :-) just in the process of finding out if all the design decisions were the right ones [20:26] rauchg_: Zeph\k0d3: a good decision is test-driven development [20:26] rauchg_: *wink* [20:26] tj: rikarends: i see that... well you can be opinionated when people use your stuff [20:26] tj: but until then, dont bug me lol [20:27] bradleymeck: tj, most of the complaining leads to people trying to argue for a design decision or for documentation, both of which are good things, but sometimes its also just frustration [20:27] Zeph\k0d3: rauchg_: well, see the tests ;) first there has to be something to test though [20:27] tj: bradleymeck: yeah [20:27] rikarends: tj: hey actually picking cairo is exactly the right thing for your thing. dont misunderstand me [20:27] technoweenie has joined the channel [20:27] rikarends: actually picking cairo would have been a lot easier for us too [20:28] mikeal has joined the channel [20:28] rikarends: the decision was made on the cairo depchain [20:28] shaver: we build cairo on windows for Firefox [20:28] shaver: it depends on pixman only, there [20:29] shaver: not a big deal, IME [20:29] shaver: and you get the D2D backend now [20:29] rikarends: yeah thats nice [20:30] MikhX has joined the channel [20:30] tj: shaver: yeah not a big deal really... pixman is reasonably small too [20:30] mikeal has joined the channel [20:32] Utkarsh has joined the channel [20:32] rikarends: tj: anyway not trying to complain, just wondering if our design decisions hold. [20:32] tj: gotcha [20:34] mikeal has joined the channel [20:34] robmason_ has joined the channel [20:35] pedrobelo has joined the channel [20:36] MrTopf has joined the channel [20:37] bradleymeck has joined the channel [20:43] MikhX has joined the channel [20:47] jspiros has joined the channel [20:48] stride: boy my c++ is rusty.. can anybody give me a hint on where I can read up on why stuff like t->InstanceTemplate()->SetInternalFieldCount(1); (from node_postgres) is necessary or what it does? [20:49] benburkert has joined the channel [20:51] Gehhilfe has left the channel [20:52] Me1000 has joined the channel [20:52] _mythz has joined the channel [20:53] rauchg_ has joined the channel [20:55] norviller has joined the channel [20:56] zomgbie has joined the channel [20:57] rikarends: stride: if i recall correctly it is set to keep a custom pointer stored with the object [20:58] admc has joined the channel [20:58] ngw has joined the channel [20:59] bpot has joined the channel [21:00] stride: okay, no idea what that would be useful for. I think I have to dig into the node.h node_events.h stuff a little more - thanks anyway rikarends :) [21:01] rikarends: stride: usually you glue C++ stuff to V8 so you can keep something with a class or instance [21:02] mjr_ has joined the channel [21:02] bradleymeck: stride v8.h [21:03] bradleymeck: and ctrl+f [21:03] prettyrobots has joined the channel [21:03] gretagail: does anyone know much about hooking up node to mongodb-native? [21:03] stride: okay, thanks [21:03] bradleymeck: http://nodejsbot.blogspot.com/2010/11/javascript-classes.html , pls bash it until it suits us all (its a really rough draft and should not be publisized) [21:04] gretagail: whenever I attempt to open/create a db, I get this: ECONNREFUSED, Connection refused [21:04] gretagail: I've tried a bunch of different examples but I can never get past this point [21:04] gretagail: I'm rather stuck [21:08] Gruni has joined the channel [21:11] tanepiper: tj: ping [21:11] tj: tanepiper: pong [21:12] path[l] has joined the channel [21:12] tanepiper: https://gist.github.com/f6714e35e9aeea71fb05 <-- Why when I do User.use('/'... and handle errors there, it works, but User.error doesn't? [21:12] stagas has left the channel [21:12] tanepiper: i'm trying to get my head around error handling in express [21:12] dmcquay has joined the channel [21:16] bnoordhuis has joined the channel [21:17] tj: the mounted app thing was a stupid idea for node stuff lol so it doesnt really work to well.. the error handlers are mounted on listen() currently [21:17] tj: so they might not work for the subapp, but I can fix that [21:17] richcollins has joined the channel [21:17] tanepiper: so you're suggesting don't use .mounted? [21:17] tj: or you can always call app.registerErrorHandlers() your self [21:17] tj: yeah [21:17] tj: it sucks [21:17] tj: well [21:17] tj: mounting of connect servers in general [21:17] tanepiper: tbh i don't really use it anyway, i just thought it might be good practice [21:17] tj: it is nice in some cases [21:17] hassox has joined the channel [21:18] tj: but over all sucks [21:18] tanepiper: fair enough - i'm about to refactor a bunch of stuff anyway, so i'll just remove it [21:18] HerrTopf has joined the channel [21:19] shimondoodkin has joined the channel [21:19] tj: with all the async stuff going on it is tough to get it work the way people would expect [21:20] tj: i should take the docs for that down maybe [21:21] creationix1 has joined the channel [21:21] tanepiper: so anyway, should I just have a .use('/' in each app I want to handle specific error types, then just have server.error in my main server file as a catch all? [21:21] _mythz has left the channel [21:21] ajsharp: what are people using for json encoding and decoding? [21:21] tj: tanepiper: yeah [21:22] tanepiper: JSON.parse and JSON.encode ajsharp ? [21:22] tanepiper: eh, JSON.stringify even [21:22] jacobolus has joined the channel [21:22] tj: tanepiper: just be careful with middleware, if you use a logger in the root app, and in a sub app for example you will log twice [21:22] tj: so just think of that, and how brutal that behavior can be for other middleware [21:22] ajsharp: heh [21:22] ajsharp: tanepiper: right [21:22] ajsharp: ;) [21:22] ajsharp: forgot about ya know, js core ;) [21:23] tanepiper: tj: yea, i'm not going to put in a logger until this stuff if more stable [21:23] mape: Man I love node, 5h to create a working multiuser/multiroom chat with facebook/twitter integration, twitter feeds alongside the chat and websockets with fallback <3 [21:23] tj: tanepiper: that is just an example though, app mounting is a big fail on many levels IMO, I should not have added that [21:23] tj: or kept it semi-private for stuff like vhost [21:25] tanepiper: yea, i'll just keep everything as seperate express apps, and a server file for tying it all together for routes [21:26] tj: yup, we do that and it is fine for those sorts of use-cases, but not having some magical app that can plug into any other app on the planet and just work [21:27] tj: need a much more opinionated framework for that to work properly [21:28] jelveh has joined the channel [21:29] norviller has joined the channel [21:29] jesusabdullah: what is app mounting, anyway? [21:30] sschuermann_: mape: cool [21:30] tj: basically just a server that acts as middleware [21:30] tj: jesusabdullah: ^ [21:30] jesusabdullah: huh [21:31] sh1mmer has joined the channel [21:31] dgathright has joined the channel [21:32] dgathright has joined the channel [21:33] mikeal has joined the channel [21:33] benburkert has joined the channel [21:34] mikeal has joined the channel [21:35] danoyoung has left the channel [21:36] Anti-X: 400 again [21:36] sschuermann_: tj: sounds like a nice idea [21:36] tj: sschuermann_: it is implemented already lol [21:36] tj: its not a good idea tho [21:37] tj: in most cases [21:37] mikeal has joined the channel [21:38] davidascher has joined the channel [21:39] sschuermann_: hehe [21:40] mikeal has joined the channel [21:41] ajsie: isn't javascript a dickhead forcing us to use "var" keyword to declare local variable and no "var" when global [21:42] ajsie: since we should use global variable 0 times isnt it better to just type "age = 1" for local and "global age = 1" for global [21:43] jameshome_ has joined the channel [21:43] tj: i prefer it actually [21:43] mikeal has joined the channel [21:43] rikarends: i vote for a 'strict' mode with error on global anything since it will make it easier to find variable name typos. defining a var is not a bad habit [21:43] tj: makes it dead simple to see where the vars are coming from [21:44] tj: I get annoyed with ruby etc where you have to go hunt around and see if its a method, local, blah blah [21:45] bartt has joined the channel [21:45] SubStack: yeah I agree, var is nice to tell you where the first use is versus a destructive update [21:46] kordless has joined the channel [21:46] V1 has left the channel [21:46] jesusabdullah: Having a = 3 be global can come as a surprise, though [21:46] mikeal has joined the channel [21:46] rikarends: jesusabdullah: yeah so it should be illegal imho :) [21:46] cloudhead has joined the channel [21:47] rikarends: jesusabdullah: its an important cause of 'oops' bugs. [21:47] derferman has joined the channel [21:47] jesusabdullah: Yeah, def [21:47] tj: you should have to Object.defineProperty(global, 'something' ...) [21:47] tj: haha [21:47] ajsie: but why not a = 4 is local, and var a = 4 global [21:47] tj: extremely explicit [21:47] ajsie: since we are using local variables all the time [21:47] jesusabdullah: That would make sense wouldn't it ajsie <_< [21:47] jesusabdullah: I woldn't mind var a and global a [21:48] ajsie: you still see its a variable [21:48] Zeph\k0d3: Sys.GlobalFactoryFactory.GetFactory().createGlobal("name", true, Sys.SecurityManager.GetSystemOverrideToken()); [21:48] ajsie: jesusabdullah: why wouldnt it [21:48] ajsie: jesusabdullah: since globals should be removed [21:48] karboh has joined the channel [21:48] tj: haha [21:48] ajsie: or making them like $age = 7 ( meaning super variable age) or something [21:48] ajsie: less code .. good thing [21:49] ajsie: and remove the ; =) [21:49] rikarends: less code is not a good thing :) [21:49] rikarends: ajsie: you can already omit the ; almost everywhere [21:49] ajsie: rikarends: yes it is [21:49] Zeph\k0d3: security by obscurity, the hard way [21:49] ajsie: less code less to read, less to write, less to scan with your eyes [21:49] mikeal has joined the channel [21:49] tj: Sys.GlobalFactoryFactory.GetFactory().createGlobal("name", true, Sys.SecurityManager.GetSystemOverrideToken()); it is [21:49] tj: haha [21:49] jesusabdullah: I was being serious, ajsie [21:49] deepthawtz has joined the channel [21:49] rikarends: ajsie: if you mean 'coffeescript' to be less code then i can somewhat agree [21:50] Zeph\k0d3: tj: note the creative use of different casing strategies to prevent memorization ;) [21:50] rikarends: ajsie: code is a visual structure for your brain less != clear. [21:50] tj: Zeph\k0d3: ahahaha. yeah make the user go google it every time you want to define a global [21:50] tj: that will stop it [21:50] ajsie: rikarends: but it could be [21:50] tj: ___________define________global______('foo', bar) [21:50] Zeph\k0d3: tj: with some creative brackets and common words you can even make google not find it at all :D [21:50] rikarends: ajsie: try some functional syntaxes for 'short' and see if you can see what they mean fast :) [21:51] Zeph\k0d3: lol [21:51] smtlaissezfaire has joined the channel [21:51] ajsie: rikarends: coder! [21:51] jesusabdullah: I've been learning some embededed systems progrqamming lately [21:51] Zeph\k0d3: embedded is fun [21:51] rikarends: ajsie: ouch :) [21:51] ajsie: here's a serious question though : https://github.com/caolan/async what is the difference between map and filter? [21:51] jesusabdullah: but there's some weird crap [21:52] Zeph\k0d3: yes :D [21:52] Zeph\k0d3: and there is little memory [21:52] jesusabdullah: Looking for an example [21:52] Zeph\k0d3: how small is your platform? [21:52] mikeal has joined the channel [21:52] Zeph\k0d3: 8bit? 16bit? 32bit? [21:52] jesusabdullah: I think it's 16 bit [21:52] jesusabdullah: MSP-430? [21:53] Zeph\k0d3: luxury :D [21:53] jesusabdullah: There are a lot of registers that you have to set by adding different settings together [21:53] jesusabdullah: like [21:53] jesusabdullah: WDTIMER = WDOFF + WDPASSWD [21:53] Zeph\k0d3: yeah [21:53] jesusabdullah: or some such [21:53] Zeph\k0d3: those defines are just shortcuts to set individual bits [21:53] jesusabdullah: Yeah [21:53] jesusabdullah: It's weird to read though [21:54] Zeph\k0d3: you can see them as actual toggles for functionality inside [21:54] jesusabdullah: mmhmm [21:54] Zeph\k0d3: the because of the way the system works, you are only allowed to toggle 8 -at the same time- which are bundled in to 1 register [21:54] Zeph\k0d3: or 16, or 32.. [21:55] jesusabdullah: It's still weird for me [21:55] jesusabdullah: and not very readable [21:55] Zeph\k0d3: maybe the word "register" is not even very handy... WDTIMER is just hardmapped to a single byte in memory [21:55] mikeal has joined the channel [21:55] Zeph\k0d3: more like the registers/drawbars in an organ than a register in terms of cpu [21:55] jesusabdullah: I've been trying to think of a way to use header files to make these kind of things more readable [21:56] jesusabdullah: but idk how I would do that [21:56] Zeph\k0d3: thing is... on those platforms you dont have much time/space left for nice constructions [21:56] Zeph\k0d3: SetTimerToBlah(int this, functionpt blah) will add a lot of overhead.. just prodding in to memory is lots faster [21:57] ajsie: oh now i get it =) [21:57] ajsie: filter for filtering values from array based on tests, map for returning whatever i like [21:58] ajsie: im talking to myself again [21:58] Zeph\k0d3: still better than talking to plants/trees [21:58] mikeal has joined the channel [21:58] javruben: ajsie: I hear ya, that always confuses me too ;) [21:59] jesusabdullah: Zeph\k0d3: That's why I was thinking of using #things [22:00] wilmoore has joined the channel [22:00] Zeph\k0d3: jesusabdullah: one of the reasons why stuff like that hasnt really stuck is that every new embedded cpu is totally different anyway [22:00] ajsie: javruben: i think ill remember it now .. filter just creates a new filtered array .. map creates a new array based on what you returned (which could be anything) [22:00] ajsie: now lets see what reduce does [22:00] Zeph\k0d3: jesusabdullah: so whatever you come up with.. PLEASE let it autogenerate from spec ;) [22:00] ajsie: always forgets .. something with memo [22:01] Zeph\k0d3: to make it even worse, filter reduces too ;) [22:01] mikeal has joined the channel [22:01] confoocious has joined the channel [22:01] confoocious has joined the channel [22:02] jesusabdullah: Zeph\k0d3: oh God, have it parse the user manual? :P [22:02] Zeph\k0d3: jesusabdullah: nah, have it parse the supplied headerfile [22:03] Zeph\k0d3: and build some functions based on a few rules/register names [22:04] jesusabdullah: hmm [22:05] mikeal has joined the channel [22:05] Zeph\k0d3: convenience function generation is always nice since it results in a perfectly consistent set :) [22:06] ajsie: ahh .. reduce just returns the memo [22:07] ajsie: Zeph\k0d3: but reduce returns memo ,, it can be whatever while filter just filters [22:07] mikeal has joined the channel [22:08] Zeph\k0d3: ajsie: I was just trying to add to the confusion ;) [22:08] ajsie: yeah [22:09] ajsie: but you failed! [22:09] Zeph\k0d3: damn. [22:09] ajsie: stop trying to add it and ADD IT! [22:10] Zeph\k0d3: maybe I can distract you with some pictures.. [22:10] jfd1 has joined the channel [22:10] ajsie: =) [22:10] mikeal has joined the channel [22:10] ajsie: why is it called map-reduce [22:11] rikarends: map-reduce is not really difficult, but its useful to understand it [22:11] rikarends: couchdb is based on it [22:11] Zeph\k0d3: http://blokmodular.com/dev/servervoronoi5.png [22:11] ajsie: should it be called filter-reduce .. cause isn't the index searching based on coouchdb filtering the document objects [22:11] Zeph\k0d3: the latest radial gradient test in o3-canvas :D [22:12] rikarends: http://en.wikipedia.org/wiki/MapReduce [22:12] ajsie: not mapping them .. cause map() could return whatever .. while filter() just returns the documents that passing the test [22:12] ajsie: but maybe they do return something else .. so ... yeah =) [22:12] rikarends: its a transform and accumulate type of algorithm [22:12] rikarends: that works nicely scalable [22:13] Zeph\k0d3: map/reduce equals distribute/recombine [22:13] ajsie: so by understanding map() and reduce() which I have .. i have understood a very powerful search algorithm [22:13] ShiZWeaK has joined the channel [22:13] rikarends: no its not search [22:13] rikarends: as a single pass it is a very limited distributed dataprocessing method [22:13] mikeal has joined the channel [22:13] tg has joined the channel [22:14] ajsie: map() filters the database documents into a small set ... (like picking the interesting documents for that search) and reduce() make calculations .. eg. how many documents do i have? [22:15] aconbere has joined the channel [22:16] langworthy has joined the channel [22:17] mikeal has joined the channel [22:19] ajsie: wouldn't it be nice if http://jsfiddle.net/ ran node.js [22:19] Utkarsh has joined the channel [22:19] ajsie: i could save all my js scripts there .. both for frontend and backend [22:20] mikeal has joined the channel [22:20] sschuermann_: ACTION sschuerrmann makes friends with evented api's [22:23] mikeal has joined the channel [22:23] abstractj has joined the channel [22:25] mikew3c_ has joined the channel [22:26] mikeal has joined the channel [22:28] drudge_ has joined the channel [22:29] mikeal1 has joined the channel [22:30] Zeph\k0d3: http://blokmodular.com/dev/servervoronoi6.png :D [22:32] drudge_ has joined the channel [22:33] SubStack: feedback please: http://substack.net/posts/9bac3e [22:33] SubStack: roll your own pubsub with dnode! [22:37] AAA_awright_ has joined the channel [22:37] aliem has joined the channel [22:37] deepthawtz has joined the channel [22:38] mikeal has joined the channel [22:38] altamic has joined the channel [22:39] mikeal has joined the channel [22:40] MikhX_ has joined the channel [22:41] sschuermann_: ACTION codes his first microwave in node ;)  [22:41] mraleph has joined the channel [22:42] mikeal has joined the channel [22:44] echosystm has joined the channel [22:45] mikeal1 has joined the channel [22:48] mikeal has joined the channel [22:48] echosystm: anyone got any idea how i might turn a signed integer into 4 bytes? [22:49] echosystm: its easy to do for an unsigned int, but i'm not sure what to do with the sign [22:49] xla has joined the channel [22:49] drudge_ has joined the channel [22:50] mjr_: what do you want to do with the sign? [22:50] dmcquay has joined the channel [22:50] hsuh has joined the channel [22:51] mikeal has joined the channel [22:54] echosystm: i'm not sure [22:54] mikeal has joined the channel [22:54] echosystm: basically what i need to do is marshal js primitives to ASN1 [22:55] echosystm: hold on one sec [22:55] drudge_ has joined the channel [22:57] echosystm: ok ASN1 uses twos compliment, same as js [22:57] mikeal has joined the channel [22:57] echosystm: i guess ive just answered my own question haha [22:57] echosystm: sorry to bother you [23:00] davida has joined the channel [23:00] mikeal has joined the channel [23:03] mikeal has joined the channel [23:06] altamic_ has joined the channel [23:07] blackdog_ has joined the channel [23:07] tlrobinson_ has joined the channel [23:08] guybrush: SubStack: i like your js-traverse, it will work in browser too with some replacement for require(), wont it? [23:08] guybrush: and cutting https://github.com/substack/js-traverse/blob/master/lib/traverse.js#L4 :p [23:09] SubStack: guybrush: yep! [23:09] SubStack: dnode actually generates a browserified version of traverse at runtime [23:09] SubStack: oh actually [23:10] SubStack: guybrush: you can just do require('traverse/web').source() [23:10] guybrush: oh neat, i am actually using dnode in all my projects now - shame on me that i did not take a deeper look into it yet [23:10] SubStack: forgot about that one! [23:10] SubStack: yeah so if you're using dnode for web stuff you'll already have a Traverse() on the browser-side to play with [23:10] guybrush: nice [23:12] tj has joined the channel [23:12] SubStack: guybrush: also what sort of projects are you using dnode for? [23:12] SubStack: I am super curious ^_^ [23:13] Mikushi1 has joined the channel [23:13] tj has joined the channel [23:14] guybrush: haha its mostly very simple sites for clients [23:14] sschuermann_: can i cancel a timeout in some way? [23:14] guybrush: clients = consumers [23:14] guybrush: so its only authentication-stuff mostly for now [23:15] caolanm has joined the channel [23:15] guybrush: and realttime twitterstuff [23:15] SubStack: sweet! [23:15] guybrush: it is just amazing how simple(!) it is to build complex stuff with nodejs [23:16] SubStack: indeed! [23:16] SubStack: that is, once you get the hang of it [23:16] mape: node,js roadmap? [23:16] guybrush: actually socket.io and dnode is really nice [23:16] caolanm: creationix1: I like the look of your couch-client module, are you using it in production? [23:17] SubStack: guybrush: my startup uses dnode soooooo much [23:17] guybrush: and it is all opensource, seriously ty very much all you guys in here [23:17] SubStack: and then pretty much our whole tech stack is node and c++ node libs [23:17] Astro: npm down? [23:17] SubStack: we do have a haskell thing to deploy for the windows instances too [23:18] mape: Astro: yeah [23:18] guybrush: we deploy with git-push and spark (alexkwolfe's fork) [23:19] guybrush: it started as simple hack and works still very fine [23:19] johngbrooks has joined the channel [23:21] Utkarsh has joined the channel [23:22] rauchg_ has joined the channel [23:22] [[zz]] has joined the channel [23:22] StanAngeloff has joined the channel [23:26] sonnym has joined the channel [23:26] jfd1 has joined the channel [23:31] SubStack: pow submitted by pubsub article to HN http://news.ycombinator.com/item?id=1884514 [23:31] dgathright has joined the channel [23:31] dnolen has joined the channel [23:31] slaskis: sschuermann_: clearTimeout() ? [23:32] ossareh has joined the channel [23:32] sschuermann_: stupid question ;) says google ;) [23:32] sschuermann_: thank you [23:32] sschuermann_: ;) [23:34] sschuermann_: nn [23:38] aconbere has joined the channel [23:41] softdrink has joined the channel [23:44] Utkarsh has joined the channel [23:44] mikeal has joined the channel [23:45] mikeal has joined the channel [23:46] rwaldron_ has joined the channel [23:49] mikeal1 has joined the channel [23:49] ajsie: why does someone say whilst and not while [23:50] Anti-X: because it's two different things [23:50] mjr_: In practice their meanings are identical. "Whilst" sounds a little more formal and old fashioned. [23:51] trentm has joined the channel [23:51] Anti-X: whilst cannot be used to mean the "programming" version of while [23:51] mikeal has joined the channel [23:51] robmason has joined the channel [23:52] Anti-X: but they can both mean "although" or "whereas" [23:54] echosystm: ok guys, question [23:55] echosystm: x = 8; while (x > 0) { console.log(x & 1); x = x >> 1; } [23:55] echosystm: this returns 1 0 0 0 [23:55] jarfhy has joined the channel [23:55] echosystm: (8 in binary) [23:55] Anti-X: yes [23:55] echosystm: why does this not work with floats? [23:56] Utkarsh has joined the channel [23:56] jamund has left the channel [23:56] echosystm: if i run that against 8.5, it still gives me 1 0 0 0 [23:56] echosystm: sorry 1 0 0 0 0 for both [23:56] Anti-X: because floats aren't like integers [23:56] Anti-X: on a binary level [23:56] echosystm: all i want to do is see what the actual bits are [23:57] Anti-X: well just google it [23:57] Anti-X: i'm sure there are plenty of examples [23:58] mjr_: The answer is that bit shift operations in JavaScript transparently convert your JS Number into a 32 bit int. [23:58] echosystm: ah [23:58] mjr_: It is very surprising. [23:58] Anti-X: oh that also works [23:58] echosystm: fml [23:58] echosystm: so how can i turn a float into bits? [23:58] mjr_: They convert to an int, perform the shifty thing, then convert back to Number, which is a float. [23:59] mjr_: You can multiply first, and then shift that. [23:59] echosystm: multiply first? [23:59] echosystm: by what?