[00:00] karellen has joined the channel [00:00] lsdafjklsd: I was hoping to get some clarification on the difference between sprockets and something like stitch [00:00] lsdafjklsd: can I just use sprockets, and have all my classes as seperate files? [00:01] shinuza has joined the channel [00:01] lsdafjklsd: I currently develop js apps locally using stitch and node, and then take the compiled module JS and deploy it static [00:01] lsdafjklsd: but I was wondering if I could use something like middleman, and use coffeescript / sprockets [00:01] lsdafjklsd: But the script loader landscape is kind of confusing [00:05] h4mz1d has joined the channel [00:05] subbyyy has joined the channel [00:06] karellen has joined the channel [00:07] sammmy: How can I make my session data persistent between? [00:07] sammmy: How can I make my session data persistent?* [00:08] widox has joined the channel [00:08] AaronMT has joined the channel [00:08] dividinglimits has joined the channel [00:08] dragon: sammmy: http://expressjs.com/guide.html#session-support ? [00:09] tonymilne has joined the channel [00:10] Slashbunny has joined the channel [00:10] _rockbot_ has joined the channel [00:10] sammmy: dragon: so use redis? [00:11] jglkhkj has joined the channel [00:11] dragon: sammmy: sure. [00:11] sammmy: dragon: what other session stores are there? [00:12] yaymukund: sammmy: memcached? [00:12] WarheadsSE: mongo.. etc etc etc [00:12] trotter has joined the channel [00:12] dividinglimits has joined the channel [00:13] sammmy: mongo, isn't a key:value db is it? [00:13] sammmy: I thought it was document based. But is that irrelavent? [00:13] sammmy: Anyway, mongo is too "heavy" for session storage IMO. [00:13] WarheadsSE: point out its an ption [00:13] WarheadsSE: redis, riak, etc etc [00:13] WarheadsSE: the session store can be in anything [00:13] dragon: sammmy: https://github.com/bartt/connect-session-mongo [00:13] sammmy: Which of things like redis and memcached do I have? [00:14] yaymukund: MySQL? just kidding :o) [00:15] sammmy: yaymukund: lol [00:15] hcchien has joined the channel [00:16] mattgifford has joined the channel [00:16] khrome has joined the channel [00:16] tommyvyo has joined the channel [00:17] sorensen__ has joined the channel [00:17] killfill: hi [00:18] seanstickle has joined the channel [00:18] killfill: i noticed http://visionmedia.github.com/commander.js/ <-- that doc is generated automatically by a rogram [00:18] killfill: what is it?.. :) [00:19] criswell has joined the channel [00:20] yaymukund: killfill: now I'm curious too [00:20] subbyyy has joined the channel [00:20] sammmy: Which is the most light-weight and fast: redis or memcached? [00:21] TooTallNate: yaymukund: killfill: i believe he's using "dox" to generate the doc AST [00:21] TooTallNate: then feeding it into some template [00:21] Poetro has joined the channel [00:21] killfill: mmMm [00:21] tommyvyo has joined the channel [00:22] argami has joined the channel [00:23] vdrab has joined the channel [00:24] ybit has joined the channel [00:24] crutex has joined the channel [00:24] TooTallNate: killfill: confirmed https://github.com/visionmedia/commander.js/blob/gh-pages/Makefile#L12-16 [00:24] stafamus has joined the channel [00:24] patcito has joined the channel [00:25] yaymukund: TooTallNate: oo, thanks. interesting approach [00:25] killfill: greate :) [00:25] dividinglimits has joined the channel [00:25] Sadin has joined the channel [00:26] joshholt has joined the channel [00:27] dnolen has joined the channel [00:27] vkareh has joined the channel [00:28] ybit: i'm not finding an e-commerce module :( [00:28] sammmy: Does node-redis manage it's own db? [00:29] sammmy: Or do I have to install redis and connect to it? [00:29] yaymukund: sammmy: the latter [00:29] sammmy: yaymukund: how heavy is redis, I'm guessing not like mysql? [00:29] WarheadsSE: ACTION points to RTFM time. [00:30] yaymukund: sammmy: http://redis.io/topics/faq [00:31] yaymukund: bit worse than memcached [00:31] dtrejo has joined the channel [00:32] paulwe has joined the channel [00:32] sven_oostenbrink: About setMaxListeners.. I have an array of all the same objects.. I have a set of 3 listeners for each object, but after adding about the 4th object, I get this error: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. [00:32] sven_oostenbrink: Now, how can this be if each object only has 3 listeners? [00:34] arduix has joined the channel [00:34] CromeDome has joined the channel [00:35] AvianFlu has joined the channel [00:35] TooTallNate: sven_oostenbrink: maybe you actually have a listeners leak :D [00:35] TooTallNate: sven_oostenbrink: try listening for the "newListener" event [00:35] TooTallNate: that'll help debug [00:35] infynyxx has joined the channel [00:36] ejholmes_ has joined the channel [00:37] localhost has joined the channel [00:37] benvie has joined the channel [00:37] francisl_ has joined the channel [00:38] Karmaon has joined the channel [00:39] pandeiro has joined the channel [00:39] dnolen has joined the channel [00:39] koo5 has joined the channel [00:40] mikeal has joined the channel [00:40] syntaxiko has joined the channel [00:41] sorensen__ has joined the channel [00:42] baudehlo has joined the channel [00:42] sven_oostenbrink: TooTallNate: There is something that I dont really get with listeners.. If I do a.on('test', function(){}); am I listening for "test" events from object a or am I listening to ALL "test" events from whichever object? [00:42] Octayn: sven_oostenbrink: object a only [00:43] TooTallNate: sven_oostenbrink: the function given during on('test', ...), will only be invoked when a.emit('test') is called [00:43] heavysixer has joined the channel [00:43] EvRide has joined the channel [00:43] dukeytoo: sven_oostenbrink: Does your loop where you add listeners do it in a callback? [00:43] sven_oostenbrink: TooTallNate: then how do I listen to the "newListener" event on that object exactly? [00:44] sven_oostenbrink: dukeytoo: yes [00:44] hij1nx has joined the channel [00:44] TooTallNate: sven_oostenbrink: "newListener" is a special event that gets emitted every time "on" is called [00:44] seebees has joined the channel [00:44] dukeytoo: sven_oostenbrink: Then that's your problem. You are attaching listeners to the last object only [00:45] agnat_ has joined the channel [00:45] Vespakoen has joined the channel [00:45] dnolen has joined the channel [00:45] r04r has joined the channel [00:45] r04r has joined the channel [00:46] Tobsn has joined the channel [00:46] dukeytoo: Because the callbacks happen after the loop is done [00:47] phlff has joined the channel [00:47] Druid_ has joined the channel [00:48] tommyvyo has joined the channel [00:49] Country has joined the channel [00:49] BillyBreen has joined the channel [00:51] Es0teric: what does parseBody do exactly? [00:52] retornam has joined the channel [00:52] tylerstalder has joined the channel [00:52] ziro` has joined the channel [00:53] systemfault: Parses a document's body to something more useful.. like an object. [00:53] r04r has joined the channel [00:53] sammmy: What's a good email module? [00:53] Tobsn: querystring parse( body ) ? [00:56] M4dH4TT3r has joined the channel [00:56] M4dH4TT3r: hello [00:56] c4milo has joined the channel [00:57] M4dH4TT3r: idlers? [00:57] Tobsn: no [00:57] achiu has joined the channel [00:57] Tobsn: just 6pm on the west coast [00:57] M4dH4TT3r: 5pm here [00:58] arduix has joined the channel [00:58] r04r has joined the channel [01:00] Tobsn: god i need a cocoa coder [01:00] dtrejo has joined the channel [01:00] Marak has joined the channel [01:01] sammmy: can node-email work on Windows? [01:01] Tobsn: probably [01:01] Tobsn: idk about it but its probably using sendmail [01:02] sammmy: Tobsn: How do I know if I have sendmail installed on my Windows computer? [01:02] baudehlo: you don't. [01:02] Tobsn: you dont [01:02] Tobsn: http://wiki.uniformserver.com/index.php/Installing_Fake_Sendmail_for_Windows <- [01:02] Tobsn: look up tutorials for using mail() under windows with php [01:02] baudehlo: If you need to send email there are other options [01:02] Tobsn: that should give you enough totorials [01:02] Tobsn: *u [01:03] sammmy: baudehlo: other options besides node-email? [01:03] baudehlo: yes. [01:03] r04r has joined the channel [01:03] baudehlo: but there are questions you must answer first. [01:03] huggies has joined the channel [01:03] Tobsn: you could just download vmware client, run any linux on your box and mount it to your windows explorer and use it over that [01:04] baudehlo: like do you have a local SMTP server, or are you sending outbound via Gmail (or similar) or do you need a full SMTP server for sending? [01:04] Tobsn: or you could use amazons email service [01:04] Tobsn: simplemail? or whatever it was named [01:04] baudehlo: SES [01:04] baudehlo: Or you could use Haraka [01:05] kordless_ has joined the channel [01:05] Tobsn: https://github.com/jjenkins/node-amazon-ses & https://github.com/mrduncan/aws-lib/tree/ses-secure [01:05] tommyvyo has joined the channel [01:06] baudehlo: https://github.com/andris9/Nodemailer is pretty decent [01:06] sammmy: baudehlo: I want to be able to send mail for now. [01:06] sammmy: I suppose I need some email account to do so? [01:06] Tobsn: hehe [01:06] baudehlo: you need an smtp server [01:06] Tobsn: he's all yours [01:06] dividinglimits has joined the channel [01:07] baudehlo: haha [01:07] baudehlo: thanks [01:07] sammmy: Tobsn: -.- [01:07] sammmy: I have an email server hosted at godaddy. Could I just use that? [01:08] ljharb: email on godaddy? use google apps for internet's sake. [01:08] Tobsn: btw. sammy, thats why i switched to mac/osx 4 years ago, i was sick of all the hoops you have to jump through with windows and local development... under osx you just open up a terminal because it basically is the same as your server - just a little hint for future investments ;) [01:08] r04r has joined the channel [01:08] TheAlphaNerd has joined the channel [01:09] orlandovftw has joined the channel [01:09] joshsmith has joined the channel [01:09] sammmy: ljharb: I could, but it would just cost extra money. All I'm saying is that I could use it for now. [01:10] sammmy: Tobsn: you're telling me. xP I wish I had a Mac. [01:10] ljharb: google apps is free [01:10] ljharb: and godaddy will always cost you more money than youre actually spending. [01:10] wizonesolutions has joined the channel [01:10] Tobsn: i think SES would be free too for a year or something [01:10] sammmy: ljharb: ? I thought google apps cost money.. [01:10] Tobsn: yeah dont use godaddy, use namecheap [01:10] sammmy: ACTION goes to google [01:10] ljharb: it's free for 10 or less accounts [01:10] context: godaddy costs you your dignity. no getting it back [01:10] sammmy: namecheap? [01:11] Tobsn: namecheap.com [01:11] totallymike: Namecheap is quality [01:11] Tobsn: and if you need a server for mess around, again i think amazon aws stuff is free for a while and rackspace cloud cost you like 10 bucks a month for a 256mb node which is enough for testing. as well as heroku cost nothing for one web worker [01:11] Ricket has joined the channel [01:11] totallymike: The linux action show makes me hate godaddy almost as much as godaddy makes me hate godaddy [01:12] context: heroku + sendgrid is free also. just saying [01:12] Tobsn: ah yeah sendgrid [01:12] Tobsn: thats the one i was looking for [01:12] Tobsn: hehe [01:12] context: almost time to go get food and drink a beer [01:12] Tobsn: sammy, look at cloud9 IDE and heroku, its super nice for beginners [01:12] systemfault: BEER! [01:12] context: or... ten [01:13] forsto has joined the channel [01:13] Tobsn: and if you ask joyent nicely they give you a test account as well [01:13] sammmy: Even once I get an email account at google apps, namecheap, whatever, how do I use that email server in Node? [01:14] r04r has joined the channel [01:14] totallymike: You have to have a smtp server to send email, right? [01:14] perezd has joined the channel [01:14] context: same way you use any email server from node ? [01:14] totallymike: You just point your smtp client to that smtp server [01:14] Tobsn: thats what we try to explain him ;) [01:15] Tobsn: any cocoa devs here? (yeah random question i know but #macdev is dead) [01:15] sammmy: context: and how do you use any email server from node? [01:15] igl1 has joined the channel [01:15] sammmy: oh [01:15] sammmy: sorry [01:15] context: find an smtp lib [01:15] sammmy: just rea [01:15] sammmy: read* [01:16] TooTallNate: Tobsn: i wouldn't exactly consider myself a cocoa dev but i do grock obj-c ;) [01:16] context: mmm. cloud 9 doesn't exactly fit onto iPad screen :( [01:16] sammmy: Would I need to install a node module in order to do all of this? [01:16] totallymike: sammmy: probably [01:16] totallymike: you can smtp with telnet [01:16] sammmy: Okay. So, I install node-email, and use it to connect to my smpt server? [01:17] sammmy: totallymike: hmm. [01:17] wizonesolutions has joined the channel [01:17] Tobsn: sammy, you either use a smtp server (linux default on basically every server is "sendmail") or you use an api like amazons SES, sendgrid, etc. or you use an external sendmail server from a email hoster, which could be your godaddy or gmail account (pop3), for that look up node.js libs related to that [01:17] totallymike: Don't take that under advisement. You should not telnet to a remote smtp server. [01:17] M4dH4TT3r: ssh [01:18] Tobsn: TooTallNate, i need a 5 line app and im too retarded to do it... all i want is that if i click the empty space in the menu bar (between the app menu and the icons on the rght) it should send PAGE UP command to the foremost window [01:18] totallymike: can't ssh to smtp :P [01:18] M4dH4TT3r: ACTION does [01:18] totallymike: explain yourself [01:19] sammmy: Tobsn: If I use an existing server, does it effect what the "from" email address looks like? [01:19] r04r has joined the channel [01:19] Tobsn: sammmy, sendgrid.com - sign up for a free account, then read here: http://docs.sendgrid.com/documentation/get-started/integrate/examples/nodejs-example-using-smtp/ [01:19] M4dH4TT3r: http://www.debian-administration.org/articles/487 [01:19] TooTallNate: Tobsn: interesting requirement :p i have no idea how to do it unfortunately :( [01:19] Tobsn: :/ [01:19] jacobolus has joined the channel [01:19] Tobsn: because im iOS damaged... i keep clicking the top bar to scroll up and it drives me nuts [01:20] mullr has joined the channel [01:20] Tobsn: im very close to have someone on oDesk code it for me [01:20] Tobsn: hehe [01:20] sammmy: ah thanks. [01:20] Tobsn: have it coded and put it for 99 cents on the app store :P [01:20] sammmy: node_maiiler is the module I need too. [01:21] Tobsn: next day: millionaire :P [01:21] sammmy: Idk what node-email does for me exactly (I guess that's if I wanted to host my own email server?). [01:21] dekub has joined the channel [01:21] ehazlett has joined the channel [01:21] context: Tobsn: you can't do that in ios. [01:21] Tobsn: thats kinda the default setting in iOS under most apps [01:21] M4dH4TT3r: you catch that totallymike ??? [01:21] Tobsn: tap statusbar, scroll up [01:21] context: your app can't override clicks to the currently running app [01:21] totallymike: just came back from the bathroom :P reading it now [01:21] alejandromg has joined the channel [01:21] Tobsn: context, i want it for osx [01:21] Tobsn: you missed something in between ;) [01:22] context: people click to scroll in os x? [01:22] Tobsn: i do [01:22] Tobsn: a lot [01:22] context: weird [01:22] totallymike: ah so it's cheating [01:22] nodebiscut has joined the channel [01:22] totallymike: but yeah that works too [01:22] Tobsn: and it doesnt work and it takes my brain a second to handle the disappointment of not scrolling up [01:22] context: clicking is such a waste of energy. you have to actually push down [01:22] M4dH4TT3r: therre no such ting as cheating in love of tech [01:22] dodo has joined the channel [01:23] totallymike: for some reason I was thinking you meant ssh burgle.com -P 25 [01:23] context: hell I rarely click to do anything [01:23] totallymike: or whatever the syntax is [01:23] M4dH4TT3r: lol [01:23] isaacs: Marak: funny you ask. [01:23] isaacs: Marak: https://github.com/isaacs/npm/issues/1329#issuecomment-4629161 [01:23] tommyvyo has joined the channel [01:24] M4dH4TT3r: marak=polish? [01:24] Tobsn: marek normally [01:24] r04r has joined the channel [01:24] Tobsn: polish name [01:24] isaacs: Marak: i just finished pause/resume behavior for the glob.Glob class, only to realize that it's not actually useful here. [01:24] rlidwka has joined the channel [01:24] Es0teric: is AvianFlu here? [01:24] isaacs: M4dH4TT3r: I always thought it was Marakesh [01:24] regality has joined the channel [01:24] Tobsn: Es0teric, no it's with the birds [01:24] neoesque has joined the channel [01:24] Es0teric: is that the same AvianFlu that maintains the ntwitter module? [01:24] M4dH4TT3r: i know a polish guy named marek -why i ask [01:25] Marak: isaacs: i was channeling some deep shit today [01:25] Marak: isaacs: my github workflow has power [01:25] AvianFlu: Es0teric, what's up [01:25] Tobsn: god the #macdev channel is so dead [01:25] Marak: activity feed: https://github.com/marak/ [01:25] Tobsn: like 300 people in it and quiet [01:25] Es0teric: AvianFlu are you the same AvianFlu that maintains the ntwitter module? [01:25] AvianFlu: yes I am. [01:25] Es0teric: perfect [01:25] Marak: AvianFlu++ [01:25] M4dH4TT3r: let me let you in won a little secret tobsn www.macsux.com [01:26] Tobsn: hehe [01:26] Es0teric: ok that module you created, AvianFlu, is it possible to use it so that people login to their own twitter accounts and tweet from there? [01:26] Tobsn: mac is awesome. [01:26] qbert_: nope. [01:26] WarheadsSE: thars Marak .. [01:26] whaley has joined the channel [01:26] AvianFlu: Es0teric, people would need to specify their own API keys [01:26] M4dH4TT3r: Mac is like winning the special olympics even if you win your still retarded [01:26] AvianFlu: but there's nothing stopping you, really [01:26] Es0teric: AvianFlu what if they just allow the app to access their profile? [01:27] Es0teric: through authentication [01:27] M4dH4TT3r: tacacs or radius? [01:27] AvianFlu: I haven't actually built an app with the "log in via twitter" button, but I'm pretty sure you just need the oauth info [01:27] AvianFlu: I end up using ntwitter more in bots and CLI tools [01:27] Es0teric: AvianFlu and how would you actually integrate oauth into your module? [01:28] wizonesolutions has joined the channel [01:28] sammmy: Is there a way to whitelabel my person gmail account? [01:28] AvianFlu: Es0teric, the api keys that ntwitter wants are oauth keys already [01:28] r04r has joined the channel [01:28] Es0teric: AvianFlu right... [01:28] AvianFlu: I'm not sure how to set that button up so it grabs people's api keys though [01:28] Marak: does anyone know how to use npm postinstall scripts [01:28] Marak: is "scripts": { "postinstall": "jitsu wizard" }, valid? [01:28] warz has joined the channel [01:28] warz has joined the channel [01:29] AvianFlu: the oauth is handled internally by node-oauth [01:29] Marak: npm WARN skipping, cannot run in /Users/maraksquires/dev/jitsu jitsu@0.8.3 jitsu wizard [01:29] Es0teric: AvianFlu well i was thinking more of a login form that the person inserts their twitter account/pw [01:29] Marak: i dont understand the opaque message, hrmmm [01:29] AvianFlu: that would be basic auth, which I'm not sure ntwitter supports [01:29] phraktal77 has joined the channel [01:29] Es0teric: hmmm [01:29] AvianFlu: the twitter API lets you do that, but I think ntwitter is set up for oauth keys [01:29] jmar777 has joined the channel [01:30] Es0teric: why wouldnt you let ntwitter do that as well? [01:30] Es0teric: o.O [01:30] totallymike: Es0teric: that's not how twitter rolls [01:30] totallymike: they use oauth [01:30] chadskidmore has joined the channel [01:30] Es0teric: totallymike i understand that [01:31] Tobsn: i use tweetbot. it rocks that if you use it hardcore after like 30 minutes you run out of "commands"... hehe [01:31] M4dH4TT3r: not how twitter trolls* [01:31] Es0teric: i want to make a web based twitter client [01:31] Tobsn: thats more like it [01:31] Es0teric: not a mobile app [01:31] Es0teric: :| [01:31] totallymike: In order to use basic login with a twitter client, you'd essentially have to pretend to be a browser, no? [01:31] k1ttty has joined the channel [01:32] totallymike: or a cookie, at least [01:32] cesar_ has joined the channel [01:32] Es0teric: i am not trying to make a mobile app [01:32] Es0teric: i am trying to make a browser app [01:32] totallymike: You'd still want oauth [01:32] Es0teric: right [01:32] Es0teric: i had one working in PHP [01:32] M4dH4TT3r: im trying to make a mobile app so what? [01:32] Es0teric: where it authenticates [01:32] M4dH4TT3r: is that what this channel is for? [01:32] rwaldron has joined the channel [01:32] Es0teric: M4dH4TT3r you arent helping [01:32] forsto has left the channel [01:33] M4dH4TT3r: ACTION was serious [01:33] Es0teric: and stop trolling [01:33] r04r has joined the channel [01:33] WarheadsSE: Es0teric: they made a web based twitter client ;) its called twitter ;) [01:33] totallymike: nobody's trolling, we're seriously OT [01:33] codelahoma has joined the channel [01:33] Tobsn: lol [01:33] k1ttty has joined the channel [01:33] Tobsn: you guys use benter? [01:33] Tobsn: ;) [01:33] M4dH4TT3r: orbot [01:33] M4dH4TT3r: ; [01:33] Es0teric: you see this is what i hate… someone tries to make something that twitter doesnt HAVE in their shit [01:33] forsto has joined the channel [01:34] Es0teric: and all of a sudden [01:34] Es0teric: people HAVE to use twitter [01:34] M4dH4TT3r: lol [01:34] Es0teric: then WHY have the twitter api available? [01:34] WarheadsSE: kinda like Apple huh ??? [01:34] M4dH4TT3r: mmmm beer [01:34] Es0teric: what about apple? [01:34] totallymike: by use twitter do you mean twitter page? [01:34] WarheadsSE: jailbreak ? what? NO!! SUE1! [01:34] Es0teric: look [01:34] Es0teric: i have my reasons for making this WEB client [01:35] Es0teric: i just want to know how to actually get a user authenticated [01:35] totallymike: that's all well and good. There are plenty of good reasons [01:35] totallymike: Es0teric: the answer is oauth. [01:35] M4dH4TT3r: yep [01:35] Es0teric: totallymike perfect, i USED oauth [01:35] Es0teric: and it always gives me an error [01:35] Es0teric: now what? [01:35] totallymike: now we're getting somewhere [01:35] Tobsn: https://banters.com/intro - twitter clone made by former twitter employees. [01:35] WarheadsSE: fix the erro :p [01:35] totallymike: my car doesn't work, now what do I do? [01:35] ioscale: Es0teric: use passport-twitter :) [01:35] M4dH4TT3r: i was wondering what the javascript ext on this room was about though? [01:36] Tobsn: now with pinterest design. they're getting better hah [01:36] Es0teric: ioscale passport-twitter? [01:36] M4dH4TT3r: as i went to #node in relation to hardware and ended up here [01:37] M4dH4TT3r: ACTION is a hardware geek [01:37] totallymike: So Es0teric last we left off, you were getting an error message. [01:37] Es0teric: yeah, totallymike this is when i was using nodejs [01:37] Es0teric: not express [01:37] AvianFlu: Es0teric, it's not about "letting ntwitter do stuff". It's a fork I maintain of a dead twitter api client. [01:37] M4dH4TT3r: did it say user error: replace user ? [01:37] ljharb: Es0teric: i'm using sign in with twitter on a node app and it works fine, with passport and passport-twitter [01:38] AvianFlu: formerly dead, I suppose [01:38] r04r has joined the channel [01:38] AvianFlu: making web apps with twitter integration has become very popular [01:38] AvianFlu: and I should support it better [01:38] AvianFlu: but it's not cleanly documented right now [01:38] M4dH4TT3r has left the channel [01:38] Es0teric: ljharb thats intresting.. are you using express as well? [01:38] ljharb: yes [01:38] TheEmpath2: I'm dealing with a createReadStream and I would like to pipe its contents to a variable. is this possible? [01:38] totallymike: These days I don't think they let you call it a web app unless it has twitter integration [01:39] Es0teric: ljharb are you using the streaming api? [01:39] TheEmpath2: a better question would be if such a thing is possible with piping in general/ [01:39] jaha: Any idea how to configure the user node.js/express will write files as? I figured it would be the user I installed them as but it is still writting as root [01:39] Es0teric: just installed passport-twitter [01:39] ljharb: Es0teric: no, i'm just using sign in with twitter [01:39] Es0teric: i see [01:40] ljharb: what are you trying to do with the streaming api? [01:41] totallymike: realtime updates I'd presume [01:42] RobWC has joined the channel [01:42] RobWC has left the channel [01:42] ljharb: the implied question is what is he trying to do that's not already solved elsewhere [01:42] totallymike: solve it again, duh [01:42] r04r has joined the channel [01:42] ljharb: lol [01:44] Es0teric: 500 Error: Cannot find module '/javascripts/test.js' [01:45] Es0teric: ljharb well i am trying to do something with real time [01:45] Es0teric: not just stat updates [01:45] Es0teric: but more stuff [01:46] ljharb: something being? [01:47] karterk has joined the channel [01:47] Es0teric: right now, ljharb i just want to get this basic stuff running [01:47] r04r has joined the channel [01:47] Es0teric: i am not trying to go over my head by having all these ideas for it but cant get the basics down [01:47] ljharb: gotcha. sign in only is relatively simple, i can help with that part [01:48] Es0teric: the simple stuff right now is user logs in -> sees profile, can post tweet and sees their timeline [01:49] Knowledge has joined the channel [01:49] Es0teric: ljharb right now i have a way more severe problem… which is - http://notey.it/n/NXk [01:50] ljharb: have you tried "../public/javascripts/test.js" ? [01:50] cameron_ has joined the channel [01:50] Es0teric: no i did not [01:50] Es0teric: let me do that now [01:51] Es0teric: ljharb -> 500 Error: Cannot find module '../public/javascripts/test.js' [01:51] ljharb: and "./public/javascripts.test.js" ? [01:51] ehazlett has joined the channel [01:52] r04r has joined the channel [01:52] infynyxx has joined the channel [01:52] dephex has joined the channel [01:52] Es0teric: oh wow [01:52] Es0teric: that worked [01:53] ljharb: the "./" is required when youre not requiring a module [01:53] Es0teric: now i get myVar is not defined in dash.ejs [01:53] lsdafjklsd has joined the channel [01:53] ljharb: in test.js, do you set exports.myVar ? [01:53] Es0teric: yeah [01:53] ljharb: oh [01:53] Es0teric: myVar is an object [01:53] forsto has joined the channel [01:54] Es0teric: ljharb -> <%-myVar.var1 %> [01:54] ljharb: because you want response.render('dash.ejs', {locals: myVar: test.myVar}); [01:54] Es0teric: ljharb say what? is locals a keyword? [01:55] ljharb: oh i typed it wrong [01:55] ljharb: response.render('dash.ejs', {locals: {myVar: test.myVar}}); [01:55] panosru has joined the channel [01:56] wilmoore has joined the channel [01:57] Es0teric: i see [01:57] ljharb: otherwise the template has no idea what to call the variable [01:57] Es0teric: so is that how i set variables to a template? [01:57] Es0teric: by doing local: {} [01:57] ljharb: locals, yes [01:57] Es0teric: *locals [01:57] ljharb: it's in the EJS docs [01:57] WarheadsSE: for ejs, yes [01:57] Es0teric: globals [01:57] Es0teric: works too right? [01:58] ljharb: i don't see why it would [01:58] Es0teric: alright so… now that i kinda understand that the index is going to be the sign in form, and dash.ejs will be the users profile [01:58] ditesh|cassini has joined the channel [01:59] pointerM has joined the channel [01:59] Es0teric: well it would be /dash/auth=1 [01:59] Es0teric: that would be the URL [01:59] MartinCleaver has joined the channel [01:59] MartinCleaver has joined the channel [01:59] r04r has joined the channel [01:59] ericmuyser has joined the channel [01:59] pointerM: Hello [02:00] Brandon_R has joined the channel [02:00] WarheadsSE: ACTION waves from the back [02:00] Brandon_R: hi [02:02] cinaglia has joined the channel [02:02] Brandon_R: ACTION waves back [02:03] tilgovi has joined the channel [02:04] ehazlett has joined the channel [02:04] Es0teric: wow.. managing multiple urls [02:04] Es0teric: is rediculous on this [02:04] chapel: what do you mean? [02:04] Hamms has joined the channel [02:04] Es0teric: right now, i have two app.get() [02:04] maxogden: you know, this [02:04] Es0teric: right? [02:05] Es0teric: i'll just paste the code [02:05] maxogden: into gist.github.com [02:05] Brandon_R: ok [02:07] r04r has joined the channel [02:07] r04r has joined the channel [02:07] c4milo has joined the channel [02:07] Es0teric: chapel i have this -> http://notey.it/n/NXo [02:09] chapel: well you shouldn't require a file inside of a route [02:10] chapel: I know that isn't your problem that you are complaining about [02:11] disappearedng has joined the channel [02:11] Es0teric: chapel right… my problem right now is that whatever is in the index doesnt render in the index… (btw i changed it from index.ejs to layout.ejs) [02:11] Es0teric: and whatever is in /test doesnt render in dash.ejs [02:11] Es0teric: everything is just blank [02:11] crodas has joined the channel [02:12] Brandon_R: isn't require blocking? [02:12] r04r has joined the channel [02:12] r04r has joined the channel [02:12] warz has joined the channel [02:12] ljharb: Es0teric: don't pass a variable as the second argument to render. pass an object with the locals property [02:12] warz has joined the channel [02:15] Es0teric: ljharb i am on /test and its showing me what layout.ejs is supposed to be showing (but its an error) [02:15] langworthy has joined the channel [02:15] ljharb: oh. layout.ejs is required and used by every page. [02:15] blueadept has joined the channel [02:15] ljharb: everything calls layout.ejs, which in turn calls <%- body %> i think [02:16] rlidwka: require is blocking but it's cached so no problem with requiring inside a route [02:16] Es0teric: if i dont require inside a route [02:16] Es0teric: how else am i supposed to require the file? [02:16] totallymike: Es0teric: was it you in here a while ago trying to figure out why you couldn't get index to use layout as a template? [02:16] ljharb: Es0teric: you can require outside the route. [02:16] totallymike: Es0teric: you require it outside the route and call it within [02:16] Es0teric: totallymike uh… i dont think so [02:16] totallymike: okay nevermind [02:17] ljharb: Es0teric: yes, you can. read up on scoping and closures. [02:17] rlidwka: by the way it's always possible to write up nonblocking require :) [02:18] Es0teric: ok so i set a

