[00:00] Dmitrijus: nicholasf: hehe, i would so want to have a local group here in amsterdam :(
[00:00] nicholasf: :)
[00:00] nicholasf: Im becoming addicted to node and want to invite some locals
[00:00] Brandon_R: :)
[00:00] Brandon_R: Hey dmitrijus
[00:00] Brandon_R: do you know how to use libuv?
[00:00] bingomanatee_: Dimitrijus: if you are going to start a group in Amsterdam you will be responsible with supplying the other international Node troops with "Inspiration"
[00:00] Brandon_R: or know of a project that uses it?
[00:01] mmalecki: Dmitrijus: there's a plan for European user groups
[00:01] mmalecki: if you want to, I can contact you with jvduf, he's there
[00:02] meso_ has joined the channel
[00:02] Brandon_R: ok
[00:02] max_dev has joined the channel
[00:02] cmr: Brandon_R: mmalecki wasn't talking to you
[00:03] root has joined the channel
[00:03] dwhittle has joined the channel
[00:04] cmr: Brandon_R: I know of a project that uses libuv, you might have heard of it.
[00:04] cmr: It's called "nodejs"
[00:04] Dmitrijus: bingomanatee_: i'm okay with making "inspiration", but generally i think it would just nice to have a beer once in a while with other node developers :)
[00:05] Brandon_R: :) i mean without the cryptic v8 stuff in it
[00:05] bingomanatee_: it does make a difference - thats why life in SF is zo fun.
[00:05] booo has joined the channel
[00:05] Brandon_R: why don't you move to the us dmitrijus?
[00:05] bingomanatee_: Node camps are cool. You could organize those and get people from the larger region in.
[00:06] bingomanatee_: << was not trying to imply people should all move to where he lives
[00:06] bingomanatee_: cos thats arrogant.
[00:06] Dmitrijus: :)
[00:06] erichynds has joined the channel
[00:06] aioue has joined the channel
[00:06] flip_digits has joined the channel
[00:06] txdv: go to the us, it is the greatest country in the world
[00:06] rie: anyone know how to trace the cause of a SIGABRT event signal?
[00:06] bingomanatee_: A good virus needs broad coverage.
[00:07] bingomanatee_: The us is the greatest at telling other countries how great it is.
[00:07] Dmitrijus: < txdv> go to the us, it is the greatest country in the world <- just to be clear, no :)
[00:07] Aria has joined the channel
[00:07] Dmitrijus: Brandon_R: i've heard bad stories about us :)
[00:07] txdv: yeah, it was sarcasm
[00:07] Brandon_R: what stories?
[00:07] Dmitrijus: Brandon_R: and i love europe :))
[00:08] txdv: europe is good, because the crazies are not as crazy as in the us
[00:08] Brandon_R: the united states is the richest and most powerful country in the world
[00:08] Brandon_R: what's wrong with that?
[00:08] Dmitrijus: Brandon_R: the arrogance?
[00:09] cmr: Dmitrijus++
[00:09] catb0t: Dmitrijus now has 1 beer
[00:09] mmalecki: Dmitrijus++
[00:09] catb0t: Dmitrijus now has 1 beer
[00:09] cmr: catb0t: seriously go away
[00:09] Brandon_R: dmitrijus++
[00:09] catb0t: seriously , i can't ates against away
[00:09] catb0t: Dmitrijus now has 1 beer
[00:09] bingomanatee_: So you are saying the middle class in the US has a better lifestyle than the middle class of every other country? or that we have a fair number of people with a huge spike in income that drives the mean up.
[00:09] nicholasf: so if anyone is in Oz I've created the nodejs.au google group
[00:10] Brandon_R: i'm not talking about classes etc
[00:10] Dmitrijus: bingomanatee_: for starters, i don't think we even have middle class separation here
[00:10] bingomanatee_: Because there are a fair number of countries in Europe where the lifestyle of the middle class is quite better than it is in the US.
[00:10] warz: it has been a few months since ive used nodejs and npm. i see that a simple 'npm install foo' does not appear to make that module available to a node app anywhere, anymore.
[00:10] Brandon_R: innovation and entrepreneurship is buzzing here
[00:10] txdv: You know when they should how dentists went to africa and treated people for free? They do it in the US too now xD
[00:10] warz: has something changed?
[00:11] cmr: warz: are you looking for the -g switch of npm install:
[00:11] isaacs: warz: npm install foo <-- do this in your node program folder.
[00:11] cmr: ?
[00:11] bingomanatee_: then there
[00:11] isaacs: warz: then you can require() it
[00:11] bingomanatee_: 's that...
[00:11] Brandon_R: doctors without borders
[00:11] bingomanatee_: sorry - diverting.
[00:11] isaacs: warz: npm faq <-- run this, and read it.
[00:11] isaacs: warz: use --global for command line apps.
[00:11] isaacs: warz: or local installs for require() things
[00:12] Brandon_R: i have a question
[00:12] Brandon_R: how is gcc compiled?
[00:12] cmr: './configure; make'
[00:13] Dmitrijus: Brandon_R: you mean, bootstrapping? :)
[00:13] Brandon_R: i mean how was the first version of gcc compiled?
[00:13] Brandon_R: like the src
[00:13] cmr: Brandon_R: you need a C compiler on the host system to start with.
[00:13] Brandon_R: there wasn't a gcc to compile it before
[00:13] Brandon_R: paradox
[00:13] cmr: The first ever C compiler was either in assembly or another language.
[00:13] cmr: It's called bootstrapping.
[00:13] warz: isaacs, alright, so it's suggested to install modules locally for each app?
[00:13] cmr: And the first assembler was probably written by hand.
[00:13] Brandon_R: punch cards
[00:14] Brandon_R: i think it was
[00:14] cmr: ... no
[00:14] koo3 has joined the channel
[00:15] cclarke has joined the channel
[00:16] StanlySoManly has joined the channel
[00:16] Brandon_R: i will have to read up on this
[00:16] warz: This is an often left out item in an faq: "When you realize what a mistake it was, do this to switch back:"
[00:16] warz: i like it. lol.
[00:16] Brandon_R: lol
[00:17] cmr: Bootstrapping? It's nothing major to think about.
[00:17] Brandon_R: a mistake is only a mistake if you don
[00:17] Brandon_R: t correct it
[00:17] Brandon_R: oh i get it
[00:18] Brandon_R: when you said bootstrap i thought you meant the functions that run before the controllers in MVC
[00:18] txdv: too lazy to do shit
[00:18] Dmitrijus: txdv: too drunk to do shit
[00:18] Dmitrijus: hi5
[00:18] enmand has joined the channel
[00:18] criswell has joined the channel
[00:18] ggg has joined the channel
[00:18] macgregor has joined the channel
[00:18] txdv: hi5 xD
[00:19] txdv: omg russian style
[00:19] txdv: did you drink vodka with 140%?
[00:19] ggg: anyone good with joyent smart machine? cant get npm to work properly
[00:19] cmr: Brandon_R: huh? since when are those called bootstraps?
[00:19] QiBala has joined the channel
[00:19] Brandon_R: in the zend framework
[00:19] cmr: Never used zend
[00:19] Brandon_R: it's php so you might not know :)
[00:19] cmr: Ew, php.
[00:19] Brandon_R: lol
[00:19] Brandon_R: yep
[00:19] Brandon_R: in the before times
[00:19] Dmitrijus: txdv: actually, yes ;D
[00:20] Brandon_R: before node.js and evented
[00:20] mc: does a write stream created with createWriteStream never actually emit the 'drain' event?
[00:20] QiBala has joined the channel
[00:20] cmr: Brandon_R: async event loops are nothing new
[00:20] Dmitrijus: yep
[00:20] iRoj has joined the channel
[00:20] ggg: i tried installing with package.json and it never installs all the dependencies, so I tried ssh in my smartmachine and intstall with npm install -g and it still cant start my app, it just doesnt found any apps
[00:20] ggg: modukes*
[00:21] c4milo1 has joined the channel
[00:21] warz: alright cool. ill just install things locally.
[00:21] isaacs: ggg: what kind of smart machine?
[00:21] isaacs: ggg: a no.de thing?
[00:22] isaacs: mc: write streams only emit "drain" if they've returned false from a write() call.
[00:22] txdv: sloccount says that node is 41$ mln worth (including the v8 engine, mostly the v8 engine)
[00:22] mc: i can confirm it's returning false from a write(), but it doesn't appear 'drain' is ever being emitted
[00:22] isaacs: mc: if every write could be flushed, no, there might never be a drain.
[00:22] isaacs: mc: well, then that's a bug :)
[00:22] isaacs: mc: do you have a script to reproduce it? can you write a minimal test that shows this behavior?
[00:22] _unary has joined the channel
[00:23] jakehow has joined the channel
[00:23] mc: let me see if i can reproduce it minimally
[00:24] mc: i was also having issues with fs.write never calling the callback i passed it
[00:25] ggg: yes it is a no,de
[00:25] piscisaureus_ has joined the channel
[00:26] vnguyen has joined the channel
[00:26] ggg: issacs, any clues?
[00:26] skm has joined the channel
[00:28] chjj has joined the channel
[00:28] DTrejo has joined the channel
[00:29] drostie has joined the channel
[00:30] drostie: There is also a funny story about Lisp related to that bootstrapping C idea. Apparently the guy who wrote Lisp was a mathematician who wanted to prove that Lisp was universal, so he wrote a Lisp expression that would evaluate other Lisp expressions with just a small handful of functions.
[00:30] drostie: Someone later said, "hey, why don't I just write those functions in assembly?" and bam, the first Lisp interpreter was born.
[00:31] zzak has left the channel
[00:31] drostie: (sorry if rewinding the convo by 15 minutes is not allowed; I had to run an errand.)
[00:31] pyparadigm has joined the channel
[00:31] cmr: drostie: don't worry about it
[00:32] ggg: my modules cant find my no.de global modules...why?
[00:33] arcanin has joined the channel
[00:33] mehlah has joined the channel
[00:33] Nathan has joined the channel
[00:33] cjm has joined the channel
[00:35] pizthewiz_ has joined the channel
[00:35] skm has joined the channel
[00:35] igl1: ggg: $NODE_PATH set?
[00:35] ggg: found the error
[00:36] ggg: one of the modules was require with ./node_modules/modulename
[00:36] igl: :)
[00:37] CarterL has joined the channel
[00:37] cjm has joined the channel
[00:37] ryanfitz has joined the channel
[00:38] vnguyen has joined the channel
[00:40] Skaag has joined the channel
[00:41] [[zz]] has joined the channel
[00:41] mertimor has joined the channel
[00:41] ggg: ok, it still doesnt work
[00:41] ggg: im using mongoose
[00:41] ggg: and it cant find the mongodb module....
[00:42] ggg: but the mongodb is properly installed in npm threw mongoose
[00:43] silky has joined the channel
[00:43] isaacs: ggg: mongodb is installed for mongoose, you mean, but you can't require() it?
[00:43] isaacs: ggg: if you require() something, it's *your* dependency. you must declare it.
[00:43] ggg: wait
[00:43] ggg: i think ive found the issue
[00:44] kazupon has joined the channel
[00:44] ggg: i need to take off my dependencies in package.json if i want to use global packages??
[00:44] piscisaureus__ has joined the channel
[00:44] MooGoo: german goo girls
[00:44] samBiotic has joined the channel
[00:44] MooGoo: sorry i had to
[00:44] isaacs: ggg: if you require() it, you need to list it in the dependencies in package.json
[00:44] ggg: if i require mongoose
[00:44] ggg: not mongodb
[00:45] isaacs: then put mongoose in your package.json
[00:45] ggg: even if I want to use global modules on my smart machine?
[00:45] ggg: i npm install'ed threw sshg
[00:45] isaacs: ggg: "use global modules" <-- what does that mean?
[00:46] isaacs: ggg: no.de machines will install with --link, so if something is already global, it'll pick up the global one.
[00:46] isaacs: if it's a match
[00:46] ggg: ok
[00:46] isaacs: so you'd have to ssh in and `npm install -g mongoose`
[00:46] ggg: because i have modules in node/lib/node_modules
[00:47] ggg: thats what i mean by global modules
[00:47] ggg: what would be the proper term?
[00:47] isaacs: ggg: yeah, tha'ts correct
[00:47] mc: ..oh
[00:47] mc: the write stream just doesn't emit drain until you stop putting stuff in it
[00:47] towski has joined the channel
[00:48] isaacs: mc: yeah
[00:48] mc: i was trying to block from writing to it until it's drained
[00:48] isaacs: mc: returning false from write() means "please stop writing until i drain. i'll let you know when it's ok again"
[00:48] mc: but apparently that's not working
[00:48] isaacs: mc: it'll buffer in memory if you don't respect it, though
[00:48] isaacs: but tha'ts just not ideal, is all
[00:49] mc: so i've got a function that writes a buffer
[00:49] mc: in the start of that function i check to see if it's already busy
[00:50] mc: set it to busy.. call .write()
[00:50] Brandon_R: hey guys
[00:50] mc: if .write() returns true then i go ahead and set my flag to not busy
[00:50] isaacs: hey, Brandon_R
[00:50] Brandon_R: what do you think is the most important equation in physics?
[00:50] isaacs: mc: sure
[00:50] mc: otherwise it's in the 'drain' event
[00:50] mc: so the 'drain' event triggers and it sets the flag to not busy
[00:50] mc: allegedly
[00:50] mc: but it never triggers..
[00:50] isaacs: mc: you could just implement your thing as a stream, and then pipe to the target
[00:51] isaacs: mc: that's what i usually do
[00:51] mc: that's a thought.. write to my own in-memory stream and pipe it
[00:51] isaacs: mc: if it's busy, do you not write?
[00:51] mc: right
[00:51] isaacs: mc: or do you go ahead and write anyway?
[00:51] mc: if (busy) return;
[00:51] isaacs: also: does the tick end before you call it again?
[00:51] cmr: Brandon_R: why don't you stop asking off-topic questions
[00:51] mc: that, i do not know
[00:51] isaacs: ie, you're not like, while (haveStuffToWrite) writeIfNotBusy()
[00:52] mc: i'm using events
[00:52] isaacs: because that will just get you into a while true loop
[00:52] mc: basically i emit an event with some data
[00:52] Brandon_R: ok
[00:52] EyePulp has joined the channel
[00:52] Brandon_R: why are events better than threads?
[00:52] mc: when i get that event i queue that data to an array and emit the commit event
[00:52] isaacs: Brandon_R: you can ask off topic questions in here.
[00:52] stantona has joined the channel
[00:52] mc: the commit event is what's supposed to write, but only if i'm not busy
[00:52] isaacs: cmr may /ignore you, though
[00:52] isaacs: ;)
[00:52] mc: it does do a ton of emitting though
[00:53] isaacs: mc: it sounds like you're in the process of re-inventing backpressure ;)
[00:53] isaacs: mc: i'd recommend using a stream abstraction. it's a good pattern.
[00:53] mc: yeah.. i'm definitely doing it wrong
[00:53] cmr: Brandon_R: threads and event loops aren't exclusive
[00:53] tomlion has joined the channel
[00:53] mc: i'm going to change my set event to write to an in memory stream
[00:53] JasonSmith: hey isaacs That reminds me, is it acceptable for streams to emit data events with non-string, non-Buffer content?
[00:53] mc: and pipe that stream to my file
[00:53] mc: i hadn't thought of that
[00:53] Brandon_R: is an event + callback just a mini thread if you really look at it
[00:54] cmr: Brandon_R: inefficient use of threads but it could be implemented like that. python's twisted has deferToThread, for example
[00:54] Dmitrijus: Brandon_R: events are better than threading, because generally task switching between processes are quite costly
[00:54] adrianF has joined the channel
[00:55] willwhite has joined the channel
[00:55] JasonSmith: I need backpressure in my Follow package so I want to make it a stream API but it emits objects, not strings
[00:56] Dmitrijus: Brandon_R: and well, event driven stuff is quite exclusive frm threading model :)
[00:56] Me1000 has joined the channel
[00:57] jimt_ has joined the channel
[00:57] cmr: Dmitrijus: you can have events and threads, just needs some management overhead
[00:57] isaacs: JasonSmith: i've done that a few times.
[00:57] isaacs: JasonSmith: node-tap works that way
[00:57] JasonSmith: huh
[00:57] isaacs: JasonSmith: the TapConsumer class takes string/buffer in, and emits data events with result objects.
[00:57] Dmitrijus: cmr: sure you can :) but generally it's quite messy if you do
[00:57] isaacs: JasonSmith: the TapProducer is the reverse.
[00:57] JasonSmith: Usually I'd ask mikeal about streams but he seems to have gotten a real job
[00:57] isaacs: JasonSmith: honestly? it's kind of shitty.
[00:57] jmar777 has joined the channel
[00:57] cmr: Dmitrijus: for example one can spawn a thread to do an operation that needs to be async and have it notify the parent..
[00:58] cmr: Dmitrijus: messy indeed
[00:58] kmiyashiro has joined the channel
[00:58] JasonSmith: emitting objects as data is shitty?
[00:58] isaacs: JasonSmith: it'd be better to have a different event, other than "data", update .pipe() to handle that
[00:58] isaacs: JasonSmith: yeah
[00:58] isaacs: JasonSmith: wiht fstream, for example, I did a different thing
[00:58] isaacs: s
[00:58] JasonSmith: Well what I really want is .pause(), drain events, all that
[00:58] Dmitrijus: cmr: well, i do like purity :)
[00:58] cmr: Me too!
[00:58] Dmitrijus: and keeping it simple! :)
[00:58] JasonSmith: ok thanks again. Also check your email WRT _users
[00:59] isaacs: JasonSmith: right
[00:59] isaacs: yeah, reading it now
[00:59] isaacs: JasonSmith: hey, re: _update as _show
[01:00] isaacs: JasonSmith: so, are you suggesting that we can do the inbox db thing, and then just have the _update function expose the data, if needed?
[01:00] isaacs: JasonSmith: so, for example, I could hit /_users/_design/blah/_update/showme?user=jhs and then have it spit out everything abotu you except your password/hash if i'm not you?
[01:00] isaacs: JasonSmith: in an inbox-db world?
[01:02] JasonSmith: firstly, it's slightly more RESTful: /_users/_design/npmjs/_update/showme/jhs
[01:02] nicholasf has joined the channel
[01:02] JasonSmith: And I'm thinking, if(req.userCtx.name == doc.name) return [null, JSON.stringify(doc)]
[01:03] JasonSmith: right? That is, no change to the doc, and the response is basically exactly as if you had hit /_users/jhs
[01:03] tk has joined the channel
[01:04] JasonSmith: else return [null, {code:400, body:'{"forbidden":"Sorry, not allowed"}'}] // or whatever
[01:04] jimt has joined the channel
[01:05] JasonSmith: I will write that _update function if you want. I will publish it as a Kanso module for the good of all Christendom, and you can either copy/paste or whatever
[01:06] JasonSmith: isaacs: ^^
[01:07] tokuzfunpi has joined the channel
[01:08] cjm has joined the channel
[01:08] kmiyashiro_ has joined the channel
[01:09] xyos has joined the channel
[01:09] isaacs: JasonSmith: that sounds rad
[01:09] isaacs: yes, do that.
[01:09] isaacs: +_1
[01:10] willwhite has joined the channel
[01:12] kmiyashiro_ has joined the channel
[01:13] pancake has joined the channel
[01:14] pancake: what's the "arguments" object for?
[01:14] amigojapan has joined the channel
[01:14] Morgawr has joined the channel
[01:14] cmr: pancake: https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/arguments
[01:16] Morgawr: guys, I have a question... I took someone's code (a starting structure for an express.js webserver) and there's this line in the app.configure(): app.set('secret', 'your secret');
[01:16] pancake: cmr: thanks
[01:16] Morgawr: and later on it does "app.use(express.cookieParser(app.settings.secret));"
[01:16] Morgawr: I know what .use(express.cookieParser()) does
[01:16] Morgawr: but what does that secret thing mean?
[01:17] Morgawr: is it some default pre-set cookie/environment variable or something?
[01:17] Morgawr: so I can store magic numbers and stuff in the application itself?
[01:17] Morgawr: (for password hashes for example... or stuff like that)
[01:18] CoverSlide: cookieparser doesn't take an argument
[01:18] CoverSlide: they are confusing it with express.session
[01:18] Morgawr: CoverSlide: apparently this does
[01:18] Morgawr: and it works
[01:19] Morgawr: https://github.com/stagas/yet-another-express-boilerplate/blob/master/app/server.js this is the code, someone from here gave it to me as a startup for an express.js application
[01:19] TRON_ has joined the channel
[01:19] Morgawr: line 31 and line 46
[01:19] samBiotic has joined the channel
[01:19] CoverSlide: well it doesn't fail if you give it a parameter it doesn't need
[01:19] CoverSlide: it just discards it
[01:20] Morgawr: anyhow, could you please (or someone else) explain me the point of that? I have some difficulties understanding the differences between cookies and sessions...
[01:20] CoverSlide: connect.session uses the secret, not cookieParser
[01:20] neurodrone_ has joined the channel
[01:20] CoverSlide: a session is a collection of settings for a specific user
[01:21] CoverSlide: sessions are stored on the server
[01:21] CoverSlide: cookies are settings stored on a browser
[01:21] CoverSlide: in order for the server to know what session to use, it needs a cookie
[01:21] CoverSlide: which is why cookieparser comes before session
[01:21] CoverSlide: this is required
[01:21] mehlah has joined the channel
[01:22] Morgawr: ah I see.. so basically I can store somekind of "local variable" (or local data) inside a session to be permanent between HTTP request from the user (recognized through a cookie)?
[01:22] CoverSlide: yes
[01:22] Morgawr: http://senchalabs.github.com/connect/middleware-session.html I'm reading this now, apparently secret is calculated for hashes... well, that explains a bit
[01:22] Morgawr: so I take I can just add random values (if I need to store them) to be sure they remain accessible for subsequient requests
[01:22] Morgawr: (by the same user)
[01:23] CoverSlide: yeah
[01:23] Morgawr: ok, that helps a lot, thanks.. :)
[01:23] Morgawr: (sorry for asking a very basic question, but I'm still learning with web development stuff...)
[01:24] rai has joined the channel
[01:24] state_ has joined the channel
[01:24] jimt_ has joined the channel
[01:26] tomlion_ has joined the channel
[01:26] state_: I'm a bit stuck: my req.session variable doesn't function in express. I think I have the middleware configured correctly, and I see the Redis connection get opened. Here's my app.configure: http://pastebin.com/uJHBD4aU
[01:26] cmr: Morgawr: you might want to read up on http, very useful knowledge
[01:26] state_: When I console.log req.session I always get undefined.
[01:27] Morgawr: cmr: weirdly enough, I'm not a newbie with "web development" (the amateur way), I've done web courses in university (CS university) and I pretty much know how the HTTP protocol works and all that yadda yadda
[01:27] Morgawr: but I had never used sessions before
[01:27] Morgawr: and I always thought sessions and cookies were pretty much the same thing
[01:28] cmr: Ah
[01:28] Morgawr: I worked at a project in ruby with sinatra and just used cookies without paying too much attention to "session", however express.js uses both so I was kind of curious
[01:29] jmar777 has joined the channel
[01:34] MatthewS has joined the channel
[01:35] willwhite has joined the channel
[01:40] corpix has joined the channel
[01:40] samBiotic has joined the channel
[01:41] CoverSlide: state_: you might want to put app.router after your express.session
[01:41] state_: CoverSlide: Thanks. I tried that, even tried removing it. No luck.
[01:42] nicholasf has joined the channel
[01:42] CoverSlide: where are you console.log ing?
[01:43] state_: in an app.get
[01:44] state_: it's so weird. it works in another app on the same machine
[01:44] warz: hmm. would anyone happen to know why my second express.js route is not accessible via browser? the root url is visible, but the '/soon' url responds with an "cannot get /soon" message.
[01:44] state_: implemented the same way
[01:44] warz: my code is here, and its was mostly generated by the express application itself, http://dpaste.com/679134/
[01:44] skm has joined the channel
[01:44] state_: warz: put the /soon route above the / route
[01:45] warz: state_, i tried that and it didn't appear to make a difference
[01:45] state_: warz: yeah, i realized that right after i said it
[01:46] mc: what in the hell.. seriously? is the documentation for fs.write wrong?
[01:46] warz: im running this behind nginx, so maybe that has something to do with it.
[01:46] mc: it says i should be able to add a callback
[01:46] mc: but the callback never triggers
[01:46] state_: warz: you're sure that the routes model you've got going is loading?
[01:46] state_: if you make those console.logs do they fire properly?
[01:47] state_: model = module, sorry
[01:47] DTrejo has joined the channel
[01:48] warz: hm, perhaps thats the problem. express just creates a directory called 'routes', with a single 'index.js' inside of it, which appears to be for a single route. so, i just created a second files called 'soon.js', with the other function in it.
[01:48] warz: i'd imagine it's not loading. i'll test.
[01:49] state_: warz: i'm not familiar with that. sounds like you might want to get a sense of the commonjs pattern for loading modules
[01:49] warz: yea, looks like it. it's not loading the other one. to the docs i go.
[01:50] warz: obviously i could put both route functions in the same file, but then all routes would have to go in there. its best i figure out the correct way of doing this, heh.
[01:52] chjj: mc: what is the problem?
[01:52] chjj: mc: you can have a callback for fs.write
[01:54] state_: warz: where you put the routes is up to you. sort of depends on the complexity of the application
[01:54] ger^kallisti_ has joined the channel
[01:56] jmar777 has joined the channel
[01:56] cjm has joined the channel
[02:03] cjm has joined the channel
[02:04] samBiotic has joined the channel
[02:04] rai has joined the channel
[02:05] MatthewS has joined the channel
[02:06] Morgawr: guys, how do I effectively delete a cookie with node.js? I know in ruby I used to just set it to null..but if I set it to "null" or "undefined" in express.js it just gives me the cookie as "null" instead of deleting it...
[02:06] JasonSmith: isaacs: I've got it! I will implement a ChangesStream which sticks to strings. All it will do is chop up the data so you are guaranteed well-formed JSON expressions (and support backpressure)
[02:06] cmr: Morgawr: note that express != node
[02:07] Morgawr: cmr: I figured it would be pretty much the same if I asked in here..
[02:07] aioue has joined the channel
[02:08] cmr: Morgawr: oh sure, but you aren't deleting a cookie with node's http, you want to do it with express, right?
[02:08] Morgawr: cmr: I guess so
[02:08] cmr: Morgawr: you are looking for res.clearCookie
[02:09] Morgawr: cmr: thanks! I guess I should lurk more around...
[02:09] Morgawr: I realize I'm asking stupid questions, I apologise
[02:09] icewhite has joined the channel
[02:09] cmr: Nah, it's fine :)
[02:10] mertimor has joined the channel
[02:10] aioue: mongoose question - http://pastebin.com/cTRpTJxy line 21 is clearly wrong, but what is the correct way?
[02:10] pancake has left the channel
[02:11] cmr: Morgawr: if you haven't seen it yet, http://expressjs.com/guide.html is great
[02:12] Morgawr: cmr: yeah, I had started reading it a few hours ago but then I got distracted (there are so many side-things to study! :) ) that I forgot to finish it
[02:12] Morgawr: hence why I apologized for the stupid question, because I noticed right after that the answer was right there
[02:14] kill has joined the channel
[02:15] devongovett has joined the channel
[02:15] piscisaureus has joined the channel
[02:16] benlyn has joined the channel
[02:17] jmar777 has joined the channel
[02:17] nicholasf has joined the channel
[02:17] nicholasf: so I'm close to using Q so I can clean up (and simplify) my code
[02:17] nicholasf: should I be looking at any other options before I jump in?
[02:17] cmr: What is Q?
[02:19] systemfault: The letter before R :/ (badum tish!)
[02:19] cmr: Dohoho
[02:20] DTrejo has joined the channel
[02:21] nicholasf: https://github.com/kriskowal/q
[02:21] mraleph has joined the channel
[02:25] springmeyer has joined the channel
[02:26] rasyid7 has joined the channel
[02:27] fomatin has joined the channel
[02:28] springmeyer: hey all - I'm at chicago ohare airport in the US
[02:29] springmeyer: and noticing that npmjs.org will not load
[02:29] boehm has joined the channel
[02:29] cmr: Loads for me.
[02:29] springmeyer: I see its working fine for others
[02:29] tbranyen: springmeyer: file an issue with ohare airport repo
[02:29] springmeyer: so, curious if anyone has ideas about what might be blocked?
[02:29] Dmitrijus: dms? ;D
[02:29] Dmitrijus: dns!
[02:29] springmeyer: tbranyen: its not urgent - just curious if anyone might know ideas or workarounds
[02:29] sanjeevkb has joined the channel
[02:30] springmeyer: ping shows this: https://gist.github.com/1537361
[02:31] cmr: springmeyer: try a traceroute
[02:31] springmeyer: cmr, okay, sec
[02:32] springmeyer: cmr: https://gist.github.com/1537372
[02:33] piscisaureus__ has joined the channel
[02:34] springmeyer: wonder if there are any npmjs.org mirrors
[02:36] deedubs has joined the channel
[02:37] deedubs: Is it impossible to install 0.4.7 anymore?
[02:42] zemanel has joined the channel
[02:43] sanjeevkb: does node.js support modules that run their own main loop ?
[02:43] cmr: sanjeevkb: define main loop
[02:44] sanjeevkb: like a gmainloop
[02:44] sanjeevkb: cmr, like a gmainloop
[02:44] cmr: sanjeevkb: I'm not very familiar with glib, let me read up real quick
[02:44] cmr: (that is glib, right?)
[02:45] neoesque has joined the channel
[02:45] deeprogram has joined the channel
[02:45] sanjeevkb: yes
[02:46] cmr: sanjeevkb: you want to run your own event loop? what's wrong with the one node provides? not sure if it's possible, but I'm not all to familiar with node yet
[02:47] rurufufuss has joined the channel
[02:48] criswell has joined the channel
[02:49] sanjeevkb: cmr, well, let's say I want to use gtk and glib infra
[02:50] sanjeevkb: and mix and match them with other infra of node
[02:50] cjm has joined the channel
[02:52] DTrejo has joined the channel
[02:53] jakehow has joined the channel
[02:58] state_ has joined the channel
[02:58] brianseeders has joined the channel
[02:59] boltR has joined the channel
[02:59] rahimster has joined the channel
[02:59] jonbaer has joined the channel
[02:59] state_ has joined the channel
[03:01] azend has joined the channel
[03:04] strevat_ has joined the channel
[03:04] ryanfitz has joined the channel
[03:05] mraleph has joined the channel
[03:06] bulatshakirzyano has joined the channel
[03:08] jaequery has joined the channel
[03:19] kmiyashiro has joined the channel
[03:19] stantona has joined the channel
[03:20] silky has joined the channel
[03:22] rwaldron has joined the channel
[03:29] blueadept has joined the channel
[03:30] postwait has joined the channel
[03:32] Vennril2 has joined the channel
[03:33] kadnare has joined the channel
[03:34] coderdad has joined the channel
[03:36] thalll has joined the channel
[03:36] kadnare: Is anyone using this sdk (https://github.com/sintaxi/node-dbox) to talk to dropbox's api?
[03:37] deeprogram: I saw there are Makefile in node module, what's the file used for ?
[03:37] cmr: deeprogram: the "make" program uses to know how to compile etc the module
[03:37] ryanfitz has joined the channel
[03:38] jacobolus has joined the channel
[03:38] state_: i think i just use some standard oauth stuff to talk to dropbox
[03:39] ryanrolds_ has joined the channel
[03:39] cjm has joined the channel
[03:41] skm has joined the channel
[03:42] coderdad has joined the channel
[03:42] deeprogram has joined the channel
[03:44] DTrejo has joined the channel
[03:46] isaacs: sh1mmer: hey
[03:46] isaacs: sh1mmer: if you've got a sec, i just landed a patch to sax-js that i suspect will make it noticeably faster.
[03:46] isaacs: i'm not sure if it'll be faster enough to beat out expat for your use-case, though
[03:46] ryan_stevens has joined the channel
[03:47] kadnare: I'm using the dbox-node sdk and I'm getting the following error: "OAuthError in API v1 +. Request mis-signed: Invalid signature.
[03:47] kadnare: node-dbox*
[03:48] johnfelix has joined the channel
[03:48] sh1mmer: isaacs:
[03:48] sh1mmer: sure
[03:48] sh1mmer: support buffers now?
[03:48] joshfinnie has joined the channel
[03:48] isaacs: sh1mmer: no
[03:48] isaacs: so there's still the toString overhead
[03:48] sh1mmer: aww
[03:49] isaacs: but i got rid of the indexOf overhead
[03:49] isaacs: (most of it)
[03:49] sh1mmer: let me run my benchmarks again
[03:49] sh1mmer: hm
[03:49] sh1mmer: how much overhead is indexOf?
[03:49] isaacs: according to the profiling, most of it
[03:49] isaacs: i do a lot of checking whether a given char is in a specific set of chars
[03:49] sh1mmer: ah
[03:49] isaacs: and was doing that by having a big string, and checking if class.indexOf(char) === -1
[03:50] isaacs: i changed it to build up the classes and then do class = class.split("").reduce(function (set, c) { set[c] = true; return set }, {}) so that now i can just test class[char] rather than using indexOf
[03:50] sh1mmer: updates on npm?
[03:50] isaacs: sh1mmer: no, it's just in git so far
[03:50] sh1mmer: ok, sec
[03:52] dilvie has joined the channel
[03:54] webguynow has left the channel
[03:55] nicholasf has joined the channel
[03:55] sh1mmer: isaacs: congrats!
[03:55] sh1mmer: a 50% improvement
[03:55] isaacs: nice!
[03:55] isaacs: ok, i'm gonna go ahead and publish that, then
[03:55] mbrevoort has joined the channel
[03:55] sh1mmer: wait,
[03:55] sh1mmer: I read the wrong figure
[03:55] sh1mmer: ACTION runs it again
[03:56] isaacs: ACTION ...
[03:57] isaacs: if you're running a test from start to finish over and over again, then it won't improve. but if yor'e doing enough parsing to make startup negligible, then it should be an improvement.
[03:57] isaacs: the startup time will be a little bit longer now
[03:57] sh1mmer: I read seconds as req/sec
[03:57] sh1mmer: because I'm silly
[03:57] isaacs: ah
[03:57] isaacs: so it got 50% slower?
[03:57] isaacs: ;P
[03:58] sh1mmer: No. It saw marginal improvement, but not 50%
[03:58] sh1mmer: Going to publish the benchmarks, etc next week probably
[03:58] sh1mmer: Need approval from someone on holiday
[03:58] sh1mmer: Maybe 5% on a very large XML document
[03:58] Dreamer3 has joined the channel
[03:58] MUILTR has joined the channel
[03:59] sh1mmer: negligible on my workload because of the startup time
[03:59] sh1mmer: I might look at doing helping with a buffers port, but right now expat seems like what we need
[04:01] dr0id has joined the channel
[04:02] DTrejo has joined the channel
[04:04] enmand has joined the channel
[04:08] ryan_stevens has joined the channel
[04:08] LukeBrookhart has joined the channel
[04:09] dgathright has joined the channel
[04:09] davidwalsh has joined the channel
[04:11] johnfelix has left the channel
[04:14] dec: can anyone explain how 'this' is different from 'module'?
[04:15] dec: is 'this' a current instance of a module whereas 'module' is just a generic reference to the module?
[04:15] sh1mmer: Did anyone take a look at http://www.nruns.com/_downloads/advisory28122011.pdf
[04:16] sh1mmer: any thoughts?
[04:19] josh-k has joined the channel
[04:20] gigafied has joined the channel
[04:21] kadnare: state_, are you calling oauth_callbacks during development?
[04:21] kadnare: It is it even possible to redirect back to localhost?
[04:24] BillyBreen has joined the channel
[04:26] MrMaksimize has joined the channel
[04:27] aioue has joined the channel
[04:28] luke` has joined the channel
[04:30] nicholasf has joined the channel
[04:30] sh1mmer: yay npm
[04:30] sh1mmer: link is awesome
[04:32] jstash has joined the channel
[04:33] captain_morgan has joined the channel
[04:34] boltR has joined the channel
[04:35] madhums has joined the channel
[04:36] tseNkiN has joined the channel
[04:43] corpix has joined the channel
[04:46] nicholasf has joined the channel
[04:46] corpix has joined the channel
[04:46] criswell has joined the channel
[04:49] DTrejo has joined the channel
[04:49] Shaunzie has joined the channel
[04:56] MatthewS has joined the channel
[05:03] bulatshakirzyano has joined the channel
[05:05] jdparker has joined the channel
[05:07] thisandagain has left the channel
[05:08] jonbaer has joined the channel
[05:11] gavin_huang has joined the channel
[05:11] azend has joined the channel
[05:13] Pilate has joined the channel
[05:15] fireolive has joined the channel
[05:16] fireolive has left the channel
[05:16] dantalizing has joined the channel
[05:16] azend has joined the channel
[05:20] lz1 has joined the channel
[05:21] lz1: has anyone used cluster.exception before
[05:25] jamescarr has joined the channel
[05:29] pizthewiz: hmm, am i incorrect in thinking that https.request functions almost exactly exactly like the http module's version? i have a set of options that i can issue a request with just fine on http but the same set with https gives me an error { [Error: socket hang up] code: 'ECONNRESET' }
[05:31] nicholasf has joined the channel
[05:31] niftylettuce_ has joined the channel
[05:36] Shaunzie has joined the channel
[05:36] jonbaer has joined the channel
[05:39] dubenstein has joined the channel
[05:40] phluffy has joined the channel
[05:47] joeyang has joined the channel
[05:47] boltR has joined the channel
[05:48] hotchkiss has joined the channel
[05:49] deeprogram_ has joined the channel
[05:50] joshsmith has joined the channel
[05:52] pizthewiz: yep they should be, i apparently wasn't switching between each properly: var selectedModule = port == 443 ? https : http;
[05:57] ericnakagawa has joined the channel
[06:00] fomatin has joined the channel
[06:00] corpix has joined the channel
[06:04] EyePulp has joined the channel
[06:04] jakehow has joined the channel
[06:05] ryanfitz has joined the channel
[06:05] gigafied has joined the channel
[06:06] rohitcolinrao has joined the channel
[06:06] rohitcolinrao: sup dudes, happy friday
[06:07] Shaunzie: O.o wtf… how is it friday already ._.
[06:07] rohitcolinrao: so i implemented a connection via socket.io/node/express today, and successfully sent some messages back n forth from the client to server and vice versa…
[06:07] rohitcolinrao: however
[06:07] pquerna: friday, friday, friday
[06:07] rohitcolinrao: i'm not finding much on security for working with sockets
[06:07] Shaunzie: rohitcolinrao: security?
[06:07] rohitcolinrao: i.e. anyone know how i would validate a client on the server?
[06:08] Shaunzie: rohitcolinrao: what do you mean by "validate"?
[06:08] sh1mmer: pquerna: do you know when the destructor on an object wrapped with ObjectWrap is called? When it's out of scope?
[06:08] rohitcolinrao: also, how i would protect my server against potential security vulnerabilities.. for example, whats to stop someone from creating a client and connecting to my server socket directly?
[06:09] rohitcolinrao: sorry by validate i mean authenticate
[06:09] pquerna: sh1mmer: when v8 decides to GC it
[06:09] sh1mmer: pquerna: right, but when it's out of scope?
[06:09] vnguyen has joined the channel
[06:09] pquerna: well
[06:09] pquerna: it depends on the gc
[06:09] pquerna: but in concept, yes
[06:09] cmr: rohitcolinrao: you need to implement your own protocol, or find a library that does it for you.
[06:09] sh1mmer: Is there a penalty in releasing managed memory early?
[06:10] pquerna: there have been various issues in the past with these type ofobjects getting into the old gen or such when they shouldn't so it wouldn't always aggressively GC them
[06:10] sh1mmer: I'm working on the expat binding
[06:10] rohitcolinrao: ah i see
[06:10] sh1mmer: and it seems like I can destroy the expat parser when end() is caled
[06:10] pquerna: yes
[06:10] pquerna: its probally fine to do that
[06:10] pquerna: destroy it, set it null
[06:10] pquerna: if ~ is called
[06:10] pquerna: and not null, also kill it
[06:11] sh1mmer: that's a good call
[06:13] sh1mmer: rohitcolinrao: are you using any frameworks
[06:13] fangel has joined the channel
[06:13] sh1mmer: rohitcolinrao: express for example has a number of plugins to do various kinds of authentication
[06:14] rohitcolinrao: ok, that being said, anyone have any idea on what a design for implementing socket security would be? for example: if i open a socket.io connection via client script, what's a good way to protect against malicious clients? tokens could be readable by anyone so can't send a token or something from the client/browser? set a session on the server and connect it to the logged on client? i'm still trying to wrap my head around it
[06:14] rohitcolinrao: yes i'm using express for now
[06:14] level09 has joined the channel
[06:14] rohitcolinrao: but i'm not looking to do standard authentication from a browser to the server
[06:14] Shaunzie: rohitcolinrao: SSL?
[06:15] sh1mmer: SSL seems like an obvious start
[06:15] rohitcolinrao: i'm looking to make sure my socket.io connection has some type of auth
[06:15] sh1mmer: along with some kind of authentication token on the page
[06:15] rohitcolinrao: yes i thought about ssl and yes i think it's a start
[06:15] rohitcolinrao: that's encryption tho
[06:15] rohitcolinrao: right,
[06:15] rohitcolinrao: ok
[06:16] rohitcolinrao: ok, so an encrypted auth token of some sort is what you're suggesting
[06:16] rohitcolinrao: a client-side token that autos against the server on connection of the socket
[06:16] rohitcolinrao: autos = auths
[06:17] sh1mmer: yep
[06:17] sh1mmer: print something in the web page when it loads
[06:17] fomatin has left the channel
[06:18] sh1mmer: and then have the javascript use that to start the socket session
[06:18] rohitcolinrao: yeah, i'm trying to think of if there would be a way to xss something like that
[06:18] jhurliman has joined the channel
[06:18] rohitcolinrao: even through ssl
[06:18] sh1mmer: you can't XSS it unless there is already an XSS on the site
[06:19] sh1mmer: XSS often involves tricking a browser into making a request in which cookies authenticate
[06:19] sh1mmer: which is why another factor is important
[06:19] rohitcolinrao: not necessarily
[06:19] rohitcolinrao: i mean
[06:19] sh1mmer: because cookies are sent automagically
[06:19] wedtm has joined the channel
[06:19] rohitcolinrao: if a hacker gets access to my auth token, they can successfully authenticate to my socket server
[06:20] rohitcolinrao: they don't need a cookie
[06:20] sh1mmer: these are one time tokens
[06:20] sh1mmer: per user
[06:20] sh1mmer: or rather per page hit
[06:20] rohitcolinrao: ok
[06:20] rohitcolinrao: how could they be validated then?
[06:20] rohitcolinrao: as authentic
[06:20] sh1mmer: how do you authenticate your uses normally?
[06:21] rohitcolinrao: well i don't have to deal with an open socket normally… usually it's a standard user/pass type thing
[06:21] sh1mmer: and then you set a session token
[06:21] rohitcolinrao: sure
[06:21] sh1mmer: so hash and salt or hmac or whatever the session token with a timestamp
[06:21] sh1mmer: send the timestamp and the hash
[06:21] rohitcolinrao: right
[06:21] sh1mmer: and the you can validate it on the server by looking in the cookie jar and recomputing
[06:21] rohitcolinrao: ok… alright
[06:22] guybrush has joined the channel
[06:22] sh1mmer: this is really very standard
[06:22] rohitcolinrao: there's some work involved, but looks doable
[06:22] sh1mmer: whenever you say change account settings on your gmail or whatever
[06:22] sh1mmer: that kind of stuff
[06:22] rohitcolinrao: yeah
[06:22] sh1mmer: ACTION used to work for Yahoo
[06:23] rohitcolinrao: well… the issue tho is when that happens normally, the data isn't sent or placed in client script (like the connection information for my socket)
[06:23] rohitcolinrao: it's generally a post
[06:23] rohitcolinrao: couple of course with ssl
[06:23] sh1mmer: doesn't matter
[06:23] sh1mmer: you just need to print the information in the page that's going to post
[06:23] sh1mmer: or drop it in a stand-alone script
[06:23] rohitcolinrao: yeah i can dig i
[06:23] rohitcolinrao: it
[06:24] sh1mmer: like
[06:24] sh1mmer: and now I'm going back to my C++
[06:24] sh1mmer: enjoy :)
[06:24] rohitcolinrao: ok so that's really where my issue exists
[06:25] rohitcolinrao: that's client side script
[06:25] willwhite has joined the channel
[06:25] rohitcolinrao: ssl doesn't encrypt that unless you're on port 443
[06:25] rohitcolinrao: what's to stop anyone from just viewing it and getting the token?
[06:25] nicholasf has joined the channel
[06:27] sh1mmer: ugh
[06:27] sh1mmer: they can get their own token
[06:27] sh1mmer: but unless you have some other XSS bug on your pages
[06:27] sh1mmer: the contents of the page is inaccessible
[06:27] rohitcolinrao: no man
[06:27] rohitcolinrao: if they get the token they can get the content
[06:28] sh1mmer: *sigh*
[06:28] sh1mmer: look, sorry
[06:28] sh1mmer: if someone authenticates
[06:28] sh1mmer: with user/pass
[06:28] sh1mmer: only they can view those pages correct?
[06:28] sh1mmer: then if you print a token on those pages it's secure
[06:29] sh1mmer: because you don't have any other XSS bugs that would allow an attack vector to steal it
[06:29] sh1mmer: and then use it to break the socket connection
[06:29] rohitcolinrao: well yes, but that will work ONLY for user authentication sessions
[06:29] sh1mmer: no
[06:29] rohitcolinrao: that means that i can't open a socket unless a user actually sends a user/pass
[06:29] sh1mmer: that was just an example
[06:30] sh1mmer: if you don't have an XSS bug on your site in general this technique works fine
[06:31] azend has joined the channel
[06:32] stagas has joined the channel
[06:33] idea-squirrel has joined the channel
[06:35] ryanrolds: I love benchmarking some code before it goes to production and finding that serves 20 requests/sec @ 100 concurrent requests.
[06:37] tseNkiN has left the channel
[06:40] rohitcolinrao: ok, thought it through a bit more and the issue is still there: here is why: 1. even with ssl, all client side code is readable by anyone. 2. a socket connection is opened via client side code. 3. we can't send the server sensitive auth information because it would be stored in client side code, readable by anyone, and thus making the entire connection vulnerable. where is the disconnect here?
[06:40] corpix has joined the channel
[06:41] CIA-109: libuv: 03Ryan Dahl 07master * r3dd4ecb 10/ (src/unix/internal.h src/unix/process.c): unix: expose uv__make_socketpair, uv__make_pipe in unix/internal.h - http://git.io/WOiyjg
[06:41] CIA-109: libuv: 03Ryan Dahl 07master * r5cc6090 10/ (6 files in 5 dirs):
[06:41] CIA-109: libuv: Add uv_pipe_pair for communication between threads
[06:41] CIA-109: libuv: This is only the Unix implementation and test. - http://git.io/NtoVWg
[06:44] kazupon has joined the channel
[06:45] Jay has joined the channel
[06:47] stagas has joined the channel
[06:48] jaequery has joined the channel
[06:48] ChrisMatthieu has joined the channel
[06:49] caffine has joined the channel
[06:50] disappearedng has joined the channel
[06:51] disappea_ has joined the channel
[06:52] bitwalker has joined the channel
[07:00] isaacs has joined the channel
[07:02] smgt has joined the channel
[07:02] tonymilne has joined the channel
[07:14] confoocious has joined the channel
[07:14] confoocious has joined the channel
[07:17] stagas has joined the channel
[07:21] pyparadigm has joined the channel
[07:23] azend has joined the channel
[07:26] shedinja has joined the channel
[07:29] MerlinDMC has joined the channel
[07:32] stagas has joined the channel
[07:32] azend has joined the channel
[07:36] CrawfordComeaux has joined the channel
[07:38] davehamptonusa has joined the channel
[07:38] davehamptonusa has left the channel
[07:48] Morkel has joined the channel
[07:50] sarlalian has joined the channel
[07:51] ditesh|cassini has joined the channel
[07:56] davehamptonusa has joined the channel
[07:56] davehamptonusa has left the channel
[07:57] stagas has joined the channel
[08:01] rendar has joined the channel
[08:05] braoru has joined the channel
[08:07] mattgifford has joined the channel
[08:16] jaequery has joined the channel
[08:18] swestcott has joined the channel
[08:19] admc has joined the channel
[08:22] jredville has joined the channel
[08:26] kraft has joined the channel
[08:27] luke` has joined the channel
[08:28] xyos has joined the channel
[08:28] Druide_ has joined the channel
[08:29] brianloveswords has joined the channel
[08:29] mattgifford has joined the channel
[08:30] otakutomo has joined the channel
[08:30] McMAGIC--Copy has joined the channel
[08:33] shinuza has joined the channel
[08:35] HT has joined the channel
[08:35] andrewfff has joined the channel
[08:36] Wizek has joined the channel
[08:37] Wizek-other has joined the channel
[08:39] mytrile has joined the channel
[08:41] jbpros has joined the channel
[08:43] hipsters_ has joined the channel
[08:44] Edy has joined the channel
[08:44] Edy has joined the channel
[08:45] Fannon has joined the channel
[08:47] ditesh|cassini has joined the channel
[08:50] jaequery has joined the channel
[08:52] pyparadigm has joined the channel
[08:53] eliasp has joined the channel
[08:53] eliasp: hi
[08:53] level09 has joined the channel
[08:53] Shaunzie: an young
[08:54] eliasp: I'm just getting my feet wet building a node module... http://pastie.org/3094831 what's wrong here (see CLI output at the end of the nopaste)?
[08:54] Shaunzie: devices i sundefined
[08:54] eliasp: Shaunzie: sure, but why? isn't it exported together with PulseAudio?
[08:54] duffman has joined the channel
[08:56] Shaunzie: var a = PulseAudio();
[08:56] Shaunzie: a.devices()
[08:57] igl: try http://pastie.org/3094856
[08:58] Shaunzie: igl: same problem. needs to create a new PulseAudio object in order to access the devices function
[08:58] eliasp: igl: doesn't work...
[08:58] igl: ah he uses proto
[08:58] igl: ^^
[08:58] Shaunzie: yesir :3
[08:58] eliasp: Shaunzie: hmm, you mean my problem lies within my testnode.js ... hmm
[08:59] Shaunzie: eliasp: yes. instantiate PulseAudio ad then you can call the devices function
[08:59] igl: so no biggy
[08:59] martndemus has joined the channel
[08:59] igl: var pulseaudio = new require('./pulseaudio.js');
[09:00] SamuraiJack has joined the channel
[09:01] eliasp: igl: hmm, no... not really :( http://pastie.org/3094867
[09:01] aliem has joined the channel
[09:02] eliasp: I'm slightly confused by the JS way to do OOP... used to Ruby and Perl ;)
[09:02] igl: pulseaudio is still wrong
[09:02] igl: exports.PulseAudio is wrong
[09:02] eliasp: ah, right ;)
[09:02] Shaunzie: eliasp: you also don't need the .js extension :3
[09:02] eliasp: ok
[09:03] cmr: I must say, I prefer the prototype way though it does take some getting used to.
[09:03] Shaunzie: new require('./pulseaudio')
[09:04] igl: or Obj.creat and remove the new again http://pastie.org/3094877
[09:04] hipsters_ has joined the channel
[09:05] eliasp: igl: thanks, trying that
[09:06] shinuza has joined the channel
[09:06] eliasp: igl: fantastic... it works this way!
[09:06] igl: :)
[09:07] eliasp: igl: I don't care which method I use to get it working... whatever floats my boat ;)
[09:07] igl: well keep in mind object create uses defined properties
[09:07] igl: see: value:"", enumberable:true
[09:08] eliasp: I see... instead of this.foobar but what (dis)advantages does this have?
[09:08] eliasp: these properties are still accessible from within the module methods, right?
[09:09] igl: yes but now you can choose if they are
[09:09] martndemus has joined the channel
[09:09] eliasp: igl: ah, great... something I was looking for previously
[09:09] igl: enumerable: True if and only if this property shows up during enumeration of the properties on the corresponding object. Defaults to false.
[09:10] igl: false, and it wont come up in a for in
[09:10] igl: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty
[09:10] eliasp: igl: thanks a lot
[09:12] igl: hf
[09:12] adambeynon has joined the channel
[09:14] tytsim has joined the channel
[09:14] neshaug has joined the channel
[09:19] LeMike has joined the channel
[09:19] caolanm has joined the channel
[09:21] tonymilne has joined the channel
[09:22] stagas has joined the channel
[09:26] devaholic has joined the channel
[09:31] `3rdEden has joined the channel
[09:32] stagas has joined the channel
[09:32] stonebranch has joined the channel
[09:37] lzskiss has joined the channel
[09:39] socketio\test\48 has joined the channel
[09:40] QiBala1 has joined the channel
[09:41] richardr has joined the channel
[09:42] richardr: What's a solid application structure to follow for new Node.js applications?
[09:43] Shaunzie: richardr: http:///www.expressjs.com
[09:44] skm has joined the channel
[09:45] richardr: Shaunzie: What about at a higher level, so you have ExpressJS what's a solid approach to structure the application together. E.g. src/middleware, src/views, etc ?
[09:46] lzskiss has joined the channel
[09:46] Shaunzie: richardr: mm the structure out of the box is pretty much solid. It's lightweight, so it allows for as much flexibility as needed.
[09:47] Shaunzie: Take a look at the examples (https://github.com/visionmedia/express/tree/master/examples) if you want suggestions
[09:47] Shaunzie: many of the examples are pretty usefull
[09:47] Shaunzie: -l
[09:47] igl: would look up NODE_ENV in the express docs aswell
[09:47] igl: handy
[09:48] richardr: Thanks that is exactly what I was after. :)
[09:48] Shaunzie: ^_^
[09:48] sylvinus has joined the channel
[09:50] Nss has joined the channel
[09:51] clarkfischer has joined the channel
[09:52] churp has joined the channel
[09:52] mytrile has joined the channel
[09:58] ger^kallisti has joined the channel
[10:00] tonymilne has joined the channel
[10:01] eddyb: #28c3
[10:02] stagas has joined the channel
[10:03] munro has joined the channel
[10:05] sylvinus_ has joined the channel
[10:07] ph^ has joined the channel
[10:10] AvianFlu has joined the channel
[10:13] jimt has joined the channel
[10:15] jomoho has joined the channel
[10:15] Nassosdim has joined the channel
[10:17] sylvinus has joined the channel
[10:17] kulor-uk has joined the channel
[10:19] fly-away has joined the channel
[10:19] bulatshakirzyano has joined the channel
[10:20] deeprogram has joined the channel
[10:20] superjudge has joined the channel
[10:21] deeprogram has joined the channel
[10:27] stagas has joined the channel
[10:29] larsschenk has joined the channel
[10:29] larsschenk has left the channel
[10:30] fangel has joined the channel
[10:31] fly-away has joined the channel
[10:31] tytsim has joined the channel
[10:32] mara has joined the channel
[10:34] mara_ has joined the channel
[10:36] benlyn has joined the channel
[10:37] mraleph has joined the channel
[10:39] metalball2 has joined the channel
[10:44] pors has joined the channel
[10:45] aaronmcadam has joined the channel
[10:47] stagas has joined the channel
[10:50] mytrile has joined the channel
[10:50] mange has joined the channel
[10:51] martndemus has joined the channel
[10:52] akter has joined the channel
[10:52] Juan77 has joined the channel
[10:55] zilch has joined the channel
[10:55] iFire` has joined the channel
[10:58] Skola has joined the channel
[11:07] stagas has joined the channel
[11:09] pors has joined the channel
[11:09] Blorb has joined the channel
[11:12] paq has joined the channel
[11:12] arnorhs has joined the channel
[11:13] pors has joined the channel
[11:16] d0k has joined the channel
[11:17] liar has joined the channel
[11:17] pig_ has joined the channel
[11:21] CrypticSwarm has joined the channel
[11:21] pors has joined the channel
[11:21] hellp has joined the channel
[11:22] quijote has joined the channel
[11:22] mytrile has joined the channel
[11:27] joshfinnie has joined the channel
[11:28] tanepiper has joined the channel
[11:28] cclarke has joined the channel
[11:29] bergie has joined the channel
[11:33] amigojapan has joined the channel
[11:37] hipsters_ has joined the channel
[11:37] mytrile has joined the channel
[11:38] whitman has joined the channel
[11:44] _root_ has joined the channel
[11:44] herbySk has joined the channel
[11:44] booo has joined the channel
[11:45] amigojapan has joined the channel
[11:45] d0k has joined the channel
[11:47] robhawkes has joined the channel
[11:47] satyr has joined the channel
[11:48] kazupon has joined the channel
[11:49] mehlah has joined the channel
[11:57] cognominal_ has joined the channel
[11:57] thalll has joined the channel
[11:59] tommyvyo has joined the channel
[12:10] broofa has joined the channel
[12:11] Dreamer3 has joined the channel
[12:13] screenm0nkey_ has joined the channel
[12:16] Heisenmink has joined the channel
[12:18] screenm0nkey_: I having troubles installing the jshint package using npm on windows. I've pasted the error message here. https://gist.github.com/1539583 if anyone can help.
[12:19] kulor-uk has joined the channel
[12:19] wingie has joined the channel
[12:19] wingie: is there a way to check for the latest versions of my packages used in package.json?
[12:20] _root_ has joined the channel
[12:20] wingie: so i don't have to manually check each package by "npm show " to see if i need to bump the version in package.json or not
[12:24] plutoniix has joined the channel
[12:30] scriptle has left the channel
[12:30] ditesh|cassini has joined the channel
[12:32] Morkel has joined the channel
[12:33] Nathan_ has joined the channel
[12:35] sardaven has joined the channel
[12:37] josh-k has joined the channel
[12:38] ovaillancourt has joined the channel
[12:39] arcanin has joined the channel
[12:40] piscisaureus_ has joined the channel
[12:43] tomasztomczyk has joined the channel
[12:45] martin_sunset has joined the channel
[12:47] eddyb: http://beta.etherpad.org/
[12:50] jbpros has joined the channel
[12:56] kyonsalt has joined the channel
[13:00] Nopik has joined the channel
[13:02] OneOfOne has joined the channel
[13:02] Nopik: hi
[13:07] tomtomaso has joined the channel
[13:07] _root_ has joined the channel
[13:07] paq has joined the channel
[13:09] piscisaureus__ has joined the channel
[13:10] TheJH has joined the channel
[13:12] ranza_: How would i escape a path to a file that includes ! and () like /some/path/to/My/file/Alexisonfire/Watch Out! (Proper Retail)
[13:13] kyonsalt has joined the channel
[13:13] Cromulent has joined the channel
[13:14] fangel has joined the channel
[13:14] ranza_: if i do a simple fs.createReadStream(path) it'll fail, but if i add encoding: 'utf8' as option it'll read it but it wont get anything back
[13:17] brianseeders has joined the channel
[13:18] liar has joined the channel
[13:18] enmand has joined the channel
[13:20] bshumate has joined the channel
[13:20] bshumate has joined the channel
[13:20] draginx has joined the channel
[13:22] koo3 has joined the channel
[13:26] catshirt has joined the channel
[13:34] kn0where has joined the channel
[13:34] ditesh has joined the channel
[13:36] jamescarr has joined the channel
[13:37] bkaney has joined the channel
[13:37] cjm has joined the channel
[13:39] neurodrone has joined the channel
[13:41] fairwinds has joined the channel
[13:43] raincole has joined the channel
[13:44] kyonsalt has joined the channel
[13:45] erichynds has joined the channel
[13:45] subbyyy has joined the channel
[13:48] mandric has joined the channel
[13:48] subbyyy has joined the channel
[14:02] metalball2 has joined the channel
[14:05] aaronmcadam has joined the channel
[14:06] AaronMT has joined the channel
[14:06] AAA_awright: ranza_: You don't
[14:07] AAA_awright: What code are you using? Are you checking err?
[14:08] shinuza has joined the channel
[14:09] ranza_: AAA_awright: im using createreadstream, and when ever a file has a ! it'll call the error event
[14:09] AAA_awright: Exact error messages would help
[14:10] aaronmcadam has joined the channel
[14:11] _root_ has joined the channel
[14:11] ranza_: AAA_awright: right sorry, EBADF, bad file descriptor
[14:12] bkaney has joined the channel
[14:12] AAA_awright: fs.createReadStream doesn't use a file descriptor... What code are you using?
[14:13] tytsim_ has joined the channel
[14:13] deedubs has joined the channel
[14:14] lazyshot has joined the channel
[14:14] aioue has joined the channel
[14:15] postwait has joined the channel
[14:16] stagas has joined the channel
[14:17] erichynds has joined the channel
[14:17] tytsim_ has joined the channel
[14:21] kriszyp has joined the channel
[14:22] Poetro has joined the channel
[14:22] devdazed has joined the channel
[14:26] AaronMT_ has joined the channel
[14:26] rwaldron has joined the channel
[14:26] devongovett has joined the channel
[14:30] mikl1 has joined the channel
[14:33] ranza_: AAA_awright: https://gist.github.com/1540109 ive rearranged the code a bit but now im getting a different error on events. Maybe i should rearrange it even more
[14:34] metalball2 has joined the channel
[14:35] AAA_awright: ranza_: You're not doing anything with the data
[14:36] AAA_awright: ranza_: You should also be using 'end'
[14:37] ranza_: AAA_awright: no the musicmetadata module takes a stream as input
[14:37] AAA_awright: ranza_: Well then why are you using the data event/
[14:37] cognominal___ has joined the channel
[14:37] AAA_awright: You're going to end up calling it several times for each data event, with the same stream
[14:39] AAA_awright: If it really takes a stream as an argument then you should be calling parse(reader) right after you create the reader stream
[14:39] ranza_: AAA_awright: because i want to ensure that i have data before passing the file?
[14:39] Salam has joined the channel
[14:39] ranza_: AAA_awright: what if the createreadstream fails?
[14:39] ranza_: i would need to catch that somehow
[14:39] AAA_awright: ranza_: In which case some of the data has already been read, so parse won't get that if it hooks onto the data event after that
[14:40] AAA_awright: Well then attach your own err event
[14:40] LukeBrookhart has joined the channel
[14:40] AAA_awright: *error
[14:41] AAA_awright: ranza_: data is going to be called as many times as necessary to pass all of the data blocks, and once it's called with one part of data there's now way to hook to the event and get it again
[14:41] ranza_: AAA_awright: http://i.imgur.com/na0TV.png
[14:42] captain_morgan has joined the channel
[14:42] ranza_: AAA_awright: is that what you mean?
[14:42] CarterL has joined the channel
[14:43] AAA_awright: ranza_: The fact it's complaining the header isn't found suggests you're missing at least the first block of data. Then when it's complaining bad file descriptor you're probably reading after the file has been closed (or something like that)
[14:43] ranza_: AAA_awright: now im parsing the stream directly and only hooking in on the error
[14:44] AAA_awright: Where is the musicmetadata module hosted?
[14:44] ranza_: https://github.com/leetreveil/node-musicmetadata
[14:45] level09 has joined the channel
[14:45] ranza_: its only failing on files with weird characters. Thats why i asked if ! or ( would somehow make createreadstream fail
[14:46] AAA_awright: That has to be a coincidence
[14:46] AAA_awright: There's no way that code should have worked at all
[14:46] ranza_: hah :)
[14:47] ranza_: oh my
[14:50] [[zzz]] has joined the channel
[14:50] ditesh has joined the channel
[14:53] blup has joined the channel
[14:54] ranza_: AAA_awright: but how can it be a coincidence if its the same files that it fails to read? Im not reading a new file before ive closed the first one
[14:54] jimt has joined the channel
[14:54] AAA_awright: ranza_: I'm not sure, it might be conditional based on the file data
[14:54] ChrisMatthieu has joined the channel
[14:55] davidwalsh has joined the channel
[14:55] andrewfff has joined the channel
[14:56] ranza_: AAA_awright: so its not totally wrong what im doing here?
[14:57] quijote has joined the channel
[14:57] aaronmcadam has joined the channel
[14:58] AAA_awright: ranza_: You were just attaching to the data event that's all
[14:59] Poetro has left the channel
[14:59] jbpros has joined the channel
[14:59] Poetro has joined the channel
[15:02] aaronmcadam has joined the channel
[15:02] ranza_: AAA_awright: is there anything i can do to figure out why it fails to read those files?
[15:02] ranza_: i mean, can i get a better error description somehow
[15:03] AAA_awright: Keep eliminating bugs? How many files are you reading per process? Or better, console.log the file you're currently reading
[15:05] ranza_: im using foreachseries so only one at the time :) Ill try outputting some more data
[15:05] ranza_: thanks
[15:05] [[zz]] has joined the channel
[15:06] barberdt has joined the channel
[15:06] barberdt has joined the channel
[15:07] joshfinnie has joined the channel
[15:07] e-gineer has joined the channel
[15:10] idle-boy has joined the channel
[15:10] AndreasMadsen has joined the channel
[15:11] frogstarr78 has joined the channel
[15:14] jaha has joined the channel
[15:16] Cromulent has joined the channel
[15:17] mbrevoort has joined the channel
[15:18] enmand has joined the channel
[15:18] Destos has joined the channel
[15:21] stantona has joined the channel
[15:21] ryanfitz has joined the channel
[15:21] _root_ has joined the channel
[15:22] shinuza has joined the channel
[15:22] jstash has joined the channel
[15:23] fermion has joined the channel
[15:25] PPaul has joined the channel
[15:26] kyonsalt_SSyxq has joined the channel
[15:26] jamescarr has joined the channel
[15:28] arcanis has joined the channel
[15:28] tytsim has joined the channel
[15:29] magnetik has joined the channel
[15:29] magnetik: Hi
[15:33] aelien27 has joined the channel
[15:34] cclarke has joined the channel
[15:34] PPaul has joined the channel
[15:37] cclarke has joined the channel
[15:38] boltR has joined the channel
[15:39] metalball2 has joined the channel
[15:41] ben_alman has joined the channel
[15:44] NightExcessive has joined the channel
[15:44] lz1 has joined the channel
[15:46] goshakkk has joined the channel
[15:46] stagas has joined the channel
[15:46] meso_ has joined the channel
[15:47] cclarke has joined the channel
[15:48] bradleymeck has joined the channel
[15:52] plutoniix has joined the channel
[15:52] djQuery has joined the channel
[15:53] djQuery: anyone seen a plugin for visual studio to get node.js autocomple working?
[15:54] erichynds has joined the channel
[15:54] mraleph1 has joined the channel
[15:54] N0va` has joined the channel
[15:56] Vennril has joined the channel
[15:59] iRoj has joined the channel
[15:59] carlyle has joined the channel
[16:00] bnoordhuis has joined the channel
[16:04] AndreasMadsen has joined the channel
[16:05] ChrisMatthieu has joined the channel
[16:05] level09 has joined the channel
[16:05] kyonsalt has joined the channel
[16:06] brianc1 has joined the channel
[16:06] FIQ has joined the channel
[16:06] aioue has joined the channel
[16:07] mange has joined the channel
[16:08] Squeese has joined the channel
[16:10] jamesbathgate has joined the channel
[16:10] nphase has joined the channel
[16:10] NightExcessive has left the channel
[16:11] metalball2 has joined the channel
[16:11] blueadept has joined the channel
[16:12] CIA-109: node: 03Ben Noordhuis 07v0.6 * r8b2abed 10/ benchmark/http_simple.js :
[16:12] CIA-109: node: bench: add /echo endpoint to http_simple
[16:12] CIA-109: node: Copies the POST request data verbatim into the response body. - http://git.io/K5uIpA
[16:12] davidwalsh has joined the channel
[16:12] mattgifford has joined the channel
[16:12] ByteCrunch has joined the channel
[16:13] dgathright has joined the channel
[16:16] raincole has joined the channel
[16:16] arcanin has joined the channel
[16:16] AvianFlu has joined the channel
[16:17] Hanse has joined the channel
[16:18] Venom_X has joined the channel
[16:20] davehamptonusa has joined the channel
[16:20] davehamptonusa has left the channel
[16:26] stagas has joined the channel
[16:27] davehamptonusa has joined the channel
[16:28] josh-k has joined the channel
[16:28] cjm has joined the channel
[16:29] davehamptonusa has left the channel
[16:31] mac^_ has joined the channel
[16:32] mattgifford has joined the channel
[16:32] arnorhs has joined the channel
[16:32] davehamptonusa has joined the channel
[16:34] davehamptonusa has left the channel
[16:36] Heisenmink_ has joined the channel
[16:37] MrMaksimize has joined the channel
[16:37] bubunas has joined the channel
[16:39] MrMaksim_ has joined the channel
[16:40] jaequery has joined the channel
[16:42] mrkurt has joined the channel
[16:42] BrianE has joined the channel
[16:43] smgt has joined the channel
[16:43] MatthewS has joined the channel
[16:44] CarterL has joined the channel
[16:44] MrMaksimize has joined the channel
[16:45] MrMaksimize has joined the channel
[16:46] AndreasMadsen has joined the channel
[16:46] MrMaksimize has joined the channel
[16:47] thax has joined the channel
[16:49] jbpros has joined the channel
[16:49] AndreasM_ has joined the channel
[16:49] icebox has joined the channel
[16:51] AndreasM_ has joined the channel
[16:52] martndemus has joined the channel
[16:53] mange has joined the channel
[16:53] imarcusthis has joined the channel
[16:54] Morgawr has joined the channel
[16:54] MrMaksimize has joined the channel
[16:54] CrisO has joined the channel
[16:55] jmar777 has joined the channel
[16:55] Morgawr: hello everybody, I have a very simple/stupid question.. I'm using express.js (it's a general javascript/node.js question though) and I have a lot of lines of code just for routing management (stuff like app.get('/whatever'), etc etc) and I want all that code to go into another file (separated form my app.configure or app.use parts) just to have it more tidy and easier to read
[16:55] Morgawr: how would I do that? I was thinking of doing somekind of "include" but apparently it doesn't work like this in javascript...
[16:55] luke` has joined the channel
[16:56] Morgawr: what's the suggested way of doing it?
[16:57] AndreasM_: Hey there is a module allowing one to run a server function from a client browser in javascript, what is it called?
[16:57] mattgifford has joined the channel
[16:57] tbranyen: AndreasM_: nowjs?
[16:58] tbranyen: AndreasM_: seen a few modules that do that
[16:58] Morgawr: nobody can help me? :(
[16:59] AndreasM_: Properly ryan told me yesterday that the next generation cluster modules should do something like [missingLetter]node, it was totally clear but now well it gone :)
[16:59] tbranyen: Morgawr: make a new express server in each file and require that into an app.use("/prefix", require("./subroutes"))
[16:59] TooTallNate has joined the channel
[17:00] Morgawr: tbranyen: so basically you're telling me I have to make another server just to handle the routing?
[17:00] tbranyen: its an object
[17:01] tbranyen: and don't bind to a port
[17:01] tbranyen: i dunno why that sounds so outlandish
[17:01] Morgawr: ok.. let's backpedal a second.. I just need a way to call functions from another file in javascript, how do I achieve that? (I know it's a very basic question.. but I tried looking around and didn't find anything)
[17:01] deeprogram has joined the channel
[17:01] tbranyen: might be a better way, but thats how i've done it
[17:01] tbranyen: attach them to the exports object
[17:01] NothingMan65 has joined the channel
[17:01] __doc__ has joined the channel
[17:01] tbranyen: require that file
[17:01] tbranyen: and call them
[17:01] Morgawr: ah ok
[17:02] tbranyen: exports.something = function() { }; require("./some-module").something()
[17:02] Morgawr: but I need to add those functions to exports, right?
[17:02] Morgawr: ok perfect
[17:02] Morgawr: I will do that instead I guess
[17:02] Morgawr: makes more sense
[17:02] tbranyen: sounds messier and harder to maintain tho
[17:02] Morgawr: why?
[17:02] jlank: app.use(app.router);
[17:02] tbranyen: because you're editting one file then need to change another
[17:02] tbranyen: instead of working in just one
[17:02] Morgawr: all I have is a bunch of routing in file#1 and file#2..file#N handles each the specific case for the routing
[17:02] Morgawr: so I can just do
[17:02] jlank: then in routes/index.js put your functions
[17:02] gavin_huang has joined the channel
[17:02] Morgawr: app.get('/login',login.handler);
[17:03] MrMaksimize has joined the channel
[17:03] Morgawr: login = require('./file_login');
[17:03] Morgawr: someting like that
[17:03] Morgawr: it sounds much more cleaner and easier to read imo
[17:03] Morgawr: rather than having thousands of line in one single file
[17:03] Morgawr: every file has its specific functions and code
[17:03] tbranyen: wat
[17:03] tbranyen: when did i say to do that
[17:04] davetayls has joined the channel
[17:04] jlank: in your routes/index.js just include the files you need on a per export basis
[17:04] vol4ok has joined the channel
[17:04] Morgawr__ has joined the channel
[17:05] Morgawr__: damn I disconnected
[17:05] Morgawr__: anyhow, thanks for the help I understand how to handle it now :)
[17:05] coreb has joined the channel
[17:05] jlank: http://pastebin.com/AyPY20JT
[17:05] jlank: look at that
[17:05] jlank: my file#1...file#N are in lib/
[17:05] patcito has joined the channel
[17:06] Morgawr__: jlank: that's exactly what I was talking about
[17:06] Morgawr__: what I was planning to do
[17:06] AndreasM_: I love the name of this var: https://github.com/Flotype/now/blob/master/lib/client/now.js#L18-29
[17:07] AaronMT has joined the channel
[17:09] quijote has joined the channel
[17:10] MrMaksimize has joined the channel
[17:11] BrianE has joined the channel
[17:11] pizthewiz has joined the channel
[17:11] MrMaksimize has joined the channel
[17:11] Shaunzie has joined the channel
[17:12] josh-k has joined the channel
[17:13] jamescarr has joined the channel
[17:13] LukeBrookhart has joined the channel
[17:13] TooTallNate has joined the channel
[17:14] slloyd_air has joined the channel
[17:14] metalball2 has joined the channel
[17:15] cclarke has joined the channel
[17:18] MrMaksimize has joined the channel
[17:18] sardaven has joined the channel
[17:21] Morgawr: I have another question now.. let's say I have a login.js and logout.js files that handle logging in and out requests (with all derived functions), my server loads them using require('login') and require('logout')... but what do I do if I need a functionality in both login and logout? Like a function I want to be able to call in both files? do I just make a third file and require that file into both of them? (is that
[17:22] jakehow has joined the channel
[17:23] draginx has left the channel
[17:24] willwhite has joined the channel
[17:24] zomg: Morgawr: your q cut off at "(is that"
[17:24] zomg: But I assume you were going to ask if it makes sense or something like that
[17:24] zomg: Yes, it sounds quite reasonable
[17:24] zomg: =)
[17:25] LukeBrookhart has joined the channel
[17:25] MrMaksimize has joined the channel
[17:25] Morgawr: zomg: yeah I was asking "is that possible/suggested?"
[17:25] Morgawr: anyhow, thanks :)
[17:25] luckysmack has joined the channel
[17:26] zomg: Yeah you can just use require('third-file')
[17:26] zomg: I'm not sure what happens if you were to do say require('first') in the third, and then require third in the first though
[17:26] barberdt has joined the channel
[17:26] koo3 has joined the channel
[17:26] tilgovi has joined the channel
[17:26] tilgovi has joined the channel
[17:26] MrMaksimize has joined the channel
[17:27] zomg: but that's easily avoided anyway
[17:27] sorensen__ has joined the channel
[17:27] Poetro has joined the channel
[17:29] LukeBrookhart has joined the channel
[17:29] cody-- has joined the channel
[17:30] mange has joined the channel
[17:30] Poetro has joined the channel
[17:31] ryan_stevens has joined the channel
[17:32] briancray has joined the channel
[17:32] LukeBrookhart has joined the channel
[17:33] armandop has joined the channel
[17:34] `3rdEden has joined the channel
[17:34] Shaunzie has joined the channel
[17:35] metalball2 has joined the channel
[17:36] piscisaureus_ has joined the channel
[17:36] cclarke has joined the channel
[17:36] criswell has joined the channel
[17:37] hipsters_ has joined the channel
[17:39] t0mmyvyo has joined the channel
[17:40] fumanchu182 has joined the channel
[17:41] EhevuTov has joined the channel
[17:41] orospakr: hey, I want to use child_process.execFile (in order to specify arguments without shell parsing), but the program I want to execute will be somewhere in PATH.
[17:42] orospakr: what is the best way to resolve something in PATH, or do I have to write my own code to parse PATH and test existence of the file in each directory?
[17:42] tjfontaine: iterate PATH elements, and path.exists and the first one you find execFile
[17:42] tjfontaine: is what I would do
[17:43] orospakr: yeah, okay.
[17:43] tjfontaine: you could first exec ('which someFile')
[17:43] tjfontaine: but that's less portable
[17:44] i42n has joined the channel
[17:45] neurodrone has joined the channel
[17:47] MrMaksimize has joined the channel
[17:47] JaKWaC has joined the channel
[17:47] SamuraiJack has joined the channel
[17:47] JaKWaC has joined the channel
[17:52] cclarke has joined the channel
[17:55] AndreasMadsen has joined the channel
[17:56] cclarke has joined the channel
[17:56] piscisaureus__ has joined the channel
[17:57] shedinja has joined the channel
[17:57] MrMaksimize has joined the channel
[17:58] TheIronWolf has joined the channel
[17:58] brianloveswords has joined the channel
[17:59] HardP has joined the channel
[17:59] HardP: how can I automatically load a config object inside all modules?
[18:00] HardP: now i have to do config = require('./config').config in every module
[18:00] HardP: can it be avoided
[18:00] tuhoojabotti: module.exports = config
[18:01] HardP: and then config is available globally?
[18:01] tuhoojabotti: then config = require('./config');
[18:01] tuhoojabotti: :D
[18:01] HardP: ah :)
[18:01] metalball2 has joined the channel
[18:01] tuhoojabotti: well you could always leak it to global, or attach it to process, but I don't know any ways to make it global
[18:02] HardP: process.globals.config = require('./config')
[18:02] tuhoojabotti: yeah
[18:02] tuhoojabotti: or something like that
[18:02] HardP: yea
[18:02] tuhoojabotti: but require is cached so it's not that bad
[18:03] HardP: yeah, just trying to avoid repetition :)
[18:03] martin_sunset has joined the channel
[18:03] tuhoojabotti: var config = process.global.config; is better then? :D
[18:03] dgathright has joined the channel
[18:04] HardP: hehe
[18:04] HardP: i think i'll require all inside a object then just load that object
[18:04] HardP: http://blog.mixu.net/2011/02/02/essential-node-js-patterns-and-snippets/
[18:04] HardP: 1.4
[18:06] MrMaksimize has joined the channel
[18:06] tuhoojabotti: yeah
[18:06] ljackson has joined the channel
[18:07] JaKWaC has joined the channel
[18:08] Morkel has joined the channel
[18:10] isaacs has joined the channel
[18:14] jakehow has joined the channel
[18:17] eignerchris has joined the channel
[18:18] marcello3d has joined the channel
[18:18] AndreasMadsen has joined the channel
[18:19] pendlepants has joined the channel
[18:19] simpleton has joined the channel
[18:20] mansoor has joined the channel
[18:20] pendlepants: hey all, is there some standard best practice for deploying node apps behind a load balancer? everything I've seen online (express, etc) has hard-coded port numbers but that doesn't seem particularly scaleable.
[18:23] Shaunzie: pendlepants: from what I've seen, most people run node on a high port then stick nginx or some other proxy in front of it, and proxy off of port 80
[18:23] aliem has joined the channel
[18:23] HardP: if I export like this: module.exports = new Something
[18:24] HardP: does it mean every time I include the module a new instance will be created?
[18:24] pendlepants: Shaunzie: I get that, but I'm wondering how folks are assigning port numbers if they're running 2 or 3 instances of node behind nginx or HAProxy or whatever.
[18:24] mattgifford has joined the channel
[18:25] zomg: Bah
[18:25] igl: HardP only once per process
[18:25] HardP: ok, great
[18:25] igl: even if you require multible times
[18:25] zomg: My biggest issue with MongoDB -> I change the DB structure, and then my code explodes because some old record does not conform to the new structure
[18:25] Shaunzie: pendlepants: I'd probably use closer to spin-up the processes/core and then proxy to the parent process
[18:25] zomg: Yeah probably should fix my DB first but... but..
[18:25] zomg: =)
[18:26] Shaunzie: pendlepants: https://github.com/LearnBoost/cluster
[18:26] dudeinthemirror has joined the channel
[18:26] r1ngzer0 has joined the channel
[18:26] CarterL has joined the channel
[18:26] leo2007 has joined the channel
[18:26] pendlepants: that is exactly what I was looking for; thanks Shaunzie.
[18:26] tuhoojabotti: HardP: The require is cached, so you only get one instance.
[18:27] tuhoojabotti: I thought I said that.
[18:27] HardP: just wanted to clear that, maybe 'new' does something else :)
[18:27] tuhoojabotti: heh
[18:27] HardP: never mind, I prefer it that way
[18:27] Shaunzie: pendlepants: np :). node .0.6+ has a built in cluster package, though I've never used it >.> Can't say how good it is
[18:27] HardP: it means I can refer to the socket connection from other modules, which I want
[18:28] AndreasM_ has joined the channel
[18:28] tuhoojabotti: pendlepants: Yeah, with cluster you can share a port between nodes
[18:28] tuhoojabotti: on the same machine
[18:31] JaKWaC has joined the channel
[18:31] mertimor has joined the channel
[18:31] StanlySoManly has joined the channel
[18:31] brl0 has joined the channel
[18:32] JaKWaC has joined the channel
[18:32] mange has joined the channel
[18:32] zomg: How does everyone manage migrating between schema versions in nosql dbs?
[18:33] zomg: Mongodb speicfically, any good libs for this or do you just write a bunch of updates in the shell? =)
[18:33] brl0: i'm munging my first scripts, and I'm curious how to set a value in my server.js that can be used in the require('files.js') before they're executed
[18:33] zomg: and hope for the best..
[18:33] zomg: =)
[18:33] zomg: brl0: I'm not sure if I follow? You want the code in files.js use some value in server.js, but you're requiring files.js in server.js and not the other way around?
[18:34] brl0: basically, there is one file that does something like require('events.js') and events.js has inline Events.client = redis.createClient().. and I would like to pass parameters to that redis.createClient
[18:34] zomg: You probably should move it into a function and call that with the parameters you want passed along
[18:35] brl0: i have the parameters as argv.redishost argv.redisport when starting node..
[18:35] zomg: Generally it's recommended that just requiring a module does not have any side effects like that
[18:35] simpleton: Hi guys, new to the land of node.js - when I try to run app.js I get this https://gist.github.com/1540943 I don't understand it. The stack trace, unlike Ruby's, doesn't show anything specific
[18:36] brl0: ok, I did move it into a function, but I'm worried I'm polluting the modules design by chaining initClient() calls and passing the args
[18:36] zomg: brl0: well you could make it export something like Events.init or whatever, then just call Events.init(argv.redishost, argv.redisport)
[18:36] brl0: it works
[18:36] simpleton: or is that stack trace telling me that the app can't connect to mongo server?
[18:36] metalball2 has joined the channel
[18:37] zomg: simpleton: undefined is not a function generally means that you're trying to call undefined
[18:37] zomg: as in, you have something like hello(); in your code, where 'hello' is undefined
[18:37] simpleton: zomg call as in database call?
[18:38] simpleton: can I gist contents of app.js? It's 50 simple lines...
[18:38] zomg: It does look like the error is coming from the mongodb library so I'm not quite sure why it would do that
[18:38] zomg: Sure
[18:38] MUILTR has joined the channel
[18:38] simpleton: zomg https://gist.github.com/1540954
[18:39] simpleton: very strange that it doesn't specify the line number of the undefined function call
[18:39] ajpiano: hey - i just installed node on windows using the msi, but there's no 'node' in my cmd.exe
[18:40] ajpiano: ACTION must be missing something obvious
[18:40] zomg: simpleton: it does, the line where it's caused is mongodb/db.js 173
[18:41] simpleton: zomg indeed, but I mean doesn't specify which line of the 50 of app.js are calling that undefined function
[18:41] zomg: Ah
[18:41] zomg: Most likely it's because it was caused by some event
[18:41] simpleton: did you see anything wrong with the gist?
[18:41] zomg: Thus it would not be an immediate result of your app.js code
[18:41] zomg: Nope, that looked okay as far as I can tell
[18:41] zomg: Try commenting out everything else in app.js except the part which connects to the database
[18:41] zomg: Pretty easy to see if that's the problem then :)
[18:42] simpleton: hmmm. ok
[18:42] ericnakagawa has joined the channel
[18:42] simpleton: nope. problem is not in the app.js part but the db part
[18:43] ajpiano: any advice? according to the msi, i should just be able to run node from a command prompt
[18:44] shinuza has joined the channel
[18:44] simpleton: zomg think I'm trying to connect to the wrong ports.
[18:44] zomg: ajpiano: not sure but it might require a reboot
[18:44] `3rdEden has joined the channel
[18:44] robinduckett has joined the channel
[18:45] PhilK has joined the channel
[18:45] liar has joined the channel
[18:45] ajpiano: nothing has indicated such
[18:46] jaequery: hey guys got a q
[18:46] jaequery: im trying to create an app that will display all the sites that link to your site... what is the best way for me to go about doing this?
[18:46] zomg: ajpiano: Well the fact node isn't working from cmd would indicate that to me.
[18:47] zomg: ajpiano: considering the msi most likely changed some system-wide environmental variables (namely PATH), for which to take effect tends to require a reboot
[18:47] tuhoojabotti: jaequery: http get, parse, find links?
[18:47] ajpiano: yeah, but i restatrted cmd.exe a few times --- i'm restarting now anyway
[18:47] tuhoojabotti: no wait
[18:47] tuhoojabotti: link to _your_ site
[18:47] benvie: type "env" into run
[18:47] benvie: node's folder needs to be in the path
[18:47] tuhoojabotti: jaequery: You need to index all the sites on internet and see which link to your site?
[18:48] benvie: you don't need to restart the computer for path
[18:48] benvie: just cmd like you did
[18:48] jaequery: tuhoojabotti, yeah something like that ... but im wondering if google has any sort of api for this sort of thing?
[18:48] stride: tuhoojabotti: in the RAM!
[18:48] ajpiano: benvie: that's what i'd suspect, anyhow, machine needed a reboot anyway, will check env after it restarts
[18:48] insin has joined the channel
[18:50] tuhoojabotti: jaequery: Search doesn't have an api afaik
[18:51] tuhoojabotti: Even Bing has to spy on google users to use google.
[18:51] Edy has joined the channel
[18:51] Edy has joined the channel
[18:52] tuhoojabotti: jaequery: That's not really a node question is that?
[18:52] lzskiss has joined the channel
[18:52] jaequery: well, i was gonna get to that second
[18:53] tuhoojabotti: jaequery: Find out how to do it first, then ask how to do it.
[18:53] tuhoojabotti: ":D"
[18:53] tuhoojabotti: well, how to implement it
[18:54] jaequery: anyone got a recommendation for which lib is best at just hitting a url, and then let me just jquery over things i want to pick out from it?
[18:54] zemanel has joined the channel
[18:55] tuhoojabotti: jaequery: If you want to fool Google, you could try zombie.js
[18:55] tuhoojabotti: Don't know how easy it is to use Google that way, they have blocked urllib on python
[18:56] JaKWaC has joined the channel
[18:56] sarlalian has joined the channel
[18:57] EhevuTov_ has joined the channel
[18:57] PhilK has joined the channel
[19:00] tuhoojabotti: Hmm
[19:01] mertimor has joined the channel
[19:01] tuhoojabotti: I have a server class, but don't understand how to easily make it work in a modular fashion.
[19:01] tuhoojabotti: how to access the server instance's data from the modules
[19:02] Shaunzie has joined the channel
[19:02] tuhoojabotti: Should the modules constructors just take the server as a parameter and then use that
[19:03] EhevuTov__ has joined the channel
[19:03] joshfinnie has joined the channel
[19:04] saesh has joined the channel
[19:06] elijahleviwright has joined the channel
[19:06] Heisenmink_ has joined the channel
[19:06] whitman has joined the channel
[19:08] tilgovi has joined the channel
[19:08] tilgovi has joined the channel
[19:10] CrisO has joined the channel
[19:10] mikeal has joined the channel
[19:11] barberdt has joined the channel
[19:11] monokrome has joined the channel
[19:12] pendlepants has joined the channel
[19:12] martin_sunset has joined the channel
[19:12] criswell has joined the channel
[19:12] gavin_huang has joined the channel
[19:12] ben_alman has joined the channel
[19:12] jimt has joined the channel
[19:12] Blorb has joined the channel
[19:12] jomoho has joined the channel
[19:12] rendar has joined the channel
[19:12] Fuu` has joined the channel
[19:12] jamesd_laptop has joined the channel
[19:12] Frippe has joined the channel
[19:12] tim_smart has joined the channel
[19:12] relix has joined the channel
[19:12] rudolfrck has joined the channel
[19:12] ec has joined the channel
[19:12] idefine has joined the channel
[19:12] justicefries has joined the channel
[19:12] remysharp has joined the channel
[19:12] TheDeveloper has joined the channel
[19:12] dthompso99 has joined the channel
[19:12] dragon has joined the channel
[19:12] xSmurf has joined the channel
[19:12] raydeo has joined the channel
[19:12] ajpiano has joined the channel
[19:12] delnaught has joined the channel
[19:12] maru_cc has joined the channel
[19:12] sechrist has joined the channel
[19:12] gwoo has joined the channel
[19:12] Corey has joined the channel
[19:12] doffm has joined the channel
[19:12] augustl has joined the channel
[19:12] pct has joined the channel
[19:12] JHartig|away has joined the channel
[19:12] jvolkman has joined the channel
[19:13] __doc__ has joined the channel
[19:15] metalball2 has joined the channel
[19:16] tommyvyo_ has joined the channel
[19:17] saesh_ has joined the channel
[19:17] booo has joined the channel
[19:18] fomatin has joined the channel
[19:18] jgornick has joined the channel
[19:18] fomatin: hello
[19:18] MrMaksim1ze has joined the channel
[19:19] bnoordhuis has joined the channel
[19:19] tuhoojabotti: Hello
[19:20] xyznc has joined the channel
[19:20] armandop: hi there
[19:21] stalled has joined the channel
[19:21] fomatin: hey, i'm having some trouble
[19:21] fomatin: i can't edit a file because it's "readonly"
[19:21] fomatin: even though i use sudo
[19:21] MUILTR has joined the channel
[19:21] jamescarr has joined the channel
[19:21] mac^_ has joined the channel
[19:21] Salam has joined the channel
[19:21] McMAGIC--Copy has joined the channel
[19:21] chjj has joined the channel
[19:21] c4milo has joined the channel
[19:21] yogurt_truck has joined the channel
[19:21] styol has joined the channel
[19:21] Lingerance has joined the channel
[19:21] diminoten has joined the channel
[19:21] txdv has joined the channel
[19:21] verdoc has joined the channel
[19:21] ryanrolds has joined the channel
[19:21] visnup_ has joined the channel
[19:21] slajax has joined the channel
[19:21] VesQ has joined the channel
[19:21] jayne has joined the channel
[19:21] sebastianedwards has joined the channel
[19:21] gregmoreno has joined the channel
[19:21] mikegerwitz has joined the channel
[19:21] keyvan has joined the channel
[19:21] raz has joined the channel
[19:21] chapel has joined the channel
[19:21] threeday1onk has joined the channel
[19:21] eeemsi_ has joined the channel
[19:21] DRMacIver has joined the channel
[19:21] sorensen has joined the channel
[19:21] jhbot has joined the channel
[19:21] Kiryaka has joined the channel
[19:21] tuhoojabotti: chmod it?
[19:21] zemanel has joined the channel
[19:21] brl0 has joined the channel
[19:21] Poetro has joined the channel
[19:21] AaronMT has joined the channel
[19:21] smgt has joined the channel
[19:21] Venom_X has joined the channel
[19:21] blueadept has joined the channel
[19:21] confoocious has joined the channel
[19:21] bingomanatee_ has joined the channel
[19:21] alessioalex has joined the channel
[19:21] plantain has joined the channel
[19:21] ismell has joined the channel
[19:21] TheFuzzball has joined the channel
[19:21] Overv has joined the channel
[19:21] eventualbuddha has joined the channel
[19:21] Magnars has joined the channel
[19:21] tiglionabbit has joined the channel
[19:21] dnyy has joined the channel
[19:21] ryanseddon_ has joined the channel
[19:21] majek has joined the channel
[19:21] tomh has joined the channel
[19:21] dekz has joined the channel
[19:21] pransalad has joined the channel
[19:21] gf3 has joined the channel
[19:21] xandy| has joined the channel
[19:21] cce has joined the channel
[19:21] trodrigues has joined the channel
[19:21] mape_ has joined the channel
[19:21] JakeSays has joined the channel
[19:21] TheNumb has joined the channel
[19:21] geojeff has joined the channel
[19:21] irclogger_com has joined the channel
[19:21] jackyyll has joined the channel
[19:21] meder_ has joined the channel
[19:21] zedas has joined the channel
[19:21] killing-joke has joined the channel
[19:21] innociv has joined the channel
[19:21] zed0 has joined the channel
[19:21] tellnes has joined the channel
[19:21] roger_raymond has joined the channel
[19:21] Glenjamin has joined the channel
[19:21] pradeepto has joined the channel
[19:21] duckspea1er has joined the channel
[19:21] teadict has joined the channel
[19:21] slpsys has joined the channel
[19:21] finsken has joined the channel
[19:21] chrisdickinson has joined the channel
[19:21] killfill has joined the channel
[19:21] bugfree has joined the channel
[19:21] L_star has joined the channel
[19:21] T-Co has joined the channel
[19:21] arkx has joined the channel
[19:21] kloeri has joined the channel
[19:21] ashb has joined the channel
[19:21] samstefan_ has joined the channel
[19:21] hotspants has joined the channel
[19:21] mattp_ has joined the channel
[19:21] tuhoojabotti: Isn't that more like a os-problem?
[19:22] armandop: doesnt seem like a node issue.
[19:22] tuhoojabotti: (I'm like the person here who's just telling people their problem is not related to node. ;D)
[19:22] AvianFlu has joined the channel
[19:22] fomatin: …yeah
[19:22] MUILTR has joined the channel
[19:22] fomatin: i just thought it'd be easier
[19:22] agnat_ has joined the channel
[19:22] fomatin: because i don't know which irc ch to join :P
[19:23] tuhoojabotti: #-
[19:23] tuhoojabotti: lang*
[19:23] tuhoojabotti: :D
[19:23] tuhoojabotti: like #ubuntu-fi ;)
[19:23] armandop: damn whats happening there?
[19:23] jbpros has joined the channel
[19:23] armandop: another continent go under the ocean or something?
[19:24] tuhoojabotti: wut
[19:24] AvianFlu has joined the channel
[19:24] stalled has joined the channel
[19:24] jgornick has joined the channel
[19:24] barberdt has joined the channel
[19:24] elijahleviwright has joined the channel
[19:24] sarlalian has joined the channel
[19:24] insin has joined the channel
[19:24] AndreasM_ has joined the channel
[19:24] r1ngzer0 has joined the channel
[19:24] mattgifford has joined the channel
[19:24] marcello3d has joined the channel
[19:24] HardP has joined the channel
[19:24] cclarke has joined the channel
[19:24] ryan_stevens has joined the channel
[19:24] TooTallNate has joined the channel
[19:24] coreb has joined the channel
[19:24] luke` has joined the channel
[19:24] martndemus has joined the channel
[19:24] mrkurt has joined the channel
[19:24] raincole has joined the channel
[19:24] aioue has joined the channel
[19:24] carlyle has joined the channel
[19:24] plutoniix has joined the channel
[19:24] fermion has joined the channel
[19:24] jstash has joined the channel
[19:24] ryanfitz has joined the channel
[19:24] enmand has joined the channel
[19:24] jaha has joined the channel
[19:24] fairwinds has joined the channel
[19:24] TheJH has joined the channel
[19:24] OneOfOne has joined the channel
[19:24] ovaillancourt has joined the channel
[19:24] thalll has joined the channel
[19:24] CrypticSwarm has joined the channel
[19:24] pig_ has joined the channel
[19:24] superjudge has joined the channel
[19:24] clarkfischer has joined the channel
[19:24] skm has joined the channel
[19:24] dubenstein has joined the channel
[19:24] dantalizing has joined the channel
[19:24] tomlion_ has joined the channel
[19:24] ag4ve has joined the channel
[19:24] caioketo has joined the channel
[19:24] Tobsn has joined the channel
[19:24] nym has joined the channel
[19:24] franksalim has joined the channel
[19:24] r04r has joined the channel
[19:24] populuxe has joined the channel
[19:24] kenperkins has joined the channel
[19:24] kitt has joined the channel
[19:24] thejefflarson has joined the channel
[19:24] f1gm3nt has joined the channel
[19:24] wink_ has joined the channel
[19:24] optixx has joined the channel
[19:24] jxie has joined the channel
[19:24] wookiehangover has joined the channel
[19:24] dec has joined the channel
[19:24] Typo has joined the channel
[19:24] salazr_ has joined the channel
[19:24] crodas has joined the channel
[19:24] JulioBarros has joined the channel
[19:24] heavysixer has joined the channel
[19:24] isufy has joined the channel
[19:24] tbranyen has joined the channel
[19:24] wankdanker has joined the channel
[19:24] christophsturm has joined the channel
[19:24] dscape has joined the channel
[19:24] FilipeDias has joined the channel
[19:24] TheMoonMaster has joined the channel
[19:24] sveisvei has joined the channel
[19:24] RushPL_ has joined the channel
[19:24] metadaddy has joined the channel
[19:24] duncanbeevers has joined the channel
[19:24] JasonSmith has joined the channel
[19:24] pksunkara has joined the channel
[19:24] strmpnk has joined the channel
[19:24] hcchien has joined the channel
[19:24] chunhao_ has joined the channel
[19:24] Marak has joined the channel
[19:24] catb0t has joined the channel
[19:24] cjackson has joined the channel
[19:24] orospakr has joined the channel
[19:24] fson has joined the channel
[19:24] Epeli has joined the channel
[19:24] jsj has joined the channel
[19:24] jn has joined the channel
[19:24] swhit has joined the channel
[19:24] einaros has joined the channel
[19:24] oleyb has joined the channel
[19:24] kanzure has joined the channel
[19:24] buu has joined the channel
[19:24] _baton_ has joined the channel
[19:24] htoothrot has joined the channel
[19:24] tmm1 has joined the channel
[19:24] Daegalus has joined the channel
[19:24] webben has joined the channel
[19:24] jscheel has joined the channel
[19:24] psino has joined the channel
[19:24] danraz_ has joined the channel
[19:24] tekky has joined the channel
[19:24] fwg has joined the channel
[19:24] tobmaster has joined the channel
[19:24] jmmills has joined the channel
[19:24] kimico has joined the channel
[19:24] polyrhythmic has joined the channel
[19:24] idoru has joined the channel
[19:24] jperras has joined the channel
[19:24] jcap has joined the channel
[19:24] ianl` has joined the channel
[19:24] wadey|away has joined the channel
[19:24] Draggor has joined the channel
[19:24] m00g00 has joined the channel
[19:24] Leonidas has joined the channel
[19:24] lifty_ has joined the channel
[19:24] slickplaid has joined the channel
[19:24] ollie has joined the channel
[19:24] carlocci has joined the channel
[19:24] _bat has joined the channel
[19:24] zpao has joined the channel
[19:24] alindeman has joined the channel
[19:24] sente has joined the channel
[19:24] Pierre_N_ has joined the channel
[19:24] zpao_ has joined the channel
[19:24] context has joined the channel
[19:24] gkatsev has joined the channel
[19:24] ircretary has joined the channel
[19:24] balgarath has joined the channel
[19:24] Ned_ has joined the channel
[19:24] jslatts has joined the channel
[19:24] Kingdutch has joined the channel
[19:24] _mdp has joined the channel
[19:24] ddollar has joined the channel
[19:24] solhive has joined the channel
[19:24] a11235_ has joined the channel
[19:24] tomb has joined the channel
[19:24] CIA-109 has joined the channel
[19:24] dabailey has joined the channel
[19:24] systemfault has joined the channel
[19:24] doki_pen has joined the channel
[19:24] mediacoder has joined the channel
[19:24] sugyan has joined the channel
[19:24] hazridi has joined the channel
[19:24] nebiros has joined the channel
[19:24] jakeskik has joined the channel
[19:24] lazyshot has joined the channel
[19:24] zinkem has joined the channel
[19:24] systemfault_ has joined the channel
[19:24] xyznc has joined the channel
[19:24] tk: damn that would have been the perfect event to test my bot through...
[19:24] dexter_e has joined the channel
[19:25] tk: ohh it was online, yay
[19:25] ircretary1 has joined the channel
[19:25] isaacs: ircretary1: hi
[19:25] isaacs: ircretary1: hello
[19:25] ircretary has joined the channel
[19:25] isaacs: ircretary: hello
[19:25] ircretary: isaacs: Hello :)
[19:25] isaacs: great, ok
[19:26] tuhoojabotti: I published my first npm module \o
[19:26] kriszyp has joined the channel
[19:26] tuhoojabotti: well my collaborator did it
[19:26] isaacs: w00t
[19:26] mandric has joined the channel
[19:26] tuhoojabotti: But very few people will probably ever use it. :D
[19:26] zomg: co-conspirator
[19:27] criswell has joined the channel
[19:27] TooTallNate: anyone know any sweet benchmarking modules?
[19:27] tuhoojabotti: Just some wrapper on udp to to handle specific client software
[19:27] TimTim has joined the channel
[19:27] systemfault_ has joined the channel
[19:28] fairwinds has joined the channel
[19:28] Glenjamin has joined the channel
[19:28] kloeri has joined the channel
[19:28] eignerchris has joined the channel
[19:29] tuhoojabotti: To make it easier to port servers on node. :)
[19:29] jgornick has joined the channel
[19:29] systemfault has joined the channel
[19:29] LuckySMack has joined the channel
[19:31] vol4ok has joined the channel
[19:31] jakehow has joined the channel
[19:31] Poetro has joined the channel
[19:31] necromancer has joined the channel
[19:32] leo2007 has joined the channel
[19:32] armandop: hey is there a list, not necessarily bugs, that someone like myself can help out with?
[19:32] leo2007: how to get a x86_64 executable?
[19:32] Internet13 has joined the channel
[19:32] teadict: of what?
[19:33] PhilK has joined the channel
[19:33] zomg: armandop: you could probably look at the github issues list
[19:33] pors has joined the channel
[19:33] leo2007: following the instruction, I am getting i386 executable on snow leopard 10.6.8
[19:34] qipiqipi has joined the channel
[19:34] AndreasM_: armandop: just go ahead: https://github.com/joyent/node/issues?labels=feature-request
[19:34] `3rdEden has joined the channel
[19:35] armandop: @AndreasM : taking a look. thanks
[19:35] armandop: i actually went through the list for npm and mongoose. but will take a look at this one as well.
[19:36] LukeBrookhart has joined the channel
[19:37] teadict has joined the channel
[19:38] AndreasM_: armandop: Cool, just remember to do testcases, think about what you do and write docs. Also you cant be sure just because it is on the list it will be merged, but nodecoreteam are open minded :)
[19:38] armandop: cool, thanks!
[19:39] metalball2 has joined the channel
[19:39] mattgiff_ has joined the channel
[19:39] dgathright has joined the channel
[19:39] CarterL has joined the channel
[19:39] AndreasM_: armandop: Also try to keep pull requests small, it makes the easier to read. I have done one there need to be split up in about 8-9 steps :)
[19:39] AndreasM_: https://github.com/joyent/node/pull/2038
[19:40] AndreasM_: s/the/it
[19:41] McMAGIC--Copy has joined the channel
[19:43] deedubs has joined the channel
[19:43] igl1 has joined the channel
[19:44] martin_sunset has joined the channel
[19:45] maushu has joined the channel
[19:45] insin has joined the channel
[19:46] enmand has joined the channel
[19:48] tbranyen: i'm getting issues with a ton of node projects now :-/
[19:48] tbranyen: npm ERR! Error: No compatible version found: stats
[19:48] tbranyen: yesterday couldn't even get http-server installed
[19:48] TheJH: tbranyen, what is your "node-v"?
[19:48] TheJH: erm, "node -v"
[19:48] tbranyen: v0.6.6
[19:48] tbranyen: i guess this is what i get for living the bleeding stable edge?
[19:49] tbranyen: i'll install an older version
[19:49] tuhoojabotti: tbranyen: it should be stable cuz it's even!
[19:49] tbranyen: tuhoojabotti: didn't i just say its stable?
[19:49] mmalecki: tbranyen: oh? http-server won't install?
[19:49] mmalecki: tbranyen: I can fix it now
[19:49] tbranyen: mmalecki: with latest node it didn't work for me at all
[19:49] tbranyen: wouldn't install
[19:50] TheJH: tbranyen, there's a npm flag you can try, one sec...
[19:50] mmalecki: tbranyen: hm, installed it just now, can you try it? and gist your output, please
[19:50] tbranyen: ah -f
[19:50] mmalecki: or --gangsta
[19:50] tuhoojabotti: tbranyen: i'm pretty sure a black hole was present converting the rays of light moving from my monitor to make me perceive as you didn't.
[19:51] napperjabber has joined the channel
[19:52] thios has joined the channel
[19:53] BrianE: ACTION slowly compiles Node on an EC2 micro instance
[19:54] tuhoojabotti: ACTION just fastly compiled Node on a shared IRC-shell
[19:54] tuhoojabotti: \o
[19:54] `3rdEden: upgrade to HI cpu instance and downgrade to micro when done ;$
[19:54] Nopik: ec2 micro? they should not give it for free, people will use that and will think that other instances are also so crappy ;p
[19:54] jocafa has joined the channel
[19:54] nail_: tbranyen: that's because those modules require another node version
[19:54] BrianE: Nopik: They should give it for free
[19:54] nail_: stats requires 0.4.x
[19:54] tuhoojabotti: This shell (actually 2 servers) aint so bad for 35€/y
[19:54] tuhoojabotti: :P
[19:55] BrianE: If I didn't have a micro instance to try out, I probably wouldn't be running so much stuff on bigger instances today ;)
[19:55] tbranyen: shit i have to install 0.4 eff
[19:55] Nopik: yeah, giving it for free have its upsides, definitely. yet the micro cpu limits are just too micro ;p
[19:56] cmr: Nopik: depends on what you're doing
[19:56] kickingvegas has joined the channel
[19:56] cmr: I find it just fine for BNC and email and simple web server.
[19:56] nail_: tbranyen: you can try to force it with the --node-version option
[19:57] slajax has joined the channel
[19:57] LeMike has joined the channel
[19:57] Nopik: cmr: yeah, probably. i just found that if you use 100% cpu for 5 minutes, for next 5 minutes you will get 0% cpu.. even ssh session will stop working ;) could be done slightly better. otherwise, indeed having such host for free is a great thing
[19:57] cmr: Nopik: yeah, I've noticed that too.
[19:57] cmr: The bandwidth is really great though, for low-cpu/disk tasks.
[19:58] wycats has joined the channel
[19:58] ppcano has joined the channel
[19:58] cmr: I find the EC2 platform itself to be the best part. Easy to upgrade when I need it, also a great api
[19:59] metalball2 has joined the channel
[19:59] Nopik: yeah, i've been running several machines there, few mysql instances etc., quite pleased with how it worked. i've been stress testing it, too, and the larger instances are indeed really powerful, too
[19:59] cmr: Yup
[19:59] Nopik: could be slightly cheaper, but, well.. :)
[20:00] jerry_ has joined the channel
[20:00] Nopik: for my personal use i'm paying for serverloft host, which provides great power/cost ratio, much better than ec2. yet is not so scalable ;)
[20:00] cha0s has joined the channel
[20:01] wmage has joined the channel
[20:01] ChrisMatthieu has joined the channel
[20:01] enmand has joined the channel
[20:01] jamescarr has joined the channel
[20:02] cmr: I've heard good things about linode and rackspace
[20:02] BrianE: Still compiling :(
[20:02] Pilate: just dont use the fremont datacenter (linode)
[20:02] BrianE: Yeah, I use Linode too
[20:02] BrianE: Rackspace seemed a bit too expensive
[20:02] BrianE: Pilate: Why not?
[20:02] Pilate: it tends to go down, a lot
[20:03] thios has left the channel
[20:03] Pilate: http://status.linode.com/page/2/
[20:03] BrianE: Hah
[20:04] Shaunzie has joined the channel
[20:04] ChrisMatthieu has joined the channel
[20:05] BrianE: It's compiling pretty slowly. Even my SSH session is very, very slow
[20:05] dwhittle has joined the channel
[20:05] BrianE: And the load average is only ~2
[20:10] kickingvegas has joined the channel
[20:11] kmiyashiro has joined the channel
[20:12] chirag_ has joined the channel
[20:13] piscisaureus__ has joined the channel
[20:14] dgathright has joined the channel
[20:14] Libra102 has joined the channel
[20:14] napperjabber has joined the channel
[20:15] EhevuTov_ has joined the channel
[20:16] catshirt has joined the channel
[20:18] EhevuTov has joined the channel
[20:21] redir_ has joined the channel
[20:21] hipsters_ has joined the channel
[20:23] isaacs has joined the channel
[20:23] JaKWaC has joined the channel
[20:23] cognominal___ has joined the channel
[20:25] dgathright has joined the channel
[20:26] barberdt has joined the channel
[20:28] jakehow has joined the channel
[20:28] admc has joined the channel
[20:28] EhevuTov_ has joined the channel
[20:30] davetayls has joined the channel
[20:31] Morkel has joined the channel
[20:33] tvw has joined the channel
[20:34] leo2007 has left the channel
[20:34] mattgifford has joined the channel
[20:35] ajpiano: zomg: you were right, a restart took care of it :)
[20:36] dgathright has joined the channel
[20:37] ajpiano: anyhow, onto more fun - i'm trying to install pcap on windows, but when i try to install it via npm, it blows up because node-waf isn't there (http://gyazo.com/95ee4358f1cf668825de28fe3531d49a)
[20:38] subbyyy has joined the channel
[20:38] xy has joined the channel
[20:38] zomg: ajpiano: is there anything in Windows that a restart does not cure? ;)
[20:39] ajpiano: ... being windows :/
[20:39] zomg: Well if you were to uninstall it then you would restart and.. cured
[20:39] zomg: =)
[20:41] arcanin has joined the channel
[20:44] metalball2 has joined the channel
[20:47] mattgifford has joined the channel
[20:48] Sir_Rai has joined the channel
[20:49] jgornick has joined the channel
[20:52] dwhittle has joined the channel
[20:55] vol4ok has joined the channel
[20:58] briancra_ has joined the channel
[20:58] isaacs has joined the channel
[20:59] adrianmg has joined the channel
[20:59] piscisaureus__ has joined the channel
[21:00] adrianmg has left the channel
[21:00] LeMike has joined the channel
[21:01] mikeal has joined the channel
[21:04] Vennril2 has joined the channel
[21:05] vol4ok has joined the channel
[21:06] stagas has joined the channel
[21:08] squinteye has joined the channel
[21:11] vol4ok has joined the channel
[21:12] clarkfischer has joined the channel
[21:12] Cromulent has joined the channel
[21:14] wingie has joined the channel
[21:16] Squeese has joined the channel
[21:19] ryanfitz has joined the channel
[21:19] Sorella has joined the channel
[21:19] lz1 has joined the channel
[21:20] Shaunzie has joined the channel
[21:20] marcello3d: how goes?
[21:20] AndreasMadsen: Fine, thanks
[21:21] jacobrask: I'm looking for a good way to easily share views/templates between Node.js and the browser. I want to initially render a list with a bunch of items, but then render the list items again through the same template
[21:21] marcello3d: quiet morning
[21:21] marcello3d: jacobrask: I think there's a browser version of jade
[21:21] jacobrask: I've gotten closest so far with CoffeeKup
[21:22] AndreasMadsen: Use jade to pre compile a parser
[21:22] jacobrask: there seems to be some way with Jade yes, I was just thinking.. isn't _everyone_ hitting this problem?
[21:22] marcello3d: currently I'm generating everything server-side, so, no
[21:22] Shaunzie: what he said ^
[21:23] marcello3d: for the ajaxy stuff the dom is so simple I just generate it in dom-land
[21:23] AndreasMadsen: I'm in the progress of writing an isomofic webframework, but it is hard work.
[21:23] marcello3d: or I just send down html fragments
[21:24] jacobrask: I'm using socket.io, doesn't feel right to send html with that even though I could
[21:24] marcello3d: why not?
[21:24] `3rdEden: as long you don't send any XSS, you will be fine
[21:24] marcello3d: if you have a lot of html, sure, do client-side templating
[21:25] marcello3d: (or rethink your css)
[21:25] jacobrask: AndreasMadsen: Zappa has done some work on that, but not with views yet
[21:25] marcello3d: at the end of the day a template is just function(datastruct) -> string
[21:26] AndreasMadsen: Link?
[21:26] jacobrask: http://zappajs.org/
[21:27] briancra_ has joined the channel
[21:27] jacobrask: you do client 'index': -> (client side code here) and it automatically serves the files, if you define something with helper 'foo': -> it's accessible in both server and client
[21:27] mattgifford has joined the channel
[21:27] jacobrask: I don't link the weird DSL:ish stuff though, too different from vanilla express/node.js when it comes to open source projects I want participants on
[21:27] marcello3d: what does @ mean?
[21:27] marcello3d: in cs?
[21:27] jacobrask: 'this'
[21:27] CoverSlide: @ means this.
[21:28] marcello3d: how about require('zappa') ->
[21:28] level09 has joined the channel
[21:28] AndreasMadsen: Zappa dose not seams like isomofic just output streaming.
[21:29] jacobrask: I was thinking of this: http://zappajs.org/docs/0.3-gumbo/reference/#shared but maybe I've got the terminology wrong
[21:29] dephex has joined the channel
[21:30] StanlySoManly1 has joined the channel
[21:30] AndreasMadsen: Okay, but its very thin
[21:31] eignerchris has joined the channel
[21:32] vol4ok has joined the channel
[21:32] jacobrask: yeah. I did a test with Zappa and I really liked the work flow of being in one file and just doing on/emit in client/server code that looked basically the same, like they were in the same environment. Doesn't have to be in the same file, but just to make it feel integrated is really nice when developing
[21:32] AndreasMadsen: My goal is to pull ressource from server to client, and fallback on server if javascript is not active or a old browser is used.
[21:32] jacobrask: ok
[21:32] marcello3d: andreas: pjax? :D
[21:33] CoverSlide: the problem is how do you detect lack of javascript on the client if the client is not scriptable?
[21:33] jacobrask: One approach could be to just do all rendering client side, but on the first request and if javascript is not available render it on the server side with jsdom?
[21:33] marcello3d: CoverSlide: assuming the majority of your users wouldn't be in that situation you could use a splash page + cookie to figure it out
[21:34] AndreasMadsen: CoverSlide: I have solved that withou cookies
[21:34] criswell has joined the channel
[21:36] AndreasMadsen: I have worked in 3 month on just the async flowchart on this, i have not coded anything yes :)
[21:36] AndreasMadsen: s/yes/yet
[21:36] piscisaureus__ has left the channel
[21:36] marcello3d: what are you waiting for? D:
[21:36] marcello3d: the internet will be completely different by the time you start :)
[21:37] Minkben has joined the channel
[21:37] AndreasMadsen: I know, but i need to think this thogh
[21:37] AndreasMadsen: The flowchart is a A2 currently
[21:38] marcello3d: well good luck
[21:38] marcello3d: ACTION goes back to coding
[21:39] tbranyen: CODING
[21:39] AndreasMadsen: Next step is to simplify, thats why i don't code yet.
[21:39] jarek has joined the channel
[21:39] jarek has joined the channel
[21:40] ericnakagawa has joined the channel
[21:40] arnorhs has joined the channel
[21:43] Nopik: AndreasMadsen: tell me more, a client of mine just announced it to me that he have huge (year+) project for me, designing architecture itself will take me weeks ;p
[21:43] aioue has joined the channel
[21:44] AndreasMadsen: Okay
[21:45] AndreasM_: Thats me^
[21:45] AndreasM_: Its based on: http://blog.nodejitsu.com/scaling-isomorphic-javascript-code
[21:45] AndreasM_: The client hit enter in his browser
[21:46] mikeal has joined the channel
[21:46] AndreasM_: That will then make a normal http request on the server
[21:46] AndreasM_: it will then send a html file back, with all its content
[21:47] AndreasM_: A client javascript will then rewrite all links on that page
[21:47] AndreasM_: so they use some ajax/socket.io
[21:48] AndreasM_: when the user click a changeTable object will be send to the client
[21:48] CoverSlide: changeTable?
[21:48] CoverSlide: that sounds like something you change diapers on
[21:49] mange has joined the channel
[21:49] AndreasM_: Okay give me a min
[21:49] cjm has joined the channel
[21:49] inimino: buu ⋱ ping
[21:49] fomatin has joined the channel
[21:49] AndreasM_: So this made to more that just a simple web app
[21:49] buu: inimino: Sup
[21:50] AndreasM_: The server has a big template
[21:50] rwaldron has joined the channel
[21:50] mc: huh..
[21:50] AndreasM_: containing smaller templates like menu, content and sidebar
[21:50] inimino: buu ⋱ I'll /msg you, it's about ##javascript.
[21:51] buu: oh
[21:51] AndreasM_: this the changeTable will instruct on how/what this has to change
[21:51] disappearedng has joined the channel
[21:51] disappearedng has joined the channel
[21:51] AndreasM_: It will also contain module dependisies
[21:52] larsschenk has joined the channel
[21:52] MatthewS has joined the channel
[21:52] AndreasM_: when dependencies is loaded it will do a RVP on each small template/view
[21:52] AndreasM_: RVP: http://blog.nodejitsu.com/scaling-isomorphic-javascript-code
[21:52] larsschenk1 has joined the channel
[21:53] AndreasM_: the process I'm in now is how to stream this RVP
[21:53] AndreasM_: If this should work only on the client it would just involve DOM manipulation
[21:54] AndreasM_: But I'm not going to use jsdom on server (to slow)
[21:54] brianseeders has joined the channel
[21:54] AndreasM_: So I will some sort of flatiron plates
[21:54] AndreasM_: But the streaming is the problem
[21:55] eastc has joined the channel
[21:55] AndreasM_: When the server to the job it has to send HTML content in the right order
[21:55] AndreasM_: But we are also using async code meaning we don't know the order
[21:56] AndreasM_: I won't use jade as such since this require that the server buffer all data
[21:56] mbrevoort has joined the channel
[21:56] mmalecki: AndreasM_: TheJH wrote some streaming template engine
[21:56] mmalecki: TheJH: ping?
[21:56] TheJH: mmalecki, pong
[21:56] AndreasM_: mmalecki: Really
[21:57] mmalecki: AndreasM_: https://github.com/thejh/node-vacuum
[21:57] TheJH: AndreasM_, engine at https://github.com/thejh/node-vacuum
[21:57] TheJH: AndreasM_, you can see some examples of how you can use it at https://github.com/thejh/node-forum
[21:57] TheJH: AndreasM_, it's a forum built on that template engine
[21:58] TheJH: AndreasM_, "templates" contains html template files, functions.js contains JS template functions
[21:58] AndreasM_: Cool
[21:59] TheJH: AndreasM_, also, you can see the forum at http://nodeforum.nodejitsu.com/ - 75ms average page render time or so including database access
[21:59] gf3: ahem
[21:59] gf3: http://dribbble.com/shots/367871-NPM-Mockup
[21:59] mc: i changed my file i/o to use an in memory stream that i pipe to a writable file stream
[21:59] AndreasM_: Thats fast :)
[21:59] mc: and it's significantly slower now
[21:59] mc: kind of odd
[21:59] slloyd_air has joined the channel
[22:00] AndreasM_: Its 23:00 so i will read the rest tomorrow. If anyone want's to follow this it's currently an empty folder on: https://github.com/AndreasMadsen/piccolo
[22:00] maushu has joined the channel
[22:04] joshfinnie has joined the channel
[22:05] jonbaer has joined the channel
[22:07] Wa has joined the channel
[22:08] Wa has joined the channel
[22:14] wankdanker: anyone know if the Date object has a getTime method which returns the locale based numeric time value?
[22:15] mc: looks like it's pausing and resuming as it should
[22:15] mc: it's just super super slow
[22:16] jredville has joined the channel
[22:17] neurodrone has joined the channel
[22:18] catshirt has joined the channel
[22:18] fwg: wankdanker㇀ what is a locale based numeric time value? what does a timestamp have to do with languages?
[22:19] wankdanker: fwg: sorry, i guess i should say local time
[22:19] wankdanker: fwg: i see options for converting to locale strings which take timezone into account ( so it seems)
[22:20] fwg: nono, the locale conversion function is for different string representations like 12/30/2011 vs 30.12.2011
[22:20] Poetro has joined the channel
[22:21] fwg: so that users get what they are used to
[22:21] context: anyone notice gundo doesn't work on os x for vim
[22:21] wankdanker: fwg: and there are getUTCMinutes and others... .getHours() returns local hours. .getTime() returns UTC time; there is no way to get local time numeric value
[22:21] wankdanker: fwg: probably not explaining myself well enough. sorry.
[22:22] fwg: ah
[22:22] CoverSlide: gundo requires vim 7.3
[22:22] larsschenk1 has left the channel
[22:24] booo has joined the channel
[22:24] jakehow has joined the channel
[22:24] wedtm has joined the channel
[22:25] fwg: wankdanker㇀ just do date.getTime() + (date.getTimezoneOffset() * 60 * 1000)
[22:26] fwg: though timestamps are defined as being UTC, so that might confuse people
[22:26] disappearedng: Does anyone here wrap your entire code in an anon function just for the sake of using "use strict"; ?
[22:27] SubStack: never
[22:27] mmalecki: disappearedng: you can just put "use strict" at the beginning
[22:27] mmalecki: but it's retarded
[22:27] wankdanker: fwg: thanks; i will probably end up doing that. Do you know if date.getTimezoneOffset() is daylight savings time aware?
[22:27] jredville: I wrap in anon function's for the sake of closure, never just for "use strict"
[22:28] fwg: wankdanker㇀ yes it is
[22:29] wankdanker: fwg: this is just for date comparison. i have a promotion that ends at end of day on 12/31/2011 (eastern time). is there a better way to do this?
[22:31] fwg: ah, alright. it would only be a problem if you had an api that returned that value or if the user would come in contact with it
[22:32] fwg: but you could always compute the UTC timestamp of the eastern time first, and then use that for comparison
[22:33] flip_digits has joined the channel
[22:33] shinuza has joined the channel
[22:34] richardr has joined the channel
[22:35] wankdanker: fwg: cool, thanks for your help. i was hoping that i was overlooking a date.getLocalTime() method or something similar.
[22:37] disappearedng: Any idea why I am getting this import error? http://paste.pocoo.org/show/527942/ I am following this APK https://github.com/bsstoner/opentok Somehow the function exist but then calling new on it raises an error
[22:38] sh1mmer has joined the channel
[22:39] brianloveswords has joined the channel
[22:40] justmoon has joined the channel
[22:40] shachaf has joined the channel
[22:41] disappearedng: Does anyone know if node has a console that I can just fire and debug?
[22:41] loucal has joined the channel
[22:42] ryan_stevens: node has a built in debugger
[22:42] ryan_stevens: disappearedng: but I prefer node-inspector
[22:43] mattgifford has joined the channel
[22:43] disappearedng: ryan_stevens: well all I want is to require opentok and see why I can't call new opentok.OpenTokSdk as a function
[22:43] disappearedng: I am talking more about a console as opposed to a debugger I guess
[22:44] disappearedng: v8 ships with a console, but then doesn't have 'require' defined
[22:44] letsgojuno has joined the channel
[22:44] ryan_stevens: yeah, I see what you mean
[22:44] jredville: disappearedng: are you just talking about a repl from the command line? Like `node`
[22:45] ryan_stevens: it takes a couple extra steps, but if you do use node-inspector you can use the console built into chrome while breaking at a certain point
[22:45] ryan_stevens: its super nice
[22:45] TheFuzzball: Is there a way to get the sqlite3 module to install on Windows?
[22:45] CoverSlide: probably not
[22:46] TheFuzzball: Is there an alternate database that uses a persistent file like sqlite3 that I can use on Windows?
[22:46] disappearedng: ok maybe I am not understanding how require works. If I have var opentok = require('opentok'); and then I inspected opentok indeed is equal to opentok { SessionProperties: [Function], Roles: [Function], OpenTokSDK: [Function] }, why would opentok.OpenTokSdk be undefined?
[22:46] CoverSlide: i like to use redis, and the redis windows port seems to work well enough
[22:47] CoverSlide: disappearedng: check case
[22:47] CoverSlide: opentok.OpenTokSDK != opentok.OpenTokSdk
[22:47] CoverSlide: this isn't php
[22:47] addisonj has joined the channel
[22:47] TheFuzzball: CoverSlide How does it store the data? Does it need a socket?
[22:47] disappearedng: CoverSlide: Damn n00b mistake thanks a lot
[22:47] cmr: TheFuzzball: redislite is a fork of redis that persists to a file like sqlite
[22:47] CoverSlide: yes it requires a socket
[22:48] cmr: Well, redis of course persists, but I'm sure you get my gist.
[22:48] ericnakagawa_ has joined the channel
[22:48] disappearedng: also is there like a global place where I can put my node_modules so it doesn't pollute my project space?
[22:48] maxogden: deps are pollution
[22:48] CoverSlide: how is that any different than `appendonly yes`
[22:48] TheFuzzball: Crap, there's no node module for redislite :S
[22:48] maxogden: oops i meant arent
[22:49] maxogden: disappearedng: http://www.mikealrogers.com/posts/nodemodules-in-git.html
[22:50] redir_ has joined the channel
[22:50] CoverSlide: i tend to run a separate redis.conf for each of my apps
[22:50] CoverSlide: and use domain sockets
[22:50] CoverSlide: but that's just me
[22:50] jgornick has joined the channel
[22:51] CoverSlide: plus on windows i don't think that's an option
[22:51] addisonj: hey, so on "res.send(err)" express used to auto-set a status code of 500, when did that get taken out?
[22:51] CoverSlide: ask #express
[22:51] disappearedng: Anyone familiar with how I can get socket.io to just console.log every socket packet?
[22:51] disappearedng: on the client end
[22:51] CoverSlide: every `packet`
[22:51] CoverSlide: ?
[22:52] ericnakagawa_ has joined the channel
[22:52] akter has joined the channel
[22:52] disappearedng: like socket.on("TEST"), socket.on("HELLO"), ...
[22:52] disappearedng: like I dun want to put console.log everywhere
[22:53] CoverSlide: well 3rdEden isn't here, he'd probably be the guy to ask
[22:53] jetienne has joined the channel
[22:53] CoverSlide: probably involves some low level hackery on the client
[22:55] CoverSlide: probably have to rtfs
[22:58] ChrisMatthieu has joined the channel
[22:59] mc: crapsicles. this in memory stream is not working for me
[22:59] mc: well, it's working
[22:59] mc: but it's doing it slowly
[23:02] vicapow has joined the channel
[23:02] mc: man.. maybe it's the write stream that's slow
[23:02] vicapow: hey all. what are peopling using for identity management?
[23:02] Wa has joined the channel
[23:02] markdaws has joined the channel
[23:03] maxogden: oauth
[23:04] loucal: I am trying to use node to relay a request to a json api (itunes store search api) and save the result in a mongodb before returning it to the user, but I am stumbling because the response to http.request comes back in chunks, so I am almost never successful at using JSON.parse() because the full json object has not arrived yet (i think) I posted what I am trying to do here https://gist.github.com/1541930 it seems like i am unsucessful when
[23:04] loucal: to 'save' or build up the chunk. This is my first node project so I apologize if this is obvious.
[23:04] lz1 has joined the channel
[23:05] jamescarr has joined the channel
[23:05] maxogden: loucal: i'd recommend using search.npmjs.org/#/request
[23:05] DTrejo has joined the channel
[23:05] vicapow: maxogden: oath is the protocol, not the identity manager
[23:05] maxogden: vicapow: your question wasnt very specific
[23:06] pyrotechnick has joined the channel
[23:07] mc: yeah.. the writable file stream is super slow
[23:07] loucal: maxogden: thank you, I had heard of request and totally forgot it would make my life easier here. I will definitely use it, but since this is a learning project for me is anyone able to just briefly explain what is going on with the itunesJson string not getting built up to anything? I just hate when I can't wrap my head around the basics like this.
[23:07] mc: either that or piping is super slow
[23:08] marcello3d: loucal: you'd have to do building up yourself
[23:09] Poetro has joined the channel
[23:11] maxogden: loucal: do a res.on('end', function(){ console.log(itunesJson) })
[23:11] loucal: marcello3d: I declared a variable itunesJson = ""; and then I did itunesJson += chunk; and I thought that was building it up, can you explain?
[23:12] loucal: maxogden: ok, checking that out
[23:12] marcello3d: loucal: (I didn't see your gist till now) it is building it up, but it happens asynchronously, so it's built up after your call to console.log('itunesJson:' + itunesJson);
[23:12] marcello3d: so you're making a string "", logging it, then adding stuff to it
[23:13] loucal: ahhh, marcello3d thank you, I kind of figured that, but wasn't getting it because i was logging it first
[23:14] jredville has joined the channel
[23:14] loucal: so before I check out request, is there any simple way I could just wait to insert into mongo? If you see the commented out lines give me an error because JSON.parse() doesn't seem to be getting a whole object
[23:14] Sami_ZzZ_ has joined the channel
[23:15] maxogden: loucal: are you waiting till the 'end' event now?
[23:16] loucal: ohh, maxogden sorry, I blame it on my girlfriend she just kneed me in the forehead, I'm a little dizzy, you already pretty much answered that :)
[23:16] maxogden: lol
[23:16] gregpascale has joined the channel
[23:17] loucal: im out to work out the kinks in this before all the 'you got beat up by a girl jokes' ;)
[23:17] loucal: thanks again everyone
[23:20] richardr has joined the channel
[23:20] fangel has joined the channel
[23:21] mara has left the channel
[23:22] coderdad has joined the channel
[23:23] benvie: oh hell yeah finally
[23:23] benvie: harmony extensions are in the latest chrome under a flag finally
[23:23] enmand has joined the channel
[23:24] cmr: benvie: which extensions?
[23:24] mattgifford has joined the channel
[23:24] cmr: All of harmony?
[23:24] smathy has joined the channel
[23:24] hughfdjackson has joined the channel
[23:24] benvie: I think it's the --harmony flag basically
[23:24] benvie: so yeah
[23:24] hughfdjackson: hey guys
[23:24] cmr: Sweet
[23:25] hughfdjackson: is worlize's websocket implementation 'the one'?
[23:25] benvie: latest canary has it in about:flags at the bottom
[23:25] hughfdjackson: as in the defacto implementation
[23:26] benvie: yeah I see Set, Map, WeakMap, Proxy, let and const work
[23:26] iRoj has joined the channel
[23:27] benvie: well let only works in strict mode functions
[23:28] plutoniix has joined the channel
[23:28] benvie: http://erik.eae.net/ has been writing this week about it
[23:28] richardr: Are there any very new, modern open-source examples of Node.js in action? (activity within last week) ... e.g. cms, blogs, etc that have *good* application structures
[23:28] chunhao_ has joined the channel
[23:28] benvie: hah, typeof null === 'null'
[23:29] benvie: wonder how much stuff that'll break
[23:29] redir_ has joined the channel
[23:30] vol4ok has joined the channel
[23:30] xSmurf: benvie: why would it break? that's standard JS
[23:31] benvie: typeof null === 'object' up to ES6
[23:31] hughfdjackson: <3 oh js
[23:31] benvie: lol
[23:31] hughfdjackson: you fickle beast you
[23:31] vicapow has joined the channel
[23:32] benvie: Proxy is fun to use in browsers, proxying DOM elements is fun
[23:32] benvie: kind of breaks things
[23:32] xSmurf: benvie: ah right
[23:34] richardr: Anyone using RailwayJS?
[23:34] chjj: typeof null === 'null' isnt as harmful as you think
[23:34] ph^_ has joined the channel
[23:34] martin_sunset has joined the channel
[23:35] chjj: a lot of people test for null just by doing `a === null`, not `typeof a === 'object' && !a`
[23:35] Cromulent has joined the channel
[23:36] benvie: no you're right
[23:36] benvie: I was thinking more of the
[23:36] benvie: switch (typeof x) situation
[23:37] benvie: although i guess that's fine still anyway
[23:37] benvie: since it explicitly tests for null at the end
[23:37] alcuadrado has joined the channel
[23:38] Cromulent has joined the channel
[23:38] tiglionabbit has joined the channel
[23:38] alcuadrado: I'm having trouble with Ejs and undefined variables
[23:38] alcuadrado: I have a template which may have or not a variable defined
[23:39] zomg: I think it might be best to just define then as null or undefined in the object you pass to ejs
[23:39] DTrejo: what was that client side ajax api library that isaac was praising the other day on twitter?
[23:39] zomg: but if for whatever reason you can't do that, using if(typeof whatever == 'undefined') should work
[23:39] LeMike has joined the channel
[23:40] alcuadrado: yep, I think I'm gonna do the former one
[23:40] alcuadrado: it's the correct way in js
[23:45] cclarke has joined the channel
[23:46] stagas has joined the channel
[23:48] cjm has joined the channel
[23:49] dob has joined the channel
[23:49] otakutomo has joined the channel
[23:53] davidwalsh has joined the channel
[23:55] Cromulent has joined the channel
[23:56] tprice has joined the channel
[23:58] enmand has joined the channel
[23:58] neilk_ has joined the channel
[23:58] cjm has joined the channel
[23:59] mikeal has joined the channel