[00:00] megalomix has joined the channel [00:00] megalomix: hello [00:01] megalomix: is 0.6.6 the last stable version of node? Can I use it in production? [00:01] freakyfractal has joined the channel [00:01] ktos has joined the channel [00:02] joshontheweb has joined the channel [00:02] Brandon_R has joined the channel [00:02] Brandon_R: hey guys [00:03] zzak has joined the channel [00:04] iigrat has joined the channel [00:05] wao: megalomix: should be. [00:07] megalomix: wao, "should" be ?? [00:07] megalomix: is it stable or not?^ [00:07] zzak has joined the channel [00:07] megalomix: :) [00:07] zzak has left the channel [00:07] zzak has joined the channel [00:08] enmand has joined the channel [00:09] polotek: megalomix: node goes in even-odd version cycles [00:09] polotek: 0.6 is the stable version [00:09] polotek: when work starts on 0.7 that will be considered unstable until 0.8 [00:10] polotek: every point release of 0.6.x is considered stable enough for production [00:10] Brandon_R: hey guys [00:10] Brandon_R: what do you think is next in node.js? [00:10] Brandon_R: what is in the roadmap? [00:12] pquerna: isolates [00:12] pquerna: there is a thread from november i believe where ryan talks about the 0.8 roadmap [00:12] pquerna: Brandon_R: https://groups.google.com/forum/#!topic/nodejs/eVBOYiI_O_A [00:12] Brandon_R: thanks [00:13] bayesian has joined the channel [00:13] Brandon_R: will check it out [00:13] Brandon_R: keep up the work guys [00:14] jbrokc has joined the channel [00:14] saesh has joined the channel [00:16] mehlah has joined the channel [00:16] MikhX has joined the channel [00:18] Brandon_R: since node.js uses single threads and events, does that mean there are no race conditions and having to deal with things like mutexes right? [00:19] dilvie has joined the channel [00:20] towski has joined the channel [00:21] VesQ has joined the channel [00:23] k1ttty has joined the channel [00:25] jacobolus has joined the channel [00:25] romanb has joined the channel [00:25] Vespakoen: anyone in here familiar with hook.io, and able to explain to me what is (sortof) is ? [00:27] Brandon_R: yes [00:28] kriskropd has joined the channel [00:30] CIA-109: node: 03Ben Noordhuis 07v0.6 * r6df7bdd 10/ (lib/child_process.js test/simple/test-child-process-fork.js): [00:30] CIA-109: node: child_process: make .send() throw if message is undefined [00:30] CIA-109: node: JSON.stringify(undefined) returns "undefined" but JSON.parse() doesn't know how [00:30] CIA-109: node: to parse that. - http://git.io/MJlyPg [00:30] jesusabdullah: Vespakoen: that is is? [00:30] jesusabdullah: Brandon_R: No, there are definitely race conditions, just not on the thread level [00:30] jesusabdullah: That is, it's entirely possible for one async action to finish before another [00:30] Brandon_R: kool [00:31] jesusabdullah: Vespakoen: The short short answer is that it's a message bus whose api is that of a shared EE2 event emitter [00:31] Vespakoen: i see.. [00:31] Vespakoen: im watching a presentation about out, lets see what i know afterwards=P [00:32] jesusabdullah: Vespakoen: http://blog.nodejitsu.com/hookio-video-tutorials are a good resource [00:32] jesusabdullah: or, are good resources [00:34] zzak: bnoordhuis: hey ben, i setup an ec2 server with screen and irssi so i can idle in here now :) [00:34] eeemsi: hi there [00:35] eeemsi: im driving nodejs 0.6.6 and i am getting lots of errors if it comes to resolve dns hosts [00:35] eeemsi: http://pastebin.com/N1mNeSvv [00:36] eeemsi: i have already changed the dns to 8.8.8.8 but event then this error accurs [00:36] romanb_ has joined the channel [00:36] eeemsi: i am trying the code which can be found on http://ricochen.wordpress.com/2011/11/15/a-simple-node-js-rss-parser-using-sax-js/ [00:37] cognominal_ has joined the channel [00:37] Vespakoen: jesusabdullah, Thanks mate! [00:38] jesusabdullah: No prob yo [00:41] adrianmg has joined the channel [00:42] raincole has joined the channel [00:42] adrianmg has left the channel [00:44] dwhittle has joined the channel [00:46] kkaefer has left the channel [00:48] janne has joined the channel [00:48] ttpva has joined the channel [00:50] CIA-109: node: 03Yoshihiro Kikuchi 07v0.6 * rf2f3028 10/ (lib/timers.js test/simple/test-timers-zero-timeout.js): [00:50] CIA-109: node: timers: fix memory leak in setTimeout [00:50] CIA-109: node: Closing handle is leaked when setTimeout called with arguments which are [00:50] CIA-109: node: 1. a callback [00:50] CIA-109: node: 2. zero delay [00:50] CIA-109: node: (i.e. setTimeout(function(){}, 0); ) - http://git.io/Jpk6NA [00:55] pronam has joined the channel [00:59] mike5w3c_ has joined the channel [01:02] nicholasf has joined the channel [01:02] ryan_stevens has joined the channel [01:03] djbell has joined the channel [01:03] boltR has joined the channel [01:03] hipsters_ has joined the channel [01:07] LeMike has joined the channel [01:08] Vespakoen: Guys, I need your opinion on something =) I am very new to Node.js, but love it a lot, I dived into it after getting familiarized with CommonJS (via Titanium) anyways, My idea is to make a web framework, i know there are some lovely projects out there already (like socketstream for example) but my goal is to make a very "easy" one, (like CodeIgniter @ php) my question is, would nodejs be a good fit for a "web-app / webserver" or with o [01:08] Vespakoen: ther words, could it replace PHP ? [01:09] Vespakoen: must sound vague, the real thing i am worried about is, that i dont think Node.js was made for building a full featured web-framework on top of it, but i might be wrong, so whats your opinion on this? [01:09] dgathright has joined the channel [01:10] LeMike: i asked that before. no answer here :P [01:10] insin: what do you think the qualities of tools which *were* made for building full-featured web-frameworks are? :) [01:10] LeMike: esp. performance [01:11] Vespakoen: i have no idea, stability ? what would happen if Node is going to handle file uploads etc? [01:12] Vespakoen: somewhere i feel that anything can be done (basically, when you can write c modules, you can) but because i am so new in this world i dont feel like standing on a solid ground =P [01:12] Vespakoen: all i need is some verification =P or rant haha [01:13] insin: depends what it is you want to make, really - do you want to make a web framework for shits 'n giggles or to scratch some itch which existing ones don't? [01:14] Vespakoen: well, i come from PHP, i use CodeIgniter a lot, love that framework, its very simple, yet feature rich, basically all you would need to make a web application [01:14] insin: I'm interested in Node, for example, because I'd like to create apps which use the same codebase on both ends, effectively giving you a fallback for people/devices which don't run JS, for free [01:14] Vespakoen: so, i was thinking, porting this to Node.js would be nice, (also for shits and giggles, and to learn from doing it) [01:15] Vespakoen: and that would indeed be the logical next step for me, leveraging socket.io to minimize the "data over the line" [01:16] Vespakoen: the thing i am wondering is, when i port all this functionality, am i doing injustice to nodejs? =P [01:16] Vespakoen: i guess ill just have to dive in and find out, right ? [01:16] spathi has joined the channel [01:17] flat: I've worked with CodeIgniter. I found it frustrating. It was always getting in the way. Much easier to use straight up PHP -- which I also find frustrating to work with, but at least it's more flexible than working with CodeIgniter, in my experience. But then I never really understood the benefits of web frameworks. What's wrong with just using a language and its libraries? [01:17] Vespakoen: interesting [01:18] ajpiano has joined the channel [01:18] flat: It's an honest question. What's the perceived benefit? Ease of use? [01:19] Vespakoen: so, my believe is that CodeIgniter is good for a couple of things, one would be, its well documented, anyone can jump on board and do stuff that they would have normaly found very hard to do [01:19] Vespakoen: so that point would be, a lower barrier of entry for beginners [01:19] flat: Fair enough. That's probably true for a lot of people. [01:19] Vespakoen: besides that, because you "force" people to build their functionality in library, it can be reused [01:19] astropirate: flat, frameworks really shine when you work on larger projects [01:19] Vespakoen: defenitely [01:20] bacon000 has joined the channel [01:20] Vespakoen: when working with more people on a project, its nice to have a "common idea" of how to build things [01:20] JaKWaC has joined the channel [01:20] Vespakoen: the better word would be a "paradigm" i guess ? [01:21] insin: you end up with a framework anyway in the scenario, but one which hopefully fits your exact needs, which I suppose goes right back to flat's point [01:21] insin: *that scenario [01:21] flat: Both the low barrier of entry and the standardization make sense. I'm odd in that I tend to read the language documentation before I start coding, so the barrier to entry hasn't ever really been an issue for me. For large projects, agreed, you've gotta agree on standards, whatever they are. [01:22] mightym has joined the channel [01:22] mightym: hey, its my first time playing around with nodeand couchdb … and shame on me … using cradle on node with this example http://pastie.org/3033956 i just get an error saving data to the db … what might I'm doing wrong, someone a hint for me? db is running on localhost, and i can save and update objects in futon [01:22] Vespakoen: and also, i think, having the "standard" things you need in a project available already is nice, for instance, DB, form validation, image resizing, uploading etc [01:23] insin: I think the sweet spot is when they solve problems you know you'll have through having experienced them "the hard way" - makes it easier for you to have an opinion on how they choose to solve the problems too [01:24] forzan has joined the channel [01:24] flat: Vespakoen: certainly, but libraries -- modules -- provide that in a more flexible way. Don't they? [01:24] Vespakoen: yeh, but compared to php, if i make a class its the same thing right ? [01:25] flat: Vespakoen: I'm not really speaking about the structure of the code, just the fact that it's a third party extension. [01:25] Vespakoen: im just trying to get a better understanding of what a framework is, and basically what i see now, is that the most important thing of a framework is its "rules / paradigm" [01:25] Vespakoen: yes that is true [01:26] Vespakoen: hmz i dont know, feels like in the nodejs word the libraries are more powerfull, feels almost like nodejs is the framework, and people contribute by making libraries =P [01:27] Vespakoen: so somehow it feels strange for me to add a layer between those... [01:27] neoesque has joined the channel [01:27] flat: Vespakoen: I don't mean to knock your effort. I fully support the endeavor, even though I probably won't end up using it. If you can set up the rules and paradigm in a way that attracts more coders, hey, that's awesome. [01:27] Vespakoen: theres a lot of doubt in my mind at the moment =P [01:28] DTrejo has joined the channel [01:29] Vespakoen: I think ill just do it, as a hobby / fun / to learn from project and think of something cooler to build with nodejs =P [01:29] mightym: no one a hint for me? [01:30] enmand has joined the channel [01:30] Renegade001 has joined the channel [01:30] franciscallo has joined the channel [01:30] hipsters_ has joined the channel [01:31] flat: mightym: What's the error message? [01:32] JaKWaC has joined the channel [01:33] mightym: flat: i don't know how to access the error message i just get [object Object] from my if (err) { [01:33] mightym: // Handle error [01:33] mightym: sys.puts(err) [01:33] flat: console.log(err); [01:35] mightym: flat: { error: 'not_found', reason: 'no_db_file' } [01:36] MatthewS has joined the channel [01:36] hipsters_ has joined the channel [01:36] mightym: flat: but i have working db as far as i can see it in futon [01:36] maxogden: mightym: ur doin it rong [01:37] maxogden: mightym: that error means the url you are requesting is wrong [01:38] flat: mightym: One of these will be a little more specific in helping you. https://www.google.com/search?tbs=li:1&q=no_db_file [01:39] flat: It's local, right? [01:39] mightym: flat: yes [01:39] jbrokc has joined the channel [01:40] mightym: i can access it via 127.0.0.1:5984 [01:40] flat: mightym: Does that first google result answer your question? [01:41] mightym: no cause in futon i can save, create, update and destroy [01:41] josephg has joined the channel [01:42] maxogden: mightym: in the http request you are making from node you are not forming a proper url [01:43] mightym: maxogden: hmmm but as far i understood cradle is forming the url, and i just pass arguements to it? [01:44] maxogden: mightym: not sure how to help you, i dont use cradle. i'd recommend figuring out a good way to debug your http traffic [01:44] darkenco has joined the channel [01:45] shedinja: hey guys I'm a newbie and was wondering if there's a resource that tells me the best practices to put comments in Javascript. I've seen some people use a certain style of comments like '// @param' in their code and was wondering if this is just for docco or standard practice. [01:46] rwaldron has joined the channel [01:48] Vespakoen: i heard something about "mint" not sure though [01:49] thesaskwatch has joined the channel [01:50] thesaskwatch: hi, I would like to use nodejs as a programmable proxy for my web browser - i.e. I'd like it to be a man in the middle for all my browser requests/reponse. Do you know if it's possible for all my http/https data? [01:51] DTrejo: thesaskwatch: yes [01:51] DTrejo: let me see if I can find the project [01:51] insin: https://github.com/nodejitsu/node-http-proxy ? [01:52] thesaskwatch: DTrejo: it would be great :) [01:52] aliem has joined the channel [01:52] coreb1 has joined the channel [01:53] DTrejo: I don't remember the name, don't think I can find it [01:54] thesaskwatch: still, thanks for information about this being possible to do [01:56] Revernd has joined the channel [01:56] perezd has joined the channel [01:56] gflarity has joined the channel [01:56] thesaskwatch: insin: it looks like reverse proxy, I think it has to support something like socks in order to make it work with browser [02:02] mbrevoort has joined the channel [02:02] mnutt has joined the channel [02:02] evxd has joined the channel [02:04] astropirate has joined the channel [02:06] owner_ has joined the channel [02:07] frabcus has joined the channel [02:09] thesaskwatch: fyi: I think I have found what I was looking for [02:09] thesaskwatch: the module is called middlefiddle [02:10] Vespakoen: i heard good things about HAProxy [02:12] thesaskwatch: Vespakoen: but it's external to node [02:12] thesaskwatch: I'd like to have a nodejs proxy I can fully script with js [02:13] Vespakoen: ok cool, i can understand that =D [02:14] maushu has joined the channel [02:16] caycep has joined the channel [02:16] acuster has joined the channel [02:17] wilmoore has joined the channel [02:20] astropirate has joined the channel [02:21] icebreaker has joined the channel [02:25] flat has joined the channel [02:25] jerrysv has joined the channel [02:27] boltR has joined the channel [02:32] skm has joined the channel [02:32] gavin_huang has joined the channel [02:33] mraleph1 has joined the channel [02:35] ajpiano has joined the channel [02:36] JaKWaC has joined the channel [02:38] gregmoreno has joined the channel [02:39] mraleph has joined the channel [02:39] DavidWelch has joined the channel [02:39] gregmoreno has joined the channel [02:39] DavidWelch: Hey guys, anyone used nginx to frontend nodejs w/ nginx handling the SSL? [02:40] DavidWelch: I'm having issues getting nginx to pass off the connection to my node server [02:40] gregmore_ has joined the channel [02:40] _bat: yeah, that is pretty common [02:40] DTrejo has joined the channel [02:41] DavidWelch: I'd think so. It looks like everythings connected right but I'm hanging at the nginx connection (and then timeout) [02:42] _bat: hmm, have you tried accessing it from localhost? [02:42] _bat: no error message - just timeout right? [02:43] DavidWelch: yeah, just timeout [02:43] mandric has joined the channel [02:44] boltR has joined the channel [02:44] DavidWelch: hah, got it! [02:44] DavidWelch: proxy_pass was missing the port [02:44] DavidWelch: was following two different example docs not paying attention [02:44] gregmoreno has joined the channel [02:44] _bat: cool! [02:44] TimTimTim has joined the channel [02:45] DavidWelch: ty for the help tho :D [02:46] _bat: you're welcome :) [02:49] CarterL has joined the channel [02:51] DavidWelch has left the channel [02:51] noazark has joined the channel [02:53] shiawuen has joined the channel [02:56] maushu has joined the channel [02:56] insin: damn, Travis is slick [02:57] gigafied has joined the channel [02:59] windsurf_ has joined the channel [03:00] windsurf_: In node, is it true that I shouldn't need the top level safety closure function because my variables would not be shared across my different .js files? [03:02] pquerna: yes, node's module system essentially does this for you [03:02] jacobolus has joined the channel [03:03] devongovett has joined the channel [03:05] gregmoreno has joined the channel [03:07] tilgovi has joined the channel [03:09] noazark has left the channel [03:11] MatthewS has joined the channel [03:12] mrryanjohnston has joined the channel [03:13] gregmore_ has joined the channel [03:13] k1ttty has joined the channel [03:15] DTrejo: what is your philosophy when it comes to old / outdated projects on your github? leave them there or delete them and hope no one cared? [03:15] DTrejo: (open question, to anyone) [03:16] Ownatik has joined the channel [03:19] gregmoreno has joined the channel [03:19] dharmesh has joined the channel [03:21] darkenco has joined the channel [03:21] mrryanjohnston: DTrejo: I'd leave it up for preservation sake. [03:22] esmevane has joined the channel [03:22] mrryanjohnston: DTrejo: who knows; maybe someday you'll come back to it [03:22] DTrejo: mm [03:22] mrryanjohnston: And, in the end [03:22] mrryanjohnston: what do you have to gain from deleting the project [03:22] DTrejo: I just left them on my disk and backed up to dropbox, but removed the forks or whatnot so that they don't lead people astray [03:22] DTrejo: not much... I guess a cleaner list of projects, I dunno [03:23] DTrejo: it's like deleting blog posts you wrote as a youth, maybe [03:23] windsurf_: pquerna: thanks [03:23] windsurf_ has left the channel [03:23] blup has joined the channel [03:32] sechrist has joined the channel [03:34] gregmoreno has joined the channel [03:37] insin: Can you change the exit code of a process from a handler attached to its exit event? [03:38] gregmore_ has joined the channel [03:41] insin: Hmm, works in REPL... would there ever be a scenario where someone would want the exit code of a failed unit test run to return a 0 exit code... [03:42] chadskidmore has joined the channel [03:46] Vennril2 has joined the channel [03:48] Xano has joined the channel [03:52] dilvie has joined the channel [03:53] coreb1 has left the channel [03:54] mikzzz has joined the channel [03:57] CrypticSwarm has joined the channel [03:57] christoffe has joined the channel [03:58] satyr has joined the channel [03:59] arturadib has joined the channel [04:01] jesusabdullah: insin: Try listening for the "uncaughtException" event or whatever that is [04:01] jesusabdullah: you can intercept exceptions that are otherwise unhandled and, y'know, do your exiting as you please [04:04] conar has joined the channel [04:04] LuckySmack has joined the channel [04:04] LuckySmack has joined the channel [04:05] LuckySmack: I am getting this error when trying to install node, when I run 'make' http://pastebin.com/2rFijqD0 [04:05] arturadib has left the channel [04:06] LuckySmack: I habe python 2.7 and libssl-dev as recommended on the wiki install page [04:06] yozgrahame has joined the channel [04:08] a_meteorite: Is there any good cluster libraries for v0.6? [04:08] a_meteorite: I know it's built-in, but something that makes it... nicer like cluster did would be nice [04:09] nakort has joined the channel [04:10] jesusabdullah: tj's doesn't work on 0.6? [04:10] MatthewS has joined the channel [04:11] jesusabdullah: a_meteorite: File an issue on joyent/node imo [04:11] jesusabdullah: er [04:11] jesusabdullah: LuckySmack: file an issue on joyent/node imo [04:11] jesusabdullah: a_meteorite: don't file an issue with joyent/node, that wouldn't even make sense! [04:11] ajpiano has joined the channel [04:11] jesusabdullah: ohohoh [04:11] a_meteorite: heh [04:13] conar has joined the channel [04:16] LuckySmack: jesusabdullah: so you think thats a legitimate problem? [04:16] jesusabdullah: LuckySmack: Well, it's a compile error, and who else are you going to ask about it? [04:16] jesusabdullah: They're guaranteed to see it there [04:17] jesusabdullah: and they'll either help you, tell you to fuck off, or let it languish [04:17] jesusabdullah: either way you have an audience [04:17] LuckySmack: lol. [04:17] conar: im trying to make a stylus file receive global variables to set the main colors in the style sheet, and use darker and light functions to create the rest of the color palette. For setting the main color this is fine, but it fails saying "#01AAAd - 10%". I have set it as ".define('$mainColor', new stylus.nodes.Literal('#01AAAd'))". Any ideas? [04:17] jesusabdullah: it's your best bet when faced with no devs online when you are [04:17] jesusabdullah: conar: idk nothin' bout stylus unfortunately, otherwise I'd give you tips for days [04:17] jesusabdullah: honestly? I love helping people [04:18] jesusabdullah: it's my favorite thing [04:18] jesusabdullah: but 80% of the time ihnfu [04:18] jesusabdullah: er [04:18] jesusabdullah: ihnfi [04:18] conar: worth a shot man im stumped [04:18] conar: thanks though [04:18] jesusabdullah: are people familiar with that one? It's a good abbreviation [04:18] jesusabdullah: yeah, no sweat [04:18] jesusabdullah: LITERALLY [04:18] secoif has joined the channel [04:20] satyr has joined the channel [04:21] CarterL has joined the channel [04:21] whaa_ has joined the channel [04:24] MatthewS has joined the channel [04:26] shedinja: conar: are you talking about the stylus css language? I don't remember it being so complicated. declaring a variable is as simple as "mainColor = #01AAAd" [04:27] astropirate: don't worry variables confuse me too [04:30] MatthewS has joined the channel [04:32] ericmuyser has joined the channel [04:35] sogo has joined the channel [04:36] neurodrone has joined the channel [04:38] fzzzy has joined the channel [04:39] flat has joined the channel [04:41] sogo has joined the channel [04:42] JasonWoof has joined the channel [04:42] JasonWoof has joined the channel [04:42] ericmuyser has joined the channel [04:42] Me1000 has joined the channel [04:43] blup has joined the channel [04:43] sogo has joined the channel [04:44] angellopozo has joined the channel [04:44] elijah has joined the channel [04:46] Dreamer3 has joined the channel [04:50] sciarp has joined the channel [05:00] lwille has joined the channel [05:01] thalll has joined the channel [05:02] ericmuyser has joined the channel [05:02] heavysixer has joined the channel [05:03] aroman has joined the channel [05:04] windsurf_ has joined the channel [05:07] ericmuyser has joined the channel [05:08] sh1mmer has joined the channel [05:13] skunkape has joined the channel [05:13] _jgr has joined the channel [05:19] eventualbuddha has joined the channel [05:28] aroman: so if I've got a for..in loop, and I'm dispatching an async function with a closure on each iteration, how can I make sure that each closure (when executed) knows what order it was in the for loop? [05:28] subbyyy has joined the channel [05:32] innociv_ has joined the channel [05:33] eventualbuddha has joined the channel [05:33] aroman has left the channel [05:33] jocafa has joined the channel [05:35] CoffeeIV has joined the channel [05:39] munichlinux has joined the channel [05:39] tytsim_ has joined the channel [05:41] jrogers has joined the channel [05:43] buu: So [05:43] buu: How can my code distinguish between a [] and a {} ? [05:44] tytsim_: do you mean that Object or Array? [05:44] buu: Possibly, yes. [05:44] buu: If I do: var x = {}; and var y = []; [05:44] Libra102 has joined the channel [05:45] buu: I want if ( ... ) to return true for x and not y [05:45] boltR has joined the channel [05:46] jerrysv: .. typeof({}) [05:46] catb0t: "object" [05:46] tytsim__ has joined the channel [05:46] jerrysv: .. typeof([]); [05:46] catb0t: "object" [05:46] buu: That would be too easy. [05:46] buu: (Also SANE) [05:47] k1ttty has joined the channel [05:47] systemfault: There's no easy way in es3 [05:48] deedubs has joined the channel [05:48] tytsim has joined the channel [05:49] rwaldron has joined the channel [05:49] systemfault: js> if (Object.prototype.toString.call([]) == '[object Array]') { console.log('win'); } [05:49] purr: systemfault: undefined; Console: 'win' [05:49] systemfault: js> if (Object.prototype.toString.call({}) == '[object Array]') { console.log('win'); } [05:49] purr: systemfault: undefined [05:49] satyr has joined the channel [05:49] systemfault: js> if (Object.prototype.toString.call(new Array()) == '[object Array]') { console.log('win'); } [05:49] purr: systemfault: undefined; Console: 'win' [05:50] eastv has joined the channel [05:50] eastv: guys I'm having a huge problem building node [05:51] eastv: i have no idea where it is stemming from but im on ubuntu 11.04 and just installed gcc via apt-get install gcc and python via compiling python 3 myself [05:51] eastv: and i get all sorts of weird warnings while making node [05:52] eastv: any ideas? [05:53] tytsim: maybe you can figure the errors. Warnings are usually ignorable if you're just a light user. [05:53] eastv: is node compatible with python 3? [05:53] eastv: pythin 3.2.2 [05:53] eastv: python* [05:55] deedubs: eastv: are you trying to build master? [05:56] Epeli has joined the channel [05:56] eastv: yes [05:56] eastv: from the latest git [05:56] eastv: i can copy paste the output from make but it is very long [05:57] deedubs: you most likely belong in 0.6.6 and not master [05:57] eastv: can you explain the difference to me please? [05:57] deedubs: one if broken one is not [05:58] deedubs: *is broken [05:58] eastv: i got the package from https://github.com/joyent/node.git via git clone [05:58] eastv: it says master branch [05:58] eastv: on github [05:58] jergason has joined the channel [05:58] deedubs: uh huh [06:00] stisti has joined the channel [06:02] gde33 has joined the channel [06:09] tytsim has joined the channel [06:10] JaKWaC has joined the channel [06:16] jergason has joined the channel [06:18] ericmuyser has joined the channel [06:18] jergason has joined the channel [06:19] fruz has joined the channel [06:21] flat has joined the channel [06:22] BillyBreen has joined the channel [06:27] raincole has joined the channel [06:27] mnutt has joined the channel [06:27] kazupon has joined the channel [06:29] mbrevoort has joined the channel [06:30] bacon000 has joined the channel [06:34] shedinja_ has joined the channel [06:34] shiawuen has joined the channel [06:36] a_meteorite: Is there any good cluster libraries for v0.6? [06:36] k1ttty has joined the channel [06:36] a_meteorite: I know it's built-in, but something that makes it... nicer like cluster did would be nice [06:39] dr0id has joined the channel [06:41] tytsim has joined the channel [06:42] AAA_awright has joined the channel [06:43] brainproxy: mikeal's watch is crashing on me when it comes across the autosave files produced by emacs, this is true even if I implement a filter and/or use ignoreDotFiles [06:43] brainproxy: the error is: ENOENT, no such file or directory [06:43] brainproxy: anyone know how to to get around that? [06:44] mbrevoort has joined the channel [06:48] templaedhel has joined the channel [06:49] templaedhel: Hello, what version of node was the global node object introduced, I'm getting an error doing var file = new node.fs.File(); [06:50] jesusabdullah: lolwat [06:51] jesusabdullah: I've never heard of a global node variable. [06:51] jesusabdullah: What library is that? o__o [06:51] templaedhel: jesusabdullah copied verbatium from the node docs [06:51] jesusabdullah: Where? o__o [06:51] jesusabdullah: link? [06:51] templaedhel: http://nodejs.org/docs/v0.0.1/api.html#file_file [06:52] jesusabdullah: oh jesus [06:52] jesusabdullah: that's incredi-ancient [06:52] templaedhel: Ok, back to fs then [06:52] jesusabdullah: that probably predates the module system [06:52] jesusabdullah: look at the "fs" module [06:52] templaedhel: I was trying to update, haha, [06:53] templaedhel: jesusabdullah Existing code used the FS module. That is what used to come up googling node js file [06:53] jesusabdullah: templaedhel: http://nodejs.org/docs/latest/api/index.html [06:53] jesusabdullah: These are the docs you want [06:53] templaedhel: jesusabdullah Ah, much better [06:53] jesusabdullah: haha, yeah I bet XD [06:53] jesusabdullah: Or, if you're on 0.4.x [06:53] jesusabdullah: which a lot of us still are [06:53] joshontheweb has joined the channel [06:53] jesusabdullah: http://nodejs.org/docs/v0.4.12/api/index.html [06:54] jesusabdullah: Similar, but subtly different [06:54] templaedhel: jesusabdullah https://www.google.com/search?rlz=1C1ASUT_enUS454US454&aq=f&gcx=c&ix=c1&sourceid=chrome&ie=UTF-8&q=node+js+file#sclient=psy-ab&hl=en&rlz=1C1ASUT_enUS454US454&source=hp&q=node+js+read+file&pbx=1&oq=node+js+read+file&aq=f&aqi=g2&aql=&gs_sm=e&gs_upl=4187l5833l0l5970l11l6l1l2l2l0l282l1431l0.1.5l8l0&bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&fp=a1bc1589ec616832&biw=1600&bih=799 second google result, wonder if there is a way to fix tha [06:55] jesusabdullah: possibly, through google's webmaster tools [06:56] jesusabdullah: ryah: You might wanna have someone look into throwing some seo on that shit ^^ [06:57] eastv: just want to be clear but nodejs isn't a replacement per se for nginx right? [06:57] templaedhel: Think its probably the File keywoard [06:57] fatblueduck has joined the channel [06:59] fatblueduck: what is the best way to automate frequent deployment of a site? [06:59] mike5w3c_ has joined the channel [06:59] fatblueduck: i currently have a git repo on a server that i remotely push/pull to [07:00] fatblueduck: i log into the server and pull from the master repo into a deployment location [07:00] brainproxy: i've had some luck playing around with octoploy.js [07:00] jesusabdullah: eastv: You could use it as such but no, that's not the idea and if nginx is doing what you need it's probably going to be the best solution for you [07:00] brainproxy: fatblueduck: see https://github.com/ammmir/octoploy [07:01] jesusabdullah: fatblueduck: automating deployment depends a lot on your environment, but it sounds like you may be interested in githooks or github's webhooks. [07:01] jesusabdullah: Another suggestion: Hooking into npm publish events [07:01] brainproxy: octoploy is meant to be used in conjunction with github post receive hook [07:01] brainproxy: sorry, forgot to mention that [07:01] fatblueduck: i'm using webfaction, which gives me a no-frills server space [07:02] jesusabdullah: idk what "no frills" means [07:02] jesusabdullah: Does that mean you get ftp and that's it? [07:02] jesusabdullah: Or, that you have a vps? [07:02] elliottcable: Anybody know how I can test if an object I got from JS-side is an ObjectWrap? [07:02] fatblueduck: i can install tools and add scripts but there is nothing there otherwise [07:02] jesusabdullah: Either way, that leaves a lot of wiggle room [07:02] brainproxy: fatblueduck: can you open an arbitrary port? [07:02] gregmoreno has joined the channel [07:02] jesusabdullah: I would suggest doing some reading and going on a journey of self-discovery [07:02] fatblueduck: i'm not sure [07:03] elliottcable: specifically, an ObjectWrap around a particular class [07:03] brainproxy: fatblueduck: nodemon + octoploy might make an interesting combo for you [07:04] brainproxy: when octoploy gets hit by the post receive hook and does the git pull [07:04] brainproxy: then nodemon would see the changes in the filesystem, and rekick the node process [07:04] fatblueduck: oh wow that sounds perfect [07:04] akujin has joined the channel [07:04] jesusabdullah: nodemon javascript monsters nodemon are the champions! [07:05] fatblueduck: do these tools provide a solution for the circumstance that the server goes down [07:05] gregmor__ has joined the channel [07:05] fatblueduck: and comes back up? [07:05] brainproxy: fatblueduck: nah [07:06] fatblueduck: jesusabdullah i cannot choose which port is opened [07:06] fatblueduck: but i may have an arbitrary port opened for me [07:07] brainproxy: fatblueduck: to handle the reboot scenario, you'll need to combine nodemon with something like an "upstart" script, i.e. if you're running on ubuntu [07:08] elliottcable: I need to verify that the argument to my C++-side function, called from JS-side, has a first argument that is an ObjectWrap'd `Window` [07:08] elliottcable: (a C++ type of mine, inheriting from ObjectWrap) [07:09] jesusabdullah: If you want restarts check out forever, fatblueduck [07:13] gregmoreno has joined the channel [07:14] dr0id: hi elliottcable [07:14] fangel has joined the channel [07:15] brainproxy: jesusabdullah: forever still requires manual integration with upstart, monit, etc. to restart after reboot? [07:15] jesusabdullah: after boot? Yeah [07:15] jesusabdullah: sorry >_< wasn't thinkin' [07:16] elliottcable: ... hi, dr0id [07:16] brainproxy: np, just wondering if it had acquired some new powers :) [07:16] jesusabdullah: well [07:16] jesusabdullah: it's not so much powers as it is being added to the right rc scripts I think [07:16] dr0id: what do those 3 dots indicate ? [07:16] elliottcable: dr0id: ellipsis? [07:16] dr0id: I guess you don't remember me, do you ? [07:16] elliottcable: dr0id: http://en.wikipedia.org/wiki/Ellipsis [07:17] elliottcable: dr0id: er, I don't remember *anybody* bro. I don't have a memory. [07:17] elliottcable: if you had really known me at some point in the past, you'd know that >,> [07:17] dr0id: lulz [07:17] dr0id: and yer absent in yer very own chan [07:17] EvRide has joined the channel [07:18] elliottcable: dr0id: er, it's ##Hat now, bro [07:20] jxie has joined the channel [07:21] te-brian has joined the channel [07:21] jacobolus has joined the channel [07:22] Kunda has joined the channel [07:23] codygray has joined the channel [07:24] elliottcable: dr0id: lolwat [07:24] dr0id: lolol :P [07:25] AD7six has joined the channel [07:32] chia has joined the channel [07:33] incon has joined the channel [07:34] pik has joined the channel [07:34] kazupon has joined the channel [07:38] _jgr has joined the channel [07:41] saesh has joined the channel [07:42] andrewfff has joined the channel [07:50] petrjanda has joined the channel [07:53] tytsim has joined the channel [07:53] k1ttty has joined the channel [07:55] munichlinux has joined the channel [07:56] astrobunny has joined the channel [08:05] ericmuyser has joined the channel [08:07] TheFuzzball has joined the channel [08:09] rachet_ has joined the channel [08:09] toddysm has joined the channel [08:10] visnup has joined the channel [08:10] context_ has joined the channel [08:10] Diaoer has joined the channel [08:10] konobi_ has joined the channel [08:10] elliottcable: Any v8 wizards around? [08:11] Diaoer has joined the channel [08:11] framlin_ has joined the channel [08:11] elliottcable: I want to do something eminently simple: get a `bool` integer out of a JavaScript boolean passed as an argument to my C++ callback. [08:12] mrkurt_ has joined the channel [08:12] ShinyDarkness has joined the channel [08:12] Lartsa_ has joined the channel [08:12] elliottcable: That is, convert a `v8::Arguments::operator[]` result (a `Local`) into a `v8::Boolean` that I can then `->Value()` against. [08:12] trodrigues has joined the channel [08:12] Corey_ has joined the channel [08:12] jerrysv_ has joined the channel [08:12] elliottcable: however, v8 has some sort of complex built-in casting system that it assumes you will use, and it seems to be completely undocumented [08:13] dubenste1n has joined the channel [08:13] stylus_ has joined the channel [08:13] pkrumins: elliottcable: bool val = args[0]->Value(); [08:14] novumordo has joined the channel [08:14] elliottcable: pkrumins: Doesn't work; get compilation errors [08:14] elliottcable: lemme go back and copy-paste 'em [08:14] elliottcable: ./curses.cc:90:24: error: invalid use of ‘v8::Value::Value’ [08:14] elliottcable: forgive me, I can't stand C++, so I have a lot of trouble with some of the bits of it that I am less familiar with >,> [08:15] elliottcable: my latest attempt was `v8::Local::Cast(arguments[1])->Value()`, but that caused an even *bigger* slew of compilation errors >,> [08:15] tytsim_ has joined the channel [08:15] josephg has joined the channel [08:15] zed0_ has joined the channel [08:16] delnaught has joined the channel [08:16] einaros has joined the channel [08:16] blueadept has joined the channel [08:16] blueadept has joined the channel [08:16] SamuraiJack has joined the channel [08:16] sir_tyrion has joined the channel [08:16] TimTim has joined the channel [08:17] einaros has joined the channel [08:17] tmm1 has joined the channel [08:19] mara has joined the channel [08:21] zpao_ has joined the channel [08:21] fatblueduck has joined the channel [08:22] fatblueduck has left the channel [08:22] braoru has joined the channel [08:23] ericmuyser has joined the channel [08:23] TN has joined the channel [08:23] braoru has joined the channel [08:25] andrewff1 has joined the channel [08:28] liar has joined the channel [08:28] pkrumins: elliottcable: [08:28] pkrumins: > require('./bool').neg(true) [08:28] pkrumins: false [08:28] pkrumins: elliottcable: http://pastebin.com/5DmuT1xr [08:29] bayesian: Hey, I am a bleeding novice.... and I am trying to debug why my application doesn't serve a view I created [08:29] elliottcable: pkrumins: well, you're declaring that as a value. I don't know how differently that works in C++, but I'm using this *inside an expression* [08:29] bayesian: I want to route the url /game to routes.game, and I created routes/game.js [08:29] elliottcable: er, wait, now you're using BooleanValue [08:29] elliottcable: ACTION tries [08:29] bayesian: but the variable routes.game is undefined in apps.js [08:30] elliottcable: yeah, pkrumins, doesn't work for me: [08:30] bayesian: can somebody please help me figure that out? [08:30] elliottcable: /usr/include/node/v8.h:198:5: error: invalid conversion from ‘v8::Value*’ to ‘v8::Object*’ [-fpermissive] [08:31] pkrumins: show me the code [08:31] pkrumins: unobfuscate first ;) [08:32] elliottcable: pkrumins: https://gist.github.com/93665a21a166638e3c4f [08:32] andrewfff has joined the channel [08:33] elliottcable: so, given that, we've already asserted that arguments[1] *is* a boolean, but I just don't know how to get a value of it that will satisfy C++'s type checking / V8's implementation, on that last line [08:33] elliottcable: that example is with your BooleanValue() usage; I've tried all sorts of other things with dynamic_cast<>, v8::Handle::Cast(), so on and so forth [08:33] elliottcable: nothing so far has worked [08:34] pkrumins: what's the clearok's prototype? [08:34] elliottcable: pkrumins: `man 3 clearok` [08:34] elliottcable: int clearok(WINDOW *win, bool bf); [08:34] pkrumins: i am pretty sure it's not C++'s bool [08:34] pkrumins: cause ncurses is C [08:34] k1ttty has joined the channel [08:35] elliottcable: probably not? I have no idea what C++'s bool is [08:35] pkrumins: a type [08:35] elliottcable: but v8's bool seems to just be a define of 1/0 [08:35] elliottcable: ick. Okay, that's going to complicate life even more. [08:35] pkrumins: actually that's fine there with that book [08:35] andrewff1 has joined the channel [08:35] elliottcable: nah, C++'s bool is supposed to be 1/0 as well, according to a quick google [08:36] pkrumins: oh sure [08:37] pkrumins: elliottcable: yeah that's fine [08:37] sechrist has joined the channel [08:37] pkrumins: which line is the error at? [08:37] pkrumins: 8? [08:38] pkrumins: invalid conversion from ‘v8::Value*’ to ‘v8::Object*’ [08:38] elliottcable: I wish I understood C++ better. I've read two books, part way through a third, and I *still* don't know why this would work in your code and not mine [08:38] pkrumins: i have 10 years of experience with C++ [08:38] elliottcable: curses.cc:89:39 [08:38] dexter_e has joined the channel [08:38] tobias has joined the channel [08:38] elliottcable: pkrumins: ‘lucky’ you ;D [08:38] elliottcable: er, sorry, that corresponds to, uhhh, [08:38] pkrumins: my favorite language [08:38] andrewfff has joined the channel [08:38] elliottcable: ... your ... favourite language [08:39] insin has joined the channel [08:39] pkrumins: yup [08:39] rendar has joined the channel [08:39] tmm1 has joined the channel [08:42] andrewff1 has joined the channel [08:44] boltR_ has joined the channel [08:45] e6nian has joined the channel [08:47] delnaugh1 has joined the channel [08:52] jbpros has joined the channel [08:53] pct1 has joined the channel [08:55] jxie has joined the channel [08:59] lietu: I have a buffer, with binary data, I want an md5 sum of it ... is it possible? ... if I convert it to a JS string, it becomes garbage, and at least the md5 module on node wiki takes strings [09:01] ivan` has joined the channel [09:02] dgathright has joined the channel [09:03] joshontheweb has joined the channel [09:03] brianloveswords has joined the channel [09:03] TimTim has joined the channel [09:07] mikeal has joined the channel [09:08] Dulak has joined the channel [09:10] elliottcable: lietu: modify the md5-module to accept buffers? [09:11] ericmuyser has joined the channel [09:11] caycep has joined the channel [09:14] __doc__ has joined the channel [09:16] petrjanda has joined the channel [09:16] brianloveswords has joined the channel [09:17] gigafied has joined the channel [09:19] lietu: meh [09:20] lietu: not that important, was just going to use it as a tool for debugging ;) [09:20] lietu: checking if I always get the same data [09:22] astropirate has joined the channel [09:22] lietu: my http proxy thing fails to return proper data about 9 times out of 10, but I've not found any reason for it to work fine the one time .. I keep thinking that the data is somehow changing, but it's difficult to confirm without a hash [09:26] Me1000 has joined the channel [09:26] tvw has joined the channel [09:27] kazupon has joined the channel [09:28] lietu: mjeah, made a bufferToHash that takes each byte of the buffer, converts to space separated numbers in a string, and runs md5 on that ... works for me, will not work for doing real md5 sums of buffers [09:29] lietu: my assumption seems to be correct ... incoming data is always the same, but after gzipping it, it is always different [09:34] HT has joined the channel [09:38] deoxxa: how does the "mounting" concept work in express? [09:39] deoxxa: i want to split an application of mine into separate modules for the front end and api [09:39] iammerrick has joined the channel [09:40] swair_ has joined the channel [09:40] deoxxa: seems like the most straightforward way would be to mount the api part under /api/v1 or something and the front end under / [09:41] pronam_ has joined the channel [09:42] josh-k has joined the channel [09:45] MerlinDMC has joined the channel [09:45] dexter_e has joined the channel [09:52] jomoho has joined the channel [09:52] stagas has joined the channel [09:53] k1ttty_ has joined the channel [09:54] gausby has joined the channel [09:56] joshgillies has joined the channel [09:56] loob2 has joined the channel [09:59] michaelhartau has joined the channel [10:01] lzskiss has joined the channel [10:02] lmorchard has joined the channel [10:02] romanb has joined the channel [10:03] AD7six has joined the channel [10:03] zed0 has joined the channel [10:06] jocafa has joined the channel [10:06] `3rdEden has joined the channel [10:09] AD7six has joined the channel [10:10] sharatmr has joined the channel [10:11] caycep has joined the channel [10:13] romanb_ has joined the channel [10:13] sharatmr: hi i hav a problem after installing node.js i tried the sample given in the nodejs website...the server is running properly cuz i tested the code in another system and its working there...the problem is my browser{try ie,firefox,opera,chrome} gets stuck at "waiting for...."... [10:14] sharatmr: i hav tried to open the page in someones else system for the server running in my system same thing it gets stuck... [10:14] GrizzLyCRO has joined the channel [10:14] sharatmr: and i am using v0.6.6 in windows [10:14] delian66 has joined the channel [10:15] brianloveswords has joined the channel [10:17] sharatmr: someone?? [10:17] codygray has joined the channel [10:18] astropirate: sh1mmer, is this on a windows box? [10:18] astropirate: make sure the firewall isn't blocking node [10:18] jetienne_ has joined the channel [10:20] adrianmg has joined the channel [10:20] josh-k has joined the channel [10:21] AndreasMadsen has joined the channel [10:21] icebox has joined the channel [10:22] sharatmr: astropirate: i hav allowed the firewall setting for nodejs [10:22] adrianmg has left the channel [10:22] sharatmr: i'll just check by disabling it [10:24] sharatmr: nope not working after disabling the firewall also [10:25] astropirate: sharatmr, and you say the EXACT same code works on another machine? [10:25] sharatmr: ya [10:25] sharatmr: i tried it [10:26] astropirate: strange [10:26] astropirate: hmm i haven't tried node on windows yet, but is there a console output you can see for possable errors? [10:26] sharatmr: the only diff btw the systems is that one is 64bit and uac in enabled mine is 32 with uac disabled [10:26] sharatmr: console like i am running it in command prompt [10:27] astropirate: that should work [10:27] sharatmr: and i hav putty [10:27] _jgr has joined the channel [10:27] astropirate: wait what? your system is 64bit but 32bit with uac disabled? [10:27] secoif has joined the channel [10:27] astropirate: it doesn't work like t hat [10:27] sharatmr: no the sys i test the code and is working is 64bit with uac [10:28] astropirate: ahh [10:28] astropirate: ok [10:28] sharatmr: mine is 32 bit without uac [10:28] sechrist has joined the channel [10:28] astropirate: hmm i'm going to try node on windows [10:28] sharatmr: oh k.. [10:28] sechrist has joined the channel [10:30] romanb_ has joined the channel [10:31] deoxxa: is there a way to mount (i.e. app.use()) an express middleware under a certain route? [10:33] `3rdEden: Shouldn't the process.nextTick defer the execution of the callback to the nextTick of the eventloop? [10:33] `3rdEden: because I'm not seeing that happening here [10:34] `3rdEden: o wait [10:34] `3rdEden: nvm [10:34] `3rdEden: i fucked up a variable in my test case ;$ [10:34] skm has joined the channel [10:36] jimt has joined the channel [10:36] josh-k has joined the channel [10:38] ph^ has joined the channel [10:40] romanb__ has joined the channel [10:41] swair: hey guys, what if i have 10 clients connected to a node server, and if there is an exception caught it'll take down all 10 of them. is there a way to not do that?.. [10:42] thax has joined the channel [10:43] astropirate: swair, yes, you can catch it within the client connectio listener callabck [10:44] swair: hmm..ok [10:45] swair: well, say i screwed up something and there is an uncaught exception [10:45] swair: i wouldn't want all the clients to be suffered cause something went wrong with one connection [10:46] mehlah has joined the channel [10:46] astropirate: swair, aye, the connection callback is called for every new client. Thats the top most encapsolating scope for every single client so i'd put a big ol' try{} catch() {} arround everything in there [10:47] swair: hmm..ok, well thanks! :) [10:47] astropirate: yw [10:51] mraleph has joined the channel [10:52] k1ttty has joined the channel [10:54] codygray has joined the channel [10:54] sharatmr1 has joined the channel [10:55] satyr has joined the channel [10:56] romanb__ has joined the channel [11:07] salva has joined the channel [11:07] aliem has joined the channel [11:07] salva has left the channel [11:09] iigrat has joined the channel [11:13] d0k has joined the channel [11:13] Murugaratham has joined the channel [11:14] Murugaratham has left the channel [11:15] Murugaratham has joined the channel [11:16] Murugaratham has joined the channel [11:17] dexter_e has joined the channel [11:17] jbpros has joined the channel [11:18] Murugaratham has left the channel [11:18] NewCoder has joined the channel [11:19] npa has joined the channel [11:21] romanb_ has joined the channel [11:21] fly-away has joined the channel [11:22] k1ttty has joined the channel [11:24] jyp has joined the channel [11:24] davidbanham has joined the channel [11:25] strax has joined the channel [11:26] jayniz has joined the channel [11:27] shinuza has joined the channel [11:27] __tosh has joined the channel [11:27] tylergillies has joined the channel [11:27] garann has joined the channel [11:28] k1ttty has joined the channel [11:28] romanb__ has joined the channel [11:28] josh-k has joined the channel [11:29] JasonSmith has joined the channel [11:29] ncb000gt has joined the channel [11:30] whoops has joined the channel [11:30] dnyy has joined the channel [11:31] rurufufuss has joined the channel [11:31] beawesomeinstead has joined the channel [11:31] romanb has joined the channel [11:35] jeremyselier has joined the channel [11:36] zed0 has joined the channel [11:37] sveisvei has joined the channel [11:37] remysharp has joined the channel [11:38] mrb has joined the channel [11:40] _baton_ has joined the channel [11:42] pusewicz_ has joined the channel [11:42] xajler has joined the channel [11:43] hipsters_ has joined the channel [11:44] metadaddy has joined the channel [11:44] superjudge has joined the channel [11:44] owenb has joined the channel [11:45] blissdev has joined the channel [11:45] lmatteis has joined the channel [11:45] mattly has joined the channel [11:46] churp has joined the channel [11:46] mrb: Just installed v0.6.6 on CentOS 6 and now attempting to install Socket.IO via NPM, but am getting "sudo: npm: command not found" for "sudo npm install socket.io". If I try "sudo /usr/local/bin/npm install socket.io", I get "/usr/bin/env: node: No such file or directory". I understand (I think) from https://github.com/isaacs/npm/issues/802 that this is because the node executable is not in root's path, but... 1) did I install incorrectl [11:46] flat has joined the channel [11:47] xajler has joined the channel [11:48] xajler has joined the channel [11:50] satyr has joined the channel [11:51] raincole has joined the channel [11:53] alessioalex has joined the channel [11:53] tanepiper has joined the channel [11:54] BruNeX has joined the channel [11:57] herbySk has joined the channel [12:00] romanb_ has joined the channel [12:01] mrb has left the channel [12:01] Nomon__ has joined the channel [12:04] srid has joined the channel [12:04] srid has joined the channel [12:04] srid has joined the channel [12:04] tomh has joined the channel [12:04] olegp has joined the channel [12:05] romanb__ has joined the channel [12:07] sharatmr has joined the channel [12:12] TheJH has joined the channel [12:15] pksunkara_ has joined the channel [12:16] iRoj has joined the channel [12:17] romanb__ has joined the channel [12:19] sechrist_ has joined the channel [12:19] BrianE has joined the channel [12:21] zed0 has joined the channel [12:26] _th_n has joined the channel [12:26] calliostro has joined the channel [12:26] mc_greeny has joined the channel [12:27] N0va` has joined the channel [12:31] AndreasMadsen has joined the channel [12:36] saesh has joined the channel [12:37] felixge has joined the channel [12:37] felixge has joined the channel [12:39] Fabryz has joined the channel [12:40] sharatmr has left the channel [12:43] cognominal has joined the channel [12:49] shinuza_ has joined the channel [12:53] kristsk has joined the channel [12:56] npa has joined the channel [13:04] braoru has joined the channel [13:05] mc_greeny has joined the channel [13:08] mike5w3c has joined the channel [13:10] kazupon has joined the channel [13:11] AndreasMadsen has joined the channel [13:12] romanb__ has joined the channel [13:13] whitman has joined the channel [13:15] npa has left the channel [13:15] neurodrone has joined the channel [13:18] npa has joined the channel [13:18] metalball2 has joined the channel [13:18] ppcano has joined the channel [13:20] bergie has joined the channel [13:21] bradleymeck has joined the channel [13:22] lmatteis: hello [13:23] lmatteis: how do i avoid restarting my expressjs node webserver everytime i make code changes? [13:25] mmalecki: wtf. [13:26] necromancer has joined the channel [13:26] TheJH: mmalecki, maybe irccloud went down? [13:27] TheJH: no, whowas says something else... [13:27] iaincarsberg has joined the channel [13:27] diogogmt has joined the channel [13:27] TheJH: actually, it seems like it was irccloud :D [13:27] `3rdEden has joined the channel [13:28] svnlto has joined the channel [13:28] TheJH: mmalecki, "/whowas " shows you the hostnames of people who recently quitted, you can see it when you run that command on a few of the people who left [13:28] jetienne_ has joined the channel [13:28] JKarsrud has joined the channel [13:29] matjas has joined the channel [13:29] garann has joined the channel [13:29] pusewicz_ has joined the channel [13:29] jayniz has joined the channel [13:29] jayniz has joined the channel [13:29] jayniz has joined the channel [13:29] beawesomeinstead has joined the channel [13:30] slaskis has joined the channel [13:30] theo has joined the channel [13:30] mmalecki: TheJH: ah, ok. it's funny anyway [13:30] BruNeX has joined the channel [13:30] majek has joined the channel [13:30] tomh has joined the channel [13:30] TheJH: mmalecki, and now they all rejoin again... :D [13:31] rwaldron has joined the channel [13:31] mmalecki: TheJH: I can imagine few irccloud sysadmins/devs shitting their pants right now [13:31] TheJH: mmalecki, so, IRC connections should be in a hook with only as much code as needed, I guess [13:31] N0va` has joined the channel [13:31] TheJH: mmalecki, nah, it happens every week or so, I think [13:31] chunhao_ has joined the channel [13:31] mmalecki: TheJH: I've talked with Marak about it, hook should pool connections [13:32] mmalecki: TheJH: spawning as many hooks as users can be painful [13:32] mmalecki: unless we manage to distribute it across many servers [13:32] TheJH: mmalecki, with "pool connections", you mean one hook that hols all of them, right? [13:32] mmalecki: yeah [13:32] TheJH: mmalecki, because that's what I'd suggest, too [13:32] sriley has joined the channel [13:32] mmalecki: TheJH: ok :). Marak wants to write it, I think [13:32] mmalecki: I'll check with him later today [13:33] TheJH: mmalecki, I remember that we were talking about only 256^2 possible PIDs :D [13:33] mmalecki: TheJH: yeah XD [13:33] theo: anyone have experience with passport-local module? [13:34] subbyyy has joined the channel [13:34] stagas has joined the channel [13:36] tomlion has joined the channel [13:36] alessioalex has joined the channel [13:36] tylergillies has joined the channel [13:37] TheDeveloper has joined the channel [13:37] pksunkara_ has joined the channel [13:39] tomlion_ has joined the channel [13:43] erichynds has joined the channel [13:43] TheJH: mmalecki, lol http://www.vimcleaners.co.uk/ [13:44] Nomon__ has joined the channel [13:44] whitman: Is there a simple way to wrap an asychronous function with another to make it synchronous? I want to provide both foo(callback) and fooSync() functions. [13:45] JasonSmith has joined the channel [13:45] robb1e_ has joined the channel [13:45] metadaddy has joined the channel [13:45] TheJH: whitman, what does the function do that might be done async? filesystem stuff? [13:46] Kunda has joined the channel [13:46] whitman: TheJH, could be, it's basically a storage driver, could be a filesystem or database depending on the driver. [13:46] mmalecki: TheJH: ahahahaha [13:46] churp has joined the channel [13:46] TheJH: whitman, database? as in TCP or as in UNIX socket? [13:46] mmalecki: TheJH: you should totally show this to Avian [13:47] TheJH: mmalecki, what does he use? [13:47] mmalecki: TheJH: vim [13:47] whitman: TheJH, mysql/oracle/postgres or memcache/redis/mongo [13:47] TheJH: whitman, I don't think you can easily do sync TCP in node - yes, possible if you just ignore all the builtin stuff and do the networking stuff in C, but extremely discouraged [13:48] Vespakoen has joined the channel [13:48] bergie has joined the channel [13:48] TheJH: whitman, you could just tell people to use streamlinejs and only provide an async API, much easier [13:49] TheJH: whitman, instead of fooSync(), people would write foo(_), and it would just work magically [13:49] whitman: TheJH, basically I've got this: http://pastebin.com/Pu6wwZVG and I'd like to provide a loadSync(key) [13:50] TheJH: whitman, why not streamline? [13:51] whitman: I've never seen it before, I'll take a look [13:51] romanb__ has joined the channel [13:52] TheJH: whitman, http://sage.github.com/streamlinejs/examples/streamlineMe/streamlineMe.html - paste `var result = load(_); foobar(result)` or so into the left-hand box [13:53] lwille has joined the channel [13:53] jeremyselier has joined the channel [13:54] whitman: Looks straight forward. Thanks. I'm happy with the async method but thought if it was a simple case of wrapping the function to provide a synchronous version then I would. [13:54] mattly has joined the channel [13:54] Magnars has joined the channel [13:54] tiglionabbit has joined the channel [13:56] akter has joined the channel [13:57] robi42 has joined the channel [13:57] dbsps has joined the channel [13:59] bnoordhuis has joined the channel [13:59] dbsps: want to get started. any recommends on best book (Im guessing there aren't many yet?) [14:00] rwaldron has joined the channel [14:01] SubStack: dbsps: if you already know javascript there's not much to learn in core [14:02] dbsps: ah but I dont. Good at HTML and can hack away at others php stuff and started dabbling in python but havent yet gotten to JS much as I love what others can do with it. [14:02] SubStack: I would just browse http://nodejs.org/docs/latest/api/all.html to get started [14:03] dbsps: so should I skip a node book and go straight to a good JS book? [14:03] SubStack: and build some tiny projects [14:03] tanepiper has joined the channel [14:03] blissdev has joined the channel [14:04] lmatteis has joined the channel [14:04] salazr_ has joined the channel [14:04] dscape has joined the channel [14:04] SubStack: javascript isn't very big either if you already know programming [14:04] whoops has joined the channel [14:05] SubStack: dbsps: also ignore crockford when you start learning javascript [14:05] metalball2 has joined the channel [14:06] astropirate: ignore him even after you have "learned" javascript :p [14:06] caycep: wait what? ignore crockford? [14:06] SubStack: yes [14:06] SubStack: astropirate: yes [14:06] SubStack: he is not worth listening to [14:06] dbsps: well then that makes me a happy guy. because when I looked into python for web stuff it was daunting for my final goal which was python for backend + whatever framework + template engine + html + css + js + orm + db [14:07] augustl: why should we ignore Crockford? [14:07] SubStack: has anybody looked at crockford's code? seriously that guy does not know how to program [14:07] dbsps: the idea of small handful of learnables vs large fistful of learnables makes me smile. [14:07] SubStack: he just talks about coding all the time and never builds anything [14:07] augustl: that's common of couches in all areas [14:07] augustl: coaches* [14:08] dr0id has joined the channel [14:08] mmalecki: well, Crockford has few npm modules ;) [14:08] augustl: you folks don't seem to have any actual arguments :P [14:09] mmalecki: http://search.npmjs.org/#/_author/Douglas%20Crockford :D [14:09] mmalecki: all published by SubStack, I think [14:09] astropirate: say what... [14:09] sechrist has joined the channel [14:09] SubStack: augustl: hoisting variables yourself is a really amazingly bad idea that destroys locality and leads to really unreadable, inflexible code [14:09] SubStack: for instance [14:09] SubStack: look at the json2.js source for a great example of how shit that can be [14:10] SubStack: and he modifies globals everywhere [14:10] SubStack: fuck that guy [14:10] josh-k has joined the channel [14:10] augustl: what's the argument there? That you shouldn't use global variables? [14:10] SubStack: he has way the fuck too much reverence from programmers who just take in his asinine suggestions without critical evaluation [14:10] dbsps: haha I've been here for 2 seconds and this is already one of my favorite channels. [14:10] augustl: or shouldn't listen to anyone that uses global variables, or something like that? [14:11] SubStack: needs to be brought down a peg [14:11] SubStack: I seriously want to show up at one of his talks and start heckling [14:11] SubStack: he is doing a disservice to programming [14:11] mmalecki: SubStack: do it! [14:11] astropirate: i don't dislike him, i just disagree with his message [14:11] augustl: your arguments are pretty content-free, seems more like whining to me [14:11] deedubs has joined the channel [14:11] mmalecki: SubStack: and ping me before, I totally want to be there [14:11] augustl: :S [14:12] SubStack: I want to make a troll issue on github now [14:12] astropirate: i'll put it on youtube [14:12] SubStack: https://github.com/douglascrockford/JSON-js [14:12] mmalecki: lol [14:12] caycep: bah what book should i use to learn js then? lol [14:12] caycep: i figure his book was pretty thin [14:12] SubStack: caycep: books are silly when there's so much free content online [14:13] augustl: haha so I thought, you're trolling :P [14:13] Cromulent has joined the channel [14:13] caycep: yeah it was info overload [14:13] SubStack: augustl: I'm serious about how bad crockford's suggestions are [14:13] SubStack: and how stupidly designed json2.js is [14:13] mmalecki: wtf please don't https://github.com/douglascrockford/JSON-js/blob/master/json2.js#L175 [14:13] augustl: SubStack: so your issue is with his use of global variables? [14:13] SubStack: augustl: hoisting [14:14] SubStack: is the biggest offender [14:14] romanb has joined the channel [14:14] mmalecki: this code is very hard to read :/ [14:14] SubStack: yes [14:15] augustl: mmalecki: what's bad in the line you pasted? [14:15] SubStack: because it's way too nested and the effects aren't local at all [14:15] ryanseddon has joined the channel [14:15] daleharvey has joined the channel [14:15] shinuza has joined the channel [14:15] mmalecki: augustl: modyfing built-in prototype [14:15] pity has joined the channel [14:16] romanb_ has joined the channel [14:16] augustl: isn't the JSON code pretty old? [14:16] caycep: oh yeah, he likes to modify prototype [14:17] caycep: <— /facepalm by javascript noob [14:17] caycep: this is not like perl at all! [14:17] romanb__ has joined the channel [14:18] augustl: caycep: I think JavaScript: the good parts is a great book [14:18] augustl: caycep: test driven JavaScript development is also very solid [14:19] mmalecki: I'm starting to like node-tap [14:19] k1ttty has joined the channel [14:20] mmalecki: (as vows maintainer, I probably shouldn't XD ) [14:20] TheJH: mmalecki, it's gonna be so cool when npm uses it :) [14:20] SubStack: caycep: hoisting in javascript is like when somebody puts 50 "my" declarations at the top of a perl script [14:20] bergie has joined the channel [14:20] TheJH: actually, I'm wondering whether npm could use travis... [14:20] mmalecki: TheJH: it does [14:20] deedubs has joined the channel [14:21] mmalecki: TheJH: http://travis-ci.org/#!/isaacs/npm [14:21] TheJH: mmalecki, no, not for development of npm itself. for showing module build status in the module view [14:21] TheJH: mmalecki, in the registry [14:21] mmalecki: hah, probably! [14:21] TheJH: mmalecki, test on publish :) [14:22] SubStack: augustl: here's another great example https://github.com/douglascrockford/JSON-js/blob/master/json2.js#L233-239 [14:22] TheJH: SubStack, lol, that looks like the stuff coffeescript produces :D [14:22] romanb_ has joined the channel [14:23] TheJH: SubStack, maybe he secretly uses coffeescript? :D [14:23] mmalecki: oh my... [14:23] mmalecki: that'd be awful [14:24] mmalecki: well, if someone would check such code in my repo, I'd probably rebase shit out of this [14:24] SubStack: how is this clown taken seriously I mean really [14:24] Vespakoen: Hey guys [14:24] SubStack: anyways [14:24] augustl: SubStack: mm I hate that stuff [14:24] SubStack: I wouldn't even care except that so many people put crockford on a pedestal [14:24] augustl: SubStack: you're overreacting I think [14:25] augustl: he does a lot of great stuff [14:25] SubStack: augustl: such as? [14:25] SubStack: he has 6 github repos [14:25] augustl: the books, the talks [14:25] augustl: his work at Yahoo [14:25] shiawuen has joined the channel [14:25] augustl: his promotion of JavaScript as a "valid" language [14:25] SubStack: the books and talks and work at yahoo are all about the same thing [14:25] SubStack: his pet suggestions and style tips [14:25] SubStack: some of which is really bad advice [14:26] SubStack: and his evangelism for stupid ideas makes people who don't know any better write stuff the stupid way [14:26] ralph has joined the channel [14:26] SubStack: So fuck that guy. [14:26] Fabryz has joined the channel [14:26] justicefries has joined the channel [14:27] webben: His work on EcmaScript... [14:27] ncb000gt has joined the channel [14:27] sveisvei has joined the channel [14:27] augustl: he's not a hipster though [14:27] webben: "some of which is really bad advice" ... well, according to you anyhow [14:27] SubStack: ecmascript is full of people who argue all the time and never build anything [14:27] augustl: I'll give you that ;) [14:27] SubStack: see also: commonjs [14:27] SubStack: webben: according to https://github.com/douglascrockford/JSON-js/blob/master/json2.js#L233-239 [14:28] webben: SubStack: Well that's not the case. They did produce a new spec. Platforms are implementing that spec. [14:28] niftylettuce has joined the channel [14:28] SubStack: webben: fuck waterfall [14:28] augustl: SubStack: you want a hug? :) [14:29] augustl: I can listen to you complaining too if that helps [14:29] webben: SubStack: "waterfall" is gradually delivering you new features in the language you're using. [14:29] SubStack: webben: really bad features that haven't been tested [14:29] SubStack: in real-world use [14:29] webben: SubStack: What really bad features? [14:29] SubStack: webben: it's more like dictate by administrative fiat than "delivering" [14:30] SubStack: webben: with [14:30] mmalecki: SubStack: "mind = gap", btw. [14:30] webben: SubStack: iirc most of the features get prototyped in Spidermonkey etc [14:30] mmalecki: I think it's a slight suggestion about his mental state ;) [14:30] webben: SubStack: "by administrative fiat" ... i.e. by agreement between the major engine vendors. [14:31] webben: well, the major engine vendors plus IBM [14:31] SubStack: mmalecki: I'm angry because I typed "learn javascript" into a search engine and got pages and pages of people recommending crockford [14:31] webben: Never quite sure why IBM has jack to do with it. [14:31] TheJH: SubStack, huh? Are you suggesting "with" is a recent addition or what? [14:31] SubStack: webben: agreement is a really bad way to design software [14:31] webben: SubStack: "with" is an early feature, not produced by the ES committee Crockford worked on. [14:31] SubStack: I can't believe I even have to argue that. [14:32] SubStack: webben: well for another example check out the new modules specification [14:32] webben: SubStack: It depends what you're trying to do. [14:32] SubStack: it's so bad [14:32] Phaaze has joined the channel [14:32] webben: SubStack: If you're trying to design a language controlled by a single vendor from scratch, design by committee is a bad idea. [14:33] webben: SubStack: If you're trying to modify a language in a safe, compatible way shared between hostile organisations, some level of consensus is required. [14:33] josh-k has joined the channel [14:33] webben: Otherwise your design won't be implemented, and software built to the design will not be portable. [14:34] webben: SubStack: I don't think just saying things are "bad" is a particularly helpful analysis. [14:35] chjj: design-by-ecma is always a bad idea i think [14:35] SubStack: webben: in that case standards bodies should just be picking winners, not inventing new pieces [14:36] SubStack: like they always fucking do [14:36] romanb_ has joined the channel [14:36] chjj: i dont even know what this discussion is about, i just wanted to throw a jab at ecma [14:37] webben: SubStack: I think design does benefit from discussion with other implementors. [14:37] romanb__ has joined the channel [14:37] webben: SubStack: It's useful to know if someone is not going to implement your design, and why. [14:38] webben: SubStack: In the case of the web platform, just adding features without any consultation is dangerous. [14:38] webben: There's a good chance that everyone will end up being forced to support it no matter how bad it is. [14:38] SubStack: webben: adding features is dangerous [14:38] SubStack: full stop [14:38] webben: The overall cost in terms of dev time wasted is substantial. [14:38] SubStack: don't do it [14:39] SubStack: unless you really need to [14:39] webben: SubStack: Well yes. [14:39] SubStack: develop new features in userspace [14:39] jyp has joined the channel [14:39] bradwright has joined the channel [14:39] Raynos has joined the channel [14:40] webben: SubStack: A lot of EcmaScript features were developed in userspace IIRC. [14:40] romanb has joined the channel [14:40] webben: e.g. Crockford (maybe others, idk) were prototyping object.create long before it got released in ES5. [14:41] webben: Obviously CoffeeScript is acting as a sort of innovation house for ES atm. [14:41] azend has joined the channel [14:42] mmalecki: "2 files changed, 5 insertions(+), 381 deletions(-)" feels good man [14:42] romanb_ has joined the channel [14:42] mmalecki: especially good if when it makes node-http-proxy work on 0.6 [14:42] mmalecki: which it does [14:42] mmalecki: I guess I should go and get drunk now [14:42] buttface has joined the channel [14:43] josh-k has joined the channel [14:44] romanb__ has joined the channel [14:45] deedubs has joined the channel [14:46] __tosh has joined the channel [14:47] romanb_ has joined the channel [14:47] indutny_ has joined the channel [14:47] flip_digits has joined the channel [14:49] AndreasMadsen has joined the channel [14:49] agnat has joined the channel [14:50] fairwinds has joined the channel [14:50] indutny_ has joined the channel [14:50] Phaaze has joined the channel [14:52] _th_n has joined the channel [14:52] Xiphias3 has joined the channel [14:53] romanb__ has joined the channel [14:54] dodo_ has joined the channel [14:54] tomlion has joined the channel [14:54] Vespakoen has joined the channel [14:54] esmevane has joined the channel [14:55] neurodrone has joined the channel [14:56] Vespakoen has left the channel [14:57] benlyn has joined the channel [14:57] indutny has joined the channel [14:57] caycep: sigh [14:57] zed0 has joined the channel [14:58] caycep: back in the day all i needed to know was html, perl/php and some css…now node, django, sproutcore or whatever it is now, lisp, clojure, express, lol. [14:58] mmalecki: einaros: pull requested that stuff [14:58] caycep: ok this prob means time to sleep... [14:58] caycep: sorry to gripe [14:58] einaros: mmalecki: got it, will merge shortly [14:58] mmalecki: einaros: thanks :) [14:59] mmalecki: einaros: btw, I can't see any performance difference between proxying using your ws module and sockets [14:59] mmalecki: einaros: or rather, http module and sockets [15:00] romanb has joined the channel [15:01] einaros: what did you expect to see? [15:01] romanb has joined the channel [15:02] mmalecki: einaros: dunno, I thought it's going to be a bit slower [15:02] mmalecki: einaros: so it's all cool :) [15:02] enmand has joined the channel [15:03] einaros: just piping the data should really be faster, but the bottleneck is possibly elsewhere [15:03] CIA-109: node: 03Felix Geisendörfer 07v0.6 * rec51bfc 10/ test/simple/test-net-server-listen-remove-callback.js : Use common.PORT to avoid conflicts - http://git.io/s59pWQ [15:03] mmalecki: einaros: we didn't pipe the data for some reason I don't recall [15:03] mmalecki: einaros: it was rather pipe rewrite [15:04] willwhite has joined the channel [15:04] einaros: aha [15:04] mmalecki: einaros: dat piece of code https://github.com/nodejitsu/node-http-proxy/blob/master/lib/node-http-proxy/http-proxy.js#L387-769 [15:04] romanb_ has joined the channel [15:05] yogurt_truck has joined the channel [15:06] romanb__ has joined the channel [15:07] einaros: roundtripping (client->server->client) 50MB of binary data, in fragments of 128kB, now takes around 900ms, I'm pretty pleased with that [15:08] einaros: rather than spending more time with perf, I'll see what (if anything) needs be done with memory usage [15:08] mmalecki: einaros: that's a win! I'll definitely run more benchmark on that [15:08] shinuza has joined the channel [15:10] Sorella has joined the channel [15:10] romanb has joined the channel [15:11] einaros: https://gist.github.com/b9d12b3e5d27ec5f5c2d [15:11] einaros: a few bench files [15:11] mmalecki: einaros: <3 <3 <3 [15:11] mmalecki: einaros: I'll come back with new and old results :) [15:12] arturadib has joined the channel [15:14] Metal3d has joined the channel [15:14] Xiphias3_ has joined the channel [15:16] arturadib: bnoordhuis: happen to know how to currently build an addon on Windows? or an example of an addon that has a working build system on Windows? [15:16] Cromulent has joined the channel [15:17] MerlinDMC has joined the channel [15:17] Vennril has joined the channel [15:19] kristsk has joined the channel [15:20] bnoordhuis: arturadib: https://groups.google.com/group/nodejs/browse_thread/thread/70bd5d13e58f34d4 <- it came up on the ML a few days ago [15:21] arturadib: bnoordhuis: great thanks! [15:23] arturadib: oh cool, that's the same one I had just cross-linked to ry's issue (https://github.com/joyent/node/issues/2136). I guess I was following a promising lead :) [15:25] luxigo has joined the channel [15:27] agrohe21 has left the channel [15:28] arcanis has joined the channel [15:28] zed0 has joined the channel [15:28] mattgifford has joined the channel [15:29] gavin_huang has joined the channel [15:29] acuster has joined the channel [15:30] srijan4 has joined the channel [15:30] k1ttty has joined the channel [15:30] gavin_huang has joined the channel [15:30] SamuraiJack has joined the channel [15:31] amigojapan has joined the channel [15:33] saesh has joined the channel [15:35] zed0 has joined the channel [15:36] cjm has joined the channel [15:38] arturadib: bnoordhuis: another quickie: is there a ML thread or Github issue discussing the rationale for migrating to gyp? is it because v8 now uses it? [15:39] gflarity has joined the channel [15:39] carlocci has joined the channel [15:41] jetienne_ has joined the channel [15:41] GrizzLyCRO has joined the channel [15:41] astropirate: Who wants to make a kickass game with me? [15:42] EvRide has joined the channel [15:42] bnoordhuis: arturadib: rationale? no, but it's because waf is all kinds of awful [15:43] mmalecki: all build systems are awful :( [15:43] Poetro has joined the channel [15:44] Ownatik has joined the channel [15:46] kazim has joined the channel [15:47] Renegade001 has joined the channel [15:47] CarterL has joined the channel [15:49] medikoo has joined the channel [15:50] carlocci: Hi, I need to process a lot of files. The problem is that the for loop processing them is setting to many callbacks and node just errors after a while. I tried looping at the hand of the "parseTheFileData" handler but it exceeds the maximum call stack. Finally I setTimeout the call to the next handler and it runs out of memory. [15:51] mmalecki: carlocci: graceful-fs or use a mutex [15:51] mmalecki: !npm info graceful-fs [15:51] medikoo: /msg NickServ identify [15:51] kazim: Hi [15:51] mmalecki: TheJH: yo! [15:52] carlocci: thank you, that's what I was about to ask [15:52] mmalecki: TheJH: your bot doesn't work! [15:52] CIA-109: libuv: 03Ben Noordhuis 07v0.6 * re9235a3 10/ src/unix/dl.c : unix: the dl functions don't set errno - http://git.io/-rQAwQ [15:52] Edy has joined the channel [15:52] medikoo has joined the channel [15:53] maushu has joined the channel [15:53] CIA-109: libuv: 03Ben Noordhuis 07v0.6 * rfeb267e 10/ (include/uv.h src/unix/dl.c): [15:53] CIA-109: libuv: unix: it's legal for dlsym() to return NULL [15:53] CIA-109: libuv: A symbol name can map to NULL. Check dlerror() to see if a real error happened. - http://git.io/psvq-Q [15:53] medikoo has left the channel [15:53] medikoo has joined the channel [15:54] medikoo has joined the channel [15:54] kazim: I have a question but I couldn't nothing from my googlings. I want to make a multi channel chat platform like this website. Can anybody help me about that? You can give a link or advise something. THANKS [15:55] astropirate: kazim, lookup nowjs [15:56] kazim: ok I will [15:56] astropirate: kazim, and this isn't a website. Its IRC [15:56] medikoo has joined the channel [15:56] EuroNerd has joined the channel [15:56] kazim: thanks astropirate [15:57] kazim: and medikoo, what do you mean? [15:57] medikoo has joined the channel [15:58] kazim: does freenode.net use IRC? [15:58] medikoo has joined the channel [15:58] astropirate: freenode is an irc server [15:59] astropirate: hmm server's not the right word [15:59] pickels has joined the channel [15:59] Charuru has joined the channel [16:00] kazim: Sorry for my annoying questions :) [16:00] kazim: can websocket use IRC? [16:00] Renegade001 has joined the channel [16:00] medikoo has left the channel [16:01] astropirate: kazim, IRC stands for Internet Relay Chat the IRC specifications aside, as long as you have a central server and many clients talking through it [16:01] astropirate: you got yourself "IRC" [16:01] astropirate: nowjs is the best option in my opinion [16:01] astropirate: for something like th is [16:02] arturadib has left the channel [16:02] herbySk has joined the channel [16:02] codygray has joined the channel [16:02] medikoo has joined the channel [16:03] kazim: ok thank you. firstly I have to understand what IRC is [16:03] kazim: I'm looking nowjs now [16:04] brianseeders has joined the channel [16:04] bembi has joined the channel [16:05] hij1nx has joined the channel [16:05] Poetro has joined the channel [16:05] Brandon_R has joined the channel [16:06] bembi has left the channel [16:07] Brandon_R: hey guys [16:08] webben: astropirate: Freenode is a network of servers. [16:08] tmedema has joined the channel [16:08] tmedema: Is there a stable and recent module that makes fs.watch recursive? [16:08] tmedema: I've tried 2 and both of them failed to run properly on windows 7, node 0.6.6. [16:08] tomlion has joined the channel [16:09] npa has joined the channel [16:10] astropirate: webben, ye syes network :p thats the word i was failing to conjour up [16:12] cjroebuck has joined the channel [16:21] level09 has joined the channel [16:22] crassus has joined the channel [16:23] calliost` has joined the channel [16:25] boltR has joined the channel [16:25] mehlah has joined the channel [16:26] tomlion has joined the channel [16:28] brainss has joined the channel [16:29] mbrevoort has joined the channel [16:29] srijan4 has joined the channel [16:31] Destos has joined the channel [16:33] crassus has left the channel [16:33] cody-- has joined the channel [16:34] _unary has joined the channel [16:37] llrcombs has joined the channel [16:37] Poetro has joined the channel [16:41] carlocci: mmalecki: thank you. [16:41] mmalecki: carlocci: :) [16:43] gregmoreno has joined the channel [16:45] bacon000 has joined the channel [16:47] boehm has joined the channel [16:49] apoc has joined the channel [16:50] jakehow has joined the channel [16:50] dinesh_ has joined the channel [16:51] lmatteis: hello. i'm abstracting something and i want to make a node api out of it [16:51] lmatteis: should i make it its own folder in my project? [16:51] redir_ has joined the channel [16:51] lmatteis: or should i put it inside node_modules?/ [16:52] MatthewS has joined the channel [16:53] devongovett has joined the channel [16:53] SubStack: lmatteis: is it general-purpose enough that other people could make use of it? [16:54] Brandon_R: 4 score and 7 years ago [16:54] flat has joined the channel [16:54] Brandon_R: what colege did ryan dhal go to? [16:54] Brandon_R: i was watching his interview said he was doing a phd in mathematics [16:55] Brandon_R: and he just go up and thought wtf am i doing here [16:56] Brandon_R: ryah [16:58] lmatteis: SubStack: yes [16:58] Renegade001 has joined the channel [16:58] arcanis has joined the channel [17:01] mattgifford has joined the channel [17:02] SubStack: lmatteis: publish it to npm! [17:02] SubStack: lmatteis: in which case it should have its own project directory with a package.json [17:02] lmatteis: alright [17:02] SubStack: then just type `npm publish` when it's ready [17:02] lmatteis: but before i publish it [17:03] lmatteis: you test by manually creating a folder inside node_modules? [17:03] shinuza has joined the channel [17:03] dodo_: npm link might comin handy for that [17:04] SubStack: lmatteis: you should test by writing unit tests [17:04] lmatteis: yes indeed [17:04] lmatteis: but what i mean is [17:04] lmatteis: where do i put this! [17:05] postwait has joined the channel [17:05] SubStack: lmatteis: in its own project directory if you plan on publishing to npm [17:05] SubStack: and throw it up on github too if you use git [17:06] Renegade001 has joined the channel [17:06] htoothrot has joined the channel [17:07] avih has joined the channel [17:07] lmatteis: SubStack: ok so i create a folder like ~/node-trello/ [17:07] lmatteis: where all my code is for this library [17:07] SubStack: sure that works [17:07] lmatteis: and then in there i do `npm link node-trello` [17:07] lmatteis: and it creates a symlink in my node_modules? [17:07] lmatteis: or what [17:07] SubStack: what I usually do [17:08] SubStack: is I cd ~/projects/node-beep-boop; npm publish [17:08] SubStack: then in ~/projects/someapp I update the package.json dependencies field to include beep-boop [17:08] SubStack: and npm install . in ~/projects/someapp [17:08] slaskis has joined the channel [17:09] lmatteis: but if you're working on beep-boop constantly you have to publish each time [17:09] lmatteis: i am developing it [17:09] SubStack: only to check against someapp [17:09] dodo_: lmatteis: then you acn use npm link ~/beep-boop in ~/projects/someapp [17:09] lmatteis: and where do you write your tests for it? [17:09] SubStack: really your unit tests in node-beep-boop should be catching those issues, not someapp [17:09] lmatteis: dodo_: ah cool [17:10] SubStack: I don't like using links very often [17:10] lmatteis: SubStack: true [17:10] lmatteis: so wher do you test it? and how... like which module for tdd [17:10] SubStack: lmatteis: there are lots of modules, just check out some popular projects and look at how they do it [17:11] jocafa has joined the channel [17:11] SubStack: lmatteis: in particular you can add scripts.test to your package.json [17:11] SubStack: here's a simple test using tap in dnode: https://github.com/substack/dnode/blob/master/test/refs.js [17:11] lmatteis: because most of my API is actually brought to life from my project code... i can't come up with api calls *only* inside tests.. i need the context of my app [17:11] avih has joined the channel [17:12] SubStack: refactor the api to be more test-friendly [17:12] SubStack: lmatteis: if that is the case then your module is probably too tied to your app [17:12] SubStack: and should be refactored [17:12] aioue_ has joined the channel [17:13] lmatteis: no no [17:13] lmatteis: not tied at all [17:13] lmatteis: that's not what i mean [17:13] cypherblue has joined the channel [17:13] dodo_: it should be generic, so others can reuse your code [17:13] lmatteis: what i mean is that i can't just make up calls because i can figure out what sort of methods this api should have just from scratch [17:13] thalll has joined the channel [17:13] lmatteis: i need the context to make me wanna do "get_x" or something [17:13] SubStack: not sure what you're getting at [17:14] SubStack: make up calls? [17:14] lmatteis: well, say you're writing a small wrapper for some web service [17:14] romanb has joined the channel [17:14] dodo_: lmatteis: try writing examples. it's good start to test your code without actually writing tests (later its easier to extract tests out of it) [17:14] lmatteis: you know that you should have calls like get_board or get_card [17:15] lmatteis: but you're not for sure until you actually use it in a real life app [17:15] lmatteis: dodo_: nah i do tdd [17:15] devongovett_ has joined the channel [17:15] SubStack: I second dodo_'s recommendation [17:15] SubStack: lmatteis: tdd kind of sucks [17:15] Renegade001 has joined the channel [17:16] SubStack: especially if it's keeping you from writing tests [17:16] SubStack: paradoxically [17:16] dodo_: i disagree, writing examples is tdd. [17:16] dodo_: first you write the examples and then you write the code, that makes the exmaples work [17:16] lmatteis: right [17:16] Cromulent has joined the channel [17:16] SubStack: dodo_: tdd means different things to different people [17:17] dodo_: SubStack: true :D [17:17] SubStack: I don't like it when people are dogmatic about it [17:17] lmatteis: can i not use any testing framework :) [17:17] SubStack: lmatteis: yep, sure can [17:17] SubStack: just use the assert module [17:17] SubStack: or I like tap because it's basically just a thin wrapper around the assert module [17:18] SubStack: dodo_: I don't like it when people always write tests before they write any code [17:18] SubStack: that doesn't work very well for iterating on an api [17:18] SubStack: starting from scratch [17:19] SubStack: and that is pretty much what tdd is all about [17:19] SubStack: just write tests early in the development process and before you publish [17:19] AndreasMadsen: It it intended that process.platform is 'mac' and not 'darwin' [17:19] insin: I prefer to write sample code with an API which doesn't exist yet rather than writing tests for one - too much detail too quickly [17:19] systemfault: Then there's a good chance that your code isn't properly testable. [17:20] AndreasMadsen: In node v0.7-pre [17:20] systemfault: TDD usually forces you to writable testable code. [17:20] SubStack: insin: I like that approach too sometimes [17:20] kilnaar has joined the channel [17:20] SubStack: systemfault: maybe if you're not used to writing testable code [17:20] systemfault: Right... [17:20] MrMaksimize has joined the channel [17:21] systemfault: I see tons of people saying that.. they all write difficult to test/untestable code. [17:21] MatthewS has joined the channel [17:21] enmand has joined the channel [17:22] SubStack: systemfault: I am a big advocate of tests but I am not an advocate of TDD because TDD is about being uncompromising in always writing tests before code [17:23] SubStack: TDD works pretty well later in the project once you've figured out the initial api [17:23] SubStack: but isn't very good at the beginning when you're just experimenting [17:23] insin: That stage where you know roughly what your inputs will be, but are still figuring out the most suitable API and have no concrete ideas about output yet [17:24] ntr0py has joined the channel [17:24] dgathright has joined the channel [17:24] SubStack: insin: exactly that stage [17:25] mmalecki: insin++ [17:25] ntr0py: Is there an async native postgres driver with unix domain socket support? [17:26] insin: I was on a TDD course year ago at work and the example we worked with was something to calculate bowling scores - I'm usually working with bowling balls and pins figuring out where they should go, how they should interact and what the rules should be, not off a specification :) [17:26] insin: s/year/years/ [17:26] markwubben has joined the channel [17:27] systemfault: insin: I've seen that example too [17:27] systemfault: (It's a classic.. ) [17:28] petrjanda has joined the channel [17:28] systemfault: 1) The guy tries to create some uml demonstrating possible classes interactions for the bowling game... Then he writes it using TDD and the result has nothing to do with the original design (Just 2-3 loops) [17:29] insin: heh [17:29] charlenopires has joined the channel [17:30] eastv: can node replace ngninx? [17:31] eastv: ? [17:31] systemfault: I'd say that they're two totally different things.. with the only thing in common being their asynchronous nature.. [17:31] xevioso has joined the channel [17:31] eastv: how so? can't you use express to create exactly the same thing as what nginx does? [17:32] systemfault: Try to write an web application in nginx. [17:33] dodo_: eastv: i wouldnt use express for that .. but node-http-proxy looks more suitable for that [17:33] systemfault: nginx is just a http reverse-proxy... that [17:33] systemfault: 's it [17:34] booyaa: we should have a counter to count how many times nginx comes up [17:34] eastv: what does node-http-proxy do exactly? [17:35] spathi has joined the channel [17:35] booyaa: makes cute babies [17:35] eastv: yea i bet [17:35] booyaa: totes [17:35] dodo_: look for yourself: https://github.com/nodejitsu/node-http-proxy [17:35] avih has joined the channel [17:35] enmand has joined the channel [17:36] eastv: so it basically takes the place of nginx in node [17:36] eastv: without having to use express if only doing the basic stuff [17:36] dodo_: in fact it's better, because it can proxy websockets too [17:37] Me1000 has joined the channel [17:39] `3rdEden has joined the channel [17:40] lmatteis: so waiut [17:40] lmatteis: how do i export stuff [17:40] lmatteis: export.foo = "" [17:40] lmatteis: or module.export ? [17:40] xcv has joined the channel [17:40] tuhoojabotti: exports.lol [17:41] tuhoojabotti: in latest [17:41] avih has joined the channel [17:41] tuhoojabotti: exports = module.exports = x; [17:42] tuhoojabotti: for backward compabitility [17:42] __tosh has joined the channel [17:43] _dc has joined the channel [17:43] polotek has joined the channel [17:45] christoffe has joined the channel [17:45] ciss has joined the channel [17:46] lmatteis: tuhoojabotti: this is a bit weird [17:46] tuhoojabotti: It's in socket.io [17:46] jlaire has joined the channel [17:46] tuhoojabotti: https://github.com/LearnBoost/socket.io/blob/master/lib/socket.js#L20 [17:46] lmatteis: how do i do it so that i do var o = require('o'); o.someMethod()? [17:47] cognominal has joined the channel [17:47] tuhoojabotti: I just do exports.method = method; [17:47] wiwillia has joined the channel [17:47] ciss: hi, i've installed node.js on osx 10.6 using the install package, requiring admin permissions. not surprisingly, when trying to install a module globally npm complains about /usr/lib/node_modules not being writable. what is the preferred way of handling this? make the directory writable? change the destination? [17:47] tuhoojabotti: then require('./module').method; [17:48] tuhoojabotti: ciss: global install requires admin afaik. [17:48] SubStack: lmatteis: if your module only has 1 export assign module.exports [17:48] SubStack: modules that only have one export as a function also rock [17:49] sechrist has joined the channel [17:49] avih has joined the channel [17:49] lmatteis: i have different api calls... like i want to be able to do o.someOtherMethod() etc... so i have to do export.methodOne = .. export.methodTwo = .. etc? [17:49] tuhoojabotti: SubStack: That explains alot [17:49] ciss: tuhoojabotti: i'm aware, but i've also read that installing modules with admin permissions is not recommended. does npm simply download the module files, or are any further scripts being executed that might pose a risk? [17:50] Bonuspunk has joined the channel [17:50] SubStack: tuhoojabotti: it's a sign that your module isn't trying to do too many things [17:50] tuhoojabotti: ciss: Then why did you install node with admin rights? :D [17:50] tuhoojabotti: SubStack: what? [17:50] mattgifford has joined the channel [17:50] tuhoojabotti: My modules do only one thing [17:50] tuhoojabotti: but I didn't know about that :D [17:50] jocafa has joined the channel [17:51] EuroNerd has joined the channel [17:51] polotek: ciss: if you install from a package manager and it installs to /usr/lib or /usr/bin or whatever then you will need admin privileges [17:51] polotek: if you can configure your install to go to /usr/local this is a better idea [17:51] tuhoojabotti: yeah [17:51] pronam has joined the channel [17:51] SubStack: lmatteis: just don't declare state at the module scope of the program [17:51] polotek: on OS X it is perfectly reasonable to reset /usr/local permissions so you don't need sudo [17:51] __tosh has joined the channel [17:52] lmatteis: SubStack: what do you mean by that? [17:52] tuhoojabotti: I was going to ask the same :D [17:52] eastv has joined the channel [17:53] gflarity: ciss: installying node with admin is fine, but modules should generally be installed locally not globally unless you really know what your doing/understand the issues risks [17:53] polotek: tuhoojabotti: if you setting state variables in your module and then your exported functions are accessing those via closure, that is module scoped state [17:54] tuhoojabotti: Hmm [17:54] polotek: you can see how this hurts your ability to have objects that are totally independent [17:54] lmatteis: SubStack: in your dnode you do exports = module.exports = dnode; [17:54] tuhoojabotti: I think I got it [17:54] lmatteis: above, before dnode is even defined :| [17:55] polotek: every object you create will depend on that same module state [17:55] defunctzombie has joined the channel [17:55] defunctzombie: polotek: ping, this is shtylman [17:55] ciss: tuhoojabotti: because the install package requires you to do so [17:55] ciss: gflarity: that's something i can work with :) [17:56] polotek: defunctzombie: nice handle :) [17:56] ciss: polotek: do you happen to know where these settings can be configured on the osx package installation? [17:57] tuhoojabotti: Hmm [17:57] defunctzombie: thanks :) [17:57] polotek: ciss: nope, sorry. I pretty much always install from source [17:57] tuhoojabotti: I don't think I'm following the conversation anymore [17:58] avih has joined the channel [17:58] SubStack: lmatteis: function definitions aren't linear [17:58] lmatteis: OK [17:58] polotek: defunctzombie: so can you tell me what you're using libxmljs for? it's awesome that you've done so much work [17:58] polotek: I tried to get collaborators at one point in the past. nobody wanted to touch it [17:58] polotek: only complain :) [17:58] defunctzombie: haha [17:58] defunctzombie: I started using it for courseoff.com [17:59] defunctzombie: I use it to scrape html pages [17:59] SubStack: polotek: there was an article in the past few days about module state but I can't find it [17:59] defunctzombie: for information [17:59] `3rdEden has joined the channel [17:59] defunctzombie: it is much faster than anything that is pure js [17:59] tuhoojabotti: SubStack: That's internet for you. [17:59] defunctzombie: and handles broken ass html [17:59] defunctzombie: which I had to support [18:00] defunctzombie: so when I started using libxmljs I was pleased. The 0.6 fixes were simple [18:00] polotek: defunctzombie: cool. I know it libxml2 has a pretty good html parser. but didn't know anybody using it for that. [18:00] tuhoojabotti: defunctzombie: So you didn't use regexp? [18:00] tuhoojabotti: ":D" [18:00] defunctzombie: :p [18:00] defunctzombie: no [18:00] adrianmg has joined the channel [18:00] polotek: defunctzombie: yeah I pulled most of them [18:00] polotek: it works fine now on 0.6 [18:00] defunctzombie: so yea, after looking at it for a bit, I wanted to try out some c++ ideas for modules [18:01] defunctzombie: and so I started reworking some of the internals [18:01] polotek: I just didn't understand it enough and didn't have time to look into it [18:01] defunctzombie: cleaning up old code [18:01] defunctzombie: and trying to remove code [18:01] adrianmg has left the channel [18:01] defunctzombie: I basically used it to hone my c++ node.js module skills some more [18:01] polotek: defunctzombie: have you been running the tests? I know they're pretty sucky and could be better [18:01] defunctzombie: I also found the existing api harder to use [18:01] polotek: but they're not bad [18:01] __tosh has joined the channel [18:01] defunctzombie: so I started making updates for that [18:01] defunctzombie: yea [18:01] defunctzombie: I moved all the tests over to nodeunit [18:01] avih has joined the channel [18:02] defunctzombie: cause I didn't like 'spec tacular' or whatever [18:02] polotek: yeah I was gonna migrate the tests at some point [18:02] acuster has joined the channel [18:02] polotek: okay just for your info, I didn't start the project [18:02] tuhoojabotti: guys, get a room [18:02] defunctzombie: (I am more of a c++ unit testing type of person) so nodeunit is what I like [18:02] tuhoojabotti: :D [18:02] polotek: the first iteration was done by a guy named Jeff Smick that works at twitter [18:02] defunctzombie: tuhoojabotti: no one else is using the channel :p [18:02] polotek: basically it was a similar situation where i started sending him patches [18:02] defunctzombie: gotcha [18:02] tuhoojabotti: defunctzombie: They're too scared to distract you [18:03] polotek: and eventually he was like "I don't have time for this anymore. you take it" [18:03] polotek: it was still in a pretty sorry state at that point. so I worked on it a while [18:03] defunctzombie: yea, I saw it was an older project (which is another reason I wanted to update it) [18:03] polotek: okay cool [18:03] donald_cook has joined the channel [18:03] polotek: so I'm not really using it for anything these days [18:03] defunctzombie: so yea, most of the changes I did kept api compat, mostly removed a lot of dead code [18:03] apoc has joined the channel [18:04] polotek: which is why it's hard to find the motivation to update [18:04] defunctzombie: and tried to clean up the api where I thought appropriate [18:04] defunctzombie: sure [18:04] defunctzombie: I can understand that [18:04] polotek: tuhoojabotti: we're talking about a node module [18:04] polotek: this is the room [18:04] polotek: also this is how irc works [18:05] tuhoojabotti: I'm sorry if you fail to comprehend my stupid jokes. [18:06] defunctzombie: I comprehend :) just not that funny :p [18:06] polotek: tuhoojabotti: ha, okay. work on your delivery :) [18:06] astropirate: tuhoojabotti, i'm sorry for you [18:06] astropirate: jk jk :p [18:06] astropirate: i'ma cyber bully :( [18:06] tuhoojabotti: do an ama on reddit [18:06] defunctzombie: polotek: so the current big api changes: [18:07] defunctzombie: attributes are created on nodes [18:07] ryan_stevens has joined the channel [18:07] defunctzombie: you no longer create an 'attribute' object [18:07] PHPTroll has joined the channel [18:07] polotek: defunctzombie: why do you think that's important? [18:07] defunctzombie: and also, I removed the callback stuff when making new nodes [18:07] defunctzombie: semantics [18:07] defunctzombie: you can't make an attribute without passing in an element object [18:08] defunctzombie: therefore it is kinda useless to have a whole "class" for them when there is just the 'attr' method for shorthand [18:08] nassosdim has joined the channel [18:08] andrewfff has joined the channel [18:08] defunctzombie: basically, I tried to make it so you can't mess up while using the api [18:08] defunctzombie: and that was one way to mess up [18:08] polotek: defunctzombie: the attr method is good for shorthand [18:08] polotek: but you should have a class for every node type [18:08] defunctzombie: by not passing the right thing when making the attribute object [18:08] zemanel has joined the channel [18:09] polotek: you have to do it underneath anyway [18:09] defunctzombie: The class still exists in the backend [18:09] polotek: making it explicit is better for testing no? [18:09] defunctzombie: not really [18:09] avih has joined the channel [18:09] defunctzombie: since you end up making a node to assign the attribute to anyway [18:09] defunctzombie: because you have to [18:09] defunctzombie: (at least that was my understanding) [18:09] deoxxa: ok, ender is amazing [18:10] polotek: defunctzombie: but it's the same argument since you shouldn't have an element node without a document [18:10] polotek: it's a tree [18:10] polotek: and you have to maintain reference integrity [18:10] polotek: you can't escape that [18:10] defunctzombie: correct [18:10] polotek: getting rid of attribute is only partially solving that problem [18:10] defunctzombie: and for document there is the 'node' method [18:10] polotek: so I'd much rather be consistent [18:11] defunctzombie: so you don't actually make elements either [18:11] defunctzombie: correct.. I as well [18:11] defunctzombie: every node I create is created using the 'node' document method [18:11] polotek: but you want to stick to factory methods instead of classes? [18:12] defunctzombie: at first yes, since it prevents errors [18:12] defunctzombie: and is also less typing [18:12] polotek: okay, I buy that [18:12] defunctzombie: no point in doing new Element(document...etc) [18:12] defunctzombie: when you could have just done doc.node(...) [18:12] SubStack: I like it when functions return other functions [18:12] defunctzombie: and have that return the node [18:13] defunctzombie: I mean... I am sure other people have different opinions, but my goal was to prevent errors in api use [18:13] polotek: but I think we should do major changes to the api in a major revision [18:13] eastv has joined the channel [18:13] ppcano has joined the channel [18:13] defunctzombie: so doing new Element(_not_a_document_) is wrong [18:13] defunctzombie: I would agree [18:13] polotek: defunctzombie: yeah and it causes segfaults :) [18:13] defunctzombie: yes [18:13] redir_ has joined the channel [18:13] polotek: but there is also part of the v8 api to help prevent that sort of thing [18:14] defunctzombie: these changes were not really created with the intent of being heavily "versioned" [18:14] defunctzombie: there is indeed [18:14] polotek: in short to ensure that an object is of the correct type [18:14] petrjanda has joined the channel [18:14] polotek: v8::Signature [18:14] ppcano has joined the channel [18:14] polotek: know much about it? [18:14] defunctzombie: the 0.6 changes were very small and those could be pushed out easily [18:14] defunctzombie: as well as the wscript changes [18:14] defunctzombie: not too much [18:14] defunctzombie: but I have heard of it [18:14] polotek: cool [18:14] polotek: yeah okay. have you looked at master? [18:14] defunctzombie: a bit [18:15] polotek: I pulled in several things [18:15] jerrysv has joined the channel [18:15] defunctzombie: I saw some scons updates [18:15] polotek: I haven't pulled in the node-waf port [18:15] defunctzombie: and some other things for arrays [18:15] tomlion has joined the channel [18:15] polotek: I like it. I think it's a good idea [18:15] defunctzombie: oh.. ok.. so some other things from the api changes [18:15] polotek: only node itself is moving away from waf [18:15] defunctzombie: no more parseHtmlFile [18:15] defunctzombie: yea [18:15] defunctzombie: but it is what we should use for now [18:15] defunctzombie: and no more parseXmlFile [18:16] defunctzombie: since you can easily read in a file with node and then use the 'string' methods [18:16] polotek: defunctzombie: I thought you were removing the parser objects [18:16] polotek: not those functions [18:16] defunctzombie: I also removed the parser objects to simplify the code [18:16] polotek: but yeah, that is definitely a change I wanted to make [18:16] ericmuyser has joined the channel [18:16] defunctzombie: but kept those methods for backwards compat [18:16] defunctzombie: and I also removed the callbacks for when you use the 'node' method to create new elements [18:17] defunctzombie: that was more of a style thing [18:17] polotek: yeah no problem with that [18:17] defunctzombie: as the node creation is not async [18:17] polotek: if it's not i/o, no need for callbacks [18:17] defunctzombie: and doesn't need a callback [18:17] defunctzombie: right [18:17] defunctzombie: and the last change, which I have not gotten to, is to cleanup the sax parser a bit [18:17] defunctzombie: someone was confused the other day about what the callback returned and how to hook up their callbacks [18:18] defunctzombie: when making a new push parser [18:18] polotek: defunctzombie: there's a whole wiki page with an example :/ [18:18] defunctzombie: basically, every change I tried to make was either to cleanup old code, or make the api easier to use with less breaking [18:18] polotek: guess it's hard to find [18:18] kwmiebach has joined the channel [18:18] polotek: okay, we're agreed that we need api updates [18:18] ciss has left the channel [18:19] polotek: but I'd like to agree on them [18:19] socketio\test\64 has joined the channel [18:19] polotek: I like the idea of creating a parser object [18:19] polotek: perhaps it can be made easier to use [18:19] defunctzombie: parser object for what? [18:19] polotek: but you should be able to create multiple objects and have multple parse jobs [18:19] defunctzombie: the push parser? [18:19] polotek: for xml or html [18:19] defunctzombie: why bother? [18:19] defunctzombie: it returns a document [18:19] polotek: I would like to support the pipe api [18:20] defunctzombie: are we talking about the push parser? [18:20] defunctzombie: or the parseXmlString? [18:20] defunctzombie: for push parser those are still around as they existed [18:20] polotek: okay, let me take a step back [18:20] defunctzombie: I have no intention of removing that [18:20] polotek: I think have shorthand functions for parseXmlString and parseHtmlString is great for easy use [18:21] polotek: most people end up writing quick scripts to get stuff out of xml or html docs [18:21] polotek: they should take a callback because they read files [18:21] polotek: and probably use fs module and a parser under the hood instead of the libxml2 methods [18:21] polotek: ok cool [18:22] polotek: so then I'm not real clear on your stance on the parser objects [18:22] defunctzombie: for the parser objects [18:23] defunctzombie: I would like to see them take an object [18:23] defunctzombie: which has the callbacks [18:23] defunctzombie: 'onStartElement' .. etc [18:23] defunctzombie: instead of calling a callback function [18:23] defunctzombie: and then you assigning to that [18:23] defunctzombie: that is quite confusing and is orthogonal to taking in a 'config' type object [18:23] defunctzombie: which is what you really wanted to do to setup the parser object [18:24] polotek: ah, okay now I'm getting it [18:24] polotek: you want to update the api for parser objects [18:24] defunctzombie: it would also prevent people from thinking they are supposed to use the parser inside that callback [18:24] caolanm has joined the channel [18:24] defunctzombie: which is what happened the other day [18:24] dharmesh has joined the channel [18:24] polotek: yeah I want to support a config object [18:24] defunctzombie: yep [18:24] avih has joined the channel [18:24] polotek: but it's also important to be able to set the callbacks individually [18:24] defunctzombie: and I have not yet made that change [18:24] defunctzombie: but would like to [18:24] defunctzombie: yes [18:24] defunctzombie: you can still do that [18:24] defunctzombie: on the parser object [18:24] defunctzombie: you store yourself [18:24] TheEmpath has joined the channel [18:24] defunctzombie: after the fact [18:25] defunctzombie: this is just the initial setup [18:25] TheEmpath: Using a mediator pattern for NodeJS to consolidate the API gateway. Makes devs happy. https://gist.github.com/1494089 [18:25] defunctzombie: it would actually happen all in js land [18:25] defunctzombie: we would read their object they pass in [18:25] polotek: one thing we agree on is that there is way more C/C++ code than there needs to be [18:25] defunctzombie: and set the callbacks on the parser object we will return to them [18:25] defunctzombie: correct [18:25] defunctzombie: and I started removing much of it [18:25] dexter_e has joined the channel [18:26] defunctzombie: certainly in the realm of html/xml documents and elements [18:26] defunctzombie: I personally do not use the sax stuff [18:26] defunctzombie: so did not get to that yet [18:26] polotek: okay [18:27] polotek: so here's what I would like to see [18:27] polotek: I want to spin off a branch for these major api changes [18:27] wingie: a good lib like underscore: http://sugarjs.com/ [18:27] adrianmg has joined the channel [18:27] adrianmg has left the channel [18:27] defunctzombie: k [18:27] polotek: and it would be really helpful for me if you could update the docs with your ideas about the api [18:28] defunctzombie: which docs? wiki docs or the repo docs? [18:28] polotek: :) [18:28] defunctzombie: I thought the repo docs were old [18:28] defunctzombie: and the wiki was the way to go [18:28] polotek: so here's what I did with the docs, that was probably not a great idea [18:28] polotek: on github you get a separate repo for your wiki [18:28] polotek: which I think is okay but weird [18:28] TheJH: nice. ruby is pretty elegant. [18:28] polotek: and I wanted to still have docs come with the main repo [18:28] skunkape has joined the channel [18:28] TheJH: I almost feel sorry for http://nodejs-vs-ror.nodejitsu.com/ XD [18:28] sorensen__ has joined the channel [18:28] avih has joined the channel [18:28] TheJH: BURN HIM!!! [18:29] polotek: So I check out the wiki repo and update it [18:29] polotek: then I check that whole thing into the main repo under /docs [18:29] mmalecki: haha [18:29] polotek: the repo docs should be fairly up to date [18:29] defunctzombie: heh [18:29] defunctzombie: gotcha [18:29] defunctzombie: can the wiki repo have a branch? [18:29] defunctzombie: if it can I can just push to that :) [18:30] defunctzombie: with the doc updates [18:30] polotek: defunctzombie: I'm not sure. take a look and do whatever you think works [18:31] maletor has joined the channel [18:31] defunctzombie: k [18:31] patcito has joined the channel [18:31] polotek: also, ncb000gt is a good friend of mine [18:31] polotek: used to work with him [18:31] polotek: made him a committer as well [18:32] polotek: I'll update him on this conversation [18:32] defunctzombie: I am familiar with him and his work with bcrypt nodejs module [18:32] defunctzombie: did some updates for that as well [18:32] defunctzombie: k [18:32] localhost has joined the channel [18:32] avih has joined the channel [18:32] defunctzombie: do you want me to push wscript changes to master first? [18:33] defunctzombie: or to separate branches always? [18:33] defunctzombie: and how do you handle version numbers? or can I leave that to you to increment when you see fit? [18:33] polotek: defunctzombie: what do you think of distributing both waf and scons? [18:33] polotek: until we make a major rev change I don't want to make changes too drastic [18:33] eb4890 has joined the channel [18:33] defunctzombie: personally, I would be against it. every time I have seen two build systems in a tree one of them is always broken [18:33] polotek: defunctzombie: fair enough [18:34] marcello3d has joined the channel [18:34] polotek: I can tell you that the build system is what I get the most bugs about [18:34] polotek: always [18:34] defunctzombie: I would go with waf simply because that is what every other nodejs module is doing [18:34] polotek: and I'm not so good at verifying that it works in different environment [18:34] defunctzombie: and scons is another dependency people need to bring in [18:34] polotek: defunctzombie: yeah I don't disagree [18:34] defunctzombie: I think there is a better chance of it working than scons [18:34] defunctzombie: since so many people already use it [18:34] polotek: but again, that's a major version change [18:34] jlaire has joined the channel [18:34] defunctzombie: sure [18:35] defunctzombie: I don't think most people will mind [18:35] ppcano has joined the channel [18:35] polotek: it's not as simple as that. this is easily one of the most complex builds in a native module [18:35] defunctzombie: (if they are smart they should be pegging versions with npm) [18:35] ppcano has joined the channel [18:35] defunctzombie: is it? I did not find it that complex [18:35] polotek: defunctzombie: you seem to have more experience with C/C++ environments [18:35] polotek: the rest of us are just javascript folks :) [18:36] defunctzombie: I have much experience with them :) [18:36] defunctzombie: haha [18:36] defunctzombie: I come from the c++ background [18:36] defunctzombie: javascript second [18:36] polotek: sweet [18:36] polotek: so glad to have you on [18:36] defunctzombie: also.. I made the build simpler by not using any of the tools [18:36] defunctzombie: that is what made it complex in the first place [18:36] polotek: defunctzombie: sounds good to me [18:36] defunctzombie: if you see, my repo does not have a tools dir [18:36] defunctzombie: because none of that was needed in the end [18:36] defunctzombie: so the final wscript file is very simple [18:37] polotek: okay, I'm convinced [18:37] defunctzombie: heh [18:37] polotek: so what I want to do is provide one more point release on this version [18:37] polotek: 0.4.3 [18:37] defunctzombie: I can just make the wscript updates in a branch [18:37] defunctzombie: k [18:37] polotek: no changes accept 0.6 support and a few fixes [18:37] polotek: that is what's on master right now [18:38] defunctzombie: k [18:38] polotek: you can look and see if anything else should go in there [18:38] polotek: Then we can start 0.5 version [18:38] defunctzombie: if you want to keep it minimal then I would say it looks correct to me [18:38] defunctzombie: k, what do you want in 0.5? [18:39] polotek: we can start major changes with 0.5. I just want it to be a clean break [18:39] polotek: so if people ask I can say just use 0.4.3 if you don't like the new changes [18:39] polotek: so node-waf build script becomes default, remove scons dependency [18:40] defunctzombie: k [18:40] appinsanity-mi-1 has joined the channel [18:40] polotek: I'm on board with moving to function driving api instead of classes [18:40] defunctzombie: k [18:40] polotek: but I would like it to be all at once, instead of piece meal [18:40] polotek: you will find that most of my arguments are about consistency :) [18:40] defunctzombie: makes sense [18:41] defunctzombie: we can start pushing the changes to master, you don't have to publish to npm or increse version until it is all settled [18:41] polotek: right [18:41] polotek: I'm going to push out this 0.4.3 today [18:41] defunctzombie: that is the point of version control :) doesn't have to be the final version to be pushed [18:41] defunctzombie: k [18:42] polotek: I'm totally excited about this project again [18:42] defunctzombie: haha [18:42] defunctzombie: very good [18:42] brimster has joined the channel [18:42] polotek: there are other xml solutions but this one fills a large need [18:42] polotek: it will be good to have it updated for the community [18:43] defunctzombie: yea [18:43] defunctzombie: it was the only one that filled my need [18:43] polotek: excellent [18:43] defunctzombie: everything else was either too slow, too complex or didn't work [18:43] fzzzy has joined the channel [18:43] polotek: or some combination of those :) [18:43] polotek: oh that's another thing [18:44] polotek: I've gotten several requests for benchmarks [18:44] defunctzombie: so once you push out 0.4.3 and the repo is open for 0.5, let me know and I can start with some migration (wscript things first.. etc) [18:44] polotek: I'm going to look into that as well [18:44] defunctzombie: and close out the issues related to those [18:44] defunctzombie: I did some basic benchmarks [18:44] Wizek_ has joined the channel [18:44] defunctzombie: over large html files [18:44] defunctzombie: nothing is even close [18:44] polotek: \o/ [18:44] defunctzombie: the jsdom module is magnitude slower if not more [18:45] avih has joined the channel [18:45] defunctzombie: an the html5 module is several magnitude slower last time I checked [18:45] defunctzombie: sax parsing I don't know about.. node-expat is probly faster [18:45] polotek: yeah, the html5 module is very good though [18:45] defunctzombie: but again, I did not want sax [18:45] polotek: and according to folks on the mailing list [18:45] polotek: libxml2 has no plans to support html5 parser :/ [18:46] polotek: yeah expat has the stated goal of being the fastest parser [18:46] defunctzombie: shouldn't be too bad of a problem [18:46] polotek: it's good if that's what you need. it has a narrower focus [18:46] defunctzombie: many things i need to parse are barely html4 [18:46] polotek: right [18:46] defunctzombie: school websites are shitty shitty [18:46] systemfault: HMm, excuse my ignorance... but how is html5 difference at the parsing level? [18:46] pquerna: i don't know if you have seen node-elementtree? [18:46] defunctzombie: and certainly not html5 [18:46] systemfault: *different [18:46] towski has joined the channel [18:47] polotek: pquerna: I did see it. haven't taken a close look [18:47] pquerna: it uses saxjs underneath, so some limitations, but gives a few tools to make it more... treeish and easier to find nodes [18:47] polotek: looks nice though [18:47] pquerna: we built it to be a middleground between a full libxml2 parser (which has various implications) and just exploding sax parsers in 10 places in our code base [18:47] defunctzombie: pquerna: but does it handle broken html? [18:47] polotek: systemfault: the html5 spec has a whole new parsing rules [18:47] systemfault: Ah ok :) [18:47] ntr0py has joined the channel [18:47] defunctzombie: the problem is when you have bad html [18:47] polotek: it tries to be much more comprehensive and explicit on how to parser html5 properly [18:48] defunctzombie: most parsers are useless [18:48] defunctzombie: that is why older solutions like libxml2 end up being better because they have been battle tested [18:48] pquerna: honestly, if you really need a browser... sometimes you just need a browser. [18:49] pquerna: see http://www.phantomjs.org/ [18:49] AndreasMadsen: systemfault: In HTML 5 the parse is a part of the standart: http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html [18:49] AndreasMadsen: This was not the case before [18:49] webben: defunctzombie: HTML5 parsing rules are defined to handle "bad HTML" [18:49] pquerna: i made a little demo a few months ago, it spoke JSON over stdin/stdout [18:49] polotek: pquerna: ugh, I tried phantom recently, way to heavy [18:49] defunctzombie: the problem is that I do not [18:49] pquerna: and spawned phantom in a child process [18:49] pquerna: then drove it form node.js [18:49] defunctzombie: libxmljs does _exactly_ what I need [18:49] defunctzombie: no browser [18:49] webben: defunctzombie: And they have now been implemented in Firefox, so they ae battle-hardened. [18:49] webben: *are [18:49] adrianmg has joined the channel [18:49] adrianmg has left the channel [18:49] defunctzombie: and it is very fast (which I do care about) [18:49] systemfault: AndreasMadsen: Thank you :) [18:50] polotek: what are we arguing about exactly? [18:50] webben: defunctzombie: So if there's a node module implementing the HTML5 parsing rules, that should work better than libxml2. [18:50] defunctzombie: not arguing [18:50] polotek: it's awesome that node has several solutions for parsing xml and html [18:50] defunctzombie: exploring alternatives [18:50] webben: defunctzombie: Whether it's faster, that depends on the implementation I guess. [18:50] dodo has joined the channel [18:50] lzskiss has joined the channel [18:50] toabi: pquerna: is that 'steering phantomjs' demo somewhere open sourced? [18:50] __tosh has joined the channel [18:50] defunctzombie: webben: only if you care about html5 [18:50] AndreasMadsen: systemfault: This have the effect that every browser read broken code the same way. [18:50] defunctzombie: again, many sites I deal with are broken html [18:51] defunctzombie: so it is a moot point [18:51] webben: defunctzombie: As I just explained HTML5 parsing has been defined to handle bad HTML. [18:51] webben: defunctzombie: HTML as she is written. [18:51] polotek: defunctzombie: no html5 is a full parser spec, with rules for broken html [18:51] defunctzombie: that is good to know [18:51] webben: defunctzombie: That's why, unlike HTML4's parsing rules, it can be implemented as Gecko's parser. [18:52] defunctzombie: so when something faster than libxmljs comes around then I might consider it :) [18:52] polotek: it's just that it's still new, there's no good C/C++ implementation outside of a browser as far as I know [18:52] webben: defunctzombie: And that's why it will outclass hacks around LibXML2 [18:52] defunctzombie: I do not disagree [18:52] defunctzombie: but I have to write code now, not in the future :) [18:52] redir_ has joined the channel [18:52] webben: (In terms of extracting good DOM from legacy HTML cruft) [18:52] pquerna: toabi: unfortunately no, it was for a $work internal hackday to prototype an idea. [18:52] webben: defunctzombie: So have you tested which is faster in your case? [18:53] polotek: pquerna: different from phantomjs-node [18:53] polotek: ? [18:53] polotek: that's the module I was trying [18:53] polotek: it leaves much to be desired [18:53] pquerna: i wrote my own, it just spwaned the child, kept track of it, made a few eventemitter and helped with the message passing... [18:54] pquerna: phantomjs-node looks new... and in coffeee. [18:54] webben: polotek: http://www.netsurf-browser.org/projects/hubbub/ [18:54] SubStack: ACTION built http://testling.com for that stuff [18:54] polotek: pquerna: yeah :( [18:54] webben: (HTML5 parser, used by Netsurf, but not inside the browser as it were) [18:54] webben: Written in C. [18:55] polotek: webben: nice [18:55] polotek: does it have a node binding? [18:55] webben: idk ... doubt it [18:55] hij1nx has joined the channel [18:55] polotek: sounds like a nice project :) [18:55] tkaemming has joined the channel [18:58] lmatteis: what's the best way to retrieve all data from an http request and parse it? [18:58] jakehow has joined the channel [18:58] lmatteis: i mean retrieve it all [18:59] webben: all ... all the cookies! [18:59] systemfault: Share the cookies! :/ [18:59] soulraven1 has joined the channel [18:59] polotek: git push --all [18:59] polotek: does not include tags [18:59] polotek: #fail [18:59] defunctzombie: haha [19:00] webben: Git in confusing CLI API shocker. [19:00] deoxxa: git push --mirror [19:01] deoxxa: does include tags [19:01] polotek: defunctzombie: are you on twitter? [19:01] lmatteis: ... [19:01] defunctzombie: polotek: I am [19:01] defunctzombie: same name as on githun [19:01] defunctzombie: *github [19:01] Renegade001 has joined the channel [19:02] lmatteis: how can i tell that a request has finished in node.js? [19:02] defunctzombie: lmatteis: 'end' event [19:02] lmatteis: defunctzombie: on the response or request? [19:03] defunctzombie: response [19:03] Luffha has joined the channel [19:03] lmatteis: defunctzombie: so to get the data i append it to a variable? [19:04] defunctzombie: yes [19:04] defunctzombie: if you are getting it is a 'utf8' [19:05] lmatteis: defunctzombie: yes [19:06] defunctzombie: lmatteis: if your needs a simple I would suggest the 'request' module which will do some of the boilerplate for you [19:07] Skaag has joined the channel [19:07] rauchg has joined the channel [19:08] mike5w3c has joined the channel [19:08] mandric has joined the channel [19:10] sh1mmer: did someone ping me? [19:11] MatthewS has joined the channel [19:11] polotek: defunctzombie: libxmljs 0.4.3 published to npm [19:13] AndreasM_ has joined the channel [19:13] defunctzombie: polotek: cool, ok I will start migrating some of the new changes [19:13] defunctzombie: should I update the wiki accordingly? [19:13] polotek: hmmm [19:13] polotek: the wiki should mirror the current npm version [19:14] defunctzombie: yea [19:14] defunctzombie: I agree, ok [19:14] defunctzombie: so wiki changes will hit once new version is ready to publish then? [19:14] polotek: yeah [19:14] defunctzombie: I was thinking of doing all the work in a 'develop' branch [19:14] polotek: you're a git flow guy? [19:14] polotek: we use it at work [19:14] defunctzombie: thinking about it [19:15] TheJH: wow, http://jsperf.com/const-numbers-vs-const-names [19:15] polotek: feels a little overblown at times. but generally I like it [19:15] defunctzombie: I like the idea of master being something you can safely get [19:15] defunctzombie: and use [19:15] TheJH: 13k vs 27k ops/sec [19:15] polotek: yeah [19:15] defunctzombie: maybe there should be a 'stable' branch for that [19:15] defunctzombie: but who knows [19:15] defunctzombie: up to you [19:16] defunctzombie: I can easily just push to master just the same [19:16] defunctzombie: since all of the changes will technically be "deployable" [19:16] defunctzombie: and people can always get the tag if they want the code for 0.4.3 [19:16] polotek: TheJH: if you can't get by with 42M ops/sec (in chrome) then you're doing it wrong :0 [19:16] defunctzombie: probly simpler [19:16] dharmesh has joined the channel [19:17] polotek: defunctzombie: well I know it confused people during this period where master didn't reflect what was on npm [19:17] TheJH: polotek, errrm, m, right [19:17] TheJH: 13m and 27m [19:17] defunctzombie: well, that could be said about anything that is packaged [19:17] defunctzombie: and has a separate development line [19:17] polotek: TheJH: I'm on a mbp [19:18] defunctzombie: I like the idea of master being development [19:18] defunctzombie: and maybe a 'stable' [19:18] polotek: defunctzombie: yeah but I'm saying a separate develop branch would help that [19:18] defunctzombie: or 'release' branch.. but who knows [19:18] polotek: so when people blindly clone master [19:18] avih has joined the channel [19:18] polotek: they get what they expect [19:18] adambeynon has joined the channel [19:18] defunctzombie: if they are blindly cloning they get what the desrve not what they expect :p [19:18] defunctzombie: but sure [19:19] defunctzombie: I am fine with trying a 'develop' branch [19:19] polotek: okay [19:19] polotek: I'm going to kill all the other branches on github [19:19] polotek: they are in various states of not good [19:19] defunctzombie: good [19:20] defunctzombie: it is important to prune branches from time to time :) [19:20] polotek: okay, lets go with develop [19:20] polotek: until we find it annoying [19:20] defunctzombie: k [19:20] defunctzombie: sounds good to me [19:23] avih has joined the channel [19:26] Me1000 has joined the channel [19:26] mnutt has joined the channel [19:27] kristsk has joined the channel [19:29] npa has joined the channel [19:29] avih has joined the channel [19:29] DTrejo has joined the channel [19:30] avih has joined the channel [19:30] gigafied has joined the channel [19:30] agnat has joined the channel [19:33] McMAGIC--Copy has joined the channel [19:34] pickels has joined the channel [19:34] markwubben has joined the channel [19:34] spathi has joined the channel [19:36] ppcano has left the channel [19:37] jrogers has joined the channel [19:37] gzmask has joined the channel [19:38] ciss has joined the channel [19:39] avih has joined the channel [19:41] ciss: i've read that jsdom chokes on invalid html. are there any libraries that take care of sanitizing invalid html? [19:41] jbpros has joined the channel [19:42] nakort has joined the channel [19:43] mraleph: TheJH: why measure such things? right result should be INF ops in any case. [19:45] insin: ACTION wonders if anyone is working on a port of html5lib [19:45] TheJH: mraleph, you mean because it's a microbenchmark and a compiler should be able to detect that the loop does nothing? in that case, you have a point [19:46] marcello3d: .. ~~3.5 [19:46] catb0t: 3 [19:46] marcello3d: .. ~~3.9 [19:46] catb0t: 3 [19:46] marcello3d: .. ~~3.1 [19:46] catb0t: 3 [19:46] gripir has joined the channel [19:46] marcello3d: hmmm [19:46] windsurf_ has joined the channel [19:46] mattgifford has joined the channel [19:47] defunctzombie: marcello3d: wtf? [19:47] renhuh has joined the channel [19:47] mraleph: TheJH: yep, compiler should figure out that numVal/strVal are constants, propagate them and kill dead code; then see that foo is always the same local and inline it unconditionally [19:47] marcello3d: what's the right way to convert a float to an int [19:47] mraleph: TheJH: leaving nothing in place [19:47] defunctzombie: Math.floor [19:47] marcello3d: .. ~~-4.5 [19:47] catb0t: -4 [19:47] gripir has left the channel [19:47] bshumate has joined the channel [19:47] bshumate has joined the channel [19:47] marcello3d: .. Math.floor(-4.5) [19:47] catb0t: -5 [19:48] marcello3d: slightly different semantics [19:48] windsurf_: Im used to coding with oop classes. How should I structure my node files in terms of me making 'classes' in conjunction with exports? [19:48] renhuh has left the channel [19:48] defunctzombie: oh.. I see, you want to truncate [19:49] realguess has joined the channel [19:49] polotek: windsurf_: don't use one file per class [19:49] polotek: classes are just constructor functions and prototypes [19:49] pizthewiz has joined the channel [19:49] polotek: you can put them all in one module if they're small enough [19:49] polotek: if your codebase is larger [19:49] polotek: I would recommend that you organize in terms of modules [19:49] polotek: e.g. make smaller modules with well defined apis [19:50] defunctzombie: marcello3d: so is ~~-4.5 really the way? that is crazy [19:50] lzskiss has joined the channel [19:50] marcello3d: well, parseInt is another option [19:50] marcello3d: .. parseInt(-4.5) [19:50] catb0t: -4 [19:50] polotek: is v8bot still running? [19:50] polotek: v8:~~-4.5 [19:50] polotek: guess not [19:51] DTrejo: .. 1 + 2 [19:51] catb0t: 3 [19:51] defunctzombie: parseInt is stupid [19:51] defunctzombie: I hate that it doesn't fail for things that are not numbers [19:52] polotek: oh wait, catb0t is a thing? [19:52] defunctzombie: but I guess the ~~ would have the same problem [19:52] catb0t: thing I'd want to literally just a function getting executed when I do [19:52] polotek: .. "hello" + " world" [19:52] catb0t: "hello world" [19:52] polotek: ah [19:52] DTrejo: .. [19:52] DTrejo: .. 'DTrejo++' [19:52] catb0t: "DTrejo++" [19:53] polotek: defunctzombie: yeah none of these solutions are perfect [19:53] polotek: I usually go with a combination of a number regex and parseInt [19:53] polotek: if I really need to be sure [19:53] innociv__ has joined the channel [19:53] windsurf_: Polotek: so if I do multiple classes in only one file then I just won't ever use exports? [19:53] polotek: windsurf_: no you do use exports. That's how you expose your classes to other code [19:53] PHPTroll: .. for (var i=0; i < 5; i++) 'hello' + i [19:53] catb0t: "hello4" [19:53] Renegade001 has joined the channel [19:54] level09 has joined the channel [19:54] windsurf_: Polotek: but when I use exports am I, say listing all my exports in my class constrictor and delegating them to class members? [19:55] deoxxa: > class [19:55] deoxxa: what's a class [19:55] mattgifford has joined the channel [19:55] systemfault: Where you go to learn stuff.. [19:55] polotek: windsurf_: I'm not sure what you're getting at. want to send an example in a gist? [19:56] windsurf_: Deoxxa google class and oop [19:56] deoxxa: whoosh [19:56] sakkaku has joined the channel [19:56] windsurf_: I am on my iPhone so maybe layer :P [19:56] sakkaku has joined the channel [19:57] polotek: function Person() { ... } [19:57] MatthewS has joined the channel [19:57] polotek: exports.Person = Person [19:57] windsurf_: Oh export the whole class. I see [19:57] rauchg has joined the channel [19:57] systemfault: Well. deoxxa is right since javascript doesn't have the concept of class :P [19:58] githogori has joined the channel [19:58] cjm has joined the channel [19:58] defunctzombie: polotek: I prefer the - 0 trick usually if I just want to turn stuff into numbers [19:59] windsurf_: Polotek: now if I use modules, do you mean in the sense of Node modules, one file per module with functions and properties? No pseudo class constructs? [20:00] polotek: windsurf_: correct [20:00] githogori has joined the channel [20:00] polotek: defunctzombie: yeah, similar to + '' to make strings [20:00] windsurf_: Polotek thanks! [20:00] polotek: somehow - 0 is less clear to me [20:01] defunctzombie: yea, I usually end up making a function is_numeric or something along those lines [20:02] deoxxa: windsurf_: there's no such thing as a "class" in javascript - what you're talking about is a function object being used as a constructor [20:02] deoxxa: that's what i was getting at [20:02] deoxxa: using incorrect terminology only serves to confuse yourself and whoever's trying to help you [20:02] systemfault: deoxxa wins..... Flawless victory! [20:02] deoxxa: now that's out of the way, you want to do something like this: [20:03] deoxxa: exports.KiteSurfer = KiteSurfer; function KiteSurfer() {} KiteSurfer.prototype.surf = function() { return "surfing!"; }; [20:03] deoxxa: put that in something like kitesurfer.js [20:03] deoxxa: then: [20:03] AndreasM_ has joined the channel [20:03] deoxxa: var KiteSurfer = require("./kitesurfer").KiteSurfer; var kitesurfer = new KiteSurfer(); console.log(kitesurfer.surf()); [20:04] deoxxa: or, if you want to be fancy, you can assign the actual function directly to module.exports, so you can avoid the .KiteSurfer part [20:05] deoxxa: basically module.exports is the only way to get things out of whatever file it is that's being included [20:05] windsurf_: Deoxxa cool. [20:05] windsurf_: Thx! [20:05] polotek: defunctzombie: we're all set with develop branch [20:05] polotek: you're good to go [20:06] eb4890 has left the channel [20:06] polotek: deoxxa: js doens't have classes [20:06] polotek: or [20:06] mattgifford has joined the channel [20:06] polotek: everyone's idea of classes is too narrow in the first place [20:07] defunctzombie: polotek: cool! thanks [20:07] deoxxa: well this is true [20:07] shiawuen has joined the channel [20:08] deoxxa: windsurf_: check out https://github.com/deoxxa/dusty/blob/master/lib/dusty.js for a pretty straightforward example [20:11] polotek: gotta run guys [20:11] windsurf_: Thanks! [20:11] appinsanity-mike has joined the channel [20:12] PyroPeter has left the channel [20:12] skm has joined the channel [20:16] herbySk has joined the channel [20:18] npa has joined the channel [20:19] soulraven1 has joined the channel [20:20] Cromulent has joined the channel [20:22] Neil has joined the channel [20:22] samBiotic has joined the channel [20:22] sebastianedwards has joined the channel [20:25] MatthewS has joined the channel [20:25] lzskiss has joined the channel [20:31] kyonsalt has joined the channel [20:33] alejandromg has joined the channel [20:34] _schulte_ has joined the channel [20:35] lzskiss has joined the channel [20:37] _schulte_ has left the channel [20:37] windsurf_ has joined the channel [20:40] jhurliman has joined the channel [20:40] Planet_EN has joined the channel [20:41] Planet_EN: complied nodejs from source and still no sign of node-waf [20:41] Planet_EN: where can I get it? [20:41] Agos has joined the channel [20:43] Planet_EN: is node-waf part of nodejs install bundle? [20:43] Planet_EN: or do we have to configure something for it to work? [20:44] Planet_EN: in the source code there is a directory for waf but it has a node-waf python file which imports Scripting module which is missing, tried downloading it through pip and it doesn't work [20:45] JaKWaC has joined the channel [20:47] bradleyg has joined the channel [20:47] chirlle has joined the channel [20:48] chirlle: what is the best way to install in linux, from source or apt? [20:48] Planet_EN: from source [20:49] JohnsonYuan has joined the channel [20:49] chirlle: doesn't that make it hard to upgrade later? [20:49] JohnsonYuan: HI all, I am newbie on node.js, and i stuck in the installation of cygwin [20:50] JohnsonYuan: under the bash, ./configure halts as cygwin not supported [20:50] JohnsonYuan: any solution? [20:50] mikeal has joined the channel [20:50] Planet_EN: nope, you upgrade from the package manager [20:51] JohnsonYuan: install cygwin from package manager? [20:51] jbpros_ has joined the channel [20:52] JohnsonYuan: mind to let me know which package should i install? [20:52] alejandromg: JohnsonYuan: Do you really need cygwin? [20:52] dthompso99 has left the channel [20:53] JohnsonYuan: Currently following a tutorial on setting up node.js for kinect [20:53] avih has joined the channel [20:53] bnoordhuis: Planet_EN: what version of node did you compile? [20:53] JohnsonYuan: v0.6.6 [20:56] Planet_EN: bnoordhuis: its 0.6.6 [20:56] hotch has joined the channel [20:56] JohnsonYuan: alejandromg: Mind to guide me? I am new to this [20:56] JohnsonYuan: alejandromg: Thanks [20:57] hotch: hey guys, obviously the modules wiki is a great place as always to start - yet it's huge right now. what's a **really nice** looking (output) doc generator? [20:57] bnoordhuis: Planet_EN: node-waf is included, it's installed to $PREFIX/bin (PREFIX=/usr/local by default) [20:57] deedubs has joined the channel [20:58] Planet_EN: bnoordhuis: its part of nodejs-dev and not nodejs, I installed it from source now what should I set my path to? [20:58] Planet_EN: bnoordhuis: its not here in /usr/local/bin [20:58] sorensen__ has joined the channel [20:58] bnoordhuis: Planet_EN: source as in `git clone https://github.com/joyent/node`? [20:58] Planet_EN: bnoordhuis: yupp cloned the git rep [20:59] bnoordhuis: Planet_EN: did you do a `git checkout v0.6.6` afterwards? [20:59] Planet_EN: no [20:59] dharmesh has joined the channel [20:59] lzskiss has joined the channel [20:59] bnoordhuis: then you're compiling master, which is undergoing some heavy refactoring [20:59] Planet_EN: dang! [20:59] Planet_EN: and i have it installed [21:00] Planet_EN: any way to get rid of it? [21:00] bnoordhuis: no biggie, check out the proper tag, rebuild and install [21:00] bnoordhuis: it will install over the current install [21:00] Planet_EN: bnoordhuis: I've npm installed with previous installation, how do I get rid of that? [21:01] bnoordhuis: Planet_EN: you don't have to, npm will reinstall too [21:02] DTrejo has joined the channel [21:03] Planet_EN: bnoordhuis: i have npm installed on a previous installation i did through synaptic, any way to remove that? [21:03] JohnsonYuan: Anyone has the solution for "cygwin not supported"? [21:03] alejandromg: JohnsonYuan: Just download the *.msi from nodejs.org [21:04] flat has joined the channel [21:04] bnoordhuis: Planet_EN: oh, like that - just `apt-get uninstall npm` (or whatever the package is called) [21:04] djcoin has joined the channel [21:04] JohnsonYuan: alejandromg: something like "node-v0.6.6.msi" ? [21:04] kitt has joined the channel [21:04] kitt has joined the channel [21:05] alejandromg: JohnsonYuan: yes try that! The pkg is going to install everything you need. [21:05] JohnsonYuan: alejandromg: Which means i have no need of cygwin? [21:06] wiwillia has joined the channel [21:06] bnoordhuis: JohnsonYuan: yes [21:06] kmiyashiro has joined the channel [21:06] alejandromg: JohnsonYuan: In new releases of node.js is no need it anymore [21:07] wiwillia: http://teespring.com/nodejs [21:07] JohnsonYuan: alejandromg: Alright, thanks a lot. [21:07] JohnsonYuan: bnoordhuis: Thanks too. [21:07] MichealBenedict has joined the channel [21:08] alejandromg: JohnsonYuan: np [21:09] redir_ has joined the channel [21:10] avih has joined the channel [21:10] bergelmir has joined the channel [21:10] bergelmir has joined the channel [21:10] tilgovi has joined the channel [21:10] tilgovi has joined the channel [21:11] adrianF has joined the channel [21:12] codygray has joined the channel [21:14] pity has joined the channel [21:16] dodo has joined the channel [21:18] avih has joined the channel [21:19] TimTim has joined the channel [21:19] metalball2 has joined the channel [21:20] mc_greeny has joined the channel [21:21] arturadib has joined the channel [21:21] aioue has joined the channel [21:21] jsj has joined the channel [21:21] fly-away has joined the channel [21:22] lzskiss has joined the channel [21:22] ritch has joined the channel [21:22] avih has joined the channel [21:25] ken-ignite has joined the channel [21:25] aioue has joined the channel [21:26] avih has joined the channel [21:26] ken-ignite has joined the channel [21:26] ritch: Can anyone recommend a user setup for running node on :80 in ubuntu server. Currently I deploy via git over ssh as my own user and the post-recieve hook restarts my forever daemon. This works, but doesnt scale (as far as I know) to a team of several people pushing. [21:27] Renegade001 has joined the channel [21:27] flat has joined the channel [21:28] eastv: what are you using node for? [21:28] eastv: what type of application [21:28] michaelhartau has joined the channel [21:29] issackelly_ has joined the channel [21:30] avih has joined the channel [21:31] ritch: essentially a thin json server [21:32] ritch: typically i would have a basic linux user running the web app, but node is a bit different since it needs (as far as I know) to sudo when running on :80 [21:33] mc_greeny has joined the channel [21:33] realguess has joined the channel [21:33] aioue has joined the channel [21:34] Me1000 has joined the channel [21:34] eastv: I'm not sure if node would be suited to your needs based on scalability vs something line nginx [21:34] `3rdEden has joined the channel [21:34] eastv: like* [21:35] gigafied has joined the channel [21:35] eastv: although there is probably someone else that has better advice for scaling node in particular [21:35] TheJH: ritch, you can forward port 80 to something else with iptables [21:35] torm3nt has joined the channel [21:36] eastv: or that ^ [21:36] dharmesh has joined the channel [21:36] TheJH: ritch, also, I think you can drop privileges after binding to port 80 from within node [21:37] TheJH: ritch, http://nodejs.org/docs/latest/api/process.html#process.setuid [21:37] ritch: how does apache and other web servers get a hold of 80? [21:37] alejandromg: ritch: As far as I know you has to login as root to bind ports below 1024 or something, you should use iptables or proxy pass [21:37] TheJH: ritch, I think they drop privileges after binding, too [21:38] defunctzombie has joined the channel [21:38] davidbanham has joined the channel [21:38] alejandromg: ritch: I think that was discussed while ago in the mailing list: https://groups.google.com/forum/#!topic/nodejs/0I06rYdbvms [21:40] avih has joined the channel [21:43] aaronmcadam has joined the channel [21:43] gbatcisco has joined the channel [21:45] pekim has joined the channel [21:46] ritch: alejandromg: thanks… that really clears up the whole :80 problem. [21:47] gbatcisco: anyone get a problem with node not handling the first socket on a createServer callback? I have no idea why the server.on('connection').. isn't firing [21:47] tekky: ritch: could always proxy it from nginx as well [21:47] timbl has joined the channel [21:49] ritch: will something like socket.io still work behind nginx? [21:50] dilvie has joined the channel [21:50] tekky: on port 80? [21:50] Druid_ has joined the channel [21:50] aioue has joined the channel [21:50] bnoordhuis: ritch: no [21:50] bnoordhuis: gbatcisco: gist? [21:50] tekky: sockets are a bit different than http traffic [21:50] fangel has joined the channel [21:50] gbatcisco: no its a net.createSocket [21:51] flat has joined the channel [21:51] Aria has joined the channel [21:54] gbatcisco: its pretty simple.. git://gist.github.com/1494596.git [21:54] gbatcisco: just noticed that the event doesn't fire on the first SYN [21:54] dudeinthemirror has joined the channel [21:54] aioue has joined the channel [21:55] eastv: so having a websocket server running on node via socket.io cannot be proxied through nginx to show the surrounding html page that the websocket is updating to? [21:56] tbranyen: pretty sure thats correct [21:56] Aria has joined the channel [21:57] eastv: basically I'm trying to run this: http://wesbos.com/html5-canvas-websockets-nodejs/ on my ubuntu server but I'm not sure how to display the page (assuming I'm not using Connect) and use PHP to start a session between different users [21:57] bnoordhuis: gbatcisco: call server.on('connection') outside of the 'listening' callback [21:57] eastv: that's why I was trying to figure out if the above link would work in the context of nginx and php5-fpm type stuff [21:58] bnoordhuis: gbatcisco: also, you can pass the 'connection' listener as an argument to server.listen() [21:58] boltR has joined the channel [21:59] eastv: so basically the problem boils down to if I want to use node or nginx entirely unless I can proxy websocket requests on a different port through nginx running on port 80 [21:59] stagas has joined the channel [21:59] avih has joined the channel [22:02] ciss has joined the channel [22:02] michaelhartau has joined the channel [22:03] aioue has joined the channel [22:03] ritch has left the channel [22:04] mara has left the channel [22:05] codygray has joined the channel [22:06] Agos: Hi everybody! I'm trying node.js for the first time - I want to build a small proxy to let me connect to IRC from work (they filter ports). Is this something that can be done or am I that ignorant? Any useful pointer? [22:06] jjd has joined the channel [22:07] cjm has joined the channel [22:07] Aria: Very possible. Proxying IRC to IRC, just changing ports? [22:07] funkya has left the channel [22:08] SubStack: Agos: you could just get an ssh box and use screen and irssi [22:08] aioue has joined the channel [22:08] Agos: SubStack I'd do that but ssh is off too at work, just port 80 and 443 [22:08] joshgillies has joined the channel [22:09] saschagehlich has joined the channel [22:09] tjfontaine: ssh works fine on 443, but it's quite common that the thing you do after hello world is write an irc bot, so I guess this isn't that far off the mark [22:09] CIA-109: node: 03Avi Flax 07master * ree0a7b9 10/ (lib/util.js test/simple/test-sys.js): util: output Dates with Date.toString not Date.toUTCString - http://git.io/GVhLGA [22:09] Agos: Aria yes [22:09] tjfontaine: anyway, if you approach irc from a protocol level (and not a simple socket proxy) it's quite simple [22:10] tjfontaine: irc itself is message based, so you just watch for 510_bytes+\r\n and pass that over the websocket [22:10] tjfontaine: then hackup somethign like qwebirc to use a websocket [22:10] Agos: tjfontaine that's awesome [22:10] Aria: If you can run any server on port 443 or 80, too, that gets easy. Just proxy the data itself. [22:13] tjfontaine: if you're not hell bent on NIH+node, I suggest having ssh listen on 443, since it's resilient enough to even pass through a proxy in that fashion [22:13] avih has joined the channel [22:14] Agos: tjfontaine I only have a VPS-like server so I can't really touch sshd [22:14] Aria: Oh? Most VPSes allow root access and you can do what you want. [22:14] tjfontaine: well, you have a crappy vps, a solution like linode.com allows you to manage your instance as you see fit [22:14] Aria: (Also, you can run a SECOND sshd.) [22:15] whitman has joined the channel [22:16] lzskiss has joined the channel [22:16] Heisenmink has joined the channel [22:16] Fuu has joined the channel [22:17] criswell has joined the channel [22:17] Agos: thanks guys, I'll try to hack something :D [22:18] jacobolu_ has joined the channel [22:20] flat has joined the channel [22:22] darkenco has joined the channel [22:23] codygray has joined the channel [22:26] flat has joined the channel [22:28] Me1000 has joined the channel [22:29] jn has joined the channel [22:29] ly- has joined the channel [22:31] lzskiss has joined the channel [22:31] Destos has joined the channel [22:31] JaKWaC has joined the channel [22:33] augustl: is fs.symlink and fs.symlinkSync supposed to work on win32? [22:33] augustl: getting "UNKNOWN, unknown error" [22:34] Me1000 has joined the channel [22:34] augustl: the docs say that fs.symlink is a "symlink(2)", which definitely isn't around on windows.. [22:35] augustl: ah there's an open issue, #2274 [22:36] igl1 has joined the channel [22:36] neurodrone has joined the channel [22:36] boltR has joined the channel [22:37] boltR has joined the channel [22:37] avih has joined the channel [22:38] boltR has joined the channel [22:39] romanb has joined the channel [22:41] philipd has joined the channel [22:45] ChrisPartridge has joined the channel [22:45] avih has joined the channel [22:46] aioue has joined the channel [22:46] dthompso99 has joined the channel [22:47] binaryjohn has joined the channel [22:47] hipsters_ has joined the channel [22:49] hellp has joined the channel [22:51] dharmesh has joined the channel [22:53] joshontheweb has joined the channel [22:55] tek has joined the channel [22:55] killing-joke has joined the channel [22:56] aioue has joined the channel [23:01] killing-joke: how does dnode run remote commands? [23:01] jesusabdullah: how? In what sense? [23:01] SubStack: MAGIC [23:02] SubStack: killing-joke: https://github.com/substack/dnode-protocol [23:02] jesusabdullah: http://jesusabdullah.github.com/2011/06/26/dnode.html [23:02] jesusabdullah: Or this [23:02] jesusabdullah: Personal notes from when I tried to port it to python [23:02] jesusabdullah: (never finished, lost interest) [23:02] jocafa has joined the channel [23:02] jesusabdullah: I can't be the only programmer with add XD [23:02] killing-joke: :) [23:03] scottschecter has joined the channel [23:03] killing-joke: jesusabdullah, very cool. thanks. [23:03] jesusabdullah: Yeah, no prob! [23:03] SubStack: killing-joke: and if you are gluing together long-running dnode processes you can use https://github.com/substack/upnode [23:03] killing-joke: i was wondering what generic facility there was in every browser that allowed people to load and run remote code [23:04] SubStack: also great for authenticating across reconnects [23:04] shapeshed has joined the channel [23:04] stagas has joined the channel [23:04] wilmoore has joined the channel [23:04] killing-joke: SubStack, thanks. i have been readin through your other projects. there is a lot to absorb! [23:05] SubStack: killing-joke: it's not loading the remote code at all, it gets a shimmed out reference to the remote functions [23:05] tilgovi has joined the channel [23:05] SubStack: and it calls the shim which invokes a call back in the other direction [23:05] SubStack: recursively [23:05] davidbanham has joined the channel [23:05] SubStack: so you can pass callbacks to shims as deeply as you want to go [23:06] SubStack: and so long as you don't use return values it looks pretty much like as if the code is running locally [23:06] killing-joke: so if i had another service on a remote host (some server) that generated code, it would have to generate valid JavaScript [23:06] killing-joke: but then how is that script submitted and registered as new code in the browser? [23:06] SubStack: it's not about code at all [23:07] SubStack: no source code is sent [23:07] killing-joke: ahah. here is the MAGIC. [23:07] SubStack: I have no idea why so many people think this [23:07] Aria: Because people are used to thinking synchronously. [23:07] SubStack: it would be amazingly silly and unusable to send source code around [23:07] bacon000 has joined the channel [23:07] Aria: Yeah. It'd lose its closure, its state. [23:07] SubStack: exactly [23:07] slaskis_ has joined the channel [23:08] killing-joke: i am trying not to be amazingly silly, while still understanding. [23:08] killing-joke: :) [23:08] jesusabdullah: killing-joke: Don't worry, LOTS of people's first reaction is, "are you .toStringing that??" [23:08] SubStack: you'd have to walk the ast in order to pull out the bound variables and send those along [23:08] SubStack: which would be pretty brittle and hard [23:08] jesusabdullah: Even if on reflection it's obviously not the wtg [23:09] SubStack: SPEAKING OF WHICH [23:09] SubStack: I should make peanut brittle sometime [23:09] SubStack: on account of how it's delicious [23:10] SubStack: maybe the danish bakery on telegraph carries it [23:10] killing-joke: ahah. "When the connection is first established, the peers swap “methods” messages. ... " [23:11] CIA-109: node: 03Ryan Dahl 07isolates2 * rdb6d846 10/ (5 files in 3 dirs): ... - http://git.io/B5BM9Q [23:11] SubStack: killing-joke: and "methods" is just a function call with a string name instead of an id [23:11] innociv__: http://pastebin.com/QK6depHd I'm getting Unexpected token u at Object.parse (native) when someone goes to http://ip.#.#.# with this Second line. [23:11] innociv__: I guess there is no req.url in that case? [23:12] m00p has joined the channel [23:12] innociv__: Or not even req is.. [23:12] innociv__: No, nevermind. I did an if( req.url ) so that exists [23:12] SubStack: killing-joke: such that there is only one transform that does the work everywhere [23:13] SubStack: the methods exchange just bootstraps the process [23:13] killing-joke: oh this is beatifully simple [23:13] flat has joined the channel [23:13] killing-joke: it seems like it would be blisteringly fast [23:14] TheJH: killing-joke, like this: `recv: {"method":"methods","arguments":[{"zing":"[Function]"}],"callbacks":{"0":["0","zing"]},"links":[]}` [23:14] SubStack: killing-joke: well it does a recursive walk on every json message but seems to be fast enough [23:14] SubStack: in order to pull out the callbacks and to stuff them in an ancillary data structure [23:15] innociv__: http://pastebin.com/NSQEqPrQ still an error on line 5, same as old line 2. What am I failing to understand here? [23:15] ag4ve_ has joined the channel [23:15] caolanm has joined the channel [23:16] killing-joke: SubStack, that leaves some architectural decisions for the implementer, to make sure that no bottomless pits open up. a nice flat call graph should run quickly and well. [23:16] SubStack: bottomless pits? [23:16] SubStack: you mean cyclic objects? [23:17] killing-joke: yes [23:17] innociv__: if ( req.url != "/" ) fixed it.. [23:17] maushu has joined the channel [23:17] SubStack: there is another data structure for handling and reconstructing those [23:17] SubStack: you can send objects with cycles and it works fine [23:18] SubStack: just don't ever send a dom element because those have infinite getter chains [23:18] Agos: tjfontaine my web host only permits HTTP traffic (there's a front-facing server). Were you suggesting on wrapping stuff into websockets, am I right? [23:18] avih has joined the channel [23:19] TheJH: SubStack, `function makeObj() { return {get foo(){return makeObj()}}; dnodeConnection.bar(makeObj())` :P [23:20] aioue has joined the channel [23:20] SubStack: TheJH: yes exactly [23:20] joshontheweb has joined the channel [23:20] SubStack: TheJH: luckily that will only fuck up the sender [23:21] TheJH: SubStack, right. How good that you don't stream out the JSON :P [23:21] TheJH: SubStack, with dnode over TCP, that'd kill the recipient, right? [23:21] SubStack: no? [23:21] JaKWaC has joined the channel [23:22] SubStack: it just won't get sent because the traversal never finishes [23:23] TheJH: SubStack, but if it sent JSON while traversing, this part https://github.com/substack/dnode/blob/master/index.js#L249-251 would nuke the server, no? [23:23] TheJH: (yes, I'm aware of that not being the case) [23:25] arturadib has joined the channel [23:25] markwubben has joined the channel [23:26] aioue has joined the channel [23:29] hipsters_ has joined the channel [23:31] _unary has joined the channel [23:32] killing-joke: so, my instinct was partly right. dnode doesn't serialize the entire function, but it looks like the protocol swaps (what a C-head calls) function prototypes between server and client [23:33] SubStack: killing-joke: false [23:33] SubStack: only if you make the prototypes enumerable [23:33] SubStack: and don't do that [23:33] killing-joke: ahah. good. and thank you for your patience. [23:34] CIA-109: node: 03Ryan Dahl 07master * rbb8f734 10/ Makefile : [23:34] CIA-109: node: Fix make targets so they detect changes [23:34] CIA-109: node: Broken in 10d92b3 - http://git.io/WOHOng [23:34] wizonesolutions has joined the channel [23:35] avih_ has joined the channel [23:35] SubStack: killing-joke: think json with embedded callbacks [23:35] apoc has joined the channel [23:37] tekky has joined the channel [23:37] killing-joke: SubStack, i am reading the dnode-ruby libs. i am looking for the line where the remot method is called, an exec() or something. [23:38] Agos_ has joined the channel [23:38] Agos_: whoa I'm connecting through a node.js proxy [23:38] Agos_: that is awesome. [23:38] torm3nt has joined the channel [23:38] marcello3d: is it safe to write to a socket before receiving a 'connect' event? [23:39] presbrey has left the channel [23:39] killing-joke: dnode.rb has a connect method, but i don't see something like exec. is it in libs/conn? [23:40] m00p has joined the channel [23:40] jesusabdullah: Why would there be an exec? Wouldn't you see something like the equivalent of obj[method].apply(null, arguments) ? [23:40] jesusabdullah: "exec" suggests evaluating stringified code, which does not happen. [23:41] grampajoe has joined the channel [23:41] flat has joined the channel [23:41] killing-joke: jesusabdullah, yes. i think i keep having the same misapprehension, which is only helped by reading and understanding the code. sorry. [23:41] snearch has joined the channel [23:41] brianseeders has joined the channel [23:41] killing-joke: still reading ... [23:42] jesusabdullah: all dnode does is say, "execute this method with these arguments, and insert shim callbacks here that send the results back to me." [23:42] SubStack: it's all data transforms and shims [23:42] heavysixer has joined the channel [23:42] jesusabdullah: The only "mind-bending" part is the shims. The callbacks just take what's passed to them, shove the results into some JSON, and pass it back [23:42] jesusabdullah: Also, note that dnode-ruby and dnode are pretty much 100% compatible [23:43] jesusabdullah: meaning there *can't* be string evals [23:43] SubStack: dnode-ruby doesn't support cyclic links though [23:43] SubStack: I never got around to that part [23:43] jesusabdullah: but it's not like it can only work with other ruby clients [23:43] jesusabdullah: which is proof that it's not stringifying and executing code [23:44] SubStack: the perl client has seen the most stress in real use [23:44] SubStack: of the non-node implementations [23:44] killing-joke: yes. :) just because i can't imagine how it happens doesn't mean it has to happen that way. [23:45] jesusabdullah: No worries! You'll get it :P [23:45] killing-joke: still reading ... :) [23:45] dwhittle has joined the channel [23:45] fzzzy has joined the channel [23:46] pauls1 has joined the channel [23:46] Poetro has joined the channel [23:46] shib71 has joined the channel [23:47] avih has joined the channel [23:48] skm has joined the channel [23:49] wizonesolutions has joined the channel [23:51] rwaldron has joined the channel [23:51] azend has joined the channel [23:53] therrg has joined the channel [23:55] killing-joke: i was looking for the /dnode.js file. near index.js#184, i see what looks like a route ... `server = SocketIO( server || params.webserver, params.mount || '/dnode.js', params.io || {} );` [23:55] plutoniix has joined the channel [23:56] Ownatik has joined the channel [23:57] aisoftwa_ has joined the channel [23:58] aisoftwa_ has left the channel [23:59] jerrysv has joined the channel