[00:00] delian66 has joined the channel [00:01] huskyr has joined the channel [00:01] ryanfitz has joined the channel [00:02] chrisvwebdev has joined the channel [00:03] maxogden: chapter 3 of http://shop.oreilly.com/product/9780596806767.do?sortby=publicationDate explains it in explicit detail but the basic idea is that instead of modifying prototypes you just copy them to a new context specific object [00:03] AvianFlu has joined the channel [00:04] context: can this object specific to me be female ? [00:05] adrianF has joined the channel [00:05] hipsters_ has joined the channel [00:05] maxogden: context: was that an attempt at humor? [00:06] SteveDekorte has joined the channel [00:07] mjr_: I'm pleased to report that node 0.6 uses about half the CPU in our production environment than 0.4 [00:07] rwasielewski has joined the channel [00:08] raincole has joined the channel [00:09] josh9: maxogden: do u recommend this book for someone with basic js experience that want to be a better js and learn node? [00:09] illaaais has joined the channel [00:10] maxogden: josh9: yeah its not great for super beginners but great for intermediate [00:10] AvianFlu: mjr_, win! [00:11] josh9: maxogden: what is the use case for subclassing? is it similar to parent class that it's methods are inherited by his kids? [00:11] mjr_: AvianFlu: have you guys gotten any performance numbers on 0.4 vs 0.6 for your operation? [00:12] AvianFlu: mjr_, we aren't running 0.6 in production yet [00:12] AvianFlu: we've had to port several dozen big libraries, and we're only just now almost there [00:12] josh9: maxogden: i am coming from ruby and used to classical inheritence [00:13] freewil has joined the channel [00:13] maxogden: josh9: yeah you can do it in a way similar to rubys metaclasses where if you change the parent prototype the children will get it [00:13] secoif has joined the channel [00:14] maxogden: josh9: but you can also do one-off non autoupdating subclasses [00:14] mjr_: AvianFlu: we use almost no libraries, so this has made it a lot easier to switch over. [00:14] tomlion has joined the channel [00:14] SteveDekorte has joined the channel [00:14] secoif has joined the channel [00:14] maxogden: josh9: that quote you posted is basically saying dont touch built in prototypes like Array or Object because you might screw up other peoples (or your own) code [00:15] josh9: maxogden: oh. it's simialr to ruby - don't monkeypatch core classes. [00:15] maxogden: right [00:15] squeeks: You mean, like rails does? [00:15] josh9: like, don't add crazy stuff to String class [00:15] josh9: squeeks: i actually love sinatra [00:16] salva has joined the channel [00:16] squeeks: I like sinatra too. [00:16] josh9: (and hope to fall in love with express or https://github.com/flatiron [00:16] josh9: ) [00:16] maxogden: people do dumb stuff in every web framework :) [00:16] _unary has joined the channel [00:16] brianseeders has joined the channel [00:16] squeeks: some frameworks do more dumb stuff than others. [00:17] CoverSlide has joined the channel [00:17] squeeks: My qualm is clear: Rails monkeypatches end up "leaking" into the rest of rubygems because of devs who started Ruby working exclusively with rails can't live with Active* [00:17] salva has left the channel [00:18] squeeks: ... underscore really is the Active* of javascript. as much as that might piss people off. [00:19] edwardw: I need to use older node.js (< 0.6.0), but seems latest npm doesn't work with 0.5.x node.js [00:19] edwardw: is that the case? if yes, is there any workaround? [00:19] isaacs: edwardw: use an older npm [00:19] isaacs: edwardw: npm 1.0 should work with node 0.4 or 0.5 or 0.6 [00:19] isaacs: ircretary: inst edwardw [00:19] secoif has joined the channel [00:19] ircretary: edwardw: `curl http://npmjs.org/install.sh | sh` (or, if there are permission issues, you can try: `curl http://npmjs.org/install.sh | sudo sh`) [00:20] dubenstein has joined the channel [00:20] edwardw: isaacs: i tried to build npm from source, all ended up with a segmentation fault [00:20] isaacs: edwardw: well, that's messed up [00:20] isaacs: edwardw: npm should not be capable of segfaulting [00:20] isaacs: edwardw: if that happens, you've got a broken node install [00:21] edwardw: curl http://npmjs.org/install.sh | sudo sh does't work either [00:22] edwardw: it says: You need node to run this program. node --version reports: v0.5.9. Please upgrade node before continuing. [00:23] SteveDekorte has joined the channel [00:23] FMJaggy: i've seen a case where node and sudo node pointed to different versions [00:24] squeeks: sudo can bollocks up $PATH. [00:24] edwardw: just tried, sudo node and node all reports v0.5.9 [00:24] edwardw: ...report [00:25] mmalecki: yes, that's expected [00:25] Brandon_R has joined the channel [00:25] mmalecki: visudo and set `Defaults !secure_path` somewhere [00:25] Brandon_R: hi [00:26] piscisaureus_ has joined the channel [00:28] murvin has joined the channel [00:28] SteveDekorte has joined the channel [00:28] murvin: anyone knows how to define replicate set in express-session-mongo? [00:29] pitlimit has joined the channel [00:29] pitlimit has joined the channel [00:30] Brandon_R: hey guys [00:30] maxogden: sup [00:30] Brandon_R: any tutorials on cluster for node.js? [00:30] Brandon_R: nm maxogden [00:30] tbranyen: Brandon_R: my gist seems to be popular, but its not a tutorial :-p [00:30] CarterL has joined the channel [00:30] Brandon_R: link please :) [00:30] maxogden: Brandon_R: are you referring to a specific project or the overall concept [00:30] mansoor-s has joined the channel [00:30] Brandon_R: anything is ok at this time [00:31] guidocalvano has joined the channel [00:31] Brandon_R: anything to get me started :) [00:31] tbranyen: https://gist.github.com/1359650 [00:31] maxogden: Brandon_R: youll have to be more specific, what are you trying to achieve? [00:31] mansoor-s: Where can I find documentation on Node's request and response object and their properties/methods? [00:31] tbranyen: Brandon_R: https://gist.github.com/1359650/72e63d317911025dc7325fac4b92ffd381b65099 [00:31] tbranyen: better to get started with that one [00:32] maxogden: oh there is a module called cluster [00:33] tbranyen: yeah baked into core now [00:33] skunkape has joined the channel [00:33] Brandon_R: yep :) [00:33] Brandon_R: what are you guys' thoughts on it? [00:34] willwh: hey guys - trying to compile node from git - make install is not implemented yet? [00:34] willwh: I guess that is for head [00:34] maxogden: willwh: checkout v0.6.4 [00:34] willwh: maxogden: word! :] [00:38] tyler-vortex has joined the channel [00:38] tyler-vortex: So guys, php has php.net, which have an explanation of everything that is used in php. [00:38] tyler-vortex: The nodejs only have this: [00:38] tyler-vortex: nodejs.org [00:38] tyler-vortex: http://howtonode.org/hello-node [00:39] tyler-vortex: I'm trying to use mysql db-node to perform a query in the database, but can not find any documentation about it. [00:39] ShinyDarkness: tyler-vortex: PHP's so-called "documentation" is worse than having nothing at all. [00:40] ShinyDarkness: tyler-vortex: It is full of hastily, sloppily written examples. [00:41] tyler-vortex: see this site [00:41] tyler-vortex: http://nodejsdb.org/db-mysql/ [00:41] zomg: ShinyDarkness: the point is usually not to be perfect but to demonstrate how to use something :P [00:41] tyler-vortex: # in querying [00:41] zomg: Of course the examples left by users are a whole different matter... [00:41] jakehow has joined the channel [00:42] Phlogistique: ShinyDarkness: I think you mean s/'s so-called "documentation"// [00:42] ShinyDarkness: zomg: Nobody says sample code should be perfect, but most examples are not very good ones, and some of them are simply awful. [00:42] zomg: ShinyDarkness: such as? [00:42] ShinyDarkness: zomg: Such as the ones for regular expressions. [00:43] ShinyDarkness: Phlogistique: Yes, that too. [00:43] JmZ: does anyone know of some sort of queue module which i can use to process jobs sequentially (or process a specified number in parallel but no more)? preferrably one i can run "indefinitely", waiting for jobs to be added [00:43] zomg: What's so bad about the examples about regexes? [00:43] isaacs: dshaw_: you around? [00:44] tyler-vortex: but what about the example? 0o [00:44] koo1 has joined the channel [00:46] isaacs: TooTallNate: any objection to `npm unpublish lame@0.0.2`? it's got a big wav file in it. [00:46] isaacs: (0.0.1 and 0.0.3 are fine) [00:46] jerrysv has joined the channel [00:46] TooTallNate: isaacs: no objection [00:46] tyler-vortex: good bye [00:46] TooTallNate: sorry about that [00:46] tyler-vortex has left the channel [00:47] isaacs: np [00:47] adamstantonvan has joined the channel [00:47] TooTallNate: thanks [00:47] isaacs: once a month i look at the biggest packages in the registry, and try to figure out why they're so big. [00:47] TooTallNate: haha, ya that was a whoopsie on my part :p [00:47] dshaw_: isaacs: yes [00:47] dshaw_: isaacs: back [00:47] isaacs: dshaw_: so, you'd mentioned about having an `npm verify` or `npm checkdeps` command [00:48] isaacs: dshaw_: would it satisfy your use-case if we just fixed whatever the hell is wrong with `npm update`? [00:48] dshaw_: isaacs: maybe [00:48] isaacs: k [00:48] dshaw_: isaacs: Really don't want to require the update. Just notify. [00:49] isaacs: dshaw_: what about `npm outdated`? [00:49] isaacs: that works [00:49] dshaw_: So maybe verify is a separate step prior to update. [00:49] isaacs: or maybe it doesn't, and that's why update is busted, i'm not sure. but it *should* do exactly that [00:49] isaacs: outdated is like a dry-run update [00:49] dshaw_: outdated checks against the repository [00:49] isaacs: right [00:49] dshaw_: verify would check against package.json [00:50] dshaw_: isaacs: does that make sense? [00:50] isaacs: and tell you that you have something invalid installed? [00:50] isaacs: doesn't ls already do that? [00:51] dshaw_: isaacs: outdated against the package.json? [00:51] mmalecki: isaacs: hey, I'm trying to set up local registry. when I request registry.local (which is redirected to /registry/_design/app/_rewrite), couch starts spitting out multiple errors like: [00:51] mmalecki: OS Process #Port<0.2308> Log :: function raised exception ["error", "invalid_require_path", "Object has no property \"monkeypatch\". {\"views\":{\"lib\":null},\"_module_cache\":{}}"] with doc._id buster-format [00:51] isaacs: dshaw_: if you have a package that doesn't satisfy the dep, it shows it as invalid, yes [00:52] dshaw_: ACTION runs test [00:52] pichina has joined the channel [00:52] mmalecki: oh, and I had to turn off secure_rewrites [00:52] isaacs: mmalecki: what versino of couch is that? [00:53] mmalecki: isaacs: 1.1.1 [00:53] isaacs: hm… weird [00:53] joaojeronimo: I'm going to write something to allow grafeceful restarts of an app that was forked with the cluster module, pretty much like the cluster module from learnboost (but worse of course). Has anyone done that and would like to share the code ? [00:53] dshaw_: isaacs: yeah, primary issue is related to tarballs [00:53] dshaw_: isaacs: False positives with tarball dependencies [00:54] isaacs: dshaw_: you mean, if you have a dependency like "foo":"http://blah/foo.tgz"? [00:54] Brandon_R: cluster? [00:55] isaacs: dshaw_: how would npm know if that's valid or not, anyway? [00:55] Brandon_R: issacs, any plans on integrating cluster into npm? [00:55] Brandon_R: so it can run on all cores :) [00:55] isaacs: Brandon_R: no plans, no [00:55] Brandon_R: kk [00:55] dshaw_: isaacs: ok no [00:55] jbrokc has joined the channel [00:55] TheLifelessOne: can anyone recommend a websocket server module? [00:55] Brandon_R: socket.io? [00:55] TheLifelessOne: preferably something without bloat. [00:55] isaacs: TheLifelessOne: socket.io [00:56] dshaw_: isaacs: the dependencies were just up-to-date :) [00:56] TheLifelessOne: just pure websockets [00:56] Brandon_R: k [00:56] Brandon_R: there are plenty [00:56] isaacs: TheLifelessOne: maybe this? [00:56] isaacs: websocket.io Socket.IO websocket server =rauchg [00:56] TheLifelessOne: what. [00:57] isaacs: there's a few out there. i haven't used any of them, though [00:57] dshaw_: isaacs: so, if I peg my dependencies on redis 0.6.6, I get a notification from outdated that that package is outdated. [00:57] isaacs: in my experience, if you think you need websockets, what you really need is socket.io [00:57] TheLifelessOne: Possibly, but I don't want all the fallback stuff. [00:58] isaacs: dshaw_: oh, because of that "show newer possibilities" thing. [00:58] isaacs: ugh [00:58] SleepingPrgmr has joined the channel [00:58] isaacs: ACTION wants to rip out update and outdated, and just make `npm install` always do the right hting. [00:58] dshaw_: isaacs: The objective with verify would be to handle when you update your git files and know when you need to run update [00:58] dshaw_: :) [00:58] isaacs: there are too many commands here, tha'ts hte problem [00:59] Me1000 has joined the channel [00:59] isaacs: install, link, rm, ls. that's like 99% of what you need. [00:59] TooTallNate: TheLifelessOne: websocket.io doesn't have fallbacks, it's just pure websockets [01:00] TheLifelessOne: I see. [01:00] davidbanham has joined the channel [01:00] TheLifelessOne: I could have sworn it did... [01:00] TooTallNate: socket.io does fallbacks [01:00] xerox: gotta love link [01:00] TooTallNate: xerox: from zelda? [01:00] Brandon_R: socketio is probably the best node module ever a:) [01:00] xerox: >.< [01:01] TheLifelessOne: https://github.com/LearnBoost/websocket.io this one? [01:01] TooTallNate: TheLifelessOne: indeed [01:01] murvin: hi.. i have question about using mongodb with replica set. [01:01] TheLifelessOne: ok, cool. Thanks. [01:01] murvin: when I set up connection, do I need to specify all the host IP? or mongodb drive is smart enough to discover all primary, secondary hosts? [01:03] JmZ: ok how about this: how can i make async's queue "wait" for tasks? [01:03] JmZ: e.g. if i have a setInterval callback running which adds tasks every n minutes [01:03] dshaw_: isaacs: so if node_modules contains redis 0.6.5 and I update the package.json indicating that we're using 0.6.6, I want to flag that our developers should update. [01:05] merlin83 has joined the channel [01:06] CIA-109: node: 03Ryan Dahl 07v0.6 * r46b6954 10/ doc/index.html : Add link to license file on website - http://git.io/6lJkcw [01:06] cjm has joined the channel [01:08] dshaw_: isaacs: thanks [01:09] chrisvwebdev has joined the channel [01:10] shapeshed has joined the channel [01:12] michaelhartau has joined the channel [01:14] secoif has joined the channel [01:14] simenbrekken has joined the channel [01:14] secoif has joined the channel [01:15] Tuller has joined the channel [01:15] secoif has joined the channel [01:15] josh9: guys, i was in LA node.js meetup last night with ryan dhal and it was awesome. he was talking about his experience that led him to build node. [01:15] josh9: hi tried doing it in ruby - ebb [01:16] josh9: but it was slow due to the language and also the GIL (global interpreter lock) [01:17] AAA_awright: :-\ [01:17] quackquack: when you do an `npm install ` does it copy the folder to `node_modules`? [01:17] AAA_awright: It's stuff like that which makes me question Node.js [01:18] soffi has joined the channel [01:18] isaacs: quackquack: yessir [01:18] simenbrekken has joined the channel [01:18] zomg: btw how do you guys think node compares to something like gevent and twisted? [01:19] isaacs: AAA_awright: stuff like what? [01:19] quackquack: isaacs: alrighty, thanks =D [01:19] isaacs: quackquack: you can use `npm link` to symlink it [01:19] AAA_awright: I'd been looking for a Javascript I/O framework for years, I don't handle the C++ APIs well enough to hack them like ry did, but all the initial engineering mistakes... I shudder at how anyone could have thought stuff like that was acceptable [01:19] zomg: A guy I know who is a python fanboy is always like "you should use gevent/twisted/some-other-lib-of-his instead" [01:19] zomg: =) [01:19] quackquack: isaacs: k, good to know [01:19] AAA_awright: I mean we sort of take it for granted that callbacks are called exactly once, event emitters can be called any number of times, but that wasn't always the case [01:19] zomg: Personally not familiar enough with any of the python solutions to really say anything about it [01:19] AAA_awright: Luckily that was fixed early on [01:20] AvianFlu: zomg, it's the same functionality with harder APIs, a slower language, and a much less robust open-source community [01:20] zomg: Heh [01:20] josh9: there is also eventmachine in ruby [01:21] AAA_awright: Python has entirely the wrong notion of what an event is [01:21] josh9: i really want to try node, but all i do at the moment is websites. and nothing is insane real-time, so i am not sure if node is the right tool. i can do whatever i need with sinatra+backbone at the moment. [01:21] AAA_awright: It's not an evented language, and most aren't [01:22] AAA_awright: Javascript was literally designed for use cases like this so it's a natural fit [01:22] zomg: josh9: no reason you couldn't use node for that, there's some neat libs for it like whatever that one was which dynamically updates your CSS on the fly [01:22] AAA_awright: Also, object model [01:23] josh9: AAA_awright: what do u mean by 'callbacks are called exactly once'. is it a feature in js? [01:23] RobWC has joined the channel [01:23] okuryu has joined the channel [01:23] josh9: zomg: but isn't building a regular website will be a pain in the but since it will reuire a lot of lines that are low level? [01:24] AAA_awright: josh9: If I provide a callback to a function, say, fs.readFile('file', function(err, data){}); that function will be called exactly one time, not twice, not never [01:25] AAA_awright: (if a process exit doesn't come first) [01:25] josh9: AAA_awright: i am not sure why would it be called more times.. [01:25] joaojeronimo: anyone else can't get the redis module to work in NodeJS v0.6.x ? [01:26] AAA_awright: josh9: For fs.readFile maybe, but what about HTTP requests? [01:26] AAA_awright: Or what if the file doesn't exist? [01:27] AAA_awright: It might seem obvious, especially now that it's formally documented, that it's called exactly once, but you should look up the old promises system there was... woa boy [01:27] AAA_awright: That had to go before I would start using Node.js [01:28] AAA_awright: It did in what, 0.3? [01:28] josh9: AAA_awright: interesting. so a while a go you would make a non blocking http request, and your callback might be called twice? [01:28] michaelhartau has joined the channel [01:29] AAA_awright: josh9: Well, like if you have an HTTP server, you don't provide a callback that handles incoming requests, you provide an event [01:29] gavin_huang has joined the channel [01:30] AAA_awright: There is a shorthand where you can provide a default event, but it's not a callback as such, especially since it lacks the error argument as the first argument [01:31] zomg: josh9: yeah it's possible if all you want to do is send a few html files [01:31] zomg: Perhaps you should do some project of your own where you can use node better to its strengths =) [01:31] mikey_p: does anyone still use browserify? [01:31] mikey_p: having lots of problems with it [01:32] rwasiele_ has joined the channel [01:32] josh9: zomg: someone at the meetup last night gave me a good usecase for node - a site that shows the position of cars in a formula-1 race. [01:32] tbranyen: another good use case is if you wanna write javascript [01:33] AAA_awright: ^ [01:33] josh9: you make a call to node, and it creates a long connection that constantly send (via websockets?) data to the browser. [01:33] franksalim: conversely, if you want to write python, there is nothing wrong with twisted or gevent [01:33] josh9: (i guess u have to use modern web-browser for that) [01:33] saurabh has joined the channel [01:34] k1ttty has joined the channel [01:34] zomg: josh9: I think you can use even ie6 =) [01:34] zomg: iirc socket.io actually is capable of that [01:34] Rockj has joined the channel [01:34] Rockj: Q: any problem compiling nodejs under debian squeeze? after compilation I have tests failing in latest stable. [01:35] mikey_p: josh9: if you use something like socket.io it'll use whatever the best method is for each browser, websocket, xhr, flash sockets, etc [01:35] josh9: mikey_p: nice [01:36] josh9: too bad i don't need to monitor formula-1 race anytime soon.. [01:36] zomg: I dabbled with some real time collaboration stuff with node at first [01:36] Rockj: http://pastie.org/2957820 [01:36] josh9: i guess if you have a single page website with many 'chatty' ajax requests, node can be nice as well. [01:36] zomg: basically wrote an editor which would show edits everyone does to everyone else [01:37] zomg: This is my first "real" nodejs project =) www.bf3web.com [01:39] josh9: zomg: i see stuff like this in my network tab - /socket.io/1/websocket [01:39] zomg: Yeah [01:40] franksalim: AAA_awright: i can't resist nitpicking something you said about python v. js. Timers and events aren't in the core JavaScript language, either [01:40] zomg: socket.io is a lib for node which makes real time browser<->server communication really simple [01:41] davidbanham has joined the channel [01:41] AAA_awright: franksalim: How could it? Javascript is a language not a library [01:41] Nuck: Did I see what I think I saw in the node changelogs? [01:41] josh9: zomg: so u wrote both the client and the server with js, right? [01:41] Nuck: Npm integrated into node itself? [01:41] zomg: josh9: yeah [01:41] franksalim: AAA_awright: JavaScript is a language with a few popular runtimes :) [01:41] zomg: most of the client stuff is in socket.io, I just wrote some client side JS which listens to the events socket.io gives it [01:42] AAA_awright: Nuck: I know, we need to find who's responsible for that [01:42] AAA_awright: Not cool [01:42] zomg: and some code on the server end which sends events to socket.io [01:42] Nuck: AAA_awright: I don't care, TBH. [01:42] Nuck: I knew it was bound to happen [01:42] josh9: zomg: do u use any framework like express? [01:42] wojohowitz has joined the channel [01:42] AAA_awright: Nuck: It was bound to happen the same way nuclear winter is bound to happen [01:42] AAA_awright: IT'S NOT A GOOD THING [01:42] Nuck: How's npm on Windows, anyways? [01:43] zomg: josh9: yeah, I use express for serving the pages and templating, sessions and such [01:43] soffi: I feel it is as neccesary as integrating V8 [01:43] franksalim: AAA_awright: the language spec doesn't define events or timeouts. the string 'setTimeout' does not appear in ECMA-262 [01:43] AAA_awright: franksalim: Right [01:44] franksalim: so the event-nature js comes from the runtimes and the community [01:44] AAA_awright: Right [01:44] Wizek-other has joined the channel [01:44] franksalim: the event driven libraries for python make up only a subset of that language community [01:44] AAA_awright: That's how it should be [01:45] franksalim: but the language designs are not, i think, responsible for that [01:46] caolanm has joined the channel [01:46] chrisvwebdev has joined the channel [01:46] josh9: zomg: looks amazing. let me know if i get the highlevel - let's say i go to the /server/ page. you make a call to your node server and the connection stay open between my browser and the server, and you tell node: 'hey, whenever there is an event in the game, send it to me.' and node using socket.io to send it back to the browser. you send back json with data, and your client side render the [01:46] josh9: data with the template. [01:46] fmuzf has joined the channel [01:47] zomg: Sounds about right :) [01:47] jgallen23 has joined the channel [01:47] fmuzf has left the channel [01:47] josh9: zomg: wow, everything is real time, ha? all the scores [01:47] zomg: Most of it is, yes. There are some limitations due to how the BF3 admin protocol works though [01:48] murvin: Wondering.. why Mongo Driver (.e.g Mongoose), has to define all the servers for Replica Set. Can't the driver just connect to one server and get all the hosts from configuration table? [01:48] zomg: For example the scores are fetched every once in a while from the server (I forgot what interval I gave it) [01:48] zooli has joined the channel [01:48] murvin: and keep a copy. [01:48] zooli: hi [01:48] zomg: but the events and chatlog are pushed by the BF 3 server itself [01:48] AAA_awright: Nuck: One of the developers mentioned not even HTTP would have been included in Node.js if it weren't the biggest protocol in use... So WHY THE HELL NPM [01:48] zooli: anyone had success compiling for ARM? [01:48] AAA_awright: People have got to care about stuff like this [01:48] josh9: zomg: what about the UI? do you load all the html+templates when i first go to /server/ ? [01:48] incon has joined the channel [01:49] zomg: josh9: yeah, I used knockoutjs for the UI [01:49] markeeto has joined the channel [01:49] zomg: so it basically has the templates for rendering the UI elements embedded in the basic markup [01:49] josh9: zomg: is it mvc for client side, like backbone? [01:49] zomg: knockout is MVVM [01:49] zomg: So sort of yeah [01:49] isaacs: Nuck, AAA_awright: you realize of course, npm isn't "included in node itself" [01:49] simenbrekken has joined the channel [01:50] isaacs: it's not compiled into the binary [01:50] Nuck: I know that [01:50] isaacs: it's included in teh .pkg and .msi installers, but those are conveniences anyway [01:50] AAA_awright: I don't think you could do that if you wanted to [01:50] AAA_awright: It's still bloat [01:50] isaacs: AAA_awright: python has proven that one can get away with putting all sorts of bloat in a binary [01:50] Nuck: isaacs: What about if I make install? [01:50] AAA_awright: Python is an awful example to compare to [01:50] franksalim: you could do nearly anything if you wanted to. computers. [01:50] isaacs: if we were the sort to want that, then node would not be what it is [01:50] AAA_awright: If in doubt, do it unlike python [01:50] isaacs: AAA_awright: it's the perfect example, since it typifies exactly what i'm talking about [01:51] isaacs: for sure :) [01:51] isaacs: Nuck: ./compile --without-npm [01:51] AAA_awright: That should be the default... but even better it shouldn't be in the source tree at all [01:51] Nuck: isaacs: Aye but the regular make install does compile it? [01:51] Nuck: I think it's good personally [01:51] isaacs: AAA_awright: you're welcome to float that patch in your own own fork :) [01:51] isaacs: Nuck: if you dont' configure it not to, yes [01:52] isaacs: Nuck: in the 0.6 branch [01:52] Nuck: Npm installation was an extra step [01:52] isaacs: yes, a very slow annoying error-prone extra step [01:52] Nuck: Having it in node could help make installation easier [01:52] isaacs: for the vast majority of users, this is a definite improvement. [01:52] marcostoledo has joined the channel [01:52] isaacs: minus the hiccups in 0.6.3, of course [01:52] Nuck: isaacs: i agree entirely [01:52] josh9: zomg: very cool. do u have any complex object models going on there? i am not sure what are the best practices in js for creating and extending objects and scarced to jump onto so many new things at once. [01:52] Nuck: How's npm on windows? [01:52] isaacs: now it's pretty good [01:52] Nuck: Did you get binaries in it yet? [01:53] isaacs: Nuck: no, anything that requires node-waf wont' build [01:53] zomg: josh9: nothing very complicated, it just has a server object which keeps track of players, the map list and things like that [01:53] Nuck: isaacs: So no native modules, k [01:53] isaacs: Nuck: i mean, npm makes an honest go at it [01:53] zooli: http://pastebin.com/fJRnUeZL any tips on make error? [01:53] isaacs: Nuck: if you've got a batch script that can build your thing, npm will run it. [01:53] isaacs: Nuck: but, node-waf stuff, no. [01:53] AAA_awright: I had the same problem with the build system, though last I checked that was gone, thankfully (and replaced with another python system? Ugh) [01:53] josh9: zomg: is this object lives across requests? [01:54] Nuck: isaacs: Could you theoretically take donations and get a windows server to compile addons under minGW or something? [01:54] isaacs: we do need a better approach for binary modules, but there are other bridges to cross first, i think [01:54] zomg: josh9: yeah, they have to because it needs to stay connected to the game servers [01:54] zomg: and of course it makes sense to keep them because otherwise it would always need to query for the data when someone performs a request [01:54] josh9: zomg: what do u mean by 'they'. also, do u use a db? [01:54] adamstantonvan has joined the channel [01:54] zomg: by they I mean the server objects, as there's more than one (there's one per server) [01:55] zomg: it uses mongodb to store server connection details, user access levels and such [01:55] piscisaureus_ has joined the channel [01:56] isaacs: Nuck: it's not really about not having $$, and more about not having time. [01:56] isaacs: Nuck: donate some of THAT. [01:56] isaacs: :) [01:57] Nuck: isaacs: Haha try to convince Microsoft to assign a programmer ;3 [01:57] AAA_awright: Someone who knows a thing or two about compilers should donate their time to my build system/package manager idea :) [01:57] ekryski has joined the channel [01:57] adrianF has joined the channel [01:57] Nuck: They want Node, they should help you out ;D [01:58] AAA_awright: And when I say a thing or two, I mean more then me is necessary, and I use Gentoo :-\ [01:58] isaacs: Nuck: they have! [01:58] isaacs: Nuck: igorzi works for MS [01:58] franksalim: so you've seen a compiler run, then. ;-) [01:58] Nuck: isaacs: Haha well then! [01:59] heavysixer has joined the channel [01:59] isaacs: Nuck: they also have a few other people doing node-related stuff, i think actually doing compilation farms for windows modules is not out of the question. [01:59] isaacs: but not overnight. [01:59] chrisvwebdev has joined the channel [01:59] Nuck: Plus all modules would need some overhauling for Windows compilation, obviously [02:00] mikey_p: is there anyway to search npm by date of release? [02:00] Rockj has left the channel [02:00] odyniec_ has joined the channel [02:00] AvianFlu: mikey_p, replicate the couch and start writing views! XD [02:00] mikey_p: i'm trying to find two versions of two modules that were released around the same time [02:00] isaacs: mikey_p: not at the moment. [02:01] isaacs: mikey_p: but, each package has a "time" object, which tracks when everything was published [02:01] isaacs: mikey_p: so, you CAN write views to do this. [02:01] monokrome has joined the channel [02:01] zeade has joined the channel [02:01] isaacs: mikey_p: or, just use `npm view time` to view it [02:02] JakeyChan has joined the channel [02:03] josh9: zomg: i am looking at the network tab while clicking on different links and it looks like you are sending the client the html + css+ js every time i go no new page. [02:04] zomg: Yeah I didn't bother doing it all with ajax [02:04] josh9: zomg: i also noticed socket.io in each of the pages. is there a reason you send back this js file every time? [02:04] zomg: That's the library [02:04] pizthewiz has joined the channel [02:05] chrisvwebdev has joined the channel [02:05] zomg: Without it, it wouldn't be able to talk to the server [02:05] josh9: zomg: right, but can't my browser cache it or something like this? [02:05] chrisvwebdev has left the channel [02:05] josh9: the same with knockout.js [02:05] zomg: Sure, but it would still need to be linked in order for the browser to know it needs to load it from the cache [02:05] ircdearia has joined the channel [02:06] jonsul: depending on your client-side needs, you shouldn't need to keep reloading the pages either [02:07] zomg: Yeah depends what you're doing really [02:07] zomg: Since my pages are self contained I saw no reason to make it more complex than necessary by implementing ajax page loading [02:07] cgfuh has joined the channel [02:08] insin has joined the channel [02:08] jonsul: Q: i'm looking to proxy a request to a table in our MySQL db via node. Ideally we could keep some ability to sort / limit / query based on simple expressions against the obj [02:09] jonsul: any reqs on a way to start thinking about this with node [02:10] josh9: zomg: got it. thanks for the insights. is there a good sample app for node that you recommend? i don't need any realtime. just simple site where people upload images and other rank them. [02:10] jonsul: would most any do? ie. persistance.js moose [02:10] zomg: josh9: express has some simple examples like a blog or something like that I think [02:10] josh9: zomg: i know i can do that with sinatra, just thinking of learning node. [02:11] polotek has joined the channel [02:11] jonsul: as long as they are ORM is it safe to say you can run simple queries against them / limit results easily [02:11] josh9: zomg: ok. thanks a lot! [02:11] ceej has joined the channel [02:11] zomg: np [02:11] jacobolus has joined the channel [02:12] fermion has joined the channel [02:14] _unary_ has joined the channel [02:14] diminoten: noob questio: does intellij have a Node ide? [02:14] lwille has joined the channel [02:14] zomg: You can use WebStorm [02:15] jldbasa has joined the channel [02:19] samyak__ has joined the channel [02:22] joaojeronimo: anyone else having trouble installing socket.io via npm with nodejs v0.6.3 ? [02:22] diogogmt has joined the channel [02:22] AAA_awright: bnoordhuis: At least someone put an error message about make install in the Makefile [02:22] AAA_awright: ... no bnoordhuis [02:22] EhevuTov has joined the channel [02:26] fr0stbyte has joined the channel [02:27] githogori_ has joined the channel [02:28] AD7six has joined the channel [02:30] ecin has joined the channel [02:31] ace has joined the channel [02:38] brianc has joined the channel [02:38] githogori__ has joined the channel [02:40] ryanfitz has joined the channel [02:42] skm has joined the channel [02:43] marcello3d has joined the channel [02:43] saurabh has joined the channel [02:46] Draco_ has joined the channel [02:47] wilmoore has joined the channel [02:50] fzzzy has joined the channel [02:50] jonsul: joaojeronimo: try -verbose what do you get ? [02:52] joaojeronimo: jonsul: it says it fails to unpack... never got that before... [02:53] joaojeronimo: jonsul: here's the outcome: http://pastebin.ubuntu.com/757762/ [02:54] sdwrage has joined the channel [02:56] lyte_ has joined the channel [02:58] jergason_school has joined the channel [02:58] shapeshed has joined the channel [02:59] jonsul: jaojeronimo: did you try sudo? [03:00] jonsul: do you own that folder? or in that group? have perms? etc? [03:00] truedat101 has joined the channel [03:00] blueadept`: any rubyists here? [03:01] joaojeronimo: jonsul: it shouldn't need sudo, I'm not doing a global install... Yes, I own the folder and have proper permissions (I'm sure of that because I've installed other node modules right before socket.io failed...) [03:02] asoltys has joined the channel [03:03] jonsul: try to cd tmp and wget something tar -xvf it ? [03:04] joaojeronimo: ok just a sec jonsul [03:06] Vennril2 has joined the channel [03:07] dmojoryder has left the channel [03:07] tkaemming has joined the channel [03:07] jonsul: also see if /tmp/npm-1322878357371/1322878357371-0.1804058807902038/tmp.tgz exists? [03:07] jonsul: maybe just failed to download ? [03:07] sorin has joined the channel [03:08] joaojeronimo: jonsul: everything worked nicely... [03:08] FMJaggy: joaojeronimo: i never got 6.3 to work on ubuntu, went back to v0.4 [03:09] FMJaggy: rather, never got the other libraries to work properly [03:09] nso95 has left the channel [03:09] FMJaggy: node itself was find afaik [03:09] wilmoore has joined the channel [03:09] joaojeronimo: FMJaggy: I think my v0.6.2 from chrislea's repository is working fine... but yes, everything is crashing a lot specially with other modules even updated ones... [03:10] sorin has joined the channel [03:12] truedat101 has joined the channel [03:12] joaojeronimo: jonsul: even "sudo npm install socket.io -g" yields that error... [03:13] joaojeronimo: I think I'm going to git pull and then npm link [03:13] jonsul: i'm running .6.4 on ubuntu x64 [03:13] isaacs: joaojeronimo: your version of tar and/or gzip is woefully out of date [03:13] chrisvwebdev has joined the channel [03:13] isaacs: joaojeronimo: you can either update those, or get on the npm alpha which does tar in js [03:14] isaacs: joaojeronimo: curl http://npmjs.org/install.sh | sudo npm_install=alpha sh [03:14] isaacs: of course, you should probably not sudo something you curl. [03:14] joaojeronimo: isaacs: I guess so... it's the latest that CentOS 5 has to offer :( [03:14] davidwalsh has joined the channel [03:14] isaacs: so, you know, download it, read it, etc. then run it as "cat install.sh | sudo npm_install=alpha sh" [03:14] isaacs: joaojeronimo: CentOS is the MSIE of linux [03:14] isaacs: joaojeronimo: lemme guess, tar --version says something like 1.15.1? [03:15] isaacs: if you're lucky, and it's not gnutar 1.12 or something [03:15] joaojeronimo: isaacs: exactly 1.15.1... you're amazing lol [03:15] isaacs: joaojeronimo: i'm not so amazing. it's a very common bug :) [03:15] joaojeronimo: I love CentOS but I wish I could upgrade this box... but I can't... [03:15] isaacs: probably the most common thing that goes wrong is bad system tar versions. bad enough to decide to write tar myself. [03:16] joaojeronimo: isaacs: ohh... so it's really js based tar ?? [03:16] isaacs: joaojeronimo: it is in the alpha versions, yeah [03:16] isaacs: npm 1.1 uses that [03:16] jonsul: @isaacs the new alpha is? sick. [03:16] isaacs: that's the one bundling with node [03:17] joaojeronimo: isaacs: impressive... [03:17] joaojeronimo: isaacs: do you have something separate for that in github ? how do the benchmarks compare (just out of curiosity) [03:18] isaacs: joaojeronimo: it's https://github.com/isaacs/node-tar [03:18] isaacs: joaojeronimo: it's a bit slower than most system tars. [03:18] joaojeronimo: great, thanks isaacs [03:18] isaacs: but it's worth it, to have it not be a black-box [03:18] isaacs: it's also very alpha still. [03:18] isaacs: there are a lot of features missing [03:19] willwhite has joined the channel [03:19] jonsul: @isaacs you gonna be at nodesummit ? [03:20] isaacs: jonsul: i don't think so, no [03:20] jonsul: is it worth it for a dev to go? [03:21] blueadept`: i think i might be going [03:21] tilgovi has joined the channel [03:21] tilgovi has joined the channel [03:21] joaojeronimo: about missing features.. anyone of you knows when Node's new cluster module will have something to handle graceful restarts ? (kill a worker, reload it with a changed .js file, kill other worker then, do the same... workers should be requiring an app file and executing something in it) [03:22] tbranyen: joaojeronimo: i'm doing something kind of like that [03:22] tbranyen: minus the reloading [03:22] tbranyen: from a new file [03:22] blueadept`: jonsul: yes it is worth it [03:22] joaojeronimo: great tbranyen :) did you get inspiration from learnboost's old cluster module ? [03:23] blueadept`: jonsul: some hardcore noders are going to be there [03:23] tbranyen: joaojeronimo: no i just realized that restarting was sometimes necessary heh [03:23] dr0id has joined the channel [03:23] tbranyen: actually loading from a file wouldn't be hard [03:24] tbranyen: i think it'd just be an eval fsReadSync [03:24] tbranyen: or maybe require would be sufficient [03:24] tbranyen: not sure [03:24] joaojeronimo: tbranyen: it's not, I've written something very bad that works like that... [03:24] tbranyen: well eval readFileSync should def work [03:25] tbranyen: gonna implement that in my server right now :-p [03:25] tbranyen: i wanted to break it up anyways [03:25] joaojeronimo: tbranyen: eval fsReadSync ? app = require("./app"); app(); would be enough I think.. [03:26] joaojeronimo: lol tbranyen how about just forking learnboost's cluster and making it use the built in cluster module but with all the 3rd party module juice and REPL and realtime administration things ? [03:26] ryan_stevens has joined the channel [03:28] tbranyen: woot works joaojeronimo [03:29] vkandy_ has joined the channel [03:30] joaojeronimo: great tbranyen :) [03:35] dilvie has joined the channel [03:36] isaacs: down to < 100 emails in the inbox [03:36] tbranyen: joaojeronimo: such a good idea man [03:36] tbranyen: eval(fs.readFileSync("./lib/site.js").toString()); [03:36] tbranyen: yesss [03:37] Marak has joined the channel [03:37] Marak has left the channel [03:37] joaojeronimo: tbranyen: really lol ? why not just require and execute ? all you have to do is export a function in the thing you're going to require.. [03:38] tbranyen: joaojeronimo: i see no benefit to that over this [03:38] tbranyen: this is one line that has the same performance impact of a require [03:38] tbranyen: actually less [03:38] isaacs: tbranyen: eval has crap performance [03:39] joaojeronimo: tbranyen: you're probably right... I just have a possibly healthy aversion to eval lol [03:39] tbranyen: isaacs: compared to setting up an entirely new execution context with require? [03:39] isaacs: it confuses the v8 gremlins [03:39] isaacs: tbranyen: yes. [03:39] isaacs: tbranyen: require() doesn't set up a new context [03:39] tbranyen: isaacs: it used to, thats how it kept local context... ? [03:39] isaacs: tbranyen: unless you have NODE_MODULE_CONTEXT=1 in your environemnt, whcih you probably don't [03:39] insin has joined the channel [03:39] isaacs: tbranyen: no, it's just a closure, man [03:39] isaacs: tbranyen: shared global [03:39] tbranyen: its always been? [03:39] isaacs: yep [03:40] isaacs: unless you set the flag in the env [03:40] isaacs: then it does separate contexts. [03:40] isaacs: but like, no one does that [03:40] isaacs: eval makes your program un-optimizable [03:41] isaacs: tbranyen: it uses the vm.runInThisContext() [03:41] tbranyen: isaacs: i'm look in the source, so Script.runInNewContext is simply a closure under the hood? [03:41] tbranyen: ing* [03:41] unomi has joined the channel [03:42] isaacs: tbranyen: no, we put the closure on it [03:42] isaacs: if (Module._contextLoad) { [03:42] isaacs: skip past that bit [03:42] isaacs: that's where the flag is set [03:42] isaacs: var compiledWrapper = runInThisContext(wrapper, filename, true); [03:42] chrisvwebdev has joined the channel [03:43] tbranyen: oh i see, i guess i always assumed the new context was being used [03:43] isaacs: only if you ask for it [03:43] isaacs: dude, if there was a way to easily make require() be faster, we'd've done it already [03:43] isaacs: there may be hard ways, that aren't worth the complexity overhead. [03:44] tbranyen: at the cost of a separate context tho [03:44] tbranyen: which i thought it had [03:44] isaacs: but the $100 bills on the sidewalks are all already picked up [03:44] isaacs: meh. closures are good enough [03:44] tbranyen: right, but obv i'd think there'd be a diff in perf under the false assumption :-p [03:44] tbranyen: m yb [03:44] isaacs: the thing about eval is that it puts you on the slow path, and you lose the filename thingie on the stack traces. [03:44] isaacs: it's really truly evil [03:45] tracker1 has joined the channel [03:45] tbranyen: oh eval isn't perfect by any means, but it has its uses [03:45] isaacs: evil like diabetes: bad, slow, awful, and 100% avoidable by making better lifestyle choices. [03:45] tbranyen: its like claiming to never use setInterval [03:45] tbranyen: proclaiming even [03:45] tbranyen: or with [03:45] isaacs: note that node does not support setInterval(string) [03:45] isaacs: :) [03:46] tbranyen: oh thats not the only issue [03:46] isaacs: and we do proclaim to never use with(){} [03:46] tbranyen: bah humbug [03:46] isaacs: despite its linguistic awesomeness, it's just too slow. [03:46] isaacs: i love it, too [03:46] tbranyen: templating would never be the same without it [03:46] isaacs: but, no. [03:46] isaacs: it's so bad. [03:46] isaacs: it makes everything slower. [03:46] tbranyen: it needs it [03:46] isaacs: anyway.. it's bike time. have fun :) [03:47] tbranyen: later man [03:47] tbranyen: some day you will join me in the dark side [03:50] Marak has joined the channel [03:50] joemccann has joined the channel [03:50] davidascher has joined the channel [03:50] jesusabdullah: the dark side of what? [03:50] jesusabdullah: ...of the moon? :o [03:51] Aria has joined the channel [03:51] Marak: whats the max message size in bytes that you'd expect a JSON message sent over an RPC to be, before it was time to use streams? [03:52] Marak: i'm trying to figure out a good number to set as a fixture for hook.io messages [03:52] Marak: var fixture = new Buffer(50000).toString('utf8'); [03:52] dilvie has joined the channel [03:53] Marak: var fixture = new Buffer(10000).toString('utf8'); ? [03:53] Marak: any ideas? [03:59] dilvie has joined the channel [03:59] seebees has left the channel [04:00] broofa has joined the channel [04:03] sorin has joined the channel [04:04] FugueNation has joined the channel [04:05] sorin has joined the channel [04:09] Kunda has joined the channel [04:10] joaojeronimo: Marak: are you optimizing for performance or for making sure the message will fit in the buffer ? [04:10] Marak: joaojeronimo: just trying to sort out a reasonable size that people can expect to always work [04:11] Marak: joaojeronimo: where its like, you've hit X, it's time to start using streams instead [04:11] joaojeronimo: Marak: ok got it... it's a bit subjective and a matter of opinion isn't it ? [04:11] Marak: joaojeronimo: yes [04:12] joaojeronimo: Marak: I'd say 10000... [04:13] Marak: joaojeronimo: that seems small i think. id like to be able to send the entire contents of an HTML page in a message, that seems like a decent litmus test [04:16] joaojeronimo: Marak: Google says the average length of an html document is 376kb (http://code.google.com/speed/articles/web-metrics.html), if all of them follow a normal distribution blablabla, I think you'd be fine if you make room for.. 450kb ? But that seems toooooo much... [04:16] Marak: so is that like , 450000 ? [04:17] Dulak has joined the channel [04:17] AvianFlu: 460800 [04:18] Marak: im compiling against node 0.6.4 now instead of 0.4.12 to see if it affects the problem im seeing [04:18] stankel has joined the channel [04:19] joaojeronimo: too bad they don't tell the standart deviation in the report... I can't make an educated guess at that, even that mean of 376kb seems huge for me... [04:20] amigojapan has joined the channel [04:21] joaojeronimo: Marak: can you tell us what you conclude later (just curious) ? are you doing some sort of a benchmark of streams in both versions ? [04:22] Marak: joaojeronimo: it will be checked into hook.io soon [04:22] Marak: joaojeronimo: for messaging test fixtures [04:22] joaojeronimo: Marak: ok great [04:22] Marak: joaojeronimo: i fixed a remote garbage collection bug, but i need to know what size to test against [04:26] appinsanity-mike has joined the channel [04:27] Wizek-other has joined the channel [04:28] Marak: Illegal instruction [04:28] Marak: lol [04:28] Marak: awesome [04:35] alejandromg has joined the channel [04:35] pixel13 has joined the channel [04:35] trepan has joined the channel [04:36] pixel13 has left the channel [04:36] skm has joined the channel [04:37] kazupon has joined the channel [04:38] indexzero has joined the channel [04:39] wojohowitz has joined the channel [04:41] saikat has joined the channel [04:41] Leemp has joined the channel [04:41] deedubs has joined the channel [04:42] davidascher has joined the channel [04:42] pizthewiz has joined the channel [04:43] zeade has joined the channel [04:47] shapeshed has joined the channel [04:52] rauchg has joined the channel [04:54] davidascher has joined the channel [04:55] TooTallNate has joined the channel [04:57] cipher__ has joined the channel [05:00] cjm has joined the channel [05:01] ruzu has joined the channel [05:05] k1ttty has joined the channel [05:08] TheLifelessOne has left the channel [05:10] willwh has joined the channel [05:13] ciju has joined the channel [05:20] rurufufuss has joined the channel [05:21] blueadept` has joined the channel [05:21] dthompso99: hah, sweet use for node.... home automation [05:21] Leemp has joined the channel [05:23] buu has joined the channel [05:24] fr0stbyte has joined the channel [05:27] sorin has joined the channel [05:27] isaacs_mint has joined the channel [05:28] gut4 has joined the channel [05:33] shiawuen has joined the channel [05:33] jakehow has joined the channel [05:36] Dreamer3 has joined the channel [05:38] mike5w3c has joined the channel [05:38] k1ttty has joined the channel [05:38] kickingvegas has left the channel [05:39] k1ttty has joined the channel [05:39] TheLifelessOne has joined the channel [05:39] msch: hi guys, i'm starting with node, what's the best way to solve the CPS-madness? http://tamejs.org/ ? [05:39] TheLifelessOne: does node have a raw socket interface? [05:40] adamstantonvan has joined the channel [05:40] benvie has joined the channel [05:42] davidascher has joined the channel [05:45] ciju has joined the channel [05:46] keltus|zZzz has joined the channel [05:50] simenbrekken has joined the channel [05:50] marcello3d has joined the channel [05:51] TooTallNate has joined the channel [05:53] samyak__ has joined the channel [05:55] towski has joined the channel [05:55] strmpnk has joined the channel [05:57] boltR has joined the channel [05:59] samyak__ has joined the channel [06:00] lyte has joined the channel [06:00] lyte has joined the channel [06:03] joshfng has joined the channel [06:06] samyak__ has joined the channel [06:11] ryanfitz has joined the channel [06:14] smathy has joined the channel [06:15] saurabh has joined the channel [06:18] stankel: hmm [06:18] stankel: trying to install node on a fedora ec2 instance [06:18] willwh: stankel: ok [06:18] hypeBoy has joined the channel [06:18] stankel: Could not retrieve mirrorlist http://nodejs.tchol.org/mirrors/nodejs-stable-flatest error was [06:18] stankel: 14: PYCURL ERROR 22 - "The requested URL returned error: 404" [06:18] stankel: using yum [06:19] stankel: following the instructions on https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager [06:19] willwh: git clone I wouldn't use yum [06:19] willwh: wups [06:19] willwh: I wouldn't use a package manager [06:19] willwh: clone the git repo for node [06:19] willwh: cd node && git checkout v.0.6.4 [06:19] medice: package managers cant keep up with updates [06:19] willwh: ./configure [06:19] willwh: make [06:19] stankel: k cool thanks [06:20] willwh: sudo (if needed) make install [06:21] Leemp2 has joined the channel [06:22] wojohowitz: is the next nodeup tomorrow? [06:23] samyak__ has joined the channel [06:25] hypeBoy: please tell me any tutorial for beginners [06:27] willwh: hypeBoy: http://lmgtfy.com/?q=nodejs+tutorials [06:28] wojohowitz: hypeBoy, http://goo.gl/r8cPX [06:28] wojohowitz: thats a pretty complete link list there [06:30] wojohowitz: hypeBoy, there's also a couple of open source books you can look at, there's links to them in that link i sent b4 [06:31] reid has joined the channel [06:35] hypeBoy: thnk you v much [06:35] tilgovi has joined the channel [06:35] tilgovi has joined the channel [06:35] ekryski has joined the channel [06:35] hypeBoy: ACTION hahaha [06:42] Dreamer3 has joined the channel [06:44] RobWC has joined the channel [06:44] samyak__ has joined the channel [06:45] ryan_stevens has left the channel [06:45] wolftankk has joined the channel [06:46] kazupon has joined the channel [06:49] brokenjames has joined the channel [06:50] tilgovi has joined the channel [06:50] tilgovi has joined the channel [06:52] cjm has joined the channel [06:52] maletor has joined the channel [06:54] samyak__ has joined the channel [06:56] asoltys has joined the channel [06:57] cipher__: Hi, I just starting node.js and learning js... I am just messing around with the test code: http://pastebin.com/HKWbBDYm , I cannot figure out why it's not deleting the appropriate index in the array "connections_". [06:57] whotemp has joined the channel [06:57] cipher__: Would appreciate any help [06:58] whotemp has left the channel [07:01] joshkehn has joined the channel [07:01] joshkehn has left the channel [07:02] dilvie has joined the channel [07:08] SamuraiJack has joined the channel [07:11] samyak__ has joined the channel [07:14] skm has joined the channel [07:17] stankel has left the channel [07:19] maxogden: DROPPING BEATS ON THIS CHANNEL SUP http://www.youtube.com/watch?v=OuIseuaCals [07:20] willwh: hi maxogden [07:20] raincole has joined the channel [07:21] alystair has joined the channel [07:22] maxogden: willwh: are you will wheaton!? [07:22] benvie: hweaton [07:23] willwh: aha, no. [07:23] maxogden: dang [07:23] willwh: I think he is wil wheaton [07:23] willwh: william wilson hetherington :p [07:23] willwh: that's where it comes from. [07:23] benvie: yeah that guy forgot the second l [07:23] maxogden: hetherington seems like it has one too many phoneme [07:23] samyak__ has joined the channel [07:24] willwh: nope http://en.wikipedia.org/wiki/Wil_Wheaton [07:25] ace has joined the channel [07:31] madhums has joined the channel [07:34] TheFuzzball has joined the channel [07:39] N0va` has joined the channel [07:43] alek_b has joined the channel [07:43] sdwrage has joined the channel [07:45] lxsameer has joined the channel [07:46] NewCoder has joined the channel [07:48] Diaoer has joined the channel [07:49] skm has joined the channel [07:50] samyak__ has joined the channel [07:51] lwille has joined the channel [07:52] arcanis has joined the channel [07:54] leonhardtwille has joined the channel [07:55] idefine has joined the channel [07:56] RORgasm_ has joined the channel [07:56] RORgasm_: hey guys [07:56] RORgasm_: just started a new expressjs project [07:56] churp has joined the channel [07:57] RORgasm_: and wondering if i'm just loosing it or not making sense :) [07:58] RORgasm_: i have this as one of my routes http://pastie.org/2958734 [07:58] RORgasm_: wihtin the index route [07:58] RORgasm_: i'm trying to make an api get request to another site using the connect module [07:58] RORgasm_: i'm then trying to pass the reponse from that api request to render index.ejs [07:59] idefine has joined the channel [07:59] RORgasm_: looks like its never making that api request [07:59] RORgasm_: or setting 'bar' which is the body of the external api request i'm trying to make [08:00] RORgasm_: am i missing something here? [08:00] jbpros has joined the channel [08:02] tomlion_ has joined the channel [08:03] simenbrekken has joined the channel [08:06] boltR has joined the channel [08:12] RORgasm_: nevermind [08:12] RORgasm_: i was being stupid [08:12] p1d has joined the channel [08:13] skm has joined the channel [08:16] rendar has joined the channel [08:16] ecin has joined the channel [08:17] tvw has joined the channel [08:17] HT has joined the channel [08:18] _dc has joined the channel [08:19] harthur has joined the channel [08:19] tomyan has joined the channel [08:20] lorfds has joined the channel [08:22] nils_r has joined the channel [08:23] dr0id has joined the channel [08:23] shapeshed has joined the channel [08:32] guidocalvano has joined the channel [08:32] whitman has joined the channel [08:34] buu has joined the channel [08:35] lxsameer: does any one used socket.io with rabbit.js before ? [08:35] robotmay has joined the channel [08:36] fangel has joined the channel [08:37] huskyr has joined the channel [08:39] arcanis has joined the channel [08:40] jbpros has joined the channel [08:43] tomlion has joined the channel [08:44] jrbran has joined the channel [08:47] Druid_ has joined the channel [08:47] langworthy has joined the channel [08:49] samyak__ has joined the channel [08:51] msch: hi, i'd like to use connect 2.0 alpha on node 0.6, but it's not in the npm registry. can someone tell me how i can make npm depend on the git version (like gembundler in the ruby world) [08:51] whitman: msch, just use the git:// url as the version [08:51] msch: whitman: thanks! [08:52] k1ttty has joined the channel [08:52] luxigo has joined the channel [08:54] skm has joined the channel [08:55] lyte_ has joined the channel [08:55] lorfds has joined the channel [08:55] No9 has joined the channel [09:01] msch: anyone using tamejs? [09:02] Yinka has joined the channel [09:03] versicolor has joined the channel [09:08] NetRoY has joined the channel [09:08] OSInet has joined the channel [09:09] confoocious has joined the channel [09:10] FugueNation has joined the channel [09:11] stonebranch has joined the channel [09:11] robotmay has joined the channel [09:12] langworthy has joined the channel [09:12] jetienne has joined the channel [09:13] mc_greeny has joined the channel [09:14] mc_greeny has joined the channel [09:17] mc_greeny has joined the channel [09:19] Nuck: So, I want some advice: where would be a good place to lodge user uploads if not S3? [09:20] jsurfer has joined the channel [09:20] maletor has joined the channel [09:22] MUILTFN has joined the channel [09:24] jimt has joined the channel [09:24] OSInet: CloudFiles is good for that. No idea whether someone biult support for their api on node [09:26] Yinka: Please how do i get npm on my windows [09:27] lzskiss has joined the channel [09:27] lzskiss: yo [09:27] ecin has joined the channel [09:27] Nuck: :I [09:27] Nuck: I meant a good location on a filesystem, but I guess I'll just figure it out myself [09:30] loob2 has joined the channel [09:31] ciju has joined the channel [09:32] huskyr has joined the channel [09:34] jimt has joined the channel [09:35] AvianFlu: OSInet, https://github.com/nodejitsu/node-cloudfiles :D [09:36] TheJH has joined the channel [09:36] p1d has joined the channel [09:39] d0k has joined the channel [09:42] mraleph has joined the channel [09:43] ciju has joined the channel [09:44] OSInet: AvianFlu: good to know, thx [09:45] jacobolus has joined the channel [09:52] fly-away has joined the channel [09:59] mandric has joined the channel [10:01] thalll has joined the channel [10:01] CodeRarity has joined the channel [10:05] drostie has joined the channel [10:07] drostie: My "promises" module now allows me to write the following synchronous-looking asynchronous code: http://www.bpaste.net/show/20672/ :D [10:07] drostie: It's still a little bit ugly, but it kind of works ^_^ [10:09] drostie: The only major problem is that javascript operators like + are synchronous. [10:11] jetienne: drostie: ugly it is :) [10:11] adambeynon has joined the channel [10:11] jetienne: drostie: consider putting the template outside of the code, it would make it easier to read i think [10:11] shapeshed has joined the channel [10:12] k1ttty has joined the channel [10:12] Margle has joined the channel [10:13] drostie: jetienne: yeah, and the templates should probably be different depending on whether you're logged in anyways, so I can always move template_fill inside the "then" function. :D [10:13] spolu has joined the channel [10:14] criswell has joined the channel [10:14] drostie: The point is, it calls read_file() without reading the file, and the system later determines that it shall read said file. :D [10:16] insin has joined the channel [10:20] boltR has joined the channel [10:21] shapeshed has joined the channel [10:21] boltR has joined the channel [10:21] drostie: Wow. Actually, given the combinatorics, when I try to write the equivalent in Node.js it actually looks much, much, much uglier. o_O. [10:22] drostie: "vanilla" Node.js, I mean. [10:24] smh has joined the channel [10:25] OSInet has joined the channel [10:25] jetienne: personnaly i use a 20liner to handle callbacks [10:26] npa has joined the channel [10:26] NetRoY has joined the channel [10:31] epa_ has joined the channel [10:31] skm has joined the channel [10:31] ph^ has joined the channel [10:33] niftylettuce: jetienne: hello \o [10:33] jetienne: niftylettuce: hi :) [10:36] michaelhartau has joined the channel [10:36] tlynn has joined the channel [10:36] AndreasMadsen has joined the channel [10:42] petrjanda has joined the channel [10:44] markwubben has joined the channel [10:44] maushu has joined the channel [10:45] drostie: So if I'm not mistaken, here's what the same idea looks like in Node without my library. Am I missing something crucial that would make this less ugly? http://www.bpaste.net/show/20673/ [10:47] buu has joined the channel [10:50] drostie: Oh, and the Node.js version contains at least two bugs; you get points if you can spot them. :P [10:52] Brandon_R has joined the channel [10:54] p6 has joined the channel [10:55] herbySk has joined the channel [10:55] kazupon has joined the channel [10:56] drostie: Then again, as I look at this code more, the extra "map" overhead can almost certainly be eliminated by offloading it somehow into the database query, which is I think what's ugly about both approaches. :o [10:57] drostie: It's the old PHP+MySQL advice of "don't loop through database queries in PHP unless you absolutely have to." [11:06] brainproxy: drostie: maybe find some way to lift the callback/continuations into some "higher order plumbing", so it doesn't have to be explicit in any one script [11:08] NetRoY has joined the channel [11:08] jetienne: https://github.com/jeromeetienne/gowiththeflow.js what i use to make callbacks more readable [11:09] NetRoY: any EJS users here ? [11:09] robhawkes has joined the channel [11:09] NetRoY: how to use variables inside strings in EJS ... is there anything like ${variable} [11:10] AndreasMadsen_ has joined the channel [11:10] jetienne: NetRoY: there is. you can even change the escaping strings [11:10] jimt_ has joined the channel [11:11] AndreasMadsen_: C [11:12] NetRoY: jetienne: i have a ejs template that uses partials ... like -> <%- partial("pages/X/Y/Z") %> i want Z to be a value that i'm passing in the render call [11:12] saesh has joined the channel [11:13] AndreasMadsen_: Could someone give me feedback on my cluster 2.0 pull request, https://github.com/joyent/node/pull/2038 [11:14] drostie: brainproxy: that sounds almost right, but you'd have to implement the "callback for this entire list" thing separately anyways, or else risk calling back twice for different errors in the list. :x [11:15] confoocious has joined the channel [11:15] confoocious has joined the channel [11:15] jetienne: AndreasMadsen: my feedback is "summarize it". your pull request is super long [11:16] salva has joined the channel [11:16] mikl has joined the channel [11:16] lzskiss has joined the channel [11:16] salva has left the channel [11:16] AndreasMadsen_: The documentation can be found here: https://github.com/AndreasMadsen/node-1/blob/master/doc/api/cluster.markdown – summarize is the first 3 line in the beginning. [11:17] samyak__ has joined the channel [11:18] ppcano has joined the channel [11:18] AndreasMadsen_: The most important part is events like listening, isolateing internal messages from the userland and the autoFork method. [11:19] martin_sunset_ has joined the channel [11:19] buu has joined the channel [11:19] mange has joined the channel [11:21] jetienne: AndreasMadsen: there are several libraries doing stuff in this direction, why yours should go in core ? [11:21] samyak__ has joined the channel [11:22] jetienne: AndreasMadsen: (here im just asking normal/regular questions, im not the one who will say yes/no, but i think you need to have an answer to those) [11:22] drostie: jetienne: this looks clever but surprisingly complicated. ^_^ [11:22] AndreasMadsen_: Things like the like the listening cant be implemented easily using the existing API. [11:23] jetienne: drostie: yep i reduce the amount of line to keep it under 20 lines... it was readable up to 30lines :) [11:23] kpko-fn has joined the channel [11:24] AndreasMadsen_: There was also internal message in the existing API, and those wasn't isolated from the userland, why anyone make a module to do that. [11:24] Brandon_R: Very nice work dude [11:24] DennisRasmussen has joined the channel [11:24] thalll has joined the channel [11:24] Brandon_R: Reading the documentation now [11:24] jetienne: ' a 'listening' event is automaticly assigned to the server instance' <- what do you mean by assigned ? same as sent/emitted ? [11:24] Brandon_R: i like the autofork [11:25] AndreasMadsen_: The listening event is propergated to the master. [11:25] Brandon_R: i have a question [11:25] AndreasMadsen_: Yes? [11:25] jetienne: "are determed by workers" typo in readme [11:26] AndreasMadsen_: Also remember that it fix the #2060 issue. [11:27] jetienne: i dont understand what you mean by assigned. but you can communicate between thread by socket and/or fd with current API. this is how it is done in other lib [11:27] Brandon_R: since clusters can communicate across cores, can it be extended like erlang to nativly communicate across machines or am i getting the wrong idea here? [11:27] salva has joined the channel [11:27] AndreasMadsen_: english is my second language so properly yes, how do you understand that? [11:27] TheJH has joined the channel [11:28] Brandon_R: ok [11:28] No9 has joined the channel [11:29] Brandon_R: lso [11:29] Brandon_R: also [11:29] AndreasMadsen_: @Brandon_R yes the idear it easy communication between cores, i have never worked with multiply machins but I have tried to think that intro the cluster 2. [11:30] Brandon_R: shouldn't for (var i = 0; i < numCPUs; i++) { be for (var i = 0; i < numCPUs - 1; i++) { since the mater worker takes up 1 core? [11:30] Brandon_R: or it could use something like zeromq or rabbitmq [11:30] mike5w3c_ has joined the channel [11:30] Brandon_R: to communicate instead of a shared state [11:31] aliem has joined the channel [11:31] braoru has joined the channel [11:31] AndreasMadsen_: I really don't know, I think the master use so little CPU power that you want to have CPUnum workers, also remember the setupMaster({workers: CPUs-1}) [11:31] jetienne: Brandon_R: i assume it is because the master doesnt do much, so it doesnt need a full cpu [11:32] liar has joined the channel [11:32] Brandon_R: oh [11:32] jetienne: as AndreasMadsen just said :) [11:33] Brandon_R: this cluster module is making me feel like a little kid on xmas morning [11:33] drostie: heh. [11:34] drostie: Andreas, you should have waited until Monday and called it a Sinterklaas gift. ^_^ [11:34] mmalecki: wtf [11:35] AndreasMadsen_: I am very happy that you think so, after working on this so long without any comments, it is nice to get some thanks := [11:35] mmalecki: I just did a / search in vim [11:35] mmalecki: switched to chrome [11:35] mmalecki: pressed ctrl+f and it popped out with search string from vim [11:35] mmalecki: os x, chrome dev and mvim [11:36] Brandon_R: i need to learn vim or emac [11:36] Brandon_R: which one? [11:36] kpko-fn: vim [11:36] Brandon_R: i'll just use both [11:37] drostie: Start with vim. When you get confused, try emacs. When you get even more confused, go back to vim and spend two months with it. Then you will be able to use vim. :D [11:37] Brandon_R: lol [11:37] Brandon_R: what are some cool large node.js projects? [11:37] Brandon_R: like express or hookio but less well known? [11:37] Brandon_R: i want to show them some love [11:37] jetienne: or use an editor which is not from early 1980 :) [11:37] mmalecki: jetienne: LIES [11:38] Brandon_R: textmate on mac or sublimetext are some cool ones [11:38] jetienne: true, vi is from early 70 :) [11:38] mmalecki: Brandon_R: nide [11:39] mmalecki: I mean, as a project to contribute to [11:39] mmalecki: as a editor, you should use vim [11:39] Brandon_R: do all of you guys use vim? [11:39] jetienne: nah [11:39] jetienne: i use a modern editor [11:39] Brandon_R: i thought you guys seemed like a full ide environment kind people lol [11:40] jetienne: i can adapt to non 1970 editor :) [11:40] drostie: I've been using kate for a while now. It has some irksome properties but is otherwise good. [11:40] Brandon_R: lol thought so :D [11:40] Brandon_R: i like aptana studio because i can type node commands right into the built in terminal [11:40] Brandon_R: but it's soo slow and java based [11:41] drostie: Truly, we need an implementation of a windowing toolkit for Node, that we may build our own text editors in it. :x [11:41] pandark_ has joined the channel [11:42] AndreasMadsen_: I use cloud9 localhost because it is JavaScript. [11:42] jetienne: drostie: do it in html [11:42] kpko-fn: See, vim is fast because its very lightweight. Though you can use plugins to get some IDE features. [11:42] jetienne: AndreasMadsen: is it opensource ? [11:42] drostie: Actually, now that I think about it, Node is C++ and so you could probably just combine it with Qt. :x [11:42] AndreasMadsen_: Yes [11:42] Brandon_R: are you guys unixy like use the right tool for the job and have lots of tools or more windows like with a full environment in one program? [11:42] jetienne: AndreasMadsen: cool i wasnt aware of that [11:42] AndreasMadsen_: https://github.com/ajaxorg/cloud9 [11:42] Brandon_R: don't we have to pay for cloud nine? [11:42] Brandon_R: c9.io? [11:43] Brandon_R: or is the github version a slimmed down version [11:43] drostie: honestly I'm a little of both. I don't like navigating through menus, for example. [11:43] jetienne: vi is cool on a 8086 4mgz [11:44] jetienne: but i got a much faster computer now :) [11:44] AndreasMadsen_: c9.io is free if you go only public, like GItHub. The GitHub version is 100% free. [11:44] mc_greeny has joined the channel [11:44] drostie: The point is, nobody is recommending emacs because emacs is not a text editor -- it is an operating system with potential text editing applications. ^_^ [11:44] eeemsi: hi there [11:44] AndreasMadsen_: There has also been posts about getting the c9.io interface to the local (GitHub). [11:45] eeemsi: did someone play with sqlite and sqlite3 npms? [11:47] N0va` has joined the channel [11:50] Brandon_R: not me [11:50] Brandon_R: i use mongodb because it fits my needs [11:51] wolftankk has joined the channel [11:53] Renegade001 has joined the channel [11:54] AndreasMadsen_: I have to leave, if anyone has feedback on the cluster 2.0 https://github.com/joyent/node/pull/2038 please tell me. I will look at the documentation spelling again, but it is hard work. [11:55] kpko-fn: some regexp guy here? [11:58] hipsters_ has joined the channel [11:59] marcostoledo has joined the channel [11:59] samyak__ has joined the channel [12:00] k1ttty has joined the channel [12:01] airborn has joined the channel [12:04] TheJH: kpko-fn, what's a regexp guy? Many people here know regexps, but I guess nobody here knows how much he has to know in order to be able to solve your problem [12:04] TheJH: kpko-fn, short: don't ask to ask [12:05] TheJH: is there anything like the "network" tab of the chrome dev console yet? [12:05] kpko-fn: yeah, youre definitly right, sorry [12:06] mmalecki: TheJH: yes, there should be [12:06] kpko-fn: I have a string like "This is a #{test} with #{placeholders}".. I want to replace these placeholders with eintries in a hashmap... [12:06] mmalecki: TheJH: at least I have it [12:06] TheJH: mmalecki, :D [12:06] TheJH: I mean, like, for nodejs :D [12:06] kpko-fn: My regular expression is: var testReg = new RegExp('\#[\{][a-zA-Z0-9]+[\}]', 'gi'); [12:07] kpko-fn: if i use testReg.exec(string) it only replaces the first occurence.. I thought the "g" modifier would fix that :/ [12:07] arvindravi has joined the channel [12:07] davidbanham has joined the channel [12:08] lorfds has joined the channel [12:08] jetienne: kpko-fn: try "m" [12:08] kpko-fn: Isn't m for multiline strings? Its a oneliner [12:09] k1ttty_ has joined the channel [12:09] kpko-fn: I tried it but no effect :/ [12:09] TheJH: .. "foo#{bar}baz#{qux}quux".replace(/#{([a-zA-Z0-9]+)}/g, function(str, name){print(name)}); null [12:09] catb0t: "bar"; "qux"; null [12:09] arvindravi: Hello all,I got express installed and when trying to run the default app.js using node i get this error http://pastebin.com/M8NeBkHh ,i could really use some help. I have also installed the dependencies using install -d option. [12:10] TheJH: .. var ob={bar:123,qux:456}; "foo#{bar}baz#{qux}quux".replace(/#{([a-zA-Z0-9]+)}/g, function(str, name){return obj[name]}) [12:10] catb0t: Exception: ReferenceError: obj is not defined [12:10] TheJH: .. var obj={bar:123,qux:456}; "foo#{bar}baz#{qux}quux".replace(/#{([a-zA-Z0-9]+)}/g, function(str, name){return obj[name]}) [12:10] catb0t: "foo123baz456quux" [12:10] TheJH: kpko-fn, ^ [12:10] mmalecki: TheJH: ah :D [12:11] TheJH: mmalecki, I'm imagining a display with all open connections as lines, with data events and writes as small dots and the stuff that node domains provide as small connections [12:12] TheJH: and you could drag the mouse between events and see the delay [12:13] gut4 has joined the channel [12:13] kpko-fn: Thank you guys :-) It works great [12:13] mmalecki: TheJH: it's weekend, right ;) ? [12:13] TheJH: mmalecki, :D [12:14] TheJH: mmalecki, of course, we could also try to continue working on ircbird... [12:14] mmalecki: TheJH: yes, just let me finish this forever refactor [12:15] k1ttty has joined the channel [12:16] k1ttty has joined the channel [12:19] rwasielewski has joined the channel [12:21] k1ttty has joined the channel [12:23] eeemsi: all these npm's for sqlite are not that new… =( [12:24] eeemsi: sqlite3 is the newest package with an age of 4 weeks… [12:28] OneOfOne has joined the channel [12:28] k1ttty_ has joined the channel [12:28] bradleyg has joined the channel [12:28] mraleph has joined the channel [12:28] spicycode has joined the channel [12:30] jbrokc has joined the channel [12:32] Renegade001 has joined the channel [12:33] xy has joined the channel [12:35] whitman has joined the channel [12:35] TheJH: ryah, what would you think about one domain per network/fs incoming data event? [12:35] spolu has joined the channel [12:43] Renegade001 has joined the channel [12:44] creationix has joined the channel [12:44] mmalecki: TheJH: timezones man [12:44] TheJH: mmalecki, ah, right :/ [12:45] adrianF has joined the channel [12:45] simenbrekken has joined the channel [12:51] __t has joined the channel [12:51] markwubben has joined the channel [12:51] megalomix has joined the channel [12:51] megalomix: hello [12:51] megalomix: can I optimize my routes? https://gist.github.com/1427056 (i'm using express.js) [12:51] Drakonite has joined the channel [12:52] Brandon_R has joined the channel [12:52] Brandon_R: hey guys [12:52] Brandon_R: i'm back [12:53] confoocious has joined the channel [12:53] confoocious has joined the channel [12:54] Brandon_R: so what cool projects you guys working on? [12:55] Drakonite has joined the channel [12:56] arpunk has joined the channel [12:56] megalomix: Brandon_R, do you use Express ? [12:56] Brandon_R: yeah [12:56] Brandon_R: why? [12:57] megalomix: How can I optimize my routes? https://gist.github.com/1427056 (i'm using express.js) [12:57] zomg: What do you mean "optimize" them? [12:57] insin: trying to write webapps with the same codebase on both ends, lots of activity in this area recently, what with flatiron and all... just wish I had more time! [12:58] megalomix: zomg create ONE route [12:59] p6 has joined the channel [12:59] Brandon_R: what are you trying to acomplish? [13:00] zomg: megalomix: maybe use regex? [13:00] zomg: I think routes can use regex matches too [13:00] megalomix: Brandon_R, I wrote many controllers in my case the first parameter is the name of the controller: example.com/controller [13:00] megalomix: then... /controller/view [13:00] megalomix: etc etc [13:00] Brandon_R: separate it into modules [13:01] Brandon_R: have 1 controller per verb [13:01] megalomix: i always have to load a controllers, so if there are parameters (like: action, par1, par2) is not important...i always have to load the specific controller... THEN the controller will decide what method to call reading the parameters [13:01] megalomix: verb ? [13:01] bergie has joined the channel [13:01] megalomix: yes... if someone ask: example.com/contact [13:02] megalomix: i load contact.js from my /controllers directory [13:02] Brandon_R: yeah [13:03] Brandon_R: one file per controller and 1 function per action [13:03] killfill has joined the channel [13:04] megalomix: yes exactly [13:05] megalomix: but [13:05] megalomix: can i load a module inside a function? [13:05] megalomix: i mean... my controller.init() check the name of the controller and then should load the module [13:05] megalomix: can i write require('/controllers/controller_name') [13:05] megalomix: HERE [13:05] megalomix: ? [13:07] megalomix: Brandon_R, https://gist.github.com/1427080 [13:07] newbie has joined the channel [13:07] newbie: hi [13:07] Brandon_R: loading a module a blocking [13:07] Brandon_R: so i would not [13:07] Brandon_R: i would load all the controllers at the beginning of the app and asign functions to each route/action [13:08] Guest4042: what do i need to install in order to develop using node.js? [13:09] Guest4042: ? [13:10] blup has joined the channel [13:10] djcoin has joined the channel [13:10] adrianmg has joined the channel [13:10] romanb has joined the channel [13:10] fairwinds has joined the channel [13:13] megalomix: Brandon_R, one moment... [13:13] megalomix: If you have 20 controllers do you load all of these at the beginning of the file ? [13:14] ovaillancourt has joined the channel [13:14] DennisRasmussen has joined the channel [13:14] kpko-fn has left the channel [13:17] adrianmg has left the channel [13:19] base698_ has joined the channel [13:19] megalomix: is it possible to check if in the module there is a variable with a specific name ? [13:20] mntl has joined the channel [13:21] CAP1455 has joined the channel [13:22] cjroebuck has joined the channel [13:24] samyak__ has joined the channel [13:25] munro has joined the channel [13:28] gripir has joined the channel [13:29] subbyyy has joined the channel [13:29] mntl has left the channel [13:34] samyak__ has joined the channel [13:35] Brandon_R: hi [13:35] megalomix: Brandon_R, my problem is: do i need to write TWO routes like /:controller and /:controller/:action (If i have a default method of the controller) OR can I write those two routes all in once ? [13:36] vguerra has joined the channel [13:36] Brandon_R: since they are different things i would write two routes [13:36] Brandon_R: if your app on github where i can take a look at it? [13:36] Brandon_R: is* [13:36] NetRoY has joined the channel [13:38] megalomix: not there is not [13:38] megalomix: i wrote....one moment i post it [13:38] nodebiscut has joined the channel [13:39] megalomix: Brandon_R, https://gist.github.com/1427145 [13:40] megalomix: then on the MAIN app i do: [13:40] Brandon_R: i wouldn't do it like that [13:40] megalomix: app.all('/', controller['index'].init()) [13:40] megalomix: app.all('/contacts', controller['contacts'].init()) [13:40] zomg: megalomix: can't you use regex like I said? [13:40] Brandon_R: lemme write up a quick psudocode [13:40] megalomix: thank you Brandon_R I wait [13:40] shiawuen has joined the channel [13:40] megalomix: zomg I think it is not necessary because exoress uses regex for routes [13:41] huskyr_ has joined the channel [13:41] jimt has joined the channel [13:41] megalomix: zomg, here i don't understand HOW can i organize my controllers--->models [13:41] Brandon_R: hold up [13:41] megalomix: or better.....what is the "best" way to organize the code [13:41] megalomix: ok Brandon_R [13:42] Brandon_R: here is a good place to start [13:42] Brandon_R: https://groups.google.com/forum/#!topic/express-js/K6HIb5IwbfQ [13:43] megalomix: i see [13:44] CoverSlide has joined the channel [13:45] robotmay has joined the channel [13:46] megalomix: Brandon_R, maybe namespaces ? [13:46] Brandon_R: yeah [13:46] Brandon_R: let each namespace represent a module [13:46] Brandon_R: what are you trying to make? [13:47] megalomix: my website [13:47] megalomix: :) [13:47] churp has joined the channel [13:48] Brandon_R: cool [13:48] megalomix: but Brandon_R is not add the same thing? [13:48] megalomix: i mean...if i create /contacts [13:48] megalomix: then here i need to create a namespeace named "Contacts" [13:48] megalomix: and then inside the module [13:49] megalomix: is not the same doing: [13:49] megalomix: app.get('/contact', ...) [13:49] megalomix: app.get('/contact/:action', ...) [13:49] megalomix: ? [13:49] Brandon_R: yeah [13:49] megalomix: here i don't write less code...write the same at least or more code [13:49] Brandon_R: same functionality [13:49] Brandon_R: just a more cleaner way to organize code [13:50] megalomix: understand [13:50] plutoniix has joined the channel [13:52] Renegade001 has joined the channel [13:55] Renegade001 has joined the channel [13:55] ShinyDarkness has left the channel [13:56] megalomix: Brandon_R, lanst question [13:56] megalomix: *last [13:56] Brandon_R: k [13:56] megalomix: can i export more then one variable at once? [13:56] megalomix: i mean if i do [13:56] megalomix: var a, b, c, d [13:56] ShinyDarkness has joined the channel [13:56] megalomix: then how can i export them ? [13:56] megalomix: i don't want to do [13:56] megalomix: exports.a = a [13:56] megalomix: exports.b = b [13:57] lyte has joined the channel [14:00] areed has joined the channel [14:03] aliem: is there a reason to not to use something like `app = globals.app = module.exports = express.createServer()` (I'd like to split my express routes, project specific utility lib in a coherent array of directories [I know I can `app=require('../../app')`], it's just to keep it a bit more clear) [14:04] TheJH: after I handed a buffer to a socket write method, I shouldn't change it anymore, right? [14:05] liamr has joined the channel [14:06] liamr has left the channel [14:06] AndreasMadsen has joined the channel [14:07] Brandon_R: hi thejh [14:07] Brandon_R: working on anything cool? [14:07] TheJH: Brandon_R, maybe it's cool, yes [14:08] Brandon_R: lay it on me [14:08] TheJH: but I'll have to put a bunch of hooks into node core :( [14:08] samyak__ has joined the channel [14:08] TheJH: I want to make something like chromes "network" tab on the dev console, but for node servers and cooler [14:09] benlyn has joined the channel [14:09] mmp has joined the channel [14:10] Brandon_R: coooool [14:10] confoocious has joined the channel [14:10] confoocious has joined the channel [14:10] Brandon_R: kinda like lib_pcap? [14:10] mmp: Hello world. `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [14:10] makeInstallBot: mmp: `make install` is not supported on current node.js `master` due to build system refactor. Please use latest stable tag (v0.6.x). [14:10] Brandon_R: make install [14:11] Brandon_R: 'make install' nodejs [14:11] TheJH: Brandon_R, well, I also want to add features pcap could never give you [14:11] Brandon_R: awe the bot doesn't like me [14:11] mmp: i win [14:11] TheJH: Brandon_R, imagine coupling this with domains, with one domain per data event :) [14:11] Brandon_R: :) [14:12] TheJH: Brandon_R, this gives you a bunch of connections between in- and outgoing stuff [14:12] Brandon_R: i like how node.js is divided into modules with node.js being really small [14:12] Brandon_R: don't change that node.js guys :) [14:12] Brandon_R: couldn't you put node.js behind a proxy and have the proxy handle the events instead of hacking the node.js core? [14:12] Brandon_R: send rpc's to the proxy and push it to node [14:13] Brandon_R: and add the logging stuff at the proxy level [14:13] megalomix: Brandon_R, is not possible? [14:13] Brandon_R: what isn't possible? [14:14] megalomix: i post you the code [14:15] CoverSlide has joined the channel [14:15] Felonious has joined the channel [14:15] lyte_ has joined the channel [14:16] Brandon_R: k [14:16] megalomix: Brandon_R, something like that: https://gist.github.com/1427229 [14:16] FeloniousHam has joined the channel [14:16] dr0id has left the channel [14:17] megalomix: should be good no? [14:17] Kunda has joined the channel [14:19] benvie: what you said is possible but not ideal [14:19] megalomix: ? [14:19] benvie: and probably better solved without the rpc [14:19] megalomix: benvie, are you telling to me? [14:19] benvie: whatever that other guy said [14:20] benvie: brandon [14:20] benvie: my name is brandon so he stole my name, but it's not ideal anyway [14:20] megalomix: ok, but why? [14:21] Brandon_R: is your name Brandon_R? [14:21] megalomix: i call directly the function inside the module [14:21] FeloniousHam: qq: I upgraded from 0.4.12 to 0.6.4. require("./file") doesn't appear to work [14:21] marcello3d has joined the channel [14:21] FeloniousHam: I get can't find module [14:21] megalomix: Brandon_R, I don't understand how many brandon there are here [14:21] benvie: not R you can keep the R [14:21] megalomix: :) [14:21] CarterL has joined the channel [14:22] Brandon_R: what about the underscore? [14:22] benvie: not that either but I saw a Brandon Alexander posting recently on the node mailing list or github [14:22] benvie: and that's my first and middle name [14:22] benvie: which is really fucking weird due to the rareness of the name [14:23] megalomix: Brandon_R, did you see the code? [14:23] benvie: and here comes Brandon_R making me think pod people have come to earth and settled on the name Brandon [14:23] Brandon_R: yeah [14:23] Brandon_R: lemme take one more look at it [14:23] megalomix: ok [14:23] benvie: ok so you're doing some routes and stuff [14:23] benvie: loading modules based on requests [14:23] whitman: Is there any way I can do an HTTP/1.0 request using http.request()? [14:24] benvie: yeah I mean you can write the header from scratch if it comes down to it [14:24] benvie: node exposes the lowest level to you if you need it [14:24] megalomix: https://gist.github.com/1427229 [14:24] megalomix: ops copied again [14:24] benvie: ideally you can use the built in stuff [14:25] benvie: but if you're doing some crazy shit then you can do that [14:25] Cromulent has joined the channel [14:26] benvie: when you said rpc [14:26] benvie: I thought based on what I read you were referring to trying to communicate locally, like between nodes or something [14:26] Brandon_R: that seems about right [14:26] benvie: if it's remote then rpc is obviously fine [14:26] megalomix: Brandon_R, good [14:26] enmand has joined the channel [14:26] Brandon_R: so you decided not to use the express-namespace module? [14:26] benvie: but rpc isn't the right answer if you're working locally [14:27] megalomix: Brandon_R, Yes because it doesnt improve the code (it is the same solution) I created that array an put the modules (contrllers) inside. [14:27] devaholic has joined the channel [14:27] gripir: hi, a good editor for writng web based stuff (javascript, html, css, maybe jade highlighting) [14:27] gripir: I mean ... I am looking for a good editor ... [14:27] gripir: ;) [14:28] erichynds has joined the channel [14:28] devaholic: depends what os you use [14:29] FeloniousHam: sublime text is great [14:29] FeloniousHam: $60 is crazy though [14:29] Brandon_R: i love sublimetext [14:29] Brandon_R: it is the textmate for linux :) [14:30] Brandon_R: but Vim + Terminal will always rock [14:30] FeloniousHam: :) [14:30] marcello3d: gripir: webstorm [14:30] Brandon_R: if you want a full ide try aptana [14:30] FeloniousHam: ST is just so pretty [14:30] FeloniousHam: (and fast) [14:30] benvie: actually [14:30] Brandon_R: aptana's python module can work on jade/stylus [14:30] marcello3d: it has decent node.js support [14:30] benvie: ST2 is for all of em ;) [14:30] benvie: we need a sublimetext written in all JS though [14:30] Brandon_R: what do you guys do? [14:30] benvie: just because [14:30] insin: Sublime Text is lovely, using it in anger for the first time since yesterday [14:30] gripir: atm im using aptana [14:31] Brandon_R: are you guys more of the full ide guys [14:31] gripir: but it is slow imho [14:31] benvie: we need node and chromium built together as a desktop app [14:31] Brandon_R: or right tool for the job? [14:31] Brandon_R: sublimetext to write js [14:31] Brandon_R: terminal to run node [14:31] Brandon_R: browser to view it [14:31] benvie: and an editor written entirely in javascript where everything is scriptable immediately [14:31] marcello3d: Brandon_R: full ide ftw [14:31] benvie: ST2 is close [14:32] Brandon_R: yep [14:32] marcello3d: refactoring, structural search/replace, interactive debugging, you develop a lot faster [14:32] Brandon_R: we need a good quality open source editor [14:32] AndreasMadsen: benvie like cloud9 [14:32] benvie: well sort of [14:32] insin: sublime text is even a bit of a step up for me - I used to use something which was pretty much list list of open windows and syntax highlighting [14:32] Brandon_R: sublimetext/textmate but open source and free :) [14:32] benvie: using a lot of the same stuff cloud9 does [14:32] insin: I find IDEs are just really flaky for JS [14:32] marcello3d: textmate is terrible :( [14:32] marcello3d: insin: have you tried intellij/webstorm? [14:32] benvie: but integration with the local desktop and system is the missing part [14:32] Brandon_R: what is your os? [14:32] Brandon_R: Archlinux + Windows Vista here [14:33] benvie: windows of course so I can go outside and die usually [14:33] benvie: but node cares for windows, it has a heart [14:33] insin: s/IDES/free IDES/ :-) [14:33] benvie: I am so done with anything built in Java re: intellij/webstorm [14:33] marcello3d: insin: do you have a free computer? a free desk? a free chair? free lunch? [14:33] Brandon_R: i am amazed that we don't have a free open souce ide similar to st ot tm [14:34] benvie: holy shit does it perform poorly, not even bringing my dislike of the language itself [14:34] shenlok has joined the channel [14:34] marcello3d: plus you can get an open source license [14:34] marcello3d: and then it is free ;) [14:34] marcello3d: http://www.jetbrains.com/webstorm/buy/buy.jsp#openSource [14:34] Brandon_R: FOSS [14:34] saesh has joined the channel [14:34] insin: Funny you should mention that - I am actually using a free monitor, and free computer (courtesy of work), sitting in someone else's chair in front of a table friends who emigrated gave to us! ;_D [14:34] megalomix: see you soon guys [14:34] jetienne has joined the channel [14:34] megalomix: thank you Brandon_R [14:34] megalomix: bye bye [14:35] Brandon_R: cya [14:35] benvie: I got a full intellij license while working on the project from hell a while ago and I don't care because it blows up my computer if I try to use it [14:35] Brandon_R: what is webstorm programmed in? [14:35] marcello3d: benvie: that sucks. never had a problem with it [14:35] Brandon_R: java or c++? [14:35] benvie: it's java [14:35] Brandon_R: awwwwwww [14:35] FeloniousHam: I'm fond of the Eclipse variants (Aptana) [14:35] marcello3d: don't hate =P [14:35] benvie: all of their stuff is java and it sucks mega ass on windows at least [14:35] Brandon_R: is it fast [14:35] insin: I couldn't care less what a tool is written in if it's a good tool [14:35] benvie: I mean the featureset is great [14:35] marcello3d: it's plenty fast, faster than eclipse [14:35] benvie: but it performs poorly to the point of being unusable [14:36] marcello3d: benvie: what kind of computer? [14:36] Brandon_R: what does ryan use? [14:36] Brandon_R: is the question we should be asking [14:36] benvie: on my computer with 12 gigs of ram and a quad core core i7 [14:36] marcello3d: I'm just on a standard macbookpro and it blazes [14:36] marcello3d: until I run out of memory ;) [14:36] benvie: well I don't know how it does on not Windows. But I know it does shitty on Windows [14:36] benvie: and all java stuff does [14:36] benvie: Eclipse stuff does better but it's noticably slower than other stuff [14:36] marcello3d: weird [14:37] marcello3d: that sounds like java 10 years ago [14:37] benvie: yeah I seriously don't know [14:37] benvie: I know how to fix these things, I can't make java IDEs not run shitty [14:37] benvie: and I don [14:37] marcello3d: yep [14:37] benvie: I don't have any testimony from people on Windows that it's possible so [14:37] Brandon_R: so what is the consesus? [14:38] marcello3d: I've used intellij on vmware fusion on windows a mac [14:38] marcello3d: and it as fine [14:38] marcello3d: *was [14:38] garrensmith has joined the channel [14:38] benvie: SublimeText2 either way, until we replace it with a node/chromium version [14:38] Edy has joined the channel [14:38] gripir: 60 dollars for st2 ... mayber for xmas ;) [14:38] benvie: hoping to be able to supply the chromium webview integration around the launch of node 0.8 [14:38] Dulak: I use vim/gvim on all oses [14:39] marcello3d: alright [14:39] marcello3d: ACTION goes back to his ide to code [14:40] Brandon_R: is it hard to provide intellisense for javascriptA? [14:40] benvie: it's fucking hard [14:40] zomg: You can mess with objects in so many dynamic ways.. yeah [14:40] FeloniousHam: you have no type information [14:40] benvie: basicslly you just need to run the script in a vm alongside the editor [14:40] Brandon_R: i might get sublime when i decide to go hardcore in node [14:40] benvie: and inspect it in the actual context [14:40] marcello3d: Brandon_R: webstorm basically shows a list of best guesses. it's relatively decent [14:40] zomg: I wonder how WebStorm does it [14:41] benvie: well this is what you do [14:41] marcello3d: for all the html5/dom stuff it's spot on [14:41] benvie: easy answer [14:41] romanb has left the channel [14:41] zomg: I guess they've implemented some kind of algorithm which tries to figure out it based on what they can be reasonably sure about [14:41] benvie: just run the code alongside [14:41] benvie: and inspect it in a live vm [14:41] Brandon_R: it probably just does a regex for function [a-z0-9]* [14:41] zomg: Brandon_R: It's smarter than that [14:41] marcello3d: Brandon_R: it's a bit more advanced than that [14:41] benvie: you can't use any kind of text based inference [14:41] Brandon_R: :D [14:41] Brandon_R: ik [14:41] zomg: it can guess object props from its prototype etc. [14:41] marcello3d: it has an AST understanding of your code, and it will look at property names in the same file and things like that [14:41] benvie: I'm pretty sure webstorm runs the code to some level in a sandbox to do it [14:42] zomg: eg. if you have some object called Foobar and then do var x = new Foobar(), it's capable of figuring out what was in Foobar.prototype [14:42] benvie: you csn't really otherwise [14:42] benvie: how about this [14:42] zomg: Yeah [14:42] marcello3d: benvie: I don't think it does, actually [14:42] subbyyy has joined the channel [14:42] marcello3d: benvie: because it supports autocomplete on stuff that you couldn't know without hitting all code paths [14:42] Brandon_R: i love dynamic languages [14:42] zomg: Perhaps someone should ask JetBrains [14:42] mc_greeny has joined the channel [14:42] benvie: var create = Object.create.bind(null, null); create({ heyguys: { value: "so broken" }) [14:43] zomg: They might even tell you what they do, at least they seem quite open about certain things [14:43] benvie: how does an IDE that doesn't run the code know what that does. What if I assigned a bunch of functions and defaults to it [14:43] marcello3d: afk [14:43] benvie: what if I use that for the prototype for my entire app [14:44] ttt-- has joined the channel [14:44] FeloniousHam: qq: I upgraded from 0.4.12 to 0.6.4. require("./file") doesn't appear to work [14:45] FeloniousHam: I get: Cannot find module ('./file") [14:45] SleepingPrgmr has joined the channel [14:45] FeloniousHam: even though it's in the directory I'm launching node [14:45] FeloniousHam: did anything change with require? [14:46] Brandon_R: not sure [14:46] benvie: var wtf = { toString: function(){ return 'fun' } }; var o = {}; o[wtf] = "broken ides"; [14:46] FeloniousHam: but the syntax is the same [14:46] Brandon_R: good lord [14:46] FeloniousHam: (as 0.4) [14:46] jacobrask: Is it considered Evil to extend Object.prototype even with non-enumerable methods? [14:46] unomi has joined the channel [14:47] Brandon_R: do you guys think javascript should be standardized or is this one of the strengths of js? [14:47] benvie: depends where you expect the code to live [14:47] benvie: it's not evil if you expect to control the end context [14:47] jacobrask: so for my own app it's fine but probably not in an npm module.. [14:48] benvie: javascript has been standardized mostly, as of ES5, and is moreso in ES6 [14:48] benvie: yeah [14:48] benvie: for your own thing, it really isn't bad [14:48] jacobrask: but that's basically more of the argument against using globals at all rather than specifically extending Object.prototype [14:48] jacobrask: which is a valid argument too and related [14:48] benvie: the complaints come from two things: uncontrolled client environments, and when its being included for libraries to be used by other people [14:48] benvie: well when you say globals [14:49] benvie: until recently there wasn't any kind of official description of being able to have multiple separate contexts where there's unique natives [14:49] benvie: like editing Object.prototype in one place doesn't edit it everywhere [14:49] jacobrask: there is now? [14:49] benvie: in that environment [14:49] benvie: there is, for ES6. Node up to now has had hacked methods of doing [14:50] jacobrask: Ok [14:50] benvie: isolates in V8 do that very well [14:50] Brandon_R: hey guys [14:50] benvie: for ES6 there's official language descriptions of that kind of separation [14:50] jacobrask: I haven't looked into that, still running 0.4.12 [14:50] Brandon_R: how do i learn all this shit? [14:50] Brandon_R: like how to hack prototype and stuff [14:50] jacobrask: ok cool [14:50] Brandon_R: is there a javascript book that i can buy where i can learn more advanced js? [14:50] benvie: mm well learning is a process [14:51] benvie: if you want advanced js [14:51] Brandon_R: yeah [14:51] jacobrask: Brandon_R: take a look at http://eloquentjavascript.net [14:51] jacobrask: excellent book [14:51] benvie: https://mail.mozilla.org/pipermail/es-discuss/ go there every day [14:51] Sorella has joined the channel [14:51] benvie: https://mail.mozilla.org/pipermail/es-discuss/2011-November/thread.html [14:51] benvie: but you need to know the language well before you can really get much out of it [14:51] Brandon_R: cool i can read it online [14:51] benvie: I'm not a book person... [14:52] benvie: and on the internet a book is out of date a month before it's published [14:52] jacobrask: Eloquent JavaScript has a little built in console which is nice for the code examples [14:52] jacobrask: benvie: EJ is continously updated, and open source [14:52] benvie: yeah it's as good as they come [14:52] benvie: just depends what level he meant by 'advanced' [14:53] benvie: my perspective is skewed [14:53] joemccann has joined the channel [14:54] Brandon_R: like [14:54] Brandon_R: socket.io advanced :P [14:54] bogomips2__ has joined the channel [14:54] benvie: well the thing is [14:55] benvie: there's two separate pieces [14:55] nils_r has joined the channel [14:55] benvie: one is the language itself and the other is implementing things in it and using various modules, libraries, APIs, etc. [14:55] kenny__ has joined the channel [14:56] JasonJS has joined the channel [14:56] benvie: and each one can making the other confusing [14:56] shoobat has joined the channel [14:57] Brandon_R: holy shit that eloquentjs is a nice one [14:57] Brandon_R: i will read the entire thing thanks [14:57] blup has joined the channel [14:57] jacobrask: btw, I've begun to use this style to define exportable functions: myFunc = exports.function = function() {} to avoid having multiple declarations, are there any drawbacks of that? I haven't seen it elsewhere [14:57] benvie: people tend to learn language and programming fundamentals when say they're getting a computer-science degree. And the theoretical problems, individual language problems, and then finally implementation problems are tackled separately [14:57] jacobrask: er myFunc = exports.myFunc = .. [14:57] npa: is there a maximum amount of objects a datastore can/should contain? [14:58] Brandon_R: i have a question [14:58] benvie: but it's hard to find that kind of separation in this age of web stufff [14:58] Brandon_R: is there a maximum amount of events that is can throw before node.js starts getting slow [14:58] Brandon_R: like what is the average [14:58] benvie: node has a hardcoded error when an event is hitting 10 listeners that you specifically need to override [14:58] Brandon_R: or is there basically no cost to emitting an event? [14:58] npa: shit - wrong channel =) [14:59] Brandon_R: woah 10 is the soft max? [14:59] benvie: there's not much cost to emitting though non-zero [14:59] benvie: the assumption is those listeners aren't doing nothing [14:59] benvie: 10 for a single event, 10 separate listeners [14:59] benvie: is a lot [14:59] jacobrask: Brandon_R: that is per emitter [14:59] lzskiss has joined the channel [14:59] benvie: usually if you hit 10 it's because something went infinitely recursive or something [15:00] jacobrask: per event rather [15:00] Brandon_R: lol @ http://eloquentjavascript.net/appendix1.html [15:00] blup_ has joined the channel [15:00] benvie: if you're doing that then it's different [15:00] benvie: but it's not the common use case [15:00] benvie: an event essentially is just one function looping through an array calling other functions [15:01] benvie: any given function call isn't very expensive [15:01] ryanfitz has joined the channel [15:01] benvie: more expensive than say accessing a primitive directly [15:01] Brandon_R: i was thinking about have the active record pattern emit events like presave postsave onupdate for my models etc [15:01] benvie: but not very expensive [15:01] Brandon_R: is this a bad way of handling this problem? [15:01] benvie: that's likely fine but it depends on what that really means [15:01] benvie: is it a thousand times a second? [15:01] Brandon_R: that way add-ons can be made easily [15:01] jacobrask: benvie: I've seen other people extend Object instead of Object.prototype. There not really a difference between those imho though. [15:01] benvie: there absolutely is [15:01] jacobrask: agree? [15:02] jacobrask: why [15:02] benvie: Object is basically not very special [15:02] benvie: it's a basically just a thing to put stuff on [15:02] adamstantonvan has joined the channel [15:02] benvie: Object.prototype is what every other object inherits from [15:02] benvie: if I do [15:02] jacobrask: but.. if the property on prototype is non-enumerable [15:02] benvie: Object.hi = 'whatever' [15:02] benvie: that does nothing [15:02] benvie: if I do Object.prototype.hi = 'whatever' [15:02] benvie: then every single object now has the 'hi' property [15:03] benvie: instantly [15:03] benvie: immediately [15:03] xerox: it breaks einstein's relativity [15:03] benvie: that's pretty different to me [15:03] jacobrask: yeah.. but what if it's a very useful method with a specific name [15:03] benvie: it's non-enumerable yeah [15:03] benvie: but it's there [15:03] benvie: just saying [15:03] benvie: there's a way big different between extending Object and Object.prototype [15:04] benvie: as in those two are completely separate and almost unrelated things [15:05] benvie: really poor choice for javascript not making a clear distinction in naming [[prototype]] and prototype [15:05] benvie: differently [15:05] tanepiper: is node-inspector still recommended for debugging nodejs 0.6 apps? I need to track down some memory leaks in this app [15:05] benvie: ([[prototype]] being __proto__ in webkit/mozilla) [15:06] tanepiper: v8-profiler doesn't seem to have been updated in about a year [15:07] rwasielewski has joined the channel [15:07] benvie: oh hey sublimetext node addon dude [15:07] benvie: I knew that name was familiar [15:07] tanepiper: oh hey [15:08] tanepiper: yea, unfortunately contract work is using up all my time just now - been given a heavy app to debug and try kill as many memory leaks :) [15:08] benvie: we need to get that whole pipe exposing sublime's context to node thing going. Did a bit of research on transports for it recently [15:09] tanepiper: yea, i have some test code around async subprocess stuff too, so better stdout [15:09] benvie: and yeah for that I think the only thing I've used is what you mentioned [15:09] tanepiper: but it's just finding time to implement it [15:09] jtsnow has joined the channel [15:09] benvie: yeah it's not simple keeping a pipe open and keeping data transport clean [15:09] deedubs has joined the channel [15:10] huskyr has joined the channel [15:10] benvie: other option being some kind of automated rpc definition and minimizing actual transport [15:10] asobrasil has joined the channel [15:10] liamre has joined the channel [15:11] TheJH: ryah, ping [15:11] kriszyp3 has joined the channel [15:11] adamstantonvan has joined the channel [15:12] herbySk has joined the channel [15:12] spolu has joined the channel [15:12] Brandon_R: hi ryah [15:13] tih-ra_ has joined the channel [15:15] areed has joined the channel [15:16] Brandon_R: Do not extend the prototypes of any objects, especially native ones. There is a special place in hell waiting for you if you don't obey this rule. [15:16] Brandon_R: what do you guys think about that ^^ [15:16] Brandon_R: also is this the accecpted way to code in the node.js community? http://nodeguide.com/style.html [15:16] benvie: I forget who said that, but there's a time and a place.. [15:16] klovadis has joined the channel [15:16] Brandon_R: felix said that [15:16] insin: line 1: "There is no official document that governs the style of node.js applications" [15:17] benvie: and the target for that statement has relevance in a specific context [15:17] simenbrekken has joined the channel [15:17] klovadis: hi there [15:17] benvie: if you specifically run code in a private context and you actually know how the libraries you're using work then that statement has no weight [15:18] klovadis: quick question: is there a gentle way to catch a socket.connect failure without throwing a critical error? [15:18] TheJH: klovadis, listen on the error event of the socket [15:18] benvie: and it's often not so even in less controlled places if you take the simple step of defining non-enumerable [15:18] klovadis: TheJH if I listen, it won't throw? [15:18] tanepiper: Brandon_R: if you are releasing your module, yes. If it's a private code base - as long as it's documented, no [15:18] djazz has joined the channel [15:18] TheJH: klovadis, right [15:19] benvie: the only way for there to be an issue in that case is if two separate things are vying to write the same named property [15:19] Renegade001 has joined the channel [15:19] AndreasMadsen_ has joined the channel [15:19] klovadis: TheJH thanks a lot! [15:19] TheJH: klovadis, "error" is a special event, if nobody listens to the event, it throws [15:19] tanepiper: extending prototypes is basically the same as monkeypatching [15:19] Brandon_R: have you guys seen how to be an open source gangster? [15:19] insin: npm link and node_modules are frigging amazing to develop with. How many languages get that stuff wrong? [15:19] klovadis: TheJH does this apply to all eventlistener instances? [15:19] TheJH: klovadis, eventlistener? [15:20] adtaylor has joined the channel [15:20] benvie: it's afforded by the language and the reasons not to do it have a specific scope [15:20] klovadis: TheJH socket inherits from the eventlistener class afaik [15:20] benvie: and there's very useful applications of it for some uses [15:20] klovadis: TheJH hmm I'll test that myself [15:20] klovadis: TheJH but thank you about the sockets [15:21] benvie: it can allow for some very fluent, readable, and terse code as well if you have the luxury of controlling the environment [15:21] benvie: which you do in node usually [15:22] benvie: if you can do require('vm') then you can do what you want and the only thing stopping you is convention or ignorance [15:22] markwubben has joined the channel [15:22] huskyr has joined the channel [15:23] kazupon has joined the channel [15:24] klovadis: TheJH indeed, any eventemitter throws a critical error if there is no listener [15:27] adamstantonvan has joined the channel [15:27] huskyr has joined the channel [15:28] huskyr_ has joined the channel [15:28] Brandon_R: what do you guys think of hook.io? [15:30] Renegade001 has joined the channel [15:31] adtaylor: The default site for a Express.js app adds the routes as seperate modules. This is causing me issues with variable scope — currently with the User Model. How do people negotiate this? Store Models you may need in the session? [15:32] TheJH: Brandon_R, interesting concept if you have something that's large enough to be split in pieces [15:32] joshsmith has joined the channel [15:32] Brandon_R: :) [15:32] Brandon_R: what are some good examples of apps written in hook.io that i can check out [15:32] TheJH: Brandon_R, kohai [15:36] Brandon_R: kool [15:38] mertimor has joined the channel [15:39] adtaylor: are all require's stored in mem? How inefficient is calling `User = mongoose.model 'User' ` in two different files? [15:41] benvie: the compiled module will be stored in memory [15:41] benvie: at which point running it again is as efficient as running any other function [15:42] benvie: as long as this is the same originating node process [15:42] Wizek has joined the channel [15:42] brianloveswords has joined the channel [15:44] Raynos: Brandon_R hook.io is pure win [15:44] Brandon_R: got that right [15:44] benvie: so basically it's fine since I assume you're not trying to do some multi-process stuff [15:44] Brandon_R: breaking an app into modules is always the better way to go [15:44] benvie: also Raynos I'm now seeing your name everywhere like you're stalking me [15:44] benvie: stalker [15:44] Rob__ has joined the channel [15:44] adtaylor: benvie: Thanks. [15:44] Brandon_R: if you really look at all the big programming movements all they really come down to is breaking up a problem into modules [15:45] Rob__: is there a standard way of wrapping an async call to make it sync? [15:45] Brandon_R: object oriented programming, mvc all those [15:45] Raynos: benvie: its because I am everywhere [15:45] Raynos: its also because the internet is small [15:45] Raynos: and we live in the same subset of the internet [15:45] Brandon_R: the internet is bigger [15:45] Raynos: I quite like cross referencing people from mailing lists / irc / stackoverflow / reddit :) [15:50] igl1 has joined the channel [15:51] appinsanity-mike has joined the channel [15:51] Brandon_R: is it a good idea to read stackoverflow? [15:51] Brandon_R: my retention rate of those kind of websites are basically 5% [15:51] jtsnow has joined the channel [15:52] grampajoe has joined the channel [15:52] Wizek has joined the channel [15:52] zomg: Brandon_R: if you're bored :P [15:52] zomg: I have 12k rep on SO, mostly because I've been answering a lot out of boredom [15:52] zomg: :D [15:52] Brandon_R: i like reading the cool threads [15:52] Brandon_R: link me to your profile [15:53] zomg: http://stackoverflow.com/users/106862/jani-hartikainen [15:53] Brandon_R: i have like 400 rep lol [15:53] rwasielewski has joined the channel [15:54] enmand has joined the channel [15:54] Brandon_R: what are your other fav programming sites? [15:54] zomg: I don't really frequent anything else [15:55] Raynos: Brandon_R: no its not a good idea to read it [15:55] Raynos: its nice to read some nice threads [15:56] Brandon_R: yeah [15:56] Raynos: Theres also some nice conversation on chat.SO [15:56] Raynos: Scanning the weekly : http://stackoverflow.com/?tab=week for your favourite tags is worth while [15:57] jetienne: i never understood SO i answered twice, and got twice wrongly classified as spammer :) [15:57] stagas has joined the channel [15:57] No9 has joined the channel [15:57] Raynos: the node.js tag : http://stackoverflow.com/questions/tagged/node.js is also worth checking out [15:58] benvie: oh also I saw you had a thing for what was it [15:58] benvie: DOM shimming for node? [15:58] benvie: I'm working on a thing to make using dom.js more streamlined in node [15:59] benvie: and it's pretty amazing to begin with [16:00] gut4 has joined the channel [16:01] Raynos: benvie: dom shim is for the client [16:01] benvie: working on a better IDL->source conversion bit now to make it tweakable and then I'm going to make a module to load dom.js using node's tools instead of its current browser targeted build system [16:01] Raynos: dom.js is pretty awesome :) [16:01] benvie: oh nevermind then [16:01] Raynos: I want a minimal dom4 module for node [16:01] Raynos: to replace jsdom [16:01] benvie: I've been focused on in node stuff [16:01] jeromegn has joined the channel [16:02] Raynos: Mainly build as a trade off between spec compliance and performance [16:02] bogomips2_ has joined the channel [16:02] benvie: dom.js apparently performs a lot better [16:02] Raynos: Basically a small module thats the performant subset of the DOM [16:02] benvie: and is almost 100% compliant as its original goal was an IDL compliant DOM host entirely in JS [16:03] benvie: a lot of the overhead in other stuff comes from basically not being able to make efficient use of information hiding [16:03] benvie: and being lazy [16:03] pekim has joined the channel [16:03] benvie: which is what you get from using Proxies and WeakMaps and whatnot [16:04] Raynos: i might swap jsdom out for dom.js [16:04] Raynos: in trinity, and see if I get speedup [16:04] benvie: it works in node now but you have to use the build system it has currently and I'm so lazy I'll spend 10 hours to save 5 minutes [16:05] benvie: it builds all the files into one gigantorific file, including the idl->js automated conversion [16:05] benvie: good for browsers but not node [16:05] benvie: doesn't make use of vm [16:05] benvie: so that's my goal [16:05] benvie: the IDL part itself I'm doing as a separate module because it's really useful for a lot of things [16:06] Brandon_R: do u guys use yui in node? [16:09] tbranyen: nope [16:09] tbranyen: i use backbone tho [16:10] Brandon_R: kool [16:10] quackquack has joined the channel [16:11] magnetik has joined the channel [16:11] ccapndave has joined the channel [16:13] davidascher has joined the channel [16:14] magnetik: Hi [16:14] CodeRarity has joined the channel [16:14] Wizek-other has joined the channel [16:15] magnetik: Is there any way to handle 302 and 303 http code in http.request ? [16:16] matti has joined the channel [16:16] matti has joined the channel [16:17] joshsmith_ has joined the channel [16:17] ant- has joined the channel [16:20] m00p has joined the channel [16:21] joemccann has joined the channel [16:21] quackquack: magnetik: are you using the built-in node http client? [16:21] magnetik: I'm using request from the http module [16:21] magnetik: But there may be something more friendly to only get the content of a file [16:22] quackquack: yep, try the `request` module [https://github.com/mikeal/request] [16:23] TheJH: whut? the chinese gfw filters nodejs.org because of the version number? :D [16:24] TheJH: from the ML: "Please help us, change the version number quickly! [16:24] TheJH: ps: the "89" magic number will cause the same problem too. so the future version 0.8.9 should be avoid." [16:24] TheJH: :D [16:24] magnetik has joined the channel [16:24] TheJH: "please don't make a version 0.8.9" [16:24] TheJH: that's so... wrong. [16:25] quackquack: lo [16:25] quackquack: that makes no sense to me [16:26] mmalecki: TheJH: why would they block current version? [16:26] mmalecki: TheJH: also, link to the thread? [16:27] TheJH: mmalecki, http://groups.google.com/group/nodejs/browse_thread/thread/8803e5fbe28984af [16:27] mmalecki: wtf [16:27] mmalecki: 64? I mean, really gfw? [16:28] diogogmt has joined the channel [16:28] tomlion_ has joined the channel [16:29] stonebranch has joined the channel [16:29] TheJH: I wonder what happens when the come on a software download site... [16:29] TheJH: "64-bit download" :D [16:30] asoltys has joined the channel [16:30] TheJH: but I really have no idea what that number means... [16:32] krill has joined the channel [16:34] isaacs has joined the channel [16:36] truedat101 has joined the channel [16:36] joshsmith has joined the channel [16:37] SamuraiJack has joined the channel [16:37] vervain has joined the channel [16:38] brianloveswords has joined the channel [16:38] scottschecter has joined the channel [16:40] gut4 has joined the channel [16:40] jbrokc has joined the channel [16:42] MatthewS has joined the channel [16:43] Renegade001 has joined the channel [16:47] codygray has joined the channel [16:48] faffasdf has joined the channel [16:50] blueadept` has joined the channel [16:50] enmand has joined the channel [16:52] MatthewS has joined the channel [16:52] Brandon_R has joined the channel [16:53] Brandon_R: hello guys [16:53] RORgasm_: hello [16:54] faffasdf: yo [16:54] faffasdf: whats this about [16:54] faffasdf: some javascript shit ? [16:56] mmalecki: isaacs: re binary warning: 'This package comes with a binary which hasn't been installed. To install it type `npm -g install `' ? [16:56] faffasdf has left the channel [16:56] isaacs: mmalecki: i'm sort of meh on the binary warning thing [16:56] isaacs: i mean, we already have preferGlobal, right? [16:56] isaacs: i put binaries in a lot of things that aren't intended to be used globally [16:57] mmalecki: isaacs: yeah, but it isn't alwasy the case [16:57] mmalecki: isaacs: like express [16:57] Wizek-other has joined the channel [16:57] adambeynon has joined the channel [16:57] isaacs: right [16:57] isaacs: i'm just saying, it could get annoying realy fast [16:58] mmalecki: isaacs: ok, then lets leave it alone :) [16:58] isaacs: i threw a little something in there [16:58] isaacs: and then installed some of my projects. [16:58] isaacs: it's annoyig [16:58] mmalecki: isaacs: btw, I wanted to start this search.npmjs.org rewrite, any hints on that? [16:58] isaacs: ugh, that's a huge project. [16:58] mmalecki: ACTION is a frontend ninja by night [16:59] isaacs: maybe decide what you'd like to tackle first. [16:59] isaacs: the search stuff is all in the www folder. [16:59] isaacs: the html and css and js is in www/attachments or www/ui or something [16:59] mmalecki: yeah, I've seen them [16:59] Brandon_R: hey issacs [16:59] Brandon_R: congrats on npm [16:59] Brandon_R: and it's inclusion in default node [16:59] mmalecki: I have to get this working first, tho >.< [17:00] isaacs: Brandon_R: thansks [17:00] benvie: the first thing it needs is a better search, I built something for that for myself out of sheer frustration [17:00] dmsuperman has left the channel [17:00] benvie: rest is gravy [17:00] ecin has joined the channel [17:01] Rob__: is there an easy way to block and wait for a callback? [17:01] Brandon_R_ has joined the channel [17:01] ant-: does any find the initial request to a nodejs site slow [17:01] benvie: I'm surprised that the various sites that have popped up for cataloging packages have mostly done such a poor job at actually being more useful [17:01] aaronmcadam has joined the channel [17:01] npa has joined the channel [17:02] benvie: like node toolbox looks nice and all but it's not actually any more useful than npm itself for searching [17:03] isaacs: benvie: not everyone loves the cli. [17:03] isaacs: benvie: i do [17:03] benvie: yeah no I know, I don't particularly either though I've learned to use it. But I see a site like node toolbox that obviously had effort put into usability [17:03] bergie has joined the channel [17:04] benvie: and there's no way to do anything more than the same search you do in npm. Granted, not on a command line [17:04] isaacs: mmalecki: probably merge this in first: https://github.com/maxogden/npmjs.org/commit/da53d6bec963483884d9749e80a27eab5fe6a240 [17:04] isaacs: mmalecki: i've been meaning to do that [17:04] dmojoryder has joined the channel [17:04] jakehow has joined the channel [17:04] benvie: it just surprises me when people put that much effort into something and then skip the easy big wins [17:04] benvie: like hey I want to see more than the top 20 most popular modules [17:04] benvie: or maybe the most popular for a given tag [17:05] mmalecki: isaacs: can I use director for routing stuff? [17:05] isaacs: mmalecki: it's not a node program [17:05] benvie: it's not hard because I did it with like 10 lines of code using npm as a module on the command line so it just surprises me when it's not done [17:05] isaacs: mmalecki: if it's a purely client-side lib, i kinda don't care. [17:05] mmalecki: isaacs: it is [17:05] isaacs: doesn't it already use sammy that has that stuff? [17:06] isaacs: or are you suggesting a full-on rewrite? [17:06] mmalecki: isaacs: yeah, kinda [17:06] jimmysparkle has joined the channel [17:06] benvie: of npm's repo client code? [17:06] isaacs: if you're going to change the look of the UI considerably, can i weigh in on it? i do care about that. what's there now is pretty crap, but we should go in a good direction, not just have lots of changes that get un-changed later. [17:06] chrisvwebdev has joined the channel [17:07] benvie: or oh the site itself [17:07] benvie: nevermins [17:07] isaacs: benvie: the search site [17:07] mmalecki: isaacs: sure :) [17:07] blackrock has joined the channel [17:07] benvie: yeah I was going to say, the site itself could use some more directly imported love from npm itself [17:07] blackrock: Is it _really_ scalable? [17:07] isaacs: i think 2012 is going to be the year of npm's speed and web presence. [17:08] benvie: I don't recall how it looks on linux, but search modules using npm on windows sucks because of how terribly the columns don't end up being columsn [17:08] benvie: even at max width [17:08] benvie: that's the thing that made me anger out a mini thing for searching [17:09] marcello3d: isaacs: what's your opinion of nodetoolbox or whatever it's called? [17:09] Brandon_R_: lmfao [17:09] Brandon_R_: http://blip.tv/jsconf/nodeconf-2011-nodecommit-panel-5420208 [17:09] Brandon_R_: issacs which one is you? [17:09] Brandon_R_: which seat are you sitting in? [17:10] dgathright has joined the channel [17:10] benvie: it looks nice but it's only feature really is that it gives a semi-usable list of modules broken down by category while supplying no useful filtering or searching which is what is actually needed with 5000 modules [17:10] isaacs: Brandon_R_: i'm the dude with the curly hair and the red and blue shirt [17:10] Brandon_R_: lol [17:10] isaacs: the funny lookin one [17:10] Brandon_R_: you guys should do another one [17:10] Brandon_R_: like for each version [17:10] benvie: I need to know modules updated recently, modules that are popular (and recently), modules that are similar to X by tag or something else [17:10] xerox: you guys should do one another [17:10] benvie: and pulling in data from github is a good plus [17:11] isaacs: Brandon_R_: the people are: pquerna, ryah, [ special guest ], me, mjr_ [17:11] jbrokc has joined the channel [17:11] quackquack: benvie: http://toolbox.no.de/ [17:11] Brandon_R_: when is the next nodeconf? [17:11] benvie: how do i see more than those top 10 popular modules [17:11] benvie: on node toolbox [17:11] Brandon_R_: and do you guys put up all the videos? i think there are some missing [17:11] benvie: and how do I see popular modules for a given search [17:12] isaacs: Brandon_R_: and the speaker is mikeal [17:12] Brandon_R_: i love watching nodejs conferences sadly i can't visit any of them :( [17:12] benvie: and filter by updated since node 0.6.x [17:12] benvie: those aren't just wants, modules literally don't work unless they've been updated since then, so anything that can't do that for me is useless [17:13] jetienne has joined the channel [17:13] Cromulent has joined the channel [17:13] benvie: npm has an absolute buttload of way outdated modules so it's kind of a critical thing [17:14] pokoli has joined the channel [17:14] isaacs: benvie: sorting by last updated would be good [17:14] isaacs: or maybe just putting it in the cli search results [17:15] isaacs: i show keywords in there, and that's kind of useless. [17:15] isaacs: (though, good to search on programmatically) [17:15] benvie: yeah. I should clean up what I did and package it up as a utility for whatever [17:15] davidascher has joined the channel [17:15] benvie: just basic stuff like filter by node version (date and specified number), etc. [17:16] Brandon_R_: where are all the nodeconf videos? [17:16] benvie: it's not advanced or anything, just boilerplate kind of stuff [17:16] Brandon_R_: guys [17:16] benvie: which is why sites like node toolbox make facepalm a bit [17:16] Brandon_R_: watch this [17:16] brianloveswords has joined the channel [17:17] N0va has joined the channel [17:17] Brandon_R_: this is so fkin awesome - http://blip.tv/jsconf/nodeconf-2011-marak-squires-5729610 [17:17] benvie: I want to be lazy so bad, [17:17] benvie: when I get to be lazy and I find the thing that just works like I hoped it would, I love it so goddamn much [17:18] benvie: wow [17:18] benvie: man this person is lucky he did this in May. There's a lot more modules now [17:19] RORgasm_: hey guys [17:19] RORgasm_: i'm using express [17:19] isaacs: benvie: yeah, for real [17:19] RORgasm_: hacking on a game [17:19] knifed has joined the channel [17:19] isaacs: he didn't even get through them all [17:20] isaacs: there were like 3000 or something at the time [17:20] isaacs: maybe 2000 [17:20] benvie: yeah was going to say probably 2k or so [17:20] RORgasm_: how do i use a variable that's being passed from a route to inline JS in that view? [17:20] benvie: there's like 1000 new ones in the last month, it's going fast [17:20] rwasielewski has joined the channel [17:20] ttt-- has joined the channel [17:20] isaacs: 669 created last mnth [17:21] benvie: damn yeah [17:21] adrianF has joined the channel [17:21] knifed: isaacs, what is being discussed here [17:21] knifed: what about numbers [17:21] benvie: I feel like an inflection point is coming on [17:21] isaacs: knifed: how many modules there are, created when, etc. [17:21] isaacs: http://search.npmjs.org/#/_analytics/alltime [17:22] knifed: ok yeah growing fast [17:22] isaacs: what's interesting is the shape of this: http://search.npmjs.org/#/_analytics/thisweek [17:22] isaacs: it used to peak on the weekends [17:22] benvie: with the windows release getting to mainstreamable and the continually growing awareness it's bound to go gray goo soon [17:22] isaacs: now it peaks on wednesday [17:22] isaacs: people are doing this for their job now [17:22] truedat101 has joined the channel [17:22] benvie: and the high profile stuff like ebay using it for this or that [17:23] benvie: it' [17:23] benvie: it's hard to keep perspective when you're head deep in the code and questions and community [17:23] knifed: what will be the % among other technologies used [17:24] benvie: I imagine [17:24] quackquack: why does node, upon encountering a circular require, just pass a {} instead of throwing an error??? [17:24] benvie: is that bad? [17:24] benvie: er [17:24] Lingerance: quackquack: Because it hasn't finished loading the file. [17:24] benvie: it doesn't pass the module? [17:25] isaacs: quackquack: that object is the exports object [17:25] isaacs: it'll get filled in once that other module hsa a chance to fill it in [17:25] isaacs: it's fine [17:25] quackquack: isaacs: ah, ok. makes is harder to debug >< [17:25] zomg: Socket.io really could use better docs... I'm again just going with educated guesses on how it works.. [17:25] quackquack: though i guess its easy if i could just remember [17:25] zomg: :P [17:25] isaacs: quackquack: just means you can't use module.exports=foo if you have circular requires [17:26] trodrigues has joined the channel [17:26] benvie: node is the right thing in the right place at the right time and got there at the beginning of all those things [17:26] quackquack: isaacs: k, ty [17:26] appinsanity-mike: My background is C so I'm not sure what the best practice is here for node.js. If you are reading and processing a file stream character by character (lexer/parser) what is the fastest way to buffer/stream the processed characters? [17:27] josh-k has joined the channel [17:27] benvie: you should have your lexer be an event emitter that emits at discrete points that can be used by another thing to consume [17:27] isaacs: appinsanity-mike: the fastest way is to do it by byte, not by char [17:28] isaacs: appinsanity-mike: use a Buffer object, never convert to a string [17:28] benvie: oh input not output [17:29] isaacs: appinsanity-mike: a Buffer is a bit like a C string, which typically contains utf8-encoded data. when you convert to a string, it'll give you characters, not bytes, and there's a copy there into v8's heap [17:30] mike5w3c_ has joined the channel [17:30] hipsters_ has joined the channel [17:31] benvie: I saw an issue thread about this before but I forget the end answer [17:31] benvie: does node handle BOM for utf8? [17:31] benvie: it doesn't tell you it was there [17:31] benvie: but it handles it on the input right? to make a usable stream [17:33] lzskiss has joined the channel [17:33] lzskiss: yo [17:33] isaacs: benvie: you get the BOM byte in fs.readstream [17:34] isaacs: benvie: it only strips it off for require() [17:34] benvie: ah good to know [17:34] benvie: hard to find that in the source [17:34] madhums has joined the channel [17:36] Brandon_R_: hey issacs [17:36] Brandon_R_: wanna have a rap battle? [17:37] benvie: I am quite excited for isolates. Patching the isolates branch to work correctly on Windows so I can play with it. SLIST is in the windows api itself and slightly different than the bsd stuff [17:38] devongovett has joined the channel [17:38] CarterL has joined the channel [17:38] Renegade001 has joined the channel [17:38] Lingerance: What are isolates? [17:39] aklt has joined the channel [17:39] benvie: V8's method of creating 'SharedNothing' javascript contexts in different threads [17:39] benvie: under the same process and single overarching V8 instance [17:40] benvie: it has quickly become used heavily in Chrome and now in V8 itself in V8 3.8. It allows a lot of magical things to happen once implemented [17:41] pquerna: woooooooooooooo [17:41] pquerna: wooo isolates [17:41] pquerna: this is me, so excited. [17:41] benvie: it's what I need to run chromium as a node module [17:42] benvie: that is exciting to me [17:42] benvie: does other stuff too [17:43] Brandon_R_: hey [17:43] Brandon_R_: pquerna [17:43] appinsanity-mike has joined the channel [17:43] pquerna: hello [17:43] Edy: ja [17:43] maletor has joined the channel [17:44] willwhite has joined the channel [17:45] MerlinDMC has joined the channel [17:45] JanLi has joined the channel [17:45] bpierre has joined the channel [17:45] ciju has joined the channel [17:46] isaacs: i thought isolates were just the shared-nothing, but it's still up to you to make a thread and whatnot? [17:47] benvie: oh yeah definitely but it facilitates crosstalk between different implementations [17:47] benvie: before it was...I'm not going to say impossible but really really hard and I didn't finish it. Now it's 80% built in [17:47] benvie: if you can run in the same thread [17:48] benvie: er process [17:48] AndreasMadsen has joined the channel [17:49] benvie: you need to reconcile the differences between event loop implementations, chromium's significant use of ipc, etc. [17:50] benvie: but there's an api and it's doable [17:50] bpierre: Hello, does anyone know a good resource about “how to decouple my application in independent modules for testing it”? [17:50] jtsnow has joined the channel [17:50] fzzzy has joined the channel [17:50] AndreasMadsen_ has joined the channel [17:50] ryanfitz has joined the channel [17:50] jocafa has joined the channel [17:51] Brandon_R_: http://eloquentjavascript.net/chapter9.html [17:51] Brandon_R_: that is a problem best solved before programming [17:51] sdwrage has joined the channel [17:52] benvie: v8 itself automatically aligns itself with any existing v8 running in the current thread so you just need to make sure whatever the secondary user of v8 is can accept not being in control of allocations, or give it a way to allocate the important things [17:52] benvie: process argg [17:52] bpierre: Brandon_R_: Yes, I will restart my project after having read some articles on the subject. Thank you! [17:52] magnetik: Is there any page listing good settings for using SlublimeText with node.js ? [17:53] benvie: https://github.com/tanepiper/SublimeText-Nodejs [17:53] benvie: http://wbond.net/sublime_packages/package_control [17:53] benvie: start with those two if you haven't [17:53] AndreasMadsen_: I could use some feedback on my cluster 2.0 pull request: https://github.com/joyent/node/pull/2038 [17:54] magnetik: Thanks (I haven't because I'm using Sublime for like 1h :p) [17:54] benvie: yeah get the second link first [17:54] jxson has joined the channel [17:54] benvie: sublime text is like dump you in the middle ocean, have fun user friendly [17:55] benvie: still the best there is anyway [17:55] Brandon_R_: how do i open the sublime 2 console? [17:55] magnetik: lol same question :D [17:55] benvie: on windows ctrl+tilde (hard to press) [17:55] Brandon_R_: i am testing it on the trial version portable version [17:55] benvie: ~ [17:56] benvie: my pinky finger doesn't like to hit buttons apparently [17:57] cjm has joined the channel [17:58] magnetik: Looks like my fingers can't do Control + ~ [17:58] magnetik: at least it doesn't open anything [17:58] benvie: ok do this [17:58] scttnlsn has joined the channel [17:59] benvie: top menu > Preferences > key Bindings default [17:59] aaronmcadam has joined the channel [17:59] benvie: there at least you can look and figure out what does what you need [17:59] joemccann has joined the channel [17:59] benvie: it's json so easy to read [17:59] Renegade001 has joined the channel [17:59] benvie: and edit [18:00] yank has joined the channel [18:01] magnetik: Yep made it, thans :) [18:01] magnetik: *thanks [18:01] benvie: I'm hoping to switch back to the nodejs module for it and help build out the transport a bit [18:02] sdwrage has joined the channel [18:02] benvie: it has good support for integration so you can say open a pipe and keep that channel open and pretty fully integrate [18:02] storrgie has joined the channel [18:02] benvie: next best thing to it being in node to begin with [18:02] Brandon_R_: how to i enable node autocompletion in sublime text? [18:03] broofa has joined the channel [18:03] Brandon_R_: i installed the package [18:03] benvie: if you have https://github.com/tanepiper/SublimeText-Nodejs either it's tab or ctrl+space [18:03] benvie: I haven't played with autocomplete too much yet [18:03] jarek has joined the channel [18:03] jarek has joined the channel [18:03] benvie: I never use that for some reason [18:04] Brandon_R_: u on linux or windows? [18:04] benvie: windows [18:04] Me1000 has joined the channel [18:04] benvie: should be the same [18:04] benvie: sec lemme scheck [18:05] benvie: "scope": "source.js - variable.other.js" maybe that's an issue [18:05] Brandon_R_: what is the best theme for st [18:05] Brandon_R_: what color scheme are you using? [18:05] dgathright has joined the channel [18:06] benvie: I use the based one but heavily modified for darkness [18:06] benvie: the theme files are also json and pretty easy modify though I don't know what theme engine this uses and it's definitely not following how css works [18:07] benvie: I just make everything dark and I have my customized javascript and c and c++ syntax files and theme [18:07] benvie: because I need max colors [18:08] salva has joined the channel [18:08] benvie: a gui for modifying tmTheme and tmLanguage files is also on my half done need to complete list =/ [18:08] herbySk has joined the channel [18:09] Brandon_R_: very nice [18:09] Brandon_R_: sublime text is definitly my editor of choice [18:09] Brandon_R_: will probably need to test it a little more before i buy it though [18:10] Brandon_R_: how long have you been using it? [18:11] benvie: I've played with sublime text 2 since like the spring or so. It wasn't quite there yet though to replace Textmate (e-texteditor clone on windows) until a couple months ago [18:11] patcito has joined the channel [18:11] benvie: the syntax highlighring and custom language stuff is a dealbreaker or maker for me [18:12] benvie: I've customized them so much that I can tell what kind of code I'm looking at by the color patterns so I'm lost if that doesn't work [18:12] MatthewS has joined the channel [18:12] Brandon_R_: i wonder why doesn't the textmate people make a cross platform solution [18:12] Brandon_R_: it's in demand [18:12] benvie: when ST2 finally supported those correctly that was it [18:12] benvie: it's not people, it's a guy [18:13] benvie: same for etextiedotr [18:13] benvie: and there's something about people who make code editors and disappearing... [18:14] socketio\test\62 has joined the channel [18:14] Brandon_R_: lol [18:14] benvie: aptana started supporting the level of customization (and format eventually) provided by these but it didn't quite get there, and java runs like shit on windows (for me anyway) so I gave up on that [18:14] Brandon_R_: but since it's not free they have incentive to keep supporting [18:14] benvie: and just kept using this thing that looks like ass and is basic but is also the most powerful there is [18:14] benvie: and only just recently did sublime text 2 finally surpass it [18:14] benvie: you'd think right? [18:14] mmalecki: ACTION nerdrages at gui editors [18:15] benvie: look up how long textmate 2 has beem "in development" [18:15] benvie: and ot [18:15] Brandon_R_: do you think vim should remove all that clutter? [18:15] benvie: it's sadly funny how similar the windows clone fared [18:15] benvie: vim apparently is doing good as is [18:16] benvie: it doesn't need to change, new editors just need to exist and have people who will update them for people who don;t want vim [18:16] benvie: ST2 is filling that niche now [18:16] Brandon_R_: yep [18:16] benvie: and doing a good job of it aside from requiring you to code your own gui basically [18:17] benvie: at least you can [18:17] Brandon_R_: how long has textmate 2 been in development? [18:17] benvie: 3 years I think [18:17] benvie: it's not, I mean [18:17] benvie: it's just supposedly been [18:18] benvie: that dude is on some island somewhere he bought, or dead [18:18] Brandon_R_: lol [18:18] Brandon_R_: how apple of you to say that [18:18] benvie: just sayin,I don't use macs and I know [18:18] benvie: that guy is gone [18:19] Brandon_R_: sublimetext has a blog so i feel closer to it [18:19] benvie: for now [18:19] benvie: until he's dead too [18:19] caolanm has joined the channel [18:19] SamWhited has joined the channel [18:20] benvie: here's two blogs http://blog.macromates.com/ http://e-texteditor.com/blog/ [18:20] bnoordhuis has joined the channel [18:20] Brandon_R_: etexteditor is the same guy? [18:20] gut4 has joined the channel [18:20] benvie: nope different [18:20] benvie: it'd make sense if it was the same guy [18:21] Brandon_R_: ok [18:21] tanepiper: I used to use E, but it's too limited now [18:21] catshirt has joined the channel [18:21] benvie: what needs to happen is NodeEditEXTREME [18:21] tanepiper: I'd rather pay for Sublime (which i haven't, yet) [18:21] Brandon_R_: or c9 [18:21] benvie: blowing up the world of code editing [18:21] Brandon_R_: cloudide [18:21] Brandon_R_: what needs to happen is [18:22] benvie: cloud9 is say an implementation, maybe you can plug into it [18:22] Brandon_R_: i need to learn javascript [18:22] tanepiper: Also, sublime's code completion isn't perfect - seems to have problems with . auto completions [18:22] benvie: but you need native access and you need to be able to run locally conveniently [18:22] Brandon_R_: autocomplete sucks on st [18:22] benvie: sublime's completion is downright retarded sometimes, like it's trying to be too clever [18:22] tanepiper: Cloud9 is good, but i've switched from it to ST [18:22] Brandon_R: same here [18:22] benvie: like if i type 4 letters I definitely don't want to match 4 completely separate letters [18:22] willwh: ST? [18:23] Brandon_R: how long have you been using st [18:23] tanepiper: Sublime Text 2 [18:23] benvie: that was the idea that spurred me down this ridiculously long path I've been on [18:23] tanepiper: couple of months now, as my main javascript and PHP editor (I do Drupal work during the day) [18:24] Brandon_R: cool [18:24] tanepiper: it is the spiritual successor to both E and Textmate, and superior to Gedit [18:24] benvie: the idea of building a code editor with access to the native stuff, but using the powerful GUI apis that just come standard in a browser context, without being trapped in it [18:24] Brandon_R: what do you program c++ in? [18:24] tanepiper: I don't, but if I did - Visual Studio. I is still probably the best C/C++ IDE [18:24] tanepiper: *it [18:24] benvie: c++ syntax highlighting sucks ass in evertyhing I've used so I had to edit the hell out of that and the C language files and it's still not sufficiently colorful for me [18:25] tanepiper: http://kodapp.com/ looked so promising, but it seems to have died :( [18:25] benvie: visual studio is nice but the overhead associated with it ends up being a detriment [18:25] wojohowitz has joined the channel [18:25] context: tanepiper: id agree [18:25] benvie: yeah that happens usually, and also that was largely based on using Cocoa [18:25] tanepiper: it used nodejs as it's underlying toolset, so all scripting was JD [18:25] tanepiper: *JS [18:25] benvie: it's super awesome that doing these things is easy on macs [18:25] benvie: except I don't use or like macs [18:26] benvie: I'd rather use linux if not using windows [18:26] benvie: and I do often [18:26] context: so you prefer windows over mac and linux [18:26] context: and you're a developer ? [18:26] benvie: I do, and basically I really dislike macs and linux is fine [18:26] Phlogistique: context: a problem? [18:26] benvie: I have linux running most of the time along with windows [18:27] context: i guess not. i find windows to be more of a pain when developing than a help [18:27] Brandon_R: Mac + MacbookPro + Iphone + Ipod Touch + Ipad = House [18:27] Brandon_R: or a really good apartment [18:27] context: brandon_r: same except my 4S is my ipod [18:27] benvie: I don't know what the issue is fundamentally [18:27] context: its... windows [18:27] tanepiper: i don't own a mac, but i use them at work [18:27] benvie: I went into both linux and os x with about the same experience with both [18:27] benvie: and i wanted to stab babies when using mac os x [18:27] tanepiper: which is why ST rocks because it works great on both [18:27] benvie: I think it was 10.5 [18:28] context: benvie: why is that? [18:28] benvie: and I've used 10.6 [18:28] No9 has joined the channel [18:28] benvie: first off this is factual: the way macs handle mouse input at a low level is different [18:28] context: i find os x to be worlds easier that windows and worlds less of a hassle [18:28] benvie: it is instantly annoying if you aren't used to it [18:28] context: what? [18:28] bradleyg has joined the channel [18:28] ryanfitz has joined the channel [18:29] context: i move the mouse and the cursor moves. pretty sure windows works like that too [18:29] mattpodwysocki has joined the channel [18:29] pgherveou has joined the channel [18:29] benvie: I know it sounds ridiculous [18:29] benvie: but it's not [18:29] context: or were you just lucky enough to use someone that had cursor acceleration on or something and you didn't realize thats something that can be turned on/off [18:29] Drakonite has joined the channel [18:29] benvie: no [18:29] mange has joined the channel [18:30] benvie: sec [18:30] uchuff has joined the channel [18:30] context: your complaining about the mouse. i barely touch my mouse honestly, except for the web [18:31] Brandon_R: context [18:31] benvie: yeah but if it annoyed you every time you did you'd notice [18:31] Brandon_R: what are all the apple divices you own? [18:31] context: MBP, iPhone, iPad [18:31] benvie: I've had an iphone for 3 years and an ipad for one [18:31] context: AppleTV [18:31] context: thought i was missing one [18:31] lyte has joined the channel [18:31] lyte has joined the channel [18:31] Brandon_R: do you have a regular MacPro? [18:32] benvie: I've used os x 10.5-6 for around 6 months [18:32] Brandon_R: or is the desktop dead for you? [18:32] context: no. macbook pro [18:32] context: brandon_r: its dead for me [18:32] Brandon_R: lol [18:32] context: havent had a desktop in over 6+ years [18:32] benvie: ouch [18:32] context: not ouch [18:32] CarterL has joined the channel [18:32] Brandon_R: i want a desktop to work and a laptop to play [18:32] Brandon_R: how old are you? [18:32] Brandon_R: i need to get a job [18:32] context: 15" MBP, 23" monitor i plug into at home with bluetooth keyboard/mouse [18:32] benvie: yeah I'm admittedly particular about my input devices [18:33] context: im thinking bout getting a 27" iMac [18:33] context: brandon_r: 28 [18:33] halfhalo: Macbook Air + custom desktop ftw [18:33] Brandon_R: cool [18:33] cjm has joined the channel [18:33] context: ir maybe just a 27" display. but all the displays are thunderbolt. id have to get a new laptop first [18:33] context: :( [18:33] Brandon_R: i'm 18 and haven't had a job yet lol [18:33] CodeRarity_ has joined the channel [18:33] context: haha [18:33] isaacs: chrisdickinson: hey, dude [18:34] isaacs: you're the runforcover author? [18:34] chrisdickinson: isaacs: yep [18:34] Brandon_R: Occupy Mcdonalds? [18:34] isaacs: awesome, looks cool [18:34] isaacs: hey, expresso is in the package tarball. [18:34] chrisdickinson: thanks :) [18:34] isaacs: that an accident? [18:34] ph^ has joined the channel [18:34] chrisdickinson: let me double check. it's been a little while. [18:34] halfhalo: I have an older MPB that work provides, but I tend to just use my air. its much faster [18:34] pquerna: air <3 [18:34] Brandon_R: what is run for cover? [18:34] benvie: I think this hits on what I felt. http://forums.whirlpool.net.au/archive/1089663 The thing is that I didn't have any issue adjusting the mouse on multiple linux distros to what I wanted but on OS X it just always felt like shit and wrong [18:35] context: my mbp has a 128G SSD [18:35] context: and 8G ram [18:35] chrisdickinson: Brandon_R: pure javascript code coverage [18:35] Brandon_R: cool [18:35] isaacs: it's gonna be in node-tap super soon [18:35] isaacs: like, maybe today [18:35] isaacs: :) [18:35] context: i pulled out the dvd-rom drive and put a 750G hdd in its spot [18:35] chrisdickinson: isaacs: awesome! [18:35] mmalecki: pure javascript? that's awesome [18:35] chrisdickinson: isaacs: i think expresso got pulled in via bunker. [18:35] pquerna: Kami_: ^^ [18:35] Brandon_R: ssd issacs? [18:35] TheJH: isaacs, talking about tap, when will you merge my patch for tap-runner for shebangs? [18:36] chrisdickinson: if i'm wrong and it's just hanging out in the package tarball i'll definitely remove it [18:36] context: brandon_r: solid state hard drive [18:36] halfhalo: I have the 13" i5 Air with 256GN ssd. Desktop has 60GBx2 ssd's as boot drive, mac mini has 80GB ssd [18:36] Kami_: sweet [18:37] context: halfhalo: see id get confused as to where all my data is [18:37] Cromulent has joined the channel [18:37] Brandon_R: wow [18:37] context: ACTION reminds himself he has a drobo-fs :x [18:37] tlynn has joined the channel [18:37] Brandon_R: so many apple people in here [18:37] Brandon_R: :) [18:37] mmalecki: ACTION is both Apple and Linux [18:37] towski has joined the channel [18:37] Brandon_R: who doesn't use apple say I [18:37] context: brandon_r: i find most/a lot of developers these days are [18:37] willwh: < *nix [18:37] benvie: os x became the dominant web dev platform a few years ago [18:37] benvie: \and spread from there [18:37] willwh: I think osx is horrible myself [18:38] TheJH: heh, xchat can't handle CTCP (e.g. /me) correctly with the prepended +/- signs :D [18:38] halfhalo: The Air and Mini are backed up to a sff ubuntu server which shares it with the windows desktop, plus all doc's/etc are synced between all my macs [18:38] TheJH: +ACTION is both Apple and Linux [18:38] Renegade001 has joined the channel [18:38] chrisdickinson: isaacs: ah yeah, i see expresso hiding in node_modules now :) [18:38] isaacs: TheJH: right, sorry, i forgot about that. [18:39] isaacs: the tap-* repos all got merged into node-tap [18:39] isaacs: so i'm still cleaning up the various pull reqs [18:39] benvie: all 5000 [18:39] benvie: tjat [18:39] benvie: one big install [18:40] benvie: people don't even know what they're getting into "hmm node is pretty small" bam 5000 modules incoming! [18:40] TheJH: benvie, huh, 5000? [18:40] benvie: kidding [18:40] chrisdickinson: isaacs: runforcover has been bumped to 0.0.2, removed expresso which was hiding in my node_modules. (sorry about that!) [18:41] benvie: ;) [18:41] isaacs: chrisdickinson: no problem, thanks! [18:41] TheJH: benvie, that's a little bit less than the total number of npm packages :D [18:41] chrisdickinson: no prob. glad it's seeing use :) [18:41] benvie: that's what I was saying hah [18:41] isaacs: benvie: npm install *? [18:41] benvie: would say that work? that'd be a good dare [18:41] isaacs: actually, due to conflicting dependencies, you'd get much more than 5k packages installed. [18:42] isaacs: you'd get multiple copies of certain things. [18:42] benvie: hah yeah like 10x that much [18:42] jrbran has joined the channel [18:42] isaacs: well… not 10x [18:42] isaacs: but maybe double [18:42] benvie: I wonder [18:42] isaacs: a lot of them *would* share the top-level one [18:42] benvie: some modules have no dependencies and some have 20 [18:42] TheJH: 20? [18:43] benvie: how many modules does it take to get express and all of its submodules [18:43] isaacs: benvie: right, but only *conflicts* would install a second time [18:43] context: express doesn't really depend on that much [18:43] benvie: yeah I guess I have no idea how many are outdated with a massive amount [18:43] isaacs: benvie: npm install express; npm ls -p | grep express | wc -l [18:43] isaacs: benvie: npm install express; npm ls -p | grep node_modules/express | wc -l [18:44] isaacs: only 6 [18:44] benvie: that is kind of an issue though, just in general [18:44] benvie: with how fast node's api has moved, stuff is outdated [18:44] benvie: more modules on there will completely break than will work [18:45] context: eh [18:45] mmalecki: forever has 20 or so deps [18:46] benvie: that's surprising [18:46] idefine has joined the channel [18:46] context: wow. [18:47] isaacs: running tests with coverage is waaayyyy slower [18:47] context: thats a lot of deps it has [18:47] context: for something so simple [18:47] benvie: yeah exactly [18:48] mmalecki: actually, 39-25 deps [18:48] mmalecki: so I guess it's 15 or so? [18:48] benvie: lots of single purpose modules I guess [18:48] benvie: small ones [18:48] mmalecki: yeah [18:49] mmalecki: most of them don't have any deps [18:49] idefine has joined the channel [18:49] chrisdickinson: isaacs: yeah, coverage makes tests sort of pokey :\ [18:49] benvie: I mean that's how I try to do it. There's modules for a lot of small target things that are useful. It gives that kind of erggg maybe I should just integrate this kind of feeling [18:49] benvie: but I hate to duplicate work [18:50] benvie: first thing I do when I have a need is look for something already done before inventing [18:50] gopher has joined the channel [18:50] gopher: hello(); [18:50] benvie: 'world' [18:51] gopher: :-) [18:51] idefine: are there any common or good practices for pushing new code to a production server? graceful restarts? [18:52] pquerna: we drain at a node at the load balancer, then kill -9 it. [18:52] pquerna: less than ideal, but are worried about event loop bugs. [18:53] brianseeders has joined the channel [18:53] yhahn has joined the channel [18:54] MatthewS has joined the channel [18:56] idefine: pquerna: have you played around with cluster? it says it has graceful restarting, but I haven't found any resources with people saying they're using that [18:56] pquerna: we do not currently use cluster, we decided to wait till we finish 0.6 and experiment with the core feature if we need it. [18:56] mmalecki: pquerna: I guess I should know, but what company is that? [18:57] pquerna: rackspace [18:57] mmalecki: oh, neato [18:57] pquerna: s/we finish 0.6/we finish porting all our codebase to 0.6/ [18:57] halfhalo: you people with your slides [18:58] Renegade001 has joined the channel [18:58] Leemp2 has joined the channel [18:59] pquerna: idefine: my biggest worry, and there have been related bugs in the past, is having an FD still in th event loop, preventing a restart from completeing. Since we have decent scripting of our load balancers, its easy for us to drain out all our incming requests, and then kill it a minute later (yes, this does possibly kill any requests taking a long time, but the nature of our service is all requests are generally done in 1-2 seconds tops) [18:59] jbpros has joined the channel [18:59] pquerna: if your service was doing large file downloads or such, it could easily make sense to invest time in making true-graceful restarts work. [19:01] mikey_p has joined the channel [19:02] petrjanda has joined the channel [19:02] Wizek-other has joined the channel [19:03] pquerna: btw, looking at the cluster code, it does do a mostly reasonable thing [19:04] pquerna: it stops accepting new connection, sets a timeout to call process.exit [19:04] alex___ has joined the channel [19:06] gut4 has joined the channel [19:06] CiRlE has joined the channel [19:06] alex___: hi! I've just install node from source, but trying to install npm I get an error because the version is very new (~0.7). Is there any other version for npm? Can I force anyway the installation changing the script? [19:06] alex___: installed* [19:06] idefine: pquerna: how are you draining requests? sending all future requests to another server till there are no more connections on a single machine then kill -9 and fire up the process again? [19:07] yank has joined the channel [19:07] jergason has joined the channel [19:09] criswell has joined the channel [19:09] pquerna: idefine: yes, we disable the endpoint in the LBs, we don't wait for zero conns, we kill after a short time (only 10s right now, but I guess we should increase that) [19:09] Me1000 has joined the channel [19:10] jimmysparkle has joined the channel [19:12] jtsnow has joined the channel [19:13] jakehow has joined the channel [19:13] rauchg has joined the channel [19:14] bogomips2__ has joined the channel [19:14] idefine: pquerna: cool, i'll look into doing something like that. Is your site public facing? What are you building? if you don't mind me asking [19:14] franciscallo has joined the channel [19:15] salva has left the channel [19:15] langworthy has joined the channel [19:15] jtsnow has joined the channel [19:16] jinglebellz has joined the channel [19:19] adtaylor: if a module is required by two different modules, would the 'set-up code' (aka non-exports) be run twice? [19:20] langworthy has joined the channel [19:21] idefine: pquerna: ah, cloud kick and backspace stuff :) cool [19:21] TheJH: adtaylor, if both access it at the same location, it's only run once [19:21] idefine: pquerna: cloudkick and rackspace* [19:22] TheJH: adtaylor, run "npm ls", if you see it twice, the setup code will probably run twice,t oo [19:22] jarek__ has joined the channel [19:22] pizthewiz has joined the channel [19:22] towski has joined the channel [19:22] bosphorus has joined the channel [19:23] isaacs: adtaylor: unless you set up some global to prevent it, yeah [19:23] adtaylor: TheJH: Thanks a lot [19:23] isaacs: adtaylor: the issue is that they might be different versions, do different things, etc. [19:23] qbert_ has joined the channel [19:23] isaacs: it's generally best to not have global effects from a module [19:23] isaacs: (at least, not from setup alone) [19:23] sdwrage has joined the channel [19:24] adtaylor: isaacs: OK, I see. Thanks :) [19:24] zomg: Huh... [19:24] zomg: Someone is comparing express to ASP.NET MVC on twitter... [19:24] zomg: I'm by no means an ASP.NET MVC expert but... isn't that entirely wrong? [19:24] zomg: :P [19:24] zomg: I mean they're not really that similar [19:24] joshsmith: zomg: maybe they just mean that they're both MVC frameworks? [19:25] joshsmith: in that very, very limited sense, that's true [19:25] rwasielewski has joined the channel [19:25] zomg: Yeah.. and I'm not sure if express even claims to be an MVC framework =) [19:25] jfmercer has joined the channel [19:27] benvie: I hate npm but only because it has always hated me and tried to kill me on many occasions [19:27] isaacs: benvie: you sure you're not thinking of pip or rubygems or something? [19:27] alystair has joined the channel [19:28] benvie: no npm has a special kind of hate [19:28] benvie: it's twisted and manipulative, pretends to be my friend [19:28] mmalecki: yeah, I mean, I used it for a long time. but then it came here and harassed me with a gun. [19:28] benvie: and then it does things to me when I sleep [19:28] benvie: not good [19:28] yhahn has left the channel [19:28] isaacs: lol [19:29] benvie: I have yet to successfully get npm to do any of the things it's supposed to do on windows [19:29] benvie: ever since the first time it started working on native windows [19:29] benvie: up to and including just new on the newest version [19:29] jskulski has joined the channel [19:29] benvie: ever version I try and fail, different errors, and I know it's my computer's long and storied history with node and npm that does it = [19:29] insin: npm left the head of an EACCESS error in my bed, true story [19:30] benvie: npm says Error: ERANGE, no such file or directory 'C:\Program Files (x86)\nodejs\node_modules\es5-ext' [19:30] benvie: I say: I know, you're supposed to make it [19:30] benvie: I fix all permissions manually [19:30] benvie: etc. [19:30] benvie: npm wants to be lazy and not make directories so I say fine I will delete you and find where npm's family live and then take them hostage [19:31] M2Ys4U has joined the channel [19:31] lzskiss has joined the channel [19:32] isaacs: benvie: oh, what version of node do you have? [19:32] isaacs: benvie: this is with the latest msi? (srsly, if that's still a bug, i'd like to track it down and eliminate it) [19:32] benvie: compiled it last night, it's newer than the latest one [19:32] benvie: maybe that's the problem [19:32] isaacs: benvie: "newer than the latest one" <-- sur, but what version? [19:33] benvie: it's a mix of 0.6.4 and 0.7-pre [19:33] AndreasMadsen has joined the channel [19:33] isaacs: ok… that's probably not right [19:33] benvie: master and 0.6 [19:33] benvie: branches [19:33] isaacs: you should be building on v0.6, not on master [19:33] isaacs: a "mix" is certainly strange [19:33] benvie: I merged them but I guess I got something bad from master [19:33] Jarred has joined the channel [19:33] benvie: I'll check it [19:33] Jarred: hi all [19:33] Jarred: What's the most used MVC framework for Node? [19:33] lorfds has joined the channel [19:34] isaacs: express [19:34] isaacs: Jarred: ^ [19:34] isaacs: but there are some others [19:34] Jarred: alright [19:34] benvie: er wait [19:35] benvie: my node exe is that, but npm is directly from the 0.6.4 install. Do you know if it was a fix in node itself [19:35] benvie: or problem I mean [19:35] fzzzy has joined the channel [19:35] benvie: checking the commits now [19:36] isaacs: benvie: there's a lot of changes [19:36] isaacs: benvie: i'd just run with node 0.6 for now [19:36] benvie: well what I mean is [19:37] adrianmg has joined the channel [19:37] benvie: I started with 0.6.4 basically and merged from master, so I have it. I may be that so going to just grab latest 0.6 but not sur3e that's the prob [19:37] benvie: I'll compile and report if there's an issue [19:37] benvie: from 0.6 [19:37] isaacs: k [19:37] isaacs: you could also just install from the msi [19:37] isaacs: see if that works [19:37] AndreasMadsen_ has joined the channel [19:37] benvie: oh yeah I have that exe somewhere [19:37] isaacs: or do a clean checkout of the v0.6 branch, and build that [19:38] confoocious has joined the channel [19:38] confoocious has joined the channel [19:38] benvie: that's what I did. I install 0.6.4, got rid of all the cruft lefortover settings, but moved my compiled exe over since it has the newest v8 [19:38] benvie: will try it with the stock one [19:38] isaacs: the msi should install npm and node. the EACCES error comes from AV scanning locking a directory that npm is trying to delete. it's fixed in this pre-release: http://nodejs.org/dist/v0.6.4/node-v0.6.4-1-msav.msi [19:39] bogomips2_ has joined the channel [19:39] benvie: that wouldn't be my issue. I specifically have all AV disabled and windows indexer because it blows up my computer if I try to compile the half million file chromium repo with those on lol [19:39] AndreasMadsen_: I would like some feedback on by cluster 2.0 pull request: https://github.com/joyent/node/pull/2038 [19:40] mcantelon has joined the channel [19:40] mmalecki: AndreasMadsen_: does it kill children when master dies? [19:40] AndreasMadsen_: Yes [19:42] adrianmg has left the channel [19:42] qbert_: gonna breakdown and write a incremental backup tool for mongo and less someone knows of a working tool ? [19:42] qbert_: unless* [19:42] mmalecki: this makes zero-downtime restarts a bit harder, but that's not what cluster was designed for, so I guess we're good [19:43] AAA_awright: Hey I have an idea... Let's define a new config option, 'submodule..ver' so multiple Git submodules can be automatically relocated to the same directory [19:43] uchuff has joined the channel [19:44] mmalecki: isaacs: what'd you like to change in current ui? [19:44] AAA_awright: Uh, for resolving conflicts if multiple packages define similar package versions [19:44] MatthewS has joined the channel [19:44] isaacs: mmalecki: i dunno. make it not suck :) [19:44] mmalecki: isaacs: I like that :) [19:44] AndreasMadsen_: mmalecki: no cluster wasn't designed to do that, but i will think about it [19:46] AndreasMadsen_: If a do a graceful worker kill, then fork a new worker -> after that kill another old worker and fork a new ... would that be a zero-downtime restart? [19:46] Edy has left the channel [19:46] Edy has joined the channel [19:46] mmalecki: yeah [19:47] mmalecki: I'm about to write a module for that [19:47] AndreasMadsen_: mmalecki: that would not be too hard to do with cluster 2.0 [19:48] benvie: somehow my literal path variable got echod out into npm-cli.js on line 35 [19:48] benvie: interesting [19:48] adrianmg has joined the channel [19:49] isaacs: benvie: that's not right [19:49] coreb has joined the channel [19:49] adrianmg has left the channel [19:49] benvie: yeah and I didn't manually open it until getting the error on the console trying to run npm so no way it was done in an editor. Trying to figure out how this is possible [19:49] kriszyp3 has joined the channel [19:50] benvie: works not though [19:51] davidedwardclark has joined the channel [19:53] davidedwardclark has left the channel [19:53] benvie: er [19:53] bibabot has joined the channel [19:53] JanLi has joined the channel [19:53] benvie: cache.usage = "npm cache add " [19:53] benvie: + "\nnpm cache add " [19:53] benvie: and then 1nevermind one sec [19:54] AndreasMadsen_: mmalecki: this addition would do a zero-downtime restart -> https://gist.github.com/1427960 [19:54] mmalecki: AndreasMadsen_: I think you're a robot [19:54] AndreasMadsen_: Why? [19:55] mmalecki: AndreasMadsen_: you rewrote whole cluster and as far as I see, the code is awesome :) [19:57] arcanis has joined the channel [19:57] langworthy has joined the channel [19:57] langworthy has joined the channel [19:57] AndreasMadsen_: mmalecki: Well in my opinion the old one wasn't that useful, this once dose the job [19:57] Destos has joined the channel [19:58] mertimor has joined the channel [19:59] AndreasMadsen_: mmalecki: how do I make a good testcase for the restart method, and is there a process SIGNAL I should listening for? [20:00] vguerra has joined the channel [20:01] benvie: my computer has so much shit on it that it needs to be preserved and used for deathmatches [20:02] benvie: shit that insidiously breaks things like Visual C++ 2003 [20:03] AndreasMadsen_: How long are we on UDP port sharing? [20:03] benvie: and various SDKs with conflicting versions from trying to compile random old things [20:05] nmtmason has joined the channel [20:06] benvie: and uhg cygwin [20:06] AndreasMadsen_: Is there a list of often used process SIGNALS [20:06] AndreasMadsen_: ? [20:06] mmalecki: AndreasMadsen_: maybe talk to workers and wait for process.on('exit') from them? not sure [20:07] AndreasMadsen_: mmalecki: what are you referring to [20:07] martyziff has joined the channel [20:07] arcanin has joined the channel [20:07] mmalecki: AndreasMadsen_: testing reset [20:08] AndreasMadsen_: Well thats is a test for the .disconnect method - I have done that [20:08] martyziff has left the channel [20:08] ShinyDarkness has joined the channel [20:09] Kunda has joined the channel [20:09] Brandon_R has joined the channel [20:09] Brandon_R: gu [20:09] Brandon_R: hi [20:09] jimmyspark has joined the channel [20:12] Brandon_R: hi [20:12] AndreasMadsen_: hi [20:12] AvianFlu has joined the channel [20:13] reid has joined the channel [20:14] ph^ has joined the channel [20:14] Tuller has joined the channel [20:16] davidascher has joined the channel [20:17] AndreasMadsen_: mmalecki: apache use SIGHUP to stop and respawn, however it is not zero-downtime, do you think that SIGNAL should be used? [20:17] AndreasMadsen_: SIGHUP: http://httpd.apache.org/docs/2.2/stopping.html [20:18] _unary has joined the channel [20:19] socketio\test\72 has joined the channel [20:21] bradleyg has joined the channel [20:22] AndreasMadsen_: mmalecki: now that I think about it .disconnect is really that graceful since it don't wait until all connection are done, but thats more a TCP issue - or ? [20:22] tilgovi has joined the channel [20:23] sdwrage has joined the channel [20:24] mansoor-s has joined the channel [20:24] tyler-vortex has joined the channel [20:24] areed has joined the channel [20:24] AndreasMadsen_: does when calling the .close on a TCP server, dose the 'close' event first emit when all sockets are closed by the client? [20:25] AndreasMadsen_: when calling the .close on a TCP server, dose the 'close' event first emit when all sockets are closed by the client? [20:25] dgathright has joined the channel [20:27] skunkape has joined the channel [20:29] jacobolus has joined the channel [20:30] svnlto has joined the channel [20:30] robhawkes has joined the channel [20:30] CIA-109: node: 03Ben Noordhuis 07master * re90623e 10/ (527 files in 186 dirs): gyp: upgrade to r1103 - http://git.io/zrAZFg [20:31] wilmoore has joined the channel [20:32] u6754 has joined the channel [20:33] bnoordhuis: AndreasMadsen_: no [20:33] bnoordhuis: (if i'm reading your question right) [20:33] enmand has joined the channel [20:33] AndreasMadsen_: bnoordhuis: is there a easy way to do it? [20:34] tyler-vortex has left the channel [20:34] bnoordhuis: AndreasMadsen_: to close all client connections? [20:34] isaacs has joined the channel [20:35] AndreasMadsen_: bnoordhuis: to stop accepting new connections, but without closeing the existing once, and when all connections are closed (by client or timeout) get a callback. [20:35] CiRlE has joined the channel [20:36] bnoordhuis: AndreasMadsen_: calling server.close() will do the first part (stop accepting new connections) [20:36] bnoordhuis: but the second part you'll have to implement yourself [20:37] Jarred has left the channel [20:37] AndreasMadsen_: bnoordhuis: when will the close event emit? [20:37] nmtmason has joined the channel [20:37] bnoordhuis: AndreasMadsen_: which close event? [20:37] rauchg has joined the channel [20:37] localhost has joined the channel [20:37] AndreasMadsen_: bnoordhuis: http://nodejs.org/docs/v0.6.4/api/net.html#event_close_ [20:38] tilgovi has joined the channel [20:38] tilgovi has joined the channel [20:38] bnoordhuis: AndreasMadsen_: you get it when socket.destroy() is called [20:38] bnoordhuis: so for client connections you will have to do that yourself [20:38] bogomips2__ has joined the channel [20:40] AndreasMadsen_: bnoordhuis: no that the other one, I'm talking about the new net.Server().on('close') [20:41] bnoordhuis: AndreasMadsen_: on the tick after you called server.close() [20:42] bnoordhuis: eh no, on the same tick - sorry [20:42] scott_gonzalez has joined the channel [20:42] AndreasMadsen_: bnoordhuis: concussion? [20:42] Brandon_R has joined the channel [20:43] bnoordhuis: oh, and in 0.6 you will get the 'close' event only after all the connections have been closed [20:43] bnoordhuis: i forgot that patch made it in [20:43] AndreasMadsen_: bnoordhuis: so I can use it just as is? [20:44] bnoordhuis: AndreasMadsen_: yes :) [20:45] rauchg\ has joined the channel [20:46] AndreasMadsen_: bnoordhuis: very nice – I was talking with mmalecki about a zero-downtime restart method for the cluster 2.0 I have made, do you know if there is any SIGNALs I should listening on? [20:46] bnoordhuis: AndreasMadsen_: actually, we plan on moving away from signals [20:47] bnoordhuis: i.e. instead of process.on('SIGINT', cb) you'd listen for process('terminate', cb) [20:47] tilgovi has joined the channel [20:47] bnoordhuis: but we're not there yet and i digress [20:48] mmalecki: bnoordhuis: please leave signals there [20:48] mmalecki: bnoordhuis: there are awesome things you can do using them [20:48] bnoordhuis: mmalecki: as someone who loves unix and would marry it if he could, signals were a bad idea [20:49] madhums has joined the channel [20:49] mmalecki: bnoordhuis: why? (it's possible that I'm a unix noob0 [20:49] futini has joined the channel [20:50] AndreasMadsen_: bnoordhuis: How long are you on the UDP port sharing? [20:50] bnoordhuis: mmalecki: ping me some on other time about that, it's a long story [20:50] mmalecki: bnoordhuis: ok [20:51] mmalecki: bnoordhuis: does it involve a lot of blood? [20:51] bnoordhuis: AndreasMadsen_: haven't done anything so far [20:51] Wizek-other2 has joined the channel [20:51] bnoordhuis: mmalecki: not really, it's about well-meaning people making the wrong choices [20:51] AndreasMadsen_: bnoordhuis: was just asking [20:51] Brandon_R: hey guys [20:52] Brandon_R: i have a question [20:52] bnoordhuis: now if it was about file locking, yes, that would involve blood [20:52] Brandon_R: http://anepigone.blogspot.com/2011/08/half-sigma-writes-as-far-as-i-know-no.html [20:52] Brandon_R: interesting to know [20:55] joshkehn has joined the channel [20:55] joshkehn has left the channel [20:55] jarek has joined the channel [20:55] jarek has joined the channel [20:56] fbartho has joined the channel [20:56] scott_gonzalez has joined the channel [20:58] AndreasMadsen has joined the channel [20:58] TheJH: bnoordhuis, mmalecki, I want to hear the story, too :) [20:58] AndreasMadsen has joined the channel [20:59] Brandon_R: same here [20:59] mmalecki: "Unix Fairy Tales" by Ben Noordhuis. I'd buy it! [21:01] lzskiss has joined the channel [21:01] Brandon_R: i would like to see that made into a stephen king movie [21:01] Brandon_R: guys [21:02] Brandon_R: what are some linux fair tales [21:02] Brandon_R: and why isn't linux more popular? [21:02] fzzzy has joined the channel [21:03] jarek__ has joined the channel [21:04] Brandon_R: oh my gosh [21:04] lzskiss: android os [21:04] Brandon_R: how many different ways are there to make objects in js [21:04] lzskiss: not poplular [21:04] Brandon_R: what is the node.js accecpted way? [21:04] AndreasMadsen: A lot [21:04] AndreasMadsen: {} [21:05] eoduibhir has joined the channel [21:05] TooTallNate has joined the channel [21:05] Brandon_R: have a function then extend it with protypes? [21:06] jimt has joined the channel [21:08] AndreasMadsen: Use the new Fn, and remember to place if (! this instanceof Fn) return new Fn(args) [21:08] gut4 has joined the channel [21:09] AndreasMadsen: And perhaps make a wrapper like createServer there use the new keyword. [21:09] AndreasMadsen: Also the frist letter should be uppercase. [21:11] Brandon_R: :) [21:13] jbpros has joined the channel [21:17] jstash has joined the channel [21:17] isaacs: AndreasMadsen: need parens around (this instanceof Fn) [21:19] AndreasMadsen: Yes writing on an iPad :) [21:19] isaacs: AndreasMadsen: > function F(){}; var f = new F; var g = {}; console.log([[f instanceof F, !f instanceof F, !(f instanceof F)], [g instanceof F, !g instanceof F, !(g instanceof F) ]]) [21:19] isaacs: [ [ true, false, false ], [ false, false, true ] ] [21:19] isaacs: ipad for codes is failsome! [21:19] marcostoledo has joined the channel [21:20] npa has joined the channel [21:21] boltR has joined the channel [21:21] AndreasMadsen: In anyway see: https://github.com/joyent/node/blob/master/lib/net.js#L98 [21:22] dgathright has joined the channel [21:23] bnoordhuis: AndreasMadsen: that's a 'is constructor call?' check [21:23] AndreasMadsen: Yes [21:23] enmand has joined the channel [21:23] bnoordhuis: oh, i think you guys were just discussing that [21:23] bnoordhuis: ACTION should learn to read the whole conversation before jumping in [21:23] spathi has joined the channel [21:24] AndreasMadsen: If someone forget the new keyword [21:25] Brandon_R: hey guys [21:25] Brandon_R: who is on webchat.freenode? [21:25] djazz has left the channel [21:26] tlynn has joined the channel [21:26] nils_r has joined the channel [21:27] Raynos: What am I supposed to add to my windows path to make npm install -g to work? [21:27] Raynos: I mean, I dont want to hard code the path to the bin [21:27] insin: mmm... constructor check. Good old JS. I also love that "factory function" isn't a dirty word in JavaScript, as you can build custom constructors on the fly. [21:27] isaacs: Raynos: nono, you don't have to [21:27] isaacs: Raynos: where is npm itself installed? you can do `npm blah blah` and it works? [21:27] Raynos: Well I do because `npm install jitsu -g` and `jitsu` doesnt work out of the box [21:28] Raynos: npm itself works [21:28] isaacs: Raynos: `npm bin -g` [21:28] isaacs: Raynos: that'll tell you where npm puts bin files [21:28] isaacs: global ones, anyway [21:28] Raynos: C:\bla\nodejs (not in PATH env variable) [21:28] isaacs: there ya go :) [21:29] jbrokc has joined the channel [21:29] Brandon_R: jik [21:29] Raynos: I added to path and it still complained :( [21:29] Brandon_R: i have a question. how does express determine paths [21:30] Raynos: Oh I asked the question wrong! [21:30] Brandon_R: regex or a lexer? [21:30] Raynos: I meant, i've globally install a npm application with a CLI interface [21:30] Raynos: What do I add to my path to make it find that CLI interface [21:30] saikat has joined the channel [21:31] MatthewS has joined the channel [21:32] evolvixon has joined the channel [21:32] joemccann has joined the channel [21:33] evolvixon has left the channel [21:33] Destos has joined the channel [21:35] Brandon_R: http://www.quickmeme.com/meme/35emba/ [21:35] Brandon_R: raynos -> try *nix [21:35] Raynos: Brandon_R: no u [21:36] Raynos: You cant tell the windows customers to "try unix" [21:36] Raynos: if I want productivity Ill reboot into linux [21:36] Raynos: if I want to tell my windows friends how to use node I need to learn how to do it [21:36] Brandon_R: are they programmers? [21:38] bosphorus has joined the channel [21:38] Sidnicious has left the channel [21:39] magnetik_ has joined the channel [21:39] `3rdEden has joined the channel [21:40] fairwinds has joined the channel [21:41] louissmit has joined the channel [21:41] adrianmg has joined the channel [21:42] jelveh has joined the channel [21:43] fzzzy has joined the channel [21:43] Raynos: it doesn't matter. [21:44] Raynos: windows is supposed to be a first class citizen. I mean I don't know what I'm doing, but there must be some way to get something into my PATH so it recognises cli installed with npm [21:44] willwh: Raynos: that is REALLY simple [21:44] thoolihan has joined the channel [21:44] Raynos: Could you tell me how? I can't get it to work [21:44] willwh: start & pause break [21:45] willwh: click advanced [21:45] Brandon_R: do you have the right slash? [21:45] isaacs: Raynos: hey [21:45] willwh: advanced system settings [21:45] willwh: environment variables [21:45] isaacs: Raynos: in cmd, do this: echo %Path% [21:45] willwh: add, ;c:\whatevwer\your\node\path to the end [21:45] Raynos: https://gist.github.com/1428244 [21:45] Raynos: You'd think it would work. [21:46] willwh: umm [21:46] willwh: I don't see node in there [21:46] willwh: for a start [21:46] willwh: your first entry is bunk too [21:46] ramitos has joined the channel [21:46] Raynos: I have node at programfiles\nodejs [21:46] willwh: unless you renamed your Program Files to programfiles [21:46] rauchg has joined the channel [21:46] isaacs: Raynos: what's this bit about? C:\Program Files (x86)\nodejs\node_modules\jitsu\bin [21:46] Raynos: isaacs: trying to get jitsu to work by trial and error [21:46] isaacs: ok [21:47] Raynos: its clearly not working. My PATH is a mess because I keep corrupting it until it works [21:47] isaacs: so, I don't see C:\bla\nodejs in there [21:47] isaacs: or is that, "C:\Program Files (x86)\nodejs" [21:47] willwh: isaacs: he does have programfiles, as stated - his node is in there [21:47] isaacs: ok [21:47] Raynos: I name it nodejs [21:47] willwh: c:\programfiles [21:47] Raynos: is that a problem? [21:47] willwh: nope [21:47] isaacs: Raynos: no, that's fine [21:47] isaacs: just trying to track it down [21:47] joemccann has joined the channel [21:48] isaacs: Raynos: when you install something with -g, what's the output? [21:48] Edy: maybe you should restart cmd.exe [21:48] isaacs: Raynos: oh, that's a good idea. ^ [21:48] willwh: Edy: good call [21:48] Raynos: isaacs: it gives me a cb did not fire error ive been ignoring [21:48] isaacs: ok, so, you have a busted copy of npm. [21:48] isaacs: that should never ever happen [21:48] willwh: Raynos: if you had a cmd prompt open [21:48] isaacs: how did you install npm originally? [21:48] willwh: changed your PATH [21:48] willwh: and did not close / reopen your cmd prompt [21:48] willwh: it would not have the info [21:49] Raynos: well npm kind of works. to some extend [21:49] Raynos: Ill uninstall npm and try again [21:49] Raynos: let me get back to you when my setup is cleaner :) [21:49] jakehow has joined the channel [21:49] Brandon_R: issacs, so npm works in windows now? [21:50] isaacs: Brandon_R: should, yeah [21:50] Raynos: npm does work for me, just not CLI apis [21:50] Brandon_R: but the binaries wouldn't work? [21:50] TheJH: isaacs, npm doesn't work on the domains2 branch :( [21:50] Raynos: npm install on my package.json works like a charm [21:50] Brandon_R: cli api's is what i mean't year [21:51] rauchg has joined the channel [21:51] adrianmg has left the channel [21:52] ecin has joined the channel [21:52] crosscode has joined the channel [21:54] Raynos: so i've got a clean install [21:55] Raynos: npm bin -g outputs C:Users\raynos\AppData\Roaming\npm [21:55] Raynos: That should go in my path, right? [21:55] isaacs: Raynos: yes!! [21:55] isaacs: Raynos: did you install with the node msi? [21:55] Raynos: yes [21:56] isaacs: hm… it should've done that for you, then [21:56] Raynos: well my setup is borked [21:56] Raynos: I had two folders, \node and \nodejs [21:56] isaacs: Raynos: can you try uninstalling and re-installing the msi? [21:56] Raynos: I can [21:57] cmr has joined the channel [21:57] isaacs: it *should* land you on a clean working setup if you do that. if it doesn't, from anywhere, it's a bug. if it can be reproduced, it should be fixed. [21:57] Raynos: Ok [21:57] EvRide has joined the channel [21:58] Raynos: No my path was not adjusted, I think [22:01] nmtmason has joined the channel [22:01] wilmoore has joined the channel [22:03] Raynos: Can anyone else confirm that a fresh 0.6.4 install doesnt set the path correctly? [22:05] cmr: Raynos: How would I test this? [22:05] Raynos: uninstall node in windows, re install it. Look at the PATH environment variable [22:06] Raynos: and then check whether the segment from `npm bin -g` is in your path [22:06] Raynos: By look at your environment variable I think I mean `echo %PATH%` [22:06] cmr: No windows here, sorry. [22:06] bogomips2_ has joined the channel [22:07] qbert__ has joined the channel [22:07] Brandon_R: hey guys [22:07] Brandon_R: i have an idea [22:07] Brandon_R: nodedart [22:07] Brandon_R: am i right? [22:08] Raynos: Brandon_R: no, your wrong [22:09] Brandon_R: :( [22:09] Raynos: Brandon_R: http://stackoverflow.com/a/7724346/419970 [22:10] Brandon_R: holy xx you have 30K karma on so [22:10] Brandon_R: nice job [22:10] satyr has joined the channel [22:10] diogogmt has joined the channel [22:10] Sorella has joined the channel [22:10] Raynos: Brandon_R: http://stackoverflow.com/tags/node.js/topusers ¬_¬ [22:11] Brandon_R: adding you on G+ [22:11] Raynos: I am addicted. It's an addiction :( [22:11] djazz has joined the channel [22:11] Brandon_R: Accquantces or Following? [22:11] Raynos: I dont care, whatever floats your boat [22:12] Raynos: You can claim I'm your brother [22:13] Brandon_R: :) [22:13] Brandon_R: my windows brother [22:13] Me1000 has joined the channel [22:13] Raynos: I wonder whether this is broken because my path env variable is called "path" rather then "PATH" [22:13] hipsters_ has joined the channel [22:15] Brandon_R: brb bro [22:15] Brandon_R: gotta take a swing [22:16] Raynos: Well the CLI stuff works now :) just the program doesnt work [22:17] mmalecki: bnoordhuis: if you got travis e-mail, sorry ;) [22:17] MatthewS has joined the channel [22:17] bogomips has joined the channel [22:18] odyniec has joined the channel [22:18] Raynos: isaacs: thanks for your help. I have it working now. [22:19] scott_gonzalez has joined the channel [22:20] Heisenmink has joined the channel [22:20] xeodox has joined the channel [22:21] u6754 has joined the channel [22:21] crosscode: what's the most solid template language lib for node.js? I want one that doesn't try to be it's own programming language (templating is not worth it's own DSL). [22:21] mmalecki: crosscode: looks like you're looking for plates [22:21] crosscode: thanks. will look into it. [22:21] mmalecki: crosscode: https://github.com/flatiron/plates [22:22] xeodox: Has anyone used backbone.js with node.js [22:23] crosscode: mmalecki: Plates looks like my cup of tea. thanks. [22:23] mmalecki: crosscode: :) [22:25] airborn has joined the channel [22:25] alexhanh has joined the channel [22:26] alexhanh: just build node.js from source on mac os x, then I try to install npm: http://www.pastie.org/private/r41hfrmewvopwshrrgppw [22:26] pita has joined the channel [22:26] mmalecki: hum. isaacs would like to see it [22:27] mmalecki: alexhanh: can you report an issue at isaacs/npm ? [22:27] mmalecki: github, I mean [22:28] alexhanh: can do [22:28] Epeli: Isn't npm now bundled with Node.js? [22:28] sh1mmer has joined the channel [22:29] mmalecki: Epeli: right [22:29] ryanfitz has joined the channel [22:29] mmalecki: alexhanh: so you have npm installed [22:29] djazz: <3 Node.JS + HTML5! [22:29] purr: Let it be known that djazz hearts Node.JS + HTML5!. [22:29] pita: I tried to create something to make a async stacktrace that shows the callback chain https://gist.github.com/1428347 [22:30] alexhanh: npm --version gives segmentation fault [22:30] jelveh has joined the channel [22:32] Sami_ZzZ has joined the channel [22:33] cognominal has joined the channel [22:33] edwardw has joined the channel [22:33] alexhanh: Epeli: small world [22:34] Epeli: indeed [22:36] joshsmith: does anyone have some more resources on how to learn vows? [22:36] iRoj has joined the channel [22:36] joshsmith: I'd like to see some vows in action with some real code [22:36] xeodox: Whats the best form framework for node.js (work with forms, errors, etc) [22:36] joshsmith: I can't generalize this well [22:36] xeodox: form module* [22:37] joshsmith: xeodox: what framework do you use? [22:37] p1d_ has joined the channel [22:37] xeodox: i use express right now, but my forms are still pretty bare-bones [22:37] xeodox: In Django, there were form validation, re-filling forms after submission, etc. [22:37] ryanrolds: joshsmith: I don't have any public examples (all work code), but if you have question just ask. [22:38] joshsmith: xeodox: Express has connect middleware [22:38] joshsmith: just use .bodyParser() [22:38] joshsmith: and then you can listen for things like req.body.image (for a multipart form) [22:39] joshsmith: ryanrolds: would it be possible for you to private gist a really abstracted out example? [22:39] joshsmith: I'm just not sure how to generally access my own modules and use those functions [22:39] xeodox: joshsmith: when people submit a regular form, i want a module that can validate it, and if there are errors, spit it back out so that the template fills the form again automatically, stuff like that….does connect-form do that [22:39] joshsmith: seeing an example would make all the difference [22:40] ryanrolds: xeodox: If you keep the body object after you validate it, you can stuff the data back in to the form in your templates. [22:40] joshsmith: yeah. also, check out toolbox.no.de to see if there's anything that suits your need [22:40] xeodox: ryanrolds: so i should just manually do it, right? [22:40] joshsmith: xeodox: probably best [22:41] xeodox: thanks guys [22:41] ryanrolds: xeodox: Pretty much. Node doesn't frameworks that take ALL of the work out of your lap. I hope it stays that way. ;) [22:42] Leemp3 has joined the channel [22:43] Leemp3 has joined the channel [22:43] ryanrolds: joshsmith: May be able to put something together for you tomorrow when I'm working in that repo. [22:43] criswell has joined the channel [22:43] joshsmith: ryanrolds: awesome, that'd be fantastic of you [22:44] joshsmith: I'm headed out now, but I'm joshsmith on GH and I'll be on here for sure at some point [22:44] ryanrolds: Cool. [22:45] megalomix has joined the channel [22:45] megalomix: hello [22:45] megalomix: can I do something like: exports.index = require('./controllers/index') ? [22:45] Lingerance: Yes. [22:45] malkomalko has joined the channel [22:45] megalomix: ok [22:46] mmalecki: bnoordhuis: ping? [22:46] megalomix: Last question...i have more then one variabile like "index" [22:46] megalomix: is it better to create them before and then use exports ? [22:46] Lingerance: Like: var index = require(...); exports.index = index; ? [22:46] qbert__: your way looks fine [22:46] megalomix: if i have 10 variable can i exports them with ONE row or i have to write exports.one = one exports.two = two etc etc ? [22:47] Lingerance: If so, no. [22:47] unomi has joined the channel [22:48] ryanrolds: You can also module.exports = {'one': ..., 'two': ...} [22:48] isaacs has joined the channel [22:48] megalomix: oooh perfect ryanrolds [22:48] megalomix: thanks! [22:48] ryanrolds: ^_^ [22:48] Raynos: isaacs: I think this is one of your bugs : https://gist.github.com/1428396 [22:49] alexhanh: since which version does npm come with node.js? [22:49] ryanrolds: 0.6.3 [22:50] qbit_ has joined the channel [22:50] qbert__: good to see them bundled [22:51] alexhanh: I see. Building node.js 0.6.3 on os x 10.6.8 works but with 0.6.4, something seems to be broken and causes npm to spew out segmentation fault [22:53] diogogmt has joined the channel [22:53] isaacs: Raynos: i've never used jitsu on windows [22:53] webchat_116732 has joined the channel [22:53] isaacs: Raynos: or, really, at all. [22:53] Aria has joined the channel [22:53] webchat_116732 has left the channel [22:53] isaacs: what's that supposed to do? [22:54] mmalecki: Raynos: lemme see it [22:54] Raynos: isaacs: I'm debugging it. The thing I was trying to point as was a `npm.load` command with little input and the fact that the path in the error has a `~` in it [22:55] perezd has joined the channel [22:55] smathy has joined the channel [22:55] mmalecki: Raynos: which version is that? [22:55] isaacs: Raynos: right, but the error message says this is what's doing it: at EventEmitter. (C:\Users\raynos\AppData\Roaming\npm\node_module [22:55] isaacs: s\jitsu\lib\jitsu\commands\install.js:57:14) [22:56] isaacs: jitsu/lib/jitsu/commands/install.js [22:56] Raynos: I narrowed it down to `setUser` in utils/ini.js [22:56] Raynos: Well actually `thenValidate` returns that error in utils/ini.js [22:56] Raynos: trying to find the source. I'll let you know once I found out what's wrong [22:57] isaacs: start at jitsu/lib/jitsu/commands/install.js, line 57 [22:57] mmalecki: it's a line with '}' [22:57] mmalecki: Raynos: which version is it? [22:58] richardr has joined the channel [22:58] pita has joined the channel [22:58] Raynos: this line : https://github.com/isaacs/npm/blob/master/lib/utils/ini.js#L127 [22:58] Raynos: prefix=C:\Users\raynos\~\AppData\Roaming\npm [22:59] isaacs: Raynos: that's wild [22:59] isaacs: Raynos: can you do this for me? `npm config ls` [22:59] isaacs: and gist the output? [22:59] Raynos: https://gist.github.com/1428428 [23:00] subbyyy has joined the channel [23:00] isaacs: weird [23:00] richardr_ has joined the channel [23:00] isaacs: no ~ in there [23:01] isaacs: Raynos: what's that code.js file in the gist? [23:02] Raynos: isaacs: the snippet of code that calls `load` [23:02] huskyr has joined the channel [23:02] hipsters_ has joined the channel [23:02] Raynos: then load calls something which ends up calling ini, which ends up building the path with that `~` in that line [23:02] Raynos: i.e. the point where the jitsu code leaves jitsu and enters npm [23:03] qbit_ has joined the channel [23:04] joshsmith has joined the channel [23:04] Raynos: Aha! [23:04] Raynos: found it. it's jitsu's fault :) [23:05] Raynos: isaacs: sorry [23:05] sridatta has joined the channel [23:05] sridatta has left the channel [23:06] Raynos: isaacs: https://gist.github.com/1428439 the npm/npmrc file contains that [23:06] hipsters_ has joined the channel [23:08] Raynos: and that npm is located locally in jitsu/node_modules [23:08] Brandon_R has joined the channel [23:08] qbit_ has joined the channel [23:08] isaacs: Raynos: remove that file [23:08] isaacs: if that's all it has, anyway [23:09] Raynos: that worked [23:09] davidbanham has joined the channel [23:09] Raynos: why did that file get there? [23:09] isaacs: Raynos: probably you installed a busted version of npm, and it shoved that file there. the builtin config is designed to be "sticky" [23:10] Leemp3 has joined the channel [23:10] Raynos: I see. so this was just my setup being bugged. Thats cool [23:10] davidascher has joined the channel [23:10] jarek has joined the channel [23:10] jarek has joined the channel [23:11] Raynos: this kind of debugging / asking for help feels like it's node in the #node.js room. Where's the right place to do this for future reference? [23:11] AvianFlu has joined the channel [23:12] huskyr has joined the channel [23:13] pita has left the channel [23:14] _dc has joined the channel [23:14] Brandon_R: the node.js forum [23:14] Brandon_R: google groups [23:14] Brandon_R: https://groups.google.com/forum/#!forum/nodejs [23:14] Brandon_R: or stackoverflow :P [23:14] Raynos: We have a forum? [23:14] megalomix: see you soon guys [23:14] megalomix: bye [23:14] Brandon_R: cya [23:14] Brandon_R: be back soon [23:16] stonebranch has joined the channel [23:16] christine has joined the channel [23:17] Raynos: isaacs: for the record a default 0.6.4 install on windows does set the PATH correctly. My machine is just a mess [23:17] arcanis has joined the channel [23:18] zeade has joined the channel [23:18] dshaw_ has joined the channel [23:18] boltR has joined the channel [23:18] arcanis has joined the channel [23:18] u6754 has joined the channel [23:18] diogogmt has joined the channel [23:20] Brandon_R: :) [23:21] Xeon06 has joined the channel [23:21] Xeon06: Hey guys [23:21] Brandon_R: hello [23:21] Brandon_R: what you working on xeon? [23:21] Xeon06: I'm looking for a simple lightweight but effective static file serving solution. [23:21] Xeon06: I was looking at paperboy, are there any other suggestions of stuff I should take a look at? [23:22] bosphorus_ has joined the channel [23:23] Brandon_R: Nginx is probably better in that domain [23:23] Brandon_R: remember - it's all about choosing the right tool for the job [23:24] Xeon06: I feel nginx might be overkill, and I wanted to stay with a pure node solution for simplicity's sake [23:24] Xeon06: It's just for a small experiment, not for any production stuff [23:24] ph^_ has joined the channel [23:24] jbpros has joined the channel [23:26] adamstantonvan has joined the channel [23:27] koo1 has joined the channel [23:28] jskulski has joined the channel [23:28] spolu has joined the channel [23:29] Brandon_R: hey guys [23:29] Brandon_R: what is the best place to learn html5 and css3? [23:29] Brandon_R: like real world stuff [23:30] zomg: html5 doctor or whatever that site was is pretty good for html5 stuff [23:30] RobWC has joined the channel [23:31] Epeli: dive into html5 [23:31] zomg: I still haven't read Introducing HTML5... I got it last year as an xmas present from Opera :P [23:32] zomg: Not entirely sure why but hey I'll take it [23:32] zomg: :D [23:32] jarek__ has joined the channel [23:35] yank has joined the channel [23:35] _dc has joined the channel [23:36] ryanj has joined the channel [23:39] Brandon_R: books shouldn't be written about html5 [23:39] Brandon_R: it changes before the first one is even sold [23:39] Brandon_R: what we need is a wiki where everyone can update it [23:39] mmalecki: Brandon_R: that's why they are being written XD [23:39] mmalecki: to make new books [23:41] enmand has joined the channel [23:41] Brandon_R: :P [23:41] Brandon_R: i think wikis are better than books if you ask me :) [23:41] Brandon_R: who invented them? [23:47] diogogmt has joined the channel [23:50] jarek_____ has joined the channel [23:50] svnlto has joined the channel [23:50] qbert has joined the channel [23:54] djazz has left the channel [23:56] cmr: Brandon_R: I generally do not purchase books, but one thing that is superior on paper is "pocket guides" or references. The HTML and CSS ones I bought about a year ago covered html5 and it hasn't changed much. [23:56] Brandon_R: how do you make good looking html5 + css3 designs - are there any books on that [23:57] Brandon_R: like web 2.0 colors, typeography etc [23:57] Brandon_R: not semantics and structure [23:57] cmr: I took a design class and it helped a lot. [23:57] cmr: "web 2.0 colors" is the entire color space of rgba (although I use hsl myself) [23:58] cmr: It's something to be learned through practice, IMO, and not through a book. [23:59] cmr: (Not the answer you wanted to hear, I'm sure)