on layout.ejs [02:18] Es0teric: and no matter what url i go to.. it still renders layout.ejs [02:18] Es0teric: am i supposed to be putting references [02:18] Es0teric: from the files i want to load on layout.ejs? [02:18] totallymike: Es0teric: no [02:18] ljharb: it will always render layout.ejs. you need layout.ejs to contain "<%- body %>" to render the actual page content [02:18] Brandon_R: in php you start a mysql connection per request. is that not the accecpted way in node. you start a connection on application bootstrap and use it for all connections [02:18] ljharb: read the ejs documentation please [02:18] totallymike: whatever template you want, it wraps layout.ejs around it [02:18] Brandon_R: am i thinking right here? [02:19] totallymike: ljharb++ [02:19] Es0teric: THERE we go [02:19] WarheadsSE: Brandon_R: you started a new mysql per request ? [02:19] WarheadsSE: ouch. [02:19] rlidwka: lol [02:19] Brandon_R: i thought that's how its done in php [02:20] warz: no, thats a bad idea, generally. [02:20] Es0teric: now i am getting somewhere... [02:20] WarheadsSE: well, thats one way.. if you're not using fcgi, or isapi & then you use something called connection pooling :) [02:20] rlidwka: dont remind about php... thats a slow ugly crap :P [02:20] Emmanuel has joined the channel [02:21] WarheadsSE: dude, you didnt have to write a SOAP XML interface to a &)(%**&^&* COBOL INVENTORY PROGRAM [02:21] WarheadsSE: ACTION flames [02:21] rlidwka: ouch [02:21] Es0teric: rlidwka php is not that bad really.. [02:21] ljharb: www.stopsoap.com [02:22] ljharb: i mean http://stopsoap.com/ [02:22] Es0teric: whats SOAP? [02:22] Brandon_R: soap is xml] [02:22] Es0teric: soup? [02:22] Es0teric: yeah, i'd rather get my data via JSON [02:22] Es0teric: thank you very much [02:22] Es0teric: :) [02:23] Brandon_R: ide rather get my data via binary [02:23] mikeal has joined the channel [02:23] Es0teric: Brandon_R you mean [02:23] Es0teric: base64? [02:23] Brandon_R: a raw blob of memory [02:23] ljharb: xml = ick [02:23] warz: json is not a transport protocol [02:23] Brandon_R: node is pretty much settling in the web scene? [02:24] WarheadsSE: ""settling": [02:24] retornam_ has joined the channel [02:24] WarheadsSE: aka, more accepted ? [02:24] Brandon_R: yeah [02:25] dtrejo: totes [02:25] WarheadsSE: let me put it this way [02:25] WarheadsSE: node on Azure [02:25] WarheadsSE: 'nuf said [02:25] dtrejo: & windows [02:25] dtrejo: & palm devices [02:26] WarheadsSE: meh, getting on MS's cloud platform was way harder than palm [02:26] ljharb: azure? O.o [02:26] WarheadsSE: Windows Azure [02:26] nicholas_ has joined the channel [02:26] payara has joined the channel [02:27] ljharb: yeah i'm familiar. why'd you choose that? [02:27] Brandon_R: iocp is faster than poll/kqueue/select etc? [02:27] Brandon_R: is that why ryan said node is faster on windows? [02:28] WarheadsSE: ljharb: lol, im not choosing that! [02:29] WarheadsSE: I'm saying it was harder to get on than just windows [02:29] ljharb: lol ah [02:29] WarheadsSE: personally I build on Arm devices :p [02:29] ovaillancourt has joined the channel [02:29] WarheadsSE: (like the onw I'm on right now) [02:30] phraktal77 has left the channel [02:30] boltR has joined the channel [02:30] thetony: what are you on now? [02:31] Brandon_R: qindoqa [02:33] WarheadsSE: GoFlex Net, armv5te, 1.2Ghz Marvell Kirkwood w/ 128MB ram [02:34] pizthewiz has joined the channel [02:35] broofa has joined the channel [02:35] totallymike: Fun that you get to build on a NAS? [02:36] WarheadsSE: ACTION developer w/ Arch Linux ARM [02:36] Destos has joined the channel [02:36] totallymike: Just saw that in my googlings [02:38] totallymike: Well that's pretty awesome. Good luck. [02:38] WarheadsSE: node runs pretty well on it actually. [02:38] WarheadsSE: lol.. but its runs pretty well on just about anything [02:39] thetony: i'm writing some data warehousing tools in it, it's fast as all get up [02:40] totallymike: and now bed time for me [02:40] kirbysayshi has joined the channel [02:40] mattgifford has joined the channel [02:42] jaha: GRRR, i hate not getting errors [02:43] AdamGoodrich2 has joined the channel [02:49] zackattack has joined the channel [02:50] payara: anyone know how to determine the negotiated protocol for a connection on a TLS server ? [02:50] kirbysay_ has joined the channel [02:51] stelcheck has joined the channel [02:51] tonymilne: anyone had any problems with npm on ubuntu on a fresh install of node 0.6.13? [02:51] tonymilne: http://hastebin.com/supiwawuqe.rb [02:53] payara: to avoid confusing with NPN - I meant I'm looking to determine the negotiation cipherSuite for a connection to a node TLS server [02:53] disappearedng has joined the channel [02:56] takkun1946 has joined the channel [02:57] stephen has joined the channel [02:58] stephen has left the channel [03:00] ditesh|cassini has joined the channel [03:01] Es0teric: ljharb how do you sign in through twitter? [03:03] sammmy: What sort of thing do I need in order to get SSL set up with my Express app? [03:03] Joeysomo has joined the channel [03:04] ljharb: Es0teric: i click the button on my app, and it works? [03:04] Es0teric: ljharb that helps alot man... [03:04] Es0teric: that REALLY helps [03:04] ljharb: lol [03:04] ljharb: do you have passport and passport-twitter installed? [03:05] Es0teric: yes [03:05] Es0teric: right now i actually authenticated myself [03:05] Es0teric: through oauth [03:05] Es0teric: but without a login form [03:05] ljharb: so you have to add two routes, one to passport.authenticate('twitter') [03:05] Es0teric: i want the user to login through the login form and display their tweets/timeline and stuff [03:05] ljharb: read the passport docs [03:06] ljharb: if they are signing in with twitter, you don't have a login form [03:06] chjj: sammmy: you need a certificate [03:06] ljharb: their credentials are their twitter account. otherwise you have to build a "connect to twitter" thing which is different than "sign in with twitter" [03:06] chjj: sammmy: http://nodejs.org/api/https.html and http://nodejs.org/api/tls.html for more info [03:06] sammmy: chjj: where do I get that? XD [03:07] broofa has joined the channel [03:07] chjj: sammmy: you either need to buy one from a certificate authority, or create one and sign it yourself [03:07] baudehlo has joined the channel [03:07] chjj: sammmy: the downside to using a selfsigned cert is, browsers go crazy [03:07] Es0teric: ljharb lets go with the "connect to twitter" thing [03:07] sammmy: chjj: what do browsers do? [03:08] chjj: sammmy: all of them [03:08] ljharb: k well i didn't build that, so i'm not sure how - but i'm sure it's similar. although passport isn't likely the way to go [03:08] sammmy: chjj: what do they do? [03:08] arthurdebert has joined the channel [03:08] ljharb: you're building a twitter client - is there a reason to give them other credentials? [03:08] chjj: sammmy: if youre doing anything in production you probably want to buy a cert [03:08] hcchien has joined the channel [03:08] payara: is there an easy way to see which encryption scheme was selected from the SSL negotiation? [03:08] sammmy: chjj: can you use a purchased cert for both production and development? [03:09] chjj: sammmy: a cert verifies you as a host, to confirm that a user's connection hasnt been hijacked in any way [03:09] ljharb: payara: just curious, why do you care which scheme? [03:09] Es0teric: ljharb what do you mean? no i just want them to connect using their own twitter account/password [03:09] Es0teric: i would assume thats what 'connect to twitter' is [03:09] chjj: sammmy: yes [03:09] chjj: sammmy: if youre just doing development, theres no reason you cant use your own self signed cert temporarily [03:10] tonymilne has joined the channel [03:10] sammmy: chjj: I'm doing development right now, but I'm also hosting it on my VPS too [03:11] Brandon_R: hi [03:11] ljharb: Es0teric: ok "sign in with twitter" means the only authentication they have is through twitter. "connect to twitter" means they register an account on your server, and connect their twitter account to it. [03:11] ljharb: "sign in with twitter" is simpler [03:11] Es0teric: ah right right, yeah so i am going with 'sign in with twitter" then [03:11] rtgibbons has joined the channel [03:12] ljharb: then read the passport docs, and they tell you exactly how to do it [03:12] Es0teric: alright [03:12] ljharb: i followed their instructions verbatim and it worked fine [03:12] pp01bit has joined the channel [03:12] debris has joined the channel [03:12] benvie has joined the channel [03:12] Es0teric: ljharb wheres the gist/ [03:12] Es0teric: ? [03:12] payara: ljharb: I want to benchmark the different schemes so I need to know which ones are chosen for a connection (some of the clients are from 3rd parties and I don't know what cipherSuites they propose to the server - at least not with packet sniffing I suppose) [03:12] Es0teric: is it in passport-twitter? [03:13] ljharb: Es0teric: http://passportjs.org/ ? [03:13] Es0teric: there we go [03:13] payara: with->without [03:13] chjj: sammmy: oh sorry, i didnt see your question right. yeah, browsers go crazy. they just show a big warning page usually. [03:13] ljharb: payara: hmm, why do you need to benchmark those? that's never likely to be your bottleneck [03:13] Es0teric: it seems when i installed passport-twitter [03:14] Es0teric: it installed passport as well [03:14] sammmy: chjj: browsers only trust certs from paid for institutions? [03:14] chjj: sammmy: so unless you really need an encrypted connection and dont care about the cert or the user seeing a big warning page, its probably not good to use a self-signed cert. [03:14] ljharb: its a dependency, so yes [03:14] wdbl has joined the channel [03:14] ljharb: sammmy: yes. [03:14] chjj: sammmy: each OS carries its own collection of certs it trusts [03:14] ljharb: otherwise any spammer could make their own certificate and defeat the purpose of having them [03:14] payara: ljharb: I have a multitenant endpoint that relays real time data feeds to as many clients as it can handle [03:14] stelcheck has joined the channel [03:14] sammmy: I see [03:15] payara: ljharb: all the publishers and subscribers connect to the same tls server instance [03:15] ljharb: payara: interesting, ok. why not just support the fastest encryption scheme, if speed is that important? [03:16] brandwe has joined the channel [03:17] payara: ljharb: yes, I have played a little with the cipher ordering in the TLS options and managed to change the selected one where I can easily see it (browser) but for the clients that aren't browsers that are done by 3rd parties I don't know what cipher schemes they propose (my understanding is that the client proposes a set of schemes and the server selects the "best" one that matches from that list) [03:17] ljharb: so just pick one and fix the clients that complain :-) [03:17] ljharb: or, have the http error page it redirects to send you a log notice [03:18] payara: ljharb: so was expecting that it would be available somewhere (obviously something "knows" what the decided scheme is in order to write stuff out - but is that surfaced anywhere within the cleartextstream properties?) [03:18] reed has joined the channel [03:18] ljharb: payara: ah. can't help you there, thanks for satisfying my curiosity [03:19] phlff has joined the channel [03:19] payara: ljharb: but then I run the risk of breaking a productive service :-( [03:19] lmorchard has joined the channel [03:19] TheAlphaNerd has joined the channel [03:19] cliffano has joined the channel [03:19] ljharb: can't make an omelet [03:19] payara: ljharb: np [03:20] Druid_ has joined the channel [03:22] debris has joined the channel [03:22] dylang has joined the channel [03:24] broofa has joined the channel [03:25] dukeytoo has joined the channel [03:25] jaha: OK, when using the module "fluent-ffmpeg", something its doing is causing node to peak at 100% CPU and refuse furhter interaction with it. How can I can trace the problem down farther, its NOT logging anything out. [03:26] jaha: im ripping my hair out over here [03:26] ericmuyser has joined the channel [03:28] freedomcaller has joined the channel [03:30] hcchien has joined the channel [03:30] freedomcaller: hey i just installed nodejs and it runs fine if i use the node command, but if i do node filename i get an invalid elf header error? [03:31] zivester has joined the channel [03:31] a_suenam_ has joined the channel [03:31] dukeytoo: Never heard of elf headers. [03:32] freedomcaller: same [03:32] freedomcaller: but i sloved my problem! [03:32] freedomcaller: i saved my file as a .node instad of a .js [03:32] freedomcaller: well that was what i did wrong [03:33] freedomcaller: the opposite solved it [03:33] sreeix has joined the channel [03:33] freedomcaller: but of course to isnt not opposites day [03:33] freedomcaller: thanks ^_^ [03:34] karterk has joined the channel [03:34] null- has joined the channel [03:36] karterk: is there an API for NPM? Something I can use pull stats about a module etc.? [03:36] disappearedng has joined the channel [03:36] dukeytoo: jaha: What is? [03:36] infynyxx has joined the channel [03:37] dukeytoo: jaha: Damn autocorrect... What os? [03:37] jaha: OSX [03:38] T_Zano has joined the channel [03:39] Es0teric: whats the .addListener equivalent for express? [03:39] Es0teric: .listen()? [03:39] spion1 has joined the channel [03:39] jaha: well i found I accidently updated my npm for it, when i dropped a coupld versions back it worked again (still need a good way to manage npms over git, nothing I do seems to work, i always have to reinstall/rebuild everything), but I would like to know any ways to troubleshoot why it was hanging stuff up cause i was getting NO logs anywhere [03:40] khrome has joined the channel [03:41] dukeytoo: I dont know much about debugging in node. Sry. [03:42] dukeytoo: Es0teric: I think you want app.get() [03:43] arthurdebert has joined the channel [03:47] Poetro has joined the channel [03:52] gregmore_ has joined the channel [03:54] mandric has joined the channel [03:54] tc100 has joined the channel [03:54] jaha: how do you guys manage your npms for deployment on other OSs. I have been trying to get the GIT method working but anything that needs to compile seems to mess up even if I do a rebuild. I know you're suposed to leave the build targets out of git but im not sure which all the files are, is it just the build folder? [03:54] mikeal has joined the channel [03:56] Vennril has joined the channel [03:56] null- has left the channel [03:56] chjj: jaha: both node-waf and node-gyp put relevant files in `build/` [03:58] ehazlett has joined the channel [03:58] QiBala has joined the channel [03:59] jaha: thats what I thought, but for example, some packages like "zeromq" and "canvas" dont want to rebuild nicely and require a "fresh" install, not sure what else I could be doing to make the process a bit smoother [04:00] Es0teric: how do i activate a script as soon as i get into the url? [04:00] gavin_huang has joined the channel [04:03] isaacs: jaha: yes, it's just the build/ folder typically, but you can also use shrinkwrap in some cases. [04:04] trotter has joined the channel [04:04] caolanm has joined the channel [04:05] r04r has joined the channel [04:06] samal has joined the channel [04:08] dr0id has joined the channel [04:08] dtrejo has joined the channel [04:09] orlandovftw has joined the channel [04:09] r04r has joined the channel [04:10] warz has joined the channel [04:10] warz has joined the channel [04:14] r04r has joined the channel [04:15] samuelgoodwin has joined the channel [04:16] seebees has left the channel [04:17] aslant has joined the channel [04:18] astropirate has joined the channel [04:18] hipertracker_ has joined the channel [04:19] r04r has joined the channel [04:19] tornad has joined the channel [04:21] elifou` has joined the channel [04:22] tedsuo has joined the channel [04:22] tedsuo: isaacs: are office hours happening tomorrow? [04:23] nateps has joined the channel [04:25] payara: @isaacs: does information about the negotiated cipher scheme get surfaced anywhere within the cleartextstream of a TLS connection? I've looked and looked but been unable to find anything :-( [04:27] take_cheeze has joined the channel [04:28] Aria has joined the channel [04:30] jn has joined the channel [04:31] karellen has left the channel [04:31] galaxywatcher has joined the channel [04:38] rlidwka: if I have a couple of simple helloworld-like webservers, it is reasonable to run it with just one node.js process to save system memory? [04:38] broofa has joined the channel [04:39] westg: yes [04:41] deoxxa: hm. when there's two modules being installed by npm, and they have a dependency in common, but they both explicitly require different versions, the different versions are each installed in the node_modules directory of each module being installed, right? [04:41] ericmuyser has joined the channel [04:41] deoxxa: to extend that, if there are three modules being installed, and if two require one version of a module, and one requires another version, how many copied of the dependency are installed? [04:41] deoxxa: *copies [04:46] ryan_stevens has joined the channel [04:47] bartt has joined the channel [04:48] rlidwka: deoxxa: i think there'll be 3 copies... [04:48] insanoid has joined the channel [04:48] arvidkahl has joined the channel [04:49] disappearedng has joined the channel [04:51] ioscale1 has joined the channel [04:51] regality has joined the channel [04:53] petschm has joined the channel [04:54] tommyvyo has joined the channel [04:56] disappea_ has joined the channel [04:57] yaymukund has joined the channel [04:59] monokrome: Is there a way to use require() to get the source code of a module? [04:59] monokrome: I know there are some weird require.x methods [05:00] perezd has joined the channel [05:01] monokrome: (Trying to avoid manually compiling coffeescript files if possible) [05:01] reed has joined the channel [05:01] Marak: monokrome: use fs module? [05:01] monokrome: Marak: That wont transcompile coffeescript to JS. I will just do it manually :) [05:02] Marak: monokrome: sounds like a wonderfully self-imposed problem [05:02] Marak: good luck with that :-D [05:02] monokrome: It's not [05:02] monokrome: I'm writing a build script. [05:03] chapel: monokrome: coffee has a watch option [05:03] monokrome: chapel: It sure does! [05:04] chapel: also, if you want to build it all for production, you should just use a build tool, and well the rest is taken care of [05:04] bearnard has joined the channel [05:05] sheenobu has joined the channel [05:06] payara_ has joined the channel [05:07] isaacs: deoxxa: rlidwka wins the prize! [05:08] payara has joined the channel [05:08] syntaxiko has joined the channel [05:09] SomeoneWeird: Anyone know why i'm getting Error: Unable to load shared library node_modules/geoip/build/Release/geoip.node [05:09] SomeoneWeird: ? [05:10] bearnmeister has joined the channel [05:10] kinow has joined the channel [05:10] Aria: Have you upgraded node without rebuilding it? [05:11] Aria: That's a dynamic library tied to the ABI of the node version that runs it. [05:12] SomeoneWeird: its a new vps i just setup [05:12] SomeoneWeird: running 6.13 [05:13] kPb_in has joined the channel [05:14] joaojeronimo has joined the channel [05:14] kPb_in has joined the channel [05:14] Aria: Does the file exist? [05:15] Aria: (And if you run 'file' on it, does it return something sane for your architecture?) [05:15] Aria: Wish I could stay and help debug, but I'm out for the night. [05:15] njain has joined the channel [05:15] SomeoneWeird: >.< [05:16] deoxxa: isaacs: i figured as such - was just curious [05:17] jacobolus has joined the channel [05:17] SomeoneWeird: # file node_modules/geoip/build/Release/geoip.node [05:17] SomeoneWeird: node_modules/geoip/build/Release/geoip.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped [05:19] michaelmartinez has joined the channel [05:20] Yanito has joined the channel [05:20] ljharb has joined the channel [05:20] arvidkahl has joined the channel [05:21] SomeoneWeird: anyone ? [05:21] Yanito: SomeoneWeird: yup, hi [05:21] SomeoneWeird: mm you just joined [05:22] SomeoneWeird: Anyone know why i'm getting Error: Unable to load shared library node_modules/geoip/build/Release/geoip.node [05:22] SomeoneWeird: fresh node build, just npm'ed it etc. [05:22] Yanito: did you install dependencies [05:22] Yanito: npm install -d [05:22] isaacs: Yanito: the -d is not needed. [05:24] SomeoneWeird: npm WARN skipping, cannot run in /root/a/node_modules/geoip geoip@0.4.5 node-waf clean || (exit 0); node-waf configure build [05:24] SomeoneWeird: shouldn't npm install geoip install the dependencies automatically? [05:25] isaacs: SomeoneWeird: yeah, it should, but it could be that it's trying to build something in some place it doens't have permission to [05:25] SomeoneWeird: mm well im root atm, so it shouldn't have an issue [05:25] Yanito: yup, i'm also thinking it could be due to a file permission issue [05:26] SomeoneWeird: mm [05:27] erujolc has joined the channel [05:27] mullr has joined the channel [05:27] Yanito: SomeoneWeird: you might still need to sudo: sudo npm install [05:28] reed has joined the channel [05:32] SomeoneWeird: tried that Yanito [05:33] langworthy has joined the channel [05:36] tedsuo: isaacs: are office hours still a thing? [05:36] isaacs: tedsuo: not really [05:36] tedsuo: :) [05:37] rurufufuss has joined the channel [05:40] ericmuyser has joined the channel [05:41] tedsuo: isaacs: github is not showing hainish's new comment for some reason, but I'd like to reopen this ticket: https://github.com/joyent/node/issues/2507#issuecomment-4608749 [05:42] coder1 has joined the channel [05:42] tedsuo: the code examples are still failing in 0.6.13 but with a different error [05:43] Geminizer has joined the channel [05:44] isaacs: tedsuo: what's the error you're seeing? [05:44] sreeix has joined the channel [05:44] tedsuo: events.js:48 [05:44] tedsuo: throw arguments[1]; // Unhandled 'error' event [05:44] tedsuo: ^ [05:44] tedsuo: Error: write EPIPE [05:44] tedsuo: at errnoException (net.js:646:11) [05:44] tedsuo: at Object.afterWrite [as oncomplete] (net.js:480:18) [05:44] confoocious has joined the channel [05:44] confoocious has joined the channel [05:48] ewalker has joined the channel [05:50] tedsuo: it makes me wonder if there is a daemonization step that we are missing that would avoid this problem [05:51] gavin_huang has joined the channel [05:52] socketio\test\65 has joined the channel [05:53] ryan_stevens has left the channel [05:53] enjalot has joined the channel [05:53] gr4yscale has joined the channel [05:53] perezd has joined the channel [05:53] SomeoneWeird: ugh i give up [05:53] SomeoneWeird: cant get this working :( [05:54] gr4yscale has joined the channel [05:56] wilmoore has joined the channel [05:56] simenbrekken has joined the channel [05:56] tornad has joined the channel [05:58] sammmy: Later noders! (for now) [06:01] mattgifford has joined the channel [06:01] Geminizer has joined the channel [06:02] bhunt has joined the channel [06:02] nateps has joined the channel [06:03] rurufufuss has joined the channel [06:03] fangel has joined the channel [06:04] dav has joined the channel [06:04] rlidwka has joined the channel [06:05] meso has joined the channel [06:06] dav has joined the channel [06:09] BillyBreen has joined the channel [06:12] Morkel has joined the channel [06:13] domo1 has joined the channel [06:14] domo1: i have a question about http.clientResponse and the event 'data' [06:14] dav: go on [06:14] domo1: it says it implements the Readable Stream which I'm trying to use with isaac's sax streamer [06:14] domo1: would I use pipe here to feed the data from http to the xml streamer? [06:16] simenbrekken has joined the channel [06:19] domo1: or maybe better said, how would I pipe an http respond? [06:19] domo1: response* [06:20] alejandr1mg has joined the channel [06:21] raj has joined the channel [06:23] McMAGIC--Copy has joined the channel [06:25] ParadoxQuine has joined the channel [06:27] orlandovftw has joined the channel [06:30] jkridner_ has joined the channel [06:33] yawNO has joined the channel [06:35] plato has joined the channel [06:35] plato has joined the channel [06:36] joaojeronimo: anybody knows where I can find a HUGE chunk of text just to benchmark some pipes ? [06:36] HacDan: joaojeronimo: lorem ipsum? [06:36] joaojeronimo: HacDan: will do :) [06:37] joaojeronimo: HacDan: but I wanted something with more entropy.... something from shakespeare perhaps lol.. there's some other stuff I'd like to test (text analytics) [06:37] bartt has joined the channel [06:37] HacDan: oh I see [06:38] disappearedng has joined the channel [06:39] joaojeronimo: something preferably with a couple of gigabytes [06:41] bartt1 has joined the channel [06:47] MerlinDMC has joined the channel [06:48] thetony: you doing some sentiment analysis or anything joao ? [06:50] M1l3n1um has joined the channel [06:50] pt_tr has joined the channel [06:50] hcchien has joined the channel [06:53] Shrink has joined the channel [06:54] janfabian has joined the channel [06:55] ParadoxQuine: joaojeronimo: how about some books from project gutenberg? war and peace, perhaps? [06:55] joaojeronimo: ParadoxQuine: WAR AND PEACE AWESOME IDEA but where can I find that in text ? [06:56] ParadoxQuine: http://www.gutenberg.org/ebooks/2600 [06:56] ParadoxQuine: public domain ^_^ [06:56] joaojeronimo: thetony: sentiment analysis would require me to maybe get content from twitter and that's a good idea but for now I want something quick maybe in a text file [06:56] joaojeronimo: thanks ParadoxQuine, didn't know :) [06:56] ParadoxQuine: ...dunno why that ended up with me as an emo girl [06:56] ParadoxQuine: yea, project gutenberg is great :) lots of transcriptions of public domain books [06:59] Es0teric: can someone tell me what this -> http://notey.it/n/NjE [07:00] Es0teric: means? [07:00] k1ttty_ has joined the channel [07:01] ljharb: what's app.js look like [07:02] jdeibele has joined the channel [07:02] dragansah has joined the channel [07:03] meso_ has joined the channel [07:04] Es0teric: ljharb http://notey.it/n/NjI [07:04] pvankouteren has joined the channel [07:04] lzskiss has joined the channel [07:05] ljharb: your line 17 is weird [07:05] Joeysomo has joined the channel [07:05] ljharb: i have app.use(app.router); and app.use(express.bodyParser()); and whatnot [07:05] Es0teric: ljharb well i am using everyauth [07:05] ljharb: yes but .router is on app, not connect [07:05] ljharb: and i'm not familiar with that shorthand [07:05] Es0teric: so should i just [07:05] ljharb: and on line 13 you created the server as app. why are you redefining it on line 17? [07:06] Es0teric: wait thats redefining it/ [07:06] Es0teric: ? [07:06] ljharb: var app = foo; var app = bar; ? yes, of course [07:06] ljharb: line 17-23 is all weird, and should be redone [07:06] Es0teric: ah [07:06] Es0teric: i fixed it [07:07] Es0teric: commented out line 17 [07:07] ljharb: each one should be app.use(express.bodyParser()) or whattnot [07:07] Es0teric: and added everyauth.middleware() to the config [07:07] rmttnmd has joined the channel [07:07] graeme_f has joined the channel [07:08] ljharb: oh i see youre doing the .uses already on 25-37. so yeah just kill line 17-23 [07:08] thetony: Es0teric: btw your secret is no longer safe [07:08] ljharb: hahaha [07:08] Es0teric: what? thetony [07:08] Es0teric: ? [07:08] ljharb: i'm not actually sure what the point of that secret is [07:08] Es0teric: thats not the actual secret... [07:08] Es0teric: -_- [07:09] ljharb: is it just a salt for the session key? [07:09] Es0teric: ok [07:09] Es0teric: so [07:09] Es0teric: problem [07:09] Es0teric: i go to local.host:3000/tweets/ [07:09] Es0teric: and nothing is happening [07:09] Es0teric: not even on the terminal [07:10] rmttnmd_ has joined the channel [07:11] crescendo has joined the channel [07:11] rmttnmd__ has joined the channel [07:11] ph^ has joined the channel [07:12] domo1 has left the channel [07:14] josh-k has joined the channel [07:16] josh-k has joined the channel [07:17] SamuraiJack has joined the channel [07:18] ljharb: local.host ? [07:18] ljharb: surely you mean localhost [07:18] Es0teric: no i redid the directory for my /etc/hosts [07:19] Es0teric: 127.0.0.1 goes to local.host [07:19] olivier has joined the channel [07:19] ank has joined the channel [07:19] Es0teric: so the twitter api could register it as a callbac [07:19] Es0teric: ljharb have you used everyauth though/ [07:19] Es0teric: ? [07:20] __doc__ has joined the channel [07:20] niloy has joined the channel [07:20] ljharb: you don't have to register anything real with the twitter api. you can set that in the twitter passport thing. [07:20] ljharb: and no, i haven't [07:20] Es0teric: you see [07:21] Es0teric: i would use passport [07:21] Es0teric: but i just dont understand how it works [07:21] Es0teric: like.. how would i get the username and password the user inputs? [07:21] ljharb: you never ever ever get their password. thats against twitter's tos and is stupid. [07:21] ljharb: and the username shows up in the passport-twitter's profile response [07:21] Es0teric: im not saying get it like.. save it [07:21] ljharb: you don't save it. [07:22] Es0teric: i am saying get it as in authenticate them [07:22] ljharb: you save a twitter oauth token. [07:22] Es0teric: thats what i meant [07:22] ljharb: but you don't need to save it. [07:22] Es0teric: i know that [07:22] ljharb: they sign in with twitter, and then you have their twitter ID and username, and that's enough [07:22] ljharb: you basically just trust that thats who they are [07:22] Es0teric: anyways [07:22] Es0teric: like i was saying [07:22] Es0teric: how do i direct them to the page i specify [07:23] Es0teric: that allows them to tweet [07:23] Es0teric: and see their timeline [07:23] Es0teric: AFTER they;ve been authenticated [07:23] ljharb: "sign in with twitter" is just the first step. you then have to "connect" to twitter to get the proper permissions to do those things. [07:23] ljharb: and that you don't use passport for [07:23] Es0teric: so then after using passport [07:23] ljharb: and, that, you'd have to save the oauth token for [07:24] ljharb: in a database or whatever [07:24] Es0teric: how do you connect [07:24] ljharb: check the twitter api docs, and google for it - i haven't built that myslf. [07:24] ljharb: *myself [07:24] neshaug has joined the channel [07:24] Es0teric: ljharb i saw twitter-node [07:25] noganex has joined the channel [07:25] boltR has joined the channel [07:25] tonymilne: hey all, would you consider spinning up multiple instances of a node app on different ports (and load balancing to them) more-or-less the equivalent to what cluster does anyways? [07:27] domo1 has joined the channel [07:28] tonymilne has left the channel [07:29] tvw has joined the channel [07:30] tvw has joined the channel [07:30] Country has joined the channel [07:31] domo1 has left the channel [07:31] karterk: tonymilne: yes.. I found cluster to have some issues in node 0.6.x as well [07:32] karterk: if you are fronting node by nginx already, then that's a good option. cluster, when it's stable would just make it easier to manage them [07:33] fangel has joined the channel [07:34] Nopik has joined the channel [07:37] Swaagie has joined the channel [07:39] ckknight has joined the channel [07:39] xippi has joined the channel [07:39] xippi has joined the channel [07:39] `3rdEden has joined the channel [07:39] groom has joined the channel [07:41] nsolsen has joined the channel [07:42] mattpardee has joined the channel [07:43] thirdknife has joined the channel [07:45] Swizec has joined the channel [07:45] hfaafb_ has joined the channel [07:45] owen1 has joined the channel [07:45] Swaagie has joined the channel [07:49] arcil has joined the channel [07:49] misza222 has joined the channel [07:51] rendar has joined the channel [07:51] sreeix_ has joined the channel [07:52] stagas has joined the channel [07:53] tornad has joined the channel [07:57] emattias has joined the channel [07:58] bearnard has joined the channel [07:58] xat-- has joined the channel [07:59] pid has joined the channel [08:00] hipsters_ has joined the channel [08:02] aliem has joined the channel [08:03] iangreenleaf has joined the channel [08:03] AD7six has joined the channel [08:03] admc has joined the channel [08:03] spolu has joined the channel [08:04] bearnard has joined the channel [08:06] joshgillies has joined the channel [08:06] sreeix has joined the channel [08:08] ablomen has joined the channel [08:08] dobber has joined the channel [08:08] Shrink has joined the channel [08:11] [[zz]] has joined the channel [08:11] djcoin has joined the channel [08:11] luismreis has joined the channel [08:11] jetienne has joined the channel [08:12] dobber has joined the channel [08:12] mikeal has joined the channel [08:13] trivol has joined the channel [08:13] robm_ has joined the channel [08:14] Vennril has joined the channel [08:14] robm__ has joined the channel [08:15] dragansah has joined the channel [08:15] staar2 has joined the channel [08:15] staar2: hello [08:16] dobber has joined the channel [08:17] markwubben has joined the channel [08:18] slaskis has joined the channel [08:18] aesptux has joined the channel [08:22] arturadi_ has joined the channel [08:23] mikeal has joined the channel [08:23] Yanito has left the channel [08:23] loob2 has joined the channel [08:25] [AD]Turbo has joined the channel [08:25] [AD]Turbo: hi there [08:25] stagas has joined the channel [08:29] blue-dragon has joined the channel [08:29] k1ttty has joined the channel [08:29] thetony: hi@u [08:30] DrPheltRight has joined the channel [08:30] ThatOtherPersonY has joined the channel [08:30] ThatOtherPersonY: Will anything bad happen if I'm naughty and install node.js from source on ubuntu? [08:31] huggies has joined the channel [08:31] mike has joined the channel [08:31] thetony: you will have new nodejs on ubuntu [08:31] thetony: i compiled mine in debian [08:31] ThatOtherPersonY: thetony: So it should be safe? [08:31] mcoolin has left the channel [08:32] thetony: ThatOtherPersonY: should be [08:32] sreeix has joined the channel [08:32] ThatOtherPersonY: Thanks! [08:33] mikedeboer has joined the channel [08:35] gr4yscale has joined the channel [08:36] erikzaadi has joined the channel [08:37] Vespakoen has joined the channel [08:38] arduix has joined the channel [08:40] whitman has joined the channel [08:44] jonaslund has joined the channel [08:47] a_meteorite has joined the channel [08:48] stevengill has joined the channel [08:48] yawNO has joined the channel [08:49] ctp6360 has joined the channel [08:50] kuebk has joined the channel [08:50] kuebk: hello [08:50] kuebk: is there a built in method to watch a directory for changes? [08:51] thetony: fs.watch [08:52] thetony: or fs.watchFile [08:53] cosmincx has joined the channel [08:53] dobber has joined the channel [08:55] sreeix_ has joined the channel [08:56] graeme_f has joined the channel [08:56] eliocapella has joined the channel [08:57] stevengill_ has joined the channel [08:57] slaskis has joined the channel [08:58] salva has joined the channel [08:59] \mSg has joined the channel [08:59] huggies has joined the channel [08:59] M1l3n1um has joined the channel [08:59] mehlah has joined the channel [09:00] Senior_Skunkape has joined the channel [09:01] ccare has joined the channel [09:01] flou has joined the channel [09:02] Paul__ has joined the channel [09:03] RLa has joined the channel [09:06] kuebk: thetony: fs.watchFile [09:07] kuebk: notifies me only if i create or detele file [09:07] staar2: is there any article about using express.js more modular way, splitting the route definitions into separate file and so on ? [09:07] kuebk: i'm not getting notified about changing the file [09:11] dobber has joined the channel [09:11] EvRide1 has joined the channel [09:11] Yuffster has joined the channel [09:11] yawNO: staar2: look at railwayjs and the way it handles it [09:11] vguerra has joined the channel [09:13] saschagehlich has joined the channel [09:13] sigurding has joined the channel [09:13] karterk: staar2: you might be interested in a express route helper module I wrote: https://github.com/kishorenc/road [09:13] pgte has joined the channel [09:14] sigurding: hey, anyone here got chunked uploads with formidable working? [09:14] staar2: karterk, looking [09:14] staar2: if i remember correctly there is some other alternative framework also called flatron ? [09:15] savudin has joined the channel [09:15] karterk: yeah flatron is by the nodejitsu guys [09:16] karterk: it all depends on what kind of framework you want [09:16] staar2: karterk, well ok i looked your work [09:16] DrPheltRight has joined the channel [09:16] staar2: but how would you pass the db instance all over the controllers ? [09:17] karterk: good question, I just append it to the request object [09:17] karterk: I write a middleware for express [09:17] karterk: which initaites a new DB connection (or takes it from a a DB pool) and then do: req.db = getDBConnection() [09:17] kPb_in has joined the channel [09:17] staar2: good idea [09:18] orkz has joined the channel [09:18] karterk: in fact, in my app I even do transactions [09:18] karterk: for non-GET requests, do a trasaction beign [09:18] karterk: and when the response returns, and if there is status code 200, do a COMMIT, else do a ROLLBACK [09:19] trivol has joined the channel [09:20] stevengill has joined the channel [09:20] RLa: karterk, what database it uses? [09:20] karterk: mysql [09:20] RLa: and which pool it uses? [09:21] karterk: I ditched the pool, because when I started out, the pools were not mature.. since it's a small app, I did not end-up using it [09:21] pors has joined the channel [09:21] pors has left the channel [09:21] yawNO has joined the channel [09:22] slaskis has joined the channel [09:22] robi42 has joined the channel [09:22] karterk: you can use node-poll though.. like this way: http://stackoverflow.com/questions/6731214/node-mysql-connection-pooling [09:22] karterk: *node-pool [09:23] RLa: you use a new connection for each request? [09:23] dobber_ has joined the channel [09:23] karterk: yes, as I said it's a small app, so I can get by that [09:24] Vainoharhainen has joined the channel [09:24] RLa: oh ok :) [09:24] RLa: anyway, what drivers you use? [09:24] RLa: node-mysql? [09:25] karterk: yup node-mysql rocks [09:25] Vespakoen has joined the channel [09:25] panosru has joined the channel [09:26] slaskis has joined the channel [09:27] argami has joined the channel [09:27] i42n has joined the channel [09:28] misza_ has joined the channel [09:29] lirla has joined the channel [09:31] stafamus has joined the channel [09:32] lperrin has joined the channel [09:34] boltR has joined the channel [09:36] dragansah has joined the channel [09:37] dragon: mysql kind of defeats the whole point. [09:37] herbySk has joined the channel [09:38] dragon: You're dealing with JSON data. Why write SQLs when you can just dump objects into mongodb and operate on them as desired? [09:38] mounibec has joined the channel [09:38] newbie_ has joined the channel [09:41] josh-k has joined the channel [09:42] joshgillies has joined the channel [09:44] RLa: dragon, good luck with querying that [09:45] RLa: http://howfuckedismydatabase.com/nosql/ [09:45] spolu has joined the channel [09:46] dragon: Haha, interesting. [09:47] karterk: dragon, I use mongodb extensively too. It just sucks at certain things. [09:47] karterk: I really like transaction support in certain cases. And Mongo is also a huge resource hog for small apps. [09:47] grefven has joined the channel [09:48] dragon: I agree. mongo has screwed my dev workstation in past. [09:48] jimmysparkle has joined the channel [09:49] dragon: But I'd be likely to pick mongo over MySQL. [09:50] alexrbarlow has joined the channel [09:50] karterk: the paradigm of dealing with json everywhere is pretty good [09:52] dobber has joined the channel [09:52] machine2 has joined the channel [09:53] argami_ has joined the channel [09:54] zackattack has joined the channel [09:54] dobber has joined the channel [09:56] fangel_ has joined the channel [09:56] yawNO has joined the channel [09:57] McMAGIC--Copy has joined the channel [09:57] dobber has joined the channel [09:58] MrJ has joined the channel [10:00] indutny has joined the channel [10:00] boogyman has joined the channel [10:02] shinuza has joined the channel [10:04] erujolc has joined the channel [10:05] erujolc: heroku says to emit logs to stdout nonbuffered, this can be a little troublesome as node buffers stdout by default, the workarounds present dont sound too great either as whilst blocking on an IO call node cant process any other request, what appraoches are people using here? [10:07] RLa: is that really a problem? [10:07] RLa: heroku can't receive log fast enough? [10:08] dragon has joined the channel [10:08] erujolc: I guess not... (thinking about it..) [10:08] markwubben has joined the channel [10:08] hgg has joined the channel [10:09] jetienne has joined the channel [10:09] erujolc: so with heroku just monkey patch console.log to use process.stdout.write(msg + '\n')? [10:09] rendar has joined the channel [10:13] confoocious has joined the channel [10:13] confoocious has joined the channel [10:13] RLa: i fail to see how that helps [10:14] eldios has joined the channel [10:15] Andy1991 has joined the channel [10:16] erujolc: e.g. console.log("Attempting to listen on port" + port);app.listen(process.env.PORT');console.log("Bound application to port " + 5000) with buffered stdout writes the console.log messages are lost [10:16] maritz has joined the channel [10:16] Andy1991: Why is my nodejs script stopping execution as soon as I get output? [10:16] erujolc: as they arent flushed before the unhandled exception [10:16] erujolc: console.log("Attempting to listen on port" + port);app.listen(port);console.log("Bound application to port " + prt) [10:17] erujolc: http://www.12factor.net/logs [10:17] Andy1991: http://pastebin.com/aquxH4BX can anyone take a look? I need to iterate over journey points at specified timeout intervals until there are none left, then request more and loop them [10:18] Andy1991: OMFG, what an idiot never mind lol [10:19] dragansah has joined the channel [10:19] maritz: well now i'm looking [10:20] booyaa: word [10:20] TheFuzzball_ has joined the channel [10:21] Sambasiva has joined the channel [10:21] hz has joined the channel [10:22] maritz: that was disappointing [10:27] tokumine has joined the channel [10:31] yaymukund has joined the channel [10:31] garrensmith has joined the channel [10:33] yawNO: ACTION yawns * [10:33] yawNO: maritz: how's your refactoring going? [10:33] alexmcpherson has joined the channel [10:34] arthurdebert has joined the channel [10:36] huggies has joined the channel [10:37] ThatOtherPersonY: Yikes, that was [10:37] ThatOtherPersonY: strange. [10:37] ThatOtherPersonY: I just wrote a little Node.js program that acts like Telnet in reverse [10:38] ThatOtherPersonY: A client can connect, and then you can respond to their data [10:38] ThatOtherPersonY: The server listens on port 6667 [10:39] ThatOtherPersonY: And I typed http://localhost:6667/ into Firefox [10:39] ThatOtherPersonY: What fun. [10:40] eldar has joined the channel [10:41] mikeal has joined the channel [10:44] hipertracker has joined the channel [10:44] maritz: yawNO: you saw the finished thing, not gonna break it down further, it's fine like that :) [10:45] disappearedng has joined the channel [10:46] rlidwka has joined the channel [10:46] hgg has joined the channel [10:47] disappearedng has joined the channel [10:47] stef has joined the channel [10:48] dannyamey has joined the channel [10:48] larsschenk has joined the channel [10:49] larsschenk has left the channel [10:49] yawNO: lol [10:49] yawNO: dont touch the working code [10:51] argami has joined the channel [10:51] Andy1991: How can I generate a random number between 0.01 and 0.2? [10:52] mounibec has joined the channel [10:52] _olouv_ has joined the channel [10:52] yawNO_ has joined the channel [10:53] rummik: Andy1991: Something like Math.floor(Math.random() * 20) / 100; [10:53] yawNO: Y U DIE INTERNET [10:53] Andy1991: cheers :) [10:53] dylang has joined the channel [10:53] rummik: Though, it probably has a lower limit at 0.00, you'd have to change it to 19 add one [10:54] TheFuzzball_ has joined the channel [10:55] Andy1991: (Math.floor(Math.random() * 19) +1) / 100; [10:55] Andy1991: like that?# [10:55] Andy1991: Works, thanks =D [10:56] rummik: Andy1991: Yup [10:56] Andy1991: Thanks [10:56] level09 has joined the channel [10:56] TheFuzzball_: Has anyone used an MSSQL driver in node? I'm trying to connect to an MSSQL 2005 server but keep getting connection refused. [10:56] rummik: np [10:57] TheFuzzball_: I've used node-tds and tedious the same error. What am [10:57] TheFuzzball_: I missing? [10:57] erujolc: have you enabled mixed authentication [10:57] erujolc: in addition have you open up tcp/ip on 3306 [10:58] erujolc: and have you set the server to listen to tcp/ip and not use sql server client helper etc.. [10:58] erujolc: e.g. specify Server=192.168.x.x,1433;Database= [10:59] TheFuzzball_: Why do I need to open 3306? It's connecting to 1433 by default. [11:00] TheFuzzball_: And no I don't think I have, I'll give that a shot. [11:00] arduix has joined the channel [11:01] TheFuzzball_: The authentication is "SQL Server and Windows Authentication" [11:01] erujolc: ah sorry yeah i meant 1433 [11:02] erujolc: have a look at SQL Server Binding too to ensure it is tcp/ip and not just named pipes [11:03] booyaa: what you working on TheFuzzball_? [11:03] booyaa: always interested to see msft stuff being done in node :) [11:03] TheFuzzball_: Just a test really :) [11:04] TheFuzzball_: If it were up to me it'd be mysql :P [11:04] booyaa: fair enough, i've only messed with iisnode so far (via appharbor). nothing exciting sadly nodejs is languishing on work pc... [11:04] TheFuzzball_: erujolc: Can I configure that in Server Management Studio Express? [11:05] erujolc: two mins, and i'll check on our win server [11:05] TheFuzzball_: Thanks :) [11:06] Andy1991: How do I clear my nodejs requires cache? [11:06] booyaa: Andy1991: without restart the script i assume? [11:06] maritz: Andy1991: you don't. [11:06] HardFu_ has joined the channel [11:07] Andy1991: Nah, even when I restart it says my function doesn't exist [11:07] deoxxa: that seems like a cop-out answer, maritz [11:07] maritz: deoxxa: it's true though, afaik?! [11:07] Andy1991: http://pastebin.com/4CAUYpBy [11:07] enmand has joined the channel [11:07] deoxxa: hm, i'm pretty sure you can invalidate the cache so you can hot-load modules [11:07] devongovett has joined the channel [11:07] maritz: Andy1991: after restarting the script there is no requires cache that could be the cause of that problem [11:07] deoxxa: i've heard it talked about, never had to do it before [11:08] Andy1991: require('./lib/latlng.js'); [11:08] Andy1991: http://pastebin.com/4CAUYpBy [11:08] Andy1991: { parse: [Function: parse], getBearing: [Function], restrictToBounds: [Function], convertBounds: [Function] } [11:08] maritz: deoxxa: it was possible but i think it's been removed. one sec :D [11:08] Batwin has joined the channel [11:09] deoxxa: Andy1991: what function are you trying to use? [11:09] deoxxa: also, that's a pretty horribly structured file [11:09] dekub has left the channel [11:09] deoxxa: i'm detecting a lot of copy&paste going on [11:10] Andy1991: Ahh damn, I must have had another file open with the same name, now I dont know where my updates are [11:10] deoxxa: :/ [11:10] Andy1991: And I haven't copied and pasted anyones code [11:10] maritz: nope, after re-reading the docs on this topic i'm still pretty sure that you can't. re-reading the require code now. [11:10] whaley has joined the channel [11:11] Andy1991: Sorted now, cheers guys [11:11] pickelsss has joined the channel [11:12] deoxxa: require.cache isn't it, maritz? [11:13] maritz: hm, that's interesting, i thought that was removed [11:13] maritz: guess i was wrong [11:13] deoxxa: i think it's more like "you shouldn't touch this, but you know, if you need to" [11:13] deoxxa: heh [11:15] maritz: there definitely was a lot of discussion about this and if it's still in there, and documented without any warnings, my guess is that it's fine to use that. [11:15] booyaa: TheFuzzball_: re: tcp/ip binding - yu need the sql server config manager rather than ssms-e http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/ [11:16] booyaa: ah bugger you'll still need ssms to enable remote connections (step 4) [11:16] ThatOtherPerson has left the channel [11:16] booyaa: TheFuzzball_: ^^ [11:16] TheFuzzball_: Sawheet! [11:17] ewalker has joined the channel [11:18] TheJH has joined the channel [11:19] ctp6360: it is a guess Andy1991, but Math.random()/5+0.01 might do it [11:19] ctp6360: oh shit [11:19] ctp6360: forgot to scroll down [11:21] rauchg has joined the channel [11:21] SomeoneWeird: lol [11:22] _tors has joined the channel [11:22] briancray has joined the channel [11:23] garrensmith has joined the channel [11:24] Andy1991: lol cheers [11:25] huggies has joined the channel [11:26] shapeshed has joined the channel [11:27] spolu has joined the channel [11:28] dragansah has joined the channel [11:30] satyr has joined the channel [11:30] hcchien has joined the channel [11:30] orkz has joined the channel [11:31] jacobolus has joined the channel [11:37] baudehlo has joined the channel [11:38] vdrab has joined the channel [11:39] francisl has joined the channel [11:42] garrensm_ has joined the channel [11:42] k1ttty has joined the channel [11:45] infynyxx has joined the channel [11:45] hzin_ has joined the channel [11:45] vdrab: What is the idiomatic way to process each line of text that comes in through a stream, e.g. stdin? Node currently doesn't seem to provide a way to read a stream line by line, correct? [11:46] RLa: you you need small layer to buffer incoming data and look for line ends inside it [11:46] vdrab: I know I can attach a callback to the 'data' event of process.stdin, but then I need to take care of incomplete lines and so on [11:47] fluk3 has joined the channel [11:48] maritz: vdrab: yes, that's what you need to do. [11:48] maritz: but it's not that hard really [11:48] vdrab: RLa: I tried implementing something like that myself, but it's incredibly slow so I was wondering if there is a better way. [11:48] luismreis has joined the channel [11:48] RLa: i think you need to use Buffer [11:49] maritz: vdrab: can you show your slow implementation? :) [11:49] vdrab: maritz, let's see [11:49] RLa: but yeah, it might happen that single line is over 100M characters :) [11:50] vdrab: http://pastebin.com/j1rBFYdm [11:51] MartinCleaver has joined the channel [11:51] vdrab: Rla: no, it will cut the last line at some arbitrary point, after reading N bytes [11:51] vdrab: so the version in the pastebin above is incorrect, it doesn't handle the incomplete last line. [11:52] maritz: vdrab: you do realize that the data event will be called quite a few times, whenever data is available and that it's rather arbitrary what parts are in data?! [11:52] vdrab: sure [11:52] vdrab: I assume some other process pipes text in through a unix pipe [11:52] maritz: with that in mind that implementation should only work on a very limited subset of test cases [11:53] ovaillancourt has joined the channel [11:53] ewalker has joined the channel [11:53] RLa: you should accumulated data received so far in a variable [11:54] RLa: so when line end comes in you can emit the whole line and clear the accumulator [11:54] vdrab: RLa: but I cannot keep all data in memory. That's the whole point of using a stream in this case [11:54] RLa: well, you must [11:54] vdrab: RLa: oh, ok [11:54] vdrab: sorry, I misread your comment [11:54] RLa: you cannot throw away random data between line ends [11:54] vdrab: yes, that's the obvious solution [11:54] shinuza has joined the channel [11:55] vdrab: I didn't implement it as I wondered whether there was some other way to do this, seeing that it's so basic. [11:55] sreeix has joined the channel [11:55] RLa: there are still some tricky things like separate cases for 0, 1 or n line ends in current chunk and different line end characters [11:56] deoxxa: carrier ftw [11:56] vdrab: yes. But I'm ok to ignore that for now [11:56] vdrab: carrier? [11:56] deoxxa: mmhm [11:56] deoxxa: https://github.com/pgte/carrier [11:57] deoxxa: i'm using it to parse a one-object-per-line json stream [11:57] deoxxa: (no, it's not twitter) [11:57] vdrab: can it handle streams from stdin? [11:57] RLa: looks good [11:57] deoxxa: can't think of a reason why not [11:58] vdrab: ok, thanks for the hint. I'll try this [11:58] kPb_in has joined the channel [11:58] RLa: https://github.com/pgte/carrier/blob/master/lib/carrier.js <- that's whole source! [11:58] deoxxa: heh yep [11:58] booyaa: pgte++ [11:58] YoY has joined the channel [11:58] vdrab: oh [11:58] deoxxa: agreed! [11:58] savudin has joined the channel [11:58] Progster has joined the channel [11:59] vdrab: nice [11:59] pgte: booyaa: hey :) [11:59] booyaa: word big bird, just give you props for carrier ;) [11:59] booyaa: although karmic bots appear to be missnig [11:59] booyaa: catb0t :~( [11:59] vdrab: as a related question, any guess why the program I wrote in the pastebin is so slow? [11:59] vdrab: it processes about 3~4 mb per sec [12:00] mullr has joined the channel [12:00] booyaa: gah man i hate project planning... [12:00] deoxxa: console.log() is a bit slower than process.stdout.write() [12:00] rlidwka: why? [12:00] deoxxa: it uses util.inspect() underneath, so it can print pretty objects and stuff [12:00] vdrab: the equivalent perl one-liner runs at 75mb/sec [12:01] fairwinds has joined the channel [12:02] hellp has joined the channel [12:02] fairwinds_ has joined the channel [12:05] hackband has joined the channel [12:07] vdrab: changing console.log to process.stdout.write doesn't seem to help [12:07] erichynds has joined the channel [12:08] dambalah has joined the channel [12:14] arduix has joined the channel [12:14] briancray has joined the channel [12:15] f1gm3nt has joined the channel [12:17] Vespakoen has left the channel [12:17] booyaa: vdrab: pgte did a node tuts about benchmarking code [12:17] booyaa: if you don't want to start dtracing [12:17] booyaa: might help you work out where it's lagging [12:18] vdrab: booyaa: thanks [12:18] ckknight: vdrab: a lot is happening that you probably don't realize. For example, the .toString() is converting the bitstring into a unicode text string, then it's splitting that by \n, forming 1 or more strings from that. There are other microoptimizations you can do, such as caching lines.length [12:18] baudehlo has joined the channel [12:19] pgte: vdrab: but perl is awesome at text, can't get much faster than that AFAIK [12:20] ckknight: vdrab: you could do setEncoding("ascii") or "utf8", that will make it convert to a string for you rather than dealing with a data chunk [12:20] ckknight: yeah, perl always deals with 8-bit strings, for unicode support, you need a library (if I'm not mistaken) [12:21] pgte: vdrab: yes, reading your pastebin, you have to be careful with multibyte characters [12:21] pgte: so you should set the encoding on the stream [12:21] ckknight: I'm curious, vdrab, what is the equivalent perl 1-liner? [12:21] pgte: so you don't need to call toString [12:22] vdrab: ckknight: yes, I realize there's a bunch of things going on, I was just wondering why one would have to do all that in js in the first place. the Perls, Rubys and Pythons of this world all have this functionality built-in natively, and are about a magnitude faster for this particular use case. I was hoping to get a nice speedup from using node/V8, but it seems shoveling the data into my program will kill any such goodness... [12:22] vdrab: ckknight: perl -wnle 'print' [12:22] mikeal has joined the channel [12:22] vdrab: ckknight: ruby -e 'print $_ while gets' [12:23] vdrab: sorry: ruby -e 'puts $_ while gets' [12:23] ckknight: the equivalent of that is process.stdin.resume(); process.stdin.pipe(process.stdout) [12:23] fluk3 has joined the channel [12:23] pgte: ckknight: right [12:23] ckknight: if you're just trying to emulate cat, as I think you are [12:23] vdrab: ckknight: That doesn't split the string into lines, no? [12:24] ckknight: it'll keep the lines as-is [12:24] ckknight: it depends on what your actual use-case is [12:24] simenbrekken has joined the channel [12:24] vdrab: ckknigth: this is just the IO part of a larger program that processes a large stream of data (think terabytes) [12:24] vdrab: obviously, if I just need cat I know where to find it. [12:25] dobber has joined the channel [12:25] vdrab: ckknight: I need to do some string mangling and computation for each line that comes in through stdin [12:25] ckknight: ah, okay [12:26] pgte: vdrab: you should implement a duplex stream [12:26] pgte: vdrab: something that you write to and emits "data" events also [12:26] vdrab: pgte: you have my full attention :) [12:26] pgte: and that you can pipe to and pipe from [12:27] pgte: like process.stdin.pipe(myStream).pipe(process.stdout) [12:27] pgte: myStream should be called myTransformation, actually [12:27] vdrab: which is a callback function that does the actual computation? [12:27] vdrab: I see [12:28] pgte: vdrab: yup [12:28] pgte: vdrab: you should check out https://github.com/mjijackson/bufferedstream#readme [12:28] vdrab: Let me see how fast this will go [12:28] vdrab: pgte: thanks, much appreciated [12:28] SomeoneWeird: .m [12:28] SomeoneWeird: woops [12:28] robi42 has joined the channel [12:29] erikzaadi has joined the channel [12:29] pgte: vdrab: what I sometimes do is change the "write" method of a buffered stream [12:29] pgte: vdrab: to actually do the transformation [12:29] vdrab: that sounds evil. I like it. [12:29] subbyyy has joined the channel [12:30] cosmincx has joined the channel [12:30] pgte: vdrab: and then call the old "write" method [12:30] pgte: vdrab: have no idea what the performance of that will be [12:30] vdrab: pgte: I'll have a look [12:30] pgte: vdrab: I usually do something like this: https://gist.github.com/2158053 [12:31] jmar777 has joined the channel [12:32] njain has joined the channel [12:32] pgte: vdrab: the main benefit of this approach is that you won't flood the destination stream if the source stream is too fast [12:32] rlidwka has joined the channel [12:32] vdrab: I see [12:33] dannyamey has joined the channel [12:35] arduix: i need help making a regex [12:35] flou has joined the channel [12:35] janfabian has joined the channel [12:35] arduix: azerty [[link]] aze [[link2]] ... [12:35] fluk3 has joined the channel [12:36] arduix: how to get the content between [[]] ? [12:36] vkareh has joined the channel [12:37] doganaydin has joined the channel [12:37] WarheadsSE: azerty \[\[(.*)\]\] [12:38] WarheadsSE: well, make that less greedy, but yeah.. [12:38] vdrab: arduix: /\[\[([^\]]+)\]\]/ [12:39] WarheadsSE: ^ [12:39] ckknight: /\[\[(.*?)\]\]/ is probably your best bet [12:39] deoxxa: ^^ this [12:39] WarheadsSE: it's at least easier to read :p [12:39] ckknight: nah, vdrab, that won't work right for this case: "[[ab]cd]]" [12:39] vdrab: ckknight: you're right [12:39] snearch has joined the channel [12:40] vdrab: pgte: just to confirm; is this how you use the example you sent earlier? var trans = require('transformation').Transformation; process.stdin.pipe(trans).pipe(process.stdout); [12:40] fluk3 has joined the channel [12:41] mattpardee has joined the channel [12:41] vdrab: probably not [12:41] arduix: http://pastebin.com/AeT6RNyT won't work :( [12:41] ckknight: vdrab: it would be var trans = new (require('transformation').Transformation)(function (x) { return "line: " + x; }) [12:41] ckknight: arduix: because you used quotes, unnecessarily. [12:42] doganaydin has left the channel [12:42] mattpardee has left the channel [12:42] pgte: vdrab: yup [12:42] ckknight: arduix: it's /\[\[(.*?)\]\]/, not "/\[\[(.*?)\]\]/" [12:42] vdrab: ckknight: thanks a lot. [12:42] fluk3 has joined the channel [12:43] ehazlett has joined the channel [12:43] mattgifford has joined the channel [12:43] fumanchu182 has joined the channel [12:43] fumanchu182 has joined the channel [12:43] arduix: http://pastebin.com/qBk07PRJ [12:43] arduix: and the yyy? [12:43] arduix: [[yyy]] [12:44] ckknight: arduix: stick a g on the end of the regex [12:44] ckknight: so that it searches globally [12:44] arduix: thanks ckknight !! [12:44] maritz: while you're at it, learn ALL THE MODIFIERS (meme gif goes here) [12:46] quinnirill: my node module segfaults :S [12:46] quinnirill: and I'm not sure exactly why... [12:46] karterk has joined the channel [12:46] quinnirill: v8 is weird [12:46] brianseeders has joined the channel [12:48] icrazyhack has joined the channel [12:48] arduix: how can i get the time like this ( 00:00) , when i use date.getHours + ':' + date.getMinutes i get (0:0) [12:49] vdrab: Am I doing this right? I'm getting "TypeError: undefined is not a function" [12:49] vdrab: http://pastebin.com/WEuveJzh [12:49] vdrab: (as you can tell, I'm not a js programmer) [12:50] garrensmith has joined the channel [12:50] indutny: vdrab: on what line? [12:50] vdrab: node.js:134 [12:50] vdrab: throw e; // process.nextTick error, or 'error' event on first tick [12:50] Mortchek: !g javascript pad number @ arduix [12:50] Mortchek: !g javascript pad number [12:51] sharkbird has joined the channel [12:51] vdrab: line 5 [12:51] indutny: quinnirill: I probably can help you if you'll show a code [12:51] Mortchek: I thought some bot in here Googled? [12:51] vdrab: sorry, line 3 in the pastescript [12:51] arduix: thnx Mortchek [12:51] indutny: vdrab: your source on pastebin contains 3 lines [12:52] indutny: ah [12:52] robi42 has joined the channel [12:52] vdrab: right. I removed whitespace before pasting. [12:52] sadjow has joined the channel [12:52] vdrab: so trans is undefined, basically [12:52] ziro` has joined the channel [12:53] indutny: vdrab: i think trans doesn't have'on' method [12:53] indutny: vdrab: is trans an eventemitter instance? [12:53] snoj has joined the channel [12:53] indutny has left the channel [12:53] indutny has joined the channel [12:53] vdrab: indutny: beats me :) pgte sent me this link: https://raw.github.com/gist/2158053/a0af26a00276f40cd13cc436d7dddab533303086/transformation.js [12:54] indutny has left the channel [12:54] vdrab: I installed bufferedstream with npm, btw [12:54] vdrab: maybe node can't find it? [12:54] whee has left the channel [12:54] vdrab: no relation to this problem? [12:54] indutny has joined the channel [12:55] AaronMT has joined the channel [12:55] vdrab: yeah, it find it ok [12:55] vdrab: "finds" [12:55] indutny: vdrab: finds what? [12:55] indutny: sorry, I've disconnected [12:55] vdrab: the bufferedstream module [12:55] indutny: missed our messages [12:55] indutny: s/our/your [12:56] quinnirill: indutny: https://github.com/jussi-kalliokoski/node-cubeb/blob/master/src/stream.cpp#L161-208 [12:56] quinnirill: indutny: and thanks in advance ^^ [12:56] quinnirill: I'm trying to make node bindings for an audio backend [12:56] quinnirill: it's almost finished, except for these weird segfaults [12:57] indutny: quinnirill: cool, gdb trace would be useful too [12:57] quinnirill: sure, hang on [12:57] deoxxa: quinnirill: [12:57] deoxxa: "url": "git@github.com:jussi-kalliokoski/node-cubeb" [12:57] deoxxa: you might want to change that to the git:// or https:// url [12:58] deoxxa: actually, let me take care of that [12:58] deoxxa: ACTION edits [12:58] jimmysparkle has joined the channel [12:58] davidsklar has joined the channel [12:58] dnolen has joined the channel [12:58] pgte: vdrab: transformation.js is your own local module [12:59] pgte: vdrab: it's not on npm [12:59] vdrab: pgte: yes [12:59] vdrab: I put the file in the same directory [12:59] indutny: pgte: you're on iRC! :) [13:00] pgte: hey indutny! :) [13:00] pgte: vdrab: first line is wrong [13:00] vdrab: ... and it doesn't seem to get loaded. I see [13:00] pgte: vdrab: the transformation.js module exports the class directly [13:00] pgte: vdrab: that would be: [13:00] pgte: vdrab: var Transformation = require('./transformation.js'); [13:00] jetienne has joined the channel [13:01] vdrab: aha [13:01] vdrab: thanks [13:01] quinnirill: indutny: here you go, for both the segfaults https://gist.github.com/2158223 [13:01] deoxxa: wee [13:01] quinnirill: the second one isn't very helpful [13:01] IrishGringo has joined the channel [13:01] deoxxa: second one looks a lot like a bad dereference [13:02] deoxxa: just at first glance [13:02] deoxxa: so maybe a pointer is getting clobbered somewhere? [13:02] quinnirill: hmm [13:02] slaskis_ has joined the channel [13:02] crutex has joined the channel [13:02] crutex has joined the channel [13:02] deoxxa: can you reproduce it? [13:03] DrPheltRight has joined the channel [13:03] IrishGringo has joined the channel [13:03] fluk3 has joined the channel [13:03] aaronmcadam has joined the channel [13:03] quinnirill: both the functions fail at that function call point, so maybe Context::GetCurrent() isn't working properly [13:04] indutny: quinnirill: second one is a JIT [13:04] indutny: quinnirill: are you sure you're calling that code in the same thread where node works? [13:04] indutny: quinnirill: I mean event-loop's thread [13:04] deoxxa: interesting [13:05] quinnirill: ohh [13:05] quinnirill: that might be it, the audio backend does weird threading stuff [13:05] quinnirill: so that callback might be in another thread [13:05] quinnirill: I wonder how I could fix it [13:05] indutny: quinnirill: it seems to be [13:05] indutny: quinnirill: use uv_async_init/uv_async_send [13:05] indutny: quinnirill: to invoke callback on event loop's thread [13:06] madtimber has joined the channel [13:06] quinnirill: owwwkay, sounds complicated, have any examples? [13:06] sadjow has left the channel [13:06] quinnirill: (I haven't used libuv before) [13:06] indutny: quinnirill: yes, one sec [13:07] joshgillies has joined the channel [13:08] indutny: quinnirill: https://github.com/indutny/node-bplus/blob/master/src/node_bplus.cc#L553 https://github.com/indutny/node-bplus/blob/master/src/node_bplus.cc#L267 [13:08] jimmyrcom has joined the channel [13:08] indutny: quinnirill: basically, you need to init an async handle in event loop's thread [13:08] indutny: quinnirill: and associate a C++ callback with it [13:09] indutny: quinnirill: calling uv_async_send will put a request to invoke that callback in event-loop's queue [13:09] quinnirill: ok, let's see... [13:10] jetienne has left the channel [13:11] vdrab: pgte: sorry to keep bothering you, but process.stdin doesn't seem to have a 'pipe' member. [13:11] quinnirill: oh wow [13:12] quinnirill: does it block the thread it's called from until the request is filled? [13:12] dberlinger has joined the channel [13:13] quinnirill: it would be really useful for me to get to make the callbacks return the values the JS functions they're invoking return [13:14] dberlinger has left the channel [13:14] dberlinger has joined the channel [13:14] slaskis has joined the channel [13:14] quinnirill: indutny, deoxxa: oh, and thanks for the help, much appreciated! [13:15] fluk3 has joined the channel [13:15] deoxxa: \o/ [13:15] retornam has joined the channel [13:16] lmorchard has joined the channel [13:17] slaskis_ has joined the channel [13:19] hydrozen has joined the channel [13:19] fermion has joined the channel [13:20] indutny: quinnirill: it doesn't block [13:21] jetienne has joined the channel [13:21] piscisaureus_ has joined the channel [13:21] indutny: quinnirill: you're welcome [13:22] emattias_ has joined the channel [13:23] ehazlett has joined the channel [13:24] quinnirill: indutny: oh that's a bugger, hmm [13:24] indutny: quinnirill: sorry, what? [13:24] lduros has joined the channel [13:24] quinnirill: indutny: that it doesn't block [13:25] sechrist has joined the channel [13:25] quinnirill: I need to return stuff like how much I've written and if it's ok that the state changed [13:25] quinnirill: but oh well [13:26] samstefan has joined the channel [13:26] chvid has joined the channel [13:30] bbttxu has joined the channel [13:31] pgte: vdrab: it has [13:31] pgte: > process.stdin.pipe [13:31] pgte: [Function] [13:32] pgte: you will have to resume() it, but it should have the .pipe function anyway [13:32] bkaney has joined the channel [13:33] lz has joined the channel [13:34] jmar777 has joined the channel [13:34] rwaldron has joined the channel [13:34] tomasztomczyk has joined the channel [13:35] Poetro has joined the channel [13:36] arduix: how to check if a variable is defined? [13:36] ewalker has joined the channel [13:37] jtsnow has joined the channel [13:37] indutny: arduix: console.log(variable) or if (variable === undefined) throw Error('variable is undefined') [13:37] Zharktas: var foo = "bar"; if (!foo) [13:37] indutny: arduix: depends on what you want to do [13:38] Zharktas: actually the other way around, if (foo){..} [13:38] Zharktas: or i'm too tired after work [13:38] reed has joined the channel [13:38] indutny: arduix: if (typeof variable !== 'undefined') {...} [13:39] indutny: arduix: it won't throw error if variable wasn't declared [13:39] uchuff has joined the channel [13:39] RLa has joined the channel [13:41] thomblake has joined the channel [13:41] thomblake has left the channel [13:43] CromeDome has joined the channel [13:43] bnoordhuis has joined the channel [13:43] pandeiro has joined the channel [13:44] quinnirill: I usually do typeof variable === 'undefined', that way it doesn't throw a reference error [13:44] quinnirill: oh yeah, indutny said it already, meh [13:44] sorensen has joined the channel [13:45] robo has joined the channel [13:46] bodisiw has joined the channel [13:49] pgte: @SubStack : thinking about what would take for node-trumpet callbacks to make asynchronous modifications so I can embed a trumpet inside another [13:49] MartinCleaver has joined the channel [13:50] pgte: @SubStack: that would mean I would have to pause the parser, i.e., pause the incoming stream. [13:51] pgte: @SubStack: looking at the source code of node-trumpet. Any clues on how I could do that? [13:51] kPb_in has joined the channel [13:52] HacDan has joined the channel [13:53] garrensmith has joined the channel [13:53] pgte: SubStack: looking at https://github.com/substack/node-trumpet/blob/master/lib/select.js#L32 [13:53] zackattack has joined the channel [13:53] at4m has joined the channel [13:54] Wizek has joined the channel [13:54] joshsmith has joined the channel [13:54] k1ttty has joined the channel [13:54] zemanel has joined the channel [13:57] ccare has joined the channel [13:58] qjcg has joined the channel [13:58] c4milo has joined the channel [13:58] emattias has joined the channel [13:59] webguynow has joined the channel [14:00] JSONB has joined the channel [14:01] emattias has joined the channel [14:01] sonny has joined the channel [14:02] sonny: hi is win version still so bugged? [14:03] garrensmith has joined the channel [14:03] savudin has joined the channel [14:04] mandric has joined the channel [14:05] savudin: wich node framework to choose? shit. I browsed shortly lots of them and liked Gaddy most [14:05] savudin: what's your's oppinion? [14:06] dscape: savudin: you mean geddy? [14:07] dscape: savudin: was it ever bugged? [14:07] dscape: argh [14:07] dscape: sonny: was it ever bugged? [14:07] savudin: dscape geddy yes, sorry [14:08] dscape: savudin: geddy is done by mde, so it looks like a nice place to start :) [14:08] sonny: dscape: someone said like year ago that mysql plugin doesn't work or something [14:08] pendlepa1ts has joined the channel [14:08] dscape: sonny: that has nothing to do with nodejs [14:08] dscape: the mysql plugin is maintained by an individual, and runs on node [14:08] jscheel has joined the channel [14:08] jscheel has joined the channel [14:09] dscape: nodejs does not include database drivers in the core [14:09] sonny: dscape: normal version wasn't working too [14:09] savudin: dscape who's mde? [14:10] dscape: savudin: http://thenodefirm.com/about/Matthew+Eernisse [14:10] sonny: dscape: idk what was then. Anyway so i can now normaly start with node.js? [14:10] Brandon_R has joined the channel [14:10] Brandon_R: hey guys [14:10] stafamus has joined the channel [14:10] dscape: sonny: there's nodejs, like this # [14:10] dscape: it includes very few core javascript libraries [14:10] dscape: and those are defined in the docs [14:11] dscape: and work well in windows, and have always had (expect bugs, like any other software_ [14:11] dscape: mysql is a module maintained by an individual, and published in npm [14:11] brainss has joined the channel [14:11] dscape: it has nothing to do with nodejs running well on windows :) [14:11] sonny: ok ok [14:11] dscape: but please do tell the aintainer of mysql [14:11] Brandon_R: http://www.youtube.com/watch?v=mHtdZgou0qU&feature=relmfu [14:11] dscape: about the problem [14:11] dscape: im sure he would fix it [14:11] dscape: :) [14:11] sonny: i'll try my best trying to configure that [14:12] Brandon_R: 3 years later, is that video still relevant? [14:12] Brandon_R: http://www.youtube.com/watch?v=mHtdZgou0qU&feature=relmfu [14:12] dscape: sonny: start by learning some nodejs : http://docs.nodejitsu.com & nodetuts.com [14:12] savudin: dscape which one are you working with, if anny? i mean framework [14:13] dscape: savudin: I work for nodejitsu and we create and maintain flatironjs [14:13] garrensmith has joined the channel [14:13] dscape: http://flatironjs.org/ [14:13] SamuraiJack has joined the channel [14:13] dscape: thats what I use [14:13] madhums has joined the channel [14:13] dscape: I've used express too [14:14] savudin: dscape yeah I've checked that one too, Iit's "mvc oriented" as well [14:14] Brandon_R: flatiron looks cool [14:14] Brandon_R: how does node.js have these large useful libs in such a short period of time :P [14:14] vipaca has joined the channel [14:15] savudin: although I think that mvc is one big shit :) [14:15] savudin: of a paradigm I mean :) [14:15] jdeibele has joined the channel [14:15] dscape: savudin: so do we -> http://blog.nodejitsu.com/scaling-isomorphic-javascript-code [14:15] kevwil has joined the channel [14:15] dscape: :) [14:15] vam3c has joined the channel [14:15] samuelgoodwin has joined the channel [14:16] Brandon_R: backbone.js doesn't look seo friendly [14:16] carlyle has joined the channel [14:16] mraxilus has joined the channel [14:17] stalled has joined the channel [14:17] savudin: dscape I'm just looking into javascript and node, I like it and would like to build my own project with it [14:18] dragansah has joined the channel [14:18] savudin: I'm complete novice in this, coming from one separate universe, ios development :) [14:18] dmilith has joined the channel [14:18] postwait has joined the channel [14:19] dscape: savudin: npm install jitsu -g; jitsu signup [14:19] dscape: then gimmesomebeta.jit.su :) [14:20] d0ax has joined the channel [14:20] dscape: enjoy ;) [14:20] savudin: dscape allready done that :) [14:20] dscape: :) [14:20] telephaz has joined the channel [14:20] garrensmith has joined the channel [14:21] karterk has joined the channel [14:21] thetony: dscape: that's pretty interesting.. the etl tools i'm building are designed to work in both the browser and node [14:22] dragansah has joined the channel [14:23] bingomanatee has joined the channel [14:23] baudehlo has joined the channel [14:24] criswell has joined the channel [14:25] dscape: thetony: github.com/pgte/banzai ;) [14:26] nichola__ has joined the channel [14:26] jMCg has joined the channel [14:26] jMCg has joined the channel [14:27] Swizec has joined the channel [14:28] Brandon_R: http://www.youtube.com/watch?v=mHtdZgou0qU&feature=relmfu [14:28] Brandon_R: 3 years later, is that video still relevant? [14:29] johnstorey has joined the channel [14:29] sonny: dscape: u still on? [14:29] useqq has joined the channel [14:30] yawNO has joined the channel [14:30] monokrome: Brandon_R: Yes. Why wouldn't it be? [14:30] Brandon_R: he said chrome 2 [14:31] monokrome: At which part? [14:31] monokrome: (And why does that matter?) [14:32] laner has joined the channel [14:32] rtgibbons has joined the channel [14:32] Andy1991: http://pastebin.com/fs0Muva6 [14:32] Andy1991: Can anyone take a look at that please? [14:33] monokrome: Brandon_R: In some JavaScript engines, they do things like JITing your code - but you can't guarantee those things for everybody - and even if so, why not optimize your slow code? [14:33] donderom_ has joined the channel [14:33] Andy1991: Basically I'm trying to create a private member (client) which can be accessible from both the returned object and the private function [14:33] Brandon_R: slow*er vs more readable debate [14:34] monokrome: Generally optimizing your code in JavaScript isn't going to hurt readability… Also, JavaScript isn't very readable anyway. [14:34] garrensmith has joined the channel [14:34] markwubben has joined the channel [14:35] monokrome: Unoptimized JavaScript might actually be less readable, even. [14:37] rubymaverick has joined the channel [14:37] emattias has joined the channel [14:37] aaronmcadam has joined the channel [14:38] willwhite has joined the channel [14:39] jocafa has joined the channel [14:39] pickelsss has joined the channel [14:40] thetony: dscape: need to read about that - these are explicitly for data warehousing, wonder if i can use that still : - ) [14:44] jryans has joined the channel [14:44] warz has joined the channel [14:44] warz has joined the channel [14:44] dylang has joined the channel [14:45] dylang has joined the channel [14:45] ioscale has joined the channel [14:47] whaley has joined the channel [14:48] fly-away has joined the channel [14:48] MartinCleaver has joined the channel [14:48] thetony: monokrome: javascript is plenty readable [14:51] sreeix_ has joined the channel [14:51] level09 has joined the channel [14:51] Venom_X has joined the channel [14:51] TomRone has joined the channel [14:52] hackband has joined the channel [14:52] CIA-19: node: 03Ben Noordhuis 07v0.6 * rea44d30 10/ src/node_crypto.cc : crypto: fix compile-time error with openssl <= 0.9.7e - http://git.io/ZeUzuw [14:53] WarheadsSE has left the channel [14:53] infynyxx has joined the channel [14:54] Wizek has joined the channel [14:54] sigurding has joined the channel [14:55] thejefflarson has joined the channel [14:59] laner has joined the channel [14:59] Andy1991: Whats the correct way to use MySQL in node? [14:59] kevin_ has joined the channel [15:00] Brandon_R: by not using it [15:00] innociv__: there are packages for that [15:00] Andy1991: Do I establish a connection, select database in the callback, query in that callback? [15:00] Vespakoen_ has joined the channel [15:00] Andy1991: I know, I'm using the mysql one (npm install mysql) [15:00] mattgifford has joined the channel [15:00] kevin_jax: Hello, i have a question - new to node... I am looking at connect logger( with express), but it seems like it logs every request - is this a good idea? [15:01] kevin_jax: to log every request [15:01] Brandon_R: andy1991, don't go it that way [15:02] Andy1991: http://pastebin.com/ZTsUfVL9 <-- thats attempt one but I've done something wrong [15:02] Brandon_R: andy1991, establish the connection in a global variable and do a query per request [15:02] Andy1991: How am I supposed to do it? [15:02] kevwil has joined the channel [15:02] argami has joined the channel [15:03] Andy1991: So it blocks and waits for a connection to be established? [15:03] Brandon_R: no [15:03] Andy1991: My queries are queued? [15:03] Andy1991: So how can I be guaranteed that a connection is available and a database selected? [15:03] forste has joined the channel [15:04] forste: hi, does anybody have experience with node.js + elasticsearch? my problem: http://stackoverflow.com/questions/9824613/indexing-documents-to-elasticsearch-using-nodejs [15:04] Brandon_R: onerror [15:05] Andy1991: onerror retry? [15:05] larsschenk1 has joined the channel [15:06] yawNO has joined the channel [15:06] Brandon_R: yeah [15:06] TomRone has joined the channel [15:06] booyaa: forste: have you seen richardmarr's work? [15:06] Brandon_R: it should throw an error if anything chanegs like timeout etc [15:06] booyaa: mind you he uses elastic search to fulltext index couchdb [15:06] Andy1991: Ok cheers [15:07] argami has joined the channel [15:07] booyaa: i think it's a resourceful subproject [15:07] Brandon_R: which is better, es or sphinx [15:07] booyaa: ACTION shrugs [15:08] booyaa: forste: http://vimeo.com/36072680 [15:08] Es0teric has joined the channel [15:08] booyaa: top guy is rich, done some interesting things with elasticsearch and nodejs [15:08] Brandon_R: who is rich? [15:09] argami has joined the channel [15:10] baudehlo: forste: in the curl example you're sending JSON, in the Node example you're sending key/value pairs. I suggest try using mikeal's request() library and sending JSON instead. [15:10] Destos has joined the channel [15:11] Es0teric: who here has used everyauth? [15:11] kevin_jax: Hello, i have a question - new to node... I am looking at connect logger( with express), but it seems like it logs every request - is this a good idea? [15:11] M1l3n1um has joined the channel [15:11] wendall911 has joined the channel [15:12] kevin_jax: how to make connect logger only log on certain situations [15:12] Rustamspl has joined the channel [15:12] zackattack has joined the channel [15:12] meso has joined the channel [15:12] baudehlo: kevin_jax: why? [15:12] argami has joined the channel [15:12] baudehlo: the more logging the better [15:13] jocafa has joined the channel [15:13] kevin_jax: more logging is noise [15:13] kevin_jax: because i want to only log when auth fails, or user receives 404, 500 [15:13] sechrist has joined the channel [15:13] kevin_jax: why do i need to log every get/ post [15:13] baudehlo: because you're wrong :) [15:13] baudehlo: http://baudehlo.wordpress.com/2011/11/11/its-all-about-the-logging/ [15:14] baudehlo: if you only want to *see* auth fails, that's why god invented grep. [15:14] jj0hns0n has joined the channel [15:14] sreeix_ has joined the channel [15:15] jaha has joined the channel [15:15] ericmuyser has joined the channel [15:15] kevin_jax: ok.. [15:15] Rustamspl: hi all. have somebody used/compiled node canvas with node 0.6.x ? is it possible to make node-canvas without node-waf? [15:16] adambeynon has joined the channel [15:16] nibblebot has joined the channel [15:16] jxie has joined the channel [15:17] rook2pawn: kevin_jax: you can easily just log when that happens? also dont forget next(new Error("foo")) and app.error method [15:17] Es0teric: rook2pawn, have you used everyauth? [15:18] rook2pawn: no sorry i havent [15:18] Es0teric: the documentation on it is very confusing [15:18] perezd has joined the channel [15:18] louissmit has joined the channel [15:18] hipertracker has joined the channel [15:19] rachet: does anyone know of a module or snippet of something, that would let me convert something async to sync? [15:19] BillyBreen has joined the channel [15:20] rachet: only reason I'd want it is to make things easier for someone who wants it [15:21] nsolsen has joined the channel [15:21] rmttnmd has joined the channel [15:22] Rustamspl: or which graphic lib can i use with nodejs 0.6.x ? (e.g. to make captcha) [15:22] bartt has joined the channel [15:22] argami has joined the channel [15:22] rmttnmd_ has joined the channel [15:23] bburhans has joined the channel [15:25] baudehlo: Rustamspl: why not just use recaptcha? [15:25] rmttnmd__ has joined the channel [15:26] dwhittle has joined the channel [15:26] argami has joined the channel [15:27] forste: booyaa, baudehlo: thanks, having some computer problems. will tryout both hints later [15:27] forste has left the channel [15:28] Rustamspl: baudehlo, yes, for captcha i can use recaptcha. but what about the other - thumbnails, graphs? [15:29] Poetro has joined the channel [15:30] enmand has joined the channel [15:30] fatjonny has joined the channel [15:30] eldar has left the channel [15:30] bartt1 has joined the channel [15:31] jakehow has joined the channel [15:31] baudehlo: yeah I don't know about that. [15:31] pizthewiz has joined the channel [15:32] baudehlo: but no, you can't install node-canvas without node-waf [15:32] joshfinnie has joined the channel [15:32] baudehlo: from its package.json: scripts: { preinstall: 'node-waf configure build' }, [15:32] nodebiscut has joined the channel [15:33] jetienne has joined the channel [15:34] rtgibbon_ has joined the channel [15:36] halfhalo has joined the channel [15:36] jocafa has joined the channel [15:37] sreeix has joined the channel [15:38] lperrin has joined the channel [15:38] jtsnow has joined the channel [15:39] Zzaichik has joined the channel [15:39] bartt1 has joined the channel [15:40] Samuel__ has joined the channel [15:40] zatan has joined the channel [15:40] spion has joined the channel [15:41] redir has joined the channel [15:41] bodisiw has joined the channel [15:42] slickplaid: I've got a question about child_process... I can't seem to get it to respond with anything using this code: https://gist.github.com/2159094 [15:42] BillyBreen has joined the channel [15:43] Phoenixz has joined the channel [15:44] slickplaid: stderr is the status of the app, usually echoed to the prompt and stdout is the output of wkhtmltopdf [15:44] slickplaid: can't get anything from either end [15:44] bugQ has joined the channel [15:45] karterk has joined the channel [15:45] Vespakoen_ has left the channel [15:45] bugQ: so module.parent supposedly tells me if a file was require'd, but it's false when fork'd also [15:45] bugQ: is there a way to distinguish the two? [15:48] EhevuTov has joined the channel [15:48] ryanrolds has joined the channel [15:48] alvaro_o has joined the channel [15:49] TheAlphaNerd has joined the channel [15:51] TomRone has joined the channel [15:51] TomRone has joined the channel [15:51] TomRone has joined the channel [15:51] kevin_jax: Hey guys, i am trying to setup a HTTPS server - i pass the certs in CreateServer and its all set -- but my question is when a client uses Http://mysite.com it does not work - what can i do [15:52] TheAlphaNerd: anyone around who has experience with node osc? [15:52] argami has joined the channel [15:52] arduix has joined the channel [15:52] seebees has joined the channel [15:53] reed_ has joined the channel [15:53] bnoordhuis: kevin_jax: open a connection with `openssl s_client -connect mysite.com:443` and check the output [15:54] broofa has joined the channel [15:54] kevin_jax: https works fine , when a user just types in http://mysite.com -- what do i do? [15:54] kevin_jax: redirect to https? [15:54] ramitos has joined the channel [15:55] regality has joined the channel [15:55] mounibec has joined the channel [15:55] KingInky has joined the channel [15:55] KingInky: hey i have an object i want to be able to see the properties of. i tried console.log and sys(util).puts, both print out [object Object] [15:55] KingInky: do you guys have any ideas? [15:55] alexrbarlow has joined the channel [15:56] KingInky: util.inspect -- found it. nevermind. [15:56] dylang has joined the channel [15:56] wink_: anyone familiar with the zmq binding? im using the pubsub pattern and curious if there is a way to detect a pub socket disappearing out from under a sub [15:57] tylerstalder has joined the channel [15:58] Destos has joined the channel [15:58] ioscale: hi! is anyone using a class-system for nodejs? like joose or class-js? [15:59] enmand_ has joined the channel [16:00] slickplaid: kevin_jax, you have to set up the server to listen on that port and redirect them or take care of the connection on port 80 (http) and redirect or do something with it to get them to port 443 (https) [16:00] shedinja has joined the channel [16:01] cinaglia has joined the channel [16:01] pendlepa2ts has joined the channel [16:01] sorensen__ has joined the channel [16:02] slickplaid: I've got a question about child_process... I can't seem to get it to respond with anything using this code: https://gist.github.com/2159094 [16:03] blueadept has joined the channel [16:03] slickplaid: Should I be using spawn() vs exec() ? [16:03] bugQ: yes. exec kills the current process, effectively replacing it with the command you give it [16:04] slickplaid: hah [16:04] slickplaid: that's probably why then :D [16:05] Guest76561 has joined the channel [16:05] geetarista has joined the channel [16:05] Guest76561: hello huys [16:05] Guest76561: guys* [16:05] enjalot has joined the channel [16:05] Guest76561: i'm playing a little with redis [16:06] joshthecoder has joined the channel [16:06] Guest76561: anyone here can give me a hint? [16:06] bugQ: well, that's slightly inaccurate since it keeps a listener running for the callback, but it won't run any code after the exec() [16:06] bugQ: ask the question, don't ask to ask a question :P [16:07] Guest76561: sec posting a gist [16:07] d0ax has joined the channel [16:07] Morkel has joined the channel [16:07] amigojapan has joined the channel [16:08] flou has joined the channel [16:08] Guest76561: https://gist.github.com/2159237 [16:08] isaacs has joined the channel [16:08] Guest76561: suppose something like this [16:09] Guest76561: can i be sure that elements in the array are in the order of the cicle? [16:09] K1ngInky has joined the channel [16:09] caolanm has joined the channel [16:10] lazyshot has joined the channel [16:10] bkaney has joined the channel [16:11] slickplaid: Guest41659, I think you have to use sorted sets in redis to guarantee order. [16:11] fangel has joined the channel [16:11] slickplaid: but i could be wrong, been a while since i messed with that [16:12] tomasztomczyk has joined the channel [16:13] HacDan has joined the channel [16:13] argami has joined the channel [16:14] TheAlphaNerd: So I'm playing around with some udp stuff with node.js and it appears that dgram might be broken… has anyone noticed that? [16:15] micheil has joined the channel [16:15] giorgino has joined the channel [16:15] bnoordhuis: TheAlphaNerd: define 'broken'? [16:16] TheAlphaNerd: the example on http://nodejs.org/docs/v0.3.1/api/dgram.html [16:16] TheAlphaNerd: of dgram.send(buf, offset, length, port, address, [callback]) [16:16] TheAlphaNerd: is not working [16:16] TheAlphaNerd: running wireshark on local network when executing that code [16:16] TheAlphaNerd: nothing being sent [16:16] bnoordhuis: TheAlphaNerd: you're looking at the 0.3.1 docs [16:17] TheAlphaNerd: it would appear I am [16:17] TheAlphaNerd: harumph [16:17] TheAlphaNerd: :P [16:17] kurtzhong has joined the channel [16:17] bnoordhuis: :) [16:17] ericmuyser has joined the channel [16:18] halfhalo has joined the channel [16:18] Poetro_ has joined the channel [16:18] K1ngInky: quick question: anybody know a way to force my node.js app to exit? after it's done executing, it simply continues running even though it shouldn't. [16:19] trotter has joined the channel [16:19] bugQ: slickplaid: sorry I'm mistaking node's exec for bash's exec. your code should work [16:19] maletor has joined the channel [16:19] TheAlphaNerd: that's what I'm thinking [16:19] TheAlphaNerd: but its not sending anything [16:19] bugQ: slickplaid: in fact it works with cat according to my tests [16:19] rook2pawn: in bar.WEB (req,res,next) { res.render('dash.ejs', { layout : false, dog : ['a','b','c'] }); }); [16:19] TheAlphaNerd: I have both oscdump from liblo-tools and wireshark running [16:20] TheAlphaNerd: and dgram is sending nothing [16:20] rook2pawn: sorry wrong chan [16:20] bugQ: slickplaid: I would suspect either your html output or the converter. [16:20] argami has joined the channel [16:20] rtgibbons has joined the channel [16:20] Guest76561: K1ngInky from what i know the app will exit when there is nothing more to do [16:21] tloh has joined the channel [16:21] bugQ: if it has a listener for any event it will stay running [16:21] tloh: stream file from gridfs to client, anyone? [16:22] bugQ: K1ngInky: process.exit() [16:24] i42n has joined the channel [16:24] orlandovftw has joined the channel [16:24] wumpus_ has joined the channel [16:24] johnstorey has joined the channel [16:25] dberlinger has joined the channel [16:25] K1ngInky: bugq: thx [16:26] bandu has joined the channel [16:27] EhevuTov_ has joined the channel [16:27] jaha: Anthony Bourdain, Marky Ramone and friends DJing in Turntable.fm now, music is sick! [16:28] brianleroux has joined the channel [16:29] mansoor has joined the channel [16:29] slaskis has joined the channel [16:29] shapeshed has joined the channel [16:31] briancray has joined the channel [16:31] kriskowal has joined the channel [16:31] jj0hns0n has joined the channel [16:31] khrome has joined the channel [16:31] kurtzhong has joined the channel [16:32] mikeal has joined the channel [16:33] infynyxx has joined the channel [16:33] hex` has joined the channel [16:34] hex`: TypeError: Cannot read property 'user' of null [16:34] gr-eg has joined the channel [16:34] hex`: I'm getting TypeError (as above) in this line: db.tweets.find({}).limit(1).forEach(function(err, doc) { [16:35] snearch has joined the channel [16:35] hex`: isn't forEach supposed to iterate over the results? (in this case, only 1)? [16:35] hex`: I'll show some code. [16:35] shinuza has joined the channel [16:35] Poetro: hex`: only if that is an array [16:36] Poetro: hex`: but maybe u should execute the query beforehand [16:36] bugQ: that error has nothing to do with forEach [16:36] hex`: code: http://pastie.org/3648822 [16:37] dshaw_ has joined the channel [16:37] dukeytoo has joined the channel [16:37] Poetro: hex`: in that case there is no user property of doc [16:37] Poetro: hex`: u should have gotten a null result [16:37] phoochka has joined the channel [16:38] slloyd has joined the channel [16:38] hex`: there is user property of doc, because before the error I console.log(doc.user) properly [16:38] slickplaid: does the core ejs module have any way of doing what res.render('filename') does? I basically don't want to have to fs.readFile() to grab the layout, html, etc... is there any way to just output the html that res.render() sends instead of sending it so I can use it internally? [16:38] slickplaid: or does express have a function exposed for it? [16:38] nsolsen has joined the channel [16:38] Poetro: hex`: just try to log the doc first [16:38] Poetro: then complain [16:38] hex`: the first result is logged correctly in the console... it shows the doc.user properly, but in the sequence I get error [16:39] dodo_ has joined the channel [16:39] hex`: casode_julia [16:39] hex`: node.js:201 [16:39] Vainoharhainen has joined the channel [16:39] hex`: throw e; // process.nextTick error, or 'error' event on first tick [16:39] hex`: ^ [16:39] hex`: TypeError: Cannot read property 'user' of null [16:39] hex`: being casode_julia the first doc.user [16:39] Poetro: hex`: maybe check for doc first, and if it is an object (in your case it is null) then try to use it's properties [16:40] hex`: ok, I know I can do that... but is it the normal behavior of forEach? [16:40] hex`: or is it a bug? [16:40] argami has joined the channel [16:40] hex`: it is iterating one more time than necessary [16:40] Poetro: hex`: like if (doc) console.log(doc.user) [16:40] kuebk has left the channel [16:40] Poetro: hex`: it has nothing to do with forEach [16:41] Poetro: it is your db layer [16:41] hex`: hmm [16:41] hex`: ok... [16:41] Poetro: that returned null [16:41] hex`: thanks Poetro :) [16:41] Poetro: hex`: there were maybe also an error there [16:41] hex`: probably I'll fork mongojs and try to figure out where it went wrong [16:41] Poetro: hex`: and u didnt even check the err variable [16:41] hex`: you're right [16:42] bartt has joined the channel [16:44] arduix has joined the channel [16:45] wumpus_: guys suppose that i call redis.srandmember("myset", function(err, key) {...}) in a cicle [16:45] wumpus_: can i be sure that all the callbacks are called in the cicle order? [16:46] Poetro: wumpus_: the callbacks are called in the order the origin calls it [16:46] patcito has joined the channel [16:46] Poetro: also keep in mind that there is an event loop [16:46] Poetro: wumpus_: so it can be pretty random [16:47] coder1 has joined the channel [16:48] wumpus_: so for example if call redis.srandmember(config.rooms[i], function(err, key) {}); twice [16:48] wumpus_: second callback can be executed before first one [16:48] lduros has joined the channel [16:48] wumpus_: is there any way to do that syncronously? [16:49] ovaillancourt has joined the channel [16:49] TheAlphaNerd has joined the channel [16:49] TheAlphaNerd has joined the channel [16:49] AndreasMadsen has joined the channel [16:50] sreeix_ has joined the channel [16:50] bugQ: ok the only way I've found to check whether the process is a child is to see whether process.send is defined [16:51] bugQ: is there really no flag for that? [16:51] bindr has joined the channel [16:52] Poetro: wumpus_: there are frameworks for that [16:52] markwubben has joined the channel [16:52] wumpus_: ok i need to find a workaround than, ty [16:52] Wizek has joined the channel [16:53] albertosh has joined the channel [16:53] lperrin has joined the channel [16:53] kmiyashiro has joined the channel [16:54] chvid has joined the channel [16:54] Poetro: wumpus_: look for parallel, flow control etc libraries in npm [16:54] langworthy has joined the channel [16:54] wumpus_: ok thanks [16:54] shinuza has joined the channel [16:55] qjcg has joined the channel [16:55] Skaag has joined the channel [16:56] sreeix_ has joined the channel [16:57] kyonsalt has joined the channel [16:57] mundanity has joined the channel [16:58] blueadept has joined the channel [16:58] blueadept has joined the channel [16:58] mattgifford has joined the channel [16:58] Andy1991: Whats the best way to get an english date in js? [16:58] Andy1991: DO I need to do all the zero padding shit? [16:59] Andy1991: Because thats annoying lol [16:59] heavysixer has joined the channel [16:59] Poetro: Andy1991: define english date [16:59] springmeyer has joined the channel [17:00] Andy1991: 22/03/2012 [17:00] Andy1991: dd/mm/YYYY [17:00] Poetro: Andy1991: there are a couple date modules out there [17:00] Andy1991: ACTION looks [17:00] Andy1991: cheers [17:01] Progster has joined the channel [17:01] sechrist has joined the channel [17:02] pizthewiz has joined the channel [17:03] bugQ: of course if util.format was a proper printf it would be too simple to warrant its own module [17:04] artusrocha has joined the channel [17:04] Maxani has joined the channel [17:06] st_luke has joined the channel [17:09] t0mmyvyo has joined the channel [17:10] mxbtty has joined the channel [17:13] mattrobenolt has joined the channel [17:13] lcampbell has left the channel [17:13] mattrobenolt: Anyone know what version of Node introduced the ability to load a *.json file with require? [17:13] mattrobenolt: Like: require('config.json').somekey [17:14] aoberoi has joined the channel [17:14] mattrobenolt: It doesn't say in the docs: http://nodejs.org/api/modules.html#modules_file_modules [17:14] aoberoi has joined the channel [17:15] adamkittelson has joined the channel [17:16] khrome has joined the channel [17:16] halfhalo has joined the channel [17:18] Poetro: mattrobenolt: it was there in 0.5.4 [17:18] isaacs: mattrobenolt: * | 588d885 isaacs Close #1357 Load json files with require() (8 months ago) [17:18] mattrobenolt: Poetro: So 0.6 release? [17:19] Poetro: mattrobenolt: introduced in 0.5.2 [17:19] isaacs: mattrobenolt: yeah, 0.6.0 had it [17:19] mattrobenolt: isaacs: Yeah, I was reading that issue, but couldn't figure out when it was actually released. [17:19] tomasztomczyk has joined the channel [17:19] heavysixer has joined the channel [17:19] mattrobenolt: Thanks. :) [17:19] sechrist has joined the channel [17:20] gozala has left the channel [17:22] samuelgoodwin has joined the channel [17:23] flou has left the channel [17:23] bartt has joined the channel [17:24] kmiyashiro has joined the channel [17:25] mansoor: wut [17:26] mansoor: how is code after return statement being executed :S [17:26] mansoor: if (err) {do something. is being executed... and then return;} console.log('this should not be executed... but is') [17:27] dukeytoo has joined the channel [17:27] wilmoore has joined the channel [17:27] franciscallo has joined the channel [17:28] socketio\test\03 has joined the channel [17:28] justin_ has joined the channel [17:28] Poetro: mansoor: maybe the return statement didnt get executed [17:29] Poetro: maybe a better code sample would help [17:29] rubymaverick has joined the channel [17:30] indutny has joined the channel [17:30] thetony: Poetro: +1 [17:31] ramitos has joined the channel [17:31] forste has joined the channel [17:32] bindr has joined the channel [17:33] bingomanatee_ has joined the channel [17:34] TheJH has joined the channel [17:35] flagg0204 has joined the channel [17:37] johnstorey has joined the channel [17:38] robi42 has joined the channel [17:39] joshontheweb has joined the channel [17:41] nateps has joined the channel [17:41] rwaldron has joined the channel [17:42] isaacs: AvianFlu: https://github.com/isaacs/fstream-ignore [17:42] isaacs: AvianFlu: so, i'm thinking of something... i wonder if you'd find it useful [17:42] isaacs: AvianFlu: maybe abstract out the "pack up a package" bit out of npm. [17:42] Gekz has joined the channel [17:42] Gekz has joined the channel [17:42] johnstorey has joined the channel [17:42] isaacs: AvianFlu: as it stands right now, it's one of the biggest bits, and all kinda shoved into a single file. [17:43] AvianFlu: that's not a bad idea [17:43] isaacs: AvianFlu: and then that'd give you a single thing for jitsu, since you're usually just interested in `npm pack`, right? [17:43] kevin_jax has joined the channel [17:43] AvianFlu: it's at least the vast bulk of all our programmatic npm usage [17:43] isaacs: right [17:43] ljounce has joined the channel [17:44] isaacs: so a lot of those things could just be programmatic npm-packer usage, or whatever it's called. [17:44] isaacs: and that'd do all the ignorefile stuff. [17:44] AvianFlu: yeah, I think that could help, definitely [17:44] isaacs: without relying on a ~/.npm cache dir [17:44] kenperkins has joined the channel [17:46] achiu has joined the channel [17:47] retornam has joined the channel [17:48] Poetro_ has joined the channel [17:49] jxson has joined the channel [17:49] TooTallNate has joined the channel [17:51] robhawkes has joined the channel [17:51] caolanm has joined the channel [17:52] hobodave has joined the channel [17:53] langworthy has joined the channel [17:53] Destos has joined the channel [17:54] ramitos has joined the channel [17:54] kmiyashiro has joined the channel [17:55] level09_ has joined the channel [17:56] iamcorpix has joined the channel [17:58] TheDahv has joined the channel [18:00] micheil: isaacs: you about? [18:00] ramitos has joined the channel [18:00] PinguinDude has joined the channel [18:01] dshaw_ has joined the channel [18:02] alejandromg has joined the channel [18:02] kurtzhong_ has joined the channel [18:03] isaacs: micheil: only for a moment. about to commute and probably grab lunch shortly after. is it quick? can it wait an hour or so? [18:04] dylang_ has joined the channel [18:04] micheil: okay, I have a module I need to share between a bunch other modules, all executing within the one node process [18:04] kesor_ has joined the channel [18:04] micheil: I recall you telling me something about modules loading up in a global scope or something [18:04] micheil: isaacs: but I can't remember what it was you said [18:04] isaacs: micheil: well, they're not exactly "global" in anything but the strictest sense. but if all require()s end up resolving to the same file, they'll get the same object. [18:05] tornad has joined the channel [18:05] isaacs: unless you do some cache-clearing hijins [18:05] isaacs: *hijinx [18:05] micheil: okay [18:05] ag4ve: how do i get dnode to connect to a remote host? [18:05] isaacs: i need to write a blog post about the concept of "global". [18:05] micheil: isaacs: heh, okay [18:05] zanefactory has joined the channel [18:05] TheDahv: So I've been reading the dailyjs blog series about writing 'unix' programs with node. It's kind of interesting. [18:05] TheDahv: Are you guys building command-line apps with node? [18:05] isaacs: ag4ve: dnode.connect(blah, blah, function (remote) { remote.doStuff(a, b, c, cb) }) [18:06] ag4ve: yeah, but how do i specify remote? [18:06] isaacs: micheil: like, people say "global" when really what they mean is one or all of: shared, persistent, exposed [18:06] dshaw_1 has joined the channel [18:06] ag4ve: it seems that dnode assumes that the remote will be the server where dnode was included from [18:06] isaacs: micheil: but all of those aspects are independently interesting, and not necessarily always bad, even all together. [18:06] larsschenk has joined the channel [18:06] ag4ve: (on the browser anyway) [18:07] micheil: isaacs: this is for the use case of a "logger" module [18:07] isaacs: micheil: sure. [18:07] isaacs: if you *really* want to, you can have the logger register itself on the actual "global" object. [18:07] micheil: okay [18:07] isaacs: and set module.exports = global.theRealLogger and return if there's one there [18:08] isaacs: but that's probably unnecessary [18:08] larsschenk has left the channel [18:08] isaacs: or you could set pu a logger service in a separate process space. [18:08] isaacs: that's also nice because then it's a bit more resistant to failure. [18:08] isaacs: anyway, gotta run :) [18:08] jaha1 has joined the channel [18:08] TheDahv: For reference, the article series I'm talking about is here: http://dailyjs.com/2012/02/09/unix-node/ [18:08] ag4ve: oh.... i missed the 'in any order part' - Pass in a port, host, UNIX domain socket path, block, or options object in any order [18:09] mcluskydodallas has joined the channel [18:09] TheDahv: And I know the Ruby community has a lot of fun building small command-line tools distributed via gems [18:09] TheDahv: I wonder if that's something node programmers are already doing [18:09] TheDahv: Or plan on doing more [18:10] ag4ve: so, if i just say .connect(8000, 127.0.0.1) it'll know what i want, or do i need uri format? [18:10] ag4ve: ie, proto://domain:port/path? [18:11] karellen has joined the channel [18:12] dragansah has joined the channel [18:12] RLa: TheDahv, lot of node tools use same approach [18:13] RLa: node-packaged jshint csslint etc. all are installable through npm and give you a command that you can use on the command line [18:13] ag4ve: TheDahv: off the top, i think browserify has a command line tool if you want an example (since i'm looking at the dnode doc :) ) [18:13] TheDahv: And those are the kinds of things you'd generally install globally with npm, right? [18:13] TheDahv: `npm install -g` [18:14] larsschenk1 has joined the channel [18:14] RLa: yeah [18:14] TheDahv: Are there any popular tools that aren't....so inwardly focused? Those seem like tools for working on node or building up a web app [18:15] ag4ve: or PATH=$PATH;~/node_modules [18:15] TheDahv: Again, I'm kind of reflecting on how the Ruby community generates excitement about the language [18:15] maxogden: node generates excitement by solving hard problems [18:15] TheDahv: hahaha [18:15] TheDahv: sure [18:15] maxogden: (different kind of excitement) [18:16] jakob_o has joined the channel [18:16] TheDahv: fair point [18:16] TheDahv: Seems like a high brow approach if I'm talking to somebody about why they might want to try node on their next project [18:16] ag4ve: right, command line tools aren't hard - 'ls' doesn't really need an event loop in order to be optimized [18:16] Harzilein has joined the channel [18:16] Harzilein: hi [18:16] m24de has joined the channel [18:17] m24de: http://3c921c66.hornywood.tv HOT BRAZILIAN PORNSTAR GISELE GUCI FUCKED HARD ENJOY [18:17] maxogden: DSLs are a fun mental excercise but i question their utility value. lots of leaky abstractions [18:17] m24de has joined the channel [18:17] Harzilein: there are generators for connect applications, right? [18:17] ag4ve: TheDahv: use the tool for the job :) [18:17] Country has joined the channel [18:18] bindr has joined the channel [18:18] TheDahv: Ok, so suppose I want to build something and use javascript just because I like the language [18:18] jakob_o: hey there, anyone got a working nodejs / chromium developer tools (in eclipse) setup? tried with several eclipse versions (3.6 / 3.7) older versions of the developer tools node from the ubuntu repository (which seems to be really old) and the latest from source... [18:18] TheDahv: So, I'm not using an event loop per se [18:19] ag4ve: TheDahv: i like perl for command line and generating reports (xls), i like python for all of their math libraries and gis stuff, and ruby for their jruby (just my oppinions of what works for me) [18:19] jakob_o: tldr > which versions of nodejs and chomium developer tools work together? [18:19] TheDahv: I can't think of a platform where I can use js or coffeescript to write a quick tool [18:19] TheDahv: other than node [18:19] justfielding has joined the channel [18:20] TheDahv: Like, *yes* it is good at what it does. Does that mean it's therefore an invalid choice for any other problem? [18:20] maxogden: i find ruby is a great scripting language and node is a great event io framework [18:20] maxogden: evented* [18:20] maxogden: there are never invalid choices, just ones that go against the grain [18:21] TheDahv: Yeah. I get the "bringing a hammer to drive a screw" problem. I just wonder if there is a tendency to look at node as a one-trick pony [18:21] TheAlphaNerd has joined the channel [18:22] lazyshot has joined the channel [18:22] sadjow has joined the channel [18:22] ag4ve: TheDahv: nope, i don't know how mych tty support there is (ie, is there a node curses library? is there a File::Find like module? etc) but, in, access anything with the process object and do what you need [18:22] TheDahv: I haven't considered tty support [18:22] orlandovftw has joined the channel [18:23] TheDahv: I'm working on this as a "just for fun" project: https://github.com/TheDahv/link-keeper [18:23] orlandovftw has joined the channel [18:23] ag4ve: TheDahv: and there might be libraries for those things. i just don't know and you might want to know that. [18:24] jakob_o: anyone? [18:24] ramitos has joined the channel [18:26] crutex has joined the channel [18:26] ag4ve: TheDahv: heh, pretty cool. i keep thinking of a greesemonkey tool to try that (or a bookmarklet). [18:26] sh1mmer has joined the channel [18:27] joshontheweb has joined the channel [18:27] iamcorpix has joined the channel [18:28] markwubben has joined the channel [18:29] ramitos has joined the channel [18:30] jkridner_ has joined the channel [18:30] TheDahv: I initially considered Ruby but thought it would be a good choice [18:30] TheDahv: But I wanted an excuse to actually try CoffeeScript [18:30] TheDahv: And I'll be honest, I just really like writing node code [18:30] enjalot has joined the channel [18:30] TheDahv: So there isn't any event loop to speak of [18:30] TheDahv: There aren't too many async callbacks to worry about [18:31] TheDahv: Does that make this a bad use case for node? [18:31] AndreasMadsen has joined the channel [18:31] itabhijitb has joined the channel [18:31] TheDahv: The one thing I need to spend some time thinking about is how I want to deploy this and get it set up on someone else's machine [18:32] madhums has joined the channel [18:32] itabhijitb: I would need help in installing socket.io, is it the right forum to address the question? [18:32] bodisiw has joined the channel [18:32] TheDahv: Haha, I've learned on IRC it's better to just ask. If you get yelled at, you can just go elsewhere [18:32] chovy has joined the channel [18:33] TheDahv: itabhijitb: what's your issue? [18:33] ag4ve: TheDahv++ [18:33] chovy: anyone use express+ejs? [18:33] chovy: w/ mongoose? [18:33] lazyshot has joined the channel [18:33] TheDahv: I've not tried ejs yet [18:33] chovy: afaik, it's the only html templating solution. [18:33] chovy: the others abstract html like jade [18:33] chovy: i hate that. [18:33] Axsuul has joined the channel [18:33] djcoin has joined the channel [18:34] chovy: but the ejs docs are horrible. [18:34] Axsuul has joined the channel [18:34] dilvie has joined the channel [18:34] dukeytoo: I've used ejs but not mongoose [18:34] bugQ: jakob_o: try https://github.com/dannycoates/node-inspector for basically the same thing but without the eclipse bloat [18:34] dukeytoo: I also dislike abstracting the HTML [18:35] itabhijitb: My node.js version is v0.7.7-pre installed via aptitude (Ubuntu Distro). My npm version is 1.1.0. I cloned https://github.com/LearnBoost/socket.io.git and then issued npm install socket.io. I was greeted with the Error "npm ERR! Not compatible with your version of node/npm: commander@0.5.0 [18:35] itabhijitb: npm ERR! Required: {"node":">= 0.4.x < 0.7.0"} [18:35] jakob_o: thanks, i'll have a lookt at it, basically im used to the bloat ;) [18:35] itabhijitb: " [18:35] ag4ve: heh, abstracting the html is why i started liking handlebars [18:35] chovy: i'm having a hard time finding tutorials on express+mongoose. [18:36] chovy: there are only a few out there. [18:36] chovy: I want to know how to lay out my app so I don't have one huge app.js file. [18:36] TheDahv: chovy: as in splitting out your 'routes' into different files? [18:36] mikedeboer has joined the channel [18:36] rlidwka: itabhijitb: use "npm -f" [18:36] ag4ve: exports.thing and require [18:36] chovy: yeah. and models. etc. [18:37] ag4ve: chovy: ^^ [18:37] isao has joined the channel [18:37] TheDahv: I haven't gotten around to doing it in my projects yet [18:37] dukeytoo: Ejs docs are so sparse because basica [18:37] dukeytoo: ..basically it is just js [18:37] sammmy has joined the channel [18:37] TheDahv: But basically the gist of what I've read is you can define routes on an "app" object in any file [18:37] rlidwka: itabhijitb: and ask package maintainer about that... i thing limiting node version is something that is not very clever [18:37] ag4ve: there is also locomotive and some other mvc stuff, but it's just too easy here that i don't really see the point [18:37] Hui_Nan has joined the channel [18:37] Hui_Nan: hi all [18:38] TheDahv: In your main file, you can also just work on an "app" variable without using "var" [18:38] sammmy: Does ? escape my variables for me in the mysql module for mysql injection attacks? [18:38] TheDahv: *namespace [18:38] TheDahv: JavaScript will hoist it into the global namespsace [18:38] TheDahv: let me see if I can find the article that explained it [18:38] hcchien has joined the channel [18:38] itabhijitb: rlidwka: I issued npm -f install socket.io but I received the same error message. Should I try demoting the node.js version? [18:38] TheDahv: I think isaacs wrote it [18:38] josh-k has joined the channel [18:39] TheDahv: itabhijitb: is "nvm" not an option for you? [18:39] Hui_Nan: Is there any build system for javascript applications that can JS[LH]int, merge js and css, minify js and css, and do some custom user-defined magics on the result? [18:40] ag4ve: Hui_Nan: yes, yui-compress off the top does it for yui. but there are plenty. [18:40] rlidwka: itabhijitb: wait... latest socket.io does NOT have that limit [18:40] madhums has joined the channel [18:41] rlidwka: itabhijitb: try "npm install socket.io@0.9.2" [18:41] itabhijitb: TheDahv: I have not installed nvm yet. I can clone and try but let me first try rlidwka's suggestion [18:41] tellnes has joined the channel [18:41] McMAGIC--Copy has joined the channel [18:41] kPb_in has joined the channel [18:42] rlidwka: ah, that's not socket.io, that's commander [18:42] TheDahv: chovy: Try reading this: http://programmersgoodies.com/345573/nodejsexpressjs-app-structure/ [18:42] TheDahv: And see if you learn anything helpful by checking out how this project is organized: https://github.com/qed42/nodejs-express-mongoose-demo [18:42] Hui_Nan: ag4ve: I mean the system based on node.js [18:42] Hui_Nan: to avoid java [18:43] itabhijitb: rlidwka: Should I try to upgrade commander? [18:43] a_rk has joined the channel [18:43] ag4ve: ACTION grumbles about plain sql in code (from the article TheDahv posted) [18:43] admc has joined the channel [18:44] rlidwka: itabhijitb: remove it and try "npm -f install socket.io" - that should work [18:44] mikeal has joined the channel [18:45] karellen has joined the channel [18:45] M1l3n1um has joined the channel [18:45] lazyshot has joined the channel [18:45] itabhijitb: rlidwka: you mean I should remove commander? [18:46] chovy: TheDahv: thanks [18:46] rlidwka: itabhijitb: are you using commander somewhere else? [18:47] mattrobenolt has left the channel [18:47] itabhijitb: rlidwka: no not as of now [18:47] Rushing has joined the channel [18:47] Phoenixz: I want to check an object to see if it is a socket.io socket, and I guess instanceof will do that trick, can anybody tell me with what I would have to compare (using instanceof) that socket? [18:47] lohkey has joined the channel [18:48] itabhijitb: rlidwka: I just realized I was cloning from 0.9.2 which is the version you suggested [18:48] bartt has joined the channel [18:50] isaacs has joined the channel [18:51] hij1nx has joined the channel [18:51] TheDahv: Ok, a lull in the conversation. So if you're going to install a command-line tool through npm, what would you imagine the experience should be? [18:52] TheDahv: In my tool, for example, I think it would be cool to just hit "npm install -g link-keeper" and then just go [18:52] TheDahv: But then what about things like setup? Mine just defaults to chrome because that's what I like on my machine [18:52] topfunky has joined the channel [18:53] TheDahv: But a user should be able to set things like which browser they want to use, etc [18:55] alvaro_o has joined the channel [18:55] johnstorey has joined the channel [18:55] tilgovi has joined the channel [18:56] isaacs: TheDahv: you could have it keep a config file somewhere, and manage it. [18:56] heavysixer has joined the channel [18:56] isaacs: TheDahv: ./config.ini might be a good place. [18:56] _baton_ has joined the channel [18:56] isaacs: TheDahv: npm's configurability is overkill for the vast majority of purposes. [18:56] kevin_jax has joined the channel [18:56] yawNO has joined the channel [18:57] ag4ve: TheDahv: first, if possible, i'd have the installer bail if not root (if that's how you intend it to be installed) [18:57] isaacs: TheDahv: you can use the ini module to parse and generate ini files, or just use json [18:57] yawNO: hi [18:57] TheDahv: isaacs: That's kind of what I'm going for here: https://github.com/TheDahv/link-keeper/blob/master/lib/conf.json [18:57] madhums has joined the channel [18:57] isaacs: TheDahv: also, you can set "preferGlobal":true in the package.json, to nudge people towards installing it globally [18:58] TheDahv: Oh, I didn't know about that one. I'll toss it in as an issue [18:58] Es0teric: so i am using formidable and for some reason, i get the error "cannot find module" when i have the package installed via npm [18:58] itabhijitb: It may be just a fluke but issuing npm -g list followed by npm -f install socket.io just worked. Though I got the message "Checking for node path : not found " which I believe can be ignored. [18:58] jomoho has joined the channel [18:59] itabhijitb: Any suggestion? [18:59] hij1nx has joined the channel [18:59] madhums8 has joined the channel [18:59] _dave_h_d has joined the channel [18:59] TheDahv: Github has default issue labels. I hadn't noticed that before. Nice [18:59] madhums has joined the channel [18:59] _dave_h_d: no answer in socket.io so might be luckier here …. [18:59] _dave_h_d: hi all, i have set up a socket io server and client using example from front page:http://socket.io/ [19:00] _dave_h_d: it works on my xampp server however when i put it on a different server [19:00] _dave_h_d: the socket io url keeps rotating (loading) for a while and then it goes red in my firebug [19:00] _dave_h_d: by socket io code i mean: http://ipaddress/socket.io/1/?t=1332441963315 [19:00] _dave_h_d: anyone know why this might be? [19:00] TheDahv: ag4ve: If you installed something via NPM and then some script fired up asking you to configure things, would you hate that? [19:00] `3rdEden has joined the channel [19:00] TheDahv: Or, maybe it would be an init command after you install it [19:01] TheDahv: But anyway, it could prompt you to enter `which chrome` or `which firefox` to get the path to your preferred browser [19:01] lakkris has joined the channel [19:01] TheDahv: Or, if you wanted to go crazy and switch over to using mongodb to store links, there would need to be some way to specify a path for that too [19:02] brianleroux has joined the channel [19:02] skomski has joined the channel [19:03] smithbh has joined the channel [19:04] TheDahv: Heading out for some lunch. I'll probably come back and be annoying later ;) [19:05] Es0teric: i am using formidable and its saying module not found [19:06] josh-k_ has joined the channel [19:06] isaacs: Es0teric: did you do `npm install formidable` in your project directory, locally without the -g flag? [19:06] shinuza has joined the channel [19:06] Es0teric: isaacs when installing formidable [19:06] hh__ has joined the channel [19:06] Es0teric: do i have to put it in the project directory? [19:06] Es0teric: or can i just do a global then include it? [19:06] isaacs: Es0teric: global installs are for command line utilities [19:06] isaacs: and for `npm link` [19:06] Es0teric: because i just did npm install formidable [19:07] isaacs: Es0teric: you have to do `npm install formidable` in the project directory [19:07] HacDan has joined the channel [19:07] hh__: hey, curious about best practices for web api... should an good api have it's on error codes/responses or leave it up to http status codes ? [19:07] hh__: own* [19:07] Es0teric: isaacs now it would include it when i do require('formidable'); ? [19:08] slickplaid: I usually use the http status codes... they're there, why not use them? :D [19:08] jxson has joined the channel [19:08] slickplaid: then further explain the error/success in a message [19:09] madhums has joined the channel [19:09] Es0teric: TypeError: Cannot read property 'headers' of undefined [19:09] Es0teric: at IncomingForm.parse [19:11] madhums has joined the channel [19:11] ag4ve: TheDahv: i would make configuration options environment variables [19:12] ag4ve: i've got my zshrc, and if i want to temporarily change my mind, i just VAR=thing command [19:12] kevwil has joined the channel [19:13] ag4ve: ... and everything is good. unless i'm dealing with something like vim or irssi, i hate configuration files cluttering my home [19:13] dukeytoo: hh__: I find http status codes not to be expressive enough. You should probably use a subset of status codes but supplement with additional info. [19:14] indutny: pquerna: woot! https://github.com/pquerna/spedye :) [19:16] madhums has joined the channel [19:16] CoverSlide has joined the channel [19:17] ericmuyser has joined the channel [19:17] yaymukund has joined the channel [19:18] ag4ve: TheDahv: btw, the environment thing doesn't mean break it if i don't know what i'm doing. i like things that 'Just Work' on install, but then, i open up your manpage i see that you give me options to set. [19:19] kigorus has joined the channel [19:19] josh-k has joined the channel [19:20] itabhijitb has left the channel [19:20] robi42 has joined the channel [19:22] TheDahv: ag4ve: I thought of something when I was going to get my lunch [19:22] TheDahv: I use nvm on my machine [19:22] TheDahv: So if I hop into a new nvm environment, I may still want link-keeper there too [19:22] TheDahv: So I don't want to have to reconfigure things any time I switch into a new nvm environment [19:23] fluk3 has joined the channel [19:23] bkaney has joined the channel [19:23] TheDahv: In this regard, a home folder with stuff in there that doesn't change from version to version might be nice [19:23] TheDahv: I suppose I could just my system npm [19:23] TheDahv: But I almost never do that. I'm pretty much always in nvm, which forgoes any need to use root [19:24] ag4ve: putting environment variables in my .zshrc doesn't change either [19:24] TheDahv: A fair point [19:24] TheDahv: So does mean bash users are out of luck? [19:24] TheDahv: I guess environment variables would work the same way [19:24] TheDahv: they would just be easier to set in zsh [19:25] ag4ve: no, same in everything i know [19:26] ag4ve: TheDahv: ONE=1; echo $ONE [19:26] TheDahv: yeah [19:26] ag4ve: echo "ONE=1" >> ~/.bashrc (or is it .bash_profile - don't recall) [19:27] TheDahv: I forget. I think I probably had .profile before I moved to zsh [19:27] CoverSlide: don't you have to export variables from your ~/.*rc files? [19:27] TheAlphaNerd: so I cannot seem to get dgram.send() to work [19:27] ag4ve: but, idk if everyone likes doing things like this :) [19:27] TheAlphaNerd: no packets coming out [19:27] TheAlphaNerd: and when I do get packets they are malformed :( [19:28] dragansah has joined the channel [19:28] ag4ve: CoverSlide: no, your rc files are run as normal scripts when you login (or logout etc). tias [19:28] TheDahv_ has joined the channel [19:28] indutny has joined the channel [19:29] whitman has joined the channel [19:29] simenbrekken has joined the channel [19:29] TheDahv_: with regards to nvm, it would be nice if the process of loading the desired environment could be automated [19:30] TheDahv_: For example, rvm looks for a .rvmrc file and loads the appropriate stuff [19:30] automata has joined the channel [19:30] TheDahv_: Does nvm already do that? If not, is there a reason? [19:30] TheDahv_: Or are we just waiting for somebody to do it [19:30] madhums has joined the channel [19:30] WeeJeWel has joined the channel [19:31] madhums has joined the channel [19:32] mehlah has joined the channel [19:33] madhums has joined the channel [19:33] larsschenk1 has left the channel [19:35] larsschenk has joined the channel [19:36] wilmoore has joined the channel [19:36] markwubben has joined the channel [19:36] wilmoore has joined the channel [19:37] larsschenk has left the channel [19:38] marcostoledo has joined the channel [19:39] dragansah has joined the channel [19:39] Maxani has joined the channel [19:39] MartinCleaver has joined the channel [19:39] MartinCleaver has joined the channel [19:39] Phoenixz: in node.js, I want to check an object to see if it is a socket.io socket, and I guess instanceof will do that trick. Can anybody tell me with what I would have to compare (using instanceof) that socket? I guess I could do if(object instanceof require('socket.io').socket){} or something? [19:41] whitman has joined the channel [19:42] shinuza has joined the channel [19:42] n26 has joined the channel [19:43] jacobolus has joined the channel [19:43] hackband has joined the channel [19:43] djcoin: Hi SubStack, may I ask you what made you switch from Haskell to javascript/Node ? :) [19:44] dukeytoo has joined the channel [19:44] dshaw_ has joined the channel [19:44] smithbh has left the channel [19:44] rt7 has joined the channel [19:45] pgte has joined the channel [19:45] PPPaul has joined the channel [19:47] Vainoharhainen has joined the channel [19:47] Wa has joined the channel [19:47] topfunky: Phoenixz: I got it to work with basically socket.constructor [19:47] disappearedng has joined the channel [19:48] dilvie has joined the channel [19:48] topfunky: Phoenixz: I'll make a gist, but something like (myThing instanceof socket.constructor) [19:49] aheckmann has joined the channel [19:49] sadjow has left the channel [19:49] yawNO has joined the channel [19:50] fomatin has joined the channel [19:50] topfunky: Phoenixz: line 7 here: https://gist.github.com/2162851 [19:51] Es0teric: i get this error TypeError: Cannot read property 'headers' of undefined [19:51] Es0teric: at IncomingForm.parse [19:51] Es0teric: how do i fix that? [19:52] topfunky: Es0teric: Is your code using "headers" anywhere, or is this in a third-party library? [19:52] bshelton has joined the channel [19:52] Es0teric: topfunky 3rd party library [19:52] Es0teric: formidable to be exact [19:53] topfunky: maybe the request object you're passing to formidable's "parse" function is null? [19:54] topfunky: could you paste a snippet of your code? https://gist.github.com/ [19:54] Es0teric: topfunky -> http://notey.it/n/NjM [19:55] iamcorpix has joined the channel [19:55] topfunky: Es0teric: so it looks like whatever you're calling "test" with as the first argument is not a request object [19:56] Es0teric: topfunky what do you mean? [19:56] topfunky: Es0teric: the code you posted looks fine. But the error is probably somewhere else. [19:56] topfunky: Is this in an express app? [19:56] Es0teric: topfunky yes [19:57] xat--: Es0teric: show the snippet where you are calling the test function [19:57] RLa: djcoin, is there node.haskell too? :) [19:57] Poetro has joined the channel [19:57] phantomcircuit: i have a global shared state (it's basically a cache) which is modified by the 'data' event on a tcp socket and read by the 'connection' socket.io event [19:57] trivol_ has joined the channel [19:57] phantomcircuit: im having some problems with the values drifting overtime from their true values [19:57] djcoin: RLa: what do you mean ? [19:58] phantomcircuit: im assuming there is some sort of synchronization necessary to make this work [19:58] spolu has joined the channel [19:58] Es0teric: xat-- http://notey.it/n/NjQ [19:58] RLa: djcoin, something evented like node, but written in haskell [19:58] Es0teric: line 37 [19:58] djcoin: ahah ok [19:59] topfunky: Es0teric: just pass bar.test, not bar.test() [19:59] topfunky: no parens [19:59] xat--: Es0teric: do it with bar.test [19:59] djcoin: :] Well Idon't know, I guess Haskell would have no problem to implement such a framework [19:59] Es0teric: wow [19:59] Es0teric: look at that [19:59] Es0teric: lol [19:59] Es0teric: thanks [19:59] xat--: :P [19:59] KingInky has joined the channel [19:59] Es0teric: so when I'm passing functions as exports [19:59] djcoin: But I'm not well versed in Haskell. But i'm getting more and more interested in functionnal programming [19:59] Es0teric: i don't have to do () [19:59] Es0teric: ? [19:59] cinaglia_ has joined the channel [19:59] djcoin: And so I was wondering why substack moved from haskell to Node [20:00] djcoin: I guess the amazing "web"/javascript environment [20:00] topfunky: Es0teric: yeah. In that case you're passing the function object. Adding parens calls the function and returns its return value. [20:00] Es0teric: ah here we go.. xat-- i get this now when i do /bar in the url 500 Error: bad content-type header, no content-type [20:00] xat--: Es0teric: when you are passing a function as argument [20:01] isao has joined the channel [20:01] dragansah has joined the channel [20:02] Es0teric: xat-- i got a 500 error, bad content-type [20:03] Es0teric: does that mean that i have to pass the header [20:03] arduix: how to do var[0..5] in nodejs? [20:04] pekim_ has joined the channel [20:04] piscisaureus_ has joined the channel [20:04] AAA_awright: arduix: How do you do what? [20:04] djcoin: RLa: are you interested in functional programming ? [20:04] whaley has joined the channel [20:04] digiwano_: arduix: ary.slice(0,5) ? [20:04] xat--: Es0teric: your calling that url in the browser? [20:04] arduix: thanks digiwano_ [20:04] Es0teric: xat-- yes [20:04] RLa: depends what you mean by interest [20:05] RLa: i have used some of them (haskell, ocaml) but i'm not using them every day [20:06] xat--: Es0teric: hmm, you shouldnt need to set any headery by your own [20:06] RLa: the only static typed language i write every day is c++ [20:06] xat--: headers [20:06] Es0teric: xat-- then why is it telling me that its a bad content type? [20:06] Es0teric: can't i do... [20:06] Es0teric: sendHeader() [20:06] rlidwka_ has joined the channel [20:06] Es0teric: on the callback? [20:06] TheDahv_: RLa, djcoin: What is it about a language that makes you think it is functional? [20:07] TheDahv_: Moreover, do you think of "functional languages" or "languages that support a functional paradigm" [20:07] TheDahv_: And last zen question: when you think functional languages, why don't you think JavaScript? [20:07] reed_ has joined the channel [20:07] RLa: no, it requires monads to do anything useful in it :) [20:07] djcoin: Pass functions around as 1st class citizen ? [20:08] djcoin: I did not say javascript was not "functional" [20:08] xat--: Es0teric: oh, you get that error message for the response? [20:08] TheJH has joined the channel [20:08] Es0teric: xat-- well the error message pops up when i go to /bar [20:08] TheDahv_: djcoin: Yeah, I didn't mean to imply that you did. I jumped in a little late on the convo [20:08] Es0teric: so i am assuming that IS the response [20:08] Es0teric: lol [20:08] RLa: anyway, i have no idea about that terminology [20:08] djcoin: Well the conversation is only a few lines long [20:08] TheDahv_: hehe [20:09] TheDahv_: One thing I really like that I wished JavaScript had would be pattern matching [20:09] RLa: lot of languages have closures, but lot of them has some oo-thingies too [20:09] djcoin: I was just being curious :) [20:09] TheDahv_: ML style pattern matching [20:09] TheDahv_: djcoin: it's my way of stoking the fire in a conversation. I think this is interesting! [20:09] Es0teric: i just added res.header('Content-type', 'text/html');and still same err 500 [20:09] xat--: Es0teric: does res.send('hello'); work? [20:09] Es0teric: let me see [20:10] djcoin: Yeah ! [20:10] djcoin: But too bad, I gotta eat :s [20:10] xat--: Es0teric: i guess this here is also wrong: fields.name; [20:10] xat--: fields is an array [20:10] Es0teric: xat-- res.send('hello'); doesn't work [20:10] mattparo has joined the channel [20:11] xat--: hm [20:11] TheDahv_: djcoin: haha, enjoy [20:11] Es0teric: xat-- i will inspect the var name [20:11] topfunky: I want to call an expressjs helper from another helper. I'm doing app._locals.otherHelper() but that seems like a hack. Is there a better way? [20:11] RobWC has joined the channel [20:11] RobWC has left the channel [20:12] maxogden: i dont know how helpers work (sounds like rails) but mebbe require() ? #notreallyhelpingprobably [20:12] Es0teric: xat-- it doesn't give me any inspect info [20:12] Es0teric: it just gives me the 500 err [20:12] Es0teric: i did console.log(util.inspect(name)); [20:13] topfunky: maxogden: Thanks. I can find the helper in my code, I just think I shouldn't be using _locals to get to it. [20:13] TimTimTim has joined the channel [20:14] isao has joined the channel [20:14] topfunky: hmmm...maybe just this.otherHelper(). Too obvious. [20:14] pgte has joined the channel [20:14] xat--: Es0teric: try inspecting fields [20:14] mattparo: hello everybody, anyone knows how i can send someone a message without letting everybody know? =) [20:14] johnstorey has joined the channel [20:14] xat--: abd bot name [20:14] Es0teric: xat-- i removed the fields entirely [20:15] Es0teric: and i still get a 500 err [20:15] arvidkahl has joined the channel [20:15] topfunky: mattparo: /msg user [20:16] sharkbird has joined the channel [20:17] xat--: you commented out that render line when trying res.send? [20:17] bodisiw has joined the channel [20:17] isao has joined the channel [20:17] Es0teric: yeah xat-- AND i did it outside the scope of form.parse [20:17] xat--: okay, strange :) [20:18] jj0hns0n has joined the channel [20:18] Es0teric: ok, xat-- let me retrase [20:18] Es0teric: *retrace [20:18] Es0teric: how do you use formidable, exactly? [20:18] Sadin has joined the channel [20:19] Skaag has joined the channel [20:19] xat--: Es0teric: i use it somehow like you do [20:20] Es0teric: because i don't understand [20:20] Es0teric: how [20:20] Es0teric: it looks right [20:20] Es0teric: but i still get a 500 error [20:20] devaholic has joined the channel [20:20] Es0teric: xat-- see, i removed form.parse() [20:20] Es0teric: i commented it out [20:20] Es0teric: and the res.send('hello!'); [20:20] Es0teric: worked [20:21] Es0teric: so now the problem really is form.parse [20:21] nateps has joined the channel [20:21] xat--: Es0teric: you can do form.on('error', function(err) {console.log(err)}); [20:21] AdamGoodrich has joined the channel [20:21] Es0teric: where? inside form.parse? [20:21] xat--: and see if you get some more information [20:21] xat--: no [20:22] xat--: on the form var [20:22] Es0teric: yes i know [20:22] Es0teric: but inside the form.parse scope? [20:22] xat--: outside [20:22] Es0teric: ok [20:22] postwait has joined the channel [20:23] Es0teric: xat-- this is the only error i get now 500 Error: bad content-type header, no content-type [20:23] Es0teric: the form.on didn't even work [20:23] recycl3 has joined the channel [20:23] drudge01 has joined the channel [20:23] xat--: Es0teric: are you actually performing a post request? [20:24] Es0teric: no [20:24] xat--: there you got it [20:24] drudge01: :) iv been trying node recently [20:24] drudge01: its good stuff [20:24] warz has joined the channel [20:24] Es0teric: wait, xat-- so i have to make the form to actually POST to? [20:24] IrishGringo has joined the channel [20:25] xat--: Es0teric: yeah, formidable is to save files you send via a mulit-part form [20:26] Es0teric: so then [20:26] Es0teric: when i make the form [20:26] Es0teric: where do i direct it to? [20:26] xat--: to /bar [20:26] Es0teric: the directory that the test.js is on? [20:26] Es0teric: i see [20:26] xat--: Es0teric: what are you trying todo exactly? [20:27] Es0teric: xat-- i am trying to make a twitter login [20:27] Es0teric: via authentication [20:27] risto_ has joined the channel [20:27] Es0teric: with username/password fields [20:28] adambeynon has joined the channel [20:28] xat--: so someone sends a form to your server with his twitter account? [20:28] Lemminkainen: Es0teric: you are not alone in form trouble [20:28] staar2: can the req.flash() object accessed in view ? [20:28] Lemminkainen: I'm trying to use Formidable to pass form data to Mongo and am having trouble getting the collection.insert to work at all [20:28] xvacantx has joined the channel [20:28] xvacantx: Hey everyone [20:28] Es0teric: xat-- no.. someone logs into their twitter account using my form, then they get a oauth token [20:28] xvacantx: Anyone here use phantomJS? [20:28] TheEmpath has joined the channel [20:29] TheEmpath: hail nodelings [20:29] Es0teric: then the user will be directed to a dashboard that I create and see their twitter stream/ be able to post a tweet [20:29] st_luke: xvacantx: i have [20:29] xat--: okay [20:29] xvacantx: Cool, every use the nodejs fork of phantomjs? [20:29] staar2: can the req.flash() object accessed in view (expressjs question) :) ? [20:29] TheEmpath: my assumption is that if I have var a = new Buffer(); and var b = new Buffer().toString() that b will take up more RAM than a, yes? [20:30] Es0teric: xat-- now i want to link everyauth with the form info that i'll be getting [20:30] st_luke: xvacantx: nope! [20:30] EhevuTov__ has joined the channel [20:30] xvacantx: It's pretty awesome [20:30] xvacantx: you can instance a headless browser using node :D [20:30] TheEmpath: im aggressively loading http assets into memory in a cache prezipped and i wanna figure out if storing the buffer or storing the string takes up less ram [20:30] bartt has joined the channel [20:30] jmar777 has joined the channel [20:30] xvacantx: I 'trying' to use it for an event based web crawler [20:31] xvacantx: s/I/I'm/ [20:31] staar2: xvacantx, for web crawler, scraping ? [20:32] Es0teric: man... [20:32] Es0teric: even this simple twitter form [20:32] Es0teric: is a freakin pain [20:32] Es0teric: lol [20:32] Es0teric: its not "simple" [20:32] xvacantx: Yes [20:32] Es0teric: if i was making it in php i would've been done [20:32] Es0teric: ages ago [20:32] brianthecoder has joined the channel [20:32] staar2: Es0teric, what's the problem ? [20:32] xvacantx: yeah? [20:33] brianthecoder: who is the one who manages the #node.js twitter account? [20:33] Es0teric: staar2 i basically want to… make a username/password form, get authentication using everyauth, give the user a token so they can be able to see their twitter feed/post a tweet on the dashboard that i specify [20:33] xvacantx: I'm using it to gather resources and take thumbnails of websites [20:34] xvacantx: because you can't fool a browser with obfuscated javascriprt [20:34] xvacantx: javascript* [20:34] Es0teric: i will be using the streaming API [20:34] Es0teric: from twitter [20:34] Es0teric: to display everything in real time [20:34] xvacantx: I'm sure Google does the same thing with their own webkit fork [20:35] staar2: xvacantx, why noy use the jsdom + jquery combo for that ? [20:35] st_luke: realtime is so yesterday, someone page me when apps run in future time [20:35] Brandon_R has joined the channel [20:35] staar2: just question [20:35] Brandon_R: hi guys [20:35] Es0teric: i gotta admit.. creating a REST API in php then pushing the data from the php API into node [20:36] Es0teric: sounds a lot easier [20:36] Es0teric: than what i am trying to do now [20:36] brian_miller has joined the channel [20:36] xat--: Es0teric: but now you learn cool new stuff :D [20:36] baudehlo: xvacantx: yes I use node-phantom [20:36] xvacantx: can that do redirects (javascript/server) [20:36] brianthecoder: anyone in here use log.io? [20:36] Es0teric: yeah, xat-- i just want to make this twitter client for myself for now [20:36] xat--: *gf [20:36] Es0teric: i will extend it later on [20:37] Es0teric: xat-- do you know any tuts on accomplishing what i am trying to accomplish? [20:37] xvacantx: I have to be able to see past url shorteners and redirects [20:37] xvacantx: and be able to do https [20:37] xat--: hmm, i dondt have any in mind [20:38] Brandon_R: does anyone here run node on a cluster? [20:38] dukeytoo has joined the channel [20:38] Es0teric: xat-- then how would you go about executing what i am trying to do? [20:38] Es0teric: lol [20:38] baudehlo: jsdom can't do page thumbnails, unless you do html2 somehow. [20:39] baudehlo: Brandon_R: like more than one machine you mean? [20:39] Brandon_R: yeah [20:39] baudehlo: of course [20:39] Brandon_R: do you use [20:39] Brandon_R: what's that library called, that uses event emitter 2 [20:39] xat--: Es0teric: well, i would first see how that twitter authentication thing works.. because ive never done that.. but i guess you already know how that works :) [20:39] baudehlo: dnode? [20:39] Brandon_R: it's at the tip of my tongue [20:39] mmalecki: Brandon_R: hook.io [20:39] Brandon_R: nope [20:39] Brandon_R: yeah :P [20:40] baudehlo: no I don't. [20:40] xat--: Es0teric: you get an access token from twitter? [20:40] Es0teric: yep, xat-- [20:40] baudehlo: I didn't see the value in hook.io [20:40] `3rdEden has joined the channel [20:40] Es0teric: xat-- i have everything i need from twitter [20:40] xvacantx: Es0teric --this "might" be useful [20:40] xvacantx: http://vunction.com/blog/post/node-and-oauth-and-flickr-oh-my [20:41] Es0teric: dude [20:41] Es0teric: i LIKE the design of that site [20:41] Es0teric: really clean [20:41] Es0teric: and xvacantx thanks [20:41] xvacantx: no prob [20:41] Brandon_R_ has joined the channel [20:41] Brandon_R_: it seems interesting [20:42] Poetro has joined the channel [20:43] Es0teric: wow [20:43] Es0teric: i like how they compare things in php vs node [20:43] Es0teric: this is making it easier for me to understand lol [20:43] Es0teric: MORE PEOPLE NEED TO DO THIS [20:43] xvacantx: Yeah that was exactly what you were talking about [20:43] xvacantx: lol [20:44] Es0teric: lol [20:44] xvacantx: I figured it would be a useful comparison [20:44] Es0teric: thanks again xvacantx [20:45] thetony: Es0teric: was it you who was doing text analysis? [20:45] xvacantx: you should checkout http://nodecloud.org [20:45] xvacantx: great resource [20:45] Es0teric: thetony say what? [20:45] xvacantx: has a bunch of awesome node sites on there [20:45] Es0teric: yeah, xvacantx I've seen this site before [20:45] Es0teric: lol [20:46] briancray has joined the channel [20:47] Poetro has joined the channel [20:47] ag4ve: per my earlier socket.io question (how to specify the host). this is actually more along the lines of what i'm trying to do: http://stackoverflow.com/questions/8546993/how-do-i-make-multiple-dnode-connections [20:48] ryan0x2 has joined the channel [20:48] iamcorpix has joined the channel [20:48] Es0teric: whats redis? [20:49] flou has joined the channel [20:49] Es0teric: so then… i would have to save the oauth token of the user [20:49] Es0teric: and the userID [20:49] Es0teric: or i can just save the userID [20:49] ag4ve: so, basically, i want to be able to control client hardware from a server. so i plan to have a local (to the browser) node instance running, and i want to be able to run functions on that instance from the server. [20:51] ag4ve: so, basically: browser -> server (audit) -> browser (call localhost) -> client server (do something) [20:51] mandric has joined the channel [20:52] mezarian has joined the channel [20:52] Brandon_R_: hey guys quick poll. what is the best module for node? [20:52] ag4ve: and of course i need errors to trickle down [20:55] Es0teric: can someone tell me [20:55] Es0teric: what Redis is? [20:55] TheDahv_: It's a flavor of nosql databases, isn't it? [20:55] dragansah has joined the channel [20:55] TheDahv_: Very "Key Value" store [20:55] Es0teric: nosql databases [20:55] Es0teric: waht? [20:55] mc: http://lmgtfy.com/?q=what+is+redis [20:55] TheDahv_: oh [20:55] TheDahv_: geez. um. Have you heard of mongodb? [20:56] SubStack: redis only recently got the ability to persist data not in memory [20:56] Es0teric: mongodb? [20:56] Es0teric: i only know [20:56] Es0teric: mySQL [20:56] SubStack: redis is mostly for storing things like sessions and caches [20:57] Es0teric: so redis is… a database? [20:57] ag4ve: heh, he goes from a second rate db to a no db :) [20:57] isao: redis is like memcached with data structures instead of just key/values [20:57] Es0teric: ag4ve MySQL is the most commonly used [20:57] isao: it also does pub/sub and transactional kind of stuff [20:57] Es0teric: i see [20:57] ag4ve: and shittiest, but i use it, so.... [20:58] Es0teric: so i'll have to learn it [20:58] Es0teric: great... [20:58] kevwil has joined the channel [20:58] Es0teric: is couchDB the same? [20:58] Brandon_R_: hey guys [20:58] Brandon_R_: new idea [20:58] Brandon_R_: object oriented css [20:58] Es0teric: Brandon_R_, ever heard of LESS? [20:58] TheDahv_: Well, there are times when a relational database is the right tool for the right problem [20:58] Brandon_R_: yeah [20:58] indutny has joined the channel [20:58] Es0teric: Brandon_R_ thats kind of OOCSS [20:58] Mortchek has joined the channel [20:59] Brandon_R_: well maybe not a new idea :P [20:59] mikedeboer has joined the channel [20:59] adrianF has joined the channel [20:59] ag4ve: yeah, how does that redis pub/sub stuff work? i mean, would i really want that over a mongo stream and faye / juggernaut / etc? [20:59] Es0teric: anyways [20:59] TheDahv_: Es0teric: play around with this to get a feel for how nosql can work: http://try.redis-db.com/ [20:59] Es0teric: TheDahv_ i am already there [20:59] TheDahv_: Oh [20:59] TheDahv_: I also like this one: http://try.mongodb.org/ [21:00] mmalecki: well, make sure to try out many dbs [21:00] Es0teric: mongodb is also a noSQL db right? [21:00] TheDahv_: yeah [21:00] mmalecki: it's not like nosql is the same everywhere [21:00] Brandon_R_: mongodb is fast [21:00] Es0teric: and couchdb is too right? [21:00] mmalecki: Brandon_R_: yeah, and it's webscale [21:00] Es0teric: so basically these are cloud type db's [21:00] Brandon_R_: couchdb is also webscale [21:01] isao: lol [21:01] TheDahv_: well, this approach to scaling data out horizontally is useful and attractive in particular scenarios [21:01] mmalecki: saying that "x is fast" is bullshit unless you link to specific code which executes faster [21:01] Es0teric: oh [21:01] Es0teric: so these db's [21:01] Es0teric: are js based [21:01] TheDahv_: mmalecki makes a good point that you should strive to understand the strengths and weaknesses of a given database [21:01] ag4ve: TheDahv_: yeah, but the last project i was in they didn't use an array in a db because it isn't a native value in all rdbms. point being is that nosql might suite many more use cases than it's used for. [21:01] Es0teric: intresting [21:01] TheDahv_: given your scenario [21:01] Es0teric: that makes sense with the k/v pairs [21:02] boltR has joined the channel [21:02] SubStack: normalizing all our data can be annoying [21:02] TheDahv_: I tend to go to mongodb because I like the syntax more than redis. I don't have giant applications that need to replicate their data across the world [21:02] SubStack: especially when basically every time you want an array you've got to make a new table [21:03] esundahl has joined the channel [21:03] Es0teric: so if i do DEL connections (and connections is an array that has multiple key/value pairs… it completely deletes that? [21:03] Es0teric: so its like deleting a table in sql [21:03] SubStack: TheDahv_: those aren't really compatible to compare [21:03] SubStack: redis is more competing with tech like memcache [21:03] ag4ve: SubStack: i argued to just use a varchar and shove json in there. they didn't like that idea though, don't recall what was used [21:03] TheDahv_: You're probably right. I don't claim a full understanding of the whole domain [21:04] xvacantx: memcache is pretty awesome [21:04] SubStack: couch and mongo are more comparable [21:04] TheDahv_: oh ok [21:04] SubStack: in the problem that they're designed to solve [21:04] TheDahv_: So redis is more for just jamming anything into it? [21:04] TheDahv_: arbitrary data [21:05] Es0teric: so should i use [21:05] SubStack: redis is more for when you need an in-memory store without too much regard for persistence although it has that now [21:05] Es0teric: redis or mongodb? [21:05] SubStack: ... [21:05] ag4ve: Es0teric: whichever you prefer [21:05] Es0teric: ag4ve i dont know how to use either [21:05] Es0teric: but redis seems easier to use [21:05] warz: your schema will be very different depending on which one you use, and you'll have to jump through additional hoops if you use redis. [21:05] Wizek has joined the channel [21:05] Es0teric: based on the tutorial i am doing [21:05] laner has joined the channel [21:05] ag4ve: a friend of mine said he had an exploit for redis a year ago. but i never got to see it, so fwiw. [21:05] Es0teric: dude [21:05] Es0teric: i just want to store [21:05] Es0teric: oauth tokens [21:06] warz: dude rtfm and use your own judgement [21:06] warz: ok, dude? [21:06] Es0teric: :o someone doesnt like it when i say "dude" [21:06] warz: for the past week youve jsut been askign questions that are easily researchable and you disregard input from this channel [21:06] warz: so why do you keep asking [21:07] ag4ve: .... i think it's an rtfm at this point [21:07] TheDahv_: warz is there a channel specifically for noobs? Or is it worth exercising some patience [21:07] hh__ has joined the channel [21:07] Es0teric: warz i actually search this stuff… i only ask becuase the documentation aint enough [21:07] warz: thedahv, it's worth reading about redis and mongodb. the differences are pretty major. [21:08] TheDahv_: I agree. I don't often hit IRC because I spent plenty of hours wading through search results [21:08] bandu has joined the channel [21:08] warz: self research + just try it == way more sustainable than asking on irc [21:08] Es0teric: warz not true [21:08] TheDahv_: being a dick, not that useful anywhere [21:08] kigorus: I am having problems compiling node-v0.6.12 on solaris x86 https://gist.github.com/2162124 any idea how to fix it? [21:08] warz: sometimes it takes somebody telling you that youre doing it wrong before you realize that youre doing it wrong [21:08] warz: just saying. [21:09] TheDahv_: fair point [21:09] RLa: redis seems quite wasteful of ram if most of your data does not change [21:09] bodisiw has joined the channel [21:09] Es0teric: the tutorial on mongodb is alot better than the one on redis [21:09] hh__: huh [21:09] hh__: redis doc is pretty good [21:09] admc has joined the channel [21:09] warz: redis has good docs. redis is just more simplistic than mongodb. [21:09] warz: thats why the docs are simpler. [21:10] ag4ve: RLa: so using a js sub/pub system might still be the way to go? [21:10] warz: esoteric, use redis if you are just wanting to store oauth tokens and have a reliable key to store them with. [21:10] alejandromg has joined the channel [21:10] ag4ve: Es0teric: yes, because mongo fits the js style [21:11] warz: keep in mind though that as your schema may grow, redis may no longer meet your needs. [21:11] RLa: ag4ve, hm, no idea [21:11] Es0teric: exactly, ag4ve thats why i say its alot better because its easier for me to understand [21:11] hh__: for express, if you have a web site and want to expose a web service api, should you go the rails way and have it be the same route? and then within the route have like a req header that differentiates the response? [21:11] RLa: i'm not familiar with your app enough to say [21:11] TheDahv_: Well, mongo deals with "documents", which is a differentiator from something like redis, right? [21:11] TheDahv_: Err, or is that what makes couch and mongo more similar? [21:12] warz: it can be. you can store json data in redis as well. [21:12] ag4ve: RLa: makes ssense. [21:12] maxogden: mongo is like couch except it doesnt fsync before writes :D [21:12] warz: mongo has better features for actually understanding it, though. [21:12] RLa: i see mongodb mosty useful for data that does not fit into ram [21:13] Es0teric: man, i am lost now [21:13] Es0teric: lol [21:13] Es0teric: i am just going to go ahead with this.. tutorial [21:13] hh__: you seem always lost lol [21:13] Es0teric: hh__ yeah, but i somehow catch up.. i just get lagging [21:13] TheDahv_: Where did this whole conversation start? You're looking to do auth in an application? [21:14] Es0teric: someone should make a nodejs tut for people coming from a php background man [21:14] warz: RLa, that's not really why it's "mostly useful". heh. [21:14] hh__: your php experience seems on the low tbh [21:14] warz: mongodb has built in map reduce, geospacial indexing, etc. [21:14] RLa: warz, in comparison to redis :) [21:14] konobi: warz: and a storage backend of /dev/null [21:14] Es0teric: hh__ i am not saying i am a pro at php [21:14] TheDahv_: geospacial indexing is a cool feature [21:14] hh__: you seem like you're missing a lot of basic programming concepts, like you're trying to go from step1 to step10 and you get frustrated [21:14] Es0teric: but i am saying its easier for me to understand [21:14] ag4ve: Es0teric: so you pretty much want ejs with a mysql connector. done [21:15] TheDahv_: Is it postgre that also does some geospatial stuff in queries? [21:15] ag4ve: Es0teric: ^^ there's your php to node tut :) [21:15] trivol_ has joined the channel [21:15] Es0teric: ejs + mysql ? [21:15] emperorcezar: I'm trying to write a bind function for ldapjs. My function calls httpauth on another machine. I don't know how to get my result out of the response callback so bind can return? http://dpaste.com/720260/ I would like to get the returns on lines 18 and 20 to be the returns of server.bind. [21:15] RLa: TheDahv_, postgis :) [21:15] ag4ve: TheDahv_: yes [21:15] laner has joined the channel [21:16] TheDahv_: I like that stuff a lot. I don't have many occasions to use it [21:16] bodisiw has joined the channel [21:16] slajax has joined the channel [21:16] Es0teric: and hh___ i am not trying to go from step1 to step10 [21:16] TheDahv_: But it's enough for me to think it's cool [21:16] Es0teric: *hh__ [21:16] TheDahv_: I didn't know that about mongodb before. Learned something new :) [21:16] Es0teric: step1 to step10 would be attempting to make a chat system [21:16] Es0teric: lol [21:16] zvart has joined the channel [21:16] Es0teric: right now i just want to do basic twitter authentication and post to twitter profile/view timeline [21:16] dylang has joined the channel [21:17] Proggy has joined the channel [21:17] ag4ve: isn't that in the mongo-auth example? i mean verbatim? [21:17] dragansah has joined the channel [21:18] brianleroux has joined the channel [21:18] Es0teric: ag4ve uh.. i believe so… thats why i am learning mongodb now [21:18] Es0teric: lol [21:18] TheDahv_: I'd say, rather than reinvent the wheel and risk messing up on an important part of an application [21:18] jerrysv has joined the channel [21:18] TheDahv_: Learn how to work an existing library in [21:18] Es0teric: TheDahv_ i am using node-oauth [21:18] TheDahv_: This is a good one I like: http://passportjs.org/ [21:19] Es0teric: TheDahv_ my problem now is… form -> userdata -> authenticate -> recieve oauth token [21:19] ag4ve: TheDahv_: my point was that they had the example that did what he stated in the git of mongo-auth [21:19] hh__: so friends, i'm confused, if i have an express route that responds with html or json... aka it also acts as a restful web api, how do i handle authentication? do i check cookies and.. whatever auth i choose for the api ? [21:19] TheDahv_: where does that project live? [21:20] TheDahv_: hh__: I put 'middleware' in my routes to handle authentication [21:20] zenista has joined the channel [21:21] hh__: but i'm saying is that the right approach or should i separate the routing [21:21] nathanielk: 2 [21:21] TheDahv_: Heh, so you're asking for opinions and not implementation help [21:21] nathanielk: >.> nm [21:21] TheDahv_: Um...man, if I had to venture a guess, I'd say have your routes figure out what the desired content type is and respond from the same route [21:22] TheDahv_: It might make the code look hairier [21:22] TheDahv_: But it's nicer from the client perspective [21:22] Es0teric: ag4ve wheres the git for mongo-auth/ [21:22] Es0teric: ? [21:22] TheDahv_: Moreover, having an implementation detail in the URL ("/some/route/json-version") seems wrong [21:23] hh__: rails does it like /post/1.json , which is ugly imo [21:23] hh__: idk, i was going to make it check a req header for the response format [21:23] TheDahv_: I know I've seen that, but I think rails also checks the incoming request 'content-type' [21:24] ag4ve: https://github.com/bnoguchi/mongoose-auth [21:24] enmand has joined the channel [21:24] hh__: i'm more concerned about how to auth, so it's common practice to check cookies, or check whatever i use to auth api requests, like auth header token [21:24] sechrist has joined the channel [21:24] ag4ve: since i'm here: https://github.com/bnoguchi/mongoose-auth/blob/master/example/server.js [21:25] zenista: hi guys is this still true that if a single event misbhihaves or crashes it can bring down the whole application (website) ? [21:25] TheDahv has joined the channel [21:25] TheDahv: Ooops. Got disconnected. [21:25] kriskowal has joined the channel [21:25] TheDahv: Anyway, I used mongo-auth in an early version [21:26] hh__: that's true for anything [21:26] TheDahv: It was using native extensions that made it fail pretty hard when I wanted to deploy to heroku [21:26] alejandromg has joined the channel [21:26] TheDahv: Passport didn't have those problems [21:26] admc has joined the channel [21:26] sechrist has joined the channel [21:26] TheDahv: I also like it's "promise fulfilment" style. It feels like continuation passing [21:27] zenista: hh__ i mean like in php kind of webistes only the users/visitors own session will get crashed but not the whole website for everybody else using it [21:27] robi42 has joined the channel [21:27] flou has joined the channel [21:27] jetienne has joined the channel [21:27] sechrist has joined the channel [21:28] Es0teric: you know what? i guess i'll abandon this whole twitter thing i am trying to do.. i'll go more basic [21:28] zenista: i mean like in php kind of webistes only the users/visitors own session will get crashed but not the whole website for everybody else using it [21:29] TheDahv: Es0teric: that's usually a good plan [21:29] hh__: i think crash is the wrong term [21:29] Es0teric: TheDahv i think making a PHP REST API and pushing it to node is alot easier [21:29] tommyvyo has joined the channel [21:29] Es0teric: so having node process the information from the api [21:29] zenista: i m totally new to node.js kind of think ... so just worried [21:29] TheDahv: Heh, oh, I thought you meant "simple" as in not dealing with authentication [21:29] kevin_jax has joined the channel [21:29] emperorcezar: using http.request how do I get the response after I call .end()? [21:30] TheDahv: If you're going to do it that way, I think you're cheating yourself from actually learning the right way [21:30] ag4ve: TheDahv: you might like this since you use passport (right?) github.com/Turbo87/locomotive-passport-boilerplate/blob/master/app/models/account.js [21:30] Es0teric: yeah, TheDahv i dont have to authenticate with this [21:30] Es0teric: because i am going to make the REST API [21:30] thetony: is there any demand for sql/nosql connections client side? that is like the only thing preventing apps from living entirely in a "cloud" [21:31] zenista: what i mean is like in other web server only the session a particular user is .. will get affected... not the whole websites... is this the case with node.js too or rather node.js stopps respoding to all the users and we have restart it ? [21:31] ag4ve: it's copied from the bcrypt example, so it should be good ok... [21:31] thetony: and relying soley on js* [21:31] hh__: it's the same thing in php [21:31] TheDahv: I like the idea of pushing the authenticate logic into the model [21:31] dilvie has joined the channel [21:31] Poetro has joined the channel [21:31] TheDahv: In a recent project I did, we had no passwords to store anywhere [21:32] ag4ve: yeah, i still do mvc without a framework [21:32] TheDahv: So all the authentication was done by 3rd party oauth modules [21:32] hh__: like if you missed a semi colon somewhere, it'll affect all your users [21:32] hh__: sure the process is still running but it's essentially down [21:32] ag4ve: the only thing i'm missing is a good function that loops through a directory and gives me variables with the same name as the files in that path. [21:32] perezd has joined the channel [21:33] TheDahv: The challenge was keeping the concerns separated. Having code dealing with persistence stuff living right next to code concerned with authentication stuff was hard to tease apart [21:33] ag4ve: then i don't have to require each model [21:33] hh__: and there are ways to ensure your node process starts back up in the event it goes down [21:33] zenista: thanks buddy any pointers or links for that [21:33] ag4ve: this isn't a problem yet (as i only have one model), but i think i am about to need a second [21:33] TheDahv: This is how I did it: https://github.com/TheDahv/BeerAndCode/blob/master/authentication.js [21:33] tlack has joined the channel [21:33] arnorhs has joined the channel [21:34] zenista: and do you suggest node.js to be production ready yet... or should i wait... are there any large websites underway on node.js yet? [21:34] tlack: is there a convention for objects that save/restore their state via json? my object is an inverted index (for searching) and im writing a .toJSON() method.. should the inverse be .fromJSON() (ie var ii = new InvertedIndex().fromJSON(str)) [21:34] jMCg: hh__: as front-end? [21:34] arnorhs: hh_: i would wait till around 2025 (jk) [21:34] TheDahv: zenista: for the second question, start by looking on the nodejs home page [21:35] hh__: instagr.am probably the largest site using node.js i know of [21:35] TheDahv: Microsoft, ebay, linkedin, yahoo [21:35] ag4ve: TheDahv: heh cool. bookmarked just in case i need reference for doing other types of auth :) [21:35] TheDahv: word [21:35] arnorhs: linkedin's mobile site runs on node [21:35] TheDahv: I think that when you download a project on github (as a zip file), it is a node process wrapping all that up and responding with your request [21:36] arduix: http://pastebin.com/MdycjXCt [21:36] TheDahv: Granted, I read that in a tweet or something [21:36] arduix: how to get provider_name? [21:36] TheDahv: ag4ve: What I really like about the way we did it is all authentication stuff is tucked away in that module [21:37] TheDahv: The routes themselves only know there is an "doAuthenticate" function in the module (I think that's what we called it) and it doesn't care how it works [21:37] tlack: arduix: x[0].provider_name, no? [21:37] TheDahv: So I can change auth libraries now and I don't have to make changes in app.js [21:37] tlack: TheDahv: i just joined, can you link me to the system you're talking about? auth is always my achilles heel [21:37] TheDahv: https://github.com/TheDahv/BeerAndCode/blob/master/authentication.js [21:38] arduix: thanks tlack [21:38] TheDahv: I run a programmer's meetup in Seattle and we made a site for it: http://seattle.beerandcode.org [21:38] tlack: i love seeing how other people structure their code! (since im a noob) [21:38] hh__: you pay for the beer? [21:38] flou has joined the channel [21:38] TheDahv: byob [21:38] hh__: LAME [21:38] TheDahv: Sometimes people think we're cool and provide beer or pizza [21:38] TheDahv: The Seattle ruby group gave us a keg once [21:38] hh__: see how real meet up groups do it [21:39] fomatin has joined the channel [21:39] ag4ve: TheDahv: yeah, generally auth is a controller, but..... [21:39] TheDahv: hh__: You'd be surprised by how unlame it is [21:39] hh__: i'm just messing with you [21:40] hh__: i'm nowhere near seattle :p [21:40] TheDahv: word [21:40] SiGe has joined the channel [21:40] ag4ve: but, because it's middleware and mongodb.... structures sorta change [21:40] TheDahv: Then you should start your own beer && code [21:40] caioketo: what database does node.js work with? [21:40] hh__: only the best kind [21:40] dilvie has joined the channel [21:40] ag4ve: hh__++ [21:41] flou has joined the channel [21:41] tlack: caioketo: there are adapters for everything it seems [21:41] tlack: caioketo: a lot of people use mongodb because of the mongoose npm but mysql and redis are common, etc.. [21:42] trepan has joined the channel [21:42] jacobolu_ has joined the channel [21:43] flou has joined the channel [21:44] tlack: TheDahv: is there a reason you do some of your configuration stuff (i.e. app.set()) in app.js instead of conf.js? or is it just thats how it wound up? [21:44] topfunky: in an express app, I'm setting up the socket.io server in its own file/module. Is it shady to set something like app.settings.socketIO for use elsewhere? [21:44] topfunky: or should I use a singleton or global or something? [21:45] topfunky: for the initialized socket server [21:45] TheDahv: tlack: mostly the latter [21:45] TheDahv: It's a moving project and we've got some refactoring to do [21:45] nibblebot has joined the channel [21:45] tlack: TheDahv: makes sense, things like that are what im still green about with node [21:45] michaelhartau has joined the channel [21:45] TheDahv: So, back when this project first started "the node way" was not really defined [21:46] TheDahv: For many aspects of application development, there still isn't a rubber-stamped way to do things [21:46] jacobolus has joined the channel [21:46] mattparo has joined the channel [21:46] topfunky: half of the libraries want app.js and the others want server.js [21:47] TheDahv: But when I started writing things, I think my "template for hooking up mongo to express" used a lot of app.set() [21:47] gzmask has joined the channel [21:47] arnorhs: i find that scary.. mostly because i don't know if the framework will introduce settings there that might collide with what i've done [21:47] arnorhs: imo [21:47] tlack: i think this is one of those things where im too concerned about style and should just focus on getting the job done, even if it means abusing app.set or w/e [21:48] TheDahv: topfunky: if you create your "app" variable without the var keyword, it becomes global and you can define things on it from other modules [21:48] TheDahv: tlack: yeah [21:48] AviMarcus has joined the channel [21:48] TheDahv: arnorhs: what is it specifically you find scary? [21:48] caioketo: mongodb is good database comparing to mysql ? [21:48] jgaui has joined the channel [21:48] tlack: you could also pass it into your socketio's init function and then do app.set in there [21:48] topfunky: TheDahv: ah, good point. Thanks [21:48] ag4ve: heh, i was thinking of using locomotive, but then i thought about and there's not really anything it adds (imo). [21:49] tlack: caioketo: they're very very different.. mysql is structured into tables and rows and columns, mongodb is more free form [21:49] topfunky: tlack: yeah, that's what I'm doing [21:49] topfunky: tlack: It just felt like app.settings should be configuration, not live objects and servers [21:49] topfunky: tlack: but maybe that's ok [21:49] RLa: caioketo, unless you need queries, http://howfuckedismydatabase.com/nosql/ [21:49] caioketo: whats the best for let me see, a game? [21:49] bshelton has left the channel [21:50] kbhit has joined the channel [21:50] SiGe: caioketo: doesn't really matter [21:50] ag4ve: for a game, i'd use postgres [21:50] tlack: caioketo: nosql databases are usually much faster at the expense of taking longer to write queries for (since you do it basically manually, compared to the simplicity and flexibility of sql) [21:51] hh__: for a game, i'd imagine whatever is low latency/fast writes? [21:51] RLa: it depends what kind of data you keep in it [21:51] ag4ve: mainly because i'm thinking that you could geo fense an object and wouldn't have to deal with colisions in code. [21:51] SiGe: hh__: worst, you implement a redis + sql, so again I believe it doesn't matter whic one you use. [21:52] thetony: tlack: do people not write sql manually anymore? [21:52] jacobolu_ has joined the channel [21:52] pgte has joined the channel [21:53] tlack: thetony: i meant at a higher level. for instance, with redis, you'd have to iterate over every 'person' to sum up their ages. with sql you would do select sum(age) from people [21:53] warz: tlack, that makes no sense. [21:53] SiGe: that's typically what I call a troll question : "whats the best for let me see, a game?" no offense caioketo [21:53] jryans has joined the channel [21:54] jetienne has left the channel [21:54] warz: i just see it as a question that tells me that the person asking has no idea what they're in for in regards to game dev. :p [21:54] mikedeboer has joined the channel [21:54] warz: and probably won't get to needing the database anyways. [21:55] Morkel has joined the channel [21:57] hh__: what's a good npm module for being a oauth provider? [21:59] madnightcoder has joined the channel [22:00] hh__: doh, searching oauth in npm isn't the same as searching oauth2 [22:00] stagas has joined the channel [22:05] trentm has joined the channel [22:07] trentm has joined the channel [22:07] jacobolus has joined the channel [22:08] elifou has joined the channel [22:09] rtgibbons has joined the channel [22:09] bodisiw has joined the channel [22:10] benvie has joined the channel [22:10] xicubed has joined the channel [22:10] brianseeders has joined the channel [22:13] mounibec has joined the channel [22:14] joshsmith has joined the channel [22:16] st_luke has joined the channel [22:16] _sri has joined the channel [22:16] garrensmith has joined the channel [22:17] kenperkins has joined the channel [22:17] dlmalloc has joined the channel [22:17] joshontheweb has joined the channel [22:17] nail_ has joined the channel [22:18] jMCg has joined the channel [22:18] jMCg has joined the channel [22:18] iamcorpix has joined the channel [22:19] flou_ has joined the channel [22:19] TheDahv: I haven't gotten a chance to play with it at home yet, but is the point of js-dom to be able to load a DOM into an object? [22:19] TheDahv: https://github.com/tmpvar/jsdom [22:19] TheDahv: I think I get what it's trying to do, but it's vague enough that I won't know for sure until I actually download it and try it out [22:19] TheDahv: Which I can't do at the moment [22:19] nathanielk: jsdom is awesome. [22:20] nathanielk: it allows you to do webscraping with jquery in node, for example [22:20] nathanielk: or unit test browser JS [22:20] nathanielk: i use it for both of those things, TheDahv [22:20] patcito has joined the channel [22:20] TheDahv: So I could point it at a site and get an object you can investigate in code? [22:20] TheDahv: Could I use it in conjunction with jasmine to load up a site and verify that certain things are true on the page? [22:21] nateps has joined the channel [22:21] enmand_ has joined the channel [22:21] TheDahv: So something like 1) load myapp.com/home 2) click on the sign in button 3) fill out the form 4) see if my name exists in the specified selector? [22:21] tilgovi has joined the channel [22:22] kevin_jax: CAN SOMEONE TEACH ME NODE - TUTOR, GUIDE ?? I AM NEW TO NODE - I CAN PAY YOU ON PAYPAL FOR YOUR TIME - SKYPE: ksakhuj [22:23] vereteran has joined the channel [22:23] RLa: kevin_jax, try this tutorial: http://www.nodebeginner.org/ [22:24] iamcorpix has joined the channel [22:24] RLa: when working in programming you should get used to reading tutorials and docs [22:24] atomicstack has joined the channel [22:24] thetony: and get used to rtfm answers :-) [22:24] TheDahv: And removing caps lock from your keyboard [22:26] ag4ve: ACTION wonders why keyboards still have that key :( [22:26] kevin_jax: I am learning , but it would be helpful if i can get help from folks who have deployed node in prod - things like logging, structuring app , look at my code for best practices [22:26] thetony: ag4ve: i use it all the time [22:26] kevin_jax: CAPS for used to get attention [22:26] ag4ve: caps used to piss off. [22:27] thetony: caps is helpful when naming technical objects in sap bw [22:27] TheDahv: caps to help people think you're related to the king of negeria and for to please move money into secure bank account [22:27] TheDahv: *nigeria [22:27] kevin_jax: thanks for all the love [22:27] thetony: TheDahv: i like the original [22:27] thetony: kevin_jax: post up your code, people will look at it [22:27] ag4ve: thetony: maybe there's a use case i don't have, but i bump it and and have to bs more than i am productive with it [22:29] dscape has joined the channel [22:29] tilgovi has joined the channel [22:30] Brunoz has joined the channel [22:30] TheDahv: Is nodebeginner like the node version of this? http://ruby.railstutorial.org/ [22:30] olegp has joined the channel [22:30] TheDahv: I think it would be hard to replicate since there are so many ways to do the same thing [22:31] tlack: how complete is jsdom? seems like such an impossible project [22:31] TheDahv: And rails has been around so long that popular projects emerge for certain patterns or even make it into the rails project itself [22:31] spolu has joined the channel [22:32] jetienne has joined the channel [22:32] flou_ has joined the channel [22:32] benvie: it seems like only yesterday when rails was the new thing [22:32] TheDahv: kevin_jax: This tutorial helped me a lot when I first started with node http://dailyjs.com/web-app.html [22:32] TheDahv: Not sure if it's still current [22:33] benvie: javascript was old by then but wasn't a thing [22:33] TheDahv: It's tough because node moves really fast [22:33] mike has joined the channel [22:33] d0ax has joined the channel [22:34] tommyvyo has joined the channel [22:34] benvie: mike mcoolin is a good name [22:34] wavded has joined the channel [22:34] mcoolin has left the channel [22:35] TheDahv: How do you guys test your applications that use socket.io? [22:35] TheDahv: and is nathanielk still in the channel? [22:35] TheDahv: errr...you people [22:35] mrb_bk has joined the channel [22:35] TheDahv: don't want to sound sexist these days [22:35] TheDahv: but even "you people" sounds wrong [22:35] TheDahv: ....SENTIENT BEINGS, how do you test your applications [22:35] magn3ts has joined the channel [22:36] Geminizer_ has joined the channel [22:36] topfunky: mocha [22:36] voodootikigod has joined the channel [22:36] topfunky: TheDahv: are you Mike? I'm in Seattle [22:36] topfunky: you're at substantial, right? [22:36] TheDahv: He goes by mikelovesrobots or bluetrust [22:36] CIA-19: node: 03Lal Jérémy 07master * ref046bf 10/ test/fixtures/keys/Makefile : test: generate 1024-bit keys, pacify openssl 1.0.1 - http://git.io/SNrO9Q [22:36] topfunky: oh, testing socket.io [22:36] topfunky: good question [22:36] topfunky: ok [22:37] TheDahv: So, no, I'm not Mike. I know him though [22:37] topfunky: I just wrote a demo app with a ton of tests, but none for socket.io [22:37] TheDahv: I'm actually "David" (pronounced "Dah-veed"), hence "TheDahv" [22:37] thetony: TheDahv: i'm guessing you're dave [22:37] topfunky: cool [22:37] TheDahv: Do you go to Beer && Code thought? [22:38] TheDahv: *though? [22:38] TheDahv: And is that test project published anywhere? [22:38] topfunky: I'm just finishing it up today, actually [22:38] dleary has joined the channel [22:38] topfunky: recording a video tutorial https://peepcode.com [22:39] topfunky: actually.... [22:39] TheDahv: Nice [22:39] topfunky: https://peepcode.com/system/uploads/2012/tmp/HotPie.zip [22:39] TheDahv: So...is there an rspec/capybara equivalent for node? [22:39] topfunky: may be a bit rough [22:39] topfunky: npm install [22:39] topfunky: npm test [22:39] topfunky: npm start [22:39] TheDahv: That's why I was asking about jsdom. I thought I might have to build it myself [22:39] BillyBreen has joined the channel [22:39] topfunky: I wrote a tiny assert.hasTag with libxmlqs [22:39] fcoury has joined the channel [22:39] topfunky: libxmljs [22:40] jocafa: yay! Mocha + PhantomJS unit testing now :D [22:40] TheDahv: It has 'xml' in the title. Is that an accident? [22:40] optixx has joined the channel [22:40] ziyadh has joined the channel [22:40] TheDahv: Ohh, somebody did say mocha earlier [22:40] TheDahv: You did... [22:40] jocafa: eh? [22:40] topfunky: I tried vows but I like the error messages in mocha better [22:40] topfunky: vows was often silent. [22:40] alejandromg: topfunky: so you are a pepcode guy! I really like your videos [22:40] topfunky: alejandromg: thanks! [22:41] topfunky: hope to publish a node/express one next week [22:41] strmpnk has joined the channel [22:41] topfunky: TheDahv: did you go to the Seattle Node.js meetup two days ago? It's a great group. [22:41] TheDahv: No, I've wanted to go. They came to Beer && Code once [22:41] jocafa: i tied into mocha's test runner events so that they do console.log()s, then i watch for those in my phantomjs script, which terminates with −1 if any tests fail, so that i can use it with CI [22:42] TheDahv: I've only got enough time to do meetups like once a week [22:42] mikeal has joined the channel [22:42] ted_ has joined the channel [22:42] TheDahv: Beer && Code is usually it since I help organize it [22:42] topfunky: makes sense [22:43] topfunky: we might fly in some big names to speak at the node.js meetup [22:43] TheDahv: That HotPie zip was empty when I downloaded it just now [22:43] TheDahv: oh snap. really? [22:43] topfunky: weird [22:43] TheDahv: Ok, maybe I want to go [22:43] topfunky: I just downloaded it on my windows box [22:43] madhums has joined the channel [22:43] TheDahv: Actually, would seattle node.js and beer && code be willing to team up? [22:43] TheDahv: I mean, our site is written in node and all :) [22:43] remysharp has joined the channel [22:43] take_cheeze has joined the channel [22:44] topfunky: probably. Talk to grant goodale or @kavla [22:44] benvie: node and beer bringing people together [22:44] TheDahv: I'll try the download again [22:44] heavysixer has joined the channel [22:44] Raynos has joined the channel [22:44] topfunky: actually, I just realized that app doesn't set up any data [22:45] topfunky: so it's probably not useful without instructions [22:45] topfunky: but you can run the tests [22:45] TheDahv: Oh, I think the problem was that Windows was mad about the encryption stuff on the folders and I didn't notice [22:45] topfunky: do you use node on windows? [22:46] topfunky: I'm trying now and ran into various problems. No Redis, no libxmljs [22:46] TheDahv: I do, but in a limited fashion [22:46] topfunky: express-namespace made weird regexes that it didn't like [22:46] TheDahv: I don't use npm on node [22:46] TheDahv: So that really makes things hard [22:46] topfunky: ok [22:46] topfunky: I could run a basic app but nothing fancy [22:46] TheDahv: But that's more a function of how my boss set up the network [22:46] ryanseddon has joined the channel [22:46] topfunky: express/socket.io [22:46] TheDahv: Rather than the fact that is on windows [22:47] TheDahv: I did get socket.io and express working though [22:47] TheDahv: Hehehe, it sounds disgusting, but I download the zips and all the dependencies by hand [22:47] topfunky: Yeah, I just wrote this for someone on Windows https://github.com/topfunky/demo-simplest-socket-io [22:47] TheDahv: Does npm use git to pull down dependencies? [22:47] topfunky: no, not git [22:47] benvie: it uses node only ;) [22:47] topfunky: npm seems to work well. It installed a bunch of stuff from package.json [22:47] TheDahv: Oh. Well poop [22:48] TheDahv: Maybe I should download a version of node with npm installed [22:48] topfunky: it was the other modules that had problems [22:48] benvie: it downloads tarballs from npm site [22:48] topfunky: I just used the Windows installer from nodejs.org [22:48] TheDahv: thanks for the hotpie code. I'll poke through that [22:48] benvie: I would recommend using the installer [22:48] blueadept` has joined the channel [22:48] benvie: and then using npm [22:48] TheDahv: Yeah [22:48] benvie: what's a bigger word than strong [22:48] TheDahv: I wrote a chat server for my coworkers. They were kind of spooked [22:49] benvie: I would infinitely recommend [22:49] thetony: bigger word than strong? [22:49] benvie: million recommend [22:49] ag4ve: so, i'm *still* trying to figure out how to connect a web browser to two different dnode or nowjs (don't really care). nowjs is pretty obvious - it connects wherever the file was included from. dnode seems to do the same but has a .connect which might work. [22:49] benvie: just do it [22:49] tlack: strongly advise? [22:49] benvie: but more than strong [22:49] benvie: like I'd punch you if you don't if I could [22:49] tlack: emphatically advise [22:50] ag4ve: however, my bigger issue is namespace in the browser - both of these export their DNode/now variables and don't seem to have a noconflict. [22:50] TheDahv: We use WatiN and NUnit to do browser automation tests at our company. It's SOOOO slow [22:50] benvie: http://bbenvie.com/img/htELH.jpg is a similar idea [22:50] flou has left the channel [22:50] benvie: I've prepared a thesis in repl. It consists entirely of punching you in the face [22:50] TheDahv: If I could write tests against an arbitrary site with a node process [22:50] TheDahv: I'd love to give that a shot [22:51] recur has joined the channel [22:52] ag4ve: so, i've got some ideas as to how to get around this (namely just using socket.io and have the browser run string.init() ) but i am hoping for an easier way? [22:52] ag4ve: (and a better way) [22:52] topfunky: TheDahv: I thought about that. My tests just use mikeal's request module. [22:52] topfunky: you could hit any URL [22:54] enmand has joined the channel [22:54] flou_ has joined the channel [22:55] TheDahv: So there are examples of that in hotpie? [22:55] skomski has joined the channel [22:55] mehale has joined the channel [22:55] topfunky: yeah, see test/apps/authentication-test.coffee [22:55] Geminizer_ has joined the channel [22:56] topfunky: there are some serious pyramids going on in some other spots in that code. [22:56] topfunky: I need to refactor instead of using 10 nested callbacks [22:56] topfunky: setting up test data [22:56] mikeal has joined the channel [22:57] chvid has joined the channel [22:58] TheDahv: Have you looked at the iced project? [22:58] iamcorpix has joined the channel [22:59] jaha has joined the channel [22:59] jaha has joined the channel [22:59] mehale: does this mean I have mongodb module installed correctly? http://pastebin.ca/2131229 [23:01] TheDahv: wait a minute. is mocha that different from jasmine? [23:01] limmy has joined the channel [23:01] TheDahv: wait...canadian pastebin? [23:01] _tors has joined the channel [23:02] mc: pastebin eh [23:02] TheDahv: One way to find out? 1) `node` 2) `var mongo = require('mongodb');` 3) see what happens [23:02] josh-k has joined the channel [23:03] tlack: iced's js output is pretty raunchy [23:03] redir has joined the channel [23:04] TheDahv: Wouldn't the handwritten equivalent be raunchy too? [23:04] tlack: well i dont think the handwritten equivalent would do as much magic.. node's 'async' module is pretty easy to read i think. but i do agree that it's hard to do it in an automated way without it being raunchy [23:05] tommyvyo has joined the channel [23:06] mehale: TheDahv: hmmmm it comes uundefined. any idea how to solve it? [23:06] cjm has joined the channel [23:06] TheDahv: Well, I guess I'm more surprised that it doesn't throw an error if it can't load the library [23:06] TheDahv: what does `ls node_modules` give you? [23:07] mehale: async bson mongodb node-static optimist socket.io [23:07] onar_ has joined the channel [23:07] andrewdeandrade has joined the channel [23:09] tokumine has joined the channel [23:09] devongovett has joined the channel [23:09] CoverSlide has joined the channel [23:10] TheDahv: weird [23:10] vdrab has joined the channel [23:10] mehale: weird... I got into node_modules/mongodb, ran make. now it is not undefined at node´s prompt [23:10] mehale: but it still undefined on my test script [23:11] TheDahv: http://pastebin.com/HLBd7XZT [23:11] TheDahv: What does that give you [23:11] brianthecoder has joined the channel [23:11] TheDahv: And I've always just used mongoose. Do you have a link to the project you're using? [23:11] _rockbot_ has joined the channel [23:12] mehale: just trying the write example on here... http://sett.ociweb.com/sett/settMar2012.html [23:12] yaymukund: it would be nice to write something like iced on top of an async library like Step [23:12] mehale: ah... is there a default path for modules?? strace shows node looks modules everywhere [23:12] yaymukund: that would make the JS output cleaner [23:13] mehale: should I put them at my app´s directory? [23:13] tlack: yaymukund: hmm.. [23:13] TheDahv: node looks in node_modules in your application directory first [23:13] TheDahv: And then on up the chain [23:14] mehale: ok, just added all modules locally! first time using it... sorry! [23:14] TheDahv: npm should just install things locally by default [23:14] TheDahv: My habit is to add an entry in my package.json file and then run npm install [23:15] tokka has joined the channel [23:15] TheDahv: I rarely install a library by name [23:15] mehale: hmmm nice [23:15] infynyxx has joined the channel [23:15] pgte has joined the channel [23:15] tlack: hmm but dont you distribute your node_modules dir when you send the code around? how often do you find yourself reinstalling the modules? [23:15] TheDahv: When was this thing written? [23:16] mehale: actually I am visiting node.js because I am in need of making a streaming web app [23:16] TheDahv: I don't understand your first question [23:16] rwaldron has joined the channel [23:16] c4milo has joined the channel [23:16] sigurding has joined the channel [23:16] mehale: having them locally installed makes it easier when moving around the code [23:16] TheDahv: moving around? [23:17] yaymukund: ACTION dances [23:18] jaha1 has joined the channel [23:18] tlack: TheDahv: it seems common for people to package up their node_modules folder when they're moving their stuff around (i.e., from test into production, or to a coworker, etc), even checking node_modules into their version control system [23:19] tlack: TheDahv: which at first was bizarre to me but now i really appreciate. are you not doing that? [23:19] TheDahv: Nah. I've read arguments on either side [23:19] TheDahv: The reason I don't is because I tend to focus on what makes deploying work [23:19] mehale: TheDahv: moving to another host [23:19] tlack: well i think its easier to deploy that way as well (one less thing to worry about) [23:19] TheDahv: Geez. There was an article about this recently too. Dependency management [23:20] redir_ has joined the channel [23:20] mehale: I am happy, node.js is so far what I could get closer from having an http stream working :) [23:20] TheDahv: http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/ [23:20] crutex has joined the channel [23:20] crutex has joined the channel [23:21] TheDahv: I feel like it also keeps the total size of your source control package smaller. [23:21] TheDahv: Pushing to heroku just involves pushing my code [23:21] ehazlett has joined the channel [23:21] TheDahv: Heroku takes care of pulling down dependencies for me [23:21] CIA-19: node: 03Shigeki Ohtsu 07master * re1199fa 10/ lib/tls.js : tls: fix CryptoStream.setKeepAlive() - http://git.io/rro28A [23:21] reid_ has joined the channel [23:22] tlack: yeah its definitely a tidier package that way, but still.. i wrote my software to work against a certain version of a module, which means it really is tied to my code; why pretend otherwise just cuz it was written by someone else? [23:23] bradleymeck has joined the channel [23:23] TheDahv: In what way does specifying the exact version for each dependency not achieve the same thing? [23:23] TheDahv: And, to be honest, I'm not really super tied to either method [23:23] tlack: i guess we have different priorities. i don't think the advantages of your approach are worth the extra effort. [23:23] TheDahv: I've just always done it the package.json way [23:24] tlack: fuck it, who cares. :p bigger fish to fry [23:24] TheDahv: And it's my habit by now [23:24] TheDahv: exactly [23:24] Andy1991 has joined the channel [23:24] perezd has joined the channel [23:25] Andy1991: Anyone know if there's a problem with nodejs mysql and remote connections? [23:25] Andy1991: Error: Access denied for user 'andy'@'client-86-25-163-246.mcr-bng-013.adsl.virg inmedia.com' (using password: NO) [23:25] Andy1991: I got that, but use same credentials with PHP and got in fine [23:25] tlack: you sure you are setting the pw correctly? seems like it didnt send one [23:26] mc: sure didn't [23:26] tonymilne has joined the channel [23:26] Andy1991: Granted select,insert to 'andy'@'%' [23:26] tlack: im talking about in your node.js code - when you specify the connection options [23:26] Andy1991: You would be right [23:26] tlack: dont paste it or you'll get surely get hacked [23:26] Andy1991: { pas : '*****' } [23:26] Andy1991: ffs :/ lol [23:26] tlack: ACTION saves the day [23:27] Andy1991: I'ma change my wrapper to account for that in future, thanks =D [23:27] tlack: i wonder if there's anyone out there whose password really is *****. like, literally asterisks. [23:28] yaymukund: mine is. that's my password [23:28] tlack: wire transfer in progress [ ###########... ] [23:28] yaymukund: :D [23:28] Andy1991: lol no-one would ever guess it [23:28] jryans has joined the channel [23:28] yaymukund: unless they saw you type it [23:29] tlack: it's too ironic, no one would ever believe it, even if they saw it. [23:29] yaymukund: my friends password used to be the first 15 digits of pi... he'd have to tilt the keyboard so we wouldn't see what he was typing. [23:30] diogogmt has joined the channel [23:30] Lorentz: all my passwords are different [23:30] Andy1991: Who knows pi to 15 digits :/ [23:30] whaley has joined the channel [23:30] tlack: Andy1991: the jr programmer here knows it to 40+ [23:30] tlack: Andy1991: he's a strange dude [23:31] mc: i was gonna say.. i had a math teacher that knew it to 50 [23:31] yaymukund: you're asking in an irc channel.. probably multiple people :) [23:31] yaymukund: I know a bunch [23:31] Andy1991: lol sounds like it [23:31] Andy1991: 3.147 [23:31] Andy1991: ? [23:31] Bonuspunkt: Math.PI [23:31] Andy1991: is that right? [23:31] Andy1991: lol [23:31] Bonuspunkt: 3.141592653589793 [23:32] kbhit has joined the channel [23:32] Andy1991: Exactly, we have google an, failing that, constants =D [23:32] Andy1991: Why learn it lol [23:32] yaymukund: to meet girls [23:32] yaymukund: I didn't think that one through [23:32] Andy1991: Oh, yeah, forgot about that one [23:32] Andy1991: fat girls yeah? [23:33] Andy1991: Only fat girls are interested in PI [23:33] tlack: haha [23:33] Andy1991: :P [23:34] tlack: thanks for all your help guys i'll bbl [23:34] limgad has joined the channel [23:35] Andy1991: Error: Access denied for user 'andy'@'%' to database 'fleet' at Function._packetToUserObject (C:\Users\Andy\Desktop\node\node_modules\mys ql\lib\client.js:387:11) [23:35] Andy1991: god damn :/ [23:35] Andy1991: it's correct now too [23:35] Andy1991: password : [23:36] CIA-19: node: 03Bryan Cantrill 07v0.6 * rd125591 10/ (2 files in 2 dirs): sunos: fix EMFILE on process.memoryUsage() - http://git.io/bf_73A [23:37] Andy1991: http://pastebin.com/U30T917F [23:38] Andy1991: Anyone see a problem? [23:39] CIA-19: node: 03isaacs 07v0.6 * r67f1778 10/ (126 files in 17 dirs): Upgrade npm to 1.1.12 - http://git.io/uLJeUA [23:39] cliffano has joined the channel [23:39] nibblebot has joined the channel [23:40] xicubed has left the channel [23:41] h4mz1d has joined the channel [23:43] kevin_jax has joined the channel [23:44] CIA-19: node: 03isaacs 07v0.6 * ra7cd76b 10/ (5 files): Remove unused fast-list module from npm - http://git.io/3dkQag [23:44] CIA-19: node: 03isaacs 07v0.6 * rd227084 10/ (5 files in 3 dirs): Upgrade libuv to 8409a67 - http://git.io/2FlajQ [23:44] benwtvr has joined the channel [23:45] TheDahv: Andy1991: unfortunately I can't tell enough just by looking at that code to say [23:46] Andy1991: I definately have select/update access 'andy'@'%', and with the same credentials I can connect fine in PHP [23:46] Andy1991: But not node :( [23:47] gde33 has joined the channel [23:47] brianthecoder has joined the channel [23:47] yaymukund: pi nerds come in all shapes and sizes, don't hate :x [23:49] Andy1991: lol [23:50] trotter has joined the channel [23:50] TheDahv: If I were you, I'd be writing options out to the console right before connecting to be sure you know what you're passing to mysql [23:51] TheDahv: just in terms of troubleshooting [23:51] Andy1991: I have [23:52] TheDahv: pl [23:52] TheDahv: ok [23:52] subbyyy has joined the channel [23:52] TheDahv: Did you delete the paste or something? [23:52] warz has joined the channel [23:52] subbyyy has joined the channel [23:52] Andy1991: I set it to ten mins expiration [23:52] dnyy has joined the channel [23:53] Andy1991: will make a new one [23:53] Andy1991: http://pastebin.com/Nip3eUXN [23:53] limgad has joined the channel [23:54] mullr has joined the channel [23:54] thetony: Andy1991: what is the error? [23:54] Andy1991: Error: Access denied for user 'andy'@'%' to database 'fleet' at Function._packetToUserObject (C:\Users\Andy\Desktop\node\node_modules\mys ql\lib\client.js:387:11) [23:55] Andy1991: How do I remove an element from an object, key and all [23:55] thetony: that just looks like a db permissions issue, not trouble connecting - though it works in php? [23:55] thetony: delete [23:55] Andy1991: Yeah fine in php [23:55] Andy1991: thanks [23:56] Andy1991: nah, wasn't what I thought [23:56] Andy1991: omfg [23:57] Andy1991: I granted select, insert [23:57] Andy1991: client.query('CREATE DATABASE '+ database, function(err) { [23:57] Andy1991: duhhhhhhhhhhhh [23:57] dylang has joined the channel [23:57] Knowledge has joined the channel [23:57] Andy1991: sorry guys [23:57] Andy1991: thanks [23:57] TheDahv: o___o [23:57] thetony: lol [23:59] Andy1991: Is there a permission denied constant in mysql? [23:59] TheDahv: Ok, so here's a random one. If an application using socket.io is working fine in my dev environment on my local network [23:59] lazyshot has joined the channel [23:59] TheDahv: But breaks with 500 errors and tears down my app on heroku [23:59] TheDahv: Other than logs, can you think of any reason something like that would happen?