[00:00] Labmonkey1 has joined the channel [00:00] Nuck: warreng: I use Forever to keep them up [00:01] Nuck: And I'm looking at Haibu if they finish up git deployment systems [00:01] warreng: hmm.. i need this node.js process to run as root so it can bind to port 43... i wonder how bad that is [00:02] Nuck: I wonder if Forever can drop its own privs [00:05] stagas has joined the channel [00:06] mwillhite has joined the channel [00:06] pyrotechnick has joined the channel [00:07] libScout has joined the channel [00:08] ninjapig has joined the channel [00:10] AvianFlu: you can drop privs from node [00:10] AvianFlu: process.setuid(/* something that isn't 0 */) [00:12] theCole has joined the channel [00:12] pizthewiz has joined the channel [00:12] josephboyle1 has joined the channel [00:12] richardr has joined the channel [00:12] richardr: Are there any lightweight blogging systems written in Node.js that I should take a look at? [00:13] richardr: Something that I can just write articles in a folder on my PC (managed by Git) or something? [00:13] richardr: But utilises what Node has to offer [00:13] ninjapig has joined the channel [00:14] richardr: (e.g. real time comments, or posts coming in?) [00:15] sh1mmer: richardr: creationix made one [00:15] sh1mmer: git powered [00:15] sh1mmer: it powers how to node [00:15] sh1mmer: it's on github somewhere I think [00:15] sh1mmer: it's called wheat [00:15] richardr: sh1mmer: does it take advantage of unique Node features ? [00:16] sh1mmer: um [00:16] sh1mmer: such as? [00:17] richardr: sh1mmer: something that sets it apart being written in Node? [00:17] richardr: sh1mmer: real-time comments, or something? [00:17] sh1mmer: nafiak [00:17] sh1mmer: it scales really well [00:17] sh1mmer: I assume [00:17] sh1mmer: I haven't used it [00:17] sh1mmer: blogging isn't really the killer app today [00:17] richardr: sh1mmer: thanks, this is what i was looking for. [00:18] AphelionZ_ has joined the channel [00:18] cjm has joined the channel [00:18] Nuck: https://github.com/NuckChorris/jQuery-tag :3 jQuery tag input with autocomplete over socket.io [00:19] Nuck: (actually, the autocomplete is entirely replaceable, socket.io is just the only one I built) [00:19] AphelionZ_: Something weird happened, y'all. I put away a project for a week or so and when I went to run it again it gave me an ECONNREFUSED error. Nothing changed in the code. I tried turning off my firewall but that didn't work. What else can I try? [00:19] Nuck: AphelionZ_: Try gisting your code? [00:20] AphelionZ_: sure, hang on [00:21] AphelionZ_: Nuck: https://gist.github.com/1274411 [00:22] skm has joined the channel [00:22] JakeyChan has joined the channel [00:22] Nuck: eek a whole lot of libs I don't know :S [00:22] AphelionZ_: I tried this with 0.4.12 and 0.5.7 [00:22] Nuck: AphelionZ_: Hmmmm [00:22] AphelionZ_: yeah I disabled every lib but the really really required ones and still nothing [00:23] infynyxx has joined the channel [00:23] Nuck: The ECONNREFUSED, do you know what is giving it? [00:23] Nuck: Whether it's socket.io or express? [00:23] Nuck: Erm [00:23] Nuck: Connect [00:23] AphelionZ: I believe it's connect, it doesnt really like any port I'm giving it [00:24] AphelionZ: I even tried turning off apache and running it on port 80 [00:24] Nuck: AphelionZ: Try a really high port? [00:24] [[zzz]] has joined the channel [00:24] Nuck: Like, 8080? [00:25] kab3wm has joined the channel [00:25] AphelionZ: k [00:26] AphelionZ: Nuck: no luck ;( [00:26] Nuck: AphelionZ: Hmmmm [00:26] Nuck: AphelionZ: I wish I could help more, but I have little to no experience with Connect :/ [00:26] AphelionZ: That's ok. Strange though. [00:28] qbert: AphelionZ, I yes connect a lot, whats up ? [00:28] qbert: I use* [00:28] Aria: AphelionZ: A connection refused when connecting out, or being connected to? [00:28] Nuck: qbert: You yes it? [00:28] Nuck: yes | connect? [00:28] qbert: yes | Nuck [00:28] Nuck: ACTION dies of information overload [00:29] AphelionZ: qbert: getting ECONNREFUSED all of a sudden in my app [00:29] AphelionZ: trying an npm update now [00:30] theCole has joined the channel [00:30] joshgillies: anyone know of a good book or article targeting people wanting to write node apps/modules but unsure of where to start? [00:31] zackattack has joined the channel [00:31] smathy has joined the channel [00:31] Aria: howtonode.org is a decent place. [00:32] dherman has left the channel [00:33] joshgillies: Aria: thanks, have seen this site in the past. Might need to dedicate some time to actually go over their articles [00:33] jmar777 has joined the channel [00:33] AphelionZ: arggh npm update updated like.. ALL of my modules but it still give me ECONNREFUSED [00:34] AphelionZ: I might have to migrate my app to express, my other app is an express app and it seems to work fine [00:34] zmbmartin has left the channel [00:35] Aria: AphelionZ: connection refused when your app does what? [00:35] AphelionZ: Aria: connect.createServer https://gist.github.com/1274411 [00:40] qbert: AphelionZ, express is built on top of connect, I use express and love it [00:42] AphelionZ: qbert: agreed. I was being stubborn because i wanted to build my own thing from scratch but it's really only a matter of time before I cave. Better sooner than later, I suppose. [00:45] seyz has joined the channel [00:45] socketio\test\33 has joined the channel [00:47] reid has joined the channel [00:51] Sami_ZzZ has joined the channel [00:54] captain__ has joined the channel [00:55] joshkehn has joined the channel [00:57] jaequery has joined the channel [00:59] jakehow has joined the channel [00:59] brianloveswords has joined the channel [00:59] talltyler has joined the channel [01:04] libScout: if i want a node app to run on a low level port like 80, is it best to use a webserver like nginx? or is there another method? [01:05] xerox: either ngnix [01:05] xerox: or something simple like node-http-proxy [01:05] xerox: but maybe it's better ngnix [01:05] russfrank: libScout: node can setuid [01:05] russfrank: so you run it as root then setuid to unpriv user, like every other piece of server software [01:06] xerox: russfrank takes the high road :) [01:07] russfrank: ;P or even better, use node-http-proxy and have it setuid. then you've got flexibility of the proxy, and it runs as unpriveleged user [01:07] libScout: does node-http-proxy support https? [01:07] russfrank: yes [01:08] russfrank: https://github.com/nodejitsu/node-http-proxy [01:08] libScout: thanks [01:08] Sami_ZzZ has joined the channel [01:08] dnyy has joined the channel [01:14] sdwrage has joined the channel [01:18] jtsnow has joined the channel [01:20] towski has joined the channel [01:22] zemanel has joined the channel [01:24] akiva has joined the channel [01:28] shipit has joined the channel [01:28] SamWhited has joined the channel [01:32] pyrotechnick has joined the channel [01:33] innociv has joined the channel [01:34] CIA-48: libuv: 03Ryan Dahl 07 * re4a27d1 10/ README.md : Update features - http://git.io/lWQP8Q [01:34] MrNko has joined the channel [01:34] tomlion has joined the channel [01:38] jakehow has joined the channel [01:40] amigojapan has joined the channel [01:42] lz has joined the channel [01:42] pizthewiz has joined the channel [01:42] chilts: I like how the Node community converged quickly around npm - Go has all kinds of package/build tools already [01:42] chilts: ACTION throws a comment out there [01:43] lz has left the channel [01:45] jldbasa has joined the channel [01:45] harthur has joined the channel [01:48] ckknight: chilts: yeah, I'm glad that it's standardized. Even if it's not the most perfect solution, the network effect makes it definitely good enough. [01:50] mike5w3c has joined the channel [01:51] materialdesigner has joined the channel [01:54] icewhite has joined the channel [01:54] cjm has joined the channel [01:55] chilts: ckknight: I quite like how it works ... but yeah, the network effect makes it even more awesome :) [02:03] Aria has joined the channel [02:03] Aria has joined the channel [02:05] kawaz_air has joined the channel [02:05] heavysixer has joined the channel [02:05] JakeyChan has joined the channel [02:07] skm has joined the channel [02:07] mosen has joined the channel [02:07] matyr has joined the channel [02:13] stagas has joined the channel [02:14] alejandromg has joined the channel [02:14] alejandromg: Hello all... [02:15] alejandromg: I have some questions, can somebody help me? [02:15] joshkehn: Probably. [02:15] smathy has joined the channel [02:15] infynyxx has joined the channel [02:17] alejandromg: I want to know about nodejs requirements... [02:18] alejandromg: I am going to run a cloud server [02:18] monokrome: What requirements? [02:18] agnat has joined the channel [02:18] jetienne has joined the channel [02:18] ryanrolds: libssl-dev and python for building. [02:19] alejandromg: About RAM [02:19] joshgillies: mo rams [02:19] te-brian has joined the channel [02:19] ryanrolds: The amount of RAM depends on what you write. [02:19] alejandromg: and CPU performance... [02:19] joshgillies: mo cpus [02:19] ryanrolds: mo io [02:20] alejandromg: ? [02:20] joshgillies: as with what ryanrolds said [02:20] joshgillies: Depends on what you're writing [02:21] alejandromg: It's a simple webserver with mongodb as db... It's something like geekli.st [02:23] joshgillies: Well if it's 'something like' geekli.st, you could ask @gklst what sort of hardware they are running to get an idea? [02:23] alejandromg: Yeah! I already did that.. but with no response :/ [02:24] joshgillies: :/ [02:24] joshgillies: you could just trial something like heroku and see how it fairs [02:24] chilts: as always, start small and scale up if you have to [02:25] chilts: otherwise you're solving problems you don't yet have :) [02:25] joshgillies: ^ this [02:25] mwillhite has joined the channel [02:26] alejandromg: Yeah! Thanks for that... [02:26] alejandromg: chilts: when you said small, do you mean? (sorry, I know this is a dumb question) [02:27] chilts: just start with a VPS somewhere, probably not a micro instance at AWS or the smallest one at Rackspace, but maybe the next one up [02:27] chilts: e.g. small instance at Amazon [02:27] chilts: I've never tried Heroku so can't comment [02:28] chilts: all I'm saying is, start with one server and see what happens, analyse it, measure it [02:28] chilts: your initial traffic will presumably be small but grow [02:28] chilts: unless you get dug or launch in a big way [02:28] alejandromg: Yeah I was thinking that... [02:28] chilts: if you _are_ going to do that, then yeah, have a bigger plan but you still need to measure and predict what you might need [02:29] joshgillies: alejandromg: I'm actually facing a similar situation to be honest (no idea what kind of horsepower I'll be needing for my app) [02:29] chilts: if you don't know the answer to that, then hire someone who does :) (esp. if you're going for the big bang) [02:29] joshgillies: But like chilts explained, I'll just be throwing it to a linode [02:29] joshgillies: trial with some beta invites and see how it fairs [02:29] alejandromg: joshgillies: And that is what I'm asking.. ;) [02:29] chilts: exactly :) [02:30] alejandromg: For that moment I'm using nodester, and nodejitsu. And the app works like a charm... [02:30] alejandromg: But I really want to run my own server... [02:31] Lorentz: Not that hard to run one's own server [02:31] chilts: servers are fast, don't worry about it until you know what your app does under load <- that's the key, knowing the profile of your app [02:31] alejandromg: ok... [02:32] joshgillies: speaking of all this, can anyone recommend a stress testing application for node? [02:32] alejandromg: Lorentz: Where can I find more info about that? [02:32] Me1000 has joined the channel [02:32] tbranyen: F5 [02:32] chilts: heh [02:32] joshgillies: alejandromg: linode has extensive documentation on how to run your own VPS [02:33] joshgillies: F5... you gais [02:33] Lorentz: Other than what josh suggests, it's just like coding, you gotta go do stuff and read up as you come along problems [02:33] alejandromg: Oh! I didn't hear about linode... [02:33] Lorentz: I highly recommend installing virtualbox and try to set up a server in it [02:33] Lorentz: and experiment [02:34] joshgillies: Lorentz: I can recommend this also [02:34] joshkehn has left the channel [02:34] alejandromg: Lorentz: That's a great idea. [02:34] alejandromg: I'll do that. [02:35] joshgillies: Report back with your findings :) [02:35] joshgillies: and dont forget to hand out some of those sweet beta invites our way when you launch ;) [02:35] Lorentz: Yeah, a lot easier than back in the days when I didn't have fancy virtualization things, and did it with bare metal hardware. [02:36] alejandromg: Linode is very cheap (in comparison). [02:36] chilts: sometimes I just boot up a new instance at RackspaceCloud, use it for a couple of hours and shut it down again [02:36] chilts: :) [02:36] alejandromg: joshgillies: I'll do it ;) [02:36] alejandromg: chilts: Haha! That's another great idea :) [02:37] chilts: I find the cost is pretty minimal, though since I shut them down it's not persistent [02:38] chilts: but still, a month with a server in Rackspace is a lot less than an hour of my own time, so sometimes it wins :) [02:38] alejandromg: yeah! That's true.. [02:39] qmx: +1 - almost gave up on local virtualization - cloud wins :) [02:41] Lorentz: Local has its weirdness as does "cloud" stuff, especially if they have certain kernel requirements. [02:42] alejandromg: ujum... [02:42] mynyml has joined the channel [02:42] Nuck: haha [02:42] Vennril2 has joined the channel [02:43] Nuck: Silly learnboost [02:43] Nuck: Unsecured URL shortener [02:43] chilts: ?? [02:43] Nuck: https://github.com/LearnBoost/shorty [02:43] Nuck: Completely and entirely unsecured [02:43] Nuck: (including lrn.cc) [02:43] alejandromg: lrn.cc (?) [02:43] Nuck: You could shorten a pornsite in the name of learnboost [02:44] materialdesigner has joined the channel [02:45] saikat has joined the channel [02:46] dexter_e has joined the channel [02:47] mwillhite has joined the channel [02:49] infynyxx has joined the channel [02:49] jarek has joined the channel [02:50] slifty has joined the channel [02:51] dhasenan_ has joined the channel [02:52] stagas has joined the channel [02:56] Nuck: What MTA do you guys use? [02:56] Nuck: Or perhaps just nothing at all? [02:56] russfrank: postfix [02:57] Nuck: postfix? [02:57] Aria: exim and postfix usually. Been meaning to poke haraka or node-smtp again [02:57] Nuck: Wasn't sure if there were something better than postfix [02:57] Aria: If there is, you have to define the environment. [02:57] Carter has joined the channel [02:57] Nuck: Aria: Well, node-smtp would go through something like postfix [02:57] Nuck: All it does is provide an SMTP connector [02:57] Nuck: I think? [02:58] towski has joined the channel [02:58] AaronMT has joined the channel [02:58] Nuck: lol @ "I'm no genius when it comes to figuring out an RFC that was originally older then me" [02:58] russfrank: haha yeah i just read that line too [02:58] russfrank: there's a couple projects called node-smtp it looks like.. [02:59] Nuck: miksago is a cool guy [02:59] Lorentz: I believe I saw him at a sydney js meetup some time ago, cool dude indeed [03:00] Aria: Nuck: I hope not, considering I wrote it ;-) [03:01] Aria: Nuck: It's a trivial SMTP implementation. [03:02] pyrotechnick has joined the channel [03:02] Nuck: I'll probably do postfix >_> [03:02] Aria: Good call. Well understood and reliable. [03:02] SuMarDi has joined the channel [03:02] russfrank: configuration is pretty straightforward [03:02] jarek- has joined the channel [03:03] Nuck: I was tempted by Haraka but it's just... For this, I don't trust Node so much. [03:03] Nuck: Plus it's overkill for my needs [03:03] chilts: there was talk on this list the other such as "don't use smtp, use something like Amazon SES or SendGrid, it'll save you hassle in the long run" [03:03] Nuck: russfrank: Not for me [03:03] Nuck: Nothing is easy for me [03:03] Nuck: chilts: Meh, I was looking at postmark [03:03] Nuck: But meh [03:03] qmx: hahah, I was about to suggest amazon SES [03:03] qmx: ACTION runs and hides [03:03] russfrank: haha i mean [03:04] Nuck: To be fair, I'm a very old-fashioned person [03:04] Nuck: I'm using a VPS for my site [03:04] chilts: I think the point is, use something else, not smtp :) [03:04] Nuck: Not an EC2 [03:04] chilts: use something that someone else is making work, so you don't have to [03:04] russfrank: after you try to configure sendmail.. anything seems easy [03:04] aroman1 has joined the channel [03:04] groovebucket_ has joined the channel [03:04] aroman1: hello, all [03:04] pyrotechnick has left the channel [03:04] qmx: Nuck: I use vps's (rackspace)+ ses [03:04] Nuck: chilts: Unless you pay for a REST service, SMTP is all you'll get [03:04] chilts: agreed [03:04] Nuck: qmx: RAckspaces is cloud, last I checked? [03:04] chilts: but it should save time/money in the long run :) [03:05] nickadeemus2002 has joined the channel [03:05] qmx: Nuck: meh, a bunch of vps's billed by hour [03:05] Nuck: chilts: I have an SMTP connector already [03:05] qmx: :) [03:05] Nuck: If we start getting spamboxed, I'll switch to postmark [03:05] Nuck: But for now [03:05] Nuck: I'll configure postfix [03:05] skiz has joined the channel [03:05] mraleph has joined the channel [03:05] russfrank: hello aroman1 [03:06] aroman1: so I've got this python module that I need to make calls to. The calls are slow, blocking, and let's just say that I don't think porting the Python to node/JS is reasonable. So right, I want to make calls to this python module from node. How/can I do this? [03:06] olegp: what do you guys think about the idea of writing a configuration management system (like chef or puppet) in server side javascript? [03:06] russfrank: sounds awesome. [03:07] russfrank: can it not be totally confusing and intimidating like puppet? can it have cobbler integration? then yes [03:07] olegp: awesome [03:07] olegp: I knew Id find support here :) [03:07] olegp: I think Ill do it then [03:08] aroman1: put differently, what's the best way to interface with python from node? [03:08] olegp: ( I got a pretty cool reception on hackernews: http://news.ycombinator.com/item?id=3090928 ) [03:09] Nuck: aroman1: Node has the ability to call on programs? [03:10] joshkehn has joined the channel [03:10] joshgillies: aroman1: used child_process [03:11] joshgillies: ? [03:11] joshkehn1 has joined the channel [03:11] joshkehn1 has left the channel [03:13] towski has joined the channel [03:13] pizthewiz has joined the channel [03:14] aroman1: unlink: joshgillies: well that's the thing [03:14] aroman1: i don't _want_ to just call the python script [03:14] aroman1: i'd like some way for them to talk together [03:14] joshgillies: ahhh [03:14] smathy has joined the channel [03:14] joshgillies: in that case, I'll crawl back into my hole [03:14] aroman1: so I was thinking something like a message queue [03:14] joshgillies: ;) [03:14] aroman1: ;P [03:14] chilts: aroman1: what do you need to send between them? [03:15] Nuck: aroman1: Oh [03:15] aroman1: chilts: i'll explain my use case better, it's actually pretty simple [03:15] Nuck: Use a UNIX socket [03:15] chilts: and do you need the response to be in realtime, or just some processing at a later date? [03:15] avalanche123 has joined the channel [03:15] Nuck: aroman1: Unix Socket or HTTP connections [03:15] Nuck: each has positives and negatives [03:16] Nuck: HTTP: More overhead, IDK if it'll go locally without pain [03:16] chilts: there are other ways too, like queues, gearman and suchlike :) all dependent on what is needed :) [03:16] chilts: they might be over the top, but depends on the problem [03:16] Nuck: UNIX: Just a socket as a file, so very basic [03:16] Nuck: chilts: I dunno if Node can do that stuff? [03:17] chilts: well, you can talk to various queues with node (Amazon SQS, RabbitMQ (I believe), my own queue implementation) ... it's all HTTP at the end of the day [03:17] chilts: and Python can pull them out [03:17] Nuck: ahh [03:17] chilts: still, we're speculating since we don't know what aroman1 actually wants :D [03:17] Nuck: Are there node libs for those various things? [03:17] Nuck: chilts: Well he mentioned message queues? [03:17] aroman1: so I've got a python module that is basically a web scraper/parser. so it's slow, blocking (though there are a bunch of "check-in points"), and needs to be in python simply because it's more involved than simple get/post DOM stuff. I've got a website that, when one clicks a button, asks node (which in turn asks this python module) to start that slow series of blocking requests. I would like to push [03:17] aroman1: play-by-play notifications of how the slow python module is doing via socketIO. [03:17] Nuck: Only problem is the amount of overhead [03:18] aroman1: please tell me if that's not clear :) [03:18] Nuck: aroman1: It needs to be in Python? [03:18] Nuck: :/ [03:18] Nuck: Node has a *lot* of power in HTTP I/O [03:18] qmx: olegp: If I would do this, I would make it be json-configured, but would write the core with bare minimum external deps (c++ or even plain c) [03:18] Nuck: We have regexes, streaming parsing, etc. [03:18] chilts: aroman1: sounds like you need a queue to kick things off in the background, but you'll also have to figure out how to get the data that the Python creates, back to the user [03:19] chilts: you may want to put status info into another DB of some sort (keyed on request perhaps) ... like Redis, MongoDB or an SQL DB [03:19] olegp: qmx: well, you'd still need to write the recipes in some language: js seems like a good fit to me [03:20] qmx: olegp: yup, but requiring a js runtime on client defeats the purpose IMHO :P [03:20] chilts: aroman1: you might like to get someone who's had mroe experience doing this kind of thing involved, since it sounds like you're still finding your way :) [03:21] qmx: olegp: it's already a pita to have ruby runtimes for chef/puppet [03:21] qmx: olegp: and cfengine is too hard for mortals to grasp [03:21] joshgillies: ACTION is loving this discussion [03:21] aroman1: Nuck: well, i dunno how familiar with you are with python libraries, but I'd need the equivalent of beautifulsoup or mechanize [03:21] aroman1: and* [03:21] olegp: yeah, reducing the number of dependencies is important, I agree [03:21] aroman1: so maybe I could, actually. [03:22] jacobolus has joined the channel [03:22] qmx: olegp: I would never be against a node.js server for config mgmt :) [03:22] aroman1: chilts: yeah, it's just a little project for my own personal use [03:22] aroman1: if the whole thing is more than 200 lines i'll be surprised [03:22] aroman1: the python module is well under 1000 [03:23] aroman1: 100** [03:23] aroman1: and yes, I was thinking about redis [03:24] qmx: olegp: my view for a tool like this: json config (borrowed from chef), small runtime (borrowed from cfengine3), no database requirement (borrowed from puppet) [03:24] mikey_p: I'm catching up on what's new in the node.js world after being out of sync for a few months [03:24] olegp: yeah, sounds like about what I had in mind [03:25] mikey_p: whats up with strata? i.s. vs. express, are folks using strata over express? [03:25] Nuck: aroman1: If you need mechanize, look up Phantomjs? [03:25] stepheneb has joined the channel [03:25] mikey_p: strata sounds like a really good idea on paper, but I fail to see any clear benefit in real world application [03:27] tmzt_: aroman1: the jquery for node is pretty cool [03:29] davidban_ has joined the channel [03:31] Nuck: Strata could be nice, mikey_p, if only for their very monolithic setup [03:32] Nuck: I could see the benefits of it [03:32] maletor has joined the channel [03:32] Nuck: Namely, it brings you to about PHP level abstraction [03:32] mikey_p: is it catching on in terms of available middleware? [03:32] Nuck: mikey_p: Dunno [03:32] Nuck: I still use Express [03:32] mikey_p: it just seems to me that Connect more or less already defined a standard for abstraction [03:32] mikey_p: even if not intentional [03:33] tylerstalder has joined the channel [03:33] mikey_p: I suppose the only benefit that I can see would be mocking requests for testing [03:34] Aria: HEh. And mocking requests is already painfully easy. [03:34] fbartho: So I have a conceptual grasp on how to call out to a native library from node JS and I have a grasp on how to use the eio thread pool to do non-blocking work that calls back on completion. How do I push events into JS from native without waiting for JS to send me a callback? Or should I instead register persistent callbacks in JS? [03:35] fbartho: ryah, pquerna? #appealtonodegods [03:37] Aria: I'm doing it with a queue and signalling with libev. [03:38] fbartho: Would you have an example for me? [03:38] issackelly_ has joined the channel [03:38] fbartho: The events will be coming in externally via FUSE so I presume I need to do something like that to store them for safe dispatching... [03:39] indexzero has joined the channel [03:40] davidbanham has joined the channel [03:41] Aria: https://github.com/aredridel/mod_node/blob/master/ApacheProcess.cc .. but you'll not want to use that particular queue. [03:41] russfrank: olegp: you have a github thing i could watch? [03:43] mikey_p: mod_node? holy shit that's crazy [03:43] Aria: I intend to use it to spawn node processes on shared hosting. [03:43] mikey_p: that's freaking brilliant [03:44] joshgillies: ^ +1 [03:44] mikey_p: node hosting for the masses [03:44] Me1000 has joined the channel [03:44] Aria: Anyone who wants to help is welcome. It's a pre-pre-prerelease API ;-) [03:44] alejandromg: +1 Cool man! [03:45] qmx: Aria: wsgi-based? [03:45] qmx: forget it, let me read the sources first :P [03:46] fbartho: Aria: so I'm looking at that code, obviously there's a lot of Apache specific stuff going on there [03:46] Aria: Yeah. [03:46] fbartho: I see some queue_push calls [03:46] shanebo has joined the channel [03:46] Aria: qmx: wsgi? [03:46] fbartho: what's the key part I need to look at? [03:46] Aria: Yep. And a queue_pop. And an ev_signal. [03:46] fbartho: and a condition wait spinlock [03:46] abraxas has joined the channel [03:47] Aria: Yeah. In this case, I'm keeping two threads synchronized. [03:47] Aria: You probably don't want that. [03:47] ScottH has joined the channel [03:47] Aria: (I only have separate threads because Apache has no event-loop, so I need a way to pass off to node and wait for a callback) [03:47] Aria: (You don't sound like you want to wait) [03:47] Aria: so ev_async_send triggers node to wake up and check the queue. [03:49] qmx: Aria: man, this looks awesome - congratz [03:49] fbartho: So, the FUSE lowlevel API consists primarily of void functions being called on us [03:50] Aria: qmx: For as raw as it is, I hope so. [03:51] Aria: The fuse_operations? [03:51] Aria: (not sure what you mean by 'void functions') [03:52] fbartho: struct fuse_lowlevel_ops { [03:52] fbartho: yeah [03:52] fbartho: sorry about that [03:52] fbartho: are you familiar with fuse? [03:52] replore has joined the channel [03:52] replore_ has joined the channel [03:52] Aria: Yep. [03:53] fbartho: sweet [03:53] Aria: Oh, you mean function pointers. Good good. [03:53] fbartho: So I've written a couple loop-back Fuse systems, and a programmatically created representation of data as files [03:54] Aria: ACTION nods. [03:54] fbartho: but none of them were using lowlevel [03:54] fbartho: I've also never written a native node plugin [03:54] fbartho: so I'm trying to be extra careful in what I'm doing [03:54] Aria: Hehe. Welcome to crazyland! [03:54] aroman1: Nuck: actually, now that I think about it, I could probably make due without mechanize. I was really just using it to submit forms (Unless there was something tricky about those forms that made raw POST requests impossible/impractical) [03:54] Aria: V8's api is a little confusing at first. [03:55] fbartho: Fuse is multithreaded, so I need to figure out how to hop onto the main thread to dispatch these events [03:55] Aria: Any particular reason you went low-level? [03:55] Nuck: aroman1: Just POST it yourself, and you'll save a LOT of time! [03:55] julioj has joined the channel [03:55] aroman1: Nuck: but the question is: would it still make sense to keep this scraper/parser thing NOT in a message queue? [03:55] jacobolu_ has joined the channel [03:55] fbartho: the non-lowlevel apis return synchronously. [03:55] fbartho: :( [03:55] Aria: Aaah! [03:55] Aria: How do these return? [03:55] fbartho: You call other functions with your reply [03:55] Aria: (so with the non-lowlevel APIs, you'd have to do exactly what I do in mod_node) [03:55] fbartho: aka asynchronously. [03:55] Aria: Oh hot. Nice. [03:55] julioj: hello everyone [03:55] Nuck: aroman1: Eh? [03:56] Aria: Do the calls have to occur in the same thread that called in? [03:56] Aria: (I'd expect not, since they're passing state, but I'm checking) [03:56] fbartho: damn good question. I think not. [03:56] fbartho: the comments don't mention that. [03:56] fbartho: and since we're not creating the thread pools [03:56] Aria: Good good. Be on the watch out for things that would make that assumption not hold. But if true, it simplifies a lot. [03:56] fbartho: we'd have no clean way of naming the threads we're jumping to/from. [03:57] Aria: Yeah, it'd be pain [03:57] aroman1: Nuck: but I do have a whole bunch of DOM+regex stuff in there [03:57] Nuck: aroman1: JSDom is your friend :D [03:57] Aria: So what you'd want to do is queue all the events into node, but have the callbacks call out directly. [03:57] aroman1: Nuck: ..though that might actually be *easier* in JS considering that it was literally built for the DOM [03:57] Nuck: aroman1: haha yeah, possible [03:57] fbartho: That was my intuition [03:57] Nuck: JSDom isn't the fastest, not as fast as string parsing [03:57] Nuck: But it's still probably pretty fast [03:57] fbartho: but I didn't know the terminology /calls to get that safe queuing to happen. [03:58] Murugaratham has joined the channel [03:58] fbartho: Either way, since I'd be passing function pointers (handles) around I need to store them in a C++ map [03:58] Aria: Yeah? (you store a pointer to the function to call back out?) [03:58] Aria: (Continuation passing style?) [03:59] fbartho: Actually I doubt that. [03:59] fbartho: sorry I misspoke [03:59] Aria: Mostly you need to hold on to the structure that holds the request, right? [03:59] Aria: And what op you're handling? [04:00] fbartho: that's what I think. [04:01] Aria: Makes sense. So you're going to more than likely want some variation of node's ObjectWrap, or seting v8 internal fields on an object (Which ObjectWrap is a wrapper for) [04:01] Aria: Pass the data in via the queue, signal node; dequeue and wrap and pass in to node. [04:01] Aria: When a function is called from node, unwrap and call the completion. [04:02] aroman1: Nuck: JSDom is looking really cool. Might actually make sense to port the python stuff to JS here, heh. [04:02] dexter_e has joined the channel [04:03] fbartho: That sounds like exactly what I need, Aria [04:03] ckknight: Anyone have any thoughts how to test that an uncaught exception is thrown with expresso? [04:03] Nuck: aroman1: JS is superior to Python as Caucasi— I mean... [04:03] metellus has joined the channel [04:03] Nuck: ACTION totes isn't a skinhead [04:04] Nuck: ACTION puts on a toupe [04:04] aroman1: LOL [04:04] fbartho: is there a standard threadsafe queue I can be using for this; Aria? [04:04] Aria: stl::queue and the required locking from the stl. [04:04] aroman1: Nuck: i'm bascially a python addict, so that's where I'm coming from [04:04] Aria: V8 already uses the stl, so might as well use what it uses. [04:04] ckknight: Nuck: now I want to see a logo of node.js curbstomping a python [04:04] Nuck: aroman1: I'm sure Node will grow on you eventually [04:04] Aria: I used Apache's for obvious reasons. [04:04] aroman1: but honestly JS is looking cooler and cooler. [04:04] Nuck: ckknight: bahahahaha [04:04] Nuck: ckknight: GAS CHAMBER THEM [04:04] Nuck: ACTION sieg heils [04:04] ckknight: that's a bit far [04:05] fbartho: Do I have to manage the locking separately? last I used raw C++ we implemented our own locking queue :P [04:05] ckknight: btw, asynchronous curbstomping, amirite? [04:05] Nuck: ckknight: Hey. Neonaiz have it hard. Just watch hitlr.de [04:05] fbartho: my current day job involves c++ + JNI + JAVA + V8 + JS [04:05] fbartho: on android. [04:05] zackattack has joined the channel [04:05] qmx: fbartho: sounds fun :) [04:06] fbartho: developer.mobage.com and ngmoco.com/careers/ [04:06] Aria: Yeah, I think you have to do the locking yourself. [04:06] jakehow has joined the channel [04:06] Aria: Basic mutex, if i remember. [04:06] fbartho: if you're interested :P [04:06] Aria: Spiffy. [04:06] qmx: haha [04:07] Nuck: fbartho: Hey, the fewer people who know about it, the better your job security ;) [04:07] qmx: fbartho: looks like everyone is suffering to hire nowadays [04:07] russfrank: anyone aware of any widget toolkits for node [04:07] Aria: If my day job starts being shitty to me, I'd be all over it. [04:07] fbartho: I'll refer you and buy you a beer :P [04:07] Aria: russfrank: widget meaning what in this context? GUI? [04:08] russfrank: yeah sorry for not being more specific [04:08] russfrank: wx or gtk or something [04:08] Aria: People have bound QT and GTK and Cocoa that I know of. [04:08] Nuck: Yeah [04:08] Aria: I'm sure there's more [04:09] joshgillies: RLY?? GTK bindings? Node is invading my desktop!!! [04:09] joshgillies: ACTION is excite  [04:10] Aria: Yeah. Not sure how complete. seed and gjs are the more usual suspects there. [04:10] fbartho: and we're looking to more than double the engineering team @Nuck so ... 60+ open slots [04:11] Aria: Holey moely. [04:11] Aria: Big place. [04:11] fbartho: growing fast [04:11] Aria: And I'm used to my current gig being big to me. [04:11] fbartho: we've been hiring since I joined [04:11] joshgillies: wow [04:11] fbartho: february 2010 [04:12] ckknight: fbartho: how much of your company is node.js-oriented? I'm seeing rails and the like on your career page [04:13] fbartho: the node side is a more recent thing, and we made it a lynchpin of our development process [04:13] boehm has joined the channel [04:14] ckknight: fbartho: also, where are you guys located? not seeing it [04:14] fbartho: we have a bunch of node subprojects for full on servers, but 60% of the JS code we're writing is meant for within our Engine [04:14] fbartho: San Francisco + New York + Amsterdam + Portland + Austin in decreasing size [04:15] alnewkirk has joined the channel [04:15] fbartho: Our parent company is based in Japan [04:16] joshgillies: Keen on hiring anyone from Australia?? ;) [04:16] fbartho: Heck yes :) [04:16] joshgillies: !! [04:16] joshgillies: Awesome [04:16] ninjapig has joined the channel [04:17] fbartho: nodejs@fbartho.com (so I know where the e-mails are coming from) [04:17] ckknight: ah, was just about to ask [04:17] ckknight: :P [04:17] joshgillies: Thanks [04:17] ag4ve has joined the channel [04:17] joshgillies: Might drop you a line this evening ;) [04:18] fbartho: SOoooo Aria, once I have a thread-safe queue. What's the approved way to wake up the node event loop to consume it? [04:18] fbartho: was that the ev_async_send? [04:18] Aria: Yep. [04:18] Aria: The ev_ stuff in my code is the bit you're gonna care most about. [04:18] Aria: Initializing the watcher and signalling it. [04:19] dherman has joined the channel [04:20] dherman: if I want to write to an output stream s and then pipe another stream to s, do I have to flush s before piping? [04:21] Aria: No, node strictly queues writes. [04:21] dherman: even with s.pipe? [04:21] Aria: Yes. Now, once you're piping, you can end up inserting stuff in the middle [04:22] Aria: But anything written prior is already in the queue [04:22] dherman: ok [04:22] dherman: awesome. otherwise it gets really clunky [04:22] dherman: thx [04:22] Aria: Sure thing. [04:22] smplstk_ has joined the channel [04:22] okuryu has joined the channel [04:24] paul0 has joined the channel [04:28] aroman1 has joined the channel [04:28] aroman1: alright so I'm back [04:28] ckknight: aroman1: every moment without you was as an eternity [04:28] towski has joined the channel [04:29] aroman1: ckknight: appreciated [04:29] aroman1: so my problem is, [04:29] aroman1: I need browser-like sessions in node/JS. [04:29] gerard0 has joined the channel [04:29] langworthy has joined the channel [04:29] aroman1: i.e once I POST, I'm logged in to the website. I need to keep the same session so it knows i'm logged in. [04:29] aroman1: simply making a bunch of independent POST/GET requests won't cut it [04:30] boaz has joined the channel [04:30] aroman1: (this is why I used Mechanize in Python, I'm now realizing) [04:30] boaz has joined the channel [04:31] tmzt_: so you need cookies [04:31] aroman1: tmzt_: yeah basically [04:32] aroman1: any libraries I could use to that end? [04:33] ckknight: aroman1: I'd use connect and connect-session [04:33] ckknight: there are plenty of other libraries available, but that's what I would go with for my projects. [04:34] isaacs has joined the channel [04:35] towski has joined the channel [04:35] aroman1: ckknight: "connect and connect-session"? [04:35] ckknight: aroman1: https://github.com/senchalabs/connect [04:36] aroman1: ckknight: ah [04:36] russfrank: fbartho: what company? looking for interns at any of those locations? [04:36] tmzt_: ckknight: he's using this for a client [04:37] fbartho: russfrank: ngmoco.com ngmoco.com/careers/ big thing we're building these days is the technology under developer.mobage.com [04:37] ckknight: aroman1: it could help if you described your current system. Is it from scratch? [04:37] fbartho: We Don't yet have an intern program, but several groups are trying to establish that [04:37] brianloveswords has joined the channel [04:38] aroman1: ckknight: well basically i've got this web scraper/parser currently written in Python/Mechanize/BeautifulSoup. I would like to be able to use Socket.IO to update clients about the progress of that scrapping (think a progress bar, only actually accurate). [04:38] aroman1: so i'm thinking it makes sense to port the scraper from python to javascript [04:39] aroman1: so I can just dispatch calls to that and connect to the "checkpoints" in the parsing process and emit socket messages. [04:39] russfrank: whoah, v8 on android? [04:39] russfrank: i was trying to do that yesterday [04:39] jedahan has joined the channel [04:39] jedahan has joined the channel [04:39] tmzt_: doesn't the jquery library and the other library it uses already going to support cookies and pretty much everything else you would need? [04:39] ckknight: aroman1: python might have a socket.io server library. could be easier long-term. Not that I'm trying to steer you away from node.js, but rewrites are usually not necessary. [04:40] aroman1: ckknight: I did look into that, yep. [04:40] russfrank: fbartho: does ngcore on android run in dalvik? [04:40] aroman1: i was kind of looking for an excuse to use "vanilla" node and JS [04:40] aroman1: (this is just a personal project) [04:40] tmzt_: ngcore? [04:40] russfrank: https://developer.mobage.com/#mobage-gametech [04:40] aroman1: ckknight: i was also thinking about having some sort of MQ between JS and Python [04:41] ckknight: aroman1: oh, if it's a personal project, totally take advantage of the situation and learn node.js :P [04:41] russfrank: its like appcelerator titanium except for games and probably doesn't blow as much [04:41] aroman1: ckknight: yeah if this entire project is >200 SLOC i'll be surprised. [04:41] tmzt_: bs is the reason I learned python :) [04:41] tmzt_: but I've played with jquery-like libs for my last scraping project and it's so much nicer [04:42] fbartho: NGCore is the JS engine + native bindings that runs on iOS and Android. The JS VM is V8 on android, and some components are Node-usable for server side work [04:42] qmx: ckknight: I have netty-socket.io on my OSS contrib queue [04:42] tmzt_: you can pull an element out by a combination of things, even if the page doesn't support individual classes, etc. [04:42] fbartho: but sshhh you didn't hear that from me, that's probably behind NDAs for a little while still [04:42] fbartho: ;) [04:42] russfrank: haha [04:42] aroman1: tmzt_: i was speaking with some pythonistas and supposedly BS is old and busted, and lxml is the new hotness for html parsing in python [04:42] russfrank: so this can be used to create native apks in the androi app store? [04:42] aroman1: but yeah, I know BS so that's what I used. [04:42] tmzt_: makes sense, since Apple only supports their own js library/bindings on iOS [04:43] tmzt_: russfrank: I really want to get into native apks using node.js and rendering with qt/qml [04:43] russfrank: tmzt_: has someone done this already? [04:43] skiz has joined the channel [04:43] russfrank: i was trying to get v8 to compile for android yesterday [04:44] russfrank: but it sigill'd when i tried to create the context [04:44] russfrank: and i couldn't get gdb on it [04:44] tmzt_: russfrank: in reality, if you have c/c++ bindings you can implement the libararies a native app needs on android [04:44] russfrank: but apparently people ahve done this [04:44] tmzt_: really they are optional anyway [04:44] odyniec has joined the channel [04:44] fbartho: russfrank: https://market.android.com/search?q=with%20mobage&so=1&c=apps [04:45] russfrank: wow [04:45] russfrank: so this is v8 in dalvik! [04:45] russfrank: well. [04:45] fbartho: and @tmzt_ we fully comply with iOS's appstore rules with respect to JS [04:45] fbartho: handling the differences between V8 and that is a performance nightmare though. [04:46] russfrank: is v8 way faster? [04:46] tmzt_: fbartho: right, that's what I mean, it's a like a wrapper [04:46] fbartho: russfrank: long story short, v8 has certain things heavily optimized, and it has severe performance failures in other places [04:46] fbartho: so... No. [04:47] russfrank: hahah. [04:47] qmx: hahaha [04:47] russfrank: well, wasn't expecting that [04:47] russfrank: i suppose i shouldn't give up on my idea of writing android apps in a nodejs like wrapping thing [04:47] fbartho: v8 on Android has real trouble, and the newest version has some issues that would really cramp our style so we haven't been able to move up to it yet. [04:47] fbartho: but the old one was massively deficient in other areas [04:48] fbartho: drives me nuts. [04:48] russfrank: by new one do you mean with crankshaft [04:48] fbartho: and russfrank, you should really come chat with us; if you're in the bay area we have networking events... [04:49] fbartho: Our development model means we use node as a development server, and our internal structure gets compiled with node into something that runs under our other environments. [04:49] tbranyen: every day in irc is a networking event [04:49] Shrink has joined the channel [04:49] ckknight: tbranyen: true [04:49] Shrink has left the channel [04:49] tbranyen: i'm dying here, stupid bug won't fix itself [04:50] russfrank: unfortunately from new jersey otherwise I would [04:50] DennisRasmussen has joined the channel [04:51] Nuck: NUCKLEYIZEDYRKtbActually every message is a networking event [04:51] ckknight: fbartho: any ideas on when your next event would be? [04:51] Carter has joined the channel [04:51] Nuck: WTF just happenecd o_O [04:51] Nuck: That was "tbranyen" [04:51] ckknight: Nuck: node.js just happened. [04:51] Nuck: Not... NUCKLEYIZEDYRKtb [04:52] fbartho: events are usually monthly right now [04:52] boaz has joined the channel [04:52] Nuck: fbartho: Every message fires an event in my brain :D [04:52] Nuck: And in your IRC client, I'd aimagine [04:52] tmzt_: I'm one big select() [04:52] fbartho: nope, I have half of yours bitbucketed [04:52] Nuck: Why is there no Node.js Event agreggator named EventEmitter? [04:52] fbartho: just for fun. [04:53] Nuck: There should be [04:53] tmzt_: aren't we one EventEmitter2 ? [04:53] towski has joined the channel [04:53] Nuck: tmzt_: ... wat [04:53] dynacker: wat [04:53] dhasenan_: Become one with EventEmitter2. [04:53] tmzt_: on [04:54] fbartho: Also, we have kegerators on each floor in the office, all you need to do to be introduced to each of the 4 beers we stock (changed weekly) is to submit a resume and come to the networking event. Or just get hired... [04:54] Nuck: hmmm [04:54] Nuck: I approve of EE2 [04:54] russfrank: hahah [04:54] Nuck: (not to be confused with EC2) [04:54] fbartho: are there docs for EE2 and why it's different from EE1? [04:55] Nuck: I assume you meant https://github.com/hij1nx/EventEmitter2? [04:55] ckknight: fbartho: how many people are in your SF office? [04:56] djbell has joined the channel [04:57] fbartho: roughly 200. We had 1 floor originally, then we bought out half of UStream (across the hall) so we have 2 floors in 1 building, and we just got a new space down in china basin, so that's 2 or 3 offices in the same neighborhood depending on how you count. [04:58] ckknight: oh wow [04:59] ckknight: used to a smaller office where I can bring in a pie and feed everyone or something [04:59] ckknight: I tend to ply people with homemade food or alcohol [05:01] josephboyle1 has joined the channel [05:06] fbartho: we appreciate homemade food [05:06] fbartho: and alcohol [05:06] fbartho: the food we have a counter for [05:07] fbartho: after you pay tax to our hexa-pod-mates [05:07] fbartho: (low wall cubicles that are hexagons fitting 5) [05:07] ckknight: hmm [05:07] konobi: which company is this? [05:07] fbartho: the booze you share specifically into company branded glasses that you hand directly to the person you share with :P [05:07] fbartho: ngmoco.com [05:08] konobi: ah [05:08] ckknight: Once I made a chocolate pie that ended up being about 25 proof, which was a bit more than intended [05:08] ckknight: it was delicious, though [05:08] ckknight: one of my coworkers needed a chaser after taking a bite, though [05:08] fbartho: okay, you need to visit then. [05:08] fbartho: bring the pie. [05:09] ckknight: lol [05:09] level09 has joined the channel [05:09] fbartho: I haven't seen an interview candidate offer booze pie before, but I bet it will be a hit. [05:09] ckknight: that would be interesting to bring to an interview [05:09] level09 has joined the channel [05:09] ckknight: hadn't really thought of bringing food [05:09] ckknight: seems like sort of a bribe [05:09] tk: lmao [05:09] fbartho: know your audience. [05:09] ckknight: I just tend to bring food because I have an urge to cook [05:09] fbartho: You'd fit right in if you have the technical chops. [05:10] ckknight: and when I do, I bring it to the people I like, who tend to be coworkers [05:10] fbartho: :D [05:10] ckknight: and then booze pie for all! [05:11] ckknight: for 200 people, I'd be too tempted to homebrew some beer [05:11] ckknight: how are the laws in SF about homebrewing? [05:13] ckknight: ACTION goes to check [05:13] JakeyChan has joined the channel [05:13] JakeyChan_ has joined the channel [05:14] Lorentz: node.js driven homebrewing application? [05:16] ckknight: actually I'd love to have some kind of node.js-driven automation [05:16] ckknight: to control the liquid flow and such [05:16] qmx: the russian from jsconf.eu looks like a good start [05:16] ckknight: but that's a bit further than what my tools would provide [05:16] qmx: ckknight: ^^^ [05:18] digman543 has joined the channel [05:20] Spion_ has joined the channel [05:20] Spion_ has joined the channel [05:20] fbartho: @ckknight homebrewing is perfectly legal [05:20] fbartho: for booze [05:20] ckknight: good [05:20] fbartho: it's the selling of it that becomes restricted [05:20] ckknight: figured it would be [05:21] fbartho: (as everywhere in the country? [05:21] ckknight: right, I figured as much [05:21] fbartho: ) [05:21] ckknight: no, some counties are dry [05:21] fbartho: oh [05:21] fbartho: right [05:21] qmx: ckknight: https://github.com/tobeytailor/espresso [05:21] jacobolus has joined the channel [05:21] fbartho: irrelevant parts of the country. [05:21] fbartho: ;) [05:21] ckknight: where I'm from (Huntsville, AL), homebrewing only recently became legal [05:21] fbartho: really? [05:21] ckknight: yeah [05:21] fbartho: damn [05:21] ckknight: and also more than 8-proof beer [05:21] fbartho: I brewed beer in my apartment in college [05:21] fbartho: (Ann Arbor, MI) [05:21] qmx: fbartho: strong? [05:22] gruwl has joined the channel [05:22] nerdy has joined the channel [05:22] fbartho: roommate's dad started liking it so much he would pay us for 80% of the ingredients, but would only take 1/3rd the bottles [05:22] qmx: (never drank home-brewed booze) [05:22] fbartho: some were strong, some were normal. [05:23] fbartho: 6 batches in 9 months, 1 batch dead, 1 batch half dead. 4 batches solid. [05:23] fbartho: mix of lagers, ales, and extra hoppy IPAs [05:23] cconstantine_ has joined the channel [05:24] smathy has joined the channel [05:24] fangel has joined the channel [05:25] russfrank: damn! every time i compile v8 agaisnt ndk i get a sigill in the simulator [05:26] fbartho: Don't treat the Emulator as a end-all-be-all, it runs slower than most android devices, and is not guaranteed to behave the same. [05:26] fbartho: that said, our heavily modified V8 works against it. [05:26] fbartho: You are using the ARM branch of v8 right? [05:26] russfrank: yeah [05:27] russfrank: its actually from this https://github.com/Evervolv/android_external_v8 [05:27] fbartho: ah, well you've exhausted my current knowledge of what we did to integrate it... :-/ sorry! [05:27] Peniar has joined the channel [05:27] russfrank: before i just pulled v8 from google code and tried to scons it with os=linux arch=arm [05:27] russfrank: haha [05:28] stagas has joined the channel [05:30] kmwallio has joined the channel [05:31] warreng has joined the channel [05:34] fbartho: Oh right, I know we had to include our own STL [05:34] ninjapig has joined the channel [05:34] fbartho: first because there was none in the NDK [05:35] fbartho: but second because the STL that the NDK provides is busted [05:35] fbartho: @russfrank. [05:37] Dreamer3__ has joined the channel [05:38] qmx: laters! [05:39] joshkehn has joined the channel [05:40] jomoho has joined the channel [05:40] nroot7 has joined the channel [05:41] nroot7: What is the preferred way to run node.js application as a demon and restart it if it fails etc ? [05:41] joshkehn: forever? [05:41] joshkehn: https://github.com/indexzero/forever [05:43] piscisaureus has joined the channel [05:43] skm has joined the channel [05:44] ckknight has joined the channel [05:46] langworthy has joined the channel [05:47] vidi has joined the channel [05:50] Dreamer3 has joined the channel [05:51] __doc__ has joined the channel [05:55] captain_morgan has joined the channel [05:55] sreeix has joined the channel [05:55] vidi has joined the channel [05:56] ckknight has joined the channel [05:57] tonymilne has joined the channel [05:57] tonymilne: Hey peeps, anyone got experience with express-mongoose ? [05:57] joshkehn: All bad experiences here. :) [05:58] ivanfi has joined the channel [05:58] tonymilne: LOL. Anyone else? :) [05:59] tonymilne: What did you write in your template, I can't seem to just hot-swap it in… do i need to do something different with the local (as it is now a promise, not an array)? joshkehn [06:00] schwab has joined the channel [06:00] joshkehn: … No idea. [06:00] jetienne has joined the channel [06:01] Frippe has joined the channel [06:04] gut4 has joined the channel [06:04] cjheath has joined the channel [06:05] fread2281 has joined the channel [06:05] navaru has joined the channel [06:06] navaru has left the channel [06:10] SamuraiJack has joined the channel [06:15] Skola has joined the channel [06:17] bEEEeviz has joined the channel [06:17] isaacs_ has joined the channel [06:18] maletor has joined the channel [06:21] stisti has joined the channel [06:22] sreeix_ has joined the channel [06:27] FireCat has joined the channel [06:27] sreeix has joined the channel [06:27] ph^ has joined the channel [06:31] joshgillies has joined the channel [06:32] Morkel has joined the channel [06:33] ivanfi has joined the channel [06:34] gruwl has joined the channel [06:38] YamahaAlex37 has joined the channel [06:39] YamahaAlex37: what is the best way to have js client communicate with java backend? [06:39] joshkehn: HTTP? [06:39] YamahaAlex37: what? [06:39] YamahaAlex37: ok [06:39] joshkehn: I'm not sure what you're asking. [06:39] YamahaAlex37: should i use js socket.io-client, and socket.io-java [06:40] joshkehn: Oh [06:40] YamahaAlex37: ok ill explain what i need [06:40] dubenstein has joined the channel [06:40] joshkehn: Just use the Java socket.io server. [06:40] ckknight: YamahaAlex37: I'd join #socket.io [06:40] konobi: YamahaAlex37: carrier pigeons [06:40] YamahaAlex37: haha ckknight [06:40] ckknight: konobi: I've heard good things about owls. [06:40] konobi: BIRD INTERNET [06:40] joshkehn: konobi: Raven's are where it's at. [06:41] pid_ has joined the channel [06:42] DennisRasmussen has joined the channel [06:42] kawaz_air has joined the channel [06:44] joshgillies has joined the channel [06:44] DennisRas has joined the channel [06:44] yuwang has left the channel [06:44] yuwang has joined the channel [06:47] Xano has joined the channel [06:49] dshaw_ has joined the channel [06:49] sgimeno has joined the channel [06:51] tonymilne has left the channel [06:51] simenbrekken has joined the channel [06:51] nickadeemus2002 has left the channel [06:53] gut4 has joined the channel [06:54] groom has joined the channel [06:55] guidocalvano has joined the channel [06:56] __tosh has joined the channel [06:59] fangel has joined the channel [06:59] gut4 has joined the channel [06:59] DennisRasmussen has joined the channel [07:01] mytrile has joined the channel [07:01] mynyml has joined the channel [07:01] seyz has joined the channel [07:04] dshaw_ has joined the channel [07:05] `3rdEden has joined the channel [07:05] r04r has joined the channel [07:10] sreeix_ has joined the channel [07:12] beevi7 has joined the channel [07:13] r04r has joined the channel [07:14] raphdg has joined the channel [07:16] level09 has joined the channel [07:16] Nuck: You guys see that Dart is out? [07:16] Nuck: http://www.dartlang.org/ [07:16] Nuck: Not so bad as everybody thought. [07:16] tbranyen: time to redo node in dart [07:17] Nuck: lol [07:17] Nuck: The way ES6 is heading, I might actually prefer Dart over it :/ [07:17] Nuck: The elegance of JS with the benefits of static typing and whatnot [07:17] Nuck: At least, from the surface [07:17] Nuck: IDK about deeper down [07:18] YamahaAlex37: dart is like an alternative to js? [07:18] mosen: similar to coffee? [07:18] Nuck: It's Google's attempt at replacing JS [07:18] Nuck: It compiles to JS [07:18] jacobolus has joined the channel [07:18] Nuck: But it's intended to be a separate langauge in the long term [07:18] Nuck: Expect it natively in Chrome very soon [07:18] YamahaAlex37: wow [07:19] YamahaAlex37: how can anything ever get w3c standardized [07:19] djcoin has joined the channel [07:19] YamahaAlex37: with so many changes [07:19] r04r has joined the channel [07:22] topaxi has joined the channel [07:23] Tigraine has joined the channel [07:24] oiiii has joined the channel [07:25] r04r has joined the channel [07:25] r04r has joined the channel [07:26] andree has joined the channel [07:26] ayaz has joined the channel [07:28] stagas has joined the channel [07:30] Skola has joined the channel [07:30] r04r has joined the channel [07:30] r04r has joined the channel [07:35] pgherveou has joined the channel [07:35] r04r has joined the channel [07:36] [AD]Turbo has joined the channel [07:38] [AD]Turbo: hi thre [07:38] ckknight: howdy [07:38] icewhite has joined the channel [07:39] ablomen has joined the channel [07:40] groom has left the channel [07:41] r04r has joined the channel [07:41] emattias has joined the channel [07:41] groom has joined the channel [07:41] cosmincx has joined the channel [07:41] robhawkes has joined the channel [07:43] davidbanham has joined the channel [07:43] cjroebuck has joined the channel [07:46] r04r has joined the channel [07:48] piscisaureus has joined the channel [07:48] mc_greeny has joined the channel [07:50] _kud has joined the channel [07:52] dob_ has joined the channel [07:52] ckknight: Nuck: at least dart has a sane iterator system [07:52] r04r has joined the channel [07:52] r04r has joined the channel [07:53] Nuck: ckknight: haha [07:53] ckknight: separating the iterator from the object being iterated is extremely important [07:54] ckknight: and there's no magic involved like in ES6 with the whole [[Iterator]] proxy [07:54] ckknight: ACTION isn't a fan of magic [07:54] jimt has joined the channel [07:56] ckknight: I just hope that they could make it as efficient (or within an acceptable amount of efficiency) as simple array iteration [07:56] aaronmcadam has joined the channel [07:57] Margle has joined the channel [07:58] bergie has joined the channel [07:59] icewhite has joined the channel [08:00] r04r has joined the channel [08:00] Casan has joined the channel [08:00] Sami_ZzZ has joined the channel [08:01] iivvoo has left the channel [08:02] Tigraine has joined the channel [08:02] aliem has joined the channel [08:05] markwubben has joined the channel [08:05] r04r has joined the channel [08:08] Acolyte has joined the channel [08:09] Sebastien-L has joined the channel [08:09] Acolytee: how do I catch OPTIONS request through the router? [08:10] bergelmir has joined the channel [08:10] bergelmir has joined the channel [08:10] chilts: hmm, can anyone confirm that in this case 'connect' should be a dev dependency rather than a dependency? https://github.com/balor/connect-memcached/blob/master/package.json [08:11] Ang3 has joined the channel [08:11] chilts: otherwise I've added 'connect' and 'connect-memcache' as _my_ dependencies, and then connect-memcache went and required it again :) [08:11] chilts: surely that's unnecessary :D [08:11] Acolytee: for some reason node.js interprets http://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript/7605119 request as POST not OPTIONS [08:12] `3rdEden has joined the channel [08:13] r04r has joined the channel [08:13] r04r has joined the channel [08:13] flamboz has joined the channel [08:14] bnoordhuis has joined the channel [08:15] whitman has joined the channel [08:16] sfoster has joined the channel [08:16] negrete has joined the channel [08:17] piscisaureus has joined the channel [08:17] ixti has joined the channel [08:22] negrete has left the channel [08:24] adambeynon has joined the channel [08:25] Nuck: I want NodeDart [08:25] FiveLemon has joined the channel [08:25] Nuck: Just so I can fiddle with it [08:26] ckknight: Nuck: yes, that would be interesting. [08:26] sirdancealot has joined the channel [08:26] Nuck: ckknight: Imagine the awesome :D [08:26] Ang3 has left the channel [08:26] Nuck: And imagine the *speeds* [08:26] Nuck: Wow [08:27] ckknight: yeah, I agree [08:27] ckknight: I also like that int is unbound [08:27] ckknight: exact 2^1000 <3 [08:28] ppcano has joined the channel [08:30] Morkel has joined the channel [08:30] Margle has joined the channel [08:31] Nuck: ckknight: Wow [08:31] Nuck: Amazing. [08:32] Nuck: I think Dart could be a better serverside language too [08:32] ckknight: I agree [08:32] TomY has joined the channel [08:32] ckknight: I assume on the backend, it'd be implemented as an int64 that autoupgrades to a bigint, like how Python or Ruby does it [08:32] Nuck: The static typing would solve most people's qualms with NodeJS [08:33] ckknight: I think having a good async syntax (rather than callbacks within callbacks within callbacks) would be nice syntactically [08:33] ckknight: like how C#'s async/await pattern is [08:33] chilts: interesting, on the server side they have a vm, not a to JS conversion : "Execute Dart code directly in a VM on the server side" [08:33] ppcano has joined the channel [08:33] Nuck: ckknight: Nah, I don't mind the async setup [08:34] Nuck: chilts: Yup, expect a VM in Chrome soon enough [08:34] ckknight: chilts: and in Chrome, I bet they'd have a dart VM [08:34] ckknight: :P [08:34] chilts: ah cool [08:34] groom has joined the channel [08:34] Nuck: Honestly, Dart has managed to make me go from "LOLFAIL" to "OMGWANT" [08:34] Nuck: And I *hate* static typing [08:34] Nuck: With a passion. [08:34] chilts: hmm, still I've been liking Go recently, rather than a language which has 'class implements something', it just does [08:34] Nuck: And yet, the typing in JS [08:34] chilts: so that's kinda backwards for me [08:34] Nuck: Err, Dart [08:34] Nuck: Wow. [08:35] luke` has joined the channel [08:35] avih has joined the channel [08:35] ckknight: Nuck: so, node.dart, amirite? :P [08:36] chilts: :) [08:36] ckknight: I assume they'll make dart and js code work together, though [08:36] Nuck: ooh [08:36] Nuck: That is a good question [08:36] chilts: there'll be a dart -> JS converter [08:36] Nuck: What will the interaction between Dart and JS be? [08:36] piscisaureus has joined the channel [08:37] JakeyChan has joined the channel [08:37] Nuck: Will JS's variables leak into Dart? [08:37] Nuck: Will they implement this with a Dart VM in Chrome? [08:37] chilts: try this to run Dart in your curent browser (via the JS conversion): http://try-dart-lang.appspot.com/ [08:37] mikl has joined the channel [08:37] jetienne: dart is the new coffee script :) [08:37] chilts: heh [08:38] Nuck: jetienne: Nope, it's what ES6 should be like. [08:38] eventual- has joined the channel [08:38] chilts: except it'll eventually have native support in the browsers and on the server [08:38] jetienne: Nuck: nope this is just a toy language which compile to js [08:38] ckknight: chilts: only one browser which has a non-majority share. [08:38] ckknight: jetienne: why do you say that? [08:38] Nuck: jetienne: Nope, wrong on taht [08:38] Nuck: jetienne: It's a VM [08:39] Nuck: jetienne: They have a VM for it, expect it to be next to V8 in future Chrome versions [08:39] chilts: ckknight: but it doesn't matter, it'll still be able to run in the other browsers [08:39] jetienne: ckknight: nothing can replace js, independant of js quality [08:39] ckknight: chilts: true, through compilation-to-js [08:39] jetienne: Nuck: lets say we disagree [08:40] chilts: yeah, exactly ... it's already doing that ... see that link I pasted above :) [08:40] jetienne: and we still have to see an advantage on js [08:40] jetienne: google says it might be faster one day [08:40] Nuck: jetienne: It's like ES.next, but not as shitty [08:40] jetienne: it isnt currently the case [08:41] jetienne: so currently dart has no advantage over js. [08:41] jetienne: it is slower and nobody can code it and you got no lib [08:41] Margle has joined the channel [08:41] Nuck: ACTION points jetienne to ES.next [08:41] Nuck: Do you eant that? [08:41] Nuck: That pile of shit? [08:41] Nuck: I don't. [08:41] jetienne: Nuck: hehe go read it. nothing to do with dart [08:42] Nuck: jetienne: No, it's two separate approaches to fixing JS [08:42] Nuck: And Dart did a better job [08:42] Nuck: A more JS-like job [08:42] jetienne: Nuck: read es.next [08:42] burningdog has joined the channel [08:42] Nuck: I want Dart + ES5 for ES6, not this piece of shit ES.next [08:42] Nuck: jetienne: I listen to Brendan Eich's podcasts and follow his blog closely [08:43] ckknight: I'm not a fan of Brendan Eich's designs [08:43] jetienne: Nuck: good. so go read es.next :) nothing to do with dart [08:43] ckknight: jetienne: he's not arguing that. [08:43] Nuck: Seriously, jetienne, have you read *anything* I've said? [08:43] jetienne: Nuck: jetienne: It's like ES.next, but not as shitty [08:43] Nuck: I haven't argued that. [08:43] jetienne: Nuck: yep i just copied it :) [08:43] Nuck: jetienne: Yes, I said its *like* [08:43] Nuck: Big difference between comparison and connection [08:44] SubStack: https://github.com/substack/bouncy [08:45] SubStack: completely transparent http proxying! [08:45] SubStack: really stupid simple too, just used the http.parser pool [08:45] Nuck: SubStack: Reverse proxy? [08:45] SubStack: Nuck: proxying like node-http-proxy does [08:46] Nuck: SubStack: Schweet [08:46] Nuck: What's it got better than http-proxy? [08:46] SubStack: but really amazingly simple and it doesn't make connections on your behalf [08:46] cjheath has joined the channel [08:47] Nuck: lolwat I just got this text: http://dl.dropbox.com/u/32738349/apple-associates.png [08:47] SubStack: and it's completely transparent: it just forwards the tcp data along exactly as received once it figures out where it should go [08:47] SubStack: http-proxy uses http.Agent to make a new request based on the request object from http.createServer [08:48] sreeix has joined the channel [08:48] Nuck: SubStack: Can you make it so I just fire it up like 'bouncy config.json' and have it load up configuration on routing from config.json? [08:48] wolftankk has joined the channel [08:49] SubStack: that could work [08:49] kulor-uk has joined the channel [08:49] SubStack: you could very easily roll that yourself though [08:49] Nuck: SubStack: I actually suggested that for node-http-proxy, and it got forwarded to the mad science dept. [08:49] SubStack: haha [08:49] Nuck: But bouncy sounds simpler [08:49] SubStack: it's stupid simple [08:49] Nuck: (and probably faster) [08:50] SubStack: there is exactly one function [08:50] SubStack: aha I can dynamically dispatch based on the types of the arguments to proxy() [08:50] einaros: SubStack: why would I use this, exactly? [08:51] SubStack: einaros: if you have multiple processes on different ports and want them on subdomains [08:51] SubStack: or if you need to load-balance [08:51] einaros: and why would I use it over nginx or haproxy? [08:51] einaros: relatively happy with the latter right now [08:52] SubStack: you can npm install it [08:52] Nuck: nginx sucks ass [08:52] Nuck: for proxying [08:52] SubStack: and it's entirely programmable in node [08:52] Nuck: Like, massively [08:52] Nuck: And Node.js is awesome [08:52] SubStack: anyhow this is mostly competing against http-proxy :p [08:52] versicolor has joined the channel [08:52] einaros: Nuck: haproxy handles websockets nicely, so that's the major selling point for me [08:52] SubStack: I need to test websockets [08:52] Nuck: SubStack: You haven't yet? [08:53] SubStack: hopefully they will just work™ because I'm not doing anything fancy outside of forwarding along raw tcp [08:53] einaros: at this point in time I'm "ok, so this *can* be run on top of node .. but does that mean it should?" [08:53] SubStack: Nuck: I just started writing this an hour ago [08:53] SubStack: I'm porting the tests over from prehost now [08:54] SubStack: an earlier project of mine that was a different proxying approach [08:54] Nuck: SubStack: They should Just Work™, it seems like they should. [08:54] einaros: SubStack: so long as all you do is check the host header and forward tcp packets, I can't see why it shouldn't work with WS [08:55] Nuck: SubStack: I'd also be curious to see it benched against node-http-proxy [08:55] Nuck: Because, well, that's the standard [08:55] Shrink has joined the channel [08:56] Shrink has left the channel [08:57] luke`_ has joined the channel [08:58] chilts: can't netcat do similar things with tcp streams? [08:58] adrianmg has joined the channel [08:58] SubStack: chilts: parsing http headers? afraid not [08:58] eldios has joined the channel [08:59] einaros: loadbalancing with netcat seems .. impractical [08:59] chilts: I thought you said it just forwards the tcp stream along? [08:59] SubStack: chilts: after it parses the http headers [08:59] markwubben has joined the channel [08:59] chilts: I obviously don't understand what it does yet ... but I'll have a look, it does sound interesting :) [08:59] chilts: ah right, cool [08:59] Nuck: chilts: It checks the HTTP headers, figures out where to lodge it, then just forwards the whole stream [09:00] einaros: chilts: while you're at it look at haproxy too [09:00] SubStack: whereas http-proxy uses http.Agent to make a new request [09:00] SubStack: so the headers might differ [09:00] diamonddog has joined the channel [09:00] TheFuzzball has joined the channel [09:00] einaros: that's a pretty dingbat approach, unless they actually intend to modify the stream somehow [09:00] SubStack: they do [09:01] SubStack: configurable to send x-forwarded-for and such [09:01] einaros: meh [09:01] SubStack: yeah I don't want those either :p [09:01] saikat has joined the channel [09:02] chilts: I've always used Nginx but I'll have to give it a go [09:02] chilts: einaros: and haproxy too :) [09:02] SubStack: well don't use it just yet :p [09:02] SubStack: still writing tests [09:02] chilts: :) [09:02] davidbanham has joined the channel [09:03] errordeveloper has joined the channel [09:03] einaros: nginx made a mess of my websockets, and the whole custom-module-requirement to do raw tcp streams was just annoying [09:03] einaros: haproxy, on the other hand, has been friendly thus far [09:04] ag4ve has joined the channel [09:05] Casan: I'm trying out railway js (http://railwayjs.com) but I'm experiencing a problem when I run the blog example, it fails when warning about export being a reserved word (verbose gist: https://gist.github.com/1274854) [09:05] Twelve-60` has joined the channel [09:05] Casan: anyone here who used railway js, who understands the problem? [09:05] einaros: SubStack: do you intend to make an effort to properly handle re-entrant requests when load-balanced against more than one server? [09:06] _kud_ has joined the channel [09:06] SubStack: einaros: that should already work [09:06] SubStack: have to test it though [09:07] avih has joined the channel [09:07] einaros: do you base that on cookies, proxy headers or otherwise recognizing clients? [09:07] simenbrekken has joined the channel [09:08] cha0s has joined the channel [09:08] cha0s has joined the channel [09:09] adrianmg has left the channel [09:09] polyrhythmic has joined the channel [09:09] bzinger has joined the channel [09:10] gavin_huang has joined the channel [09:10] Manuel_ has joined the channel [09:11] Margle has joined the channel [09:13] gavin_huang has left the channel [09:14] gut4 has joined the channel [09:15] Wizek-other has joined the channel [09:15] ayaz has joined the channel [09:18] rendar has joined the channel [09:23] gavin_huang has joined the channel [09:24] negrete has joined the channel [09:25] [AD]Turbo: knowing that Javascript strings are encoded in UCS2, can I deduce that passing a Javascript/NodeJS string to an external process using ucs2 encoding (e.g. child.stdin.write(str, 'ucs2')) is the fastest option (in the sense that, theoretically, no additional conversions will be made) ? [09:27] xsyn has joined the channel [09:27] sreeix_ has joined the channel [09:27] sreeix has joined the channel [09:28] jackbean has joined the channel [09:29] gavin_huang has joined the channel [09:29] Druide has joined the channel [09:30] felixhummel has joined the channel [09:30] negrete: ...for example, service01.example.com(:80) -> example.com:3000, service02.example.com(:80) -> example.com:3001 and service03.example.com(:80) -> example.com:3002 [09:34] SubStack: [AD]Turbo: you can use Buffers for that [09:34] _kud has joined the channel [09:34] TheJH_phone has joined the channel [09:35] [AD]Turbo: SubStack, I have a string created by a JSON.stringify(myObj), and i want to pass it to an external process, making sure no additional intermediate steps (e.g. utf8 encoding) are performed [09:35] Margle_ has joined the channel [09:35] aaronmcadam has joined the channel [09:36] [AD]Turbo: so I was wondering if ucs2 is good for that [09:36] bzinger has joined the channel [09:37] bergie has joined the channel [09:41] k1ttty has joined the channel [09:43] bzinger has joined the channel [09:43] chovy has joined the channel [09:43] dexter_e has joined the channel [09:43] stagas has joined the channel [09:44] ppcano has joined the channel [09:46] rjack has joined the channel [09:51] HardPhuck has joined the channel [09:51] darinc has joined the channel [09:52] SuMarDi has joined the channel [09:54] gut4 has joined the channel [09:55] pgherveou has joined the channel [09:55] Trisox[work] has joined the channel [09:55] jetienne has joined the channel [09:56] jhbot has joined the channel [09:57] McMAGIC--Copy has joined the channel [09:59] DrMcKay has joined the channel [10:00] Casan: freebsd calipso npm install problem https://gist.github.com/1274984 [10:01] jbpros has joined the channel [10:04] ditesh|cassini has joined the channel [10:09] davidbanham has joined the channel [10:10] abraxas: Dart has been released. [10:10] abraxas: http://googlecode.blogspot.com/2011/10/dart-language-for-structured-web.html [10:10] abraxas: http://www.dartlang.org/ [10:12] ayaz has joined the channel [10:12] merlin83 has joined the channel [10:17] guidocalvano has joined the channel [10:18] stagas_ has joined the channel [10:18] DrMcKay: abraxas: it doesn't have a npm package, thus it doesn't exist yet [10:19] stagas has joined the channel [10:19] abraxas: :D [10:20] DrMcKay: and it's in SVN. like, seriously, SVN? [10:21] irahgel has joined the channel [10:21] abraxas: so is v8 [10:21] hellp has joined the channel [10:21] DrMcKay: I know [10:21] DrMcKay: it sucks [10:21] DrMcKay: but SVN has some git repo as well [10:22] DrMcKay: s/SVN/v8/ [10:24] Morkel has joined the channel [10:31] Margle has joined the channel [10:32] Druide has joined the channel [10:33] gut4 has joined the channel [10:34] jldbasa has joined the channel [10:34] abraxas: Dart looks very unexciting [10:34] abraxas: Nothing new, really [10:35] abraxas: Do they seriously feel javascript needs to be replaced by that? [10:35] ablomen: abraxas, not true, i always wanted to feel like i'm living in the 90s while doing webdevelopment [10:35] DrMcKay: lol [10:38] agnat has joined the channel [10:40] nforgerit has joined the channel [10:40] abraxas: ;) [10:40] mAritz has joined the channel [10:41] abraxas: I don't really wanna be all "Go JavaScript! Fuck Dart!".. but it really looks .. kinda boring. [10:42] hwinkel has joined the channel [10:43] burningdog_ has joined the channel [10:43] ablomen: I guess it serves a purpose, people that come from C-like languages might feel more at home with classes, typed variables etc [10:44] Frippe_ has joined the channel [10:44] stagas: abraxas: and with the missing function keyword it's hard to see what's an expression, a function call or a function definition since they're all the same [10:45] versicolor has joined the channel [10:45] FireCat has joined the channel [10:46] theCole has joined the channel [10:50] jetienne has joined the channel [10:52] verdoc has joined the channel [10:53] ckknight has joined the channel [10:56] jetienne_ has joined the channel [10:57] DennisRasmussen has joined the channel [10:58] ablomen: ok, nvm, it does not server a purpose, the fiboniacci example is very slow, yet another cancerous language [10:59] Trisox has joined the channel [10:59] Casan has joined the channel [11:01] Xano has joined the channel [11:01] ckknight: ablomen: cancer means it's growing uncontrolably, amirite? [11:03] Margle has joined the channel [11:03] ablomen: sure, i just hope it means slow in this case [11:04] fly-away has joined the channel [11:09] ckknight: ablomen: you're referring to Ted Dziuba's article, right? or something else? [11:09] ablomen: yeah, but talking about dart [11:10] ckknight: ah, I see [11:10] ckknight: Dart seems cool, what's your problem with it? [11:11] ckknight: that it's _currently_ slow? [11:11] ablomen: lol no that was just a joke [11:11] ckknight: oh, okay then. [11:11] ckknight: I'm glad [11:11] ckknight: we would've had fightin' words [11:11] ablomen: it's compiling to javascript anyway ;) [11:12] ckknight: in one case. I'll be interested when the Dart VM becomes viable [11:14] ablomen: dunno, it just feels a bit like coffeescript to me, might be useful for people that for some reason don't like the js syntax, but i don't see the real advantage of using it [11:14] ablomen: (if there is one) [11:15] piscisaureus has joined the channel [11:20] ckknight: ablomen: the main advantage will be the Dart VM when that comes out, until then, it won't be much use over just sticking to plain JS. [11:21] vns has joined the channel [11:22] herbySk has joined the channel [11:24] ablomen: ckknight, sure, though seeing how long it takes for js features to be implemented i might retire when that finally happens, anyway, well see, maybe in a few years javascript development is old and dusty and everybody uses dart [11:24] ablomen: *might be retired [11:24] ckknight: you and I know that won't happen [11:25] ckknight: I doubt Chrome will ever reach majority usage [11:25] ckknight: and even if it does, we'll still have several minority browsers to deal with [11:26] TheJH_phone has joined the channel [11:29] _kud has joined the channel [11:30] NetRoY has joined the channel [11:31] Xano has joined the channel [11:31] burningdog_ has joined the channel [11:31] brianseeders has joined the channel [11:34] gut4 has joined the channel [11:35] negrete has left the channel [11:38] hafos has joined the channel [11:40] hafos: I'm trying to get my head around what NodeJS is exactly... I started learning Rails as my first tool of choice just recently, but I just don't understand when you'd prefer NodeJS over something else and what you can compare it to... could anyone give me a short rundown with some practical examples ? [11:40] CarterL has joined the channel [11:42] scott_gonzalez has joined the channel [11:42] bzinger has joined the channel [11:43] ckknight: hafos: node can do an extreme amount of requests per second, due to its asynchronous event system. If I were to do anything that does a lot of I/O, node is a good choice. Also, it being JS, I could share code on both the client and server. [11:45] neurodrone has joined the channel [11:46] hafos: perhaps a vague question, but for a newbie web developer and with the current state of docs and information available, would you think nodejs is a better choice? [11:46] d0k has joined the channel [11:46] burningdog_ has joined the channel [11:46] hafos: I get the feeling documentation isnt quite "at that point" where it's a nobrainer, far from it [11:49] Vertice has joined the channel [11:50] ablomen: hafos, do you just want to learn or are you actually going to use this in production/for a job? [11:50] hafos: I'm learning Rails atm because I want to transition into a developer role (whether this is freelance or at a company I don't know yet) [11:51] hafos: but I'm looking at different options too, I think it's good to learn the basics of a couple languages before settling on one [11:53] bshumate has joined the channel [11:54] ablomen: well keep in mind that node.js is relatively young, so it's bound to change a lot fast, so for production it might not be the best choice yet, on the other hand, just try it, it will mature eventually and in the meantime you will get experience in javascript and a lot closer to the "root" of server side development then with frameworks and/or languages like php etc [11:56] ckknight: hafos: if you want to be a developer, learn multiple different frameworks [11:56] Ang3 has joined the channel [11:56] Ang3: hey [11:56] ckknight: hafos: then you'll be able to evaluate for yourself the benefits and downsides of each [11:56] lz has joined the channel [11:56] lz has joined the channel [11:57] hafos: ckknight: that's what I'm doing, it's just that nodejs seems hard tl earn [11:57] ckknight: I'd start with a tutorial for connect or express [11:58] ckknight: those are more user-friendly [11:58] ckknight: than raw node.js, that is [11:58] eventual- has joined the channel [11:59] ablomen: hafos, you might also want to check out sites like http://howtonode.org/ [11:59] ckknight: oh yes, good idea [12:00] ablomen: and, if you don't know javascript yet, http://eloquentjavascript.net/contents.html [12:00] kuebk has joined the channel [12:01] stagas has joined the channel [12:01] cthulhu_lovecraf has joined the channel [12:01] hafos: that's the thing though, tutorials are fine but I prefer a more structured learning experience... a proper book or a more in-depth tutorial [12:01] hafos: rails has some great resources so perhaps I'll just stick with that (for now) [12:02] simenbrekken: don't grab the diamond hammer [12:03] simenbrekken: as in don't try and hammer away at every problem with the same tool [12:03] dexter_e: Whats the best way to check: process.isItProcessingSomething(); ? [12:04] dexter_e: Basically check if node is in the middle of a request or is save to reboot.. [12:05] hafos: simenbrekken: I don't, I'm learning to do web development pretty much from scratch... I need to learn to pick up the different hammers first before I can switch ;-) [12:05] dexter_e: And will process.exit() just exit even if its in the middle of processing a request? [12:05] g4_ has joined the channel [12:05] simenbrekken: dexter_e: i'm pretty sure you'll effectively kill the process [12:06] dexter_e: how to check if its busy ? [12:06] JSManiacs has joined the channel [12:06] uchuff has joined the channel [12:07] eldios has joined the channel [12:07] simenbrekken: dexter_e: there's probably a nice way of doing this but you could have a middleware at the end of all your other routes and when that's called you set a flag like "idle" to true [12:08] dexter_e: Whoa! [12:08] burningdog: I can't find a ppa with nodejs and npm for lucid - am I looking in all the wrong places? [12:08] dexter_e: Thats a good idea! [12:08] dexter_e: simenbrekken: Thanks simenbrekken thats a great idea [12:08] gut4 has joined the channel [12:09] simenbrekken: dexter_e: no problems, I prefer killing in the name of! Sounds scary with a system that can't handle a sudden crash tbh [12:09] ablomen: hafos, the thing is, it's not like RoR, there is not a huge framework that you have to stick with, the basics are without mvc, db abstraction layers and whatever, you just have javascript with a few extra modules, and you can add/remove others when you need them, so for basic stuff there really is not a lot of "depth" [12:09] dexter_e: actually I just realized that might not work if the time to process requests isn't predictable. [12:10] dexter_e: simenbrekken: if request A came in before request B but request A took longer to finish its DB query then the flagging would break , right? [12:10] simenbrekken: I really learned a lot about HTTP in general from node.js since it's pretty low level at times [12:10] burningdog: ACTION would prefer a ppa rather than maintaining my own build [12:10] simenbrekken: dexter_e: [12:11] simenbrekken: dexter_e: in your scenario you'd have to flag to stop processing requests as well [12:11] Esteb has joined the channel [12:11] schwab has joined the channel [12:11] simenbrekken: dexter_e: as in if you tell the app to stop via /app/stop it should set a flag to stop and then stop processing anything new other than what's done. when the last middleware runs it checks for stop and does process.exit() [12:11] dexter_e: yeah I believe thats what were trying to avoid. I think thats what blocking is all about right? [12:12] simenbrekken: that might work too [12:13] g4 has joined the channel [12:13] dexter_e: I can see that under medium traffic node accepts tons of requests before previous ones finish their db cycles [12:13] simenbrekken: and why do you want to stop the app exactly? [12:13] dexter_e: we wouldn't want to block those requests out [12:14] dexter_e: After 48 hours of traffic various node modules leak memory [12:14] dexter_e: so I want to gracefully reboot between requests [12:14] dexter_e: so no one ever notices [12:14] simenbrekken: dexter_e: here's an actual example: http://www.exratione.com/2011/07/running-a-nodejs-server-as-a-service-using-forever.php [12:15] simenbrekken: dexter_e: you could use monit to monitor memory leak and restart it when it gets bad and only between a certain time [12:15] dexter_e: right , thats not a problem , I just want to make sure that it doesn't get killed in the middle of a request [12:15] simenbrekken: dexter_e: "if memory_free < 256mb and time between 02:00 and 04:00 restart [12:15] broofa has joined the channel [12:16] eldios has joined the channel [12:16] simenbrekken: dexter_e: you can't replace a bucket that contains water instantly, it has to be empties [12:16] simenbrekken: emptied. [12:16] dexter_e: Restarting it based on memory thresholds isn't the issue. [12:16] dexter_e: right.. hmm [12:16] dexter_e: but I just want to make sure its emptied at the right moment [12:16] simenbrekken: dexter_e: what about another spin, you run two instances and switch between them every 24h [12:16] versicolor has joined the channel [12:17] neurodrone_ has joined the channel [12:17] simenbrekken: then you can safely empty instance A while B gets new requests, when A is done emptying it restarts [12:17] Wizek-other has joined the channel [12:18] dexter_e: another great idea.. but if we were to shut down based on Date() how to still ensure that it does not process.exit() in the middle of a request? [12:18] jbpros has joined the channel [12:19] simenbrekken: dexter_e: when B starts up it should notify A that it's now taking care of business, then A continues to process existing requests until its queue is empty, then it exits [12:19] simenbrekken: it's in reality a hot swap and nobody will/should notice [12:19] simenbrekken: dexter_e: mind you I have zero experience with ngnix etc but I'm pretty sure that would be possible [12:20] dexter_e: Hmmm [12:20] dexter_e: what if request C comes in while A is notifying B? [12:21] rchavik has joined the channel [12:21] simenbrekken: C will hit B won't it [12:21] simenbrekken: since the load balancer will be the one starting up A after restart [12:21] dexter_e: hmmm [12:21] simenbrekken: as long as you have something in front that always has correct state you won't really get that problem [12:22] dexter_e: interesting strategy , that sounds pretty heavy duty [12:22] Poetro has joined the channel [12:22] simenbrekken: dexter_e: i believe it won't be very hard to do this in express alone [12:22] dexter_e: I still want to avoid doing it based on date() because during peaks sometimes the leak is a lot faster [12:23] simenbrekken: dexter_e: with this setup you could do it based on whatever [12:23] simenbrekken: you do have periods where nothing happens? [12:23] dexter_e: I want to monitor memory and simply restart at the next idle window. [12:23] rchavik has joined the channel [12:23] dexter_e: yeah [12:23] dexter_e: there are period when nothing happens [12:24] simenbrekken: dexter_e: then you can probably do that by monitoring os.freemem() in the front proxy for every request [12:25] dexter_e: hmmm [12:25] jomoho has joined the channel [12:26] simenbrekken: dexter_e: has to be something like this Heroku does with it's Erosion-resistant dynos. http://devcenter.heroku.com/articles/erosion-resistance [12:26] g4 has joined the channel [12:27] stagas_ has joined the channel [12:28] caollla has joined the channel [12:28] caollla: Hello everyone [12:29] niftylettuce_ has joined the channel [12:29] versicolor has joined the channel [12:31] stepheneb has joined the channel [12:32] caollla: Guys, I'm wondering. How does one share a stateful application accros many node instances behind load balancing ? [12:32] _kud has joined the channel [12:33] diamonds has joined the channel [12:33] SubStack: pow now bouncy has a command-line tool [12:33] SubStack: https://github.com/substack/bouncy [12:34] pekim3 has joined the channel [12:34] chunhao_ has joined the channel [12:34] HardPhuck has joined the channel [12:35] Raynos has joined the channel [12:36] jmar777 has joined the channel [12:36] caollla: I may rephrase that. Is it possible de share a single application instance accross many node instances spread on many different servers, the whole thing behing a load balancer that is not node based. [12:40] yuwang has joined the channel [12:42] mike5w3c has joined the channel [12:43] innociv has joined the channel [12:46] darinc has joined the channel [12:46] dsirijus has joined the channel [12:47] burningdog: ah, found the Chris Lea PPA. Sweet. [12:48] Casperin has joined the channel [12:49] diamonds has left the channel [12:49] diamonds has joined the channel [12:49] diamonds: I figured out my LESS compiler issue... [12:49] diamonds: the newer version of node.js broke the compiler, and the "stable" release no longer works [12:50] diamonds: such are the vagaries of "bleeding edge" technologies, I suppose! :) [12:51] Casperin: Problem: I install npm with the curl http//... | sh method. Or I try. Comes up with a permission error, so I do "sudo sh" in the end instead of just "sh". That means I have to 'sudo npm -g install ...' everytime. Fine, no problem, if it wasn't for the fact that node itself can't access any modules (say, express). How do I get around this? [12:51] aaronmcadam: sudo [12:52] aaronmcadam: download the file [12:52] kulor-uk has joined the channel [12:52] Casperin: aaronmcadam: sudo node app.js? Doesn't help [12:53] HardPhuck: curl http:// ... sudo sh [12:53] HardPhuck: when you install npm [12:53] bzinger has joined the channel [12:53] Casperin: HardPhuck: That's what I did [12:53] HardPhuck: now you need to export your path [12:53] HardPhuck: in .bashrc [12:54] HardPhuck: [12:54] HardPhuck: ah [12:54] HardPhuck: ups wrong paste :) [12:54] Casperin: That's what I thought, but I always have problems with this step. How would that look? [12:54] Casperin: haha :) [12:54] HardPhuck: export NODE_PATH="/usr/local/lib/node_modules" [12:54] HardPhuck: put this ^^ into your .bash_profile [12:54] HardPhuck: then: source .bash_profile [12:55] gerard0 has joined the channel [12:55] ksheurs has joined the channel [12:55] Esteb has joined the channel [12:56] Casperin: hmmm doesn't seem to work [12:56] Xano has joined the channel [12:56] HardPhuck: did you get npm to work? can you run it? [12:57] jakehow has joined the channel [12:57] Casperin: Just tried to run the server. Same error. When I run npm I still get permission errors [12:58] HardPhuck: so if you run: sudo npm install express -g [12:58] HardPhuck: you get errors? [12:58] Casperin: oh, there's no /usr/local/lib/node_modules [12:58] Casperin: I doubt it... That was always possible [12:59] burningdog has joined the channel [13:00] Casperin: I'm on arch. Not sure if that has something to do with the location of modules [13:02] SubStack: pow [13:02] SubStack: bouncy is faster than http-proxy [13:02] SubStack: https://gist.github.com/1275259 [13:02] Casperin: Permission denied: '/usr/bin/express' [13:02] SubStack: tell your friends! [13:02] [1]kuebk has joined the channel [13:03] jtsnow has joined the channel [13:03] SubStack: wowsy it's actually worse for http-proxy the second time I ran that [13:04] SubStack: 476/sec vs 739/sec [13:05] iivvoo has joined the channel [13:05] gut4 has joined the channel [13:06] ayaz has joined the channel [13:07] lazyshot has joined the channel [13:10] piscisaureus has joined the channel [13:12] hdon- has joined the channel [13:14] darinc: SubStack: which http-proxy are you comparing against? [13:14] SubStack: darinc: node-http-proxy [13:14] SubStack: 0.7.3 [13:14] SubStack: http-proxy on npm [13:14] mike5w3c has joined the channel [13:15] SubStack: http-proxy seems to be adding data to the request which slows it down for small requests [13:15] Rv has joined the channel [13:15] Rv: re [13:16] darinc: and what kind of server were you proxying too? [13:17] SubStack: darinc: https://github.com/substack/bouncy/blob/master/bench/bench.js [13:17] SubStack: just a really simple thing [13:17] Wizek has joined the channel [13:18] darinc: colol [13:18] darinc: oops... "cool" [13:19] diamonds has left the channel [13:19] vns_ has joined the channel [13:19] max_dev has joined the channel [13:21] `3rdEden has joined the channel [13:22] Croms has joined the channel [13:22] Croms has joined the channel [13:26] level09 has joined the channel [13:30] dubenstein has joined the channel [13:32] adambeynon has joined the channel [13:32] smtlaissezfaire has joined the channel [13:36] pickels has joined the channel [13:36] mike5w3c has joined the channel [13:37] jtsnow has joined the channel [13:37] CIA-48: node: 03Ben Noordhuis 07 * r326ba25 10/ src/node.js : [13:37] CIA-48: node: tty: unbreak --use-legacy [13:37] CIA-48: node: Fixes #1844. - http://git.io/NcwpCA [13:38] level09_ has joined the channel [13:40] JakeyChan has joined the channel [13:41] burningdog has joined the channel [13:42] bombworm has joined the channel [13:43] burningdog has joined the channel [13:43] jtsnow has left the channel [13:44] aeo has joined the channel [13:45] jetienne has joined the channel [13:46] wink_: wankdanker: ping [13:47] n0n4m3_ has joined the channel [13:48] herbySk74 has joined the channel [13:52] Venom_X has joined the channel [13:53] Nuck: for some reason I woke up with Nice Weather for Ducks stuck in my head :S [13:53] paul0 has joined the channel [13:53] wankdanker: wink_: mornin! [13:57] sub_pop has joined the channel [13:57] wink_: give me a sec, i'll send you a patch [13:57] wink_: woops [14:01] neurodrone has joined the channel [14:01] piscisaureus has joined the channel [14:01] edwardmsmith has joined the channel [14:04] pekim has joined the channel [14:04] negrete has joined the channel [14:05] icebox has joined the channel [14:05] Margle has joined the channel [14:06] enmand has joined the channel [14:08] Nuck: piscisaureus: You need a stabler internet [14:08] piscisaureus: Do I join/connect all the time? [14:08] piscisaureus: I am at a conference [14:08] piscisaureus: so that might happen [14:08] Nuck: piscisaureus: Ahh [14:08] Nuck: Yup [14:08] piscisaureus: Ok [14:08] piscisaureus: let me part [14:09] piscisaureus has left the channel [14:09] JakeyChan has joined the channel [14:09] Nuck: haha [14:09] stagas has joined the channel [14:10] _kud_ has joined the channel [14:13] bzinger has joined the channel [14:14] gut4 has joined the channel [14:14] Frippe has joined the channel [14:15] Frippe has joined the channel [14:15] enmand has joined the channel [14:15] `3rdEden has joined the channel [14:15] slifty has joined the channel [14:16] Margle has joined the channel [14:19] metellus has joined the channel [14:19] simenbrekken has joined the channel [14:19] mpavel has joined the channel [14:19] desmondmorris has joined the channel [14:19] jocafa has joined the channel [14:21] _jhs has joined the channel [14:21] Ang3: hey - how can i write in a specific spot in a JSON file with writeFile() ? [14:22] igl1 has joined the channel [14:22] MooGoo: sounds like a bad idea [14:22] SubStack: Ang3: are you trying to preserve formatting? [14:22] Ang3: yes [14:22] SubStack: https://github.com/substack/jsup [14:22] jbpros has joined the channel [14:23] desmondmorris has left the channel [14:23] Ang3: it is ont possible natively ? [14:23] Ang3: not* [14:23] SubStack: natively what I don't even [14:23] _jhs has left the channel [14:24] brianc has joined the channel [14:24] SubStack: Ang3: there are low level calls if you know the exact position in the file and want to drive a file descriptor around [14:24] SubStack: but that is very difficult [14:24] SubStack: and I already wrote this code and everything! [14:24] joshkehn has joined the channel [14:24] Ang3: :) [14:24] SubStack: it's just an npm install jsup away [14:24] Ang3: then natively the simpler is to put all your JSON in a obj and modifiy it from here ? [14:25] SubStack: natively? [14:25] SubStack: how do you mean this [14:25] SubStack: just use npm [14:25] SubStack: why would you not use npm [14:26] davemo has joined the channel [14:26] Ang3: i do [14:26] davve: packet manager are for lazy ppl [14:26] SubStack: it's somewhat common to JSON.parse() an object then JSON.stringify() back onto the file [14:26] Ang3: lol davve [14:26] SubStack: but that destroys your formatting [14:27] SubStack: jsup preserves formatting but you can't add new entries yet, only modify existing ones [14:27] SubStack: there is pretty much no other way to do this [14:27] SubStack: it's an amazingly hard problem [14:28] ablomen: wouldn't a formatted json output be good enough? [14:28] Ang3: hum [14:28] SubStack: ablomen: but which output is the right one? ;) [14:29] Ang3: well i want to add new entries to my JSON :) [14:29] Ang3: i use JSON.parse() but i can't figure out how add content to a child with it [14:30] ryanrolds: Does it matter which ouput you use as long as it's human readable? When you go to manupulate it it's going to ignore all the whitespace anyway. [14:30] CIA-48: libuv: 03Ben Noordhuis 07 * r41e8574 10/ (src/unix/fs.c test/test-fs.c test/test-list.h): unix: don't alloc memory for readdir on empty dir - http://git.io/60tZnw [14:30] CIA-48: libuv: 03Ben Noordhuis 07 * r04b356a 10/ test/test-fs.c : test: fix compiler warnings - http://git.io/h6TIQw [14:30] KaL has joined the channel [14:30] Ang3: i would like to add data in the "todo" list in here http://pastebin.com/aY4akBfc [14:30] ablomen: SubStack, the one the developer says is the right one? anyway i get your point and why you wrote it, but i was asking if in Ang3's case that was not good enough [14:31] mytrile has joined the channel [14:32] ablomen: Ang3, are you ever going to edit the json file by hand? [14:32] Aikar: JSON.stringify(foo, true) pretty prints it [14:32] Ang3: what do you mean? [14:34] ablomen: Ang3, does the formatting of the file matter or do you only want to save data? [14:34] mpavel has left the channel [14:34] Ang3: i want to save data mostly [14:35] Ang3: format stuff will goafter :) [14:35] Ang3: main problem actually is how save my data [14:35] Aikar: just use JSON.parse and JSON,stringify with prettyprint and stop BS'ing, who cares if it converts your spaces to tabs least its readable :P [14:35] mynyml has joined the channel [14:36] smtlaissezfaire_ has joined the channel [14:36] Aikar: var jsonsrc = fs.readFileSync('foo.json'); var json = JSON.parse(jsonsrc); json.foo = ['bar', 'baz']; fs.writeFileSync('foo.json', JSON.stringify(json)); [14:36] jetienne: Ang3: you load the file, do JSON.parse, add your data, do json.stringify, then write the file... is this process working for you [14:36] jetienne: Ang3: Aikar just gave you the code i just described :) [14:37] shanebo has joined the channel [14:37] Aikar: and err i forgot the pretty print arg on stringify [14:37] ablomen: and also you probably want to make your todo part an array with objects in it, not an object [14:37] Ang3: yeah it's what i'm doing : list = JSON.parse(data); [14:37] Ang3: callback(list); [14:37] ablomen: same for doing and done [14:37] mandric has joined the channel [14:38] Ang3: but console.log(list.todo); give me : undefined [14:38] Ang3: ... [14:38] jetienne: JSON.stringify({b:3}, '', '\t') [14:38] Aikar: oh right i forgot it wasnt a simple true [14:38] CoverSlide: \t ?? [14:39] Ang3: b:3 ? [14:39] Ang3: :D [14:39] jetienne: CoverSlide: for tab, put space if you prefere [14:39] jetienne: Aikar: yep this syntax is weird at best [14:40] ecin has joined the channel [14:40] Aikar: so dart seems really interesting [14:40] joshkehn: Why? [14:41] bzinger has joined the channel [14:41] Aikar: to solve some of the lackings that people desire of js? [14:42] vipaca has joined the channel [14:42] vipaca has joined the channel [14:42] joshkehn: By inventing a new language? [14:42] SubStack: dart has classes [14:42] SubStack: fuck those things [14:42] rurufufuss has joined the channel [14:42] SubStack: unsure about the rest of it though [14:43] jetienne: dart is a trick from google to push js standard forward [14:43] ckknight: dart has a better defined type system, I see that as its only real benefit [14:43] rootslab has joined the channel [14:43] joshkehn: ckknight++ [14:43] thomblake has joined the channel [14:43] ckknight: It has a lot of great builtin types that I wish JavaScript had [14:43] Frippe has joined the channel [14:43] joshkehn: I like classes when it makes sense (Java). [14:43] ckknight: and it fixes the ==/=== bullshit [14:43] joshkehn: It's not bullshit, it's useful for some things. [14:43] ckknight: and also new Number and that hell [14:44] tekky has joined the channel [14:44] CoverSlide: who wants to make a node.dart ? [14:44] ckknight: joshkehn: name me one thing in current javascript that == is good for outside of comparing to null (so as to compare to both null and undefined) [14:44] jetienne: there a node.lua i think :) [14:44] joshkehn: Accepting strings and comparing them to numbers. [14:44] ckknight: that seems like a bug to me. You should be properly validating and parsing your input. [14:44] jetienne: v8: 0 < Number.MIN_NUMBER [14:45] jetienne: bot reacts! [14:45] ckknight: 0 == " \t \v \f \r \n" [14:45] joshkehn: Should [14:45] ckknight: >> 0 == " \t \v \f \r \n" [14:45] joshkehn: Yeah, I know about the weird edge cases [14:45] thomblake has left the channel [14:45] ckknight: if you want to compare a string to a number, you should validate and parse it first [14:45] joshkehn: ACTION agrees [14:45] ckknight: even if you're doing Number(str) [14:46] ckknight: then you can use === or < or > to your heart's content [14:46] jbpros has joined the channel [14:46] ckknight: but that 1000 < "2" feels like a big bug to me [14:46] DrMcKay has joined the channel [14:46] ckknight: especially since 1000 == " 1000 " [14:47] joshkehn: You know you would have .trim()'ed that anyways. [14:47] joshkehn: I think adding an optional type system to JS would be to great benefit. [14:47] jocafa: call me when things are implemented cross-browser… ;) [14:47] joshkehn: Sort of like Groovy [14:48] DrMcKay: ACTION  [14:48] ckknight: In my compile-to-js language, I have optional typing, but that just basically adds asserts in, the compiler can't make things faster because of it. [14:48] DrMcKay: so, what do you think about Dart? [14:48] DrMcKay: ACTION  [14:48] joshkehn: We were just discussing that. [14:48] DrMcKay: ah, OK [14:49] DrMcKay: wait, in dart 1000 = " 1000 " ? [14:49] jetienne: joshkehn: i think they tried in google closurec. you specify type with comment.funtion( /* Number */ a, /* string */ str ){} [14:49] jocafa: oh god no. [14:49] joshkehn: Closure? That bullshit weird ass compile-to-js thing? [14:49] ckknight: DrMcKay: no, that's javascript. [14:49] jocafa: comments should never DO anything. EVER. EVER EVER *foams* [14:49] joshkehn: Adding type hinting in comments. What the fuck. [14:49] SubStack: jocafa: agree [14:49] DrMcKay: ckknight: I feel better [14:50] SubStack: they could have just implemented functions for that [14:50] DrMcKay: hey, maybe Google is just trolling us? [14:50] Vennril has joined the channel [14:50] DrMcKay: TheJH has something for enforcing types [14:50] SubStack: hell I could do that with burrito easily [14:50] DrMcKay: it uses hungarian notation [14:50] ckknight: in Dart, == is an overrideable operator that should only really be used on compatible types. === is identicality or reference equality (not overrideable) [14:50] SubStack: surely google with their tens of thousands of idle developers could manage [14:50] bnoordhuis: HUNGARIAN [14:51] jocafa: hungari*FOAM* [14:51] bnoordhuis: kill it, kill it with fire [14:51] SubStack: hell I could probably duplicate most of what closure can do with burrito in a week I bet [14:51] SubStack: the worthwhile parts worth duplicating at least [14:51] DrMcKay: ACTION starts looking for a bazooka [14:51] ckknight: burrito sounds tasty [14:51] ckknight: but it's not in my diet :( [14:51] ckknight: curse you for bringing it up, SubStack [14:51] DrMcKay: hey, I want burrito now! [14:52] SubStack: delicious burritos [14:52] jaequery has joined the channel [14:52] jocafa: burrito… [14:52] SubStack: I had 2 of those an hour ago [14:52] CoverSlide: those whacky hungarians [14:52] SubStack: ckknight: also this https://github.com/substack/node-burrito [14:52] ckknight: I know about that ;-) [14:52] CoverSlide: uglify does what 99% of people use closure for [14:52] CoverSlide: at about 4x the speed [14:52] jocafa: i can't help but read "burrito" in the voice of beavis. [14:53] SubStack: CoverSlide: 10x [14:53] SubStack: no wait [14:53] SubStack: 100x [14:53] DrMcKay: there it is: https://github.com/thejh/node-hungarian-magic [14:53] adrianmg has joined the channel [14:53] SubStack: in the benchmark I saw, closure took 10 seconds, uglify took 0.1 seconds [14:53] pickels has joined the channel [14:53] SubStack: of course, closure is doing other things [14:53] SubStack: but meh [14:54] SubStack: plus I can npm install uglify-js [14:54] jocafa: if i needed strong typing, i'd go back to C. [14:54] jocafa: (i /like/ C) [14:54] SubStack: I have no idea how I would go about running something written in java [14:54] jocafa: java can die in a fire [14:55] CoverSlide: java -jar closure.jar arg0 arg1 arg2 ... [14:55] ryanrolds: It had its uses. [14:55] jocafa: ACTION is neither opinionated nor bitter. [14:55] ckknight: jocafa: can't use C in the browser, though. [14:55] ckknight: I'd think that a locked-down C in the browser really wouldn't be too bad. [14:55] ckknight: locked-down security-wise and all, I mean. [14:55] DrMcKay: ckknight: NaCL? [14:55] jocafa: well there's NaCl, but it's not like it's widely supported [14:56] DrMcKay: *NaCl [14:56] SubStack: javascript is just as fast as c for a lot of code [14:56] ckknight: yeah, that lack of support is the killer [14:56] SubStack: or near enough [14:56] jocafa: ಠ_ಠ [14:56] bnoordhuis: well... [14:56] CIA-48: node: 03Ben Noordhuis 07 * r025f5c8 10/ (4 files in 3 dirs): uv: upgrade to 41e8574 - http://git.io/c_TdyA [14:56] bnoordhuis: i wouldn't say 'just as fast' [14:57] bnoordhuis: maybe 'within a factor of 20' [14:57] dshaw_ has joined the channel [14:57] jocafa: 'a hell of a lot faster than ruby' :3 [14:57] adrianmg has left the channel [14:57] ckknight: jocafa: that's mean [14:57] jocafa: hehe [14:57] ckknight: jocafa: that's like making fun of the kids who ride the short bus. [14:57] ckknight: they have feelings too [14:58] jocafa: i like writing in ruby, i just don't like it's speed [14:58] bnoordhuis: ruby is good for server hardware vendors [14:58] jocafa: hey now… i rode the short bus [14:58] ckknight: I've grown uncomfortable with ruby. It seems a bit too magical at times for me [14:58] _kud has joined the channel [14:58] libScout_ has joined the channel [14:58] cjm has joined the channel [14:58] jocafa: ckknight: agreed with the magic. too many library authors are trying to be clever [14:58] DrMcKay: Ruby is quite nice. RoR isn't. [14:58] ckknight: I'm gonna back what DrMcKay [14:59] ckknight: I've used Sinatra and it's pretty nice [14:59] ckknight: what DrMcKay said* [14:59] CoverSlide: sinatra is awesome [14:59] DrMcKay: also, when it's about speed, don't use Ruby, use Rubinius [14:59] ckknight: RoR is just super magical [14:59] ckknight: DrMcKay: or JRuby or one of those other things [14:59] jocafa: do you mean ActiveRecord is too magical or what? [15:00] bnoordhuis: my main beef with ruby is that just about every other gem seems to want to monkey-patch some core functionality [15:00] jedahan has joined the channel [15:00] jedahan has joined the channel [15:00] bnoordhuis: upgrading ruby / ror projects is often painful too [15:00] jocafa: heh don't we know it. we're a ruby shop [15:00] ckknight: jocafa: both the models and controllers [15:00] ckknight: if you do some_obj.public_methods, you'll get like 150 methods in there, which seems like way too many. [15:01] jocafa: absolutely [15:01] CoverSlide: JRuby is faster than matz-Ruby? [15:01] ckknight: CoverSlide: significantly [15:01] CoverSlide: wow [15:02] DrMcKay: still, Rubinius seems faster than JRuby [15:02] ckknight: is it, now? good for them [15:02] jocafa: http://attractivechaos.github.com/plb/ [15:02] CoverSlide: can I run eventmachine on jruby? [15:02] ckknight: didn't used to be [15:03] DrMcKay: http://programmingzen.com/2010/07/19/the-great-ruby-shootout-july-2010/ [15:03] herbySk has joined the channel [15:03] wilmoore has joined the channel [15:03] zeade has joined the channel [15:03] CarterL has joined the channel [15:04] BillyBreen has joined the channel [15:04] Morkel has joined the channel [15:04] slifty has joined the channel [15:04] davidwalsh has joined the channel [15:04] dob__ has joined the channel [15:05] akiva has joined the channel [15:06] guidocalvano has joined the channel [15:06] meso_ has joined the channel [15:07] DrMcKay: haha, Dart has a Fibonacci demo [15:07] mwillhite has joined the channel [15:07] BillyBreen: awesome! let's start up that thread again [15:08] DrMcKay: yes! [15:08] CoverSlide: I'm gonna put a bot in here that says "What does everyone think of Dart?" every 10 minutes [15:09] joshkehn: It's another shitty fibonacci demo [15:10] ckknight: CoverSlide: do it. Just cycle through 6 different ways of saying it. [15:10] jocafa: "I don't always choose a language based on a single algorithm demo, but when I do, it's the Fibonacci sequence." [15:10] FireCat has joined the channel [15:10] qmx: nooo, not this again - I should write a dyn.js demo using fib too =/ [15:13] CoverSlide: hmm arch is running ruby 1.9.2 which seems to be really fast even compared to rubinius [15:15] kevwil has joined the channel [15:16] TooTallNate has joined the channel [15:17] JJMalina has joined the channel [15:17] Aria has joined the channel [15:20] Esteb has joined the channel [15:21] c4milo has joined the channel [15:21] vns has joined the channel [15:21] michaeldeol has joined the channel [15:23] pixel13 has joined the channel [15:24] pixel13 has left the channel [15:25] aheckmann has joined the channel [15:26] janiczek has joined the channel [15:26] akiva has joined the channel [15:27] KaL has joined the channel [15:28] vampi-the-frog has joined the channel [15:28] vampi-the-frog has joined the channel [15:28] CrisO has joined the channel [15:29] mbrevoort has joined the channel [15:29] DartVader has joined the channel [15:30] CoverSlide: wtf ?? [15:30] DrMcKay: :D [15:30] CoverSlide: dart irc bot crashed ?? [15:30] Aria: Hm? [15:30] DrMcKay: haha, it's irc bug [15:30] DrMcKay: node-irc, ofc [15:30] DrMcKay: fixing it now [15:31] hij1nx has joined the channel [15:31] DartVader has joined the channel [15:31] DrMcKay: lol [15:31] jocafa: haha [15:31] DartVader has joined the channel [15:31] DrMcKay: lolwut? [15:33] DartVader has joined the channel [15:33] DrMcKay: no, seriously, wut? [15:33] DrMcKay: works locally -.- [15:34] svnlto has joined the channel [15:34] Guest37721 has joined the channel [15:35] tjholowaychuk has joined the channel [15:35] libScout_: is there a good write up on what parts of ES5 nodejs is using? [15:35] DartVader has joined the channel [15:35] CoverSlide: dammit, I was holding #dart and #dart-lang a few weeks ago [15:35] tjholowaychuk has joined the channel [15:35] DrMcKay: it's pretty weird, because it works locally [15:35] jocafa: ACTION staples tjholowaychuk to the channel [15:35] DrMcKay: time to find other irc lib [15:37] Guest37721: hi, could anyone lead me to the right direction for setting headers, to something like: res.end JSON.stringify(bookmarks) [15:37] jzacsh has joined the channel [15:37] Guest37721: FF thinks it's XML, or is trying to parse it that way [15:37] cconstantine_ has joined the channel [15:37] jarek has joined the channel [15:38] ckknight: libScout_: you can use ES5 code with node.js, but node.js doesn't require that you use ES5 features. [15:38] jarek: Hi [15:38] jarek: what's the easiest way for watching directory for changes? [15:38] libScout_: ckknight: are there plans to refactor once js2.0 standardizes in 2034? [15:39] fangel has joined the channel [15:39] ckknight: refactor what? [15:39] CoverSlide: v8 should be compliant with ES5, at least for the most part [15:39] ckknight: node.js is a bunch of C code, pretty much. [15:39] qmx: libScout_: LOL [15:39] ckknight: It provides an API for you to use [15:39] CoverSlide: ES5 is mostly like JS 1.7 or so [15:39] libScout_: ahhhh... makes more sense [15:39] bnoordhuis: ckknight: c++! [15:39] CoverSlide: JS 1.8+ is like mozilla-specific [15:39] jetienne: CoverSlide: js1.7 doesnt exist [15:40] bnoordhuis: well okay, and more and more c [15:40] CoverSlide: well that's what mozilla calls it [15:40] mandric has joined the channel [15:40] jetienne: CoverSlide: all those 1.678 version on mozilla only naming [15:40] blah has joined the channel [15:40] blah: test [15:40] jscheel has joined the channel [15:40] jetienne: blah: you are in [15:40] ckknight: I'm not fond of Mozilla's ownership of the JavaScript version numbers [15:40] libScout_: just wondering if i will have to refactor my own code eventually when we can write classic OOP in JS [15:40] jbpros has joined the channel [15:40] CoverSlide: since technically "JavaScript" is oficially the Mozilla product and name [15:40] jetienne: CoverSlide: ? [15:40] CoverSlide: and "ECMAScript" is what we're really using [15:41] jetienne: js brand is owned by mozilla ? [15:41] aeo has joined the channel [15:41] ckknight: jetienne: yep. [15:41] jetienne: ckknight: url ? [15:41] jetienne: i would learn something today :) [15:41] ckknight: it's why Microsoft calls their implementation JScript and never refers to it as JavaScript [15:42] CoverSlide: The name was invented by netscape [15:42] CoverSlide: although i think oracle put a trademark on it [15:42] CoverSlide: s/oracle/sun/ [15:42] ckknight: jetienne: I don't have a good link, google it for yourself [15:42] jetienne: http://en.wikipedia.org/wiki/JavaScript#Trademark "JavaScript" is a trademark of Oracle Corporation[20] . It is used under license for technology invented and implemented by Netscape Communications and current entities such as the Mozilla Foundation.[21] [15:42] jetienne: hehe js is owned by oracle... we are in trouble :) [15:43] joshkehn has left the channel [15:43] booo has joined the channel [15:43] ckknight: jetienne: just the trademark. Worst case we'll just call it ECMAScript [15:43] qmx: ACMEScript? hehe [15:43] jetienne: we found the hidden purpose of google. to avoid yet another trial with oracle :) [15:44] jetienne: ckknight: node.es5 for 0.7 ? [15:44] CoverSlide: ECMAScript sounds lice a skin condition [15:44] CoverSlide: s/lice/like/ [15:44] ckknight: jetienne: ha [15:44] jarek: you mean ecsema? It sounds nothing like that :P [15:45] jarek: s/ecsema/eczema [15:45] booo: i should use ObjectWrap->Ref() on all the objects i want to use in the threadpool right? [15:45] ckknight: ...threadpool? [15:45] frameeee has joined the channel [15:45] ckknight: we don't take kindly to threads 'round these parts [15:46] CoverSlide: a penny for a pool of threads, a penny for a needle [15:46] bnoordhuis: booo: what version of node? [15:46] harthur has joined the channel [15:47] booo: bnoordhuis, at the moment v0.4.9 [15:47] bnoordhuis: booo: you like 'em mature, don't you? [15:48] warreng has joined the channel [15:48] bnoordhuis: booo: Ref() bumps the ref count but it may or may not do what you expect [15:49] bnoordhuis: booo: can you give a quick sketch of your module? [15:50] Yuffster_work has joined the channel [15:50] smathy has joined the channel [15:51] wilmoore has joined the channel [15:53] booo: bnoordhuis, i want to do something like ob1.fun(ob2) where ob1 and ob2 are wrapped objects. they both contain a pointer to the c++ object i want to use [15:54] davididas has joined the channel [15:54] booo: and normally? you do Ref() on the object right? [15:54] booo: thought that's the way to go... [15:54] bnoordhuis: booo: to keep it alive while the thread pool task runs, yes [15:55] booo: yes [15:55] digman543 has joined the channel [15:55] bnoordhuis: note that you can't call into v8 from within the thread pool [15:55] booo: but the Ref() function is protected so invoking it for other objects is somehow tricky [15:55] booo: yes, i know [15:56] kulor-uk has joined the channel [15:56] bnoordhuis: booo: call Ref() from a public method in your class [15:56] booo: bnoordhuis, ok, but i have to call Ref() otherwise the code breaks at some point? [15:57] bnoordhuis: booo: yes, otherwise your object might get collected before the thread pool task completes [15:57] wilmoore has joined the channel [15:58] bnoordhuis: what happens then is undefined behaviour but it's probably not what you want [15:58] libScout_: with node-http-proxy, can i setup a reverse proxy that listens to port 80 and feeds a domain to nginx to support those pesky PHP legacy apps i can't get rid of yet? [15:58] booo: :) [15:58] bnoordhuis: ACTION is off to dinner [15:58] warreng: is there a way to "vendor dependencies"? i don't want to use npm on a production server but instead include a copy of all dependencies for a node app right in the app folder itself [15:58] fennec has joined the channel [15:59] booo: bnoordhuis, thx for your help! [15:59] Aria: warreng: that's what npm does. [15:59] jbpros has joined the channel [15:59] bnoordhuis: booo: my pleasure [15:59] Aria: warreng: you don't need npm at runtime, they're right there in node_modules [15:59] warreng: aria: npm puts things into ~/.npm [15:59] dherman has joined the channel [15:59] warreng: do i need a packages.json for my app? [15:59] Aria: It's useful, but you can just install them by hand. [16:00] Aria: warreng: why'd you configure npm to put them there? [16:00] warreng: i didn't [16:00] Aria: That's not defautl behavior. [16:00] warreng: when you type "npm install mysql" it does that [16:00] tek has joined the channel [16:00] smathy: Aria… it's default when you run an `npm install` in your ~ [16:00] Aria: True that. [16:00] Aria: $ npm install mysql [16:00] Aria: ls mysql@0.9.4 ./node_modules/mysql [16:00] Aria: └── hashish@0.0.4 [16:01] xerox: drug smuggling [16:01] Aikar: warreng: make sure your using latest npm [16:01] warreng: so is pacakges.json in the app folder the correct way? [16:01] Aria: warreng: if you want to list dependencies, sure. [16:01] warreng: i'm using 1.0.6 [16:01] Aria: But you don't need it. [16:01] Aikar: that is a bit old [16:01] Aria: Just install modules inside your app. [16:01] warreng: aria: how? [16:01] Aikar: !npm info npm [16:01] jhbot: npm by Isaac Z. Schlueter, version 1.0.94: A package manager for node [16:01] Aria: npm install mysql [16:01] Aikar: warreng: npm install npm -g [16:02] Aria: Aikar: old as in a week ;-) [16:02] pizthewiz has joined the channel [16:02] Net_RoY has joined the channel [16:02] shanebo has joined the channel [16:02] Aria: (okay, more, but outdated as of a week ago) [16:02] Aikar: 1.0.6 is 88 versions behind... lol [16:02] Aria: No, it's 2 versions behind. [16:02] warreng: mysql@0.9.4 /Users/warren/local/node/lib/node_modules/mysql [16:02] Aikar: what? [16:02] issackelly_ has joined the channel [16:02] Aria: warreng: And you installed it within your app? [16:02] Aikar: last i checked 94 - 6 = 88 >_> [16:03] Aria: Aikar: last I checked versions numbers were always increasing, but not sequential. [16:03] warreng: aria: i went over this already... when it ype "npm install mysql", it doesn't install it in my app [16:03] warreng: i tried -g and it shows: [16:03] warreng: mysql@0.9.4 /Users/warren/local/node/lib/node_modules/mysql [16:03] Aria: Yeah, that's what -g does. [16:03] Aria: -g means "global" [16:03] warreng: that's not where i want it either [16:03] warreng: i want it in the app [16:03] Aikar: fair enough, but im 100% sure .30~ was released well over a month ago :P [16:03] Aria: What directory are you in when you run the install? [16:04] warreng: a folder that contains just a app.js file [16:04] Aria: Hm. It should install in node_modules there. [16:04] warreng: it doesn't, that's the problem [16:04] Aikar: warreng: i said -g to update your npm, not to install mysql [16:04] warreng: Aikar: ahh, sorry [16:05] Aria: what's npm config list say? [16:05] Ang3 has left the channel [16:05] warreng: aikar: it didn't like that at all [16:05] Aria: (And yeah, might as well update-- though 1.0.6 should have the same behavior) [16:05] warreng: npm ERR! TypeError: Cannot call method 'filter' of undefined [16:05] warreng: npm ERR! at /Users/warren/local/node/lib/node_modules/npm/lib/utils/load-package-defaults.js:64:15 [16:05] Net_RoY has joined the channel [16:05] Aria: Oh dear. Remove npm and install from the site. [16:05] Aria: Or at least re-run the installer on npmjs.org [16:06] isaacs has joined the channel [16:06] akiva has joined the channel [16:06] Renegade001 has joined the channel [16:06] Aikar: warreng: yeah you need to install npm fresh [16:06] Aikar: that ver is too old [16:07] warreng: MacbookAir:whois warren$ npm install mysql [16:07] warreng: npm ERR! Error: socket hang up [16:07] isaacs: warreng: npm -v [16:07] isaacs: what's that print? [16:07] Aikar: warreng: curl http://npmjs.org/install.sh | sh [16:07] warreng: npm -v is 1.0.94 [16:07] Aikar: isaacs: hes on a very old build [16:07] warreng: node -v is v0.5.0-pre [16:07] Aikar: oh i guess you did get updated [16:07] isaacs: warreng: ohhh, ok. [16:07] isaacs: yeah, update node. [16:07] Aikar: that is an old node though [16:07] isaacs: not npm [16:07] isaacs: npm is fine [16:08] warreng: hm, node in production is even earlier... 0.4.12 [16:08] warreng: i really don't think i need bleeding edge versions of this [16:08] warreng: i have a *very* basic app i'm trying to deploy [16:08] Aikar: you should be using 0.4.12 [16:08] neekers has joined the channel [16:08] warreng: and i'm just trying to get the dependencies pacakged up in the same folder so i don't need to run npm on the production server [16:09] DanoManion has joined the channel [16:09] Aikar: understood, recompile node with 0.4.12 [16:09] Aria: Yeah. 0.4.12 is the current stable [16:09] Carter has joined the channel [16:09] Aria: 0.5.0-pre is an ancient snapshot of early 0.5.x [16:10] knifed has joined the channel [16:10] neekers: i want to be able to post to one url example.com/say/?my=value and have my value display in realtime on another page example.com/write/, what's the best way to do that? [16:11] Aria: neekers: How would the display look? [16:11] mandric has joined the channel [16:11] eignerchris has joined the channel [16:11] neekers: Aria: actually i was going to use html5 to update a realtime graph [16:11] Aria: (Generally, I'd have the client side running some sort of long-poll or streaming and adding DOM nodes itself, chat-style. socket.io is a pleasant abstraction over the various ways it's done.) [16:11] Aria: Yeah. socket.io is a great way to go. [16:12] Aria: on post, send to all listeners. [16:12] neekers: ok, i will take another look, there are a lot of tutorials out there and a lot seem to be old [16:12] neekers: thanks [16:13] neekers: would i want to use that eventemitter along with socket.io? [16:13] Aria: Which event emitter? [16:13] dshaw_ has joined the channel [16:13] monokrome_ has joined the channel [16:13] neekers: EventEmitter [16:13] markdaws has joined the channel [16:14] Aria: socket.io is an event emitter. [16:14] libScout_: anyone supporting PHP apps with their nodejs architecture? need suggestions... thought you could just reverse proxy to nginx with node-http-proxy... can anyone confirm this/ [16:14] neekers: ok... :) [16:15] springmeyer has joined the channel [16:15] Margle has joined the channel [16:15] Aria: You can, libScout_, though I think more commonly, people front with nginx [16:15] Aria: And check out https://github.com/substack/bouncy [16:15] predat0r has joined the channel [16:15] predat0r: hi [16:16] warreng: hm, my old node seems to be installed in /Users/warren/local/node/bin/node but when i do "make install" in the new node, it's trying to put it in /usr/local/include/node/ [16:16] libScout_: Aria: it was my understanding, though, that nginx doesn't support http 1.1 proxy (yet) and therefore websockets are out [16:16] warreng: can i install it for just this user and not the whole system? [16:16] Aria: libScout_: true that. So look at bouncy if you need to proxy websockets. [16:16] Aria: warreng: Yeah. The usual --prefix [16:16] djbell has joined the channel [16:17] gxdssoft has joined the channel [16:17] groovebucket has joined the channel [16:17] libScout_: Aria: thanks... aria as in the musical term? [16:17] wadey has joined the channel [16:17] Aria: Yes. [16:18] Aria: Also as in my name ;-) [16:18] libScout_: good man/woman =) [16:18] libScout_: awesome [16:18] CrisO: You cannot throw Chuck Norris http://criso.github.com/ChuckNorrisException/ [16:18] DarkGrey has joined the channel [16:18] Aria: Haha [16:19] CrisO: In case you want your program to fail in style ;) [16:19] JaKWaC has joined the channel [16:19] digman543 has joined the channel [16:19] Aria: Nice trick, too, the nextTick. [16:19] sirdancealot has joined the channel [16:20] stagas has joined the channel [16:20] JaKWaC has joined the channel [16:22] davidsklar has joined the channel [16:22] warreng: MacbookAir:whois warren$ npm install mysql [16:22] warreng: mysql@0.9.4 /Users/warren/node_modules/mysql [16:22] warreng: it didn't install it in the local folder [16:22] PhilK has joined the channel [16:23] russfrank: doe sanyone here know the nodejs build system really well? [16:23] gut4 has joined the channel [16:25] stagas: woohoo new lib https://github.com/stagas/atomic [16:25] warreng: ahh... i do need packages.json and then "npm install" works as expected [16:25] tj has joined the channel [16:26] shariff has joined the channel [16:26] akiva has joined the channel [16:26] ayaz has joined the channel [16:26] maletor has joined the channel [16:28] CrisO has left the channel [16:28] shariff: Hi guys, I'm a bit confused about BDD on node, what do you tend to use? [16:28] saesh has joined the channel [16:28] creationix|work has joined the channel [16:29] Aria: I use vows for testing, but I'm not jumping into the BDD pool really. [16:29] skiz has joined the channel [16:29] esmevane has joined the channel [16:29] piscisaureus has joined the channel [16:31] shariff: Aria > So I guess you don't use kyuri? [16:31] Aria: No, I don't. [16:31] CoverSlide: nobody uses jyuri [16:31] CoverSlide: s/j/k [16:32] Aria: kyuri seems a decent tool to generate stubs with if you need to start by sitting in a meeting with non-techies [16:32] shariff: nobody likes cucumber? [16:32] CoverSlide: vows is kind of the standard for node testing [16:32] Guest26405: pff [16:32] Aria: (vows needs a tap formatter though) [16:32] Guest26405: they all suck [16:33] tjholowaychuk has joined the channel [16:33] davidsklar has joined the channel [16:33] DartVader has joined the channel [16:33] DrMcKay: FUCK! [16:33] Margle has joined the channel [16:33] warreng: is there an equivalent to ruby's __FILE__ constant? i want to load a config file that's relative to the app.js, not relative to the path i start app.js fro [16:33] warreng: from [16:33] te-brian has joined the channel [16:33] CoverSlide: DrMcKay: use IRC-js [16:34] DrMcKay: CoverSlide: good idea [16:34] CoverSlide: it's more work than node-irc [16:34] Aria: warreng: __dirname [16:34] CoverSlide: but much less buggy [16:34] libScout_: warreng: http://nodejs.org/docs/v0.4.12/api/globals.html#__filename [16:35] Aria: warreng: though I consider it a code smell. Depends on how you integrate your app and where it's run though [16:35] stagas has joined the channel [16:35] TooTallNate has joined the channel [16:36] DrMcKay: or maybe I'll just stop procrastinating -.- [16:37] irahgel has left the channel [16:37] DartVader has joined the channel [16:37] DrMcKay: I have no idea why this shit just fails [16:37] DrMcKay: and I have no idea why it works in my bot [16:37] fairwinds has joined the channel [16:37] DrMcKay: hey, actually, where's my bot? [16:37] DrMcKay: !ping [16:37] Aria: Just left. [16:37] dmsuperman has joined the channel [16:38] DrMcKay: nah, I mean dmkbot [16:38] DrMcKay: fuck it. [16:39] DrMcKay: time to give some love to kohai [16:39] EvRide has joined the channel [16:41] gxdssoft has joined the channel [16:42] FireCat_ has joined the channel [16:42] zemanel has joined the channel [16:42] trotter has joined the channel [16:43] Aikar: SubStack: why are you so opposed to the 'class syntax'? whats so wrong with taking what we got and giving a more friendly way of building objects instead of foo.prototype.bar = function() { }, and the uglyness of foo.prototype = Object.create(baz.prototype); whats so wrong with having the same functional results, but with a cleaner implementation? [16:43] luke` has joined the channel [16:44] enmand has joined the channel [16:45] fairwinds: hi am something wizard-like for gathering some input to questions on command line in a series of steps. Anyone aware of lib for this or a project that is already doing this? [16:45] CoverSlide: you are something wizard-like? [16:45] CoverSlide: you're a sorceror? [16:46] fairwinds: yes, for sure, haha [16:46] mikeal has joined the channel [16:46] fairwinds: am looking for something wizard-like :-) [16:46] Aikar: there is a lib that does that [16:46] Aikar: i dont remember the name though [16:47] fairwinds: Aikar: I figured there was likely something already but have not been able to locate in npm [16:48] towski has joined the channel [16:48] mike5w3c_ has joined the channel [16:49] patcito has joined the channel [16:50] Aikar: !npm search commander [16:50] jhbot: package commander: the complete solution for node.js command-line programs [16:50] Aikar: fairwinds: try that [16:50] Aikar: !npm info commander [16:50] jhbot: commander by TJ Holowaychuk, version 0.2.0: the complete solution for node.js command-line programs [16:50] fairwinds: ah, k, cool will check it out [16:51] fairwinds: from Tj and all = it should be good [16:51] Aikar: it has TJ's name on it so that alone gives it cred :P [16:51] fairwinds: heh [16:52] Aikar: fairwinds: if your looking to write a sequential CLI app, may wanna look at streamline too. makes the code so much cleaner to write for sequential tasks [16:52] aeo has joined the channel [16:52] eee_c has joined the channel [16:52] fairwinds: ah, great. appreciate this [16:52] topaxi has joined the channel [16:53] Aikar: though commanders callbacks arnt following (err, res) function styles so it wont work for streamline w/o a wrapper stub [16:53] franciscallo has joined the channel [16:54] max_dev has joined the channel [16:54] wilmoore has joined the channel [16:54] Aikar: function stub(cb) { return function (val) { cb(null, val } } [16:54] Aikar: then you can do var age = program.prompt('Age: ', stub(_)); [16:55] Aikar: just note that streamline doesnt make your code run sync, it just LOOKS sync. still is async [16:56] felixhummel has joined the channel [16:57] jmoyers has joined the channel [16:59] N0va` has joined the channel [16:59] adriftatsea has joined the channel [17:00] guillermo has joined the channel [17:00] Sixview has joined the channel [17:00] gr-eg has joined the channel [17:01] `3rdEden has joined the channel [17:02] gplg has joined the channel [17:02] kenperkins has joined the channel [17:02] micheil has joined the channel [17:02] gxdssoft has joined the channel [17:03] mikeal has joined the channel [17:03] boaz has joined the channel [17:03] Sixview has joined the channel [17:03] digman543 has joined the channel [17:03] chrislorenz has joined the channel [17:03] fairwinds: Aikar: can't remember but doesn't npm have a wizard [17:04] akiva has joined the channel [17:04] CoverSlide: `npm init` gives you a wizard-like thingt [17:04] fairwinds: for creating a package.json - vaguely remember something yes [17:04] piscisaureus has joined the channel [17:04] SixView has joined the channel [17:04] vidi has joined the channel [17:04] fairwinds: CoverSide: right [17:04] fairwinds: that was it [17:05] fairwinds: will read that code [17:05] perezd has joined the channel [17:05] harthur has joined the channel [17:07] fbartho has joined the channel [17:08] lightcap has joined the channel [17:10] dmsuperman has left the channel [17:12] broofa has joined the channel [17:12] libScout_: we favoring "forever" instead of monit/upstart for running node app as daemon process? [17:13] Lingerance: ACTION prefers monit [17:13] libScout_: Lingerance: greater level of control? [17:14] neilk_ has joined the channel [17:14] Lingerance: More like we've had it deployed well before we got into node.js [17:14] fairwinds: I just use an init.d for either a single server or for daemonizing cluster [17:15] micheil: libScout: monit and upstart I think are more widely used, forever is heavily used by nodejitsu though. [17:15] CoverSlide: forever is really nice [17:16] fairwinds: then monit can be use in conjunction with init like anything else [17:17] mraleph has joined the channel [17:17] libScout_: i've used forever in my dev server because of the ease of use... however, was wondering if there was an advantage to monit on a prod server... guess it depends on your implementation and environment [17:17] caolanm has joined the channel [17:17] fairwinds: monit = monitoring and phoning home [17:18] libScout_: right... i meant monit/upstart combo [17:18] fairwinds: and self healing to some extent [17:18] libScout_: i imagine you could setup bash scripts to listen to logs to repair your app automatically? [17:19] lv has joined the channel [17:19] stelleg has joined the channel [17:19] ryanj has joined the channel [17:19] fairwinds: monit is good for things getting out of control ie. memory growing, stops listening, files changed etc [17:20] Spion has joined the channel [17:20] neilk_ has joined the channel [17:20] libScout_: is there a nodejitsu channel? [17:20] bengrue has joined the channel [17:21] vns has joined the channel [17:21] ph^ has joined the channel [17:21] libScout_: nm... thanks! [17:21] Aikar: fairwinds: wont be hard to create your own wizard: https://gist.github.com/1275850 [17:22] __tosh has joined the channel [17:22] Aikar: err add ) on line 20 [17:22] Nimco has joined the channel [17:22] fairwinds: Aikar: hat's off. thanks for the gist [17:23] lv: how long it take to install socket.io? when i gave 'npm install socket.io' the cursor is blinking but neither showing any progress nor completed. why? [17:23] Aikar: fairwinds: compile that file with streamline then itll work great [17:23] metellus has joined the channel [17:23] Aikar: so name it wizard_.js [17:23] Aikar: or check out http://github.com/aikar/aurora which im working on to make management of streamline+other preprocessors easier [17:24] Aikar: though not finished, works for streamline though [17:24] fairwinds: sure, will give it a spin [17:24] jerrysv has joined the channel [17:24] frameeee: anyone know what impact google's dart will have? especially on node? [17:24] lightcap has joined the channel [17:24] heavysixer has joined the channel [17:24] Aikar: streamline writes the callbacks for you, so the compiled code will be like 6 levels indented :P but lets you write a ton easier to manage source files [17:25] Nimco: I'm looking to convert a Buffer to the GSM 03.38 character set for the purposes of SMS sending. According to the documentation, this is not supported. Can anyone point me in the direction of whether an existing solution exists, or whether it is being worked on? [17:25] Aikar: frameeee: probally not much, but i intend to try to add Darts Dart->JS as a preprocessor to Aurora, so you can use it if you want and write dart code that runs in node [17:25] pickels has joined the channel [17:25] jsurfer has joined the channel [17:26] mcluskydodallas has joined the channel [17:26] frameeee: thanks for the outlook [17:27] Aikar: i intend to make it so you can configure multiple preprocessors, so you can use coffee on 1 file, traceur on another, js++ on another, dart on another, but deploy/distribute your code as normal JS so noone using your code has any dependencies on having those installed [17:28] Aikar: and since streamline takes standard JS, can simply do any stage 1 preprocessor the run the processed code through streamline [17:30] Wizek has joined the channel [17:30] creationix has left the channel [17:31] alvaro_o has joined the channel [17:32] eee_c has joined the channel [17:33] mcluskydodallas has joined the channel [17:33] ayaz has joined the channel [17:35] stisti has joined the channel [17:35] sarlalian has joined the channel [17:36] davidwalsh has joined the channel [17:37] erickt has joined the channel [17:37] nak has joined the channel [17:38] wadey has joined the channel [17:38] Nimco: Anyone any ideas on my GSM 03.38 character set question above? [17:40] algo_ has joined the channel [17:40] Aria: I missed it. What's the question? [17:40] Nimco: I'm looking to convert a Buffer to the GSM 03.38 character set for the purposes of SMS sending. According to the documentation, this is not supported. Can anyone point me in the direction of whether an existing solution exists, or whether it is being worked on? [17:41] Aria: I've never heard of such a thing, so you're probably set recoding yourself. [17:41] Squeese has joined the channel [17:41] aho has joined the channel [17:42] Aria: You'd definitely need a buffer to hold the result, since you want an array-of-bytes; sounds like you're already at that point. What's your source encoding? [17:42] Nimco: UTF-8 [17:42] pizthewiz has joined the channel [17:42] Nimco: The difficulty is that GSM 03.38 is 7-bit, so it doesn't play nice with iconv either [17:42] Aria: ACTION nods. Sounds reasonable. I'd probably work starting with a String, since working with unicode codepoints is more fun than UTF-8 raw. [17:42] Aria: What about iconv hates it? [17:42] Nimco: OK, cool [17:43] Aria: Looks like iconv on my system just doesn't know about it, not hate it. [17:43] Nimco: Well, for one, it doesn't support it, but looking around on the net, iconv struggles with non-7bit multibyte characters [17:43] Nimco: See this bug: http://sourceware.org/bugzilla/show_bug.cgi?id=10226 [17:44] paulwe has joined the channel [17:44] warreng: does node support standard unix fork() ? it looks like 0.5 has child_process.fork() but that's quite a bit extra [17:44] Aria: Heh, yeh, kinda. If it's packed. [17:44] Nimco: If I were to work on a solution to it, do you see it as something that would be better done as node module or look to be pushed back into node itself in C? [17:44] Aria: But most unixy systems hate dealing with 7-bit data that's not padded to 8-bit. [17:45] Aria: It'd be better done as node module. Or just done in Javascript. [17:45] jocafa: someone should make a node module for libspotify... [17:45] Nimco: OK, cool :) [17:45] Nimco: Thanks Aria [17:45] Nimco: I'll look at doing something as a node module and opening it up. I might see if I can make it slightly more generic too - e.g. to allow other charsets as "plugins" [17:45] Aria: warreng: No, it doesn't, exactly. There's some sticky semantics to work out if you want to do anything but fork/exec, which child_process does. DOable, but nobody's done it because there's no one size fits all solution, and it's non-portable. [17:46] Aria: Nimco: A pure-javascript encoding library would rock! Something that can read from strings and write to buffers would be win. And a wrapper to speak streams. [17:46] Nimco: I'll see what I can do [17:46] warreng: i need to turn this app.js into a daemon (fork, setsid(), chroot, pid files, etc)... it looks like there's a few half baked libs out there but nothing great [17:46] warreng: most of 'em written in C [17:47] Aria: And that response on the iconv ticket is baffling. There's no reason it couldn't work, at least with padded characters. [17:47] Aria: warreng: Half-baked libs often take pull requests! [17:47] pekim2 has joined the channel [17:47] warreng: there are outstanding pull requests already [17:48] warreng: i've found https://github.com/Slashed/daemon.node and https://github.com/DanBUK/node-daemon-tools [17:48] warreng: neither look even close to being "production ready" [17:48] Aria: Ooh. Those look promising. [17:48] Aikar: warreng: node-fork also does it [17:48] Aria: What would make it production-ready? [17:48] Aikar: !npm search fork [17:48] jhbot: packages (short format, truncated): restler-aaronblohowiak, simplegeo-thrift, mmikulicic-thrift, fork, picardForTynt, parseUri, iles-forked-irc-js, swizec-bitly, tiamat, trentm-hashlib, trentm-git, connect-unstable, express-unstable, trentm-datetime, bitcoinjs-mongoose, iconv-jp, jslint-strict, taco, yajet, forker [17:48] Aikar: !npm info fork [17:48] jhbot: fork by Ryan W Tenney, version 0.0.2: Very simple support for process forking [17:49] TheJH has joined the channel [17:49] Aikar: i used it before and it worked fine [17:49] Swizec: what was that? [17:49] Aikar: but it was back in .2 days [17:49] Aikar: fork by ryan tenney [17:49] Swizec: fork of what? [17:49] Aikar: its a very simple wrapper against the OS function [17:50] Aikar: Swizec: the unix function fork() to fork a process [17:50] rabidmachine9 has joined the channel [17:50] rabidmachine9: hello [17:50] warreng: it's too bad all of those require c code instead of pure JS [17:50] Aikar: warreng: of course [17:50] Aria: Well, yeah. If you want fork, you kinda need C. [17:50] Swizec: Aikar interesting [17:50] BillyBreen1 has joined the channel [17:50] rabidmachine9: I want to run the first example here http://socket.io/#how-to-use [17:50] Aria: (and as a side note, Nimco, using iconv names for the conversions would rock) [17:50] Aikar: warreng: you can write a bash script to start your process instead [17:51] rabidmachine9: just messing with socket.io [17:51] Aikar: nohup node foo.js >/logfile.log 2>&1 [17:51] Aikar: nohup node foo.js >/logfile.log 2>&1 & [17:51] Aria: Heh. If only nohup had a nicer interface. [17:51] wadey_ has joined the channel [17:51] rabidmachine9: but I don't know what to expect [17:51] rabidmachine9: I don't know if it works [17:51] Aikar: nohups interface is simple :P the 2>&1 is bash itself lol [17:51] Aria: rabidmachine9: Look in the console log -- open firebug or developer tools or whatever your browser calls it. [17:51] Aikar: nohup [17:52] Aria: command I run without nohup works when the cwd isn't writable. with nohup it doesn't ;-) [17:52] pekim2 has joined the channel [17:52] pizthewiz_ has joined the channel [17:52] algo_: test [17:52] Aikar: why wouldnt cwd be writable [17:52] TheJH: rabidmachine9, you should see output from the node script and in the browsers debug console saying {my:"data"} and {hello:"world"} or so [17:52] Aikar: ive never had trouble with nohup [17:52] Aria: Uh... because I don't allow my apps to self-modify. [17:53] rabidmachine9: ok so I have to look at the debuger? [17:53] Aria: rabidmachine9: for that example, yes -- its output is as console.log. [17:53] Aria: rabidmachine9: You could replace it with some DOM magic to append text somewhere (like a textarea, textarea.value = textarea.value + data ) [17:54] algo_: !quit [17:54] Aikar: lol [17:54] Aikar: thats not how you quit :P [17:54] rabidmachine9: I see... thanks! [17:54] Aria: rabidmachine9: And welcome! socket.io is neat stuff. Great abstraction over transports for many purposes. IT might surprise you how low-level it is, but it's a great building block. [17:55] rabidmachine9: sorry but do I have to open locahost:80 ? [17:55] gxdssoft_ has joined the channel [17:55] rabidmachine9: because nothing happens so far... [17:56] fbartho has joined the channel [17:56] gxdssoft has joined the channel [17:57] TheJH: rabidmachine9, yup, you have to open it in your browser [17:58] Aria: rabidmachine9: Yeah, that's how the client would connect. [17:59] githogori has joined the channel [18:00] CarterL has joined the channel [18:01] stisti has joined the channel [18:01] gut4 has joined the channel [18:02] jhurliman has joined the channel [18:02] sh1mmer has joined the channel [18:02] pekim3 has joined the channel [18:03] fbartho: What is the preferred folder structure for a native node addon? [18:03] fbartho: src folder for c++ and lib folder for JS? [18:03] fbartho: all inside the lib folder? [18:03] fbartho: Something else? [18:03] JSManiacs has joined the channel [18:03] Aikar: src for c++ sounds ok [18:04] Aikar: some people use src for preprocessed files [18:04] Aikar: ie coffeescript [18:04] Aikar: but its fine for CPP too [18:04] neekers: npm ERR! Not compatible with your version of node/npm: express@2.4.7 [18:05] neekers: can i fix that? [18:05] eee_c has joined the channel [18:05] neekers: i am using node v0.5.9-pre [18:05] tbranyen: well [18:06] Aikar: neekers: try --force, but not all modules are updated for .5.x, you may need to get it off GIT [18:06] RORgasm has joined the channel [18:06] schwab has joined the channel [18:06] neekers: tried this, npm --force install express but same error [18:07] Aikar: !google express .5.x [18:07] Aikar: we have like 20 bots in here [18:07] Aikar: but no !google ? [18:08] Aikar: neekers: express git master branch is 0.5.x compat [18:08] Aikar: npm install git://github.com/visionmedia/express.git [18:08] neekers: Aikar: i'll look now, thanks [18:08] neekers: ahh [18:09] Aikar: (yes npm supports git urls) [18:09] neekers: cool [18:09] heavysixer has joined the channel [18:09] Aikar: just note hes labeled it alpha [18:10] felixhummel has joined the channel [18:10] pquerna_ has joined the channel [18:10] neekers: Aikar: i got this error, http://pastebin.com/1zEe6RAB [18:10] fread2281 has joined the channel [18:11] pquerna_ has joined the channel [18:12] Aikar: neekers: may wanna report that to isaacs [18:12] neekers: heh [18:12] Aikar: and gist.github.com is better for pasting ;) [18:12] FireCat has joined the channel [18:12] Aikar: pastebin is just so distracting [18:12] neekers: what do i do [18:12] TheJH: especially because my bot can only aut-check gists for common npm errors :D [18:12] zeade has joined the channel [18:13] Aikar: those of us working for marketing companies generally need to keep ads on :( [18:13] Aikar: those ads on pastebin are very distracting [18:13] dshaw_ has joined the channel [18:13] neekers: https://gist.github.com/1276055 [18:13] neekers: there [18:14] knifed has joined the channel [18:14] Aikar: oh [18:14] Aikar: commander failed version check [18:14] avih has joined the channel [18:14] TheJH: neekers, well, first thing, node version with "-pre" - it's horribly unstable [18:14] neekers: i dont recall reading about commander anywhere [18:14] willwhite has joined the channel [18:14] Aikar: you could use 'n', tjs version manager, install commander under 0.4.x and itll prolly work [18:14] saikat has joined the channel [18:14] Aikar: express uses commander [18:15] Aikar: TheJH: i wouldnt say thats true [18:15] jtsnow has joined the channel [18:15] TheJH: neekers, well, second thing, express only supports 0.4.x (which is the stable branch, so you should use it anyway) [18:15] Aikar: not always [18:15] Aikar: like its stable in 0.4.x :P [18:15] neekers: i'm not even sure how i installed it now [18:15] neekers: apt-get? [18:15] Aikar: no [18:15] Aikar: cause apt-get is out dated [18:15] pquerna_ has left the channel [18:15] neekers: can i uninstall it? [18:15] pquerna_ has joined the channel [18:16] Aikar: the n version manager is pretty friendly [18:16] Aikar: npm install n -g [18:16] Aikar: n 0.4.12 [18:16] Aikar: will download/compile/install 0.4.12 for you [18:17] neekers: so whats the complete command? [18:17] Aikar: i just gave it [18:17] Aikar: those 2 commands lol [18:17] neekers: i've never seen an n 0.4.12 before [18:17] Aikar: n is a binary installed by 'n' on npm [18:18] Aikar: its a node version manager [18:18] Aikar: you can switch between diff versions quickly [18:18] neekers: what about my currently installed node install? [18:18] Aikar: `n latest` goes to 0.5.x [18:18] Aikar: itll overwrite [18:18] Aikar: or it may linger but be unused [18:18] Aikar: type which node [18:19] Aikar: http://elegantcode.com/2011/02/09/taking-baby-steps-with-node-js-node-version-management-with-n/ [18:19] neekers: ok, installing 0.4.12 [18:19] neekers: ive been reading everything i can about node the past few days [18:19] avih has joined the channel [18:19] libScout_: if i add a property to Object in the node console... will it reset after I exit? [18:19] neekers: and writing lots of little programs [18:20] fbartho has joined the channel [18:21] fread2281 has joined the channel [18:23] Aikar: man someone whos not afraid to hurt someones feelings really needs to say something to one of my coworkers. hes an older guy and he prints everything.... [18:23] Aikar: every Jira ticket, every email [18:24] Aikar: hes got stacks of paper 3-4 inches tall [18:24] Aikar: and not even recycling them, just stacking on desk [18:24] Aikar: our companys huge on "green" [18:24] TheJH: Aikar, are those stacks WORN or WORM? [18:24] Aikar: wat? [18:24] TheJH: "Write Once, Read Never" and "Write Once, Read Many" [18:25] TheJH: Aikar, "WORM storage chips" or so are an old joke :D [18:25] harthur has joined the channel [18:25] Aikar: Write Once, Read 1-2 times? [18:25] Aikar: he could simply just read them on his monitor.. [18:25] TheJH: oh, he actually reads those papers... [18:25] Aikar: he prints it out so he can read it on the paper instead of computer [18:26] neekers: node -v gives v0.4.12 [18:26] neekers: good [18:26] Aikar: i found it funny shortly after he started and he was doing it they sent a company email about not printing emails, i was expecting him to stop... but he didnt [18:27] fbartho: Dragged kicking and screaming into the technology age? [18:27] TheJH: `3rdEden, are you here? [18:27] `3rdEden: yup [18:27] TheJH: `3rdEden, does https://github.com/LearnBoost/socket.io-client work in nodejs? [18:27] `3rdEden: TheJH yup [18:27] kmwallio has joined the channel [18:28] TheJH: `3rdEden, :) - thanks [18:28] `3rdEden: :) yw [18:28] TheJH: `3rdEden, so I can mess with nowjs from node :) [18:28] `3rdEden: yeh [18:28] neekers: ok, now express installed with no problem [18:28] StanlySoManly has joined the channel [18:28] neekers: things are getting better [18:28] `3rdEden: TheJH but they already had a client; https://github.com/Flotype/nowclient [18:29] MrNibbles has joined the channel [18:30] TheJH: `3rdEden, oh, I don't want to use it. I want to mess with it. [18:30] gut4 has joined the channel [18:30] `3rdEden: TheJH ah okay [18:30] dnyy has joined the channel [18:30] TheJH: :) [18:30] TheJH: i'd never use that stuff :D [18:30] mikeycgto has joined the channel [18:30] `3rdEden: lol [18:31] tdegrunt has joined the channel [18:33] AvianFlu has joined the channel [18:33] langworthy has joined the channel [18:33] tylerstalder has joined the channel [18:35] fmeyer has joined the channel [18:36] CIA-48: node: 03Ryan Dahl 07 * r0fec213 10/ (3 files): Update docs for server fd sharing - http://git.io/pZmp3Q [18:36] k0stask has joined the channel [18:36] isaacs has joined the channel [18:38] sechrist has joined the channel [18:38] saikat has joined the channel [18:38] Aphelion has joined the channel [18:41] nyrb has joined the channel [18:41] Aikar: ryah: isnt the FD stored as .fd, why does that example use ._handle? [18:42] zhami has joined the channel [18:42] grekko has joined the channel [18:43] nak has joined the channel [18:44] Bonuspunkt has joined the channel [18:44] CoverSlide: isn't .fd just a number? [18:44] DrMcKay: yes [18:44] mcluskydodallas has joined the channel [18:45] ryah: Aikar: nope [18:45] DrMcKay: bnoordhuis: ping? [18:45] zhami has joined the channel [18:45] ryah: Aikar: no more sending fds, only handles [18:45] ryah: fds are not cross platform [18:46] DrMcKay: huh? which system doesn't use fds? [18:46] tilgovi has joined the channel [18:46] tilgovi has joined the channel [18:46] ryah: windows [18:46] DrMcKay: wait, aren't windows handles integers as well? [18:46] ryah: 64 bit integers :) [18:47] DrMcKay: ah [18:48] hellp has joined the channel [18:48] ayaz has joined the channel [18:48] Aikar: i thought a handle was the FD in windows O.o? [18:48] DrMcKay: does process.kill(pid, false) still kill a process on Windows? [18:49] jocafa: Does Windows handle *anything* well? [18:49] Aikar: so does everything that has a .fd now have a ._handle we have to use instead? [18:49] nforgerit has joined the channel [18:49] Aikar: why couldnt we say screw windows and keep node simple :( [18:49] bnoordhuis: DrMcKay: no [18:49] tbranyen: shouldn't stick your dick in crazy is what i've always said Aikar [18:50] DrMcKay: bnoordhuis: so it's fixed? yay! [18:50] konobi: DrMcKay: windows has processes?! [18:50] bnoordhuis: DrMcKay: that is to say, i mentioned it to bert and he said he'd fix it [18:50] fbartho: What is the purpose of the "scripts" block in package.json [18:51] pid_ has joined the channel [18:51] nak has joined the channel [18:51] Aikar: fbartho: scripts to run at "events" [18:51] fbartho: are they scripts that are shipped with your module? [18:51] Aikar: ie, to compile a C++ module [18:51] level09 has joined the channel [18:51] DrMcKay: bnoordhuis: I haven't seen it in commits yet, that's why I'm asking [18:51] Aikar: prepublish, postinstall, preinstall, etc [18:51] diamonddog has joined the channel [18:51] konobi: tests, etc. [18:51] zackattack has joined the channel [18:51] fbartho: So, when I have a "test" block [18:51] fbartho: are those run automatically? [18:52] Aikar: that tells npm what to run when yuo do 'npm test foo' [18:52] Me1000 has joined the channel [18:52] Aikar: which may be like 'vows tests/*' [18:52] fbartho: ah. [18:52] fbartho: My test scripts require user interaction [18:52] Aikar: why? [18:52] Aikar: thats bad design [18:52] fbartho: so... not going to put them in the package.json then [18:52] fbartho: it's not automated tests yet [18:53] fbartho: I can make an automated form [18:53] fbartho: just didn't know that's what it was for. [18:53] Aikar: tests should run the test and report failures [18:53] konobi: fbartho: set npat=true in your npm config [18:53] fbartho: what does that do? [18:53] bnoordhuis: DrMcKay: right, it's not fixed atm [18:53] konobi: runs tests automatically at install time [18:54] fbartho: ah [18:54] fbartho: nifty [18:54] Aikar: that doesnt seem like a good idea, that then requires installation of dev dependencies [18:54] Aikar: which will then likely linger [18:54] nforgerit has joined the channel [18:54] DrMcKay: bnoordhuis: k, thanks [18:54] konobi: Aikar: that's why it's disabled by default [18:55] Aikar: so why are you telling him to add it lol [18:55] konobi: Aikar: but I also don't trust code... so i want to run tests to ensure the code actually works as expected [18:55] bingomanatee_ has joined the channel [18:55] Aikar: ohh.... sorry i was confused [18:55] Aikar: i thought you said package.json [18:55] Aikar: so i thought it was something a lib author added to force everyone who installs his module to run tests [18:56] konobi: if only [18:56] spcshpopr8r has joined the channel [18:57] isaacs: Aikar: what do you mean by "linger"? [18:57] isaacs: Aikar: they'll linger only as long as the package they're attached to [18:57] konobi: disk space is cheap [18:58] neekers: when i try to run my express app, i get this error: https://gist.github.com/1276190 [18:58] neekers: i know i installed express [18:58] schwab has joined the channel [18:58] adambeynon has joined the channel [18:58] Aikar: isaacs: ie if you tarball your folder theyll be there, and i dont use "dependencies" on package.json, i bundle every dep. [18:58] neekers: root@night:/chatter# express -v 2.4.7 [18:58] Aikar: so if i installed devdeps, then theyd be in my SCM for that project too [18:58] igl: neekers. with npm -g? [18:59] Aria: neekers: you have a global install of express; you need the library installed in your app. npm install express [18:59] shariff has left the channel [18:59] neekers: igl: yes [18:59] neekers: heh [18:59] neekers: so reinstall without -g? [18:59] isaacs: Aikar: oh, yeah, if you bundle your deps, then you'll also be bundling everything underneath them. [18:59] isaacs: Aikar: npm doesn't ask questions about bundledDepdencies. it just includes them as-is [18:59] igl: did you set a node_path? [18:59] Aria: Yeah, without -g, neekers. For express, you want both -- with -g to get the express command, without to get the library in your app [18:59] isaacs: Aikar: the assumption is that you've taken responsibility for them. [18:59] Aikar: isaacs: which is what i meant by "if it auto ran tests, it be very easy to accidently linger the dev deps if you dont then remove them" [19:00] isaacs: Aria, neekers: or, just run `npm link express` from the get-go [19:00] Margle has joined the channel [19:00] Aikar: isaacs: understood, i was just meaning how an auto tests run leads to accidental commiting of devdeps :P [19:00] Aria: True that. [19:00] isaacs: right [19:00] isaacs: bbiab [19:00] olivier has joined the channel [19:00] konobi: Aikar: .gitignore is there for a reason =0) [19:00] olivier has left the channel [19:01] Aikar: vs npm install foo, git add -A, git commit, npm test foo, git reset --hard [19:01] Aikar: konobi: i intentionally commit my node_modules dir :P [19:01] Aikar: all of my packages are installable straight from git w/o npm [19:01] igl: neerkers: ~$ echo $NODE_PATH = /usr/local/lib/node_modules. node needs to know where to find global modules [19:01] Aikar: i use npm solely as a package updater/initial installer to my SCM [19:02] Aikar: then someone else can check out the project w/o npm [19:02] neekers: ok, my app started, now i get this in my browser: https://gist.github.com/1276199 [19:02] matyr has joined the channel [19:02] Aikar: and if npm is down, nothing is impacted [19:03] TheJH: DrMcKay, you have fedora and you use chrome/chromium, right? [19:03] DrMcKay: TheJH: yes [19:04] Aikar: for example, if you install a module at ver 1.2.3, that module could have a lazy dependency of * or > 1.0 etc, so while you test your code, it works fine. next person installs it, that submodule could then pull an even newer version of its dependency that doesnt work. I don't like that. [19:04] tylerstalder has joined the channel [19:04] TheJH: DrMcKay, if so, don't restart chrome/chromium, the new selinux policies are broken [19:04] diamonddog has joined the channel [19:04] Aikar: id rather know what i pull down from SCM is an exact replica of whats been tested already [19:04] boaz has joined the channel [19:04] TheJH: DrMcKay, https://bugzilla.redhat.com/show_bug.cgi?id=730179 [19:04] parshap has joined the channel [19:04] TheJH: DrMcKay, applies to chromium, too [19:04] DrMcKay: TheJH: you mean, after an update? [19:05] TheJH: DrMcKay, yes [19:05] DrMcKay: TheJH: thanks man! [19:05] neekers: any ideas on my new error? https://gist.github.com/1276199 [19:06] CoverSlide: umm [19:06] CoverSlide: `npm install jade` ??? [19:06] sfoster has joined the channel [19:06] maushu has joined the channel [19:06] jackbean_ has joined the channel [19:06] TheJH: DrMcKay, you're welcome. guess I'll have to use firefox for now... or work on getting gentoo on my laptop :) [19:06] Aikar: neekers: the various template engines are not bundled with express [19:06] simenbrekken has joined the channel [19:06] ctide: Aikar: that breaks down as soon as you include modules that have system dependencies :( [19:07] jroes has joined the channel [19:07] Aikar: ctide: you mean C++ mods? nope [19:07] neekers: why dont they say that somewhere... so newbies like me have a clue? :) [19:07] d-snp: hey, when I do: var Shard = require('shards').Shard; in one file [19:07] dmsuperman has joined the channel [19:07] jroes: is node-orm the most popular generic ORM module right now? [19:07] ctide: how does it not [19:07] dmsuperman: How might I compare ObjectIDs? [19:07] jroes: by generic I mean supports postgres, mysql, and mongo (sorta) [19:07] d-snp: and I do in another file the same, and then there do Shard.prototype.something = something_else [19:07] Aikar: ctide: make a makefile that invokes each of your submodules makefile :P [19:07] ctide: heh [19:07] d-snp: will in the previous file the something also be set? [19:07] mikeal has joined the channel [19:07] DrMcKay: TheJH: or set selinux to permissive [19:08] d-snp: as in, does require somehow share the exports? [19:08] paul0 has joined the channel [19:08] ctide: i suppose, for us, running npm install is just as good as running make :) [19:08] neekers: welcome to express... phew... [19:08] Aikar: ctide: https://github.com/aikar/wormhole/blob/1.0/Makefile [19:08] eldios has joined the channel [19:09] Aikar: yeah but then your relying on npm. or you could require the npm binary to be installed then simply npm install . [19:09] Aikar: then still not require the npm service to be up [19:10] cognominal has joined the channel [19:10] JulioBarros has joined the channel [19:10] Aikar: my target is to be able to get a fully working checkout w/o any dependency on service being online [19:10] Aikar: npm has gone down before :P [19:10] nayrb has joined the channel [19:11] TheJH: Aikar, just setup a local npm mirror :D [19:11] Aikar: npm is a great tool, i just dont think people should have it as a dependency just to get your code checked out [19:11] Aikar: and also the issues of "what module version just got installed" [19:11] Aikar: you may strictly define versions in your package.json, but doesnt mean your dependencies did the same in theirs... [19:11] fread2281 has joined the channel [19:11] piscisaureus_ has joined the channel [19:11] Aikar: my style ensures what you check out is whats tested [19:12] heavysixer has joined the channel [19:13] hwinkel has joined the channel [19:13] Lingerance: TheJH: I've wanted to do that but didn't want to setup the wierd DB they use, did you bypass that somehow? [19:13] jhurliman has joined the channel [19:14] dmsuperman: How might I compare two mongo ObjectIDs in javascript? [19:14] Aikar: Lingerance: lol "weird db" is a pretty well known DB :P, its not your typical RDBMS though [19:14] mandric has joined the channel [19:14] zeade has joined the channel [19:14] fly-away has joined the channel [19:14] Lingerance: Well it'd be a thrid DB whose sole purpose is NPM... [19:15] Aikar: what? [19:15] simenbrekken_ has joined the channel [19:15] Lingerance: ACTION already uses Mongo+Mysql [19:15] Aikar: oh you mean setting up a db in your infrastructure thats only used for npm [19:15] TheJH: Lingerance, I setup a local copy of couchdb [19:15] Aikar: but this db would only need to be used for internal dev network and nothing to do for production servers [19:16] Aikar: unless you used npm to install your package to your production servers, which honestly i would strongly oppose :P [19:17] TheJH: Aikar, why? :P I think nodejitsu works that way [19:17] Lingerance: Meh, I'll just make pacman packages of the modules. [19:18] Aikar: TheJH: well nodejitsu has to provide npm on their production servers because they are a node hosting service :P [19:19] YamahaAlex37 has joined the channel [19:19] SoulRaven has joined the channel [19:19] McMAGIC--Copy has joined the channel [19:19] Aikar: when yuo work for a medium+ sized company, sysadmins are pain in the asses. getting them to let you use node is a hurdle of its own. then tell them you want to use a node service to deploy the product? theyd kill you [19:20] zeade has joined the channel [19:20] matjaz has joined the channel [19:20] sh1mmer has joined the channel [19:20] context: aikar: you're crazy. [19:20] Tobsn has joined the channel [19:21] dreamdust1 has joined the channel [19:21] context: aikar: you just have retarded ass sysadmins or you dont know how to properly explain what it is you're doing [19:21] qmx: Aikar: I don't blame them [19:22] context: and what qmx said. node should never be the public facing service. [19:23] kuebk^ has joined the channel [19:23] qmx: context: that's perfect [19:24] markwubben has joined the channel [19:24] adriftatsea has joined the channel [19:25] dmsuperman has left the channel [19:26] gplg has joined the channel [19:26] dshaw_1 has joined the channel [19:26] Aikar: what does "node.hs be the public facing service" have anything to do with how you get the code to the server [19:26] Aikar: i meant in the fact a development tool doesnt have a purpose on a production server. here at my work we debian package our products mostly, tarballs at the very least [19:26] bradleymeck has joined the channel [19:27] gigawatt has joined the channel [19:27] xy has joined the channel [19:28] Metal3d has joined the channel [19:28] brianc: why do you say node should never be the public facing service? [19:28] jroes: is there a "rails console" equivalent for express? [19:28] Aikar: and context it doesnt matter how much you explain what your doing, if the sys admin doesnt know anything about node.js, they cant "support" it. you cant just drop an order "go learn node and npm so you can support my new tech". they will respond "no, use the language we use for everything else" [19:29] diamonddog has joined the channel [19:29] hotch has joined the channel [19:29] Aikar: easier in smaller companies/startups sure, hince why i said medium+ [19:29] gregoryigelmund has joined the channel [19:29] Aikar: when you got practices and expectations set in stone, it gets harder [19:30] brianc: still curious as to why not put node.js on port 80 [19:30] slifty_corsair has joined the channel [19:30] konobi: brianc: FUD [19:30] brianc: ah okay [19:31] brianc: FUD (pronounced like the English word food) is a brand name for hot dogs, sausages, bacon and cold cuts produced by the Mexican company... [19:31] brianc: next google entry: Fear Uncertainty Doubt. that sounds more like it [19:31] Aikar: or acronymfinder.com 3rd entry "Female Urinary Device" [19:31] brianc: yikes [19:32] qmx: LOL [19:32] brianc: If I had to pick a reason not to put node on port 80 I would choose hot dogs [19:32] Aikar: brianc: i dont agree with him on that either. unless your using node for specific purposes where youll have content to show when nodes down, what does a 80->8080 proxy do if node is down and still has no content to show? [19:33] Aikar: which is a common use case, and then you should use another server in front if like a PHP main site sure. [19:33] te-brian has joined the channel [19:33] Aikar: but if all nginx or so is doing is acting as a proxy... your not gaining much by putting it in front of node [19:33] konobi: easier to manage for some aspects [19:34] i42n has joined the channel [19:34] konobi: ssl certs, fd limits, etc. etc. [19:34] Aikar: sure, its really situational [19:34] Aikar: if your situation means its easier, then by all means do it [19:34] Aikar: there is no 1 size fits all [19:34] brianc: okay cool [19:34] konobi: then again generally we'll stick ZXTM in front [19:34] context: brianc: why would you? most services you are probably going to be running more than 1 node instance. thus you already need a load balancer in front of it. [19:35] brianc: context: cluster? [19:35] konobi: nginx now supports HTTP/1.1 to back ends, so has keep-alive support [19:35] context: brianc: why have node serve up static data? im sure its got better things to do [19:35] konobi: of course you get into more fun c10k issues at that point =0) [19:36] davemo has joined the channel [19:36] Aikar: context: yes static files is something you can have done better with an nginx front end. but my point was against the statement of "you should never" :P [19:36] Aikar: shits situational, analyze what your doing and then decide whats best [19:37] brianc: yeah I was just wondering if "new shit had come to light" and it was now a defacto "never put node on 80/443" [19:37] Aikar: if all your using nginx for is to improve static resource loading, but your app is a small internal company dashboard with low traffic, why bother with nginx? [19:37] Aikar: adding alot more compexity for little gain [19:37] context: small internal dashboard: if its the only internal app/site running on that machine than it makes sense [19:38] herbySk has joined the channel [19:38] context: most companies probably have more than one internal tool, and probably dont have them all running on their own machine [19:38] Aikar: yes, hosting multiple sites on a single box is another one of those situational things i said you should analyze and decide on :P [19:38] context: im partially dead today :/ [19:38] Frippe has joined the channel [19:39] zackattack has joined the channel [19:39] brianc: now I just want a hot dog [19:39] Aikar: im not saying you should never use a frontend in front of node, nor am i saying you should always use node as a front end, im saying the statement "you should never use node as a front end" is false [19:39] ixti has joined the channel [19:39] jbpros has joined the channel [19:39] Aikar: just do w/e makes the most sense and easiest to manage [19:39] brianc: sweet [19:40] zemanel has joined the channel [19:40] fbartho has joined the channel [19:41] brianc: I'm a fan of choosing the right tool for the job, and node is always the right tool for the job. ALWAYS. Ray tracer? node. Database storage engine? node. Embedded real-time microcontroller firmware? node. [19:41] gsmcwhirter has joined the channel [19:41] tjholowaychuk has joined the channel [19:41] Aria: Haha [19:41] russfrank: hahah [19:41] felixhummel has joined the channel [19:41] fbartho: What's the convention for modules: exports.ModuleName = {}; exports.ModuleName.exportedFunc = func... [19:41] fbartho: ? [19:42] fbartho: or exports.exportedFunc = func... [19:42] Aikar: fbartho: i personally prefer module.exports = { foo: foo, bar: bar, baz: baz}; and define them as sep functions [19:42] Aikar: so you can control your exports in a small manageable block [19:42] brianc: fbartho: I use module.exports [19:43] fbartho: right, but what you're saying is that you export your functions on the root, you don't wrap them in an object with the name of the module you're working on. [19:43] Aikar: fbartho: but having a single export of your module name would be silly [19:43] heavysixer has joined the channel [19:43] Aikar: yes, dont wrap them [19:43] Aikar: that provides nothing [19:43] brianc: fbartho: what Aikar said. I try to reference 'module.exports' once per file [19:43] Aikar: your already require('modulename') which details what the functions are related to [19:44] Aikar: require('foo').foo.bar() doesnt make any sense [19:44] fennec: so. i'm using the 'pcap' module for some relatively straightforward packet capture playbacks in my test suite. but it keeps hanging on the third test or so - it doesn't bother reading anything in after I ask for it to open the file and start playback. [19:44] fennec: however, if I open a random file (/etc/passwd) immediately before launching playback, and it gets a different fd for the pcap input file, everything works fine. [19:44] CIA-48: node: 03isaacs 07 * r4f91b72 10/ doc/api/modules.markdown : Fix #1851 Correct X/index doc - http://git.io/QK8OUQ [19:45] fennec: looking for thoughts about where I should look to track this down. :) [19:45] wadey has joined the channel [19:45] Renegade001 has joined the channel [19:46] fennec: (while I continue to track it down as best I can) [19:46] Aikar: fennec: sounds like a bug in pcap with FD = 0 [19:46] Aikar: err [19:46] Aikar: it cant be 0 [19:46] Aikar: thats stdin [19:46] silntbob has left the channel [19:47] paulwe has joined the channel [19:47] fennec: in these tests, fd=6 [19:48] fennec: (unless i open /etc/passwd right before it and fd=7.) [19:48] jetienne has joined the channel [19:49] langworthy has joined the channel [19:49] dmsuperman has joined the channel [19:49] dmsuperman has left the channel [19:49] meso has joined the channel [19:49] beakerman has joined the channel [19:49] beakerman: anyone know how I can do a post-render callback in backbone.js ? [19:50] meso has joined the channel [19:51] tbranyen: beakerman: override render, call the constructor render and then call your callback [19:52] beakerman: tbranyen: doesn't seem to actually add the element to the DOM until the render method returns [19:52] tbranyen: well yeah thats why you trigger the callback afterwards [19:52] tbranyen: if you need more help go to #documentcloud [19:52] tbranyen: i can help there as well [19:53] tbranyen: not asking in #node.js [19:53] beakerman: thx [19:53] tbranyen: :3 [19:54] darinc: brianc: speaking of node as the right tool for the job (any job) a coworker convinced me to use node for controlling a serial to server controller I have at home. I'm planning on making it into a fancy white board plotter (when I have the time...) [19:55] hotch: nice darinc I have some arduino stuff coming in the mail, it's nice not to have to spend a bunch of time/effort setting up an ARM/PIC board [19:56] hotch: I'll just keep track remotely of my office? :P [19:56] jackbean_ has joined the channel [19:56] brianc: darinc: nice [19:57] wilmoore has joined the channel [19:59] darinc: IF (and this is a big if) I can get the dang thing working right, I'm tempted to use the whiteboard blotter as a "4th screen" drawing up webstats, or new emails etc (yes, on a whiteboard) [20:00] darinc: I know a new monitor would be less expensive / easier... but who doesn't want to see email subject lines (or todo lists) dynamically updated on a whiteboard [20:01] aheckmann has joined the channel [20:02] eignerchris_ has joined the channel [20:02] markwubben has joined the channel [20:02] diamonddog has joined the channel [20:03] voodootikigod has joined the channel [20:03] Aria: People who hate email and todo lists! [20:04] mikl has joined the channel [20:05] saikat has joined the channel [20:09] gigawatt has joined the channel [20:09] topaxi has joined the channel [20:09] hotch: it is pretty epic sweet [20:10] mikl1 has joined the channel [20:10] neekers: i am getting 500 Error: Cannot find module 'jade' but i already installed jade with npm install jade [20:10] neekers: did i do it right? [20:10] JaKWaC has joined the channel [20:11] Aria: neekers: where did you install it? [20:11] neekers: it worked once and then i created a new project and it asked me for jade again [20:11] Aria: Right. npm installs packages into your app or module [20:11] Aria: so npm install jade [20:12] jocafa: wow, my homebrew installation is *jacked* [20:12] neekers: Aria: so everytime you create a new project, you have to do install express and install jade? [20:13] Aria: Yep. You can use npm link to get global copies linked, but generally, I package my dependencies per-app [20:13] Me1000 has joined the channel [20:13] neekers: got it [20:13] tjholowaychuk: neekers that's a good thing [20:13] tjholowaychuk: trust me :p [20:13] tjholowaychuk: plus it takes like 5 seconds [20:13] Aria: It's a solution to the multiple-versions-installed problem that things like rubygems made for themselves [20:13] neekers: i just didnt understand it had to be done for each new project [20:14] Aria: It's more problematic for things like compiled extensions, installed onto servers without compilers, but it's a great things really. [20:14] saikat has joined the channel [20:14] neekers: if i didnt have you guys pointing out these little things to me, i would be having a much harder time doing this... [20:15] Aria: That one's probably the #1 FAQ for npm that I've seen. It's weird, but makes npm awesome. It neither fights system package management nor has to be present at runtime to handle things. [20:16] Tprice: anyone use node-http-proxy? [20:17] Aria: I have. not recently. [20:17] Aria: Good project, the complete version of what you can hack up trivially [20:17] Tprice: if im doing a 'hostname only' proxytable how do i update the route table with out creating a new httpproxy [20:18] issackelly_ has joined the channel [20:18] Tprice: it wants something like this "var proxyServer = httpProxy.createServer(options);" [20:18] dherman: I'm periodically getting an error somewhere in the bowels of the node library. is there an easy way to say "hey, if there's every an exception anywhere, please print a more detailed stack trace"? [20:18] dherman: ever* [20:19] brianc: substack just released another http proxy called "bouncy" [20:19] TheJH: !npm info bouncy [20:19] jhbot: bouncy by James Halliday, version 0.0.5: Bounce HTTP requests around for a load balancer or http host router completely transparently [20:19] Tprice: i dont want to shut down the server just to add a route or remove one [20:19] Aria: Nope, dherman. That is the complete stack trace: it's an error in an event handler, called directly by the eventloop [20:20] diamonddog has joined the channel [20:20] Aria: Tprice: ANd what do you need to change? [20:20] Aria: Using router: ? [20:21] mikl has joined the channel [20:21] dherman: Aria: I see. so when I see this get thrown: https://github.com/joyent/node/blob/master/lib/events.js#L48 [20:21] dherman: any hints on how to track it down? [20:22] Tprice: "Proxy requests using a 'Hostname Only' ProxyTable" if you look at https://github.com/nodejitsu/node-http-proxy [20:22] Tprice: i want to know if i can update the "router" with out makeing a new server [20:22] Aria: dherman: wrap event handler internals in try-catch, watch for 'error' on your eventemitter [20:23] dherman: hm. I don't have an eventemitter [20:23] heavysixer has joined the channel [20:23] dherman: unless I misunderstand (probably do...) [20:23] Aria: Wouldn't be surprised if you can't just add to the table, Tprice. keep a reference, poke it [20:23] zmbmartin has joined the channel [20:24] Aria: It's hard to use node without using at least one eventemitter. [20:24] Aria: if you foo.on(.. soomething ...) foo is an eventemitter [20:24] dherman: ah [20:25] dherman: I thought maybe you meant some custom eventemitter constructor/prototype [20:25] Aria: you can on('error') [20:25] dherman: so then the problem is, which of the 43-gazillion eventemitters could it be [20:25] dherman: oh [20:25] Aria: Ayep. Time to restructure your app a bit so you can handle errors! [20:25] dherman: so this is probably somewhere I forgot to put in an on('error' [20:25] Aria: Yeah. on('error' eats errors. [20:25] dherman: ja [20:26] Tprice: Ah just looking at the source your can ProxyTable.setRoutes(router) [20:27] DennisRas has joined the channel [20:27] level09 has joined the channel [20:27] Aria: Ah, sweet. I was just getting there. [20:28] skmpy has joined the channel [20:28] mbrevoort has joined the channel [20:29] jtrudeau has joined the channel [20:29] isaacs: Tprice: i do [20:29] isaacs: Tprice: it's pretty ok [20:30] dob_ has joined the channel [20:30] isaacs: Tprice: SubStack's new bouncy thingie looks interesting, though. [20:30] k1ttty has joined the channel [20:31] Tprice: isaacs: yeah just looking at bouncy [20:31] Tprice: might fit better for what i need [20:31] tjholowaychuk: Tprice you could add a local socket repl to bouncy or similar [20:31] tjholowaychuk: and make the calls that you need [20:31] tjholowaychuk: expose a function or two to map hosts [20:32] isaacs: Tprice: you can definitely update the proxy table without restarting the server, but you have to write your own response handler, and do the websocket stuff by hand. [20:32] chilts: isaacs: can I ask your opinion, should the 'connect' dependency here really be a devDependency? https://github.com/balor/connect-memcached/blob/master/package.json [20:32] chilts: am just wondering since then I have connect twice in my node_modules :) [20:32] d0k_ has joined the channel [20:32] isaacs: chilts: it should probably be a peerDependency, but such a thing is not actually supported yet. [20:32] chilts: ah, ok [20:32] neilk_ has joined the channel [20:32] chilts: I was wondering what the best thing woul dbe [20:32] Aria: peerDependency? *perk* [20:33] chilts: I guess for now I just not worry? :) [20:33] Tprice: tjholowaychuk: i have something like what your talking about [20:33] bengrue has joined the channel [20:33] Manuel_ has joined the channel [20:33] Tprice: dont knwo if i want to so much "proxy" the connection [20:34] topaxi has joined the channel [20:35] jedahan has left the channel [20:35] Tprice: something almost like a name server [20:35] CIA-48: libuv: 03Ryan Dahl 07 * r5656e3c 10/ (6 files in 5 dirs): Prepare for writable TTY to be blocking - http://git.io/4Pr3OQ [20:35] CIA-48: node: 03Ryan Dahl 07 * r7cf787a 10/ (8 files in 7 dirs): [20:35] CIA-48: node: Upgrade libuv to 5656e3 [20:35] CIA-48: node: This modifies the TTYWrap constructor to add another argument specifying if [20:35] CIA-48: node: it's a readable or writable TTY . That is stdin or stdout. If a TTYWrap is [20:35] CIA-48: node: not readable then writes to it are blocking. [20:35] CIA-48: node: This makes process.stdout blocking. - http://git.io/fVCvhw [20:36] Aikar: how come uv is e3c but node got 6e3? lol [20:36] DrMcKay: huh? [20:36] Aikar: oh c got left off in rys commit message [20:36] Aria: Missed the C, you can trunkate an sha1 in git to any unique prefix and have it mean the same thing [20:36] Aria: truncate. One day I'll learn to ytpe. [20:36] diamonddog has joined the channel [20:37] Aikar: lol. [20:37] DrMcKay: :D [20:39] Aria: isaacs, once again, npm is an amazing piece of work. You've delicately stepped over every landmine that packaging presents. [20:40] isaacs: Aria: no, i've stepped right on most of them. [20:40] Aria: ACTION laughs. Well, yes. But with programming you can go back and fix that ;-) [20:40] isaacs: Aria: just luckily had the good sense to back up and try again :) [20:40] isaacs: remember npm 0.2? [20:40] isaacs: it was pretty bad, really. [20:40] Aria: Oh quite. [20:40] tbranyen: i remember it bitching to me about sudo and me swearing at my monitor [20:41] skmpy has left the channel [20:41] isaacs: tbranyen: that wasn't even the worst of it. [20:41] Aria: Just sayin', this is a brilliant piece of work. [20:41] isaacs: that whole "modules" mapping thing was a terrible terrible mistake. [20:41] Wizek-other has joined the channel [20:41] sub_pop has joined the channel [20:41] g4_ has joined the channel [20:42] CIA-48: node: 03Ryan Dahl 07 * re6092f3 10/ lib/tty_uv.js : tty.WritableStream should be writable - http://git.io/ZzVM6g [20:42] isaacs: and it was like, you'd go, "oh, hey, there's a bug in redis. so... let's open up the redis file that i'm requiring and its.... oh, created by npm... so that's loading this file, and it's... fuck, *also* a shim... to a symlink..." [20:43] Aria: Yeaaah. [20:43] Aria: The shims were a brilliant terrible idea ;-) [20:43] isaacs: it's sad that they've had to return on windows. [20:44] isaacs: but without shebang support or symbolic links to file, what are you going to do? [20:44] isaacs: ? [20:44] Aria: Heh. Yeah. [20:44] isaacs: at least it's *just* for executables [20:44] Aria: Yeah. That's not so bad at all. [20:44] SubStack: haha I remember the old napm [20:44] SubStack: napm >_< [20:45] DrMcKay: nap manager? [20:45] TomY has joined the channel [20:46] yorick has joined the channel [20:46] SubStack: I could use one of those. [20:48] DrMcKay: would be useful. `napm install 4h` [20:48] runvnc has joined the channel [20:48] ixti: what happened to `global`? [20:48] liar has joined the channel [20:49] Aria: Man, I hate C++. What a terrible language. [20:49] g4 has joined the channel [20:49] astropirate has joined the channel [20:49] ixti: was it prohibited now? [20:49] tjholowaychuk: Aria++ [20:49] tjholowaychuk: oh no [20:49] DrMcKay: Aria++ [20:49] tjholowaychuk: our beer machine [20:49] tjholowaychuk: is gone [20:49] DrMcKay: OH NOEZ. [20:49] Aria: Oh NO! [20:50] jerrysv: sad day [20:50] runvnc: Hello.. I am looking for feedback on my idea https://github.com/ithkuil/Cure I would appreciate it [20:50] CIA-48: libuv: 03Ben Noordhuis 07 * r7321695 10/ uv.gyp : sunos: link against libkstat - http://git.io/OwKTgQ [20:50] jaequery has joined the channel [20:50] Aria: ACTION offers tjholowaychuk a growler full of acceptable but not amazing brew. [20:50] CoverSlide: yeah, we should port node and v8 to go [20:50] ixti: because I can't get access to variable set to it in module [20:50] CoverSlide: hmm another node cms .. [20:51] runvnc: CoverSlide I know about Calipso and there is another one I forgot the name [20:51] tjholowaychuk: gah [20:51] simenbrekken has joined the channel [20:51] tjholowaychuk: js on the SS/CS sometimes makes feel lost [20:51] tjholowaychuk: haha [20:51] jaequery: whats this mean, In JavaScript, he said, it's possible that a library can be altered while the app is running, leading to unpredictable results or errors. That's not possible in Dart, he said. [20:51] tjholowaychuk: so much js [20:51] ixti: e.g. file: bender.js has `global.benderIsHere = true`, then I require it but `global.benderIsHere` is undefined [20:51] DrMcKay: DID SOMEONE SAY "DART". [20:52] mbrevoort has joined the channel [20:52] avih_ has joined the channel [20:52] TheJH: !npm info dart [20:52] jhbot: couldn't find that package [20:52] DrMcKay: ixti: use require and exports [20:52] jaequery: DART [20:52] TheJH: what's dart? [20:52] tjholowaychuk: c -> js [20:52] tjholowaychuk: ftw [20:52] tjholowaychuk: haha [20:52] DrMcKay: tjholowaychuk: lulz [20:52] runvnc: lol [20:52] ixti: DrMcKay: thanks. but I was asking exactly about global. [20:52] DrMcKay: TheJH: don't you know dart? [20:52] TheJH: DrMcKay, no [20:52] DrMcKay: ixti: then global is still available [20:52] Aria: dart? Google's new client-side language. Kind of a mix of Java and Javascript. [20:53] DrMcKay: TheJH: http://www.dartlang.org/ [20:53] runvnc: We are hiring Dart developers. You need to have 3 years of experience though [20:53] DrMcKay: we should all rewrite node in dart [20:53] DrMcKay: haha [20:53] CoverSlide: DrMcKay: Where is DartVader when you need him? [20:53] ixti: hmmm. why i can't use it then... [20:53] CIA-48: node: 03Ben Noordhuis 07 * r6b9f559 10/ tools/gyp/pylib/gyp/sun_tool.py : [20:53] CIA-48: node: gyp: work around sunos python flock() bug [20:53] CIA-48: node: flock(LOCK_EX) always fails with EBADF, use fcntl(F_SETLK) instead. - http://git.io/9ui_lQ [20:53] Aikar: ixti: node ver? [20:53] Aria: .oO(Dart? This looks a lot like Go.) [20:53] DrMcKay: CoverSlide: actually, I decided to do something productive today :P [20:54] ixti: Aikar: 0.4.11 [20:54] Aria: ixti: Are you putting global in a local scope? [20:54] CoverSlide: ok if dart has multiple return values and mandatory error checking, I'm gonna kill myself [20:54] pickels has joined the channel [20:54] ixti: ok. i'll better create gist [20:54] runvnc: I'm not that worried that I will have to learn Dart [20:54] Aikar: "mandatory error checking"? and why would you kill yourself over that [20:54] runvnc: I doubt anyone will be able to make me [20:54] Aria: Mandatory error checking is one of the B&D aspects of Java. [20:55] Aria: You have to explicitly delare that you throw or handle every exception of everything you call. [20:55] CoverSlide: same with Go [20:55] Aikar: so, me never coding java, can you explain what that is? do you mean type enforcement? [20:55] runvnc: especially after I revolutionize web application development with "The Cure" https://github.com/ithkuil/Cure (in case anyone didn't see the link the first time) [20:55] Aikar: cause dart has type enforcing, but its optional to use [20:55] Aria: Yeah, it's part of type enforcement of a sort. [20:56] ako has joined the channel [20:56] jaequery: dart is a piece of shit [20:56] CoverSlide: with Go, every function that may return an error must use that error variable in some way [20:56] Aria: Every function in Java must declare that it throws every possible exception that something it calls throws. Or it must handle it. [20:56] jaequery: oh wtf i didnt meant to write that, my hand just typed on it's own, wtf [20:56] Aikar: i didnt see anything like that with the glance i gave it this morning [20:56] avih has joined the channel [20:56] mikeal has joined the channel [20:57] Aikar: i really like the idea of OPTIONAL type enforcement. [20:57] runvnc: I am going to keep wining until someone says something about my thing or I get kicked out [20:57] runvnc: because I really have nothing better to do [20:57] runvnc: and realistically [20:57] fmeyer has joined the channel [20:57] runvnc: I never make friends on here [20:57] Aikar: lol runvnc, if you can make a drop in replacement for wordpress, more power to you [20:57] Aikar: but calling it "the cure" sounds a little odd [20:57] bnoordhuis: did someone say 'kick'? [20:57] runvnc: er drop in? [20:57] Aikar: lol [20:58] ixti: Aria: Aikar: DrMcKay: sorry seems like i'm missing something o_O [20:58] ixti: works in another sandbox... [20:58] jesusabdullah: Aikar: What, more cowbell? [20:58] runvnc: well I mean yeah sort of in some way although thats not the main idea [20:58] jesusabdullah: It's the only cure *I*'m aware of! [20:58] Aria: Interesting. Nothing assigns to global in your non-functioning code, does it? global = ? Or uses it as a function parameter name? [20:58] Renegade001 has left the channel [20:58] Aikar: ixti: [ Tyrial ] ---- [ 04:58 PM ] ---- [ aikar ] ---- [ /tmp ] [20:58] Aikar: >>> echo "global.foo = 3" > x.js [20:58] Aikar: [ Tyrial ] ---- [ 04:58 PM ] ---- [ aikar ] ---- [ /tmp ] [20:58] Aikar: >>> node [20:58] Aikar: > require('./x') [20:59] Aikar: {} [20:59] Aikar: > global.foo [20:59] Aikar: > [20:59] Aikar: something does seem off there [20:59] runvnc: oh the cure is a reference to that trolling that ted dickhead gave to ryan or whatever after his rant [20:59] bnoordhuis: next time gist it >:( [20:59] ixti: Aikar: seems like it's a problem of repl [21:00] lightcap has joined the channel [21:00] Aikar: ixti: is that where you tested too? [21:00] ixti: Aikar: yup. [21:00] Aikar: same in latest node also [21:00] ixti: then tried this one: https://gist.github.com/1276510 [21:00] ixti: when `node fry.js` - everything is ok [21:00] runvnc: well thanks for the feedback [21:01] Aikar: so open a bug on GH :P [21:01] ixti: when under o_O [21:01] ixti: now it's ok in repl too [21:01] Aikar: ? [21:01] ixti: seems like i'm going crazzy [21:01] runvnc: Different question: can you actually call it a startup if its just you and your website? [21:01] ixti: Aikar: ah.. no... [21:02] ixti: Aikar: it's a problem of REPL [21:02] bnoordhuis: runvnc: only if you brag about it on hacker news [21:02] ixti: yes... phew [21:02] ambroff_ has joined the channel [21:02] runvnc: lol [21:02] Aikar: runvnc: sure if you register your own legal company name [21:03] brianloveswords has joined the channel [21:03] Lingerance: Aikar: the REPL has different globals than the modules. That's why instanceof Function doesn't always work. [21:03] runvnc: hm ok aikar thanks [21:04] runvnc: bnoordhuis, as soon as I have a prototype I will try to post on hacker news [21:04] runvnc: actually no I am pretty sure they won't even let me post on that site [21:04] runvnc: You have to get a certain number of points or some crap [21:05] bnoordhuis: runvnc: karma points? oh, they're easy to rack up [21:05] runvnc: bnoordhuis, well.. not when I tell people what I really think. I guess I can lie though since its for a good cause [21:06] bnoordhuis: runvnc: not telling people what you really think is nearly always a good idea [21:06] bnoordhuis: until that time when the revolution comes, that is [21:06] davidbanham has joined the channel [21:07] runvnc: hmm.. that explains a lot bnoordhuis.. [21:08] errordeveloper: hm [21:08] konobi: tjholowaychuk: when did you remove your koala.js repo? [21:09] tjholowaychuk: konobi today [21:09] konobi: ah... heh [21:09] errordeveloper: I am doing this fs.watchFile(file, function(curr,prev) { if ( curr.mtime !== prev.mtime ) { Reader(); } }); [21:09] tjholowaychuk: konobi didn't think anyone was using it [21:09] tjholowaychuk: i wasnt [21:09] tjholowaychuk: haha [21:09] errordeveloper: and the Reader() function is being called all the time [21:09] tjholowaychuk: it could/should be done much better [21:09] konobi: tjholowaychuk: some sub-dependency of connect or something [21:10] tjholowaychuk: konobi ohhh [21:10] tjholowaychuk: ill remove that [21:10] errordeveloper: I do sys.inspect on {curr,prev}.mtime and they look the same .. [21:10] tjholowaychuk: it was for docs [21:10] errordeveloper: what's wrong here ? [21:10] tjholowaychuk: though it should be in npm anyway [21:11] errordeveloper: I am testing with `touch file` and `touch -a file` [21:11] runvnc: So what are the other node.js cms besides Calipso that are popular or matter [21:11] tjholowaychuk: runvnc we dont really have one [21:11] runvnc: I just googled and I see at least two other github projects [21:11] runvnc: so people don't like Calipso then [21:12] tjholowaychuk: i think most people just dont need content management [21:12] russfrank: https://github.com/joyent/node/wiki/modules#wiki-content-management [21:12] russfrank: runvnc: ^^ [21:12] runvnc: thanks russfrank [21:13] lz has left the channel [21:13] cafesofie has joined the channel [21:14] locksfree has joined the channel [21:14] jroes: if I have two js files that create a model, let's say for a User and a Role, and the User model uses the Role model in some way, how would I properly expose them to each other? would I just require Role.js in User.js? I'm concerned about constantly re-requiring things [21:14] Aria: Or their problems with content management systems are a lot like http://xkcd.com/927/ [21:14] Aria: (just s/standard/cms/) [21:15] m00p has joined the channel [21:15] runvnc: lol thats funny and true aria [21:15] Aria: jroes: requires are cached -- that's the normal way to do it. If you need to do something fancier, make a factory function, so you tell it what sort of thing you want and it gives you one. then everything can require THAT. [21:16] runvnc: well I will have to hack on this for a few more days at least .. not going to be able to stop myself.. [21:16] Aria: Hehe. I think a good CMS would be wonderful. [21:16] jroes: Aria: ah, cool. so then exposing it through some sort of global object is not the way to go. good to know [21:16] tbranyen: git is the best CMS [21:16] mikeal has joined the channel [21:16] Aria: Just realize that the pain points are usually installation and upgrades, not what language they're written in. [21:16] runvnc: Good point [21:16] Aria: tbranyen: It's terrible for collecting comments though. [21:17] runvnc: well my node package on the github install mongodb for you along with express etc and the mobile html5 boilerplate [21:17] Aria: Wordpress did a great job in one way: They figured out (late) loose coupling between components, making their plugins very powerful. [21:17] Aria: The downside is that plugins can wreck the whole thing. [21:18] runvnc: Plugins are the thing about wordpress that make me keep using it even though PHP [21:18] nerdy_ has joined the channel [21:18] tbranyen: Aria: i wouldn't consider comments, "content" [21:18] tbranyen: content is stuff i create [21:18] Aria: Hehe. Content is stuff people read ;-) [21:18] Aria: I often go some place for the comments. [21:18] piscisaureus_ has joined the channel [21:18] Aria: (and tend to ignore people who can't foster discussion) [21:19] runvnc: You mean wordpress comments? I have like two thousand comments on one of my sites [21:19] runvnc: 99.999% of them are link spam [21:19] Aphelion has joined the channel [21:19] Aria: Oh, no, wordpress is terrible for fostering discussion. [21:20] Aria: (though adding plugins to display comments as a tree and moderating aggressively helps) [21:20] runvnc: you're right the spam bots never talk to eachother aria [21:20] Aria: (so does enabling plugins that let people use twitter or other oauth providers as identity) [21:20] runvnc: I usually use akismet [21:20] Aria: As do i. [21:20] CIA-48: node: 03Ryan Dahl 07 * r2c25507 10/ (3 files in 2 dirs): [21:20] CIA-48: node: process.stderr goes through libuv now [21:20] CIA-48: node: This commit removes one assert from test-console.js in which we check that [21:20] CIA-48: node: process.stderr.write returns true. In the case of a dump to a file we cannot [21:20] CIA-48: node: guarantee this any longer now that it goes through fs.WriteStream. - http://git.io/xARg-A [21:21] fread2281 has joined the channel [21:23] DrMcKay has joined the channel [21:23] errordeveloper: any suggestion regarding my question on fs.watchFile ? [21:24] DrMcKay: errordeveloper: what was the question again? [21:25] CIA-48: node: 03Ryan Dahl 07 * r982b19d 10/ (lib/net_uv.js test/simple/test-listen-fd.js): Adjust listenFD deprecation message. Remove test. - http://git.io/zKQY5Q [21:26] fread228_ has joined the channel [21:26] fbartho: what do I need to specify in my wscript to include some JS files that have module.exports? [21:28] Frippe has joined the channel [21:28] CIA-48: node: 03Ryan Dahl 07 * rca4a0fc 10/ (2 files in 2 dirs): Remove test-child-process-channel.js - http://git.io/dxVnLg [21:31] fatblueduck has joined the channel [21:31] Frippe has joined the channel [21:31] errordeveloper: DrMcKay: I am trying to do this [21:32] errordeveloper: I am doing this fs.watchFile(file, function(curr,prev) { if ( curr.mtime !== prev.mtime ) { Reader(); } }); [21:32] fatblueduck: hey I've just install jslint with node and I can't remember how to make node packages easily available on the command line [21:32] tbranyen: npm init ? [21:32] isaacs: fatblueduck: install with -g [21:32] Wa has joined the channel [21:32] errordeveloper: DrMcKay: it apears that Reader() is called even if prev.mtime and prev.mtime are the same when I do sys.inspect [21:32] schwab has joined the channel [21:33] errordeveloper: I am testing it with `touch file` and `touch -a file` [21:35] DrMcKay: errordeveloper: curr.mtime.getTime() !== prev.mtime.getTime() [21:35] davidascher has joined the channel [21:35] mcluskydodallas has joined the channel [21:36] errordeveloper: DrMcKay: thanks!!! [21:37] DrMcKay: errordeveloper: :) [21:37] jackyyll has joined the channel [21:37] errordeveloper: yey, it works :) [21:38] don_jones has joined the channel [21:38] brianseeders has joined the channel [21:39] jackyyll: can someone help me with this code? http://pastie.org/private/ju39buqbird4scjfm7jiq [21:39] jackyyll: it is returning 404 everytime [21:39] jackyyll: but i can goto the url no problem in my browser, i don't understand. [21:40] sfoster has joined the channel [21:40] sarlalian has joined the channel [21:42] eignerchris has joined the channel [21:42] fread2281 has joined the channel [21:43] fread228_ has joined the channel [21:44] errordeveloper: https://github.com/errordeveloper/node/commit/d437ceb6383132b36cea61eb9c30b23ff14864db [21:44] errordeveloper: :) [21:45] DrMcKay: errordeveloper: great :) ! [21:47] Dreamer3 has joined the channel [21:48] mcluskydodallas has joined the channel [21:48] zackattack has joined the channel [21:48] neilk_ has joined the channel [21:49] CIA-48: node: 03Ryan Dahl 07 * r8c738fa 10/ lib/child_process_uv.js : [21:49] CIA-48: node: child_process.fork: don't overwrite env [21:49] CIA-48: node: thanks to Malte-Thorben Bruns for pointing this out - http://git.io/jrosOA [21:49] fread2281 has joined the channel [21:52] versicolor has joined the channel [21:53] fread228_ has joined the channel [21:54] Me1000 has joined the channel [21:56] MUILTFN has joined the channel [21:59] k1ttty has joined the channel [22:00] errordeveloper: any ideas - https://gist.github.com/1276696 [22:00] errordeveloper: ? [22:00] fread228_ has joined the channel [22:02] cjheath has joined the channel [22:02] bradleymeck: is there a way to run a script 'prepublish' for npm? [22:02] DrMcKay has joined the channel [22:02] isaacs: bradleymeck: you guessed it. [22:02] bradleymeck: its just not doc'ed [22:02] willwhite has joined the channel [22:02] bradleymeck: or nm [22:02] bradleymeck: looking at old man, move along [22:02] isaacs: bradleymeck: http://npmjs.org/doc/scripts.html [22:02] isaacs: it is [22:03] Aria: errordeveloper: Are you using the provided v8 there? [22:03] JaKWaC has joined the channel [22:03] nforgerit has joined the channel [22:03] sechrist: has anybody checked out that v8 hack to implement transparent multithreading [22:03] Aria: Looks interesting. [22:04] Aria: STM is kinda expensive, so it might not suit every workload. [22:04] bradleymeck: its interesting, but needs better transaction detection. [22:04] bradleymeck: agree aria [22:05] sechrist: however, pretty sure that if that v8 fork actually helps you scale [22:05] vidi has joined the channel [22:05] sechrist: your problem was parallizable from the beginning [22:05] sechrist: and you could do it application level [22:05] sechrist: parallelizable* sic [22:06] gplg has joined the channel [22:08] errordeveloper: Aria: oops, yeah it looks like it's being built agains gentoos v8 [22:08] Aria: Bingo. [22:08] Aria: node assumes tight coupling. System copy is fine if it's a compatible version. [22:08] Aria: Sounds like yours isn't [22:08] nforgerit has joined the channel [22:09] fread2281 has joined the channel [22:10] errordeveloper: Aria: sure.. hm, I'll see what's the best way to do it [22:10] errordeveloper: Aria: but certainly I _don't have to_ use in-tree copy of v8 ? [22:11] errordeveloper: what the difference actually ? [22:13] Aria: VErsion [22:15] bnoordhuis: errordeveloper: the bundled v8 is newer usually [22:15] Aria: Quite. The distro I help maintain has its v8 version driven by node. [22:16] Aria: When we update node, we update v8 ;-) [22:16] fread2281 has joined the channel [22:17] Aria: Since we control the ABI, we're okay issuing a rebuild for everything that depends on it, so we bump v8 more than stable node does. [22:17] Aria: But there's a reason node packs the versions it does. [22:18] piscisaureus has joined the channel [22:19] tylerstalder has joined the channel [22:19] topaxi has joined the channel [22:20] dgathright has joined the channel [22:20] errordeveloper: Aria: .. hm, I suppose I can try adding a USE flag in gentoo ebuild [22:20] Aria: Good call. Or update the v8 ebuild. [22:20] zemanel has joined the channel [22:20] AvianFlu_ has joined the channel [22:20] errordeveloper: i.e. 'builtin_v8' .. [22:20] Aria: Yeah. [22:20] Aria: Since it's a simple flag to (not) pass to node's build, it should be easy. [22:21] errordeveloper: Aria: ok, but it won't install a extra copy of v8 lib somewhere where other programs may pick it from ? [22:21] errordeveloper: i.e. it won't put in in /usr/lib/ [22:21] errordeveloper: ? [22:21] Aria: No. node links everything statically. [22:21] Aria: (much to my chagrin) [22:21] errordeveloper: kew [22:22] errordeveloper: kewl [22:22] errordeveloper: I'll work on that after I get some sleep [22:22] errordeveloper: :) [22:22] joshgillies has joined the channel [22:22] AphelionZ has joined the channel [22:23] AphelionZ: Does anybody here have experience with using jquery templates inside of Express? [22:23] fread2281 has joined the channel [22:24] runvnc: Do you guys know how npm figures out where to look for dependencies to install? Can I tell npm to look in a certain directory for subfolders with npm packages that can be installed if they are needed by another package [22:24] runvnc: its like npm -d install [22:24] neilk_ has joined the channel [22:25] runvnc: I know it can go to the main repo or whatever and get normal package dependencies, but how do I make it look in the local file system for some packages [22:25] isaacs: runvnc: you cannot list a folder as a dependency, no [22:25] Aria: No, it runs its own registry. You can however use npm link packagename to link in a package that you've installed globally [22:25] isaacs: runvnc: you can, however run: npm link ../some-folder [22:25] isaacs: runvnc: then that'll create a symbolic link, and `npm install` will skip that one [22:26] isaacs: runvnc: or, what Aria said. [22:26] isaacs: :) [22:26] runvnc: hm thanks guys [22:26] runvnc: what I was trying to do though was like a plugin system [22:26] runvnc: so its like the packages can be in files in plugins say like plugins/defaultdb [22:27] runvnc: then another package needs defaultdb.. to start installing that package I was going to go into that other package's folder, say defaultcomponent, and run npm -d install [22:27] replore has joined the channel [22:27] replore_ has joined the channel [22:27] ako has joined the channel [22:27] runvnc: then I list this other package as a depdency.. which is just in another folder.. so you guys are saying there is no way to do that [22:27] isaacs: runvnc: you know that "-d" just means "debug", right? [22:27] fread228_ has joined the channel [22:27] runvnc: now I know lol [22:27] isaacs: runvnc: you keep putting that there, you may as well just do `npm config set loglevel info` to make it the default [22:28] runvnc: I thought there was a switch to make it install depdencies [22:28] isaacs: runvnc: -dd is more debugging, and -ddd is even more. [22:28] runvnc: dependencies [22:28] jamescarr has joined the channel [22:28] isaacs: runvnc: nope [22:28] Aria: Nope. It just always does that. [22:28] isaacs: runvnc: that's what npm install does [22:28] runvnc: ok [22:28] jamescarr: heh, my co-worker installed node and npm for the first time today [22:29] runvnc: well I dont think I can use the link think because the idea is the dependencies aren't actually installed yet [22:29] runvnc: thing [22:29] jamescarr: he said he was upset that npmjs.org told him not to run npm as root, then the first thing he did he had to run as sudo [22:29] jamescarr: :) [22:29] runvnc: maybe there is a way to tell it I have my own registry [22:29] mraleph has joined the channel [22:30] Aria: There is. [22:30] hotch has joined the channel [22:30] Aria: But it sounds like you're making things complicated. [22:30] runvnc: the modules stuff didn't work right when I tried to run as root [22:30] jamescarr: I told him just to change the mode, I guess he searched the code and found a prefix [22:30] jamescarr: runvnc, yeah, you shouldnt run them as root [22:30] Tprice: hey can you call httpProxy.proxyWebSocketRequest the same as httpProxy.proxyRequest where you pass in the port and host? [22:31] Aria: I think so. [22:31] AphelionZ: does anybody know how to use jqtpl on the backend but also use jquery templates on the front end as well? All my client side variables are getting overwritten like ${username} [22:31] Dreamer3 has joined the channel [22:31] isaacs: it's perfectly fine to run npm commands as root. [22:32] isaacs: npm will do the right hting now, and downgrade to "nobody" (or the --user config) when running package scripts. [22:32] isaacs: jamescarr: ^ [22:32] runvnc: oh ok [22:32] mbrevoort has joined the channel [22:32] runvnc: so is the new version stable then [22:32] runvnc: because I was on some .4 or something because it said stable [22:32] isaacs: runvnc: as stable as npm has ever been :) [22:32] Tprice: Aria: or would that routing happen before the upgrade request [22:32] jamescarr: isaacs, oh? [22:32] runvnc: and the newer one said unstable [22:32] isaacs: runvnc: new version of node or npm? [22:32] isaacs: runvnc: oh, yeah, node 0.4.12 is the latest stable version. [22:33] runvnc: oh I am getting those two confused sorry [22:33] jamescarr: dammit [22:33] isaacs: jamescarr: yeah. [22:33] jamescarr: it's been along time since I installed npm [22:33] isaacs: jamescarr: running as root is actually safer. [22:33] jamescarr: the install script? [22:33] lmorchard has joined the channel [22:33] isaacs: jamescarr: well, i mean, if you're going to run THAT as root, you should probably just download the script, inspect it, and then run as root [22:35] thirtysi_ has joined the channel [22:35] jamescarr: isaacs, hmmm... forgive me, it's been awhile. I installed npm, made /usr/local/lib/node_modules owned my user, yet when I try to npm install something I get... [22:35] jamescarr: npm ERR! Error: EACCES, Permission denied '../lib/node_modules/coffee-script/bin/coffee' [22:35] Daegalus: Hmmmm, Dart looks exteremely promising. I am liking what I see so far. Has anyone made a node-dart yet? [22:35] norviller has joined the channel [22:35] Aria: No. [22:35] isaacs: jamescarr: also need to chown /usr/local/bin [22:35] isaacs: if that's the path you're going down [22:35] jamescarr: ah [22:36] isaacs: jamescarr: or just run as root [22:36] jamescarr: no wai :) [22:36] isaacs: jamescarr: listen, if you don't run npm with root privileges, how am i going to pwn your machine? [22:36] jamescarr: my deploy script will be doing an npm install of the package.json in my app :) [22:36] isaacs: help me out here. [22:36] jamescarr: hehehe [22:36] isaacs: ;) [22:37] isaacs: if you are running npm install locally, then you don't need root privileges. [22:37] isaacs: but you *do* need to be able to write to and read from all the folders in there. [22:37] jamescarr: ah I got it... I F'd up when doing a chown [22:37] TheJH: isaacs, just write a script that attempts sudo. if sudo needs a password, modify all shells RAM data to log the password the next time sudo gets used [22:37] jamescarr: I thought maybe something had changed recently :) [22:37] isaacs: TheJH: hahah [22:38] TheJH: isaacs, that's why I think just running npm as root isn't more dangerous than running it as a sudoer [22:38] iammerrick has joined the channel [22:39] isaacs: no, if you're a sudoer, and use sudo ever, then you're just as exposed as if you were root initially. [22:39] AvianFlu_ has joined the channel [22:39] isaacs: the security advantage of being a sudoer vs being root is *accidetnally* doing something destructive. [22:39] isaacs: it's a sandbox, not a prison. [22:39] TheJH: hmm, true [22:40] TheJH: like the vm module [22:40] isaacs: i've stepped on some stuff as root before. no questions asked, no net. [22:40] isaacs: yeah. [22:40] TheJH: isaacs, we need selinux rules for npm :) [22:40] isaacs: or pfexec rules [22:41] Aria: That too. [22:42] TheJH: isaacs, btw, the npm version bump was because of better windows support, right? how far is it at the moment? does it work? [22:42] runvnc: Is there a node package that install a private registry (i.e. couchdb instance which is just like the regular node registry) [22:42] runvnc: er installs [22:43] [[zz]] has joined the channel [22:45] devinus has joined the channel [22:46] ninjapig has joined the channel [22:48] cjm has joined the channel [22:48] mike5w3c_ has joined the channel [22:49] DrMcKay has joined the channel [22:50] zpao has joined the channel [22:52] jamescarr: silly question... is there something like capistrano for node.js? [22:52] fbartho: How do I make JS files get packaged with a module in addition to it's native addon? [22:53] tjholowaychuk: jamescarr https://github.com/visionmedia/deploy [22:53] tjholowaychuk: i have that [22:53] tjholowaychuk: but it's just bash [22:53] k1ttty has joined the channel [22:54] hdon- has joined the channel [22:55] davidbanham has joined the channel [22:56] isaacs: runvnc: npm help registry [22:56] isaacs: runvnc: it's not an npm install, but it is a git repo, and you have to install couchdb first [22:56] guidocalvano has joined the channel [22:56] isaacs: TheJH: yes, windows support starts at 1.0.90 [22:57] isaacs: TheJH: and will be declared "ready" in 1.1.0 [22:57] mattpodwysocki has joined the channel [22:57] dob_: hi, i have some strange error. I added now.js to my server process and to my jade template.Now i receive this in my chrome console: Uncaught TypeError: Object # has no method 'search' [22:58] runvnc: thanks isaacs [22:59] dynacker: party on [23:02] warreng has left the channel [23:04] norviller_ has joined the channel [23:09] iammerri_ has joined the channel [23:09] norviller_ has joined the channel [23:10] norviller_ has joined the channel [23:13] enmand has joined the channel [23:15] tizzo-afk has joined the channel [23:17] deanc[work] has joined the channel [23:17] nerdy_ has joined the channel [23:18] BillyBreen has joined the channel [23:21] c4milo has joined the channel [23:26] secoif has joined the channel [23:27] bradleymeck has joined the channel [23:27] vidi has joined the channel [23:28] fbartho has joined the channel [23:29] Sorella has joined the channel [23:29] sfoster has left the channel [23:30] errordeveloper: with `--prof` argument node produces v8.log, is there any fancy tool that can take this log and display it nicely ? [23:30] errordeveloper: so gui analyser .. [23:31] hotch has joined the channel [23:32] reid has joined the channel [23:32] Astro: errordeveloper: webkit inspector? [23:33] Nuck: I hate emails :I [23:33] Nuck: (the protocol, not the concept) [23:34] Nuck: Mor specifically, I hate MTAs [23:36] errordeveloper: Astro: hm .. can I use the one in chromium ? [23:36] RORgasm has joined the channel [23:36] natebeck has joined the channel [23:40] errordeveloper: Astro: ok, I found this - https://github.com/dannycoates/node-inspector [23:40] isaacs: SubStack: bouncy should really inject x-forwarded-for by default. [23:40] bnoordhuis: errordeveloper: https://github.com/bnoordhuis/node-profiler/blob/nprof/nprof <- that's all a Real Man should ever need [23:40] isaacs: SubStack: also: you'll need to handle proxy authorization. [23:42] JaKWaC has joined the channel [23:43] JaKWaC has joined the channel [23:45] caolanm has joined the channel [23:47] SubStack: isaacs: I made it so that the cli tool puts it in [23:47] SubStack: not sure that it should be a default though since it would be hard to remove that [23:47] softdrink has joined the channel [23:47] isaacs: there are roughly zero cases where you're behind a proxy, and *don't* want to see the x-forwarded-for header. [23:48] isaacs: SubStack: also: x-forwarded-port and x-forwarded-proto [23:48] isaacs: super important. [23:48] SubStack: easy to add! [23:49] SubStack: oh [23:49] isaacs: x-forwarded-proto is a bit less standard. [23:49] SubStack: thinking about how overriding those would work though [23:50] isaacs: i think bouncy would be within its rights to say that you can't override those. [23:50] isaacs: or that you have to do some weird non-standard thing to do so [23:50] SubStack: well you could just set them to falsy values in the opts.headers [23:50] DennisRasmussen has joined the channel [23:50] isaacs: bouncy({ dontAddCorrectHeadersBecauseIPreferBrokenThings: true }, ... ) [23:50] SubStack: haha [23:51] isaacs: srsly [23:51] isaacs: *no one* will want to override those. [23:53] errordeveloper: bnoordhuis: thanks :) [23:54] gxdssoft has joined the channel [23:56] darkf has joined the channel [23:56] dreamdust has left the channel [23:56] darkf: hi, I get node.js:207 throw e; // process.nextTick error, or 'error' event on first tick [23:56] stuf has joined the channel [23:56] aakour has joined the channel [23:57] Andeye has joined the channel [23:58] wereHamster: does node cache files it loads through require()? Will I run out of memory if I require new files over and over again? [23:58] tbranyen: it caches [23:58] tbranyen: in require.cache [23:58] wereHamster: can I force it to release files it no longer needs? [23:58] piscisaureus_ has joined the channel [23:58] kernelpa`: quit [23:58] topaxi has joined the channel [23:58] fread2281 has joined the channel [23:59] maletor has joined the channel [23:59] darkf: I get "node.js:207 throw e; // process.nextTick error, or 'error' event on first tick" using the Windows binary with http.createServer, what's wrong here? [23:59] replore_ has joined the channel [23:59] replore has joined the channel