[18:19] nodelog has joined the channel
[18:19] `3rdEden: cincinnatus are they disconnected within 20 seconds?
[18:19] Shinuza: deanlandolt1: unlikely
[18:20] jerrysv: isolates look nice. i think i remember ryan or someone quickly glossing over them at nodeconf
[18:20] ale_ has joined the channel
[18:20] cincinnatus: `3rdEden: no, it's not specifically 20 seconds.
[18:20] christopherdebee: hi, i dont mean to spam, but can anyone point me in the right direction for "node_coffee" google isnt being helpful, all i find is a hello-world.coffee, but not "node_coffee" to run it... ?
[18:20] ale_: hello, I have var createServer = require("http").createServer; but I get require is not defined..why can this be?!
[18:21] cincinnatus: `3rdEden: it's usually in the ballpark though. what were you thinking of?
[18:21] Tidwell has joined the channel
[18:21] luisloaiza has joined the channel
[18:21] luisloaiza: hi
[18:22] ale_: please, someone? I can't even start working because of this! I am running Linux Mint Julia
[18:22] luisloaiza: how you guys handle errors
[18:22] luisloaiza: in nodejs
[18:22] luisloaiza: to make the server stable
[18:23] luisloaiza: because some errors just drops down the server
[18:23] hasenj has joined the channel
[18:24] cagdas has joined the channel
[18:24] masylum: there are some options for that
[18:24] luisloaiza: im using express
[18:24] masylum: you ca use monit, forever, cluster..
[18:24] mikegerwitz: luisloaiza: If you know something is able to throw an error, even if you don't think it ever will, handle it. try/catch, .on( 'error' ), etc. Otherwise, process.on( 'uncaughtException' )
[18:24] masylum: exactly
[18:24] ezl- has joined the channel
[18:24] ale_: please guys!
[18:25] masylum: please!
[18:25] coreb has joined the channel
[18:25] mikegerwitz: ale_: How are you running it?
[18:25] mikegerwitz: ale_: I have a meeting in a few min though, so I can't stay for long
[18:25] ale_: I enter toa url
[18:25] xerox: anybody has an node.js example of calling a json api ?
[18:25] ale_: to an url*
[18:25] ale_: i mean
[18:25] mikegerwitz: ale_: eh?
[18:26] ale_: Because I want to run nodejs on web
[18:26] ale_: not on console
[18:26] mikegerwitz: ale_: Are you running it using node, or trying to run it in your web browser?
[18:26] xerox: that is, http.get()-ing some other site's exposed json api
[18:26] ale_: in my web browser?
[18:26] masylum: nodejs is server side
[18:26] mikegerwitz: ale_: Are you running: node yourfile.js?
[18:26] ale_: But how can I run that from web?
[18:26] masylum: what you mean from web?
[18:26] mikegerwitz: ale_: http://nodejs.org/ there's an example on the homepage
[18:27] christopherdebee: yah
[18:27] ale_: But I have to make node blabla.js
[18:27] ale_: from the console
[18:27] matty has joined the channel
[18:27] lukstr: that is how you run node
[18:27] mikegerwitz: ale_: You run it from the console, yes.
[18:27] masylum: xerox, take a look at https://github.com/mikeal/request
[18:27] christopherdebee: console or terminal?
[18:27] ale_: mikegerwitz: And how does the chat works?
[18:27] ale_: mikegerwitz: The chat of nodejs
[18:28] christopherdebee: console = clientside, terminal = serverside
[18:28] mikegerwitz: ale_: Do you understand how web requests work? How a web browser communicates with a server/
[18:28] mikegerwitz: ?*
[18:28] m00p has joined the channel
[18:28] ale_: mikegerwitz: Yes
[18:28] tbranyen: christopherdebee: console and terminal are interchangeable by some people
[18:28] mikegerwitz: ale_: Node acts as the webserver
[18:28] mikegerwitz: ale_: in this case, at least
[18:28] christopherdebee: yeah but if someones asking how they use node on the web, it could help to differenciate
[18:29] mikegerwitz: ale_: https://github.com/ry/node_chat
[18:30] ale_: Yes
[18:30] Venom_X: ale_, follow the instructions
[18:30] chunhao: node isn't meant to be run in the browser
[18:30] ale_: mikegerwitz: So how should I install node's chat?
[18:30] xerox: masylum: uhm
[18:30] christopherdebee: something makes me think ale_ is trying to run node on the clientside #justsaying
[18:30] mikegerwitz: ale_: I have to take off. Read the example on the front page. You're misunderstanding how node is used.
[18:31] zmbmartin: tjholowaychuk: I have a middleware that res.redirects based on the req.headers.host the redirect works fine but in console I see these errors --> Error: Can't use mutable header APIs after sent. --> Error: Can't set headers after they are sent.
[18:31] mikegerwitz: homepage*
[18:31] Venom_X: go read ale_, there are even video tutorials
[18:31] xerox: masylum: that is neat, do you know why there is no body of the request in this example http://nodejs.org/docs/v0.4.8/api/http.html#http.get ?
[18:31] ale_: Venom_X: can you show me some please?
[18:32] tjholowaychuk: zmbmartin can i see the code
[18:32] tjholowaychuk: that's nodes way of telling you the header is written already
[18:32] rfay has joined the channel
[18:32] kmiyashiro has joined the channel
[18:32] christopherdebee: does anyone here know of/use "node_coffee" ?
[18:32] CoverSlide has joined the channel
[18:33] yozgrahame has joined the channel
[18:33] zmbmartin: tjholowaychuk: here is the middleware snippet --> https://gist.github.com/1017403
[18:34] tjholowaychuk: you're next()ing regardless of the redirect
[18:34] Venom_X: ale_, http://lmgtfy.com/?q=node.js+video+tutorial
[18:34] hosh_work has joined the channel
[18:34] christopherdebee: zmbmartin: if you dont post the gist as anon, then we can comment on it
[18:35] christopherdebee: :)
[18:35] zmbmartin: christopherdebee: ok sorry ;)
[18:35] zmbmartin: tjholowaychuk: so it should be else { next() }
[18:35] tjholowaychuk: yea
[18:35] zmbmartin: my bad thanks
[18:35] masylum: xerox when you do a get request you don't need a body
[18:36] rpj8: as usual, thank you all
[18:36] ale_: Venom_X: fine, I got it working the chat, but I don't understand how node.js made it possible to access http://chat.nodejs.org/ and there have the chat, instead of accessing http://nodejs.org:8001 for example!
[18:36] Tidwell: anyone familiar with this error? http://pastebin.com/zE1upA4G
[18:37] CoverSlide: it means list is not defined
[18:37] xerox: masylum: I don't mean to *get* a request, but to *do* a GET request on a site, and get back the body
[18:37] Tidwell: CoverSlide: well sure, but its not any of my code - its something internal to node
[18:38] CoverSlide: Tidwell: probly write the calling function
[18:38] CoverSlide: er paste i mean
[18:38] masylum: xerox, you don't have to send a body, but you get a callback with a response object
[18:38] xerox: masylum: that is perfect, and it is what I am doing. what I don't understand is how to get the response body out of the response object
[18:38] jobelenus has joined the channel
[18:38] jobelenus has left the channel
[18:38] ale_: Venom_X: do you get me?
[18:39] Tidwell: CoverSlide: it only happens when ive got hanging clients trying to reconnect via socket.io while the server is restarting the node process
[18:39] devrim has joined the channel
[18:39] jobelenus has joined the channel
[18:39] masylum: xerox, response is a writable stream, it events data as it comes
[18:39] masylum: http://nodejs.org/docs/v0.4.8/api/http.html#http.ClientResponse
[18:39] Venom_X: ale_, no you make no sense. I think you're too far behind the curve to begin asking questions here. Go read more
[18:40] erictj has joined the channel
[18:40] xerox: ah
[18:40] xerox: ACTION looks up streams
[18:40] JJMalina has joined the channel
[18:40] masylum: try it, but is easier to start with mikeals request module
[18:40] christopherdebee: ale_ : have you got a hello world example working before trying harder projects?
[18:40] xerox: masylum: I think you're quite right
[18:40] xerox: npm installing it now : )
[18:41] jobelenus: hey, im curious about Node and how it stores things/memory usage, etc... I am thinking of using it as a caching/middle layer... in a normal world, i'd just have a cron job populate something in memcached, and have http requests fetch out of memcached... does Node keep things in working memory like memcached? is there a limit? (anything I'm missing)
[18:41] masylum: xerox, anyway, I recommend you to learn how streams work :)
[18:41] xerox: I will!
[18:43] christopherdebee: is anyone here able to answer a no.de specific question ?
[18:43] jerrysv: jobelenus: 1.7gb
[18:43] tomtomaso has joined the channel
[18:43] jerrysv: jobelenus: but v8 gc would slow it down a bit with a large amount of memory and a large number of entries, so node may not by your best bet
[18:44] Shinuza has joined the channel
[18:44] jobelenus: jerrysv: luckily the number of entries is not long, and very controlled... I was only thinking of node.js b/c of the way it can scale
[18:44] eric_f has joined the channel
[18:44] `3rdEden: V8 has limit of 1.7gb but you can just raw C++ stuff that stores a shitload of data in memory and doesn't use the V8 heap
[18:45] jerrysv: `3rdEden: true, i'm doing that with my judy arrays, and it does have quite an improvement compared to native storage
[18:45] knuthy has joined the channel
[18:46] jobelenus: the non-blocking is what i wanted to take advantage of.... and was hoping I wouldn't have to add something to keep things alive in memory (since, afaik, a server instance really is just a never ending loop, so variables don't go away)...
[18:46] jobelenus: or am i being way too naive here?
[18:46] gwtprg has joined the channel
[18:46] adambeynon has joined the channel
[18:47] jobelenus: basically looking for in memory persistence across requests
[18:47] jerrysv: jobelenus: it's extremely alpha, but: https://github.com/JerrySievert/node-judy
[18:47] baudehlo: jobelenus: it depends whether you ever use cluster or not.
[18:47] jobelenus: jerrysv: heh, the name looks familiar
[18:47] jobelenus: baudehlo: one server
[18:48] baudehlo: cluster is for one server
[18:48] baudehlo: I mean the node module, not "a cluster of servers"
[18:48] knuthy: One little question, I have a "var config = require('config.js')" in app.js, and in an other file that is required by app.js I try to use this config variable but it says that it's undefined. When I take off the "var" it works
[18:49] eric_f: So [trying] to use a http://no.de smart machine, my pushed failed and was rolled back, so now when I try to push "everything is up to date", I npm installed the dependency, how am I suppose to roll the new version?
[18:49] jerrysv: jobelenus: familiar how?
[18:49] djcoin has joined the channel
[18:49] jobelenus: jerrysv: its yours :P
[18:49] jobelenus: baudehlo: why would a server manager alter persistence across requests?
[18:50] jerrysv: jobelenus: aha, yes. but it's an example of persistent in memory storage avoiding the pains of v8 and managing it natively
[18:50] jobelenus: jerrysv: sounds awesome...
[18:50] baudehlo: jobelenus: because you can't guarantee that the next request is coming to the same process if you use cluster.
[18:50] jobelenus: baudehlo: i see
[18:50] tjholowaychuk: nor should you
[18:50] tjholowaychuk: that's bad design
[18:50] baudehlo: indeed.
[18:50] jerrysv: which is why a secondary storage may be a better idea
[18:51] baudehlo: yet people get excited by node and this "feature"
[18:51] jobelenus: heh
[18:51] baudehlo: All the time.
[18:51] jerrysv: memcache it, then do a request from node
[18:51] baudehlo: I find myself constantly reminding people Don't Do That.
[18:51] jobelenus: well, afaik (and feel free to correct me), each request *is* a separate process?
[18:51] jerrysv: baudehlo: i think that's where this conversation started :)
[18:51] tjholowaychuk: jobelenus nope
[18:51] galaxywatcher has joined the channel
[18:52] jobelenus: jerrysv: baudehlo right, i was hoping to *not* install another piece of software.. b/c i could easily put memcache into current stack...
[18:52] gwtprg has left the channel
[18:52] baudehlo: jobelenus: yeah, I mean it's fine as a cache.
[18:52] matjas has joined the channel
[18:52] jobelenus: tjholowaychuk: there can't only ever be 1 Node process though?
[18:53] jerrysv: highlander-node
[18:53] cl0udy: guys...whats the best node.js book at the moment?
[18:53] tjholowaychuk: sure there can be
[18:53] tjholowaychuk: why not?
[18:53] galaxywatcher has joined the channel
[18:53] tjholowaychuk: but you shouldn't depend on it
[18:53] CoverSlide: .. undefined = 1
[18:53] Calvin: 131
[18:53] CoverSlide: .. undefined
[18:53] Calvin: 14undefined
[18:53] jerrysv: cl0udy: hands on node.js ?
[18:53] baudehlo: here's a little max-sized cache module that could be useful http://www.monsur.com/projects/jscache/downloads/cache.js
[18:53] jobelenus: tjholowaychuk: wasn't a theoretical, was a "well the server must start another process under *some* conditions" - or are they entirely up to me
[18:54] Skola: cl0udy I find http://ofps.oreilly.com/titles/9781449398583/index.html quite nice
[18:54] tjholowaychuk: up to you
[18:54] tjholowaychuk: which is where cluster comes into play for management
[18:54] mahna has joined the channel
[18:54] cl0udy: thanks guys
[18:54] jobelenus: a cache *is* essentially what I want - but I was hoping to get a cache through Node along with the non-blocking nature (and learn about Node)
[18:54] jobelenus: tjholowaychuk: so, the default deployment of Node will only be one process until I create more? interesting
[18:54] tjholowaychuk: yeah, node is not opinionated in how you deploy
[18:54] baudehlo: if a cache is all you want then yeah, just store it in local memory
[18:55] jobelenus: baudehlo: hence my questions about how Node stores things in memory
[18:55] baudehlo: right.
[18:55] baudehlo: by default it's one process.
[18:56] baudehlo: so you could even have a multi-level cache...
[18:56] baudehlo: hmm
[18:56] baudehlo: I should write a module for that.
[18:56] jobelenus: so it sounds like, by default, everything should reside in one process, and all the variables/storage within that process is available to all requests - without me actually having to any extra work?
[18:56] jerrysv: baudehlo: i built a store and forward in memory cache at one point
[18:56] jerrysv: should release it on github at some point
[18:56] baudehlo: yeah...
[18:57] baudehlo: so basically something fixed size, like that link I posted...
[18:57] baudehlo: but when you get(), if it's not in memory, look in memcached.
[18:57] baudehlo: or redis or whatever
[18:57] baudehlo: and have a callback(err, value) with err set if not found.
[18:57] jobelenus: so my questions is - why would it *not* be in memory if i've assigned it (just trying to understand the internals)
[18:58] baudehlo: jobelenus: no reason I can think of.
[18:58] baudehlo: assuming you're talking the same process and you haven't restarted it.
[18:58] Skola has joined the channel
[18:58] jobelenus: ok
[18:59] jobelenus: awesome guys, thanks
[18:59] gkmngrgn has joined the channel
[19:00] khrome has joined the channel
[19:00] jhurliman has joined the channel
[19:00] Marak: my new thing is making a separate process for every piece of functionality, 1000 process app, sure why not
[19:00] erictj: @marak sounds like Erlang ;)
[19:00] jerrysv: marak: super scaleable
[19:00] jerrysv: across a 1000 core machine
[19:01] Marak: jerrysv: can't tell if you are being sarcastic or not, but i think it is! :-)
[19:01] Vertice has joined the channel
[19:01] Marak: jerrysv: who said its the same machine?
[19:01] jerrysv: marak: i have no sense of humor. so, like NUMA?
[19:01] `3rdEden: SOA huh
[19:01] Marak: dont know NUMA
[19:01] Marak: but yes `3rdEden super SOA
[19:01] jerrysv: non-uniform-memory-access
[19:01] baudehlo: jerrysv: in your blog post about judy arrays, why on the graphs is bigger better? I would have thought measuring time would be more obvious.
[19:01] liar has joined the channel
[19:01] Marak: im about to release a new lib
[19:01] `3rdEden: SOA is always ftw
[19:02] Marak: `3rdEden: unless you try doing it in Rails
[19:02] Marak: `3rdEden: I've seen such a RoR SOA clusterfuck, seriously
[19:02] Marak: worst race conditions ever
[19:02] c4milo: :s
[19:02] `3rdEden: XD
[19:02] Marak: lets get 10 resque queues going on across 4 services, surely they will keep in sync
[19:02] devinus has left the channel
[19:02] jerrysv: baudehlo: yeah, that's kind of confusing unless you run the benchmarks yourself i guess
[19:03] `3rdEden: rails was not designed for such thing
[19:03] Marak: ohh what do you mean we have race conditions? whats concurrency?
[19:03] jerrysv: marak: back in the day, it was essentially a cluster when you went to 8+ cpu's
[19:03] jhurliman: hij1nx, you around? trying to get sugarskull to work with hashbang urls (/#!/...) without much luck
[19:03] xerox: anybody knows of a service to play with json apis that makes you choose urls/params and pretty prints the results?
[19:03] Marak: jhurliman: he idles in #nodejitsu too
[19:03] Marak: xerox: yeah, i forgot the name though
[19:03] jerrysv: baudehlo: bigger is better in that case as a larger number of iterations are being run in the same time period
[19:03] pigmej has joined the channel
[19:04] baudehlo: gotcha
[19:04] xerox: Marak: oh hello, hmm I am sure I saw it sometime in the past too
[19:04] baudehlo: I should just look at the code.
[19:04] `3rdEden: oh
[19:04] `3rdEden: xerox HURL?
[19:04] jerrysv: baudehlo: and the deletes kill you, since you can't just rely on v8 gc
[19:04] baudehlo: I assume the overhead is new Judy() then not arr.get or arr.set?
[19:04] matyr has joined the channel
[19:04] xerox: `3rdEden: lets see
[19:04] jerrysv: a little there, and a little in the memcpy's that i'm doing. i know those can be optimized, i just haven't had the dedicated time
[19:04] `3rdEden: http://hurl.it/
[19:05] vipaca has joined the channel
[19:05] vipaca has joined the channel
[19:05] `3rdEden: no
[19:05] `3rdEden: wait
[19:05] `3rdEden: thats no tit :9
[19:05] baudehlo: jerrysv: by doing a pool malloc type thing?
[19:05] `3rdEden: nvm lol
[19:05] baudehlo: instead of malloc for each item?
[19:05] jerrysv: baudehlo: either that, or by smarter creation of the Buffer
[19:05] xerox: :|
[19:06] jerrysv: bnoordhuis pointed me here: https://github.com/bnoordhuis/node-iconv/blob/master/iconv.cc
[19:06] jomoho has joined the channel
[19:06] Skola_ has joined the channel
[19:06] jerrysv: would probably save me a malloc() and memcpy(). trying to not implement my own malloc scheme if i can help it :)
[19:06] jeedey has joined the channel
[19:06] viz has joined the channel
[19:06] devrim has joined the channel
[19:07] wilken has joined the channel
[19:07] ph^ has joined the channel
[19:07] ph^ has joined the channel
[19:07] RC1140 has joined the channel
[19:08] zeade has joined the channel
[19:08] jerrysv: ACTION has shudder memories still of doing that on the amiga
[19:10] baudehlo: hah, another ex amiga coder eh?
[19:10] sveimac has joined the channel
[19:10] springify has joined the channel
[19:11] febits has joined the channel
[19:13] baudehlo: to be honest most mallocs do a pool alloc anyway these days.
[19:13] jeedey: how can you bind to a specific ip when you call .listen() on an object?
[19:13] baudehlo: recently plain malloc in perl is as fast as usemymalloc.
[19:13] baudehlo: on Linux anyway
[19:14] baudehlo: jeedey: server.listen(port, ip)
[19:14] Bj_o_rn has joined the channel
[19:14] jerrysv: baudehlo: mostly i wanted to run the mud i was working on locally
[19:15] baudehlo: on your amiga?
[19:15] jerrysv: it was running on unix externally, but locally on my amiga for local development
[19:15] knuthy: One little question, I have a "var config = require('config.js')" in app.js, and in an other file that is required by app.js I try to use this config variable but it says that it's undefined. When I take off the "var" it works
[19:18] baudehlo: knuthy: sounds environment specific. What is this in?
[19:18] mscdex_ has joined the channel
[19:18] pkarl has joined the channel
[19:19] knuthy: Express
[19:20] knuthy: baudehlo: I have a controller in controllers/post.js , inside app.js I have "var config = require('config');" then I load the controllers. in post.js it's not defined
[19:20] baudehlo: I know nothing about express.
[19:20] knuthy: and once I take off "var" from the definition of config, it works
[19:20] neshaug has joined the channel
[19:21] knuthy: either I didn't understand something in Javascript, or dunno
[19:21] konobi: ryah: about?
[19:21] tyler-iphone has joined the channel
[19:21] mr-black has joined the channel
[19:21] hosh_work has joined the channel
[19:22] MooGoo: if you leave off var
[19:22] MooGoo: config is global
[19:23] sooli has joined the channel
[19:23] kmiyashiro: yeah
[19:23] sooli has left the channel
[19:23] kmiyashiro: you'd have to require config inside post.js as well
[19:24] MooGoo: nothing nesecarily wrong with using a global
[19:24] bentruyman has joined the channel
[19:25] CoverSlide: nothing necessaril right with it either
[19:26] MooGoo: config is probably a bad name for a global variable tho
[19:27] briznad has joined the channel
[19:27] tjholowaychuk: knuthy why not use the built in config stuff like app.set('something', val) ?
[19:29] petrjanda has joined the channel
[19:30] MrTopf has joined the channel
[19:32] dmcquay has joined the channel
[19:34] dmcquay_ has joined the channel
[19:36] kersny has joined the channel
[19:36] JJMalina has joined the channel
[19:37] hellp has joined the channel
[19:38] indexzero has joined the channel
[19:39] tahu has joined the channel
[19:39] niles|iPod has joined the channel
[19:39] dyer has joined the channel
[19:39] dyer has joined the channel
[19:40] chbrown has joined the channel
[19:40] tdom has joined the channel
[19:41] knuthy: tjholowaychuk: going to try that. Thanks :)
[19:41] Skola_: nowadays what "sharing" options are useful for a programming blog?
[19:41] vipaca has joined the channel
[19:41] vipaca has joined the channel
[19:43] tdom: just read a tutorial on backbone.js http://arturadib.github.com/hello-backbonejs/ , anybody using it?
[19:44] tbranyen: lets say you have two events one that triggers inside another ie, on('commit', function(tree) { tree.on('entry', function() { }) }) like that and they both have end events to signify they've ended, i need to ensure that the latest tree end has triggered and that the commit end triggered before continuing
[19:44] tbranyen: this seems like a rather complex issue
[19:44] tbranyen: i think i can maintain state variables myself
[19:44] tbranyen: but its so dirty
[19:45] niles|iPod has joined the channel
[19:46] cce has joined the channel
[19:46] cce has joined the channel
[19:46] lukstr: tbranyen: semaphore?
[19:47] tbranyen: lukstr: right but i'd have to maintain that myself :-/
[19:47] JJMalina has joined the channel
[19:47] tbranyen: those async libs don't really seem made for events like this
[19:47] lukstr: tbranyen: I don't see how else you could possible manage that
[19:47] tbranyen: yea same
[19:47] lukstr: that's exactly what semaphores are for :)
[19:47] langworthy has joined the channel
[19:48] khrome: just maintain an event stack and if you don't have the return from the top call, queue until you do, then search the queue each time you get a return, not exactly clean, but workable
[19:48] pifantastic has joined the channel
[19:49] mendel_ has joined the channel
[19:49] lukstr: tbranyen: it's one variable for your example, I don't see the problem :0
[19:50] fangel has joined the channel
[19:51] tbranyen: lukstr: its for an api that others will consume
[19:52] markwubben has joined the channel
[19:52] tbranyen: this is an incredibly common task, i need to figure out a very clean way of doing this
[19:52] lukstr: just wrap the callbacks?
[19:53] tbranyen: how would that help knowing if the outer event is done and all the inner events are done?
[19:53] lukstr: do you care about the order?
[19:53] tbranyen: actually well if you only trigger on the outer, stuff could still be going on in the inner
[19:54] tbranyen: the inner end triggers on every single outer pass
[19:54] Shinuza has joined the channel
[19:54] tbranyen: ther is no way to know when every single inner is done unless you maintain a counter
[19:54] lukstr: well, the way you are describing it you don't really have a choice
[19:54] tbranyen: so everytime an outer event is emitted, you increment, and every time its inner end event is emitted you would decrement
[19:54] tbranyen: yeah and creating a third event, final wouldn't help
[19:54] lukstr: what's wrong with that?
[19:55] tbranyen: since it would assume too much
[19:55] tbranyen: lukstr: again for an api where someone might implement the counter wrong
[19:55] tbranyen: or not implement it at all
[19:55] tbranyen: my documention could show how
[19:55] tbranyen: but it just seems icky
[19:55] lukstr: surely you can abstract it somehow?
[19:56] kristsk has joined the channel
[19:56] tbranyen: lukstr: yeah something to think about
[19:57] tbranyen: a tracking variable should suffice for my needs right now tho
[19:59] kylefox has joined the channel
[19:59] JJMalina has joined the channel
[20:00] petrjanda has joined the channel
[20:01] gsmcwhirter has joined the channel
[20:02] iammerrick has joined the channel
[20:03] liar__ has joined the channel
[20:03] lukstr: tbranyen: https://gist.github.com/1017581 ?
[20:03] idletom has joined the channel
[20:04] RORgasm: anyone know of a good SQL library for node that supports transactions?
[20:04] grahm has joined the channel
[20:04] isaacs has joined the channel
[20:05] tbranyen: lukstr: interesting thats a nice use of a closure
[20:05] wadey has joined the channel
[20:05] tbranyen: i like it
[20:06] LowValueTarget has joined the channel
[20:06] lukstr: tbranyen: probably should have gone the prototype route but I'm lazy
[20:06] hasenj has joined the channel
[20:07] mendel_ has left the channel
[20:08] grahm: can someone please tell me how i make this if statment work in jade? (right now it is always true): if(user != 'false') a.logged #{user}
[20:08] patrickstokes has joined the channel
[20:09] Skola_: maybe you mean
[20:09] Skola_: if user != false
[20:09] niles|iPod has joined the channel
[20:09] Skola_: with the parens
[20:09] blkcat: or just if( user ) really
[20:09] tjholowaychuk: grahm jade conditionals are just js conditionals..
[20:09] Skola_: yes
[20:09] tjholowaychuk: so whatever you would do with js
[20:09] JJMalina has joined the channel
[20:10] grahm: i tried with and w/o, it just renders the text 'false';
[20:10] sirkitree|lunch has joined the channel
[20:13] kmiyashiro: did you use -if?
[20:14] tjholowaychuk: grahm that doesn't mean it's a string
[20:14] grahm: ooh, thanks :)
[20:14] tjholowaychuk: that just means toString() was called on it
[20:14] grahm: -if fixed it.
[20:15] Shinuza has joined the channel
[20:15] grahm: should i always use -if? why jade-lang.com does not use -if?
[20:16] Skola_: it does
[20:16] Skola_: the example also uses an embedded script
[20:16] Skola_: which of course uses plain js
[20:17] grahm: ok i see. it is just confusing with the first if. sigh. my bad. thanks.
[20:17] apanda has joined the channel
[20:17] tjholowaychuk: grahm it uses - if () in the -4th line lol
[20:17] gsmcwhirter: tjholowaychuk, any reason a local wouldn't get properly set in a jade view? (printing out the locals object shows it is set, but I get undefined variable errors)
[20:17] Skola_: he got a bit confuzzled over the js in script tags :[]
[20:18] tjholowaychuk: ah
[20:18] tjholowaychuk: gsmcwhirter: nope, if it's set properly shoudl be fine
[20:18] tjholowaychuk: what's the name of the local?
[20:18] gozala has joined the channel
[20:18] tjholowaychuk: some are reserved
[20:18] tjholowaychuk: status
[20:18] gsmcwhirter: tjholowaychuk, matches. strange thing is, it only errors on some views that use that name and not others
[20:18] tjholowaychuk: for example
[20:18] tjholowaychuk: well
[20:18] tjholowaychuk: just like js if you do if (foo) and it's not defined that's an error
[20:18] chrisdickinson: isaacs: thanks for the help earlier. 1 old library updated to work with npm 1.x and working, like 3 more to go!
[20:19] isaacs: hooray!
[20:19] chrisdickinson: isaacs++
[20:19] v8bot: chrisdickinson has given a beer to isaacs. isaacs now has 25 beers.
[20:19] gsmcwhirter: tjholowaychuk, yeah. i tried checking for typeof(matches) == "undefined", but then it errored on something from the layout that was perfectly fine on dozens of other pages
[20:19] gsmcwhirter: i'll try to nail down a minimal example i guess and file an issue
[20:20] tjholowaychuk: sounds good
[20:20] JJMalina has joined the channel
[20:20] cl0udy has joined the channel
[20:20] zmbmartin: tjholowaychuk: how can I make sessions work accross multiple subdomains?
[20:20] baoist has joined the channel
[20:21] nibblebo_ has joined the channel
[20:22] spro has joined the channel
[20:23] reid has joined the channel
[20:23] deanlandolt1 has left the channel
[20:23] zmbmartin: anyone have an idea how I can do that. I am building an app that I would like the session to be shared accross multiple subdomains?
[20:24] __tosh has joined the channel
[20:26] chunhao: you just need to set the domain on the cookie correctly
[20:26] tdegrunt has joined the channel
[20:27] chunhao: so that the session cookcie is available on all subdomains
[20:27] sharkbone has joined the channel
[20:27] chunhao: (if you're using cookies to keep track)
[20:28] chunhao: so for domain.com, set the cookie domain to ".domain.com" and it will be available on *.domain.com
[20:29] chunhao: zmbmartin: ping, in case you missed this
[20:29] gsmcwhirter: tjholowaychuk, aha, i figured it out. I was passing in a local named "self", and that broke stuff when i went to a version >= 0.11.0
[20:29] cognominal has joined the channel
[20:29] tjholowaychuk: ohhh
[20:30] zmbmartin: chunhao: I didn't see a domain option in the connect info but I will try.
[20:30] raidfive has joined the channel
[20:30] mendel_ has joined the channel
[20:31] petrjanda has joined the channel
[20:31] niftylettuce has joined the channel
[20:32] sirkitree has joined the channel
[20:33] zmbmartin: chunhao: That didn't seem to work. Not sure how to set the domain with express/connect
[20:34] havenn has joined the channel
[20:34] knuthy has joined the channel
[20:34] zmbmartin: tjholowaychuk: do you know how I can change the domain for express session so I can share between subdomains?
[20:36] aheckmann has joined the channel
[20:36] arpegius has joined the channel
[20:36] lackac has joined the channel
[20:36] tolmasky-macbook has joined the channel
[20:37] perezd has joined the channel
[20:37] arpegius has joined the channel
[20:38] febits has joined the channel
[20:38] fangel has joined the channel
[20:40] chunhao: zmbmartin: hmm, looking in middleware/session/cookie.js, there's an option for the domain, but I'm not sure how to set it
[20:41] patrickarlt has joined the channel
[20:41] zmbmartin: chunhao: are you looking at express or connect
[20:41] chunhao: the middleware is in the connect module
[20:41] chunhao: but it's also included in express
[20:41] nibblebo_ has joined the channel
[20:42] gsmcwhirter: zmbmartin, express.session({cookie: {name: whatever, httpOnly: true, ..., domain: ".example.com"}}) or something to that effect should do it
[20:44] chapel: tjholowaychuk
[20:44] tjholowaychuk: ?
[20:44] chapel: you did ejs right?
[20:44] chapel: https://github.com/visionmedia/ejs
[20:44] tjholowaychuk: yup
[20:44] thalll has joined the channel
[20:44] chapel: umm, found an issue
[20:45] chapel: if you name a variable process in your template
[20:45] harth has joined the channel
[20:45] chapel: like lets say var process = something.process
[20:45] chapel: it overwrites the global process
[20:45] CoverSlide: ooh
[20:46] guy has joined the channel
[20:46] tjholowaychuk: probably with(){} messing with shit
[20:46] CoverSlide: then don't do it
[20:46] tjholowaychuk: though I would think a var foo in there should be local
[20:46] AvianFlu has joined the channel
[20:46] chapel: yeah, it should be
[20:46] chapel: I mean, I know now
[20:46] chapel: and am not using process
[20:46] MooGoo: global.process?
[20:46] chapel: but figured that wasn't intended
[20:46] tjholowaychuk: not really an ejs thing
[20:46] tjholowaychuk: more of a wtfjs thing
[20:46] chapel: var process = siteInfo.pages.process || false;
[20:47] chapel: thats more or less what I had in my template
[20:47] chapel: and it was overwriting the global process
[20:47] MooGoo: this is all in the global scope?
[20:47] MooGoo: not in some function scope?
[20:47] chapel: making it fail because there wasn't a nexttick
[20:47] chapel: this is inside of a template
[20:47] MooGoo: what's a template
[20:47] asabil has joined the channel
[20:47] tjholowaychuk: function
[20:47] MooGoo: is it inside a function
[20:47] MooGoo: well then global.process is not overwritten
[20:48] MooGoo: process is just shadowed inside that function
[20:48] darshanshankar has joined the channel
[20:48] isaacs: SubStack: Hey.
[20:48] chapel: https://gist.github.com/a1635f7f2d3595dcfea5 << either way, that is what I was getting
[20:48] isaacs: SubStack: you should get involved with this whole module define() stuff getting tossed around on nodejs-dev
[20:48] CoverSlide: https://github.com/visionmedia/ejs/blob/master/lib/ejs.js#L111
[20:49] mcluskydodallas has joined the channel
[20:49] isaacs: chapel: did you override the "process" global or something?
[20:49] isaacs: chapel: that's not allowed
[20:49] isaacs: :)
[20:49] chapel: haha
[20:49] SubStack: isaacs: nodejs-dev eh?
[20:49] chapel: well whatever I did, I wasted almost 2 hours trying to figure it out
[20:49] isaacs: SubStack: yessir
[20:49] isaacs: SubStack: so... define(). how do you feel about this?
[20:49] chapel: but you know, the error message was cryptic
[20:49] CoverSlide: i override require in my apps
[20:49] isaacs: SubStack: as the browserify guy, you get a vote :)
[20:50] SubStack: oh hah
[20:50] rfay has joined the channel
[20:50] SubStack: wrapping your whole script in a function is stupid
[20:50] SubStack: you can get line numbers through other means
[20:50] isaacs: agreed.
[20:50] SubStack: I'm working on that right now in fact!
[20:50] SubStack: node-stackedy
[20:50] isaacs: nice!
[20:50] SubStack: I already got require('vm') working browser-side
[20:51] isaacs: whuu?
[20:51] AAA_awright: Anyone know about access to the Javascript tokenizer? I would like to determine if an expression is evaluated as a variable reference, string, etc, without executing it
[20:51] isaacs: how much of it?
[20:51] SubStack: isaacs: all of it?
[20:51] SubStack: near abouts
[20:51] indexzero has joined the channel
[20:51] isaacs: SubStack: i mean, isn't runInNewContext() gonna fail (or at least not be isolated)?
[20:51] SubStack: iframes
[20:51] isaacs: oh, wild
[20:51] JJMalina has joined the channel
[20:51] RC1140 has left the channel
[20:51] isaacs: but it's still not quite an isolate.
[20:51] SubStack: https://github.com/substack/node-browserify/blob/master/builtins/vm.js
[20:51] isaacs: unless it's on a different hostname
[20:51] briznad has joined the channel
[20:52] zmbmartin: gsmcwhirter: thanks
[20:52] zmbmartin: chunhao: thanks
[20:52] isaacs: SubStack: since you could do window.parent.beEvil()
[20:52] SubStack: isaacs: well you could traverse up the window chain but that's pretty much the only way
[20:52] isaacs: right
[20:52] matyr has joined the channel
[20:52] isaacs: so it's vm.runInNewContext for convenience, but not security
[20:52] SubStack: I could mask out the window object too but that is sometimes useful to have
[20:52] isaacs: ACTION did a tour of duty in the iframe battlefields
[20:53] MooGoo: but NewContext will still have all the document and window properties with it
[20:53] isaacs: you really can't lock down all the ways to escape from the box
[20:53] SubStack: yes security is not what i have in mind for this
[20:53] SubStack: MooGoo: but they are separate from the parent window
[20:53] isaacs: you need something like caja that translates the code, and then whitelists what gets passed in, to really mode runInNewContext
[20:53] MooGoo: just not quite as clean as the real thing
[20:53] isaacs: *model
[20:54] MooGoo: is it
[20:54] SubStack: the cool thing is I have tests for the vm wrapper running in jsdom
[20:54] MooGoo: maybe you could somehow make it cross domain....
[20:54] MooGoo: but that would never work
[20:54] isaacs: MooGoo: right, because then you can't make it run code.
[20:54] SubStack: and as soon as I get testling working I can test it there too
[20:54] SubStack: even though testling depends on a properly-functioning vm to work
[20:54] isaacs: MooGoo: so you have to have a frame you own, in a different domain, with a host that runs some code, which accepts a message, and then runs it, in a caja sandbox.
[20:54] WrErase has joined the channel
[20:54] isaacs: not worth it
[20:55] MooGoo: yea
[20:55] isaacs: http://applications.yahoo.com
[20:55] spro_ has joined the channel
[20:55] MooGoo: the things that should have been built in in the first place
[20:55] wilken has joined the channel
[20:55] isaacs: oh, i guess it's http://developer.yahoo.com/yap/ now
[20:55] iammerri_ has joined the channel
[20:55] MooGoo: could always you know...include a js interperter
[20:55] MooGoo: to do the dirty work
[20:56] isaacs: MooGoo: yeah, that's kinda what caja does.
[20:56] F1LT3R has joined the channel
[20:56] isaacs: it translates the code into cajita, then has a cajita interpreter implemented in js
[20:56] MooGoo: cajita...
[20:56] zeade has joined the channel
[20:56] sirkitree has joined the channel
[20:56] SubStack: I just need vm.runInNewContext() to execute node-burrito-ified source :p
[20:57] isaacs: the translation is referred to as "cajoling"
[20:57] isaacs: caja cajoles the code into cajita
[20:57] SubStack: well partly
[20:57] MooGoo: I see now...
[20:57] Skola_: caja cohones :[]
[20:57] isaacs: it's all very clever and gooley
[20:57] isaacs: *googley
[20:58] isaacs: Skola: caja cajones!
[20:58] beriberikix: In case anyone is interested, the Caja folks are putting the finishing touches to a completely clientside version of Caja
[20:58] isaacs: neato!
[20:59] isaacs: SubStack: so, then, if a function *was* wrapped in a define(function (require, exports, module) { ... }), would you be cool with that?
[20:59] isaacs: SubStack: i figure in node, we can just run that function right away
[20:59] beriberikix: isaacs: ya, it uses some slick es5 features to get it done
[20:59] hybsch has joined the channel
[21:00] hybsch has left the channel
[21:00] SubStack: isaacs: maybe but that should live in userland
[21:00] SubStack: you can already do that in userland too
[21:01] slickplaid: I love that place. Great funnel cakes.
[21:01] erictj has joined the channel
[21:01] nibblebo_ has joined the channel
[21:04] ap3mantus has joined the channel
[21:04] JJMalina has joined the channel
[21:04] hasenj has joined the channel
[21:05] Chani: man, I wish fs.writeFile could append
[21:05] spolu has left the channel
[21:05] Chani: fs.write is way too complicated for my needs
[21:06] xerox: is there a standard urlencode/urldecode pair of functions in node?
[21:06] Chani: and... is probably going to force me to create an extra copy of the data I want to write. just so I can find out its length
[21:06] xerox: I just need urldecode atm : )
[21:06] Nican has joined the channel
[21:06] asobrasil has left the channel
[21:07] slickplaid: Chani: http://stackoverflow.com/questions/3459476/how-to-append-to-a-file-in-node
[21:09] codeisforevea has joined the channel
[21:09] rfay has joined the channel
[21:09] Chani: xerox: http://nodejs.org/docs/v0.4.8/api/url.html maybe?
[21:09] idefine has joined the channel
[21:10] cole has joined the channel
[21:10] knuthy: I'm using mongoosejs, and I'd like that the remove be blocking..., in fact when I do a p.remove() then I redirect to the list, the removed item is still listed
[21:10] jerrysv: Chani: besides what slickplaid sent, is it a problem that could be solved just by keeping the file open? (like log files)
[21:10] xerox: Chani: url.parser ?
[21:10] Chani: slickplaid: ahh, that does look more convenient :)
[21:11] Chani: jerrysv: nope. always have to append, even for existing files
[21:11] sonnym has joined the channel
[21:11] Chani: xerox: yeah maybe. I haven't read the page, just happened to have the node manual index open
[21:11] knuthy: okay, found it
[21:12] CoverSlide: url.parser just separates the url into an object with path / querystring / etc
[21:13] CoverSlide: have you tried encodeURIComponent / decodeURIComponent
[21:14] mscdex_: kohaiiiiii!!!
[21:14] xerox: hmm no
[21:14] CoverSlide: v8: encodeURIComponent("This a string with ? and & and =")
[21:14] v8bot: CoverSlide: "This%20a%20string%20with%20%3F%20and%20%26%20and%20%3D"
[21:14] mikeal has joined the channel
[21:14] CoverSlide: v8: decodeURIComponent("This%20a%20string%20with%20%3F%20and%20%26%20and%20%3D")
[21:14] v8bot: CoverSlide: "This a string with ? and & and ="
[21:15] CoverSlide: v8 natives
[21:15] v8bot: CoverSlide: v8 is no longer supported (except in PM). Try v8: or v8>
[21:15] cl0udy has joined the channel
[21:15] sveimac_ has joined the channel
[21:15] CoverSlide: omgwtf
[21:15] xerox: "
[21:15] mscdex_: they're javascript natives
[21:15] mscdex_: :D
[21:15] xerox: I guess their name is html entities
[21:15] xerox: what I need is html entities -> utf8
[21:15] knuthy: i love node ^_^
[21:15] mscdex: node.js rules!
[21:16] btipling: node wins
[21:16] Chani: ooh, we have a code bot?
[21:16] Renegade001 has joined the channel
[21:16] brraaains has joined the channel
[21:16] xerox: anybody came across an html entities encoder?
[21:16] jerrysv: v8: typeof /wtfbbq/
[21:16] v8bot: jerrysv: "function"
[21:17] caolanm has joined the channel
[21:18] SubStack: isaacs: sent
[21:18] Shinuza has joined the channel
[21:20] patrickjst has joined the channel
[21:20] edude03 has left the channel
[21:20] SubStack: it's taking its sweet time to show up though
[21:21] jetienne has joined the channel
[21:21] bbrandon has joined the channel
[21:21] nibblebo_ has joined the channel
[21:22] SubStack: xerox: ent
[21:22] SubStack: npm install !!
[21:22] xerox: SubStack: ent
[21:22] xerox: !!! ok
[21:22] mscdex: !!!
[21:23] xerox: ACTION hugs SubStack
[21:23] kersny has joined the channel
[21:26] srid has joined the channel
[21:26] srid has joined the channel
[21:27] isaacs: SubStack: awesome.
[21:28] isaacs: SubStack: i was fully prepared for "yeah, that'll make browserify easier/faster/better/whatever, so it'd benice, but not necessary";
[21:28] isaacs: but if you're against it, i'm against it.
[21:28] materialdesigner has joined the channel
[21:28] SubStack: it would make it harder actually
[21:28] isaacs: i see.
[21:28] SubStack: because I'd need to support an additional piece of machinery
[21:28] isaacs: then that's an incentive for node to *not* do it
[21:28] SubStack: because those module.exports = ... aren't going away
[21:28] isaacs: right
[21:29] isaacs: well, then the thing would be just that in node, define() calls the cb right away
[21:29] isaacs: and the other argument stuff isn't well specified, and kinda weird.
[21:29] CoverSlide: define()?
[21:29] isaacs: define("foo", ["bar", "baz"], function (require, exports, module) { /* wtf's a foo, bar, or baz? */ })
[21:30] isaacs: the kinda nice thing about AMD is that it lets you just run your code all dumped into a single context.
[21:30] isaacs: SubStack: but it pushes boilerplate out of the module-machinery and into your code, which is unfortunate, imo
[21:30] SubStack: exactly
[21:31] mikl has joined the channel
[21:31] ap3mantus has joined the channel
[21:35] BrianTheCoder has joined the channel
[21:35] sveimac has joined the channel
[21:38] TheLifelessOne has joined the channel
[21:38] TheLifelessOne has left the channel
[21:39] zmbmartin: how hard is it for someone to manually access and change cookies?
[21:40] et_ has joined the channel
[21:40] CoverSlide: pretty hard, i hear you need a computer for it
[21:40] CoverSlide: modifying those bits with your hands ... *shudder*
[21:40] jerrysv: provided you have a computer, and it's client side, trivial.
[21:40] taf2: you could print out pieces of paper and punch holes in the right place... run it through a huge machine and you might get the cookies modified...
[21:41] jerrysv: depending on the computer. i suppose something without a tcp/ip stack might be more difficult, as you'd probably have to write one.
[21:41] CoverSlide: rule 1 of web dev: never trust the client
[21:41] slickplaid: like a boss
[21:41] zmbmartin: I mean if I store a req.session.user and someone accesses that persons computer can they access the information in the session?
[21:41] zmbmartin: I am trying to learn my way around sessions
[21:41] hoax__ has joined the channel
[21:41] jerrysv: oh. that's a different story.
[21:42] nibblebo_ has joined the channel
[21:42] CoverSlide: session is only an id cookie
[21:42] CoverSlide: session info is server-side
[21:42] materialdesigner has joined the channel
[21:42] jerrysv: sessions are usually stored server-side, with the cookie being the key into it
[21:42] jerrysv: stereo
[21:42] zmbmartin: ok so session info is safe then?
[21:42] zmbmartin: for the most part
[21:42] CoverSlide: more or less
[21:42] taf2: just put everything in session and encrypt it'll be perfectly safe :)
[21:42] S3ig3 has joined the channel
[21:42] CoverSlide: people could jack that cookie
[21:43] slickplaid: So, if they compromise another client, copy their session cookie, they could potentially masquarade as that use?
[21:43] jerrysv: as long as the session id isn't predictable
[21:43] CoverSlide: and log in as the user
[21:43] slickplaid: r
[21:43] taf2: only if you're running http... run https
[21:43] jerrysv: smart money is on a good cookie implementation
[21:43] S3ig3: How can I write to a file multiple times at different positions using node.js
[21:43] rfay has joined the channel
[21:43] slickplaid: like the human centipede?
[21:43] zmbmartin: ok thanks guys
[21:44] jerrysv: signed cookies: http://www.tornadoweb.org/documentation#cookies-and-secure-cookies
[21:44] taf2: S3ig3, can you change the offset in fs.write ?
[21:44] S3ig3: using fs.write , I will have to wait for callbacks
[21:44] taf2: fs.writeSync ?
[21:45] zmbmartin: express sessions uses signed cookies right? or do I need to handle that?
[21:45] hoax__ has joined the channel
[21:45] taf2: well, if you want it all at the same time... fs.write... fs.write fs.write don't wait?
[21:45] derencius has joined the channel
[21:45] S3ig3: From the docs: Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback. For this scenario, fs.createWriteStream is strongly recommended.
[21:45] xerox: SubStack: oh, ent is "bugged"
[21:45] xerox: SubStack: it does not decode NN; where NN is a number
[21:47] davidjrice has joined the channel
[21:47] SubStack: xerox: does too!
[21:47] taf2: S3ig3, ah okay yeah i don't know sorry...
[21:47] taf2: i'd thin you'd want a memory mapped file for what you describe though?
[21:47] SubStack: oh wait x?
[21:48] xerox: SubStack: yeah
[21:48] xerox: "Title":"Dumb & Dumber",
[21:48] xerox: should it be different? I get it from some api
[21:48] SubStack: does x do hex?
[21:48] xerox: I think so yes
[21:49] michaelhartau has joined the channel
[21:50] viz has joined the channel
[21:53] CoverSlide: x and X
[21:55] TomY has joined the channel
[21:56] niftylettuce: chapel++
[21:56] v8bot: niftylettuce has given a beer to chapel. chapel now has 7 beers.
[21:56] chapel: :)
[21:56] Timothee has joined the channel
[22:01] nibblebo_ has joined the channel
[22:02] cl0udy has joined the channel
[22:02] sivy has joined the channel
[22:04] xandrews has joined the channel
[22:05] addisonj: ACTION needs a new project
[22:06] jerrysv: addisonj: do you like add-ons? :)
[22:06] davidjrice: hey dudes, anyone an idea of the feasibility of hooking up node to a POS printer
[22:06] davidjrice: that's point of sale, not piece of shit :)
[22:06] jerrysv: davidjrice: either know the protocol, or have something else proxying for you?
[22:07] addisonj: add-ons?
[22:07] jerrysv: add-on, c++ extension
[22:08] MooGoo: I want a node extension that exposes the scope chain to JS
[22:08] MooGoo: gimmie
[22:09] MooGoo: like Rhino's __parent__
[22:09] SubStack: xerox: ent@0.0.3 published
[22:09] SubStack: supports [xX][A-Fa-f0-9];
[22:09] addisonj: ah, my c skills are lacking, but might be a good time to hone them, was just thinking I might like some linux acl bindings...
[22:10] Aria has joined the channel
[22:10] MooGoo: I cant figure it out
[22:10] MooGoo: from the v8 docs I've read
[22:10] xerox: SubStack: did I tell you that I love you?
[22:11] jerrysv: first hugs, now love. substack, you may have a stalker
[22:11] xerox: no :(
[22:11] xerox: but I am going to test it right now
[22:11] CoverSlide: who names their module after a talking tree?
[22:12] arpegius has joined the channel
[22:12] jerrysv: coverslide: could have been named after the subreddit
[22:12] jerrysv: er, the users of the subreddit
[22:12] beriberikix: Substack: do you think browserfy should be added to the uber scriptloading list?
[22:13] beriberikix: https://spreadsheets0.google.com/spreadsheet/ccc?authkey=CNGC0-UC&hl=fr&key=tDdcrv9wNQRCNCRCflWxhYQ&hl=fr&authkey=CNGC0-UC#gid=2
[22:13] hasenj has joined the channel
[22:14] ludde has joined the channel
[22:14] SubStack: beriberikix: lots of commonjs bias all up in that
[22:14] xerox: SubStack: it only encodes the first one
[22:14] xerox: maybe you forgot a /g
[22:14] level09 has joined the channel
[22:15] xerox: > ent.decode('"Rock & Roll"')
[22:15] xerox: '"Rock & Roll"'
[22:15] xerox: > ent.decode('Rock & Roll"')
[22:15] xerox: 'Rock & Roll"'
[22:15] SubStack: xerox: oh!
[22:15] beriberikix: Substack: Hmm. Allrighty. I'm just trying to figure out which loader I should for my project :P
[22:16] SubStack: beriberikix: well most of the features on the side of that spreadsheet are not things that actually matter
[22:17] temp01 has joined the channel
[22:17] cafesofie has joined the channel
[22:17] Calvin has joined the channel
[22:18] jmoyers: ACTION fucking hates open source java servers
[22:18] jmoyers: ACTION and soap
[22:18] brainproxy: i think I love .concat()
[22:18] brainproxy: is that wrong?
[22:18] coreb: people should #ndc2011 tweet ryah's node.js talk for tomorrow (friday) at 0900 hours CET
[22:18] SubStack: xerox: all fixed and I wrote some tests so it won't happen again
[22:18] SubStack: ent@0.0.4
[22:19] CoverSlide: ACTION wonders what jmoyers bathes with
[22:19] jmoyers: definitely not SOAP
[22:19] brainproxy: REST ftw
[22:19] jmoyers: ACTION stomps on SOAP
[22:19] xerox: SubStack: most excellent, testing.
[22:20] jerrysv: ugh. soap.
[22:20] euforic has joined the channel
[22:20] dipser has joined the channel
[22:20] gonsfx has joined the channel
[22:20] mraleph has joined the channel
[22:21] gonsfx: hello everyone
[22:21] nibblebo_ has joined the channel
[22:22] rfay has joined the channel
[22:23] level09: is multi-node a good way to scale node servers on multi-core machines ?
[22:23] xerox: SubStack: works like a charm
[22:23] tjholowaychuk: level09 multi-node is pretty dated now
[22:23] tjholowaychuk: dated for node at least
[22:23] CoverSlide: cluster
[22:24] level09: pretty dated ? what do u mean?
[22:24] CoverSlide: seems to be the standard
[22:24] level09: tjholowaychuk: I'm looking for ways to scale my node server
[22:24] tjholowaychuk: dated as in i dont know if those guys even work with node anymore
[22:24] CoverSlide: dated like spark or spark2
[22:24] tjholowaychuk: yeah
[22:24] level09: tjholowaychuk: my server crashes at around 3000 connections
[22:24] tjholowaychuk: haha
[22:24] level09: tjholowaychuk: ah you mean outdated
[22:25] jerrysv: level09: too many open files?
[22:25] level09: files ? I think its more of a connections
[22:25] jerrysv: level09: what's the error it crashes with?
[22:25] level09: but I'm watching one single file and pushing the contents to the clients
[22:26] level09: jerrysv: I cant find any errors, but the connections count grows, then the cpu hits the limit
[22:26] level09: and maybe the memory as well
[22:26] jerrysv: level09: a connection counts against open files
[22:26] MooGoo: one file?
[22:26] level09: so my server become unresponsive
[22:26] sirkitree has joined the channel
[22:26] MooGoo: is the file opened each time?
[22:26] level09: jerrysv: I'm only watching one file
[22:27] gonsfx: i've got a quickie - whats is the model.parent property?
[22:27] level09: yes I have a readFile on each file change
[22:27] level09: but it is changed every few minutes/hours
[22:27] _jdalton has joined the channel
[22:27] level09: jerrysv: I can show you the small code
[22:27] level09: one sec
[22:29] guy has joined the channel
[22:29] level09: jerrysv: http://pastie.org/2045075
[22:29] briznad has joined the channel
[22:30] davidcoallier has joined the channel
[22:30] level09: here is the server, just broadcasts file changes through a socket
[22:30] jerrysv: and at about 3000 it falls over, no error?
[22:30] level09: jerrysv: the logs only show some warning
[22:30] level09: about memory leak
[22:30] level09: sometimes
[22:31] level09: and sometimes I can reach around 4000
[22:31] jerrysv: a memory leak? what version of node are you running, and how big is your memory footprint?
[22:31] level09: latest
[22:31] level09: I'm running on a micro 64 bit ec2 instance
[22:31] level09: memory around 650 MB
[22:31] AphelionZ has joined the channel
[22:32] jerrysv: cat /proc/sys/fs/file-max
[22:32] jerrysv: what does that tell you
[22:32] level09: one sec
[22:33] perezd_ has joined the channel
[22:34] level09: 58064
[22:34] AvianFlu has joined the channel
[22:34] jerrysv: that's an odd number.
[22:34] jerrysv: hm. looks like this might be beyond a quick at-a-glance for me
[22:34] jerrysv: sorry :/
[22:35] level09: :)
[22:35] copongcopong has joined the channel
[22:35] level09: no worries
[22:35] baoist has joined the channel
[22:35] level09: jerrysv: whats odd about it ? too small ?
[22:36] level09: maybe my sysadmin messed up the configurations
[22:36] jerrysv: no, just a weird number
[22:38] raynos has joined the channel
[22:38] raynos: What ratio of (lines) code vs tests is considered "good" ?
[22:38] level09: so how do you guys scale your apps ? more resources ?
[22:39] raynos: Ignoring that "lines" is a bad measure.
[22:39] raynos: level09: non blocking IO ;)
[22:39] raynos: Step one is to scale it across processes / cores using something like cluster
[22:39] level09: it is already non blocking
[22:39] raynos: then set up a good infastructure to scale it across machines.
[22:39] level09: can node benefit from multi-core machines ?
[22:39] raynos: Sure
[22:39] level09: since it only uses one thread ?
[22:39] raynos: use cluster.
[22:40] raynos: start multiple node child processes
[22:40] level09: ACTION searching for cluster
[22:40] CoverSlide: cluster will pre-fork and load balance across multiple instances
[22:40] level09: nice
[22:40] level09: wow
[22:40] level09: that seems like exactly what I need
[22:40] insin has joined the channel
[22:40] raynos: Does anyone have reading material on how to scale cluster across multiple physical machines?
[22:40] level09: it seems similar to multi-node
[22:41] level09: but better
[22:41] chrislorenz has joined the channel
[22:41] yozgrahame1 has joined the channel
[22:42] nibblebo_ has joined the channel
[22:42] aaronblohowiak has joined the channel
[22:42] euforic has left the channel
[22:43] aaronblohowiak: ryah: what are your thoughts on libtask?
[22:43] euforic has joined the channel
[22:46] yozgrahame has joined the channel
[22:46] brownies has joined the channel
[22:49] rfay has joined the channel
[22:50] Shrink has joined the channel
[22:52] level09: where can I find some decent information about cluster
[22:53] level09: on how to use it
[22:53] _bacon has joined the channel
[22:53] davidcoallier has joined the channel
[22:53] davidbanham has joined the channel
[22:54] baudehlo: on its web site
[22:54] baudehlo: http://learnboost.github.com/cluster/
[22:54] baudehlo: specifically: http://learnboost.github.com/cluster/docs/api.html
[22:55] jdub has joined the channel
[22:56] stephank has joined the channel
[22:57] level09: baudehlo: thanks
[22:57] level09: what does this line mean var cluster = require('../') ?
[22:58] podman has joined the channel
[22:59] coreb: nothing more in the path?
[22:59] mikeal1 has joined the channel
[22:59] yhahn has left the channel
[22:59] markwubben has joined the channel
[22:59] CoverSlide: index.js in the parent directory
[23:00] coreb: but with a npm install of cluster, it should probably be require("cluster")
[23:01] nibblebo_ has joined the channel
[23:03] _bacon has left the channel
[23:05] gonsfx: i'm wondering what the model.parent property is for. cant find in the docs.
[23:05] AvianFlu has joined the channel
[23:05] level09: coreb: that's correct
[23:05] level09: now I'm testing my server with cluster
[23:06] raynos has left the channel
[23:07] zomgbie has joined the channel
[23:07] iammerrick has joined the channel
[23:12] sorens3n: ahh i want to use cluster badly
[23:12] Druide_ has joined the channel
[23:13] hebz0rl has joined the channel
[23:14] patrickjst has joined the channel
[23:15] zmbmartin: sorens3n: why don't you?
[23:17] hojberg has joined the channel
[23:17] nibblebo_ has joined the channel
[23:19] copongcopong has joined the channel
[23:21] edude03 has joined the channel
[23:21] thinkt4nk has joined the channel
[23:22] cl0udy has joined the channel
[23:24] mikeal has joined the channel
[23:24] _jdalton has left the channel
[23:25] tim_smart has joined the channel
[23:25] Breign has joined the channel
[23:26] bartt has joined the channel
[23:27] replore has joined the channel
[23:27] cole has joined the channel
[23:27] quackquack has joined the channel
[23:28] [[zzz]] has joined the channel
[23:30] azeroth_ has joined the channel
[23:30] AddZero has joined the channel
[23:30] josephboyle has joined the channel
[23:34] level09 has joined the channel
[23:35] yozgrahame has joined the channel
[23:35] Xano has joined the channel
[23:37] briznad has joined the channel
[23:38] mikeal has joined the channel
[23:39] niftylettuce has joined the channel
[23:39] namelessnotion__ has joined the channel
[23:41] stonebranch has joined the channel
[23:41] rburhum has joined the channel
[23:41] ianward has joined the channel
[23:42] ap3mantus has joined the channel
[23:42] davidcoallier has joined the channel
[23:43] AddZero has joined the channel
[23:44] hassox has joined the channel
[23:48] matty has joined the channel
[23:50] mjr__ has joined the channel
[23:51] [[zz]] has joined the channel
[23:51] replore has joined the channel
[23:56] isaacs has joined the channel
[23:58] Croms has joined the channel
[23:59] maushu has joined the channel
[23:59] brettgoulder has joined the channel
[23:59] wdperson has joined the channel