[00:00] phluffy has joined the channel [00:00] phluffy has joined the channel [00:00] HardFu: isaacs, can I PM for a moment? [00:00] Vespakoen: i checked all the video's but no title "told" me it would be about that subject [00:00] isaacs: sure [00:00] remysharp: isaacs: sorry - will that work with the `-g` option too? [00:01] blup has joined the channel [00:01] remysharp: (it's a util I'm testing) [00:01] Vespakoen: http://css-tricks.com/dynamic-page-replacing-content/ [00:02] zeade has joined the channel [00:02] firebalrog: thats the one [00:02] isaacs: remysharp: yes [00:02] firebalrog: interesting and good use of hashes demonstrated in that [00:03] insin: Uh, I wonder if that's a know issue - my test page uses the History API. Navigating on it crashed firefox. Disabled Sync and the problem went away [00:03] insin: s/know/known/ [00:03] dec has joined the channel [00:03] Vespakoen: i dont see any downsides ? [00:03] Juan77 has joined the channel [00:03] larsschenk has joined the channel [00:03] larsschenk has left the channel [00:03] mark_azevedo has joined the channel [00:04] Vespakoen: just the edgecase of a screenreader that doesnt have javascript, in that case i would say, buy a new screenreader or fuck-off =D [00:04] sechrist: crashing browser == bad [00:04] Vespakoen: for google + mobile, you probably can know that from the request headers, and display them a html page [00:04] tmcw has joined the channel [00:04] Vespakoen: the screenreaders even, maybe [00:05] Vespakoen: sechrist, you think it's to much load ? [00:06] insin: Vespakoen: you cold serve the static version by default and enhance it on load [00:06] larsschenk has joined the channel [00:06] subbyyy has joined the channel [00:07] larsschenk has left the channel [00:07] Vespakoen: i am thinking, most people have javascript enabled, for google & mobile, we serve them HTML, so for all the others, if we have JS meaning we can bring the load down by using some templating engine and render it client side, thats a win [00:07] Vespakoen: for our server load =) [00:07] Vespakoen: and coding efficiency ofcourse =P [00:07] insin: have you looked at the likes od janso and Derby.js [00:07] insin: ? [00:08] socketio\test\02 has joined the channel [00:08] Vespakoen: but indeed, you could make this "i want everybody to be able to load the page" version, always serve HTML and then attach JS to that [00:08] Vespakoen: will do right now [00:08] hipsters_ has joined the channel [00:08] insin: compiling templates and sharing them with the client [00:08] pquerna: discussing open source licenses on twitter is almost a better use of time than discussing them in person! [00:09] slloyd_air has joined the channel [00:09] theCole has joined the channel [00:09] jesusabdullah: wtfpl 4 lyfe (wtfpl4l) [00:09] socketio\test\72 has joined the channel [00:09] insin: hmm, Chrome fires an onpopsate on page load but Firefox doesn't. The History api is inconsistent even where available, eh? [00:09] TheFuzzball_iOS has joined the channel [00:10] maxogden: Tumbolia Public License FTW [00:10] Vespakoen: Yes! thats what i am looking fore [00:10] Vespakoen: more of that please =D [00:10] maxogden: http://davispj.com/2010/02/19/agpl-not-awesome-gpl.html [00:10] jesusabdullah: what is a tpl? [00:10] maxogden: jesusabdullah: 0. opan saurce LOL [00:10] spleeze has joined the channel [00:10] Vespakoen: i cant find janso though, do you have a linnk for me ? [00:11] nicholasf: how can I copy a directory into another dir ? [00:11] insin: Vespakoen: you'll love this: http://blog.nodejitsu.com/scaling-isomorphic-javascript-code (note: the Nodejitsu guys haven't built the entire thing they describe a pattern for yet, to my knowledge) [00:11] insin: ACTION eyes jesusabdullah  [00:11] jesusabdullah: maxogden: That is also a pretty boss license [00:11] insin: Kanso [00:11] insin: http://kan.so/ [00:12] ovnicraft has joined the channel [00:12] djQuery has joined the channel [00:12] insin: my typing is all off tonight :/ [00:12] zitchdog has joined the channel [00:12] jesusabdullah: There are a lot of parts but I'm not aware of an actual implementation of that pattern using said parts. That said, most of my flatiron experience is actually with its cli plugin. [00:13] jesusabdullah: So, I mean [00:13] djQuery: any editor that has syntax highlighting that works for node? ie var http require('http'); http.......... in node.js? [10:34] lperrin has joined the channel [10:34] dannyamey has joined the channel [10:35] derpeter has left the channel [10:36] fantastkibne: no one knows? [10:36] fantastkibne: just want to execte pause command on win32 for script waits an user key press for exit [10:36] amasad has joined the channel [10:41] wink__ has joined the channel [10:42] fly-away has joined the channel [10:45] real_mjr has joined the channel [10:47] maritz has joined the channel [10:49] wink_ has joined the channel [10:49] panterax has joined the channel [10:50] madhums has joined the channel [10:52] lowerkey has joined the channel [10:53] lowerkey: Greetings, one and all. [10:53] lowerkey: When creating a hasOne association in sequelize, does the sync() call come after the define and before the hasOne or after the hasOne? [10:54] hackband has joined the channel [10:54] Pilate has joined the channel [10:54] crodas has joined the channel [10:55] Xenadi has joined the channel [10:55] maru_cc has joined the channel [10:58] Xenadi: hi guys, im new to node. Has anyone had any issues with sockets on windows 7 x64? [10:58] wink__ has joined the channel [10:59] rio{ has joined the channel [10:59] Juan77 has joined the channel [11:00] sindresorhus has joined the channel [11:01] jldbasa has joined the channel [11:01] andree has joined the channel [11:02] pickels_ has joined the channel [11:03] _unary has joined the channel [11:03] mc_greeny1 has joined the channel [11:03] te-brian has joined the channel [11:04] maru_cc has joined the channel [11:04] wink_ has joined the channel [11:05] mike5w3c has joined the channel [11:06] socketio\test\69 has joined the channel [11:07] socketio\test\17 has joined the channel [11:08] real_mjr has joined the channel [11:09] satyr has joined the channel [11:10] mehlah has joined the channel [11:10] d0k has joined the channel [11:11] wink__ has joined the channel [11:13] dob_ has joined the channel [11:14] vguerra has joined the channel [11:14] michaelhartau has joined the channel [11:15] fbang has left the channel [11:17] wink_ has joined the channel [11:18] robde has joined the channel [11:20] __doc__ has joined the channel [11:21] LeMike has joined the channel [11:26] wink__ has joined the channel [11:26] rio{{ has joined the channel [11:30] zarex has joined the channel [11:30] robi42 has joined the channel [11:31] wink_ has joined the channel [11:32] Carmivore has joined the channel [11:35] thalll has joined the channel [11:36] tomasztomczyk has joined the channel [11:36] wink__ has joined the channel [11:37] zarex has joined the channel [11:40] zarex has joined the channel [11:42] zarex has joined the channel [11:43] herbySk has joined the channel [11:43] zarex has joined the channel [11:43] sechrist has joined the channel [11:44] wink_ has joined the channel [11:47] shinuza has joined the channel [11:47] jaw187 has joined the channel [11:47] secoif has joined the channel [11:50] dob__ has joined the channel [11:50] herbySk74 has joined the channel [11:51] pgherveou has joined the channel [11:53] pgherveou: Hello guys, I need to send emails to my users from my express.js app any lib to advice to do the work ? [11:53] satyr has joined the channel [11:55] arcanis has joined the channel [11:56] dob_ has joined the channel [11:56] janne has joined the channel [11:58] djazz has joined the channel [11:58] Cromulent has joined the channel [11:58] djazz has left the channel [11:59] robi42 has joined the channel [11:59] djazz has joined the channel [12:00] djazz: node.js crashes on this code: process.on('SIGINT', function () {}); [12:00] djazz: 0.6.7 [12:00] djazz: on windows [12:02] wink__ has joined the channel [12:03] tytsim has joined the channel [12:03] djazz: how can i emit an event when the node.js server closes? [12:04] djazz: when pressing Ctrl+C for example [12:05] dharmesh has joined the channel [12:05] rio{ has joined the channel [12:05] secoif has joined the channel [12:05] Hanspolo has joined the channel [12:06] pgherveou: djazz try process.on 'SIGINT', ... [12:06] zarex has joined the channel [12:08] djazz: pgherveou: I did but node crashes when i try to hook that event [12:08] djazz: (13:00:26) djazz: node.js crashes on this code: process.on('SIGINT', function () {}); [12:08] aheckmann has joined the channel [12:09] anoop has joined the channel [12:09] anoop: hi [12:09] anoop: i m working on node js [12:09] anoop: can anyone help me [12:09] enmand has joined the channel [12:09] Puj33: anoop, what's your question? [12:10] djazz: pgherveou: Error: No such module [12:10] Puj33: Which module? [12:10] djazz: thats the error [12:11] djazz: "at EventEmitter. (node.js:386:27)" [12:11] Puj33: Maybe you need util? [12:11] Puj33: Nej, jk [12:11] anoop: puj: im using railwayJS MVC structure [12:11] anoop: what is the way to do form validations in it [12:12] djazz: Puj33: can you confirm it? [12:13] djazz: node [12:13] djazz: > process.on('SIGINT', function () {}); [12:13] djazz: ^C [12:14] anoop: Im using railwayJS MVC structure . what is the way to do form validations in it?should i be using any module or is there any built in methods? [12:14] djazz: it works fine on linux [12:14] teadict: how is RailwayJS working out for you? [12:15] teadict: anoop: ^ [12:17] Puj33: djazz, for windows, maybe process.on('CTRL_CLOSE_EVENT', function () {}); [12:17] cjroebuck has joined the channel [12:17] djazz: Puj33: nope [12:18] djazz: atleast it dont crash [12:18] Puj33: Hehe [12:18] Puj33: SIGINT isn't supported on Windows it seems.. [12:18] djazz: POSIX... [12:18] andrew12: try ctrl z [12:18] davetayls has joined the channel [12:18] andrew12: assuming you're in a cmd window [12:19] andrew12: er, no... hm [12:19] Puj33: How did you install Node, djazz_ [12:19] Puj33: ? [12:19] djazz: Puj33: node.exe downloaded [12:20] Puj33: What version do you have? [12:20] djazz: 0.6.7 [12:20] djazz: https://github.com/joyent/node/issues/1553 [12:20] andrew12: you dont use an installer? [12:20] djazz: it didnt work [12:20] djazz: froze [12:20] andrew12: hm [12:21] djazz: how does the node.js javascript "console" do it? [12:21] djazz: when you press Ctrl+C it asks for it [12:21] djazz: if u want to close [12:21] louissmit has joined the channel [12:22] adrianF has joined the channel [12:23] maritz: djazz: i'd think that's handled by the binary/C [12:23] mike5w3c has joined the channel [12:23] Puj33: CTRL_C_EVENT ? [12:24] wink_ has joined the channel [12:24] djazz: tried CTRL_C_EVENT [12:24] djazz: did not work [12:24] Puj33: Bummer [12:24] djazz: also, tried pressing Ctrl+Break/Pause [12:24] djazz: writes a ^C [12:24] djazz: and closes [12:24] djazz: same as Ctrl+C [12:25] hackband has joined the channel [12:25] Puj33: djazz, Have you tried binding both the _C_ and _CLOSE_ and then used kill() to see what happenes? [12:26] teadict: "to see what happens" [12:26] teadict: that never sounds right [12:26] djazz: havent tried kill() [12:26] Puj33: Well, I'll admit I'm a noob, and we can just move on, how about that? (= [12:27] tytsim_ has joined the channel [12:27] Puj33: djazz, maybe give that a shot and see what triggers each one [12:27] djazz: process.kill(); => Error: kill ESRCH [12:28] djazz: :S [12:28] Puj33: Sorry.. I meant the commandline kill [12:28] Puj33: kill -2 [12:29] andrew12: pkill in windows iirc [12:29] Puj33: POSIX [12:29] booo has joined the channel [12:30] TomY has joined the channel [12:30] MrTopf has joined the channel [12:31] lz has joined the channel [12:31] gut4 has joined the channel [12:31] utaal has joined the channel [12:31] andrew12: windows isnt posix [12:31] zarex has joined the channel [12:32] andrew12: last i checked [12:32] djazz: process.kill(process.pid, 'CTRL_C_EVENT'); <-- dont work [12:32] djazz: i have a listener [12:33] Puj33: I know andrew12, cygwin... [12:33] Puj33: God I suck [12:34] Puj33: What about _CLOSE_ djazz? [12:34] tomlion has joined the channel [12:34] djazz: CTRL_CLOSE_EVENT? [12:34] Puj33: Aye [12:34] lz: anyone know a simple one line http request module? [12:34] arcanis has joined the channel [12:34] djazz: Error: Unknown signal: CTRL_CLOSE_EVENT [12:35] djazz: Error: Unknown signal: CTRL_BREAK_EVENT [12:36] anoop has left the channel [12:39] chot: hi [12:39] Vespakoen has joined the channel [12:39] JJMalina has joined the channel [12:40] chot: i'm trying to find a json query library, similar to what LINQ does in .net, but I can't seem to find anything. anybody here know if there's anything like that available? [12:40] jomoho has joined the channel [12:41] npa has joined the channel [12:41] wink_ has joined the channel [12:44] `3rdEden has joined the channel [12:44] chot: hm.. hehe, realizing that array.map and select should be what I'm looking for.. no wonder there's no lib [12:45] maritz: json query? like doing a query to an url and receiving json? [12:45] maritz: or searching through values in an object? [12:46] chot: no searching thourgh value in an object [12:46] satyr has joined the channel [12:47] chot: but map and filter should probably be fine, it's just a flat array anyway [12:47] k1ttty has joined the channel [12:47] wink_ has joined the channel [12:48] DarkGrey has joined the channel [12:49] Vespakoen has joined the channel [12:51] AAA_awright has joined the channel [12:53] lzskiss has joined the channel [12:53] westc has joined the channel [12:55] nmtmason has joined the channel [12:55] __doc__ has joined the channel [12:56] scott_gonzalez has joined the channel [12:57] yawNO has joined the channel [12:58] wink_ has joined the channel [12:58] shinuza has joined the channel [12:58] joshfinnie has joined the channel [12:59] mape has joined the channel [13:01] lzskiss has joined the channel [13:01] zarex has joined the channel [13:02] firebalrog has joined the channel [13:03] ccare has joined the channel [13:05] satyr has joined the channel [13:05] amasad has joined the channel [13:05] cosmincx has joined the channel [13:05] robhawkes has joined the channel [13:08] robde has joined the channel [13:10] EuroNerd has joined the channel [13:12] enmand has joined the channel [13:13] pickels_ has joined the channel [13:14] Juan77 has joined the channel [13:14] redir has joined the channel [13:14] icebox has joined the channel [13:15] EuroNerd: I'm a node.js newbie and I've just installed it on Ubuntu Desktop in a VM and am playing with some 'hello world' stuff. Should I also install some general web server, like Apache or Nginx? Or should node.js be run alone? [13:15] icebox: EuroNerd: you may run node alone [13:17] EuroNerd: Assuming I'll write a little web app and will want to expose it to the web (from my laptop or a VPS), should I then have apache/nginx sitting between node.js and the outside world? [13:18] geoKe has joined the channel [13:18] icebox: EuroNerd: in production you should [13:20] Joe-Joe has joined the channel [13:21] EuroNerd: I've also discovered I can't (or shouldn't, anyway) expose node.js on port 80. Is that because port 80 should be handled by an apache/nginx web server, or is it simply about redirecting traffic from 80 to whatever it's running on internally? [13:21] robi42 has joined the channel [13:22] k1ttty_ has joined the channel [13:23] level09 has joined the channel [13:23] rio{: maybe you have something running there already? [13:23] rio{: like an apache server [13:24] EuroNerd: me? I don't think so, it's Ubuntu Desktop [13:24] gut4 has joined the channel [13:24] fangel has joined the channel [13:25] wink_ has joined the channel [13:25] akihito_s has joined the channel [13:25] EuroNerd: i probably could attach node to port 80 simply by running it with sudo [13:25] EuroNerd: but i've seen plenty of advice against it [13:25] zarex has joined the channel [13:26] EuroNerd: so i just wonder what is the "right" way to do it, with as little hassle as possible [13:27] fangel has joined the channel [13:28] EuroNerd: well, i guess it's a bad hour to come here ;) i'll be back in a couple of hours to pesk you people ;) [13:28] zomg: use sudo, then set the uid to not-sudo once you're done [13:28] zomg: iirc someone said to do something like that [13:28] zomg: not sure tho :P [13:29] zomg: o btw Skype runs on port 80 by default... [13:29] zomg: or it reserves it anyway [13:30] EuroNerd: hmmm, ok but what's the "proper" way to set up node so that I can access it normally (i.e. thru 80) from the outside? [13:30] Swizec has joined the channel [13:30] EuroNerd: do people install nginx/apache or run node.js alone? [13:31] lz has joined the channel [13:31] shinuza has joined the channel [13:31] EuroNerd: Let's assume here that in incoming days i'll write a small web app in node.js and will put it up on a VPS for private use (and maybe for a few friends). [13:32] sechrist has joined the channel [13:32] aesptux has joined the channel [13:32] EuroNerd: How do I set it up, so that i runs "normally" for visiting borwsers (i.e. on port 80 etc.)? should I use nginx/apache then? [13:32] cmr: EuroNerd: A reverse proxy isn't a bad idea, but I personally just open the firewall and have node listen on that port. [13:33] EuroNerd: reverse proxy sounds complicated, i'm a newbie and want everything the easiest and most standard way [13:33] EuroNerd: :) [13:33] cmr: Reverse proxy is simple, it'd be what you'd do with nginx or apache (with mod_proxy) [13:33] jetienne_ has joined the channel [13:33] jetienne_ has left the channel [13:34] cmr: A "normal" proxy is you connecting to a server etc for anonymity or what have you, and it forward your requests. [13:34] jaw187 has joined the channel [13:34] cmr: A reverse proxy would be nginx sitting on the public ports and redirecting things to internal stuff. [13:34] EuroNerd: well, i know what a normal proxy is, i'm not that newbiesh ;) i'm just new to linux servers and node. [13:35] EuroNerd: cmr, do you run node.js on a VPS (or otherwise remote server) ? [13:36] cmr: EuroNerd: yep, though not professionally, I'm just a hobbyist :) [13:36] TheJH has joined the channel [13:36] maritz: EuroNerd: are you creating a public-facing app or doing private development? [13:37] maritz: cmr: the lucky bastards who get paid to write node.js are very few still :( [13:37] piscisaureus_ has joined the channel [13:37] EuroNerd: maritz, yes, because i'll be using the app i'm building almost from the start and need it accessible from the web [13:37] RLa: i might be one soon :) [13:37] maritz: in the > 2 years i'm following node.js i've written 20 lines of node.js code for payment :D [13:37] RLa: considering node for new project [13:38] RLa: it might need c++ linkage to existing app, so it would be perfect [13:38] maritz: EuroNerd: answering on an "or" question with yes? PARSE ERROR [13:38] erichynds has joined the channel [13:38] EuroNerd: maritz: yeah, sorry didn't notice the "OR" keyword :) [13:38] maritz: EuroNerd: you could just use a different port if it's just you who uses it. that's what I do. (because i have stuff on port80 and am too lazy to set up subdomains) [13:39] EuroNerd: maritz: it'll be public facing (i.e. on a VPS, theoretically accessible to anyone), but I will be the only user for foreseeable future. [13:40] cmr: EuroNerd: What is your question again? [13:40] maritz: then use a free port >1024 [13:40] maritz: :3000 seems standard for express apps for example :) [13:40] jaw187: use mod-rewite if you' [13:40] jaw187: if you're using apache [13:40] maritz: i use 3000-3020, didn't collide yet with anything. [13:41] qsobad has joined the channel [13:41] EuroNerd: cmr: my question really is what do I need for a simple node.js setup, and do I need a web server (nginx/apache) in particular. [13:41] djazz has left the channel [13:41] cmr: EuroNerd: No, you do not need a web server. [13:42] cmr: Node itself can stand independent. [13:42] EuroNerd: maritz: I'd prefer it to be rather accessible, I might want to catch a few early users, you never know ;) [13:42] deoxxa: anyone successfully interfacing with git via node? [13:42] EuroNerd: maritz: and also it'll be more comfortable for me to use port 80 (i.e. not complicate things when using in the browser) [13:43] deoxxa: i've just tried out a few git libraries and they all seem to be broken in some way or another [13:43] cmr: EuroNerd: But if you're setting it up on a server that you'd want to use for other things, a reverse proxy (or mod_rewrite, mod_proxy, whatever else), a web server would be useful [13:43] neurodrone has joined the channel [13:43] deoxxa: cmr: the lucky bastards who get paid to write node.js are very few still [13:44] deoxxa: ha, hello [13:44] EuroNerd: cmr: yeah, it's almost certain I'll set up some other stuff on that VPS. (E.g. almost certainly a VPN server.) [13:44] deoxxa: i'm one of those lucky bastards :( [13:44] CIA-101: node: 03Ben Noordhuis 07v0.6 * r465e22e 10/ doc/api/vm.markdown : docs: clarify filename argument of vm.* functions - http://git.io/80dyvQ [13:45] jetienne_ has joined the channel [13:46] subhaze has joined the channel [13:47] Margle has joined the channel [13:48] ovaillancourt has joined the channel [13:48] wink__ has joined the channel [13:49] maritz: EuroNerd: using port :3000 for yourself is not complicated at all. and changing it later to port 80 and putting a reverse proxy in front of it or using the proper sudo methodology is easily added. especially if you're new to node, i wouldn't recommend sticking with such "admin" problems early on. [13:49] Industrial: deoxxa: same :E [13:51] EuroNerd: maritz: sure, adding :3000 at the end of a web address is not rocket science. ;) But i'd like it to run the "default" way out of the box. So, if I undestand correctly, I should go the reverse proxy way? [13:52] k1ttty has joined the channel [13:53] tmcw has joined the channel [13:53] cmr: EuroNerd: Sure [13:53] EuroNerd: BTW, as I think about it now, most VPSes have preinstalled server editions of Ubuntu (which i'll probably use) so probably it'll have Apache already, right? [13:53] cmr: EuroNerd: Hopefully not [13:54] EuroNerd: lol [13:54] cmr: Ubuntu Server is fairly minimal. [13:54] cmr: It shouldn't come with much preinstalled, and especially not apache [13:54] EuroNerd: that's interesting, i thought it'd have the whole LAMP circus preinstalled, but if not, maybe it's for the better :) [13:54] sriley: its fairly simple to set up nginx infront of node... and if you want websockets then to also set haproxy up infront of that [13:55] AndreasMadsen has joined the channel [13:55] Vertice: i kind of want a chrome extension that monitors all the web services i run and provides links to them [13:56] sriley: with a vps is a what you need, you install. not everyone would want a lamp stack, if you go with someone like linode then they have recipes that you can just install that has a lamp stack etc [13:56] Vertice: the ones locally that is [13:56] real_mjr has joined the channel [13:57] RLa: EuroNerd, using debian on linode [13:57] RLa: i'm not sure why would you want ubuntu [13:58] EuroNerd: RLa: well, i'm a total newb to linux and am at least a bit familiar with ubuntu desktop ;) [13:58] plutoniix has joined the channel [13:58] rolf has joined the channel [13:58] lazyshot has joined the channel [13:59] cmr: EuroNerd: Ubuntu is based off of debian and doesn't add much in terms of administration, you'd feel right at home [13:59] rolf: hi all [13:59] maritz: EuroNerd: just to be clear, you won't have a desktop on a vps. [13:59] bkaney has joined the channel [13:59] deoxxa: or at least, you shouldn't [13:59] EuroNerd: maritz, yeah, i realize that and find it very sad :) [14:00] maritz: well, actually you could install gnome/kde/xdce/... but you should absolutely not. [14:00] sriley: well depends on what you want the vps for [14:00] EuroNerd: don't worry, i won't ;) [14:00] RLa: yeah, maybe someone want desktop on vps [14:00] CrabDude has joined the channel [14:00] RLa: that, however, might be quite nice idea [14:00] maritz: sriley: it'd be a waste of resources in 99% of usecases, i guess. [14:01] maritz: most vps have very limited ram/cpu [14:01] sriley: if you want a desktop that you can remote desktop to from anywhere then why not. but yes if you want a web host etc then yes installing a desktop would be pointless [14:01] lduros has joined the channel [14:02] kriszyp has joined the channel [14:02] EuroNerd: yeah, resource constraints will prevent me from any silly ideas like that, since i'll probably pick the cheapest VPS for now - since i'm just learning and i'm the only user of my inventions ;) [14:02] maritz: sriley: but if you really want a remote desktop, then why not use a dedicated or even just a home box? i'd imagine a desktop running on a measly vps to be a pain. (and if you're going to argue for a super mega hyper vps, then why not take a dedicated server in the first place? :P ) [14:02] cangeceiro has joined the channel [14:02] cmr: EuroNerd: Amazon will give you a microinstance free for a year if you use ec2 [14:03] cryptix: can somebody tell me how to pass build options to libuv? [14:03] sgimeno has joined the channel [14:04] mmalecki: cryptix: #libuv [14:04] EuroNerd: cmr, that's interesting... won't I need to provide a credit card anyway? [14:04] vkareh has joined the channel [14:05] criswell has joined the channel [14:05] RLa: maybe you can use virtual card if you are afraid to use real one in those cheap places [14:05] cmr: EuroNerd: Or paypal, but they don't charge it (unless you go over your resource limits, which are rather generous for most usecases and you probably won't even accumulate a buck or two) [14:05] fermion has joined the channel [14:05] RLa: ah, ec2 [14:06] EuroNerd: cmr, paypal would be nice, i've already have an account there [14:06] EuroNerd: jeez, sorry for those grammar mistakes ;) [14:08] qsobad_ has joined the channel [14:09] cesconix has joined the channel [14:09] AaronMT has joined the channel [14:10] brianloveswords has joined the channel [14:10] stefpb has joined the channel [14:11] Cromulent has joined the channel [14:11] kyonsalt has joined the channel [14:12] CIA-101: node: 03Nathan Rajlich 07master * r9ff86a2 10/ node.gyp : [14:12] CIA-101: node: build: set `process.platform` to "darwin" on OS X [14:12] CIA-101: node: This is consistent with the old waf build system, and doesn't break old scripts [14:12] CIA-101: node: that are expecting the value to be "darwin". [14:12] CIA-101: node: Fixes #2518. - http://git.io/0fAYZA [14:12] CIA-101: node: 03Nathan Rajlich 07master * rf2ba4ce 10/ node.gyp : [14:12] CIA-101: node: build: remove the old -DPLATFORM="mac" define [14:12] CIA-101: node: To prevent redefinition warnings. - http://git.io/xlY9SQ [14:13] anubhaw_ has joined the channel [14:16] mc_greeny has joined the channel [14:16] zarex has joined the channel [14:17] fumanchu182 has joined the channel [14:17] fumanchu182 has joined the channel [14:17] jakehow has joined the channel [14:20] Venom_X has joined the channel [14:21] fairwinds has joined the channel [14:22] thinkjson has joined the channel [14:22] thinkjson: dscape: ping [14:22] wink_ has joined the channel [14:23] jmar777 has joined the channel [14:24] k1ttty has joined the channel [14:24] davidsklar has joined the channel [14:28] thinkjson: dscape: never mind. figured it out. nano probably needs better reporting when it can't connect to the database. [14:28] carlyle has joined the channel [14:29] mandric has joined the channel [14:29] tcurdt has left the channel [14:30] janne has joined the channel [14:31] urlisse has joined the channel [14:33] pauls1 has joined the channel [14:34] voodootikigod has joined the channel [14:35] hij1nx has joined the channel [14:36] jnbek has joined the channel [14:36] dscape: thinkjson: hey [14:36] dscape: thinkjson: that is actually nodejs [14:37] dscape: socket error right? [14:37] dscape: in nano I modify errors a bit [14:37] dscape: https://github.com/dscape/nano/blob/master/error.js#L96 [14:38] dscape: so if it's a non 200 response from CouchDB you get a err.scope === 'couch' [14:38] dscape: else you will get socket, or uncaught exception [14:38] thinkjson: dscape: I received no error. I just found that the .use method was unavailable, which confused the crap out of me. [14:38] dscape: not being able to connect is socket [14:38] dscape: thinkjson: gist me [14:38] ryanfitz has joined the channel [14:38] dscape: so I can reason/fix it [14:38] dscape: also we are always open for pull requests :) [14:38] thinkjson: require('nano')(url) returned an object without a use method [14:39] thinkjson: that's not beyond the realm of possibility [14:39] Morkel has joined the channel [14:39] dscape: yes thinkjson [14:39] thinkjson: we're using it in production on four telemetry nodes with 100GB of data/month [14:39] dscape: require('nano')('http://somecouch.com') [14:39] thinkjson: I think we could throw a pull request your way [14:39] dscape: returns a nano object [14:39] dscape: but require('nano')('http://somecouch.com/somedb') [14:39] dscape: returns a db object [14:39] dscape: so you dont need to do use [14:40] dscape: cause you already selected the db [14:40] dscape: :) [14:40] thinkjson: yeah - no db was present. the password was wrong. [14:40] dscape: jchris asked me for this feature [14:40] robi42_ has joined the channel [14:40] dscape: thinkjson: what did you get as a en error? [14:40] dscape: and what would you expect to get? [14:40] dscape: also since you guys are heavy users of nano how important would it be for me to make it work in the browser? [14:41] dscape: (honestly the large chunk of the work is to put tests in mocha and make sure things work) [14:41] thinkjson: dscape: no error was thrown. I would expect one. [14:41] thinkjson: and we don't use it in the browser. just Node.js [14:42] dscape: oh I see [14:42] dscape: thinkjson: the error is in the console [14:42] dscape: this is deliberate [14:43] dscape: while node doesnt have / what did we call them? [14:43] dscape: isolates? [14:43] dscape: I thought it would be better not to throw exceptions in nano [14:43] thinkjson: dscape: no error was thrown at all, in the console or otherwise [14:43] thinkjson: there was leading whitespace in the password, which screwed up everything [14:43] dscape: you should have it in the console, or its a bug [14:44] dscape: thinkjson: minimal work to get it solved is adding a test case [14:44] dscape: and ill fix it [14:44] CarterL has joined the channel [14:44] meso has joined the channel [14:45] meso has joined the channel [14:45] thinkjson: dscape: thanks! [14:46] jimt has joined the channel [14:46] aGHz1 has joined the channel [14:46] dscape: thinkjson: ive also added you guys to the wiki [14:46] dscape: can I try telemetry? [14:47] dscape: super curious :) [14:47] dscape: also following the project is a good idea if you are heavy users [14:47] thinkjson: dscape: we're pushing our production changes soon [14:47] dscape: so you can see changes / discuss [14:47] thinkjson: I think I am... [14:47] dscape: there's plenty of decisions that go thru and feedback is welcome [14:47] azeroth_ has left the channel [14:48] thinkjson: well I have two contractors working just on telemetry now, so you might hear from them [14:48] satyr has joined the channel [14:49] CrabDude has joined the channel [14:49] dscape: thinkjson: cool! :) I mean there's plenty of improvements i would love to do to nano [14:49] dscape: but mostly it works out so perfectly and flawlessely [14:49] zarex has joined the channel [14:49] dscape: that im never very compeled to spend my time in just making it "cleaner" [14:49] dscape: its already pretty clean [14:49] thinkjson: to do a doc update, don't I just insert with an existing id? [14:50] dscape: thinkjson: yes [14:50] dscape: but you ned to suply the _rev and _id [14:50] thinkjson: hmm. it's not working. [14:50] dscape: you get a conflict? [14:51] dscape: thinkjson: NANO_ENV=testing node myapp.js [14:51] braoru has joined the channel [14:51] dscape: will basically spit out all http requests you do [14:51] dscape: which makes it super easy to debug [14:51] dscape: about doc update, you need to suply the rev [14:51] dscape: thats really a couch thing, not nano [14:51] eb4890 has joined the channel [14:52] dscape: the way couch solves conflicts is super simple. they keep track of revisions (lets say 1,2,3 etc) [14:52] tytsim_ has joined the channel [14:52] dscape: and when you get a file it has a _rev property [14:52] dscape: if two people get the same rev [14:52] thinkjson: should I remove the _rev property? [14:52] dscape: the first one to submit changes win [14:52] thinkjson: ah ok [14:52] dscape: the second gets an conflict [14:52] dscape: cause the rev has been changed [14:53] astropirate has joined the channel [14:53] dscape: thinkjson: the right thing to do is to implement a client side sync heuristic [14:53] dscape: imho [14:53] robde has joined the channel [14:53] dscape: thats what me and pedrogte are trying to do with dscape/dribbledb [14:53] tomasztomczyk has joined the channel [14:53] c4milo has joined the channel [14:53] thinkjson: hmm. still not working. [14:54] dscape: where you basically say sync(url, conflict_solving_heuristic) [14:54] dscape: where conflict bla bla bla is the function that solves the conflict according to you business rules [14:54] dscape: thinkjson: what are you trying to do? [14:55] thinkjson: remove a field from all docs in a database [14:55] FIQ: why was I highlighted in here before? [14:55] dscape: well, not going to say the obvious things I will assume you know that you shouldnt change your production db [14:55] dscape: :) [14:55] thinkjson: dscape: I'm trying to use nano to do some database cleanup. one off. [14:56] dscape: basically get the document, one by one or in batches, then change it and to update [14:56] tytsim_ has joined the channel [14:56] jstash has joined the channel [14:56] FIQ: oh well [14:56] dscape: dont remove rev [14:56] Poetro has joined the channel [14:56] thinkjson: ah - I was pulling the id from the wrong place [14:56] dscape: if you do, you get conflict [14:56] robde has joined the channel [14:56] dscape: cause you are trying to create a new document in a uri that already exists [14:56] meso has joined the channel [14:56] dscape: which is a conflict [14:56] dscape: thinkjson: show me some code and i can help you out :) [14:57] dscape: also NANO_ENV=testing node .... [14:57] dscape: it will give you all the info you need [14:57] igl has joined the channel [14:57] dscape: thinkjson: the couchdb book is free, and while you might choose to pay for it after you read it [14:57] thinkjson: dscape: nano.insert(doc, id, callback) right? [14:57] dscape: you can refer to it online -> http://guide.couchdb.org/editions/1/en/index.html [14:57] dscape: thinkjson: no, not for an update [14:58] dscape: let me get you a code snippet [14:58] thinkjson: dscape: oh, then what? [14:58] tmcw has joined the channel [14:58] dscape: https://github.com/dscape/nano/blob/master/tests/doc/update.js#L44-L46 [14:59] jnbek has joined the channel [14:59] jnbek has joined the channel [14:59] jaha has joined the channel [14:59] thinkjson: "foo" isn't the id? [14:59] dscape: thinkjson: you were right it was insert [14:59] robde has joined the channel [14:59] dscape: i keep forgetting :P [14:59] dscape: thinkjson: foo is the id [14:59] Niek has joined the channel [15:00] McMAGIC--Copy has joined the channel [15:00] dscape: iris.couch.com/mydb/foo [15:00] thinkjson: right [15:00] thinkjson: so I was right [15:00] dscape: yup [15:00] LeMike has joined the channel [15:00] dscape: I thought there was a update method, but I guess we ditched it cause it means nothing in couch [15:00] thinkjson: and the callback is still error, body, headers right? [15:01] dscape: yeah thinkjson [15:01] dscape: always [15:01] thinkjson: hmm. the gets are working, but the inserts are not. [15:01] dscape: thinkjson: gist.github.com [15:01] dscape: put it there [15:01] dscape: and dm me here if you cant show the code [15:01] dscape: ill check it out [15:02] firebalrog has joined the channel [15:02] thinkjson: it's timing out... I wonder if I should try the bulk upload [15:02] dscape: insert is timing out? [15:02] mc has joined the channel [15:02] dscape: thinkjson [15:03] ivic has joined the channel [15:03] Niek: hey all, I'm trying to scale my nodejs app by making it multithreaded (cluster.fork()) - is it required to create redis/sql clients inside the worker loop, or can they share the same client object? [15:03] thinkjson: yes. here's the code: http://pastie.org/private/jlukpcgx7m76jpufumjmjg [15:03] CarlosC has joined the channel [15:03] real_mjr has joined the channel [15:04] TomY_ has joined the channel [15:04] dscape: thinkjson: include_docs [15:04] thinkjson: ? [15:04] cmr: Niek: That isn't a thread, that's a whole new process. [15:04] dscape: give me a sec [15:05] dscape: thinkjson: https://github.com/dscape/nano/blob/03adfde9c7a425ac08797084cd94db299a834391/tests/view/multi-document-fetch.js#L21 [15:05] dscape: when querying a view [15:06] dscape: you can say [15:06] satyr has joined the channel [15:06] Niek: cmr: you're right, new process. but can these processes share the same redis/mysql clients? or do i need to check if the clients are thread-safe? [15:06] dscape: include docs [15:06] dscape: and docs come with the view [15:06] gavin_huang has joined the channel [15:06] thinkjson: for the _all_docs? [15:06] npa has joined the channel [15:06] dscape: thinkjson: for any view [15:06] dscape: including all docs [15:06] dscape: in futon, get your dev tools out [15:06] dscape: and check the requests it does [15:06] dscape: :) [15:06] chrisvwebdev has joined the channel [15:06] thinkjson: so nano.list(callback, include_docs: true) or what? [15:07] zitchdog has joined the channel [15:07] CIA-101: libuv: 03Ben Noordhuis 07v0.6 * r52fba1a 10/ src/unix/udp.c : unix: fix compiler warning - http://git.io/bhB3kw [15:07] cmr: Niek: I honestly don't know, but how would the processes be able to share anything? [15:07] rwaldron has joined the channel [15:07] dscape: thinkjson: remove #L12 [15:07] dscape: it cant work with L12 [15:07] dscape: you are deleting rev [15:07] dscape: so its a new insert [15:07] dscape: hence conflict [15:07] rio{ has joined the channel [15:08] thinkjson: leave _rev in? [15:08] dscape: yes [15:08] dscape: thinkjson: you should consider banzai for serious ETL like processing [15:08] dscape: github/pedrogte/banzai [15:08] dscape: thats what we use [15:08] dscape: its not as polished as we would like [15:08] thomblake has joined the channel [15:08] dscape: (we, expensecat) [15:08] dscape: but your team can benefit a lot from this project [15:08] kitt has joined the channel [15:08] dscape: and share some love and make it better :) [15:08] thinkjson: it's a 404 [15:09] k1ttty has joined the channel [15:09] colinclark has joined the channel [15:09] thinkjson: pgte/banzai ? [15:09] dscape: yes [15:09] dscape: sorry [15:10] dscape: im not very good, well with anything it seems [15:10] dscape: :) [15:10] thinkjson: I just have an immediate need that needs to be solved. I was hoping for simple. [15:10] thinkjson: insert still times out [15:10] colinclark has joined the channel [15:10] LuckySMack has joined the channel [15:11] thomblake has left the channel [15:11] fangel has joined the channel [15:11] dscape: thinkjson: consider what you are doing [15:11] dscape: there [15:12] Niek: cmr: i understand now - everything in the .js file is cloned, so the processes do not share any objects (so no threadsafe issues) [15:12] stephank has joined the channel [15:12] dscape: thinkjson: get documents 10 by 10 [15:12] dscape: do a setTimeout for next batch [15:12] brianc1 has joined the channel [15:12] dscape: everything will work [15:12] dscape: nothing will timeout [15:12] dr0id has joined the channel [15:12] dscape: its still not ideal :) [15:13] dscape: better do a try catch to find if any goes south [15:13] dscape: and then fix those by hand [15:13] Poetro has joined the channel [15:13] thinkjson: how can I use that .view method to pull all docs. That would save a lot of load. [15:13] thomblake has joined the channel [15:14] thomblake has left the channel [15:14] zarex has joined the channel [15:15] real_mjr has left the channel [15:15] cmr: Niek: Exactly [15:16] TomY_ has joined the channel [15:16] dscape: thinkjson: I'm going to write a sample for you [15:16] dscape: think that will save your time [15:16] dscape: give me a sec [15:16] thinkjson: thanks! [15:17] snearch has joined the channel [15:18] amigojapan has joined the channel [15:19] einaros has joined the channel [15:20] brianloveswords has joined the channel [15:20] sechrist has joined the channel [15:21] raja has joined the channel [15:23] tomasztomczyk has joined the channel [15:24] joshkehn has joined the channel [15:24] joshkehn has left the channel [15:25] CrabDude has joined the channel [15:26] sjbreen has joined the channel [15:26] rauchg has joined the channel [15:26] dscape: thinkjson: didnt forget about you [15:26] dscape: working on it :) [15:26] isaacs has joined the channel [15:26] dscape: you will owe me a blog post after this:P [15:27] davidwalsh has joined the channel [15:27] thinkjson: dscape: in all my massive free time :-P [15:28] dscape: thinkjson: if you can at least explain the code ill give you it will be good enough to help other people with similar questions [15:28] kevinohara80 has joined the channel [15:28] raja has left the channel [15:28] raja has joined the channel [15:28] thinkjson: dscape: almost there? [15:29] bshumate has joined the channel [15:29] bshumate has joined the channel [15:29] Guest59107 has joined the channel [15:30] relix: hey guys - I've set up Mocha to run my tests, but I want it to run repeatedly everytime some files change. I've used the -w directive but when an exception gets thrown it quites. Is there a way to make it run until I explicitly exit it? [15:31] relix: ah I found it [15:32] relix: I had an exception outside of my test cases [15:32] relix: this makes sense [15:32] relix: thanks for reading guys, sorry to bother you ;) [15:32] devongovett has joined the channel [15:33] dscape: thinkjson: yeah got some thinking wrong [15:33] dscape: cause update changes database order :\ [15:33] thinkjson: :( [15:33] Fuu has joined the channel [15:35] willwhite has joined the channel [15:36] zarex has joined the channel [15:36] brngardner has joined the channel [15:39] _rockbot_ has joined the channel [15:40] warz has joined the channel [15:40] warz has joined the channel [15:40] tjholowaychuk has joined the channel [15:42] shinuza: omg waf is such a pile of shit [15:42] shinuza: well, at least the version bundled with nodejs [15:43] Peeter: wife acceptance factor :D? [15:43] shinuza: I wish [15:43] thinkjson: python build system [15:44] shinuza: I replaced it with two like of Makefile [15:45] fatjonny has joined the channel [15:45] socketio\test\40 has joined the channel [15:46] neurodrone has joined the channel [15:46] lapas has joined the channel [15:47] lapas: ACTION kas 2x2 off [15:48] kevwil has joined the channel [15:49] lwille has joined the channel [15:49] raja: I am buulding an express app. What is the best way to expose an object instance to controllers in seperate files (controllers/models) [15:51] robde has joined the channel [15:51] Swizec has joined the channel [15:53] zivester has joined the channel [15:53] radarig has joined the channel [15:53] EriksLV has joined the channel [15:55] Aikar: raja: just pass it as an arg to a function, objects are byref [15:55] zivester has joined the channel [15:56] MatthewS has joined the channel [15:57] zivester has joined the channel [15:57] lapas has joined the channel [15:58] __tosh has joined the channel [15:59] dscape: thinkjson: https://gist.github.com/a8bc20f38d202cca679c [15:59] geekbri has joined the channel [15:59] booyaa: dam you  *shakes fist* [15:59] booyaa: you're breaking my xsl transformation [16:00] ccare has joined the channel [16:00] EyePulp has joined the channel [16:00] robde has joined the channel [16:02] wink__ has joined the channel [16:03] lperrin has joined the channel [16:04] captain__ has joined the channel [16:05] Margle has joined the channel [16:05] mac^ has joined the channel [16:06] brianloveswords has joined the channel [16:06] zarex has joined the channel [16:08] thinkjson: dscape: I can't use the bulk_docs to update? [16:08] dscape: thinkjson: you can and you probably should [16:08] dscape: I was just trying to be fast [16:09] dscape: ended up wasting my time on async [16:09] dscape: :P [16:09] dscape: but yes, you should [16:09] dscape: it will be 1 request vs. 10 [16:09] dscape: and actually, no need for async then [16:09] dscape: lol [16:09] dscape: lesson learned, trying to be faster makes you slower :P [16:11] screenm0nkey_ has joined the channel [16:11] jakehow has joined the channel [16:11] pizthewiz has joined the channel [16:11] aelien27 has joined the channel [16:11] sorensen__ has joined the channel [16:12] robotmay has joined the channel [16:12] MatthewS has joined the channel [16:13] herbySk has joined the channel [16:13] jocafa has joined the channel [16:18] sgentle has joined the channel [16:18] ritch has joined the channel [16:19] davehamptonusa has joined the channel [16:19] jslatts: does anyone know if fs.watchFile() will wait for file writing to complete before firing its callback? [16:19] thinkjson: dscape: I tried the bulk docs, and it didn't update the records. Do I need special params? [16:20] Internet13 has joined the channel [16:20] booyaa: jslatts: you might need to add some logic to see if curr/prev mtime are the same [16:21] wink_ has joined the channel [16:21] maritz: anyone here by chance who knows the HLDS (goldsrc) rcon protocols and node udp stuff? [16:21] ritch has left the channel [16:21] booyaa: jslatts:i'm assuming mtime changes when the writing is finished [16:22] robotmay has joined the channel [16:23] dscape: thinkjson: all you need to know is at http://wiki.apache.org/couchdb/HTTP_Bulk_Document_API [16:23] dscape: nano just proxies these things [16:23] dscape: actually you can read all of nano code in like.. 2 minutes? [16:23] dscape: max [16:23] dscape: :) [16:23] jslatts: booyaa: thats what I'm trying to establish. I guess I just need to do some tests since it is probably OS dependent [16:23] davehamptonusa has left the channel [16:24] dscape: isaacs: i took care of what you asked in the other channel the other day [16:24] dscape: lol #crypticmessages [16:24] unomi has joined the channel [16:24] icrazyhack has joined the channel [16:24] isaacs: dscape: kewl. added to my autojoin list. [16:25] maritz: there's no one in there! is that a message in and of itself? [16:26] marcin_ has joined the channel [16:27] thinkjson: dscape: ah. fixed it. had all_or_nothing on screwed it up. [16:27] dscape: maritz: yes, the message was cryptic :) [16:27] thinkjson: thanks for your help! [16:27] dscape: yw thinkjson [16:27] dscape: remember that is not how you should do things :P [16:27] dscape: lol [16:28] booyaa: jslatts: there doesn't appear to be any specific os quirks with fs.watchFile so comparing curr/prev mtime should suffice [16:28] k1ttty has joined the channel [16:28] mateodelnorte has joined the channel [16:28] sgentle: my favourite things are bugs that only show up on certain versions of ubuntu :( [16:28] booyaa: fs.watch might cause probs though [16:28] laczek has joined the channel [16:28] thinkjson: dscape: here's my final code: http://pastie.org/private/p7zxsxjdp2rgu1jhdthg [16:29] phaggood has joined the channel [16:29] thinkjson: dscape: what do you recommend in the future? [16:29] CoverSlide has joined the channel [16:29] dscape: thinkjson: we've built banzai for that [16:29] dscape: its a general purpose ETL tool for documents [16:29] marcin_: Hi, I'm trying to build debian package of nodejs 0.6.7 but 'make test' shows errors - http://pastebin.com/h948Z29Q. What's wrong? How can I fix that? [16:29] dscape: thinkjson: http://dailyjs.com/2011/11/23/node-roundup/ [16:30] relix: hey guys I'm using mocha to do some testing. Is there a way to *set* some environment variables inside node.js? I need it to test how the code reacts to the variables. [16:30] zomg: relix: process.env or something. It's in the api docs for process I think [16:30] shinuza: rm -rf wscript [16:30] CoverSlide: process.env[variable_name] = "whatever" [16:31] phaggood: anyone using m-project? Docs at http://the-m-project.net/getStarted_setup.html say you need nodejs on cygwin, further docs say this no longer works, installer on nodejs.org seems to have installed working nodejs but I can't run figure out how to run espresso [16:31] cosmincx has joined the channel [16:31] enmand has joined the channel [16:31] CoverSlide: cygwin never was officially supported [16:31] CoverSlide: and 0.2.5 is an old old version [16:32] CoverSlide: so obviously this is old [16:32] relix: thanks guys, but that doesn't work when I try to require another file, that file doesn't see the set variables [16:32] innociv has joined the channel [16:32] phaggood: okay, so i used the installer, open a cmd window and type node and get the > prompt. how then do I run espresso? [16:33] CoverSlide: for most stuff you should be able to use the native windows version and not bother with cygwin at all [16:33] thinkjson: +1 [16:33] thinkjson: yay for support from Microsoft! [16:34] k1ttty has joined the channel [16:34] zarex has joined the channel [16:34] phaggood: this doesn't work - node bin\espresso.js help [16:35] CIA-101: node: 03mrb 07v0.6 * rbd9fa2e 10/ src/udp_wrap.cc : [16:35] CIA-101: node: dgram: use slab memory allocator [16:35] CIA-101: node: Change udp memory allocation scheme from uv_buf_init to slab allocation. Takes [16:35] CIA-101: node: slab allocation scheme from stream_wrap. - http://git.io/DUrgmg [16:35] letsgojuno has joined the channel [16:35] nmtmason has joined the channel [16:35] CoverSlide: doesn't work doesn't tell us anything [16:36] zzak has joined the channel [16:36] CoverSlide: gist the error you got [16:36] marcin_ has left the channel [16:37] mandric has joined the channel [16:37] wink__ has joined the channel [16:37] matejv has joined the channel [16:38] arcanis has joined the channel [16:38] phaggood: "the sys module is now called util. it should have a similar interace. Usage: espresso [16:39] AD7six has joined the channel [16:39] phaggood: wait... [16:40] zzak has joined the channel [16:40] CoverSlide: so ... did you read the documentation? [16:41] fracek has joined the channel [16:41] djazz has joined the channel [16:42] yawNO has joined the channel [16:43] booyaa: man i think it'll be beer o'clock tonight [16:44] booyaa: ACTION shakes his fist at  [16:44] alvaro_o has joined the channel [16:44] broofa has joined the channel [16:44] yawNO: csb [16:45] phaggood: read this - http://the-m-project.net/getStarted_setup.html, is there more/better elsewhere? [16:46] rio{ has joined the channel [16:46] CoverSlide: http://the-m-project.net/getStarted_helloworld.html [16:46] ryanfitz has joined the channel [16:47] phaggood: yeah, that too: node bin\espresso.js -init -e -p myapp [16:47] phaggood: crap fat fingered it. [16:48] MatthewS has joined the channel [16:48] k1ttty has joined the channel [16:49] GrizzLyCRO has joined the channel [16:49] ashusta has joined the channel [16:50] phaggood: TypeError: Cannot call method 'split' of undefined at copyProject (C:\cygwin\home\phaggood\mproject\Espresso\generator\project_ generator.js:225:31) at Function. (C:\cygwin\home\phaggood\mproject\Espresso\generator \project_generator.js:282:7) at next (C:\cygwin\home\phaggood\mproject\Espresso\node_modules\step\lib\ste p.js:51:23) at callbackIfDone (C:\cygwin\home\phaggood\mproject\Espresso\generator\proje [16:50] Vespakoen has joined the channel [16:52] radarig has joined the channel [16:53] joshfinnie has joined the channel [16:53] echobucket has joined the channel [16:54] colinclark has joined the channel [16:54] robde has joined the channel [16:54] springmeyer_ has joined the channel [16:55] thinkjson: dscape: hmm. now my next problem is that I have databases that won't fit in memory... [16:55] jaequery has joined the channel [16:55] mikeal has joined the channel [16:55] thinkjson: so I can't just request all docs... [16:55] raww has joined the channel [16:55] brianloveswords has joined the channel [16:57] siddhion has joined the channel [16:58] jerrysv has joined the channel [16:58] paulwe has joined the channel [16:59] booyaa: heh i sense dscape's got some consultancy work in his future ;) [16:59] booyaa: hear that ladies and germs... cha ching [16:59] booyaa: interwebs makes you rich [17:00] Topcat has joined the channel [17:01] siddhion: I got an error that does not point anywhere in my file. here is the error => http://pastie.org/3173242 here is my code => http://pastie.org/3173235 any ideas on why this is happening? [17:02] kmiyashiro has joined the channel [17:02] zarex has joined the channel [17:03] brngardner has joined the channel [17:04] tauren_ has joined the channel [17:05] MooGoo: Error: listen EADDRINUSE [17:05] MooGoo: hmm...I wonder [17:05] djbell has joined the channel [17:05] tjfontaine: socket is alredy open, or didn't get reuse set properly [17:05] dscape: booyaa: naaah [17:06] dscape: i mean.. how do you know? :P [17:06] dscape: i did consultancy and presales work already [17:06] dscape: :P [17:06] synkro has joined the channel [17:06] chadskid_ has joined the channel [17:07] phaggood has left the channel [17:07] thinkjson: dscape: too bad. I might have thrown some money your way. :-P [17:07] tjfontaine: siddhion: why are you trying to listen twice on port 4000? [17:07] tjfontaine: siddhion: that's what address in use means [17:07] siddhion: tjfontaine, i see [17:08] versicolor has joined the channel [17:08] siddhion: tjfontaine, ahh yeah that makes the sense i was seeking. thanks [17:08] sechrist has joined the channel [17:09] CrabDude has joined the channel [17:09] voodootikigod_ has joined the channel [17:10] _dc has joined the channel [17:10] Vespakoen has joined the channel [17:10] tdegrunt has joined the channel [17:10] bradleymeck has joined the channel [17:11] CrabDude has joined the channel [17:12] hij1nx has joined the channel [17:12] Druide_ has joined the channel [17:12] patcito has joined the channel [17:13] joshsmith: is there any way in Express to globally redirect someone if something in their session isn't set [17:13] mandric: is there a nodejs debugger, or something i can use to add a breakpoint and inspect some variables when i run a node script? [17:13] maritz: mandric: yes [17:13] vicapow has joined the channel [17:13] maritz: joshsmith: what do you mean globally? [17:14] geetarista has joined the channel [17:14] zomg: mandric: you could try node inspector [17:14] joshsmith: maritz I mean instead of defining it on a per route basis [17:14] maritz: mandric: you can also do console.log(variable). or use node --debug and then some debugging client. or use cloud9 [17:14] mandric: is that bundled with node or third-party? [17:14] yolin has joined the channel [17:14] dgathright has joined the channel [17:15] westc: middleware? [17:15] mandric: console.log is what i've been using but it would be easier to debug this problem if i had more of a debugger env [17:15] zomg: mandric: you can install it via npm [17:15] thinkjson: mandric: bundled [17:15] niloy has joined the channel [17:15] zomg: thinkjson: node-inspector is bundled now? [17:15] maritz: joshsmith: app.use(function (req, res, next) { if (req.session.user_is_fucking_stupid) { res.redirect('http://www.disney.com'); }); [17:15] thinkjson: oh [17:15] thinkjson: thought he meant --debug [17:15] mandric: so i just require('inspector') or some such? [17:15] markq: lmao [17:15] thinkjson: ACTION goes back to sleep [17:15] joshsmith: maritz: ahh, gracias [17:15] zomg: mandric: npm install node-inspector or something like that. it's on github [17:15] zomg: with instructions [17:16] mandric: ok i'll check out inspector, thanks [17:16] robi42 has joined the channel [17:16] maritz: joshsmith: no problem :D [17:16] niloy__ has joined the channel [17:16] rwaldron has joined the channel [17:16] vicapow: any node.js meet ups in san fran this weekend? [17:16] maritz: joshsmith: although it might be that app.all('*', func...); is the way that's preferred by some. [17:16] te-brian has joined the channel [17:16] joshsmith: what's the difference? I've never used app.all() [17:17] mandric: but wait does node-inspector run in the browser? [17:17] mandric: i'm work with a command line script [17:17] markq: joshsmith: http://expressjs.com/guide.html#passing-route%20control [17:17] mandric: nm, i'll try [17:18] markq: it's all in the guide [17:18] joshsmith: gracias markq [17:19] dudeinthemirror has joined the channel [17:19] joshsmith: so app.all('*') matches every route? [17:20] Heisenmink has joined the channel [17:20] joshsmith: err...I've created a redirect loop [17:21] mc: what's everyone using for hosting node projects? i had some stuff on no.de personally, but we're looking for some production ready hosts for customers [17:21] zomg: I'm running mine on my linode vps but it's mostly just a personal project with not that many users [17:21] joshsmith: should I try to listen for req.path? [17:23] caolanm has joined the channel [17:23] dudeinthemirror has joined the channel [17:23] zivester has joined the channel [17:24] matejv has joined the channel [17:24] sechrist has joined the channel [17:24] frogstarr78 has joined the channel [17:26] dshaw_ has joined the channel [17:26] lz has joined the channel [17:27] nmtmason has joined the channel [17:27] maletor has joined the channel [17:27] allanca has joined the channel [17:27] stefpb has joined the channel [17:28] Edy has joined the channel [17:28] joshsmith: maritz: any idea how I should be avoiding this redirect loop? [17:29] saesh has joined the channel [17:29] zarex has joined the channel [17:29] steveoh has joined the channel [17:29] wdbl has joined the channel [17:29] maritz: what redirect loop? [17:30] maritz: oh, i see. no idea without the code. :P [17:30] joshsmith: I'm gonna post on SO [17:30] joshsmith: I'll show you in a moment [17:30] maritz: joshsmith: no [17:30] maritz: you're not redirecting to outside your app, right?! [17:30] joshsmith: no [17:31] wink_ has joined the channel [17:31] counterbeing has joined the channel [17:31] TheJH has joined the channel [17:31] triptec has joined the channel [17:31] maritz: well, then you either need to check if the user is already redirected or use a route for the app.all() call that doesn't match your page where you redirect to. [17:32] lazyshot has joined the channel [17:32] joshsmith: how can I check if they're already redirected, though? [17:32] joshsmith: I was thinking req.path [17:32] khrome has joined the channel [17:32] josh-k has joined the channel [17:34] maritz: req.session ?! [17:35] Skaag has joined the channel [17:35] dschn has joined the channel [17:35] maritz: ooooor, put the route you're redirecting to before the redirecter in your code and don't call next() :D [17:35] jxson has joined the channel [17:35] Morkel has joined the channel [17:37] churp has joined the channel [17:37] maritz: joshsmith: you could also redirect to a path with ?redirected at the end and then check for that... 10000 possibilities [17:37] joshsmith: I tried both approaches. the problem I'm encountering is that it's not loading any other resources [17:37] joshsmith: the favicon, javascripts, stylesheets, images [17:37] te-brian2 has joined the channel [17:38] pgte has joined the channel [17:38] EuroNerd has joined the channel [17:39] wink_ has joined the channel [17:39] mark_azevedo has joined the channel [17:39] kenperkins has joined the channel [17:40] mikeal has joined the channel [17:41] wdbl: I can't seem to figure out how WrappedContext from node_script.cc gets referenced as 'evals' in the binding_cache (process.binding). Can anyone give me a hint? [17:41] Skaag_ has joined the channel [17:41] Kunda has joined the channel [17:42] Aikar: wdbl: copperfield [17:43] wdbl: Aikar: so, magic? [17:44] wink__ has joined the channel [17:44] maritz: joshsmith: well, if your redirect function is before those things, then that's obviously how it's supposed to be. [17:46] NothingMan65 has joined the channel [17:46] joshsmith: I understand that. I know *why* it's happening. I simply can't figure out how to avoid it [17:46] disappea_ has joined the channel [17:47] wdbl: (I'll also welcome a straight-up answer instead of just a hint...) [17:47] pizthewiz has joined the channel [17:48] jxson has joined the channel [17:49] maritz: joshsmith: set req.session.redirect = true on redirecting and check if that's true before redirecting... [17:49] franciscallo has joined the channel [17:50] EuroNerd has joined the channel [17:50] maritz: now, how/when you then set it back to false is a different question :D [17:50] gsmcwhirter has joined the channel [17:50] nmtmason has joined the channel [17:51] EuroNerd has joined the channel [17:53] joshsmith: actually how I set it to false is easy, setting it to true is a little trickier [17:53] wink_ has joined the channel [17:54] matejv has joined the channel [17:54] hij1nx has joined the channel [17:55] mikeal has joined the channel [17:55] AndreasMadsen has joined the channel [17:57] spleeze has joined the channel [17:58] wink__ has joined the channel [17:58] BrianE has joined the channel [17:58] zarex has joined the channel [17:59] yawNO has joined the channel [18:01] letsgojuno has joined the channel [18:02] dodo has joined the channel [18:03] RobWC has joined the channel [18:03] wdbl: ok I figured out my problem, thx. [18:03] ryan_stevens has joined the channel [18:04] wink_ has joined the channel [18:05] t0mmyvyo has joined the channel [18:06] slaskis has joined the channel [18:06] overthemike has joined the channel [18:06] EhevuTov has joined the channel [18:09] kevwil has joined the channel [18:09] tilgovi has joined the channel [18:09] davemo has joined the channel [18:10] ger^kallisti has joined the channel [18:10] patcito has joined the channel [18:10] sarlalian has joined the channel [18:10] JJMalina has joined the channel [18:11] Morkel has joined the channel [18:12] Venom_X_ has joined the channel [18:13] wink_ has joined the channel [18:14] AD7six has joined the channel [18:14] admc has joined the channel [18:14] secoif has joined the channel [18:15] zitchdog has joined the channel [18:16] vicapow has joined the channel [18:16] cosmincx has joined the channel [18:16] matejv has joined the channel [18:17] booyaa: okay this might work! [18:17] booyaa: tmuxing atm [18:17] gregpascale has joined the channel [18:17] booyaa: got irc in bottom right pane, nodemon on the bottom left. vim up top [18:18] zomg: Cool =) [18:18] zomg: I was trying tmux as well but I ran into some issues with it and zsh [18:18] zomg: Charset stuff I guess, never could figure it out [18:18] booyaa: bummer dude :( [18:18] booyaa: still learning my way around...it's screen all over again ;____; [18:18] zomg: screen works ok I guess, don't really need split windows that much [18:18] booyaa: but this might be really useful [18:18] zomg: Heh [18:19] booyaa: we'll see [18:19] overthemike has left the channel [18:19] zomg: I just changed the default keys to match screen's :P [18:19] booyaa: might go off in a day [18:19] booyaa: yeah i tried that.. well i thought i'd tried it and it carped abot not know what Ctrl-a is [18:21] ryanrolds_w has joined the channel [18:21] dshaw_ has joined the channel [18:21] booyaa: i bet there's tmux profiles/themes so you could have a different one for coding+irc, irc+building, irc+irc [18:22] pdodde has joined the channel [18:23] `3rdEden has joined the channel [18:23] TheFuzzball has joined the channel [18:24] teadict: k, let's see how the heck do I accomodate these express route files so I can reuse the authentication middleware [18:24] zomg: teadict: I just put my auth stuff into a file and require it in my files containing routes [18:24] teadict: they're all nice and pretty and separate but the checking is in ./routes/login.js... [18:24] teadict: ah [18:24] teadict: zomg: wanna paste something? [18:25] stonebranch has joined the channel [18:25] zomg: Something? [18:25] teadict: some lines, to get the idea of your organization [18:25] zomg: Oh I just have something like auth.js and it has stuff like requireLogin [18:26] teadict: oh k [18:26] zomg: I have a bunch of files which are sort of like modules for different parts of my web stuff [18:26] reid has joined the channel [18:26] martin_sunset has joined the channel [18:26] zomg: They just require('auth.js') and then use the exports from it [18:26] teadict: alright, let's try that then [18:26] isaacs has joined the channel [18:27] steveoh has joined the channel [18:27] Vennril has joined the channel [18:28] brianloveswords has joined the channel [18:28] ecto has joined the channel [18:29] AndreasMadsen has joined the channel [18:29] teadict: I still dunno which structure is best for not having to rewrite requires and etc throughout zillion files [18:30] dilvie has joined the channel [18:30] hipsters_ has joined the channel [18:31] arg0s` has joined the channel [18:31] zitchdog has joined the channel [18:32] teadict: I guess my biggest question is... [18:33] teadict: is there a way to require or use stuff/modules in app.js so they are available everywhere then? [18:33] jbpros has joined the channel [18:33] jgornick has joined the channel [18:33] teadict: kinda like php, where if you organize your files well, you know where to write each require [18:33] nadirvardar has joined the channel [18:33] teadict: because like I have my routes files now, I hvae to pass the ORM instance all over the place and it's freaky [18:34] langworthy has joined the channel [18:34] zomg: Well it's just not PHP =) [18:34] teadict: no, I know.. [18:34] zomg: I think there's some trick to change locals into working across all files but at least to me that seems kinda hack'ish [18:34] yawNO: it's not PHP? [18:34] teadict: that was to get an idea of what I intend [18:34] yawNO: ACTION panics [18:34] m00p has joined the channel [18:34] teadict: zomg: I see [18:34] yawNO: AAAAAAAA [18:34] yawNO: :/ [18:34] zomg: It might be a better idea to think of require's more like imports in Python or such [18:34] teadict: I do.. [18:34] meandi7 has joined the channel [18:34] fantastikibne has joined the channel [18:35] teadict: but I find it odd that app.js being the kind of file it is for express.. [18:35] LeMike has joined the channel [18:35] teadict: doesn't provide a way to emmm spread modules [18:35] tkaemming has joined the channel [18:35] zomg: You could automate it easily [18:35] teadict: so you don't have to send stuff to ALL routes [18:35] teadict: zomg: explain yourself [18:35] zomg: Put all your module names into an array and just have the code loop over them, passing the deps and such [18:35] teadict: ah [18:35] teadict: yes.. [18:35] teadict: that's always plan B [18:35] zomg: If you need another module you just add it to the array and no need to add extra coding [18:36] SubStack: just module.exports = function (app, db) { ... } [18:36] zomg: I basically just do exports.init = function(stuff) { } in my route files [18:36] teadict: SubStack: but I have many functions to export in each route [18:36] zomg: and in my main express file I just have a require('somemodule').init(blah) [18:36] SubStack: and fs.readdirSync(__dirname + '/routes').forEach(function (x) { require('./' + x) }) [18:36] teadict: zomg: could you paste an example of that please? [18:37] StanlySoManly has joined the channel [18:37] teadict: SubStack: nice [18:37] SubStack: or rather [18:37] zomg: Well it's just a convention I'm using.. all of my route files have an init function which takes the same args [18:37] SubStack: fs.readdirSync(__dirname + '/routes').forEach(function (x) { require('./' + x)(app, db) }) [18:37] AndreasMadsen has joined the channel [18:37] fantastikibne: "npm install " command doesnt work on windows? [18:37] zomg: So when I add a new route file I can just put another line for calling the init into my main file [18:38] teadict: so wait.. everybody organizes express differently? [18:38] xetorthio has joined the channel [18:38] SubStack: teadict: happy dissent [18:38] teadict: I thought there was some structural convention that was best [18:38] teadict: alrighty then.. [18:38] deedubs: i make app a global [18:38] SubStack: zomg: I prefer closing over state explicitly instead of initialization functions [18:38] teadict: wat [18:39] devongovett has joined the channel [18:39] SubStack: just make a function that takes the initial parameters and have that function return another function or a hash of functions [18:39] fantastikibne: fs.readdirSync(__dirname + '/routes').forEach(function (x) {eval(fs.readFileSync('./'+x)+'');}) [18:39] ryanfitz has joined the channel [18:39] SubStack: doing it by closing over state means you can't forget to not initialize [18:40] isaacs: fantastikibne: it should [18:40] teadict: k.. [18:40] arg0s` has left the channel [18:40] VladGh has joined the channel [18:40] ryanfitz_ has joined the channel [18:41] fantastikibne: isaacs: http://pastebin.com/raw.php?i=usB4d36k [18:41] meandi7 has joined the channel [18:42] CrabDude: Anyone ever used https://github.com/wellawaretech/node-zipstream or able to recommend a good stream-based zip module? [18:43] davemo has joined the channel [18:43] isaacs: fantastikibne: that's mysql not working, not npm not working. [18:43] isaacs: fantastikibne: binary addons that use node-waf can't beinstalled with npm on windows. [18:43] isaacs: node-waf will never be win32-compliant, i'm afraid. [18:43] kevwil has joined the channel [18:44] dthompso99 has joined the channel [18:46] _olouv_ has joined the channel [18:48] fangel has joined the channel [18:49] booyaa: heck even win32's days are numbered [18:49] booyaa: it's going to be replaced with win-rt i think [18:49] kmczn has joined the channel [18:50] booyaa: ACTION will cite nodeup #1 some add-ons are os specific [18:50] booyaa: just like other module/package systems for other langs [18:51] jlank_ has joined the channel [18:51] loucal has joined the channel [18:51] isaacs: booyaa: yeah, but we're going to do some things so that at least it'll be clearer [18:51] isaacs: also, node-waf is going away. [18:51] isaacs: everything that gets compiled will be compile-on-publish instead of compile-on-install [18:52] isaacs: right now, too much of the pain of using binary addons is on the user, and not enough on the developer. [18:52] isaacs: compile-on-install will be opt-in,and require that you've installed node such that you have a build toolchain [18:52] teadict: well, code is cleaner alright [18:52] isaacs: (or something) [18:52] adrianmg has joined the channel [18:53] adrianmg has left the channel [18:54] BillyBreen has joined the channel [18:55] benvie: TooTallNate got node-ffi compiled to binaries across just about every platform in the last day or so, it's pretty awesome [18:55] SubStack: isaacs: is node getting build servers? [18:56] ryanrolds_w has joined the channel [18:56] deoxxa: that'd be nice [18:56] isaacs: SubStack: orthogonal issue. [18:56] isaacs: SubStack: it's more that npm is getting correct build-on-publish behavior. [18:56] isaacs: SubStack: once that's in place, build servers are just a resource issue. [18:56] teadict: does anybody do this? http://paste.ubuntu.com/802055/ because of having more than one function to export [18:57] teadict: or am I being too messy? [18:57] isaacs: "just" a resource issue. [18:57] isaacs: hah [18:57] hij1nx has joined the channel [18:57] deoxxa: isaacs: how would the build-on-publish thing work for multiple platforms? is it built remotely (inside the magic of npm?) or does the developer need to manually build binaries and somehow supply them? [18:58] blueadept has joined the channel [18:58] blueadept has joined the channel [18:58] isaacs: deoxxa: it'll publish a binary from the platform you're using. [18:58] isaacs: deoxxa: you can then switch to another platform, run the publish again, and it'll upload the other binary. [18:58] deoxxa: ah, that's neat [18:58] isaacs: most of the nuts and bolts are there already. [18:58] isaacs: just disabled by default. [18:58] isaacs: feature flags! [18:58] redir has joined the channel [18:59] tjfontaine: on the linux side will it be including the flavor? [18:59] tjfontaine: I know there's a large push for the static linking world, but my god I just see disaster all over that [19:00] vicapow has joined the channel [19:01] deoxxa: isaacs: how about if you can't get access to a certain platform (i'm thinking windows) to build? would it be possible to have some sort of build contribution setup, or would that be the responsibility of the developer? [19:01] isaacs: deoxxa: that's the "orthgonal issue" i referred to before. [19:01] isaacs: deoxxa: but, even if it just means it's up to you to have a windows VM and use it, that's better than the current setup. [19:01] isaacs: really, you shouldn't claim to support windows if you don't have a windows machine to test your program on. [19:02] deoxxa: this is true [19:02] isaacs: *especially* if the code gets compiled. [19:02] tjfontaine: the only way a build-farm would work in that context would be if no external dependencies were allowed [19:02] tjfontaine: the only sane way to manage that build-farm that is [19:02] scttnlsn has joined the channel [19:02] scttnlsn: is there a port of node's assert module for the browser? [19:03] fbartho has joined the channel [19:03] gut4 has joined the channel [19:03] langworthy_ has joined the channel [19:03] SubStack: isaacs: what about different platforms for building? [19:04] SubStack: linux, mac, solaris, arm [19:04] SubStack: oh yeah I guess people use windows too [19:04] teadict: WHO? [19:04] benvie: me =( [19:04] teadict: urmum maybe [19:04] teadict: but she doesn't compile node [19:04] jmar777 has joined the channel [19:05] benvie: compiling node is easy on windows provided you have msbuild =/ [19:05] teadict: yeah, that's not compiling [19:05] booyaa: ACTION puts his hand up meakly [19:05] teadict: or is it? [19:05] benvie: yeah it is [19:05] booyaa: i r windoze noder [19:05] benvie: compiling the .exe from the source [19:05] qsobad has joined the channel [19:05] teadict: so hardcore [19:05] benvie: it's basically the stuff provided by VC++ [19:05] benvie: linker and compiler [19:06] benvie: but you can't redistribute it so you have to install VC++ [19:06] benvie: er the linker/compiler [19:06] ccare has joined the channel [19:07] benvie: problem would be solvable if MS allowed redistribution of the bare necessities to build [19:07] TooTallNate has joined the channel [19:08] trotter has joined the channel [19:11] salva has left the channel [19:11] counterbeing has joined the channel [19:12] robde_ has joined the channel [19:12] norviller has joined the channel [19:12] ryanfitz_ has joined the channel [19:12] SamuraiJack has joined the channel [19:13] fantastikibne: @isaacs: is there any mysql addon will work win & lin ? [19:13] teadict: okey... now I need to find the best way to do ajax inside jade.. [19:13] teadict: well, not inside [19:13] teadict: but since I'm not constructing the dom through js... [19:13] brianloveswords has joined the channel [19:14] teadict: I gotta go back to getting stuff by IDs and crap [19:14] teadict: I could create a .js per .jade [19:14] teadict: they would all be tiny [19:15] teadict: it'll do for the prototype... I'll create a one page app after showing off this [19:15] teadict: yes, that's good plan [19:16] teadict: I think of IRC as my own shrink [19:17] xetorthio has joined the channel [19:18] dshaw_ has joined the channel [19:18] deoxxa: teadict: i think that's a pretty risky thing to do [19:19] deoxxa: i wouldn't trust me with my sanity [19:19] teadict: deoxxa: oh, but I don't listen to people on IRC [19:19] teadict: I just speak [19:19] deoxxa: oh well that's alright then [19:19] teadict: I could just right on the console... [19:19] teadict: and all echos [19:19] teadict: *do [19:19] deoxxa: doesn't feel the same though, does it? [19:19] teadict: I've felt lonely [19:19] teadict: this is different [19:21] whaley has joined the channel [19:21] jscheel has joined the channel [19:22] DarkGrey has joined the channel [19:22] ger^kallisti has joined the channel [19:23] Leemp_offsite has joined the channel [19:23] mateodelnorte has joined the channel [19:24] jklabo has joined the channel [19:24] brianc1 has joined the channel [19:25] Leemp_offsite: Question: Anyone aware of a good module that has simple pattern matching? I'm matching url paths for a task, and i don't really want to use regex for a bunch of string tests. I'd rather use pattern matching akin to many routing frameworks, eg Expressjs, "/*" "/foo/bar*" "/foo/*/baz", etc [19:25] FIQ has joined the channel [19:25] Cromulent has joined the channel [19:25] deoxxa: got some bad news for you, Leemp_offsite [19:25] deoxxa: those are regexes underneath [19:26] Leemp_offsite: deoxxa: How are they building them? Because "/foo/*" is not a valid regex statement, right? [19:26] deoxxa: no, but /\/foo\/.*/ is [19:26] fantastikibne: http://pastebin.com/ZCb6hJb2 [19:28] pdodde has joined the channel [19:28] Leemp_offsite: deoxxa: Hmm, k thanks, i'll look into simply building regex myself then. I assume they're escaping some things, and building regex using "new RegExp()" ? [19:28] jklabo has joined the channel [19:28] deoxxa: i'd assume so [19:28] Leemp_offsite: deoxxa: I'm fine with writing something to build the regex, i just wanted to avoid the rather heavy regex syntax [19:29] thinkjson: or you could just use express [19:29] brianloveswords has joined the channel [19:30] callen has joined the channel [19:30] Leemp_offsite: deoxxa: Because if i was going to write it (it's been a long time for me, so i'm probably wrong), i assumed my string would be more like /foo/(?:[.*]+)/baz which, is rather ugly hehe [19:30] brianloveswords has joined the channel [19:30] jetienne has joined the channel [19:31] Leemp_offsite: thinkjson: Well it's a slightly different application in this case, besides, i'd have many more complex questions if i had to use express for this project. :P [19:32] __tosh has joined the channel [19:32] m00p has joined the channel [19:34] rizidoro has joined the channel [19:34] satyr has joined the channel [19:36] callen has left the channel [19:37] Leemp_offsite: Wait, no [.*]+, just .+ i think [19:38] arcanis has joined the channel [19:39] sharkbird has joined the channel [19:39] sharkbird_ has joined the channel [19:39] fantastikibne: mysql lib doesnt work on nodejs? [19:40] shanebo has joined the channel [19:41] shanebo: is it possible to change the name of an npm package? [19:41] fantastikibne: ah sorry wrong question [19:41] fantastikibne: mysql lib doesnt work on windows ? [19:41] isaacs: shanebo: no, but you can unpublish and then publish as the new name/ [19:41] isaacs: shanebo: just update the package.json [19:42] isaacs: then npm unpublish old-name; npm publish [19:42] isaacs: i think you might need --force to remove it entirely, rather than version-by-version [19:42] shanebo: isaacs awesome. quit making everything so easy man ;) [19:42] isaacs: :) [19:44] MatthewS has joined the channel [19:45] sharkbird has joined the channel [19:46] blup has joined the channel [19:47] AAA_awright: But that makes it lose all the package semantics... [19:47] tomasztomczyk has joined the channel [19:48] fairwinds has left the channel [19:49] adrianmg1 has joined the channel [19:49] fracek has joined the channel [19:49] adrianmg1 has left the channel [19:50] Edy has joined the channel [19:50] Edy has joined the channel [19:50] adambeynon has joined the channel [19:50] jbpros has joined the channel [19:50] springmeyer_ has joined the channel [19:51] soapyillusions has joined the channel [19:51] sarlalian has joined the channel [19:52] teadict: ^.- res.send doesn't care if I'm XHR that route, right? [19:52] DarkGrey has joined the channel [19:53] josephmoniz has joined the channel [19:54] deoxxa: https://github.com/deoxxa/node-ginger/blob/develop/README.mkd << i'm horrible at writing readmes, can someone take a look over this and see if i missed anything vital? [19:55] FredrIQ has joined the channel [19:55] laczek has joined the channel [19:55] devdazed has joined the channel [19:56] soapyillusions: deoxxa 'There are some tests' in the documentation section [19:56] deoxxa: ah, good catch [19:57] dwhittle has joined the channel [19:57] soapyillusions: and as a ginger, I like the project's name :P [19:57] deoxxa: \o/ [19:58] devdazed: hi all, something weird when using floats and buffers https://github.com/joyent/node/issues/2527 [19:58] josephmoniz has joined the channel [20:00] davetayls has joined the channel [20:01] letsgojuno has joined the channel [20:02] jxson_ has joined the channel [20:03] shinuza has joined the channel [20:03] jxson_ has joined the channel [20:04] radarig_ has joined the channel [20:05] langworthy has joined the channel [20:05] arcanis has joined the channel [20:05] CoverSlide: yeah that's a javascript thing [20:05] radarig has joined the channel [20:05] devdazed: to keep it correct, shouldnt it drop down to C for this then? [20:06] CoverSlide: i think it's the c that's the problem [20:06] kevwil has joined the channel [20:06] enmand has joined the channel [20:07] brngardner has joined the channel [20:07] CoverSlide: readdouble should be ok [20:07] CoverSlide: cause all javascript numbers are doubles [20:07] CoverSlide: try it [20:07] devdazed: i agree that the doubles work [20:08] devdazed: but the database im reading from gives me a float [20:08] daneroo has joined the channel [20:08] lzskiss has joined the channel [20:08] stride: devdazed: what's the content of the buffer as hex? [20:09] devdazed: 44 9a 43 f3 [20:09] vguerra has joined the channel [20:09] booo has joined the channel [20:09] isufy has joined the channel [20:09] alex__ has joined the channel [20:10] EriksLV has joined the channel [20:11] stride: hm, then 1.2341234130859375E3 is correct, that's the value of that float [20:12] devdazed: no, it should be 1234.1234 [20:12] devdazed: thats what i wrote [20:12] arcanis has joined the channel [20:12] MatthewS has joined the channel [20:13] devdazed: if that's the case then the problem is in wrting to the buffer not in reading from it [20:13] stride: that's not representable in a float [20:13] deoxxa: someone doesn't understand floats [20:14] whitman has joined the channel [20:15] devdazed: a float is 32bits with 24 bits of precesion, what do you mean you can represent that? [20:15] maushu has joined the channel [20:16] lietu: decimals with floats are basically just rough approximations, for example, in JS, 0.1 + 0.2 is not exactly equal to 0.3 [20:16] sharkbird has joined the channel [20:16] devdazed: im aware of the floating point issue in js [20:16] devdazed: but when writing to the buffer, it should come in as it came out [20:17] devdazed: im not doing any math [20:17] lietu: it's not just in js really, it's the definition of floating point [20:17] deoxxa: then you're aware of the floating point issue in floating point numbers [20:17] tmcw has joined the channel [20:17] devdazed: the floating point issue applies to math [20:17] devdazed: not storage of the number [20:18] stride: devdazed: there is no 1234.1234 possible in a 32bit IEE754 float and JS doesn't know that the number in the buffer is the same as what you put in your code, what do you expect it to do? [20:18] devdazed: and if i remember correctly the max for a float is arounbd 3500 [20:19] lietu: basically, if you say "var foo = 1234.1234", if it is stored as a float, it will never exactly store "1234.1234", it will store the closest possible approximation of "1234.1234" [20:19] devdazed: The maximum representable value is (2−2−23) × 2127 ≈ 3.4 × 1038. [20:20] devdazed: that is larger than 1234.1234 [20:20] jbpros_ has joined the channel [20:20] lietu: does not mean it can exactly represent every single value in between max and min [20:20] stride: devdazed: the aximum representable value is irrelevant, not all numbers between -MAX and +MAX are accuratly representable, that's your issue [20:20] herbySk has joined the channel [20:20] lietu: it cannot represent the result of 0.1 + 0.2 exactly as being 0.3, it is something like 0.30000000004 [20:21] devdazed: ok, that makes more sense. i thought you were saying the max was less [20:21] zanefactory has joined the channel [20:21] lietu: which is the losest approximation [20:21] lietu: *closest [20:21] jmar777 has joined the channel [20:21] sebastianedwards has joined the channel [20:21] stride: http://work.failblog.org/tag/use-all-the-ram/ [20:21] stride: :) [20:22] AAA_awright_ has joined the channel [20:22] napperjabber has joined the channel [20:23] CoverSlide: haha [20:23] fantastikibne: is there no any mysql lib for windows :( [20:24] stride: fantastikibne: felixge's node-mysql should work imho, it's just JS [20:25] devdazed: stride: do you know the accuracy of the float? by that i mean the margin of error? [20:25] m00p has joined the channel [20:26] Wa has joined the channel [20:26] stride: should be something around 2^-24 iirc [20:26] methodT has joined the channel [20:26] CoverSlide: protip: never use floats ever [20:27] devdazed: CoverSlide: im writing a driver, it needs to support the data types the db supports [20:27] bicranial has joined the channel [20:27] ashusta_ has joined the channel [20:27] davemo has joined the channel [20:30] diogogmt has joined the channel [20:30] paulwe has joined the channel [20:30] dshaw_1 has joined the channel [20:31] stride: devdazed: http://en.wikipedia.org/wiki/Machine_epsilon the 64bit results match a quick test on v8 so I'd guess 32bits will get you a max error of 2^-24 as well [20:32] devdazed: thanks, it makes it a little easier to write tests if i know the range im supposed to be in :) [20:32] stride: :) [20:33] stride: what db are you talking to? [20:33] bkaney has joined the channel [20:33] zivester has joined the channel [20:33] devdazed: Cassandra [20:33] stride: ah, nice :) [20:33] fairwinds has joined the channel [20:34] devdazed: yeah, driver is almost prime time [20:34] devdazed: https://github.com/simplereach/helenus [20:34] djazz has left the channel [20:34] `3rdEden: Why make another DB driver? [20:35] devdazed: because the current one they have only supports CQL [20:35] `3rdEden: https://github.com/racker/node-cassandra-client [20:35] rohitcolinrao has joined the channel [20:35] devdazed: and it is quite buggy [20:35] `3rdEden: and : http://code.google.com/a/apache-extras.org/p/cassandra-node/ [20:35] devdazed: i tried to submit patches but they were ignored for months [20:36] devdazed: those are the same [20:36] `3rdEden: oh :9 [20:36] theundebruijn has joined the channel [20:36] `3rdEden: yeh just saw they move to apache -_- [20:36] devdazed: they moved the github repo over to apache extras [20:36] rohitcolinrao: hey guys, trying to get a feel on developers' thoughts on coffee… coffee script, yay or nay? [20:36] deoxxa: lol @ apache "no no git is bad" [20:36] devdazed: yeah [20:36] `3rdEden: ok, that I understand it, apache = fail [20:37] devdazed: plus the underlying thrift driver they are using also has bugs and isnt under active delvelopment. im using a patched vversion [20:40] isufy has joined the channel [20:40] tazrover has joined the channel [20:40] colinclark_ has joined the channel [20:42] AAA_awright: Remember when Apache used to be cool? [20:43] AAA_awright: Remember when Firefox used to be cool? [20:43] devdazed: haha [20:43] theundebruijn: *yawn* [20:43] AAA_awright: Now it like No we want to be evil, we want to make your life hard [20:45] markschaake has left the channel [20:45] dmsuperman has joined the channel [20:45] dmsuperman: How can I check if an object is a mongodb ObjectID ? [20:46] dmsuperman: one made by db.bson_serializer.ObjectID() [20:46] devdazed: foo instanceof db.bson_serializer.ObjectID [20:47] tkro has joined the channel [20:47] dmsuperman: even though it's not made with new db.bson_serializer.ObjectID() ? [20:47] akter has joined the channel [20:47] devdazed: oh, you want to check if a string is a valid objectid? [20:47] devdazed: just check the length is 24 [20:47] rohitcolinrao has left the channel [20:47] dmsuperman: No I want to allow a parameter to be either an objectid string or the objectid object itself [20:48] devdazed: otherwise, if the driver returns it as an ObjectID object, insstanceof should work [20:48] tomtomaso has joined the channel [20:48] fantastikibne: Error: Cannot find module 'mysql' :( still i couldnt install mysql lib to windows [20:48] dmsuperman: ObjectID would have no definition in my local scope though [20:48] dmsuperman: I didn't generate the object using the "new" keyword [20:48] dmsuperman: ObjectID() is a method which returns an objectid [20:48] devdazed:  db.bson_serializer.ObjectID should work [20:48] dmsuperman: k [20:48] ecto has joined the channel [20:49] devdazed: if you can do "new  db.bson_serializer.ObjectID" it will work [20:49] robi42 has joined the channel [20:49] aaronmcadam has joined the channel [20:50] dgathright has joined the channel [20:50] seejohnrun has joined the channel [20:51] Destos has joined the channel [20:51] devdazed: dmsuperman: you can also check to see if the object has a method called toHexString, that will tell you if its an objectid, ducktyping and all [20:51] devdazed: like oid.toHexString !== null [20:51] seejohnrun: hey all - getting a segfault locally http://hastebin.com/cawukavugi any ideas? don't have many details to work with and searches aren't turning up much [20:51] devdazed: like oid.toHexString !== undefined [20:51] devdazed: rather [20:51] fantastikibne: https://github.com/felixge/node-mysql/zipball/master i downloaded and extracted to nodejs/mysql so it didnt work :( [20:52] bicranial has joined the channel [20:52] Paul_ has joined the channel [20:53] devdazed: fantastikibne: did you npm install it? [20:53] fantastikibne: devdazed: npm install doesnt work on windows [20:53] Paul_: hi, i am o question with nodejs. can someone help me? [20:53] dmsuperman: devdazed: I'd rather ensure it's directly an ObjectID. instanceof on the method works though, thanks :) [20:53] devdazed: no problem [20:54] Paul_: i try power on server with nodejs with help of cygwin on windoww 7 64 bit [20:54] carlyle has joined the channel [20:55] devdazed: Paul_ why use cygwin? there is a windows version [20:55] postwait has joined the channel [20:55] Paul_: because i want use hg mercurial subversion control with master server [20:55] devdazed: Paul_: iirc they are no longer supporting cygwin [20:56] Paul_: thanks you very much [20:56] dmsuperman has left the channel [20:56] Paul_: if i have another questions i come here for your help [20:57] StanlySoManly1 has joined the channel [20:58] herbySk74 has joined the channel [20:58] carlyle__ has joined the channel [20:59] tmcw has joined the channel [21:01] josephmoniz has joined the channel [21:01] koalabruder has joined the channel [21:02] c4milo has joined the channel [21:02] piscisaureus_ has joined the channel [21:03] soapyillusions has joined the channel [21:04] r04r has joined the channel [21:04] khrome has joined the channel [21:05] langworthy has joined the channel [21:07] ashusta_ has left the channel [21:08] blueadept: does anyone know the lowest transaction amount you can make through stripe? [21:09] Xenadi has joined the channel [21:12] igl1 has joined the channel [21:12] dshaw_ has joined the channel [21:13] JJMalina has joined the channel [21:13] deedubs: blueadept: I would assume .30 which they'll take all of [21:14] patcito_ has joined the channel [21:15] brianc1 has joined the channel [21:16] Xenadi: anyone able to help with node.js issues in win 7 x64? [21:17] patcito has joined the channel [21:18] adrianmg has joined the channel [21:18] adrianmg has left the channel [21:18] Xenadi: im trying to run the example from the main page, all console output works fine, but i cant get the http connection working. Anyone had similar issues or knows of a way i can view an error log? [21:19] kostajh has joined the channel [21:21] FIQ has joined the channel [21:22] paq has joined the channel [21:23] matejv has joined the channel [21:24] Xenadi: is anyone able to offer help? [21:24] sirtophat has joined the channel [21:24] sirtophat: I'm trying to do something with websockets [21:24] sirtophat: the code I found requires lib/ws [21:24] sirtophat: but it isn't there [21:24] blueadept: deedubs: thats what i'm thinking, i fired off an email though hopefully they'll get back today [21:25] lwille has joined the channel [21:25] i42n has joined the channel [21:26] liar has joined the channel [21:27] dharmesh has joined the channel [21:27] sirtophat: I installed node newly from source but the lib folder has no ws in it [21:28] brngardner has joined the channel [21:29] guntha__ has joined the channel [21:29] zanefactory_ has joined the channel [21:30] ecto_ has joined the channel [21:32] c4milo has joined the channel [21:32] radarig has joined the channel [21:33] pV has joined the channel [21:33] Revernd has joined the channel [21:34] akter has joined the channel [21:35] letsgojuno has joined the channel [21:35] ambroff has joined the channel [21:36] LuckySMack has joined the channel [21:37] mjr_ has joined the channel [21:37] jtsnow has joined the channel [21:38] lwille has joined the channel [21:40] torm3nt has joined the channel [21:42] mxbtty has joined the channel [21:43] bnoguchi has joined the channel [21:43] lwille has joined the channel [21:44] jocafa: ultra-repl looks interesting [21:44] davemo has joined the channel [21:44] lzskiss has joined the channel [21:44] ecto has joined the channel [21:44] seejohnrun has left the channel [21:45] lwille has joined the channel [21:45] nibblebot has joined the channel [21:45] pors has joined the channel [21:45] churp has joined the channel [21:45] lwille has joined the channel [21:46] FIQ has joined the channel [21:46] willwhite has joined the channel [21:47] iammerrick has joined the channel [21:48] iammerrick: Anyone ever *made* multipart form uploads with this? https://github.com/felixge/node-formidable [21:48] _dc has joined the channel [21:48] firebalrog: i need a project [21:49] firebalrog: that my boss didn't tell me to do [21:49] colinclark has joined the channel [21:50] iammerrick: isaacs: you recommend formidable here https://github.com/isaacs/multipart-js but i don't see formidable allowing you to write multipart requests. [21:51] isaacs: iammerrick: i think you can send mp requests with request. [21:51] jesusabdullah: you can do multipart with request. [21:51] jesusabdullah: I say this because I've done it. [21:51] tkro has joined the channel [21:51] jtsnow_ has joined the channel [21:51] iammerrick: isaacs: really? mikeals? [21:52] ecto has joined the channel [21:52] iammerrick: isaacs: I am using that already, trying to fake a multipart/form-data request [21:52] iammerrick: jesusabdullah, isaacs: Can I do it using the streaming stuff? [21:52] isaacs: iammerrick: i dunno. [21:52] isaacs: iammerrick: i haven't done any multipart with it [21:53] iammerrick: isaacs: Ah i see. [21:53] iammerrick: jesusabdullah: [21:53] iammerrick: brb [21:53] iammerrick: and thank you guys for the response :-) [21:53] Xenadi: has anyone had any http issues on windows 7? [21:53] icebox has left the channel [21:54] churp has joined the channel [21:54] mark_azevedo has joined the channel [21:55] te-brian2 has joined the channel [21:55] jsurfer has joined the channel [21:55] sirtophat: I'm trying to follow introductory pages on creating node.js websocket servers [21:55] sirtophat: Error: npm doesn't work with node v0.4.9 [21:55] sirtophat: when I try using npm to install socket.io as one said [21:55] matejv has joined the channel [21:55] isaacs: sirtophat: install a version of npm that doesn't require node 0.6 [21:56] isaacs: sirtophat: if you install with the curl|sh, it should get the right one. [21:56] lduros has left the channel [21:56] Nss has joined the channel [21:56] rio{ has joined the channel [21:56] murvin_ has joined the channel [21:57] sirtophat: how did the wrong npm even get installed [21:57] isaacs: sirtophat: dunno :) [21:57] isaacs: sirtophat: or, you could just get node 0.6 [21:57] isaacs: sirtophat: it's better anyway [21:57] GrizzLyCRO has joined the channel [21:58] gr-eg has joined the channel [21:59] k1ttty has joined the channel [21:59] sirtophat: after installing socket.io for 0.7 it's still reporting "socket.io not found" [22:00] markq has joined the channel [22:00] murvin_: hi. question... (i asked in mongoose channel and google group , but no reply yet) .. if I want to connect to a Mongo ReplicaSet by Mongoose, should I just call connectSet, do I need to call connect() again? [22:01] markq: i think it's just connectSet [22:01] murvin_: and for session Data Store, I use connect-mongo. (I tried other DataStore too), but it only let me specify one server, not for replicaSet. is there a way to do it? [22:01] murvin_: markq: thanks. :) [22:02] markq: if you're using express there is express-mongoose that can also save sessions [22:03] markq: I'm not too sure about connect-mongo [22:03] murvin_: oh.. express-mongoose. hmm let me take a look now [22:04] michaelhartau has joined the channel [22:05] zeade has joined the channel [22:05] jtsnow has joined the channel [22:05] mc_greeny has joined the channel [22:05] langworthy has joined the channel [22:07] sirtophat has left the channel [22:08] murvin_: makrq: I'm looking into express-mongoose. doesn't seem thaty have session though [22:09] shanebo: isaacs, does npm care if we add other package.json properties for other automated deployment purposes? [22:09] isaacs: shanebo: nope. [22:09] isaacs: shanebo: extra properties are fine. just make sure nothing else is using the ones you want. [22:09] isaacs: or namespace or whatever. [22:10] isaacs: nodejitsu does this quite a bit [22:10] shanebo: isaacs cool thanks [22:11] ecto: isaacs: what do you think of http://npmtop.com/? [22:11] cmr: Perhaps an extra field of package.json would be useful for custom data that will never conflict? Something like { "extra": {} } [22:11] SirFunk: hey, if i'm working on a node module... how can i specify the local path to the dev version in my package.json so i can test it in my app? [22:12] ecto: SirFunk: you can require() relative to your app [22:12] SirFunk: hmm [22:12] SirFunk: yeah that'll work [22:12] SirFunk: thanks [22:13] admc has joined the channel [22:14] cjm_ has joined the channel [22:14] SirFunk: ecto: if it's a node module do i require the root path? [22:14] TheLifelessOne has joined the channel [22:15] TheLifelessOne: is there any way to have a function called when a module is required? [22:15] TheLifelessOne: like an initialization function [22:15] ecto: SirFunk: yeah, the root of the module [22:15] ecto: TheLifelessOne: (function(){ doStuff(); })(); [22:15] josephmoniz: globally, you can wrap `require()` independently you can just do stuff before the module.export [22:16] devdazed: TheLifelessOne: why would you want to do this? what if the module gets required by several other fiels? what should it do? [22:16] TheLifelessOne: devdazed: yeah, that's true. I didn't think of that. [22:17] murvin_: anyone knows how to connect to replicaSet in connect-mongo? or other Session DataStore will be good too [22:17] isaacs: ecto: neat [22:17] isaacs: cmr: nah, that just puts it in a special place where conflicts will always happen :) [22:18] isaacs: just namespace it with your app name or whatever [22:18] cmr: heh [22:18] bingomanatee: Murvin_ as a rule, you shouldn't be concerned about replicasets/sharding etc. in the ORM. you connect to the parent system and mongo emulates the larger machine state for you. [22:18] gut4 has joined the channel [22:22] BillyBreen has joined the channel [22:22] murvin_: bingomanatee: the concern is that, when nodejs (connect-mongo) connect to Mongo with Replica Set, and only one host is specified . In case of failover of the host I primarily connected to, will it route to the new Mongo Server? [22:22] sh1mmer has joined the channel [22:23] hij1nx has joined the channel [22:23] bingomanatee: You should be able to connect to the routing server, not the individual replicas [22:24] hotchkiss has joined the channel [22:24] hotchkiss: us [22:25] ecto has joined the channel [22:26] iRoj has joined the channel [22:27] SamWhited has joined the channel [22:27] sirtophat has joined the channel [22:28] erichynds has joined the channel [22:29] booo has joined the channel [22:29] Poetro has joined the channel [22:30] sorensen__ has joined the channel [22:31] kriszyp has joined the channel [22:31] CIA-101: node: 03Guillermo Rauch 07v0.6 * r766f609 10/ (doc/index.html doc/pipe.css): [22:31] CIA-101: node: website: Add "Api Docs" button next to "Download" [22:31] CIA-101: node: * Added Docs button and `button` class. [22:31] CIA-101: node: * Refactored download button style into `.button` [22:31] CIA-101: node: * Applied color overrides for download/docs buttons. [22:31] CIA-101: node: * Pointed docs link to latest available docs. - http://git.io/dNekcQ [22:31] StanlySoManly has joined the channel [22:32] bingomanatee: https://github.com/LearnBoost/mongoose/issues/351 sorry, comma separate all the members of the replica set in mongoose anyway [22:33] iammerrick: Anyone familiar with request that can offer some feedback it wuld be greatly appreciated https://gist.github.com/1603562 [22:33] cognominal has joined the channel [22:33] bingomanatee: https://github.com/christkv/node-mongodb-native/blob/master/examples/replSetServersQueries.js documents the native techniques. [22:33] joshfinnie has joined the channel [22:34] JaKWaC has joined the channel [22:34] c4milo has joined the channel [22:35] hij1nx has joined the channel [22:35] JaKWaC has joined the channel [22:36] JaKWaC has joined the channel [22:37] maletor has joined the channel [22:37] shanebo: hey guys is there a way to tell npm to install decencies in a different place than the package.json file? [22:38] isufy has joined the channel [22:38] mc_greeny has joined the channel [22:38] jklabo: I am trying to install 0.6.7, i currently have 0.7pre. What is the best way to do that? [22:38] tommyvyo has joined the channel [22:39] SirFunk: how do i include a local copy to a node module in my project? when i require it's path i get: Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead. [22:39] aesptux has joined the channel [22:40] pgherveou has joined the channel [22:41] xtianw has joined the channel [22:41] AvianFlu: jklabo, `git checkout v0.6.7` [22:41] AvianFlu: or go download the source tarball from nodejs.org [22:41] AvianFlu: the latter is likely easier [22:42] jklabo: Yeah, I did that and did ./configure, make, and make install [22:42] isaacs: shanebo: what are you trying to do? [22:42] jklabo: the install gave me this: Could not install the file '/usr/local/lib/node/wafadmin/Tools/config_c.py' [22:42] tommyvyo has joined the channel [22:43] trotter has joined the channel [22:43] johnnychimpo has joined the channel [22:43] dtrejo has joined the channel [22:43] isaacs: SirFunk: what module? looks like it's doing something bad. [22:43] shanebo: isaacs our typical app structure is '/config/package.json', but running npm install from '/config' installs modules in that same directory. We'd like to install modules in the root of the app [22:43] isaacs: shanebo: npm install --prefix=.. [22:43] isaacs: shanebo: er, no, that won't work, i dont thing... [22:44] isaacs: shanebo: cd config && rm -rf ../node_modules && npm install && mv node_modules ../node_modules [22:44] isaacs: shanebo: or just put package.json in the cwd [22:44] isaacs: cp config/package.json .; npm install [22:44] isaacs: then rm package.json [22:45] isaacs: jklabo: you might need to `sudo make install` [22:45] shanebo: isaacs i was afraid of that :) [22:45] jklabo: isaacs: I'll give that a shot, thanks [22:46] isaacs: shanebo: it simplifies a LOT of code internally in npm to just always assume package.json and node_modules are in the same place. [22:46] tommyvyo has joined the channel [22:46] jklabo: isaacs: that did it, ty [22:46] isaacs: jklabo: nop [22:47] arcanis has joined the channel [22:47] coreb1 has joined the channel [22:47] hij1nx has joined the channel [22:47] Cromulent has joined the channel [22:47] mnutt has joined the channel [22:48] isufy has joined the channel [22:48] shanebo: isaacs, i'm sure it does. it makes perfect sense. i just have ocd issues with config files being loose in project root. Related, question, if the node_modules install in config, will other folders level with config be able to find those modules? [22:49] tomasztomczyk has joined the channel [22:49] isaacs: shanebo: so, if you put node programs in ./config/node_modules/ then a file at ./config/foo/bar.js would see them, but ./foo/bar.js would not. [22:49] shanebo: k [22:49] isaacs: shanebo: it walks up the path looking for node_modules folders in each parent, but it doens't dive into cousin paths. [22:49] k1ttty_ has joined the channel [22:49] shanebo: yep that's what i thought [22:50] markq: how do you type in italics? [22:50] markq: on the irc [22:50] tjfontaine: dear god, please don't. [22:50] dtrejo: *italic* or _italic_ [22:50] isaacs: markq: you just wrap it in your password. [22:50] chapel: /italics/ [22:50] chapel: :P [22:50] dtrejo: isaacs++ [22:50] isaacs: markq: whatever your password is, you put it before and after. [22:50] isaacs: that italicizes. [22:50] isaacs: srsiously, try it. [22:50] isaacs: ;P [22:50] shanebo: :D [22:51] dtrejo: iloveisaacsmomallnightlong hi mark iloveisaacsmomallnightlong [22:51] josh-k has joined the channel [22:51] chapel: izsisawesomeIs this italicized?izsisawesome [22:51] chapel: bah [22:51] al3xnull has joined the channel [22:51] isaacs: hahahah [22:51] dtrejo: mine was better chapel [22:51] chapel: mine was more realistic [22:51] markq: lol [22:51] dtrejo: isaac and I have this wierd mother swapping thing going on, he started it though [22:51] markq: *italic*hello world*italic* [22:52] Aria has joined the channel [22:52] isaacs: dtrejo: i'm sure that i'm not the first one to make some maternal relations joke to you. [22:52] isaacs: is that not a thing that the kids do any more? [22:52] dtrejo: yours was quite developed [22:52] stride has joined the channel [22:52] isaacs: well, i mean, it's an art form. [22:52] dtrejo: my friends are not as good, apparently [22:53] isaacs: i have lots of practice. [22:53] isaacs: with your mom [22:53] Gregor has joined the channel [22:53] isaacs: OH crap, i missed a great opportunity there. that sucks. [22:53] dtrejo: ? [22:53] isaacs: oh well, next time. [22:53] dtrejo: i switched to limechat [22:53] dtrejo: i like it better [22:54] dtrejo: the left right alignment thing, at least with the theme mayo suggested [22:54] lperrin has joined the channel [22:54] torvalamo: your mom likes mayo [22:54] SirFunk: isaacs: i can't require it by path [22:54] SirFunk: it's 'paynode' [22:54] isaacs: SirFunk: it's doing `require.paths` stuff. [22:54] isaacs: SirFunk: that's not supported any more. [22:55] isaacs: SirFunk: so, either paynode is broken, or your code is. [22:55] isaacs: but something is busted. fix that. [22:55] isaacs: SirFunk: you can still require things by path. just require("/full/path/to/thing") [22:55] torvalamo: lol.. "I have a problem" "Well then, something is broken, fix it!" [22:55] mateodelnorte has joined the channel [22:55] SirFunk: isaacs: hmm. i was doing: money_movers = require('../../src/paynode').use('moneymovers') [22:55] chapel: isaacs: did you see the style guide on dailyjs? did you see someone called you out? [22:56] Hanspolo has joined the channel [22:56] AviMarcus has joined the channel [22:57] SirFunk: isaacs: ahh i see, in their code: require.paths.unshift(__dirname); [22:57] SirFunk: derp [22:57] amasad has joined the channel [22:57] erichynds has joined the channel [22:57] isaacs: chapel: huh? [22:57] isaacs: SirFunk: yep, there you go. [22:57] dtrejo: chapel: i was hoping for a mention of http://stella.laurenzo.org/2011/03/bulletproof-node-js-coding/ [22:57] isaacs: SirFunk: please tell them to join the modern era :) [22:57] takumination has joined the channel [22:57] SirFunk: isaacs: i guess i'll try to fix it and send a pull request [22:57] chapel: http://dailyjs.com/2012/01/12/style/#comment-408858908 "The whole semicolon thing is kind of pointless. I don't regard npm author at the same level as TJ and Ryan. Npm author is more opinionated than he should be. His code is ugly." [22:57] AviMarcus: there one main popular mvc type of framework for node.js to make web guis / ORM and the like? [22:58] mrflick has joined the channel [22:58] torvalamo: i dont like semicolons either [22:58] torvalamo: dunno why anyone would [22:59] torvalamo: it's 2012 [22:59] cmr: I like semicolons. [22:59] torvalamo: semicolons are for for-loops and ini comments [22:59] cmr: Not for any functional purpose but stylistically. [22:59] CoverSlide: and lisp comments [22:59] cmr: and asm comments, as long as we're making a list [22:59] sirtophat: I like semicolons because I can put related statements on the same line [22:59] CoverSlide: eww [23:00] torvalamo: omg you monster [23:00] stride: I end every line with //whocares, also: node needs inline assembler [23:00] sirtophat: I don't know if I ever do that but maybe [23:00] cmr: lol [23:00] torvalamo: semicolon is also for catbot [23:00] kickingvegas has joined the channel [23:00] torvalamo: but that's it [23:00] sirtophat: there's also sending a javascript string [23:00] torvalamo: i draw the line there [23:00] cmr: torvalamo: so you take the same stance python does about its semicolons? [23:01] salva has joined the channel [23:01] torvalamo: dunno [23:01] torvalamo: has it changed in the past year? [23:01] subhaze has joined the channel [23:01] cmr: No. [23:01] torvalamo: then yes [23:01] cmr: But they only keep them in to let things like irc bots and stuff work nicely. [23:01] torvalamo: exactly, you do need something in that situation [23:01] gkatsev has joined the channel [23:01] jldbasa has joined the channel [23:02] torvalamo: but that's not a pogramming environment [23:02] jj0hns0n_ has joined the channel [23:02] torvalamo: that's for demo or testing [23:02] cmr: Right [23:02] AviMarcus: so.. what does the community use for mvc type stuff? [23:03] mdel_ has joined the channel [23:03] StanlySoManly1 has joined the channel [23:03] isaacs: i like indenting with semicolons [23:03] isaacs: don't like it? configure your editor to not show them. [23:04] torvalamo: indenting, as in instead of tabs/spaces? [23:04] isaacs: torvalamo: yeah [23:04] torvalamo: that's weird but ok [23:04] isaacs: explicit is better. [23:04] torvalamo: good for you [23:04] torvalamo: :P [23:04] isaacs: do you really want indentation you can't even SEE? how can you trust that? [23:04] MatthewS has joined the channel [23:04] torvalamo: js doesn't care about indentation [23:04] torvalamo: python does [23:04] chapel: lol [23:05] markq: I say to each their own [23:05] torvalamo: you know you can probably configure your editor to show tabs as arrows? [23:05] AviMarcus: ok. good night. [23:05] cmr: The only thing that really matters in a coding style is consistency. Then it can be easily transformed to something else :) [23:06] markq: Exactly [23:06] langworthy has joined the channel [23:06] maletor has joined the channel [23:07] EriksLV has joined the channel [23:07] pt_tr has joined the channel [23:07] TheLifelessOne: how can I get the full URL path from an HTTP request? [23:07] torvalamo: req.host + req.url [23:07] torvalamo: or something [23:07] TheLifelessOne: Ok. Lemme try that... [23:07] torvalamo: add http:// at the starrrt [23:07] shanebo: TheLifelessOne i think it's request.href [23:08] TheLifelessOne: req.host is undefined [23:08] TheLifelessOne: shanebo: alright [23:08] TheLifelessOne: Also undefined. [23:08] torvalamo: host is undefined if it's per ip i think? [23:08] shanebo: TheLifelessOne are you passing req, or request into the function? [23:09] TheLifelessOne: shanebo: request [23:09] TheLifelessOne: I didn't think it matter what the names were [23:09] shanebo: it doesn't [23:09] TheLifelessOne: right. [23:09] shanebo: just making sure you were trying the right object [23:09] torvalamo: request.headers.host [23:09] torvalamo: try that [23:10] TheLifelessOne: I got localhost:1024 [23:10] TheLifelessOne: So there's that. [23:10] TheLifelessOne: There we are. Just concatenate request.url to the end. [23:10] rauchg has joined the channel [23:10] TheLifelessOne: Thanks [23:10] torvalamo: np [23:12] redir has joined the channel [23:12] CarterL has joined the channel [23:14] sh1mmer has joined the channel [23:15] mara has left the channel [23:16] iammerrick: Anyone have any thoughts for this request problem? https://github.com/mikeal/request/issues/154 [23:16] meandi8 has joined the channel [23:17] Sir_Rai has joined the channel [23:17] mateodelnorte has joined the channel [23:18] ovaillancourt has joined the channel [23:19] richardr_ has joined the channel [23:20] chilts: iammerrick: I think you might need to convert the string to a stream, then you can pipe it to request like the example mikeal showed (except he showed it for a file, but same principal) [23:20] iammerrick: chilts: thats the though, but how do i turn a string into a stream? that link is my (rather weak) attempt [23:21] jesusabdullah: iammerrick: If you have the full buffered string already why bother streaming it? [23:21] chilts: heh, true [23:21] iammerrick: chilts, jesusabdullah: I just need a way to send the string up as a multipart/form-data [23:21] bleakgadfly has joined the channel [23:21] jesusabdullah: which is fine [23:21] jesusabdullah: but you don't need a stream for that [23:22] iammerrick: the api I am working with typically receives the upload from a form [23:22] iammerrick: just changing 'content-type' to 'multipart/form-data' and setting my body to the string doesn't work [23:22] iammerrick: jesusabdullah, chilts: I am happy to know how to do it either way [23:22] mandric has joined the channel [23:22] localhost has joined the channel [23:23] jesusabdullah: https://github.com/jesusabdullah/node-sendgrid-web/blob/98592be9e083ca09b81becc4c988f75b2c7a5a9c/lib/sendgrid.js Here's an example with multipart [23:23] jesusabdullah: that I know works [23:23] kickingvegas has joined the channel [23:23] jesusabdullah: (at least with request's head) [23:23] FireBomb has joined the channel [23:24] jesusabdullah: also, https://github.com/mikeal/request has a multipart example in the middle [23:24] jesusabdullah: that you can probably damned near copy/paste [23:24] sebastianedwards has joined the channel [23:24] iammerrick: jesusabdullah: Awesome I will work towards this. Thank yoU! [23:25] jesusabdullah: yw [23:27] robi42 has joined the channel [23:27] remysharp: I'm passing options to http.get - when I pass options with prop path='/search?q=#node' the # is properly encoded, when I pass options using url.parse('..../search?q=#node') it doesn't encode the # character [23:27] remysharp: is that normal or a bug? [23:28] remysharp: I'm going to guess that if it's on the path prop, then it's encoded properly by http.get... [23:31] crescendo has joined the channel [23:33] jhooks has joined the channel [23:34] ryanrolds_w: Ugh. I'm starting to realize that zombie.js isn't great for single page web apps. It completely fails at correctly handling a constructor made in a closure. [23:35] strevat_ has joined the channel [23:36] torvalamo: have you tried angular? [23:36] torvalamo: for your single page web app i mean [23:37] josephmoniz: ryanrolds_w: i'd try something that has headless WebKit [23:37] josephmoniz: like http://www.phantomjs.org/ [23:37] josephmoniz: it's as close as you can get to selenium, without running full browsers [23:38] jeremyselier has joined the channel [23:39] ryanrolds_w: josephmoniz: Thanks. I will check that out. I'm looking for a way to test behavior. I have co-workers pushing to use selenium, but as as I understand it you get in to macro hell. [23:39] josephmoniz: we use selenium for local testing at my work, we don't use it to test any actual user flows though [23:40] josephmoniz: s/local/locale/ [23:40] ryanrolds_w: Ok. [23:40] larsschenk has joined the channel [23:42] nibblebot has joined the channel [23:43] jmar777 has joined the channel [23:44] kickingvegas has joined the channel [23:47] meso has joined the channel [23:48] larsschenk has left the channel [23:48] meso has joined the channel [23:48] ryanrolds_w: Sigh, sid has a package for phantomjs, but it's no backports for squeeze [23:50] joshwines has joined the channel [23:50] sebastianedwards has joined the channel [23:50] mateodelnorte has joined the channel [23:51] jaha has left the channel [23:53] jocafa: https://github.com/DanielRapp/twss.js [23:54] bradleymeck has joined the channel [23:57] joshkehn has joined the channel [23:58] russfrank has joined the channel [23:58] shinuza has joined the channel [23:58] jasonkuhrt has joined the channel [23:59] jasonkuhrt: Has anyone worked with Amazon S3 with node.js? I am using the knox library which works well but I do not seem to be able to convert the xml string into json