[00:00] zemanel: those statups do something right? all day? :p [00:00] SubStack: I want a cloud provider that can make quality fog and rain-bearing cumulus [00:00] JimBastard: zemanel: im lost man, sorry [00:00] SubStack: will nodejitsu serve my needs? [00:01] JimBastard: SubStack: we are announcing a partnership with weather.com and the Chinese government to integrate a distributed weather control service into the nodejitsu platform [00:01] JimBastard: so yes [00:01] SubStack: excellent [00:01] JimBastard: so in other words, we'll make it rain [00:02] edwardchuajh has joined the channel [00:02] techwraith: What does it take to get into nodejitsu? [00:02] edwardchuajh: oh the camp is still ongoing i see [00:02] JimBastard: techwraith: i can get you an invite [00:02] JimBastard: i owe a few as it is [00:02] softdrink: i need something like the express.js router but for the client-side… any ideas? [00:02] techwraith: :) [00:02] JimBastard: softdrink: sammy? [00:03] JimBastard: techwraith: did you already signup? [00:03] techwraith: JimBastard: you rock - I just did: techwraithpdx@gmail.com [00:03] tjholowaychuk: softdrink: sammy is similar i think, havent used it tho [00:03] softdrink: this? http://code.quirkey.com/sammy/ [00:04] zemanel: ACTION goes googling to find out what JimBastard is talking about [00:04] JimBastard: techwraith: you gonna be around? i can send you an invite later tonight [00:04] tjholowaychuk: softdrink: yeah [00:04] techwraith: softdrink: have you looked into backbone - not exactly what you're looking for, but it might serve your needs. [00:04] softdrink: techwraith: link? [00:04] techwraith: JimBastard: I'm here for a couple hours (until 6pm) [00:04] eponym: how can I work around mongoose's lack of an update function? [00:04] tjholowaychuk: sammy actually looks really similar haa [00:04] techwraith: softdrink: http://documentcloud.github.com/backbone/ [00:05] zemanel: JimBastard: "Sign up for free hosting!" i'm sold! [00:05] JimBastard: zemanel: we need a better value prop for sure >.< [00:05] JimBastard: its incoming [00:05] zemanel: free beer ofc [00:05] zemanel: dah [00:05] techwraith: softdrink: Backbone.js is pretty awesome, takes some getting used to to work with it though... [00:05] zemanel: free hosting + free beer, no one can beat that [00:05] softdrink: hrm… i might have to un-dependency them or port them to mootools. i don't want to include another platform library [00:06] zemanel: cause [00:06] zemanel: even if the hosting sucks, you still have the beer, right? [00:06] zemanel: :) [00:06] Blink7 has joined the channel [00:07] jashkenas: techwraith: what sorta getting used to... [00:08] zemanel: porting a recommendation engine to node (a la Mahout) would really kick ass [00:08] JimBastard: jashkenas: have you tried backbone? i hear its pretty awesome [00:08] zemanel: or a startup around making it easier [00:08] JimBastard: :-D [00:08] zemanel: it's the latte du jour, a lot of businesses are incorporating it [00:09] jashkenas: softdrink: the jQuery integration is very light. it works with Zepto as well, and here's a mootools version: https://github.com/jeromegn/backbone-mootools [00:09] techwraith: jashkenas: MVC in the browser just through me through a loop :) [00:09] trotter has joined the channel [00:09] mdoan has joined the channel [00:09] stagas: sammy looks nice [00:11] softdrink: jashkenas: sweet. thanks [00:11] jashkenas: softdrink: you'll probably have to bring the mootools version up to date -- fair warning. [00:12] softdrink: i'm not seeing anything that'd make 1.3 complain at the moment [00:14] softdrink: bbiaf [00:14] ysynopsis has joined the channel [00:16] zomgbie has joined the channel [00:17] zemanel: anyone looking to work for free? :p [00:18] ShiZWeaK: s/free/beer [00:21] indexzero has joined the channel [00:24] tokumine has joined the channel [00:25] Guest70501: does anyone have recommendations for benchmarking a node.js app? [00:25] Guest70501: i've tried wsbench but it doesn't seem to be working [00:25] trotter has joined the channel [00:25] strmpnk has joined the channel [00:26] stagas: ab [00:26] tjholowaychuk: Guest70501: wsbench is for web sockets [00:27] tokumine: tjholowaychuk: have you got any tips for drawing images async with node-canvas? Trying to render a lot of arcs at once (>1k) [00:27] Guest70501: tjholowaychuk: ahh... ok, i'm using socket.io in my node.js app, i basically want to simulate connecting and sending data back and forth. [00:27] Guest70501: i didn't realize i was using the wrong tool [00:27] tjholowaychuk: tokumine: what are you using for output right now? [00:27] tjholowaychuk: toBuffer() etc ? [00:28] tjholowaychuk: give me a peek [00:28] tjholowaychuk: Guest70501: oh, no that sounds right for socket.io then [00:28] tjholowaychuk: I have not used that tool tho so im no help [00:28] tokumine: tjholowaychuk: res.end(canvas.toBuffer()); [00:28] Guest70501: tjholowaychuk: oh ok.. thanks anyway though [00:28] stepheneb has joined the channel [00:28] tjholowaychuk: tokumine: the fastest would be canvas.toBuffer(function(err, buf){ res.end(buf)l }); [00:28] tjholowaychuk: async [00:29] tjholowaychuk: toBuffer() blocks [00:29] tjholowaychuk: toDataURL() accepts a callback as well [00:29] tjholowaychuk: unfortunately I have to use the c++ slow buffers [00:29] tokumine: tjholowaychuk: ahh ok - so I'd do my big render loop just before res.end? [00:30] tjholowaychuk: sure, whatever works [00:30] tjholowaychuk: workers etc [00:30] tokumine: tjholowaychuk: thanks for the help - I'll investigate and give it a try [00:30] tjholowaychuk: sound sgood [00:32] tokumine: tjholowaychuk: thanks for the workers tip - I think that was the missing link :) [00:32] tjholowaychuk: tokumine: I couldnt figure out a good way to do the png "streaming" either so the fastest is toBuffer(fn) [00:32] tjholowaychuk: ATM [00:32] aubergine has left the channel [00:33] tjholowaychuk: callbacks from eio_custom are weird [00:33] tjholowaychuk: not sure what would be best for that [00:33] tjholowaychuk: but most images are not really large enough to attempt streaming anyway IMO [00:33] tjholowaychuk: ill try it out and see what kind of perf i get [00:34] tokumine: tjholowaychuk: gotcha - thanks. Great library BTW. Sorry I can't be much help myself but I'm just finding my feet.. [00:34] tjholowaychuk: no worries [00:35] tjholowaychuk: I get ~600 rps for a 200x200 render of some primitives [00:35] caligula has joined the channel [00:35] tokumine: tjholowaychuk: jees - how about say, erm, 5000 primitives.... [00:35] tokumine: :) [00:35] tjholowaychuk: hahaha [00:35] tokumine: ok, I get the message :D [00:36] tokumine: time to look at workers [00:36] nbqx has joined the channel [00:37] tjholowaychuk: you will need damn beefy servers to serve up animated SSJS stuff though :p [00:37] tjholowaychuk: even with workers [00:38] echosystm has joined the channel [00:38] tokumine: tjholowaychuk: If you're interested, I'm trying to render map tiles dynamically for overlay on google maps. https://github.com/tokumine/hightile/blob/master/app6.js [00:38] dguttman_ has joined the channel [00:38] tjholowaychuk: ah cool [00:38] tokumine: ^^ is the best I've got so far.. But thanks for your help! [00:39] tjholowaychuk has joined the channel [00:40] echosystm: guys, i need help, i cant decide how to write this app im working on [00:40] echosystm: ive got two options [00:40] echosystm: 1. REST service with websockets/comet for pub/sub realtime data [00:41] echosystm: 2. write a fulll jsonrpc implementation over websockets [00:41] SubStack: REST + websockets? [00:41] echosystm: (and just do everything over websockets) [00:41] tjholowaychuk: jsonrpc is pretty easy to implement [00:41] SubStack: echosystm: http://github.com/substack/dnode ^_^ [00:41] AAA_awright_ has joined the channel [00:41] echosystm: SubStack: REST for all the CRUD stuff, but websockets for pushing out events [00:41] SubStack: got it [00:42] SubStack: echosystm: well how will the app data be used mostly? [00:42] SubStack: in a stateful or stateless manner? [00:42] jonaslund: will websockets be usable before 2020 anyhow? :P [00:42] SubStack: well socket.io makes them work no matter what happens [00:42] echosystm: jonaslund: this is an internal system, so i can say wahtever browser i want people to use [00:42] SubStack: even if they're not really websockets [00:43] echosystm: anyway [00:43] echosystm: tjholowaychuk: with jsonrpc over ws, what would be a good way to specify what object you actually want to run a method on? [00:43] SubStack: dnode is like jsonrpc except you can nest callbacks [00:43] echosystm: i was going to do something like { target: "class/instanceId" method:... } [00:44] dnolen has joined the channel [00:44] echosystm: over HTTP, i would just use the URI for specifying what class/object to target [00:44] tjholowaychuk: last time I played with heavily evented stuff with web sockets I basically just had EventEmitter work on both ends [00:44] tjholowaychuk: via WS [00:44] tjholowaychuk: I found that pretty simple [00:44] SubStack: events are nice [00:45] echosystm: well the other thing is that this needs to be pretty language agnostic [00:45] echosystm: i need to be able to easily hook in many different kinds of clients [00:45] SubStack: specifically which languages? [00:45] echosystm: perl, java, javascript, python, objective c [00:45] jonaslund: oh socket.io looks cool :) [00:46] SubStack: ah some rest thing might be best then [00:46] echosystm: mm [00:46] SubStack: well, not to say that a rest interface would exclude some websocket thing [00:46] tjholowaychuk: yeah you might get a headache trying to support most of the adapters for socket.io in those langs [00:46] tjholowaychuk: i know some have servers already [00:46] tjholowaychuk: not positive which though [00:46] echosystm: what is the most common what to do realtime stuff with REST? [00:46] echosystm: *way [00:47] TheEmpath: apis [00:47] SubStack: dnode has a websocket interface and a network interface and libraries for perl, ruby, and node.js [00:47] TheEmpath: eventEmitters + WS + Neural Node = o__O [00:47] SubStack: realtime with rest is hard :/ [00:47] SubStack: might be able to whip up something with couch [00:48] quest88 has joined the channel [00:48] mjr_: You can use Redis for pub/sub as well. [00:48] mjr_: Which is handy if you already needed Redis for something else. [00:48] alek_br has joined the channel [00:49] mjr_: And there are already client libraries for Redis on all of those other platforms. [00:49] mjr_: If you are willing to add Redis as a dependency, it'd be a pretty easy solution. [00:50] EGreg_: hey guys [00:50] EGreg_: http://www.slideshare.net/creationix/node-powered-mobile [00:50] EGreg_: what are those wonderful legos? [00:50] EGreg_: does anyone know? [00:50] dgraunke has joined the channel [00:50] tjholowaychuk: hahhaha [00:51] echosystm: dnode looks cumbersome [00:51] echosystm: the callbacks and links things overcomplicate [00:51] echosystm: surely it would be better to just use remote object references [00:51] SubStack: that's just the protocol [00:52] SubStack: it's entirely transparent to the user [00:52] echosystm: i know, but i'll probably end up needing to implement the protocol in other languages [00:52] echosystm: so its important that its easy [00:52] SubStack: got it, implementing dnode bindings is pretty tricky [00:52] SubStack: requires a lot of traversal trickery [00:53] echosystm: i already started a jsonrpc implementation [00:53] echosystm: it works like this... [00:53] TheEmpath: dnodes rpc is pretty solid [00:53] CrypticSwarm has joined the channel [00:53] echosystm: request: { target: "ClassName/instanceId", method: "x", params: [x] } [00:54] echosystm: so this would run method x() on 'instanceId' of type 'ClassName' [00:54] echosystm: the calls on the server would be like... ClassName.getInstance("instanceId").x(x); [00:55] echosystm: its essentially just jsonrpc with a "target" field that specifies what object you want to actually run the method on [00:55] SubStack: so it sets the `this`? [00:55] SubStack: in javascript terms [00:55] echosystm: ? [00:56] Jezek has joined the channel [00:56] Jezek: anyone use irc-js? [00:56] SubStack: does that approach work on static methods or also instances? [00:56] SubStack: Jezek: yep [00:56] echosystm: you can run class methods too... just omit the instanceId [00:56] SubStack: echosystm: but how do you keep track of instances? [00:56] echosystm: eg. { target: "Class", method: "staticMethod" ... [00:57] SubStack: and how would you get that to work in java? [00:57] echosystm: ClassName/instanceId is shorthand for { target: "ClassName", method: "getInstance", params: ["instanceId"] } [00:58] echosystm: easy [00:58] echosystm: i've actually got this working in java already [00:58] SubStack: I mean getting it to work in an abstract, general way [00:58] Jezek: trying to make a bot for pulling reddit data of sorts.. [00:58] Jezek: either way [00:58] Jezek: http://pastebin.com/1K8JUPij [00:58] echosystm: are you familiar with Expressions SubStack ? [00:58] Jezek: cant even get it to the join the channel [00:58] echosystm: shit [00:58] echosystm: fire alarm [00:58] Jezek: of course i have the info filled in [00:58] echosystm: ugh [00:58] echosystm: cya dudes [00:59] EGreg_: dnode seems ok to me but was buggy in our testing [00:59] echosystm: bbs [00:59] Jezek: go already [00:59] Jezek: lol [00:59] SubStack: EGreg_: buggy how? [00:59] SubStack: tests please :p [00:59] EGreg_: echosystm: are you looking to make a client for dnode in... php? [00:59] EGreg_: substack: did you develop dnode? [00:59] SubStack: php wouldn't be so bad actually since it has anonymous functions [00:59] SubStack: yep! [00:59] eee_c1 has joined the channel [01:00] EGreg_: I personally think it's a great idea, but our PHP needs to tell Node.js stuff and we are doing it through HTTP on a TCP socket [01:00] Jezek: SubStack, do you have any short examples i can look at? [01:00] EGreg_: because I don't see an easy way to implement DNode interface in PHP [01:00] EGreg_: SubStack: I think it's an awesome idea!! And you did a great job [01:00] SubStack: Jezek: well I wrote this http://github.com/substack/rowbit [01:00] EGreg_: But there are still a couple things that need to be done. [01:00] pHcF has joined the channel [01:00] dgraunke has left the channel [01:01] Jezek: oh well im using this other system [01:01] EGreg_: I think DNode is an awesome idea, let me see what was buggy [01:01] techwraith has left the channel [01:01] SubStack: 774 lines of expresso code in test/ [01:01] Jezek: and i cant seem to figure out the problem [01:01] EGreg_: substack: can you see a reason to use dnode though for php->Node.js? [01:01] SubStack: Jezek: there's also jerk [01:02] SubStack: based on irc=js I think [01:02] SubStack: s/=/-/ [01:02] Jezek: bleh i'd like to get irc-js working before installing other things [01:02] SubStack: EGreg_: sure, to hook together a front-end legacy php thing with some node.js backend/websockets stuff it would be handy [01:02] TheEmpath: Best feeling in the world [01:02] EGreg_: substack: msg [01:03] Jezek: do i have to open up a port? [01:03] TheEmpath: Spending 5 hours fixing a problem, fixing it, shutting down the computer, turning it back on, running the exact same script you had fixed 24 hours ago, and the exact same problem is still there [01:03] TheEmpath: SO AWESOME [01:03] EGreg_: hehe mystical [01:03] Jezek: seems like the server i want to connect to is on 6667 [01:03] techwraith has joined the channel [01:04] TheEmpath: and whats even BETTER [01:04] TheEmpath: is when you hit this problem, shut down the server, start it again, and the problem is fixed [01:04] TheEmpath: i love magic! [01:04] TheEmpath: does v8 cache anything from node? [01:05] tokumine has joined the channel [01:07] zemanel: TheEmpath: did you unplug the server and yelled at it after shutdown? usually works too [01:07] bruce_ has joined the channel [01:07] zemanel: you need to show them who's the boss [01:09] alyoshak has joined the channel [01:09] stepheneb has joined the channel [01:11] pquerna: did i hear its time for beer [01:11] msekimur_ has joined the channel [01:11] Jezek: yes [01:13] softdrink has joined the channel [01:14] murz has joined the channel [01:15] megana has joined the channel [01:16] softdrink: any other recommendations like backbone or sammy? [01:16] Blackguard has joined the channel [01:17] ShawnFerry has joined the channel [01:19] echosystm: ok, back [01:19] echosystm: SubStack: to implement the jsonrpc thing i stated above is really easy [01:19] meso has joined the channel [01:20] echosystm: Expression x = new Expression(classOrObject, "method", params); [01:20] echosystm: x.execute(); [01:20] SubStack: echosystm: I mean how to do keep track of instances? [01:20] echosystm: then just return x.getValue(); in a normal jsonrpc response [01:20] SubStack: and also how are you planning to deal with return values? [01:21] echosystm: see above [01:21] ben_alman has joined the channel [01:21] echosystm: it also allows you to do fully event driven programming [01:22] echosystm: eg. lets say a client has an object like TextFieldEventHandler/20 [01:22] echosystm: and we want the server to run setText() on that event handler when something happens [01:22] echosystm: the client would just register its object reference with the server [01:22] SubStack: in dnode all of that happens automatically [01:22] SubStack: without having to explicitly register anything [01:23] SubStack: or even to change the programming model at all except to use CPS [01:23] echosystm: eg. { target: "/Some/object", method: "addListener", params: ["TextFieldEventHandler/20"] } [01:23] EGreg_: SubStack: you should also add the ability to add new methods to your interface at runtiem [01:23] echosystm: this is all abstracted... to the user it just looks like remoteObject.addListener(localObject); [01:24] EGreg_: ACTION wants to be able to run Node.js out of the box with Spark and DNode, basically having an out-of-the-box, multi-core, distributed machine where your code runs on the client or on any node! WHOO [01:24] echosystm: theres no javascript etc. that has to be sent along the link [01:24] EGreg_: How far are we from that? [01:24] echosystm: just object references [01:24] EGreg_: wait, so DNode can even do remoteObject.on('foo', callback) ? [01:25] SubStack: EGreg_: well you can have functions that return custom objects to their callbacks [01:25] EGreg_: whether you are in the browser or Node.js? [01:25] SubStack: replication is a bit tricky [01:25] SubStack: EGreg_: yep [01:25] EGreg_: sweet. what do you mean by replication? [01:25] SubStack: replication meaning mirroring changes to data strctures on both sides of the wire [01:25] SubStack: it's a hard problem [01:27] SubStack: EGreg_: that callback could even be supplied with callbacks from the arguments to remoteObject.emit [01:27] SubStack: the wrapping happens recursively [01:27] maushu_ has joined the channel [01:30] mjr_: EGreg_: if you want an arbitrarily distributed k/v store, check out Riak. It's got an HTTP interface, so it's easy to use from node. [01:32] zentoooo has joined the channel [01:36] Insanity5902 has joined the channel [01:36] possibilities has joined the channel [01:38] meso has joined the channel [01:42] Aria has joined the channel [01:43] Jeffrey_ has joined the channel [01:44] megana has left the channel [01:46] Jeffrey_: I am having a problem with the net.Stream() object. I am using it to code a real time client and communication with the server is being weird. I can connect and login(write() the login packet) and it gets sent and I get the response. Then every second the server sends a heartbeat signal that is parsed by the 'data' event and then I send back the responding heartbeat. That all works fine, the problem comes when I start trying to send o [01:46] Jeffrey_: data. For example if I try and send the packet that initiates a chat the packet is never sent. Can anyone tell me why my heartbeats being sent but whenever I try to send any other command it is never sent? [01:50] bob_: what is login()? [01:50] jacobolus has joined the channel [01:51] Jeffrey_: I just mean that for the login I end up writing to the socket and it has no problem sending it because I get a response... I have looked at tcpdump while trying to debug this and the heartbeats are being sent but whenever I try and write something else it is never sent... Its like the heartbeats overwrite everything. [01:54] benburkert has joined the channel [01:55] sprout has joined the channel [01:57] abiraja has joined the channel [01:57] dannycoates has joined the channel [01:57] dguttman has joined the channel [01:58] Wyverald has joined the channel [01:59] AAA_awright_ has joined the channel [02:00] Nohryb_ has joined the channel [02:02] Jeffrey_: My question rephrased: http://groups.google.com/group/nodejs/browse_thread/thread/ca7563b5f941c4ab [02:04] Nohryb_ has joined the channel [02:05] pHcF: anyone got this error with MANY http external requests? net:907 [02:05] pHcF: self.fd = socket(self.type) [02:05] pHcF: ^ [02:05] pHcF: Error: EMFILE, Too many open files [02:05] pHcF: like a connection to google [02:07] Jezek: el oh el [02:07] pHcF: yeah, lol [02:08] pHcF: but like, MANY connections to google [02:09] brianleroux has joined the channel [02:12] bob_: ? [02:13] pHcF: i have a script that connects to google [02:13] pHcF: and download / [02:13] pHcF: and show the content in the screen [02:13] pHcF: the thing is that when i run this connection like 1200 times, i got this error [02:14] ShawnFerry has joined the channel [02:14] rwaldron_ has joined the channel [02:17] cardona507 has joined the channel [02:18] mjr_: pHcF: ulimit -n 8192 [02:19] elijah-mbp has joined the channel [02:21] JusticeFries has joined the channel [02:22] banjiewen has joined the channel [02:27] bob_: whats the ebst db system for node? [02:27] arpegius has joined the channel [02:27] SubStack: for what purpose? [02:29] mw has joined the channel [02:29] bob_: something like mysql or sqlite [02:29] SubStack: that's not a purpose [02:29] bob_: but maybe only for the sesion of the programs life [02:29] bob_: i want to store data [02:30] bob_: not key value [02:30] pitrp has joined the channel [02:31] jakehow has joined the channel [02:31] bob_: or maybe key value [02:31] bob_: must be able to hold a lot of data [02:32] EGreg_: Hey I left but then I had a thought... and came back to share it before I really have to go :) [02:33] Jeffrey_: I have a problem noted here -> http://groups.google.com/group/nodejs/t/ca7563b5f941c4ab . Anyone have any ideas? [02:33] bob_: ^^ [02:34] EGreg_: SubStack - your .seq inspired me to make my two functions into a library... Q.wait(callback, slots), Q.get(getter, callback, throttle) [02:34] SubStack: \o/ [02:35] EGreg_: That way it will do all of the stuff yours does including throttling, but in a more general way. It will require nesting, true. But it will let you throttle on arbitrary objects (like semaphores) and use results of previously returned objects. [02:35] EGreg_: At least I think.. :P [02:36] EGreg_: hmm, it's kinda gonna be like node-lazy [02:36] EGreg_: except more general than that too... I wonder if I can pull it off... we'll see. [02:36] SubStack: write lots of tests anyways [02:36] EGreg_: See you guys tomorrow :) he he he he [02:36] EGreg_: with what, expresso? [02:36] SubStack: hard to get this stuff correct without them [02:37] SubStack: with whichever testing framework [02:37] EGreg_: what do you use? [02:37] SubStack: expresso [02:37] EGreg_: cool :) [02:38] EGreg_: oh I have a question! [02:38] EGreg_: is it possible to find out how many parameters a callback function has [02:38] EGreg_: if it's passed to your function [02:38] SubStack: f.length [02:38] EGreg_: I wonder if it works in all modern javascript engines [02:38] Jeffrey_: What does this usually mean - "node.js:50 throw e; // process.nextTick error, or 'error' event on frist tick - Maximum call stack size exceeded." [02:38] SubStack: v8: (function (x, y) {}).length [02:38] v8bot: SubStack: 2 [02:38] EGreg_: sweet :) works in v8 [02:38] SubStack: but of course the callback could read `arguments` directly itself [02:38] bob_: SubStack: so any advice on the db? [02:39] EGreg_: aha ECMA 262 (Javascript 1.1) [02:39] EGreg_: is that good? I dunno [02:39] EGreg_: no, not arguments.length. function.length [02:39] EGreg_: which is the # of parameters [02:39] SubStack: bob_: well there are already middlewares for doing web sessions [02:40] SubStack: if that's what you need [02:40] DTrejo has joined the channel [02:40] EGreg_: v8: (function (x, y) { print arguments.length }) (1, 2, 3) [02:40] v8bot: EGreg_: SyntaxError: Unexpected identifier [02:40] jchris1 has joined the channel [02:40] EGreg_: v8: (function (x, y) { print(arguments.length) }) (1, 2, 3) [02:40] v8bot: EGreg_: CONSOLE: [3], OUTPUT: undefined [02:40] SubStack: I usually just keep data around in an object until I actually need persistence across restarts [02:40] EGreg_: v8: (function (x, y) { print(arguments.length) }).length [02:40] v8bot: EGreg_: 2 [02:41] SubStack: v8: function f (x, y) { return arguments.length }; [ f.length, f(1,2,3) ] [02:41] v8bot: SubStack: [2, 3] [02:44] stepheneb has joined the channel [02:44] benburkert has joined the channel [02:45] eee_c has joined the channel [02:47] captain_morgan has joined the channel [02:48] EGreg_: v8: var z = {}; function (x) { x.y = 'z'; } (z.x) ; z [02:48] v8bot: EGreg_: SyntaxError: Unexpected token ( [02:48] EGreg_: v8: var z = {};( function (x) { x.y = 'z'; }) (z.x) ; z [02:48] v8bot: EGreg_: TypeError: Cannot set property 'y' of undefined [02:48] EGreg_: v8: var z = {}; function (x) { x = 3; } (z.x) ; z [02:48] v8bot: EGreg_: SyntaxError: Unexpected token ( [02:48] DTrejo: Hi everyone, I have a question: at the moment I use http-proxy to run multiple apps on one server with subdomains: is there any easy way to add more apps without having to edit the proxy server running on port 80? [02:48] EGreg_: v8: var z = {};( function (x) { x = 3; } )(z.x) ; z [02:48] v8bot: EGreg_: {} [02:49] DTrejo: v8: console.log(__dirname) [02:49] v8bot: DTrejo: ReferenceError: __dirname is not defined [02:49] deedubs has left the channel [02:50] dajobe has left the channel [02:51] DTrejo: do you guys use a different setup to run multiple apps on one domain? [02:53] technoweenie has joined the channel [02:55] alek_br has joined the channel [02:55] megana has joined the channel [02:55] brianleroux has joined the channel [02:56] megana: how can I do a query in a loop and then do something once all the queries finish? [02:56] jvolkman_ has joined the channel [02:56] technowe_ has joined the channel [02:56] twoism has joined the channel [02:56] achristianson has joined the channel [02:58] SubStack: megana: looping over a list? [02:58] Jeffrey_: What does this mean? node.js:50 [02:58] Jeffrey_: throw e; // process.nextTick error, or 'error' event on first tick [02:58] megana: yeah… I guess I have to some kind of counter action [02:58] technoweenie has joined the channel [02:58] SubStack: megana: no I mean do you know how many items beforehand? [02:58] megana: form.files.length [02:58] DTrejo: megana: http://caolanmcmahon.com/async.html [02:58] DTrejo: might help [02:59] pitrp: Hi *, has anyone tried to compile node-v0.3.1 on cygwin? What shall I expect? Zomies slamming my door? [02:59] megana: that's neat [02:59] SubStack: megana: I wrote this too http://github.com/substack/node-seq [02:59] ShawnFerry has joined the channel [02:59] SubStack: there's also step: http://github.com/creationix/step [03:01] DTrejo: megana: if you use async.parallel, first you can make a json object containing all the functions you want to execute, then you can send them all off for computation. dunno if that helps [03:01] SubStack: a json object? [03:01] DTrejo: * object [03:01] megana: thanks [03:01] DTrejo: I suppose [03:01] megana: async looks neat [03:02] mjr_ has joined the channel [03:02] SubStack: with seq you could do Seq().extend(items).parEach(function (item) { somethingAsync(this) }).seq(function (items) { /* ... */ }) [03:02] SubStack: anyhow! [03:02] SubStack: need to get this proxy stuff done tonight [03:02] DTrejo: SubStack: you win the helping war :) also your startup is awesome [03:03] SubStack: aw shucks [03:03] SubStack: really I'm just procrastinating [03:03] castral has joined the channel [03:04] DTrejo: SubStack: what proxy stuff are you working on? [03:04] Guest52176: will cloud9ide hosted version be ready soon? [03:05] SubStack: DTrejo: a reverse proxy thing so people can use browserling with their web services running on localhost [03:05] DTrejo: interesting [03:09] SubStack: stupid connection: close is getting ignored >_< [03:13] bentruyman has joined the channel [03:13] megana: in async, why does forEach's iterator need a callback [03:14] DTrejo: megana: for when it is all done, I think [03:15] DTrejo: I've been looking at paynode, but not sure which payment gateway to choose [03:15] Jeffrey_: In a net.Stream() can you only write to the socket in the 'data' event? [03:16] DTrejo: (https://github.com/jamescarr/paynode) [03:16] EyePulp has joined the channel [03:17] technoweenie has joined the channel [03:18] ShawnFerry has joined the channel [03:19] mjr_: megana: mostly because JavaScript uses functions for nearly everything. [03:19] mjr_: megana: the callback takes two extra args as well that are scoped just to the callback, array pos, and the array itself. [03:20] mjr_: Jeffrey_: you can write to a stream whenever you like. [03:20] Jeffrey_: mjr_: Will you take a look at http://groups.google.com/group/nodejs/browse_thread/thread/ca7563b5f941c4ab please. [03:22] mjr_: I saw it on the list. I don't understand the issue. [03:24] mjr_: So the issue is that you don't get a drain event when you are expecting one? [03:24] shachaf has joined the channel [03:25] Jeffrey_: Basically if you take a look at the code I posted any conn.write()s that I call from within any event actually writes to the socket. Any write() call outside of the events like in the function requestChat doesn't ever get actually sent... I used tcpdump to check it. [03:25] Jeffrey_: Forget about drain. [03:26] mscdex: drain baby drain! [03:26] mjr_: I'll bet you just have a scope thing [03:26] Jeffrey_: But when I check the conn.write() call outside the event it still returns true. [03:26] Jeffrey_: Take a look at the code I posted... It is the exact code I am using. [03:27] pydroid has joined the channel [03:27] mjr_: The way you've got that immediate invocation thing is a little suspicious [03:27] mjr_: Are you sure conn refers to the same thing in there? [03:28] Jeffrey_: Checking.... [03:28] laurelreitman has joined the channel [03:28] mjr_: You return an object literal with requestChat in it, but does that work? [03:28] mjr_: Shouldn't it be return { requestChat: this.requestChat, close: this.close }? [03:29] Jeffrey_: No I know that that works, because I can call the methods without problems. [03:29] brianleroux has joined the channel [03:29] evanmeagher has joined the channel [03:31] Jeffrey_: When I do a console.log(Chat) I get.... [03:31] Jeffrey_: { requestQuote: [Function], dynamicQuotes: [Function], stopQuotes: [Function],close: [Function] } [03:31] Jeffrey_: Well those are the methods I have in that class... But the way I am setting it up works. [03:32] Jeffrey_: And when I console.log(conn) from within my method I do get the correct conn object. [03:33] Jeffrey_: So we are back to the idea that I can call conn.write(""), but it never gets sent over the wire unless I call conn.write() from within one of the conn closures. [03:34] Jeffrey_: mjr_: Any idea? [03:34] mjr_: looking at it [03:35] mjr_: Your error listener causes an infinite loop [03:35] mjr_: Not this issue, but an issue [03:36] mjr_: Also, are you expecting that this will work like a "class" where you could ahve more than one of these Chat objects? [03:36] Jeffrey_: No I just want a singleton. [03:37] cnus8n has joined the channel [03:38] mjr_: oh, "this" inside of Chat() is the global object [03:38] mjr_: That's why returning that object that way worked. [03:38] Jeffrey_: Yeah. [03:38] dannycoates has joined the channel [03:39] rchavik has joined the channel [03:42] mjr_: Jeffrey_: sorry, gotta run. Maybe I can look at it later. [03:42] Jeffrey_: Alright cool thanks. [03:42] mbrochh has joined the channel [03:46] siculars has joined the channel [03:49] mtngrown has joined the channel [03:55] langworthy has joined the channel [03:58] mattcodes has joined the channel [03:58] bruce_ has joined the channel [04:01] daviddoolin has joined the channel [04:05] chrischris has joined the channel [04:06] shripadk has joined the channel [04:07] max has joined the channel [04:07] Dreamer3 has joined the channel [04:07] m32311 has joined the channel [04:08] Dreamer3 has joined the channel [04:08] Dreamer3 has joined the channel [04:10] alek_br has joined the channel [04:11] ShawnFerry has joined the channel [04:11] arpegius has joined the channel [04:13] megana has left the channel [04:15] sprout has joined the channel [04:18] sh1mmer has joined the channel [04:20] cafesofie has joined the channel [04:21] zentoooo has joined the channel [04:23] sechrist has joined the channel [04:25] technoweenie has joined the channel [04:32] alek_br_ has joined the channel [04:36] YellowLeaks has joined the channel [04:37] YellowLeaks: What's the best node.js module for Postgresql ? [04:40] slloyd has joined the channel [04:42] Nohryb_ has joined the channel [04:43] arrty has joined the channel [04:44] jacobolus has joined the channel [04:47] Guest52176: anyone from cloud9ide here? [04:48] bob_: try theie irc chann [04:49] bob_: miksago: you around? [04:52] bob_: anyone know about miksago/node-websocket-server? [04:52] hmm___ has joined the channel [04:52] bob_: im getting this error on long time with out activity http://pastebin.com/wnNbGuSe [04:52] Nohryb has joined the channel [04:57] hassox has joined the channel [04:59] twoism has joined the channel [04:59] jacobolu_ has joined the channel [05:03] omygawshkenas has joined the channel [05:05] cardona507 has joined the channel [05:06] alexfner has joined the channel [05:08] Floxxx: bob_: i don't know that module, but the error means the stream is not receiving any data at all for a period of time [05:08] Floxxx: it should receive some kind of data to keep the connection alive (heartbeat) [05:09] bob_: maybe a setInterval of 5 min? [05:09] Floxxx: i don't know how long the stream timeout is, but yes, something like that [05:09] alek_br has joined the channel [05:10] Floxxx: or try stream.setKeepAlive(true); [05:11] bob_: yes thats what i was looking for [05:11] Floxxx: that should send keep-alive packets on a regular interval automatically [05:12] modular has joined the channel [05:12] aguynamedben has joined the channel [05:16] ossareh has joined the channel [05:26] somnium` has joined the channel [05:27] mikew3c_ has joined the channel [05:28] somnium`: is this a bug? `console.log("%d")' => NaN [05:29] somnium`: I guess not, console.log ~= printf? [05:29] evanmeagher has joined the channel [05:32] Floxxx: yes @ somnium` [05:32] Floxxx: it will parse printf strings [05:32] hassox has joined the channel [05:33] Floxxx: but i guess a better way would be to only do that if there's a second parameter [05:33] Floxxx: console.log("%d", 1); [05:34] somnium`: ok, I just tried with the second param. was a bit baffled when I first saw it. [05:35] Nohryb_ has joined the channel [05:37] gf3 has joined the channel [05:37] monokrome has joined the channel [05:37] monokrome: hey [05:38] monokrome: Does anyone know how I can provide an error response with this? [05:38] monokrome: http://paste.pocoo.org/show/305031/ [05:38] monokrome: or if there's generally a better way to do this (I'm sure there is) [05:39] monokrome: Basically, all I want to do is provide this method a template name, a template directory array, and a callback function [05:39] monokrome: and it should pass the name of the first file found in the template directories to the callback [05:40] Nohryb has joined the channel [05:45] JusticeFries has joined the channel [05:46] Nohryb_ has joined the channel [05:50] Nohryb has joined the channel [05:50] pydroid has joined the channel [05:52] ShawnFerry has joined the channel [05:52] arrty has joined the channel [05:55] esigler has joined the channel [05:56] tylerstalder has joined the channel [05:58] pydroid has joined the channel [05:58] shinmei has joined the channel [05:58] robotarmy has joined the channel [06:01] Nohryb_ has joined the channel [06:02] sprout has joined the channel [06:05] datapimp has joined the channel [06:06] hassox has joined the channel [06:06] Nohryb has joined the channel [06:08] hassox has joined the channel [06:08] sriley has joined the channel [06:09] ybit has joined the channel [06:09] dgathright has joined the channel [06:10] zomgbie has joined the channel [06:10] langworthy has joined the channel [06:15] pydroid has joined the channel [06:16] confoocious has joined the channel [06:16] confoocious has joined the channel [06:16] Nohryb_ has joined the channel [06:17] cnus8n has joined the channel [06:19] alek_br has joined the channel [06:20] robmason has joined the channel [06:23] Nohryb has joined the channel [06:24] andrzejsliwa has joined the channel [06:25] jacobolus has joined the channel [06:26] dannycoates has joined the channel [06:27] Nohryb_ has joined the channel [06:32] langworthy has joined the channel [06:32] DTrejo has left the channel [06:32] Nohryb has joined the channel [06:33] googol has joined the channel [06:37] Nohryb has joined the channel [06:45] Nohryb_ has joined the channel [06:52] ewdafa has joined the channel [06:53] justinlilly: to access an object a level above a closure's scope, I need to effectively pass in the context, right? [06:55] Nohryb has joined the channel [07:05] ph^ has joined the channel [07:12] cardona507 has joined the channel [07:12] derren13 has joined the channel [07:13] faust45 has joined the channel [07:14] springify has joined the channel [07:15] andrzejsliwa has joined the channel [07:16] alexfner: hmm [07:16] alexfner: throw some thoughts at me [07:17] alexfner: would it be possible to build an amazon ec2 instance that load balances across node instances? [07:17] alexfner: node.js instances* [07:17] mbrochh has joined the channel [07:18] mbrochh has joined the channel [07:18] isufy has joined the channel [07:19] chapel: alexfner: of course [07:19] alexfner: now would it be realistic to expect acceptable performance for an application that could have anywhere from 1 to 100,000 concurrent users? [07:20] alexfner: supposing it can auto launch new node instances [07:20] chapel: well, ec2 I heard has subpar performance per instance [07:20] alexfner: is there anywhere else? Anywhere better? [07:21] sprout has joined the channel [07:22] chapel: rackspace has similar provisioning [07:22] chapel: no.de will be dedicated node instancing [07:22] chapel: nodejitsu probably will have a similar setup [07:22] chapel: to no.de [07:23] alexfner: hmm, need something that can scale rapidly... [07:24] chapel: check out rackspace [07:24] isufy: anybody know how create and return a buffer in a wrapped c++ function? [07:25] SamuraiJack has joined the channel [07:25] justinlilly: I have an object who has a method {foo: function () {}, bar: function () {}) in the bar() function, how can I reference foo()? [07:25] justinlilly: the `this` keyword seems to just reference the function object itself. [07:25] aubergine has joined the channel [07:29] CrypticSwarm has joined the channel [07:32] justinlilly: ACTION is clearly missing an important detail :-/ [07:34] mscdex: justinlilly: unless you know the name of the variable that object is being assigned to, i don't think you can [07:36] shinmei has joined the channel [07:36] justinlilly: mscdex: I'm basically resolving to passing the outer scope into the function being called. [07:36] justinlilly: though I'm not happy about it. [07:37] datapimp: justinlilly, why not add those methods inside of a function [07:37] datapimp: like..... [07:37] datapimp: function(){ ... this.bar = function(){ }; this.foo = function(){ } } [07:38] justinlilly: datapimp: that was an overly simplified version of what I'm actually trying to do. [07:38] mikedeboer has joined the channel [07:38] justinlilly: I'm trying to build a plugin system for an irc bot. The bot object stores some state that I'd like to be accessible from the plugin. [07:38] SubStack: var obj = { foo : function () {}, bar : function () { obj.foo() } }; [07:38] justinlilly: SubStack: I'm doing something akin to that now. directly referencing obj seems weird to me. Is it normal in js land to do that? [07:38] SubStack: yes [07:39] SubStack: some other tricks: you can use .bind() to set `this` no matter how the function ultimately gets executed [07:40] justinlilly: https://github.com/justinlilly/imb0t -- I would greatly appreciate a code review (~230 lines of code) if someone would be so kind. [07:41] prinzdezibel has joined the channel [07:41] justinlilly: its an irc bot framework with newly added plugins. Specifically, I dislike passing bot into the callback for lib/imbot.js:21 and its usage in imbot-logging.js:9-10 [07:43] ph^ has joined the channel [07:44] datapimp: justinlilly: i like this pattern too https://gist.github.com/741745 [07:45] justinlilly: seems.. boilerplaty? [07:46] datapimp: adjust for your needs, its served me well a few times [07:47] justinlilly: thx. Might bring it up with the local js group and ask for a legitimate code review. [07:49] datapimp: with the code i showed you you could have multiple instances of the bot and you can make sure everything stays sane [07:49] _janne has joined the channel [07:50] justinlilly: I don't think having multiple bots fits my usecase. Reading a bit about bind() which seems to have promise. [07:51] SubStack: justinlilly: I would just have the api take in a constructor function [07:51] SubStack: then you can reference the other methods locally from within that constructor [07:52] SubStack: moo.plugin(function () { this.x = function () {}; this.y = function () {} }) [07:53] SubStack: then inside moo.plugin(f) you can var plugin = new f [07:53] SubStack: then when you do plugin.x `this` will point to plugin inside the constructor [07:53] justinlilly: What is moo in this case? [07:53] SubStack: some irb bot object [07:54] SubStack: *irc [07:54] justinlilly: got it. [07:54] GasbaKid has joined the channel [07:54] SubStack: of course, if you later call plugin in another context it gets wonky, but you can protect against that by binding each of the methods explicitly to `plugin` [07:55] SubStack: but it shouldn't be necessary if you just deal with the plugin object internally [07:55] datapimp has left the channel [07:55] eponym has joined the channel [07:56] farkob has joined the channel [07:57] eponym has left the channel [07:59] matjas has joined the channel [08:01] mraleph1 has joined the channel [08:01] d0k has joined the channel [08:08] mikeal has joined the channel [08:08] mAritz has joined the channel [08:13] bahamas has joined the channel [08:14] jacobolus has joined the channel [08:15] ilpoldo has joined the channel [08:16] Druid_ has joined the channel [08:17] frodenius has joined the channel [08:17] frodenius has joined the channel [08:22] tprice has joined the channel [08:26] modular has joined the channel [08:26] virtuo has joined the channel [08:32] beawesomeinstead has joined the channel [08:32] beawesomeinstead has joined the channel [08:33] tekky has joined the channel [08:33] yozlet has joined the channel [08:33] romeo_ordos has joined the channel [08:33] romeo_ordos has left the channel [08:33] [AD]Turbo has joined the channel [08:39] sstreza has joined the channel [08:39] stephank has joined the channel [08:46] captain_morgan has joined the channel [08:46] benburkert has joined the channel [08:49] tprice: echo echo echo.. [08:52] mattcodes has joined the channel [08:54] mAritz: echo.... [08:55] SamHasler has joined the channel [08:56] Lorentz has joined the channel [08:59] derren13 has joined the channel [09:03] Ond has joined the channel [09:04] mikedeboer has joined the channel [09:05] marlun has joined the channel [09:06] ttpva has joined the channel [09:06] adambeynon has joined the channel [09:11] aklt has joined the channel [09:12] MrGimel has joined the channel [09:13] sriley has joined the channel [09:15] prinzdezibel: How are required modules loaded from the filesystem under the hood? Is this functionality provided by V8 engine? [09:15] MrGimel: prinzdezibel: no [09:17] frodenius: prinzdezibel㇀ they are read like any other file and then wrapped in a function [09:17] prinzdezibel: MrGimel: I'm not aware of a javascript function to load a file from the filesystem. Am I missing something? [09:17] prinzdezibel: Maybe because I only did web development so far [09:17] frodenius: node has a module for that [09:19] mscdex: prinzdezibel: v8 is purely the javascript code interpreter. node does everything else [09:20] prinzdezibel: A c/c++ module? [09:20] frodenius: yep, it's a node builtin [09:20] prinzdezibel: ok, now it gets clearer. [09:20] prinzdezibel: Thank you. [09:23] prinzdezibel: frodenius: Can I use node.js client side as well and if so, the require would result in a http request ? [09:24] frodenius: nope you cannot. node is purely server side [09:24] prinzdezibel: ok [09:24] frodenius: though you can have the same javascript code in the browser and on the server [09:24] frodenius: some at least [09:24] prinzdezibel: how? [09:24] prinzdezibel: ok, I know [09:25] prinzdezibel: the one is required (server side) , the other requested [09:25] frodenius: there are libs like RequireJS that bring commonJS modules to the browser [09:25] frodenius: so you can still do require(..) in the browser and the lib will figure out what to do [09:25] prinzdezibel: interesting. [09:26] peutetre has joined the channel [09:26] prinzdezibel: sounds a good thing [09:28] prinzdezibel: So now serverside Javascript is finally getting real, it seems [09:28] frodenius: though note that the call convention is different to node's require, because it is asynchronous [09:28] prinzdezibel: ok [09:28] hassox has joined the channel [09:28] frodenius: yep, it has been for quite some time now, with rhino at least [09:28] frodenius: but you still had to do much yourself [09:29] prinzdezibel: yes, I've looked around yesterday [09:29] prinzdezibel: and it seems there are not much web development frameworks around [09:29] prinzdezibel: node.js is more low level focused, it seems [09:30] frodenius: yep [09:32] markwubben has joined the channel [09:33] [AD]Turbo has joined the channel [09:36] matjas_ has joined the channel [09:36] peutetre has joined the channel [09:36] pydroid has joined the channel [09:37] pietern has joined the channel [09:39] bzinger has joined the channel [09:39] aklt_ has joined the channel [09:40] bzinger_ has joined the channel [09:41] teemow has joined the channel [09:42] TomY has joined the channel [09:43] pydroid has joined the channel [09:46] bluegene has joined the channel [09:48] pydroid has joined the channel [09:49] Yuffster has joined the channel [09:52] christophsturm has joined the channel [09:52] doffm: prinzdezibel: That might not be a bad thing. Everyone working with nodejs is adept at javascript, so they are more likely to do much of the heavy lifting at the client side. [09:53] pydroid has joined the channel [09:56] prinzdezibel: doffm: right. But a framework can speed up things as well if you don't need the ultimate flexibility. [09:56] prinzdezibel: but I'm sure they are out there somewhere [09:57] masahiroh has joined the channel [09:58] doffm: prinzdezibel: I havent used it at all, but 'express' is the one I hear about most often. [09:58] killfill has joined the channel [09:58] pydroid has joined the channel [09:59] chapel: express yeah [09:59] chapel: probably the most popular one [09:59] chapel: and very robust imo [09:59] mikedeboer_ has joined the channel [09:59] chapel: but as much as it is a framework, it can totally get out of the way and you can do whatever you need/want [10:01] tisba has joined the channel [10:03] T-Co: Is there already a viable memcache lib available? [10:04] delapouite has joined the channel [10:06] Ond: How's this look, T-Co https://github.com/vanillahsu/node-memcache [10:07] altamic has joined the channel [10:07] mies has joined the channel [10:08] Rv: hi [10:08] Ond: ACTION tips hat [10:09] mbrochh: i want to install node.js on my linode server [10:09] mbrochh: which branch is recommended? [10:09] daglees has joined the channel [10:10] tekky has joined the channel [10:11] sriley_ has joined the channel [10:12] Yuffster has joined the channel [10:12] pydroid has joined the channel [10:12] killfill has joined the channel [10:14] sth: I like 0.3.X but that's unstable [10:16] mikedeboer_ has joined the channel [10:18] chapel: if you are developing, you might want to get used to 0.3.x [10:19] chapel: if you have something already and runs on stable, use stable [10:19] Guest35258 has left the channel [10:21] delapouite has joined the channel [10:24] dgathright has joined the channel [10:26] saschagehlich has joined the channel [10:27] Rv: which variable i should use to render index.jade inside my layout.jade :) ? [10:27] Rv: i rails i use <%=yield%> [10:27] Rv: :> [10:28] chapel: uhh [10:28] chapel: layout.jade is just the layout [10:28] Rv: i know [10:29] chapel: body!= body [10:29] SamHasler has joined the channel [10:29] chapel: I assume thats what makes it possible [10:37] Wyverald has joined the channel [10:39] zorzar has joined the channel [10:40] zubairov has joined the channel [10:42] InsDel has joined the channel [10:43] tokumine has joined the channel [10:47] aubergine has joined the channel [10:49] saschagehlich has joined the channel [10:51] saschagehlich has joined the channel [10:59] mr_daniel has joined the channel [10:59] TomY has joined the channel [11:00] mattcodes has joined the channel [11:07] Throlkim has joined the channel [11:07] packardb has joined the channel [11:12] MattJ has joined the channel [11:13] SubStack: it would be super useful if I could trick an http.Client into using a stream that I already have open [11:13] SubStack: even better if http.Client internals would call that stream's .write() [11:15] SubStack: hah almost tricked it [11:15] stagas has joined the channel [11:19] pt_tr has joined the channel [11:21] iFire has joined the channel [11:32] killfill has joined the channel [11:32] chapel: good luck SubStack [11:33] daglees has joined the channel [11:33] tahu has joined the channel [11:34] tokumine has joined the channel [11:38] zubairov: hi all [11:38] zubairov: what would you recommend to use for XML parsing and/or XML to JSON conversion? [11:38] zubairov: I'm writing a consumer for Amazon AWS EC2 and they are serving back XML [11:40] zemanel: it's a me mario [11:47] dguttman has joined the channel [11:47] aguynamedben has joined the channel [11:52] Dreamer3 has joined the channel [11:52] Dreamer3 has joined the channel [11:53] iszak has joined the channel [12:02] mikew3c has joined the channel [12:05] saschagehlich has joined the channel [12:06] unomi has joined the channel [12:06] cognominal has joined the channel [12:12] stagas has joined the channel [12:12] izz: hey guys, Im running nodejs-amqp-example from https://github.com/jamescarr/nodejs-amqp-example [12:12] altamic has joined the channel [12:13] izz: which works fine, except when I connect with a second client (another web browser) I get Unhandled connection error: NOT_ALLOWED - attempt to reuse consumer tag '.' [12:13] izz: any ideas? [12:15] eee_c has joined the channel [12:23] matclayton has joined the channel [12:31] fly-away has joined the channel [12:32] cheney has joined the channel [12:32] cheney: hello [12:32] cheney: is it possible to install node.js with crankshaft for v8 enabled? [12:32] cheney: i am having trouble finding relevant documentation since crankshaft is only a week old [12:33] gnagno has joined the channel [12:34] gnagno: hello all [12:39] MrGimel: cheney: If you install the latest node dev version then it has V8 version 3.0 [12:39] MrGimel: That's the one with Crankshaft [12:39] StM has joined the channel [12:39] MrGimel: But you have to compile the 32 bit version of node and V8 [12:40] MrGimel: Which is probably a bit more annoying if you are on a 64 bit release of Linux [12:40] altamic_ has joined the channel [12:40] gnagno: I am trying to use nodejs in my application developed in php (I am making a little chat) everything is working so far, but I'd like to access to the cookies set by php is it possible? [12:42] pdelgallego has joined the channel [12:45] Floxxx: gnagno: you'll have to pull the cookies from the header (pretty sure there's a module for that) [12:45] christophsturm: is there a utility http client class that just returns a body and headers? [12:46] gnagno: Floxxx: I am looking in modules but I can't find the right one [12:47] cheney: MrGimel: is crankshaft enabled by default? [12:47] Floxxx: i wrote the cookie retrieval myself, you could do that if you can't find anything that's suitable [12:49] gnagno: Floxxx: did you release it? [12:49] Floxxx: no [12:51] delapouite: gnagno : https://github.com/senchalabs/connect/blob/master/lib/connect/middleware/cookieDecoder.js [12:52] gnagno: thank you delapouite [12:52] gnagno: I'd like to speak with the people who made github, I always have to copy and paste the code in gedit to be able to read it [12:53] gnagno: I have heavy sight problems and github is almost impossible to read for me [12:53] gnagno: sorry for the OT :) [12:53] Floxxx: increase font-size? [12:53] delapouite: on which browser ? [12:53] gnagno: any browser [12:53] gnagno: it's because of the colors, too much light [12:54] Floxxx: ah [12:54] hoodoos has joined the channel [12:54] delapouite: you want them to offer a dark css skin ? [12:54] gnagno: in the page delapouite kindly linked me this part is impossible to read /*! [12:54] gnagno: * Ext JS Connect [12:54] gnagno: * Copyright(c) 2 [12:55] hoodoos: hello, guys! what am I doing wrong here? http://pastebin.com/9E2qPCS5 [12:55] gnagno: I think a lot of people like me will apreciate a lot a darker css skin [12:55] delapouite: not a bad idea [12:55] chapel: gnagno: you could use custom css [12:56] chapel: though a dark option would be sweet [12:56] hoodoos: i tried to crypt it like that http://pastebin.com/fyK0CwSj, but it doesn't work either.. i'm stuck :) [12:56] christophsturm: gnagno: why not ask in #github ? [12:56] gnagno: chapel: I usually do, but this is not my pc :) [12:57] chapel: oh, chrome [12:57] chapel: you can sync your profile on the fly [12:57] gnagno: christophsturm: I think I will follow your suggestion [12:57] christophsturm: https://github.com/senchalabs/connect/raw/master/lib/connect/middleware/cookieDecoder.js or use the raw link on the right [12:57] hsuh has joined the channel [13:00] delapouite: seems like the place to dark theme proposal : http://support.github.com/discussions/site [13:00] hoodoos: any suggestions on crypto module using? [13:00] broofa has joined the channel [13:01] hsuh has joined the channel [13:01] prinzdezibel has joined the channel [13:02] angel333 has joined the channel [13:03] gnagno: thank you very much guys [13:03] hoodoos: heh, it works well with binary, not base64 [13:04] mattcodes has joined the channel [13:04] packardb has left the channel [13:05] ianward has joined the channel [13:06] ph^ has joined the channel [13:07] Phyllio has joined the channel [13:07] sepehr has joined the channel [13:12] booths has joined the channel [13:13] Dreamer3_ has joined the channel [13:13] mscdex has joined the channel [13:14] Dreamer3_ has joined the channel [13:15] mscdex: it's ridiculous how strict aol is about adherence to the oscar protocol [13:15] cheney has joined the channel [13:15] mscdex: cheney: crankshaft is available in the node master branch, but only for x86 [13:17] mscdex: it's automatically enabled [13:17] cheney: thank you mscdex [13:17] tisba has joined the channel [13:20] chapel: hmm, why is aol so strict about it? what are you trying to do? [13:23] Fullmoon has joined the channel [13:23] saschagehlich has joined the channel [13:24] mscdex: chapel: they were disconnecting me without giving any explanation when i sent a packet with a sequence number that wasn't exactly 1 higher than the previous one that was sent [13:24] davidc_ has joined the channel [13:24] chapel: ah interesting, is there an aim module for node? [13:24] mscdex: i've been trying to figure out that cause for the past week [13:24] mscdex: chapel: i'm working on one. for aim and icq [13:24] chapel: ah [13:25] chapel: well I want to make an IM proxy [13:25] chapel: if you know what I mean [13:25] pHcF has joined the channel [13:25] chapel: much like bnc is for irc [13:25] mscdex: oh [13:26] chapel: tbh my js and node skills aren't up to snuff yet, but am plugging away at other projects to learn [13:27] sepehr has joined the channel [13:27] mscdex: yeah [13:28] chapel: I really dont care if its something I could make money off of, I want it for personal usage :P [13:30] stepheneb has joined the channel [13:38] dnolen has joined the channel [13:38] mAritz: chapel: sounds like an awesome idea [13:39] chapel: yeah, thats why I thought of it :P [13:39] mattcodes has joined the channel [13:39] chapel: well we have xmpp which covers gchat/facebook/jabber [13:39] mAritz: making money off it would be difficult though, because people probably don't want to knowingly put a middleman in their IMs [13:39] chapel: yeah mAritz [13:39] chapel: the only way to make money would be to do something akin to trillian/meebo [13:40] chapel: the nice thing about node, the proxy middleware could handle both connections from real IM clients, and make a web based front end [13:40] arpegius has joined the channel [13:47] mrduncan has joined the channel [13:56] stagas_ has joined the channel [13:56] mscdex: and call it neebo! [13:57] mscdex: :> [13:57] A83 has joined the channel [13:58] stagas has joined the channel [13:58] A83: hi, just getting started with node.js development, do you recommend any framework to start out with? (I use sinatra for ruby normally) [13:59] Benvie has joined the channel [13:59] chapel: sinatra, try express [14:00] chapel: since express is sinatra for node.js basically [14:00] delapouite: true [14:00] A83: cool thanks [14:00] chapel: just remember node.js is very low level [14:00] chapel: compared to ruby on rails and similar langagues [14:00] chapel: languages [14:00] A83: ok [14:01] c4milo: chapel: well, you can't compare node.js with RoR [14:01] chapel: I know [14:01] chapel: not directly [14:01] chapel: hence why I said its low level [14:02] chapel: coming directly from other dynamic languages and frameworks, node.js is odd, hard to wrap your head around [14:03] SubStack: disagree [14:03] SubStack: coming from haskell [14:03] SubStack: and perl [14:03] SubStack: and ruby [14:03] chapel: frameworks is a key word [14:03] SubStack: node.js is refreshingly consistent [14:03] c4milo: chapel: yes, I have use perl, ruby, Java, c, c++ and erlang and I disagree [14:04] chapel: eh, well no matter, its an opinion [14:04] c4milo: chapel: yes, let's take that as an opinion : [14:04] c4milo: :) [14:04] chapel: never intended it as fact [14:05] mraleph: SubStack: do-notation will make it even more consistent :-) [14:06] c4milo: mraleph: you can develop consistently without those frameworks, just think in correct way while you are doing event driven programming [14:07] A83: do you usually develop with a node.js "published" framework or on it's own/home built framework? [14:07] pHcF: can someone please explain me why this is leaking memory? http://pastie.org/private/vd0dgjsyigiwss8xowq [14:09] mscdex: pHcF: how does rss change? [14:09] pHcF: testing.. [14:09] mscdex: generally rss is the one to look at [14:10] chapel: A83: node.js doesn't have a built in framework [14:10] chapel: outside of http.createserver [14:10] chapel: or net [14:10] chapel: so on [14:10] pHcF: mscdex: onStart i get 18395136 and in onCallback i get 19083264 [14:10] pHcF: it's leaking [14:11] pHcF: mscdex: i guess the problem is with Step [14:12] pHcF: it seems to be saving in the memory my arguments [14:12] aheckmann has joined the channel [14:12] mscdex: i'm not that familiar with Step's inner workings so i can't tell you for sure [14:12] pHcF: hmm [14:13] pHcF: there's any way to call the garbage collector? [14:13] mscdex: probably only in the debug version of node, i'm not sure [14:13] mscdex: never needed to use it :) [14:14] mscdex: explicitly [14:14] pHcF: i don't wanna use it :/ [14:15] amacleod has joined the channel [14:17] prinzdezibel has joined the channel [14:18] chapel: pHcF: maybe try SubStack's seq instead of step [14:18] chapel: I have no experience with either, but they have similar functions, seq seems simpler in a good way to me [14:18] chapel: though thats imo, and I don't know what Im talking about [14:19] pHcF: ok, i'll try it [14:20] mattcodes: gc will probably kick in automatically when there is memory pressure, at least a server GC design should, u probably dont want to call it directly [14:20] mikedeboer has joined the channel [14:20] pHcF: yeah, i really don't want to do this kind of thing [14:20] pHcF: the problem is that this seems to be a leak in Step [14:21] altamic has joined the channel [14:21] mattcodes: i doubt GC will help with a leak tho [14:21] ysynopsis has joined the channel [14:21] msilverman2 has joined the channel [14:22] wink_: step should be ok, creationix is usually pretty good about that sort of thing [14:22] wink_: are you sure its a leak and not just waiting for the gc? [14:23] pHcF: yeah im sure [14:23] pHcF: because if i use apache benchmark to perform like 1000 requests, node's memory rises fast [14:23] pHcF: really fast [14:24] wink_: how high does it reach? [14:24] pHcF: 0.5 mb per request [14:25] wink_: so 500mb total? [14:25] case__ has joined the channel [14:25] pHcF: yeah [14:25] case__: hi there [14:25] pHcF: hi [14:25] chapel: heh [14:25] aubergine has joined the channel [14:25] chapel: node's memory usage can climb fast [14:25] case__: any idea how to add etag to express responses? i've google a bit but haven't found clear solution... [14:26] chapel: but thats not a bad thing, so much as a result of async [14:26] pHcF: chapel: yep, but i'm sure there's something wrong.. [14:30] drewb has joined the channel [14:31] pHcF: well, does anyone have any other ideas? [14:32] wink_: if you comment out the entire Step() call, does it still leak? [14:33] shripadk has joined the channel [14:34] wink_: you should be able to isolate the leak pretty easily if you're sure its coming out of that function [14:35] pHcF: hmm [14:35] pHcF: i guess i know where's the problem :P [14:36] wink_: ? [14:36] pHcF: well, it's still leaking (not .5 mb, like 0.2) when i comment all the Step call [14:36] ben_alman has joined the channel [14:37] wink_: so your leak is likely further upstream [14:37] wink_: check all of your closures, they're a usual suspect [14:38] pHcF: ok [14:45] losing has joined the channel [14:46] oal has joined the channel [14:46] boaz has joined the channel [14:47] JusticeFries has joined the channel [14:48] andrzejsliwa has joined the channel [14:49] malkomalko has joined the channel [14:50] matt_c has joined the channel [14:50] BillyBreen has joined the channel [14:52] chapel: http://www.dump.com/2010/12/13/the-vendor-client-relationship-in-real-world-situations-video/ << if you didn't see it on HN [14:52] mohiam has joined the channel [14:53] cferris has joined the channel [14:55] tylerstalder has joined the channel [14:57] sivy has joined the channel [14:58] mape has joined the channel [14:59] mohiam has joined the channel [15:01] pifantastic_ has joined the channel [15:01] isaqual has joined the channel [15:04] chrischris has joined the channel [15:08] stepheneb has joined the channel [15:09] TomY has joined the channel [15:10] mattcodes has joined the channel [15:11] mraleph: c4milo: I do not use node.js so I do not actually care about frameworks or whatever :-) I just think that with more language support (like do-notation for monads) you can write cleaner callback oriented code. [15:11] captain_morgan has joined the channel [15:12] c4milo: mraleph: yeah, agree, but you can use messaging passing as well [15:12] trotter has joined the channel [15:12] femtoo has joined the channel [15:14] bzinger has joined the channel [15:15] beawesomeinstead has joined the channel [15:15] beawesomeinstead has joined the channel [15:15] ceej has joined the channel [15:17] eee_c has joined the channel [15:20] shripadk has left the channel [15:21] jY has joined the channel [15:21] slaskis has joined the channel [15:22] jY: i'm using 0.3.1 and using a child process trying to read stdout with download.stdout.addListener('data', function(data) {}); data is like when i do a console.log(data); i thought that worked before [15:24] Floxxx: jY: you have to convert data to ascii [15:24] captain_morgan has joined the channel [15:24] jY: Floxxx, with setEncoding() ? [15:24] Floxxx: data.asciiSlice(0, data.length) [15:25] jY: ok thanks [15:29] kawaz_home has joined the channel [15:32] cferris has joined the channel [15:33] chrischr_ has joined the channel [15:36] ph^ has joined the channel [15:37] mikedeboer_ has joined the channel [15:39] fermion has joined the channel [15:40] shinmei has joined the channel [15:43] teemow has left the channel [15:44] teemow has joined the channel [15:44] mscdex: jY: or data.toString('ascii') [15:45] mscdex: jY: or just data.toString() if you don't care about encoding [15:45] jY: ok thanks [15:50] hdon has left the channel [15:56] matt_c_ has joined the channel [15:57] Phyllio has joined the channel [16:00] sriley has joined the channel [16:03] KyleXY: Who was it that owned that node.js cloud service? [16:03] tanepiper: no.de? joynet does [16:04] KyleXY: that isnt it [16:04] tanepiper: nodejitsu? [16:04] KyleXY: trying to remember.. [16:04] KyleXY: no [16:04] blowery: heroku? [16:04] mape: mikeal: Seems the iTunes link for node.minutewith is broken [16:04] KyleXY: no [16:04] tanepiper: stackvm? [16:04] KyleXY: no heh [16:04] mape: The ycomb reject? [16:04] derren13: nodejscloud? [16:05] KyleXY: no no [16:05] KyleXY: I may be here for forever [16:05] herbySk has joined the channel [16:05] tanepiper: Not only that, but you've always been here [16:06] Kyso has joined the channel [16:06] KyleXY: Hmm, my phone ip [16:07] KyleXY: need to use a android client to view the userlist easier heh [16:07] wasabist has joined the channel [16:09] jchris has joined the channel [16:09] yonkeltron: has node been ported to android yet? [16:09] yonkeltron: i kind of wish there were JS bindings for android, actually [16:11] aklt has joined the channel [16:12] KyleXY: It could probably be compiled for android with bno issues [16:13] figital has joined the channel [16:13] jherdman has joined the channel [16:13] andrzejsliwa has joined the channel [16:14] jY has left the channel [16:14] strmpnk has joined the channel [16:14] tjholowaychuk has joined the channel [16:16] deepthawtz has joined the channel [16:16] daniellindsley has joined the channel [16:18] EyePulp has joined the channel [16:20] softdrink has joined the channel [16:21] kippi has joined the channel [16:21] kippi: hey [16:23] kippi: I have created a SSL http connection, on top of this I am running socket.io, when running in https I am unable to access https://fx.testserver:8081/socket.io/socket.io.js but if I run the server in none http I can access http://fx.testserver:8081/socket.io/socket.io.js [16:24] arpegius has joined the channel [16:24] matt_c has joined the channel [16:28] tfrohe has joined the channel [16:28] tfrohe: good morning [16:29] tfrohe: can someone take a look at some code for me. it runs fine but i wonder if there is something I should be doing differently. http://pastebin.com/6mqBSN28 [16:29] wasabist has joined the channel [16:29] EyePulp: afternoon folks [16:30] strixv has joined the channel [16:30] ttpva has joined the channel [16:33] kjeldahl has joined the channel [16:34] trotter has joined the channel [16:37] ybit has joined the channel [16:37] ianward has joined the channel [16:38] tahu has joined the channel [16:38] JusticeFries has joined the channel [16:39] sprout has joined the channel [16:40] ukev has joined the channel [16:42] zomgbie has joined the channel [16:43] ukev: hi [16:43] ukev: I tried to install npm [16:43] qFox has joined the channel [16:43] ukev: but on ubntu nodejs bin is called "nodejs" not "node" [16:43] ukev: eh debian (squeeze), sorry :) [16:43] gkatsev: ukev: did you install from the repo? isn't it a fairly old version? [16:44] ukev: it's 0.2.0 [16:44] ukev: https://github.com/isaacs/npm says thats ok [16:44] halfhalo: so... yes [16:44] kippi: I have created a SSL http connection, on top of this I am running socket.io, when running in https I am unable to access https://fx.testserver:8081/socket.io/socket.io.js but if I run the server in none http I can access http://fx.testserver:8081/socket.io/socket.io.js [16:44] mAritz: if you really want to keep the repo version you'll have to create an alias [16:45] ukev: I created an symbolic link [16:45] mAritz: kippi: node version/branch? [16:45] ukev: but I thought maybe npm can check this [16:46] kippi: I have tested with 0.2.5 and with v0.3.1 [16:46] pHcF: can someone clone this: https://github.com/pedrofranceschi/Blogode , run the server (node blogode.js) and do a ab (ab -r -n 10000 -c 1000 http://0.0.0.0:3000/), see the memory rising, and see why the function runPlugin (line 89) is leaking memory? [16:47] cafesofie has joined the channel [16:47] tjholowaychuk: pHcF: dont forget to NODE_ENV=production [16:47] mAritz: kippi: ssl is still not properly implemented in 0.2/0.3 [16:47] tjholowaychuk: pHcF: and you use the MemoryStore for session() (the default) [16:48] tjholowaychuk: that would be why [16:48] tjholowaychuk: and you dont need to set the "view options" with 'layout', 'layout' is the default layout :p [16:48] cnus8n has joined the channel [16:48] msekimura has joined the channel [16:48] pHcF: oh tjholowaychuk tks [16:49] pHcF: tjholowaychuk: wait, but im just using session for admin [16:49] tjholowaychuk: pHcF: I see the session middleware in there [16:49] msekimura has joined the channel [16:49] tjholowaychuk: it doesnt matter _where_ you use it [16:49] kippi: mAritz: when will SSL support coming? [16:50] mAritz: not sure, sorry. i think pquerna and tim smart have done quite some work on it and they might even be done with it, but it's up to ry to implement it in master. [16:51] mAritz: oh, sorry for highlight pq [16:51] davglass has joined the channel [16:51] booths has joined the channel [16:51] UHMA has joined the channel [16:51] softdrink: Faker.Company.bs() makes for great task names [16:52] technoweenie has joined the channel [16:53] Floxxx: ukev: try 'npm update npm' [16:53] Floxxx: later version might detect it [16:54] ukev: Floxxx, npm is not installed... the installer does not work [16:55] nyxtom has joined the channel [16:55] ukev: node cli.js cache clean [16:55] ukev: make: *** [uninstall] Error 1 [16:55] Fullmoon has joined the channel [16:56] jchris has joined the channel [16:56] pHcF: tjholowaychuk: even using the MemoryStore (like the example in expressjs.com), it is leaking memory [16:56] tjholowaychuk: pHcF: no im saying dont use MemoryStore [16:57] tjholowaychuk: it stores in memory lol [16:57] pHcF: oh lol [16:57] tjholowaychuk: use redis etc [16:57] tfrohe: can someone take a look at some code for me. it runs fine but i wonder if there is something I should be doing differently as I am very new to node. http://pastebin.com/6mqBSN28 [16:59] CrypticSwarm has joined the channel [16:59] beta has joined the channel [16:59] stephank has joined the channel [16:59] nyxtom has joined the channel [17:00] UHMA: tfrohe: rather than calling jquery(this) so many times, I would say var el = jquery(this)... you'll have better performance [17:00] UHMA: any call the jquery will be slow [17:01] tfrohe: is there a more efficient method that using jQuery here? I was just used to using jQuery in the browser so it made it easier for me [17:02] castral1 has joined the channel [17:02] castral1 has left the channel [17:03] jtsnow has joined the channel [17:04] brianleroux has joined the channel [17:04] UHMA: i like to use jquery too, it's familiar. just try to store whatever you can [17:06] broofa has joined the channel [17:07] nyxtom: kkkkkjjj [17:07] tfrohe: ok thanks. as far as the setInterval() and the var init goes, is that the right way to go about that? it's rare that i get a request while readDirectory() is running but if it happens I get a "{}" return which is acceptable. [17:08] robotarmy has joined the channel [17:10] alek_br has joined the channel [17:11] glenngillen has joined the channel [17:12] glenngillen: hey guys, just installed node and built a simple app. Is there a definitive/best practices/whatever guide on how to run it in production? Is it just a matter of using runsv to make sure "node app.js" stays up? Or should I put it behind something like nginx? etc. [17:12] 5EXABW7P1: hey guys [17:13] dguttman has joined the channel [17:13] EGreg: hey [17:13] EGreg: ervyone [17:14] EGreg: where's substack! [17:15] booths has joined the channel [17:16] kippi: will socket.io work over https [17:16] benburkert has joined the channel [17:16] UHMA: glenngillen: i'd suggest nginx in front. set up an upstart script with respawn and a monit script. there's some blog posts if you google it [17:16] brianc: glenngillen: afaik it's recommended to put it behind nginx [17:17] booths has joined the channel [17:17] glenngillen: UHMA & brianc: Cheers, will take a look at that. Probably makes it easier anyways given I want part of the app served by node, the rest by rails. [17:17] eee_c has joined the channel [17:18] UHMA: yeh totally [17:18] wasabist has joined the channel [17:20] springmeyer has joined the channel [17:21] dmcquay has joined the channel [17:21] derren13 has joined the channel [17:25] tylerstalder has joined the channel [17:27] mikew3c_ has joined the channel [17:28] rwaldron_ has joined the channel [17:30] tanepiper: what's the option in http.client to keep a connection open? i tried this header, but it still kills the connection: https://gist.github.com/dd0f7c9e8251a6419036 [17:31] yonkeltron: is there a proper way to print caught exceptions so that you still get the stack trace? [17:35] sprout has joined the channel [17:35] frodenius: yonkeltron: e.stack? [17:36] ibolmo has joined the channel [17:36] ibolmo: anyway for a file to know if it's being required? [17:36] ibolmo: in python, for example, you'd do if __main__ [17:36] slloyd has joined the channel [17:36] isaacs has joined the channel [17:36] tanepiper: module.parent [17:37] ibolmo: perfect, cheers [17:38] yozlet has joined the channel [17:40] ibolmo: hrm not what i expected, thought by not listening to a port the node.js would exit for an app.js (express) [17:40] yonkeltron: frodenius: oh. [17:41] yonkeltron: frodenius: thanks! [17:41] frodenius: ibolmo: require.main==module please [17:41] tjholowaychuk: ibolmo: i typically do "if (!module.parent)) app.listen(3000);" [17:42] ibolmo: yep [17:42] ibolmo: hrm wondering why it's still waiting to exit [17:42] JusticeFries_ has joined the channel [17:42] dgathright has joined the channel [17:44] MikhX has joined the channel [17:45] eee_c has joined the channel [17:46] Insanity5902 has joined the channel [17:47] davidc___ has joined the channel [17:47] sechrist has joined the channel [17:47] ibolmo: tjholowaychuk: so even with the if (!module.parent) listen... I'll still have to ^C? [17:48] tjholowaychuk: ibolmo: oh i think we were talking about something else [17:48] tjholowaychuk: oh you just dont want it to listen() ? [17:48] ibolmo: well I'm running expresso [17:48] ibolmo: I'm expecting that if i don't listen, expresso will exit with the results [17:48] ibolmo: without having ^C [17:48] tjholowaychuk: oh, yes, but its more complicated than that [17:49] ibolmo: hehe :D [17:49] ibolmo: <- nub to the node.js world [17:49] tjholowaychuk: you could still have an active event loop, with timers, db connections etc [17:49] tjholowaychuk: so you need to clear intervals and close connections for it to exit [17:49] tjholowaychuk: or force the exit [17:49] ibolmo: makes sense [17:50] ibolmo: so when you dev. with expresso i'm guessing you're ^C? [17:50] ibolmo: *testing [17:50] jakehow has joined the channel [17:51] JusticeFries_ has joined the channel [17:51] tjholowaychuk: nope [17:51] tjholowaychuk: i just close things [17:51] ibolmo: this works, so far: if (!module.parent) { listen... } else {process.exit(); } [17:51] tanepiper: tjholowaychuk: do you know the header for http client for keeping a connection open? [17:51] tanepiper: i want to keep a continuous feed open on couchdb, i tried this: [17:51] tanepiper: https://gist.github.com/dd0f7c9e8251a6419036 [17:51] pHcF: when my express process rises 40mb after multiple requests, after some time with no requests it goes to 20mb, but when i have MANY requests and my process goes to like 100mb, after some with no requests time it goes to 60, 70mb. why is that? [17:51] tjholowaychuk: tanepiper: Connection? [17:52] tanepiper: yea, i tried that in the headers [17:52] tjholowaychuk: pHcF: tough to say, depends what you are using [17:52] tjholowaychuk: there could be many reasons, but that is not unusual [17:52] tjholowaychuk: for it to change a bit like that [17:52] tjholowaychuk: dont worry about it unless it spikes a lot [17:52] pHcF: hmm [17:53] pHcF: ok [17:53] pHcF: i'll see in production how the memory usage is [17:54] tjholowaychuk: you can use the heap command to get a glimpse [17:55] tanepiper: gahh, looks like it might be an annoying thing of 'Connection' doesn't work in the header, but 'connection' does [17:55] tjholowaychuk: I have 1.2mb of strings alone lol for most node processes [17:56] davglass has joined the channel [17:57] skampler has joined the channel [17:57] quest88 has joined the channel [17:58] femtoo has joined the channel [17:58] MikhX has joined the channel [17:59] technoweenie has joined the channel [18:01] SubStack: EGreg: oh hello [18:02] zilt has joined the channel [18:03] aguynamedben has joined the channel [18:04] pHcF: tjholowaychuk: is it normal to get like 1000 requests, use like 130mb. of memory and then don't decrease memory usage? [18:04] tjholowaychuk: pHcF: yeah [18:04] pHcF: oh :( [18:05] tjholowaychuk: well within reason [18:06] pHcF: why? [18:06] tjholowaychuk: pHcF: I wouldnt really worry about that yet, 130mb isnt tons, work on your app first and then do some heap work later [18:06] pHcF: hmm [18:06] pHcF: ok :) [18:07] aubergine has joined the channel [18:07] tjholowaychuk: our app is idle around 90m for reference [18:07] tjholowaychuk: but it is much bigger [18:08] bingomanatee has joined the channel [18:08] banjiewen has joined the channel [18:08] sechrist: omg [18:09] sechrist: this station in santa clara is playing chiptunes on the radio [18:09] dguttman has joined the channel [18:09] matjas has joined the channel [18:10] steffkes has joined the channel [18:11] bingomanatee: Thx to all who ran the Node.JS conference in SF yesterday - amazing job. [18:11] bingomanatee: ^^ camp [18:13] tjholowaychuk: pHcF: might want to try $ node --trace-gc as well [18:13] tjholowaychuk: with NODE_ENV=production of course [18:13] pHcF: tjholowaychuk: i will [18:14] pHcF: tjholowaychuk: but what happens if my app gets like 1000 requests, using 120mb. of memory and thne get iddle for like 1 hour? [18:14] pHcF: it will still use 120mb? [18:14] sechrist: I've encountered problems where libraries other people have written have had huge memory leaks [18:14] sechrist: closure loops and stuff [18:14] tjholowaychuk: if nothing references those objects GC will clobber them [18:14] tjholowaychuk: but --trace-gc will let you knwo how it is working [18:14] janne has joined the channel [18:14] sechrist: trace-gc sounds awesome [18:15] sechrist: I was going off of heap snapshots [18:15] tjholowaychuk: sechrist: does that give you an insight to the problem really? ( havent tried ) [18:16] tjholowaychuk: other than with the heap command [18:16] tjholowaychuk: but i mean that really does not help you tons [18:16] sechrist: I was using v8-profiler with node-inspector [18:16] tanepiper: oh mikeal i lub joo! You would have to go do a talk on _changes feed which I am looking at using just now :D [18:16] sechrist: and I was easily able to see where the reference loop was [18:16] sechrist: in that particular case [18:16] tjholowaychuk: ah cool [18:16] mikeal: hahaha [18:17] sechrist: _changes [18:17] sechrist: that's something I haven't used in couch yet [18:17] sechrist: need to asap [18:17] tanepiper: i can't get my client to stay open, but hopfully you'll touch on it? :) [18:19] tjholowaychuk: sechrist: apparently you can use --log-gc and hp2ps as well [18:19] tjholowaychuk: havent tried yet [18:19] pHcF: tjholowaychuk: what does this means after 200 requests? Scavenge 71.7 -> 70.3 MB, 5 ms. Mark-sweep 70.3 -> 66.5 MB, 100 ms. Mark-compact 66.5 -> 66.3 MB, 208 ms. [18:19] cardona507 has joined the channel [18:19] stagas has joined the channel [18:19] cferris has joined the channel [18:20] tjholowaychuk: pHcF: its not clobbering much [18:20] zum has joined the channel [18:22] pHcF: tjholowaychuk: hmm.. well, im gonna get this app to work fine and then worry about memory usage.. [18:23] tjholowaychuk: pHcF: yeah that is not the right stage to begin that [18:23] arpegius has joined the channel [18:23] pHcF: yep [18:23] tjholowaychuk: since you might introduce more anyway [18:25] tjholowaychuk: pHcF: our app is pretty huge and it idles around 30mb RSS actually [18:25] tjholowaychuk: nvm 22 [18:26] pHcF: gotcha [18:27] andrzejsliwa has joined the channel [18:29] markwubben has joined the channel [18:32] jchris has joined the channel [18:33] vineyard has joined the channel [18:33] malkomalko has joined the channel [18:33] langworthy has joined the channel [18:34] rauchg_ has joined the channel [18:36] sechrist: The way I've done things is I take a break halfway through implementing functionality and just make sure there's no gaping memory issues [18:36] sechrist: run calls inside loops and stuff [18:36] sechrist: premature optimization, sure, but I hate getting all of the functionality working and then finding out the memory leak is so bad it'll only run for 20 minutes in production [18:37] tjholowaychuk: haha [18:37] sechrist: that's happened [18:37] sechrist: but mostly because i'm doing weird stuff [18:37] tjholowaychuk: what was your main leak(s)? [18:38] sechrist: in that case, it was a closure bug in a module I was using to parse out stuff from a binary stream [18:38] stagas_ has joined the channel [18:39] mmso has joined the channel [18:39] mmso has joined the channel [18:39] mmso has left the channel [18:39] brianleroux has joined the channel [18:40] sechrist: tjholowaychuk: https://github.com/substack/node-bufferlist/commit/f1bb2319242f8a0f2ac40834e6a701770f32277d [18:40] sechrist: there was a loop function for control flow [18:40] fly-away has joined the channel [18:40] sechrist: references never cleared [18:40] sechrist: so the gc never touched these massive binary blobs in memory [18:40] tjholowaychuk: shit lol, fun [18:41] richcollins has joined the channel [18:41] dgathright has joined the channel [18:42] zubairov has joined the channel [18:44] tjholowaychuk: sechrist: im sure I have my fair share of similar leaks [18:47] sepehr has joined the channel [18:49] noahcampbell has joined the channel [18:50] sechrist: it's pretty easy [18:50] ryah: whew. back on irc. doing stuff in RL is exhausting. [18:50] tjholowaychuk: ryah: haha, it is [18:50] sechrist: there's no spawn points in RL! [18:51] tapwater has joined the channel [18:54] augustl has joined the channel [18:54] rpflo has joined the channel [18:55] mjr_ has joined the channel [18:56] sechrist: there's no way to do a memory map in njs right? [18:56] bartt has joined the channel [18:56] mjr_: you mean to mmap() a file? [18:56] pedrobelo has joined the channel [18:56] sechrist: yeah [18:56] mjr_: Not that I know of. [18:57] mjr_: Why do you want that> [18:57] mjr_: ? [18:57] pquerna: thats not the syscall you were looking for [18:57] pquerna: ACTION waves jedi hand thing [18:57] sechrist: part of internal infrastructure here [18:57] sechrist: frames are passed into a mmap and the offset passed through a message system to another process [18:57] pquerna: you could make a MmapBuffer [18:57] pquerna: a SlowBuffer that just points to the mmaped area [18:57] sechrist: I found this [18:57] sechrist: https://github.com/bnoordhuis/node-mmap [18:58] sechrist: pquerna: can do I do that with exposed standard api? [18:58] pquerna: no [18:58] pquerna: node-mmap is basically doing what i was trying to say [18:58] mjr_: You need a way to bind to the mmap syscall. [18:58] pquerna: though i think you could make something easier to use [18:58] mjr_: Which will require some change in native land. [18:58] pquerna: but anyways [18:59] micheil has joined the channel [18:59] mjr_: pquerna: I had to leave before your talk. How'd it go [18:59] pquerna: they make their own buffer class [18:59] mjr_: ? [18:59] pquerna: but I think you can subclass the node one and just override where it looks for stuff [18:59] pquerna: so it'd look like a normal buffer more [18:59] pquerna: mjr_: it went well i think [19:00] matt_c_ has joined the channel [19:00] augustl: is there a good way to add a development dependency to a npm project? My project is using http://cjohansen.no/sinon/ but that's only needed for running the tests. [19:00] mjr_: I wasn't sure how to gauge the average skill level in the audience. [19:00] pquerna: yes [19:00] pquerna: i think it was all over the board; thats the difficulty with any single track conference. [19:00] ryah: talks should be online tomorrow.jackson is producing them now [19:01] mjr_: That is some high speed video production. [19:02] aschw has joined the channel [19:02] ryah: well, seeing as the APIs will be obsolete next week [19:02] ryah: :) [19:02] mraleph: mjr_: hi! did you get my last mail yesterday? [19:02] tjholowaychuk: ryah: what? [19:02] mjr_: mraleph: I did, yes. I thought I had responded to that. [19:02] tjholowaychuk: which apis [19:03] EyePulp: which api's? [19:03] Pilate has joined the channel [19:03] EyePulp: ACTION is getting winded keeping up with a moving target. [19:03] rauchg_: which apis? [19:03] ryah: i'm just kidding [19:03] mjr_: ha [19:03] tjholowaychuk: haha [19:03] mraleph: mjr_: I got only one response :-) [19:03] tjholowaychuk: fuck [19:03] EyePulp: geez [19:03] tjholowaychuk: scared me [19:04] EyePulp: there's a reason we didn't know it was a joke... =P [19:04] ryah: :) <-- troll face [19:04] jpick has joined the channel [19:04] meandi has joined the channel [19:04] mjr_: mraleph: Oh yeah, I didn't respond to the last one. I'm not sure what happened to the n^2 thing. I can't reproduce it either. Although I do sometimes get really big differences in the times, which I think is what you were seeing earlier. [19:04] tjholowaychuk: is there a global way to set the console.{dir,log}() depth? [19:05] mjr_: Any idea how to dereference that Linux address into a human-readable symbol? [19:05] mraleph: nope. it even outputs address range, no a single address. I did not dig into that. [19:06] mjr_: Do you use the oprofile support in V8? Does it help with things like this? [19:06] sechrist: Limitations - Specifying the memory address is not implemented. I couldn't think of a reason why you would want to do that from JavaScript. Convince me otherwise. :-) [19:06] creationix has joined the channel [19:06] sechrist: exactly what I want to do [19:06] sechrist: lol [19:07] mraleph: but I think that you should probably try to benchmark different parts of node_redis separately. e.g. to benchmark parser prepare a buffer and parse it 10000 times. This will move networking overheads out of the picture. [19:07] mraleph: mjr_: no, I never used oprofile with V8. [19:08] mjr_: Seems like it'd be useful for stuff like this, if it worked. [19:08] mjr_: But yes, I agree. There are too many moving parts in this benchmark, and we need to eliminate a few of them. [19:08] muk_mb has joined the channel [19:10] isaacs has joined the channel [19:10] boaz_ has joined the channel [19:10] deepthawtz has joined the channel [19:14] ossareh has joined the channel [19:14] bingomanatee_ has joined the channel [19:15] jvolkman_ has joined the channel [19:16] EyePulp: anyone seen an issue with socket.io & node recently where it gets into a massive endless connect/disconnect loop from the client? [19:17] EyePulp: I'm on node trunk as of a day or so ago [19:17] EyePulp: haven't changed much on the socket side [19:17] EyePulp: but it's been about a month since looking at any of it [19:17] ibolmo has joined the channel [19:17] beta_ has joined the channel [19:18] InsDel has joined the channel [19:19] m14t has joined the channel [19:20] rauchg_: EyePulp: with xhr-polling ? [19:20] EyePulp: rauchg_: yessir [19:20] rauchg_: yeah it's a known issue, it has a simple fix [19:21] rauchg_: i'll get it there asap [19:21] halfhalo: dundundun..... [19:22] rpflo has joined the channel [19:22] beawesomeinstead has joined the channel [19:24] EyePulp: rauchg_: is it a recent issue? It's usually my fault when things don't work, not the code... =) [19:25] rauchg_: EyePulp: no, but it only happens if the server goes down and the polling client tries to poll [19:25] yozlet has joined the channel [19:29] mikeal: who runs the node.js twitter account? [19:30] mape: mikeal: Did you see the issue with aminutewith itunes feed? [19:30] mikeal: nope [19:30] mikeal: what is it? [19:30] mape: Doesn't work [19:30] mikeal: oh yeah [19:30] mikeal: waiting on that [19:30] mape: Links to text or files iTunes can't play [19:30] mape: k [19:30] davglass_ has joined the channel [19:30] mikeal: apple has to let it in first [19:30] mikeal: the code is from aminutewith brendan so the link is tehre [19:31] mikeal: it'll change once apple adds aminutewith node to their podcast listings [19:32] mape: Ok [19:39] AAA_awright has joined the channel [19:39] EyePulp: rauchg_: my client makes the initial .connect(), there's a pause... and then just a huge stream of xhr-polling connect/disconnects visible @ the server and through the client's xhr logging (firebug) [19:39] rauchg_: :O [19:40] isaacs has joined the channel [19:40] EyePulp: the server itself seems to remain up and is rock-solid as far as I can tell. using the socket.io-node library on that end, btw [19:40] admc_ has joined the channel [19:40] ibolmo: tjholowaychuk: now back from lunch, i narrowed it down that RedisStore was still open.. quiting the client exits the app [19:41] mjr_: That catches a lot of people. [19:41] mjr_: I'm not sure how to do it better though, other than exposing some kind of debugging API into node itself to inspect the libev state. [19:41] ibolmo: rauchg_: does nwhite hang out on the irc? [19:42] aconbere has joined the channel [19:42] janne has joined the channel [19:43] micheil: ryah: are you about? [19:45] tjholowaychuk: ibolmo: for the "test" env you should use new MemoryStore({reapInterval: -1 }) [19:45] norviller has joined the channel [19:45] ibolmo: thanks i was just looking into doing that [19:46] cronopio has joined the channel [19:47] micheil: does any one know if you can define getters for prototypes from C/C++? [19:47] micheil: I have a bunch of functions in a c interface I'm writing a binding for which are like "getErrorDescription" "getDeviceName" etc [19:48] jvolkman_ has joined the channel [19:48] tjholowaychuk: micheil: nope, they are on the instance template [19:48] micheil: okay [19:48] micheil: tjholowaychuk: I'm trying to write a binding for the C driver to http://phidgets.com/ [19:49] tjholowaychuk: micheil: check out the node-canvas Context2d::Initialize() [19:49] tjholowaychuk: ah cool [19:50] micheil: yeah, this C api is all "event" driven [19:50] micheil: ah: proto->SetAccessor(String::NewSymbol("fillColor"), GetFillColor); [19:52] micheil: tjholowaychuk: so, can I actually place the "using namespace" stuff in my header, and not need it in my .cc files? [19:52] jashkenas-work_: Apparently Debian/Ubuntu installs the "node" executable as "/usr/bin/nodejs" ... what are folks doing about hashbangs for this sort of thing? [19:53] tjholowaychuk: micheil: nvm it is the proto, I forget what the issue was, I had to use the instance template for something. yeah you can, its probably bad practice, but IMO c++ is bad practice so I dont care lol for small modules its fine [19:53] tjholowaychuk: micheil: you can use namespaces per block as well [19:53] micheil: okay [19:53] micheil: tjholowaychuk: well, I know how I'd sort of write this binding in javascript, just not in C/C++ [19:54] tjholowaychuk: I use the instance template for PixelArray, cant remember why though I dont think I have to [19:54] MikhX has joined the channel [19:54] yonkeltron: does node support use strict? [19:55] micheil: ACTION would probably rather someone else write the C binding [19:55] webr3: yonkeltron, http://kangax.github.com/es5-compat-table/ [19:55] yonkeltron: hehe [19:56] inimino: jashkenas-work_ ⋱ Install from source. [19:56] tjholowaychuk: wow IE8 has like nothing [19:56] yonkeltron: webr3: thanks [19:57] tjholowaychuk: jashkenas-work_: symlink maybe? [19:58] jashkenas-work_: both of those work for the end user. This is just a complaint I was fielding... [19:58] JusticeFries has joined the channel [19:58] jashkenas-work_: Because I distribute a script that starts with a hashbang for Node. [19:58] jashkenas-work_: As do all NPM bin/ scripts, I imagine. [19:58] tjholowaychuk: hm [19:58] tjholowaychuk: yeah i dont know, that would be the best solution I would think [19:58] inimino: jashkenas-work_ ⋱ It's a problem with Debian because of some old ham radio package... IMO it needs to be fixed in Debian. [19:59] jashkenas-work_: inimino: Agreed. So no one is consciously doing workarounds for it then... [19:59] jashkenas-work_: Fine by me. [19:59] inimino: ...but that's just my opinion, I just install from source on Debian (which I'd be doing anyway because of the pace of node development). [20:01] sh1mmer has joined the channel [20:01] sechrist: ugh I wish redis just had membase's cluster mentality [20:01] prinzdezibel has joined the channel [20:01] andrzejsliwa has joined the channel [20:02] tylerstalder has joined the channel [20:02] mjr_: sechrist: it's coming, but it'll take a while to get to that level. [20:02] mjr_: Meanwhile, you can roll your own with node! [20:03] sechrist: there's no node code running in the stack I'm working on [20:03] mjr_: ...yet [20:03] robmason has joined the channel [20:03] mjr_: see where I'm going with this? [20:04] frodenius: hehe, subtle [20:04] sechrist: I really would prefer redis over membase [20:04] sechrist: just because of the community [20:04] nefD: huh.. forcing socket.io to use a flash socket works in firefox but not in chrome [20:04] sechrist: flash socket won't work in chrome [20:04] sechrist: because the websocket object exists [20:04] sechrist: flash socket just emulates native websocket javascript api [20:07] sechrist: thing is -- how do I automatically manage two redis nodes to switch between being a primary and secondary [20:08] nefD: sechrist: AH. makes sense.. ok, thanks for that [20:10] isaacs_ has joined the channel [20:11] maushu has joined the channel [20:11] rburhum has joined the channel [20:13] Guest51655 has joined the channel [20:14] sh1mmer has joined the channel [20:15] brianler_ has joined the channel [20:16] murz has joined the channel [20:16] slaskis has joined the channel [20:17] confoocious has joined the channel [20:17] confoocious has joined the channel [20:21] rednul has joined the channel [20:22] sh1mmer has joined the channel [20:23] Rixius has joined the channel [20:23] jamesarosen has joined the channel [20:31] matclayton has left the channel [20:31] rauchg_ has joined the channel [20:32] marlun: I bet this is a FAQ but how can I make node reload by itself when I change files? [20:33] EyePulp: I use d.js [20:33] EyePulp: a shim of sorts. but there's probably newer, fancier ways [20:35] benburkert has joined the channel [20:37] marlun: Feels like something everyone needs when developing? Can't see a developer staying with something where he/she needs to reload something manually all of the time :)= [20:37] chapel: marlun: https://github.com/fgnass/node-dev [20:37] galaxywatcher has joined the channel [20:38] marlun: chapel: looks promising, will try it - thanks! [20:38] EyePulp: marlun: Here's the script I use - it's modified from the original: http://pastie.textmate.org/private/rglldzzxbkhfdcthiyza [20:38] EyePulp: node-dev looks much prettier though [20:38] EyePulp: =) [20:40] marlun: Yeah node-dev seems to work great :) [20:40] isaacs has joined the channel [20:42] Eber_ has joined the channel [20:42] Eber_: guys, is there a default ppa for node?!? [20:42] Eber_: I've found this one: ppa:chris-lea/node.js [20:42] Eber_: but if there is an official one, I woudlrather use it... [20:42] mscdex: there are no official packages [20:43] rauchg_ has joined the channel [20:43] mscdex: the source tarball is the only official distribution at the moment [20:43] Eber_: good =] ok! thanks! [20:45] mscdex: sechrist: flash socket works fine in chrome, it's just not the default [20:47] tprice: why would you use a flash socket in chrome? [20:48] tprice: what its the only browser that supports a websocket [20:49] aurynn: I think Safari does now, too [20:49] aconbere has joined the channel [20:50] rauchg_ has joined the channel [20:52] nefD: huh.. node-dev looks pretty cool [20:52] nefD: mscdex: i couldn't get chrome to use the flash socket at all [20:52] torvalamo has joined the channel [20:53] mscdex: nefD: but why would you want to use that in chrome? [20:53] nefD: mscdex: tried setting it as the only transport option on both the client and server side scripts, setting the proper path to the swf file, running the server with sudo, nothing worked [20:53] nefD: mscdex: was just testing [20:53] nefD: and was worried i was doing something wrong :P [20:54] mscdex: nefD: i can't speak for socket.io, but i've used the swf (at least the latest version) with success with my own custom setup [20:54] creationix: has anyone used the gdata library from node [20:54] creationix: (gdata = google data client) [20:55] nefD: mscdex: i have no experience with it outside of socket.io.. i dont really want to have to mess with it.. i'd rather just have realtime bidirectional communication that works :P [20:56] mscdex: nefD: rauchg_ would've been the one to ask [20:57] mscdex: creationix: there's a gdata lib for node? [20:57] creationix: mscdex: no, it's for the browser [20:57] mscdex: ah [20:57] creationix: I was wondering if anyone tried it with node [20:57] creationix: I think it's got a memory leak, and was wondering if anyone else has tried it [20:58] nefD: EyePulp: Whats the difference between node-dev and your modified version? [20:58] mscdex: is it the official google lib? [20:59] EyePulp: nefD: my version has nothing to do with node-dev - it was an older solution someone else wrote, and I've just been keeping it running under current versions of node. you should probably use node-dev [20:59] nefD: ah [21:00] creationix: mscdex: yep [21:00] creationix: http://code.google.com/apis/gdata/ [21:00] EyePulp: ACTION can't get the most basic socket.io stuff working at the moment. very frustrating. [21:00] mscdex: bad google! [21:00] mscdex: :p [21:03] tanepiper: mikeal: ping [21:03] mikeal: pong [21:03] creationix: mscdex: actually now that I look at it, I can just use JSON over http and write my own client [21:03] creationix: I think I'll just try that [21:03] mikeal: JSON over HTTP++ [21:04] mscdex: yeah, i was thinking their api was pretty easy [21:04] reid has joined the channel [21:04] tanepiper: mikeal: yea, i'm trying to use your createCouchDbEmitter stuff and i'm having an issue with continuous feed on _changes, it seems to time out [21:04] mikeal: the problem with gdata is that it's not implemented widely and consistently across all the properties [21:04] mikeal: when it times out it'll just reconnect right away [21:04] mikeal: with since=last_seq [21:05] mikeal: it's designed to timeout actually [21:05] tanepiper: i was having the same issue with standard Http client as well so i wonder if it's my end [21:05] EyePulp: my socket.io connection dies as "aborted" and then tries to reconnect, and dies again. it seems to go back and forth from trying flashsocket to xhr-multipart [21:05] EyePulp: argh [21:05] mikeal: so, you need to set a heartbeat [21:05] tanepiper: hmm yea, i expected that but when i did more changes nothing showed up in my client [21:05] mikeal: if you don't want it to timeout [21:05] mikeal: i designed the db emitter to just reconnect tho so that I know the couch is still up and active and all that [21:05] tanepiper: i did a setInterval inside to output seconds to the console, just to check the script itself was still running, but i'd get nothing new on the changes event [21:06] tanepiper: hmm [21:06] mikeal: http://docs.couchone.com/couchdb-api/couchdb-api-db.html#couchdb-api-db_db-changes_get [21:06] creationix: mikeal: so you're saying I should just use request or node's raw http client and hit it directly? [21:06] creationix: (like you like to do with couch's API) [21:06] mikeal: heartbeat=10000 [21:07] mikeal: creationix: yeah, i wouldn't try to generalize the access [21:07] mikeal: you could probably generalize the parsing tho [21:07] mikeal: or at least part of it [21:07] creationix: mikeal: maybe something about the level of abstraction as my couch-client? [21:07] mikeal: i'd say less, CouchDB is consistent [21:07] mikeal: so you can generalize get and put [21:08] creationix: I see [21:08] mikeal: but the way collections are represented and you put in to them across different gdata apis varies a bit [21:08] zomgbie has joined the channel [21:08] mikeal: and how you put something in to multiple collections is also all weird [21:08] mikeal: the data format has some commonalities between all of them tho [21:09] mikeal: so you could do a parser helper, and maybe a API that says "put this object to this url with this auth" [21:09] mikeal: but generalize the url to proper collection/item semantics might not be doable [21:11] mraleph has joined the channel [21:11] jaw6 has joined the channel [21:11] UHMA has joined the channel [21:12] tanepiper: hmm yea, the heartbeat seems to keep it open mikeal [21:13] strixv has joined the channel [21:13] tanepiper: i so need to sit down and really read the couchdb docs on day, since i've commited our company to it! [21:17] esigler_ has joined the channel [21:17] Hello71 has joined the channel [21:17] Hello71 has joined the channel [21:18] bartt has joined the channel [21:20] dgathright_ has joined the channel [21:21] aklt has joined the channel [21:21] sveisvei has joined the channel [21:27] bentruyman has joined the channel [21:28] wilken_ has joined the channel [21:29] tmzt has joined the channel [21:30] aconbere has joined the channel [21:30] esigler_ has left the channel [21:30] zubairov has joined the channel [21:36] marlun: I'm trying the nettuts tutorial on node.js and I've made this: https://gist.github.com/742645 however I change tweet_emitter.addListener(...) to tweet_emitter.on(...) however I'm getting this error: http://paste.pocoo.org/show/305348/ ...what am I doing wrong? Should the second parameter to on(...) be a function? If so, should I create that function outside of http.createServer(...)? [21:37] altamic_ has joined the channel [21:38] brianleroux has joined the channel [21:39] tmzt: is there a general session to account capture framework for one of the frameworks similar to redis's twitteralikeexample authentication? [21:39] brianmario has joined the channel [21:40] webr3: marlun, listener is set to the return of tweet_emitter.on not to the function you think it is [21:40] hassox has joined the channel [21:41] marlun: webr3: So I need to create the function which handles the tweets event and send it as the second param to on()? [21:41] rauchg_ has joined the channel [21:42] marlun: webr3: var handleTweets = function (tweets) {...}? Adn then also send it as second param to removeListener? [21:43] GasbaKid has joined the channel [21:43] marlun: But then it can't access the response. [21:43] marlun: it only gets the tweets. [21:43] sh1mmer has joined the channel [21:43] bingomanatee has joined the channel [21:44] isaacs has joined the channel [21:44] Naked has joined the channel [21:46] ezmobius has joined the channel [21:47] voodootikigod: New episode of Minute With Node.js published http://node.minutewith.com - All about streams in node.js [21:47] ezmobius_ has joined the channel [21:48] marlun: https://gist.github.com/742665 Doesn't give me the error however it doesn't fetch any tweets. Ever request returns an empy json list []. [21:49] tahu has joined the channel [21:50] eazyigz has joined the channel [21:53] pHcF: marlun: looking, wait [21:55] Floxxx: https://gist.github.com/742674 <-- anyone know how to fix a construction like this? (using node-mongodb-native) [21:55] isaacs: augustl: "devDependencies": { ... } [21:55] augustl: isaacs: ah :) [21:55] isaacs: augustl: those are only installed with npm link, or if you do `--dev true` (or `npm config set dev true`, but that'd be silly.) [21:55] creationix has left the channel [21:56] Throlkim has joined the channel [21:57] marlun: pHcF: Thanks :) [21:59] galaxywatcher has joined the channel [21:59] pHcF: marlun: question [21:59] pHcF: like 71 [21:59] pHcF: [] [21:59] pHcF: :P [22:00] pHcF: line 71 [22:01] marlun: pHcF: yes? But shouldn't that only be called if nothing happends for 10 seconds? [22:01] pHcF: yeah [22:02] marlun: Why isn't the tweets getting there? If I write that url into a browser I get the tweets. [22:02] sechrist: streams in nodejs [22:02] sechrist: hellyeh [22:03] pHcF: sorry marlun [22:03] pHcF: im logging [22:03] pHcF: please wait [22:04] marlun: pHcF: ok :) [22:04] [[zz]] has joined the channel [22:04] pHcF: marlun: your handleTweets function is not being called [22:05] sh1mmer has joined the channel [22:06] robtmr has joined the channel [22:06] langworthy has joined the channel [22:07] Floxxx: https://gist.github.com/742674 <-- nobody want to take a stab at this? [22:07] marlun: pHcF: Yeah, thats the problem :) [22:11] isaacs: ukev: i see in the logs Floxxx was helping you with an npm problem (thanks, Floxxx). [22:11] isaacs: ukev: did you get it sorted? [22:11] Phyllio has joined the channel [22:11] bingomanatee: Floxx - that is expected behavior. you won't get to the inner function til you have a count tally [22:12] bingomanatee: Do you expect it to fire off before count is taken? If this is Mongo I would suggest indexing the field that you are querying by. (no matter what repo it is, for that matter. ) [22:12] pHcF: marlun: your timeout is being called as soon as i load it [22:12] bingomanatee: ^^Floxxx [22:12] pHcF: after sending the browser request, it takes exactly 10 secs to load [22:12] Floxxx: no, i want it to insert after the count [22:13] Floxxx: and then continue with the next count / insert [22:13] Floxxx: so i pretty much want to make the count block [22:14] isaacs_ has joined the channel [22:15] bingomanatee: I would suggest throwing additional console.logs to see what is happening in which order. -- am I right in that this is Mongo? [22:16] Floxxx: yes, it's mongo [22:16] Floxxx: thing is, the console.log gets executed [22:16] Floxxx: but the insert is delayed [22:17] Floxxx: because mongo is "too busy" with the counts [22:17] marlun: pHcF: hmmmm... thought I found it. I had forgot to add a setInterval(get_tweets, 5000); under the get_tweets functino however adding it didn't change anything. :/ [22:18] Floxxx: so what i'd need is to make the count() call synchronous and the insert() call asynchronous [22:18] bingomanatee: see my comment. [22:18] eazyigz: whenever I try to do an update I get this error: chromium-browser [22:18] eazyigz: chromium-browser-inspector [22:19] marlun: pHcF: I also forgot to do request.close(); in the end of get_tweets. It's working now! :) [22:19] eazyigz: "error authenticating some packages" [22:19] eazyigz: does anybody know how to get around this problem? [22:19] Floxxx: bingomanatee: yeh, it runs the console.log, but the insert is delayed for a long time [22:19] Floxxx: even like that [22:19] marlun: pHcF: Thanks for taking time to help me :) [22:20] mikeal has joined the channel [22:20] micheil has joined the channel [22:21] aubergine has joined the channel [22:21] Floxxx: i could keep track of the number of inserted values with a counter, but that miserably fails if for some reason the server crashes or something like that [22:22] bingomanatee: is your node and Mongo running on the same server? [22:22] Floxxx: so i'd rather nog do that [22:22] Floxxx: ye [22:22] Floxxx: s [22:23] bingomanatee: would be nice to have them on two, so you could tell which process is the server-killer. have you tailed while the server goes down to see if the resource spike is a mongo spike or a node spike? [22:23] Floxxx: server doesn't go down [22:23] bingomanatee: oh - this is a hypothetical. [22:23] Floxxx: but because the inserts are delayed, the count isn't up to date [22:24] bingomanatee: This seems like something that a map/reduce or group native loop in Mongo might solve but it would be good to understand the process nonetheless. [22:24] Floxxx: i don't think you can make inserts inside a native loop [22:26] bingomanatee: you'd be surprised - Mongo's quite green. You could definately insert into a temp table - that is what Map/Reduce does after all. [22:26] mikeal: what? [22:26] mikeal: mongo map/reduce is not stored or cached [22:28] Floxxx: i could ofcourse make a blocking call inside the count callback but that's very nasty :p [22:28] bingomanatee: I was at the mongoSV in Mountain View - the takeaway was quite clear to me that the storage mechanism of map-reduce was a temp collection. Watch the Map/Reduce video of same if you aren't sure. You can even choose the name of the temp collection. [22:28] Floxxx: not to mention very unreliable [22:29] bingomanatee: So your goal is to count the large groups of data right? Even Map/Reduce might be overkill. I would suggest using the group() call in native Mongo, and saving the result to a named temporary collection. [22:29] bingomanatee: You can even store this whole system as a named javascript function in the mongoDB and call it by name. [22:29] _mythz has joined the channel [22:30] mikeal: in couchdb you would just use the builting _sum reduce and query it with group=true [22:30] mikeal: no idea how to do it in mongo [22:30] thear has joined the channel [22:30] Floxxx: well, "myvalue" changes, i need to know per "myvalue" how many records there are before i insert [22:30] rpflo has joined the channel [22:30] bingomanatee: You could have it as a parameter to the constructing javascript. [22:30] mikeal: why do you need to insert? [22:30] Floxxx: building a dataset [22:30] thear: I'm looking to do some notifications. Is there a node module that acts like ape-project [22:31] mikeal: is there a reason the group sum has to be stored in another document? [22:31] Floxxx: it's not in another document [22:31] bruce has joined the channel [22:31] springify has joined the channel [22:31] Floxxx: i want to insert X times the same value but not in sequence [22:32] Yuffster has joined the channel [22:32] Floxxx: so i need to check how many times a certain value is already in the database before i add another [22:32] EGreg: hey y'all [22:33] Floxxx: but because of the async design, the counts have precendence over the inserts [22:33] bingomanatee: I would at the very least try this with native javascript in Mongo to take node out of the equation. [22:33] Floxxx: causing the counts not to be up to date [22:34] Phyllio has joined the channel [22:34] bingomanatee: Inserting into the same table you are polling is at best an antipattern built to cause problems. If I was writing an ORM I wouldn't let you do it :D [22:35] bingomanatee: I would suggest opening a second collection and inserting into that one to see if that changes the game. [22:35] beta has joined the channel [22:36] Floxxx: i'd still need to keep track of that count somehow :p [22:36] Floxxx: gah [22:36] kriskowal has joined the channel [22:36] bingomanatee: I'm saying, a) run a mongo group [22:36] bingomanatee: b) create a local array of the current totals, keyed by field value [22:36] pHcF: marlun: np :) [22:37] mikeal: you're asking for a joined sum between two indexes [22:37] isaacs has joined the channel [22:37] Floxxx: mikeal: ehh, no? [22:37] bingomanatee: c) when you are all done, run a second function to supplement the data. [22:37] Floxxx: i just want to know how many times X is in the collection before i add another X [22:37] altamic has joined the channel [22:37] mikeal: after you insert, doesn't that value need to change if the sums it was based on change? [22:37] ryah: mikeal: nice podcast [22:38] mikeal: yeah, i like the minutewith format [22:38] ryah: it's super nice [22:38] ryah: the format, that is [22:38] mikeal: voodootikigod is on to something with that [22:38] ryah: it about my attention span [22:38] ryah: s/it/it's [22:39] ryah: even if it's talking about my project :) [22:39] EGreg: hey ryah [22:39] ryah: can't listen to more than 5 minutes of stuff :) [22:39] EGreg: are you ryan dahl btw? [22:39] mikeal: i think talking about your project is probably less interesting than someone elses :) [22:39] ryah: EGreg: hey, yes [22:39] ryah: mikeal: true [22:39] EGreg: very cool :) I'm trying to figure out what the best way is to run a multi-core node installation [22:40] mikeal: ryah: are you in the office, i think micheil wants to stop by [22:40] EGreg: I read something Yahoo did that was checked into the core, and now there's Spark and Connect ... should I use that? [22:40] EGreg: by Sencha [22:40] ryah: mikeal: i am, but i've got meetings all afternoon [22:40] tjholowaychuk: EGreg: fugue is probably better than spark, IMO they both lack [22:41] tjholowaychuk: a marriage of the two would be ideal [22:41] mikeal: this problem isn't solved yet [22:41] brianmario has joined the channel [22:41] ryah: mikeal: well, 4-6p i've got meetings, he can come by outside of that [22:41] mikeal: we're working on it [22:41] EGreg: what's fugue and how is it better? [22:41] EGreg: where are you guys working? LA or NY? [22:41] ryah: SF [22:41] EGreg: man, everyone's in SF. I should go visit there. [22:42] bingomanatee: Floxx -- I am saying -- don't put the insert code in a callback. Put the tallying code in the callback and put the insert code after the count loop. [22:42] tjholowaychuk: fugue monitors the children etc [22:42] tjholowaychuk: has some nice features that were supposed to be in spark [22:42] tjholowaychuk: but never got in [22:42] EGreg: hmm [22:42] EGreg: so what tools should I use? [22:42] EGreg: I'm building a full-stack framework for Node, but a lot of things can be abstracted into little tools... and put on github [22:43] EGreg: Maybe I should make "pipe" for node. It'll do things like help do things asynchronously better, process results as they come in, and throttle on different resources. [22:43] Floxxx: bingomanatee: hmm, that's a possibility, but is the tally even set then? [22:43] EGreg: what you guys think, is that useful [22:43] tjholowaychuk: lol [22:43] Floxxx: i'd still have to block the insert until i receive the count [22:44] EGreg: Floxxx everything that you just said would be handled in pipe using 1line :P [22:44] Floxxx: well, get to it then [22:44] EGreg: yeah I guess I shoul releease it. [22:44] Floxxx: i expect results within the hour :p [22:44] EGreg: crap but I haven't tried any testing frameworks. [22:44] _mythz has left the channel [22:44] EGreg: okay first I'm gonna restart my computer, baby :) [22:44] bingomanatee: I can solve the problem with my imaginary module too. [22:45] EGreg: ACTION wonders how long it is before Node + DNode will make a truly distributed environment spanning servers and clients. [22:45] Floxxx: i'll just have to tally in memory and count on server startup i guess [22:45] bingomanatee: isn't that just a websocket conceit? [22:45] EGreg: ? [22:45] EGreg: conceit? :P [22:45] EGreg: is that like, a french term [22:45] Floxxx: no, it's fairly english :p [22:46] EGreg: yay websocket conceit, a fairly english term :) what it mean? [22:46] bingomanatee: I mean if you want to distribute work, just have a load balancing node server with sockets to worker servers. [22:46] EGreg: bingomatee: what if I want to make a dynamo-like system [22:46] EGreg: that just brings up nodes [22:46] EGreg: and they join the workflow, with vector clocks and stuff like that [22:47] Druid_ has joined the channel [22:47] EGreg: anyway, restart :) [22:48] Floxxx: ACTION growls a bit at the lack of documentation for node-mongodb-native [22:49] bingomanatee: Its not written to make friends. :D [22:49] Floxxx: :p [22:49] Floxxx: db.friends.insert()? :p [22:50] bingomanatee: Which is why I am suggesting that a native JS function "stored procedure style" solution might be more practical. Either that or wait(and wait...) for mongoose. :D [22:50] Druide_ has joined the channel [22:50] Floxxx: mongoose still uses node-mongodb-native :p [22:51] bingomanatee: But you might be able to look at the insert source and/or the count source to see if the node code is blocking your insert. If it is not than it might just be that mongo itself doesn't allow inserts until a count cycle is complete. [22:51] Floxxx: possibly [22:51] Floxxx: i'll do it the dirty way and tally in memory with a group at server start [22:51] Floxxx: that is, if i can figure out the group function :p [22:52] bingomanatee: Its not too awful. [22:52] Floxxx: as i said, documentation is lacking :p [22:53] Floxxx: the driver that is, not mongo itself [22:56] pquerna: someone should finish the dns stuff. [22:57] dguttman_ has joined the channel [22:58] ryah: finish? [22:58] ryah: er [22:58] ryah: dns stuff? [22:58] bingomanatee: Has anyone written an email server in node? [22:58] Phyllio has joined the channel [22:58] EGreg has joined the channel [22:59] aubergine has joined the channel [22:59] bingomanatee: Floxxx: no joke; the lack of documentation in the node adaptive library is why I think a mongo-native javascript solution is more tenable. [23:00] bingomanatee: You don't have sequencing/callback ambiguity to wrestle with. [23:01] shlainn has joined the channel [23:01] isaacs has joined the channel [23:02] zomgbie has joined the channel [23:02] bingomanatee: native javascript execution in mongo is either strictly procedural (synced) or has clear post-execution hooks for callback-like behavior (finalize). I still believe that there would be no problem in doing an insert in finalize as by the time you hit finalize, mongo should be done with the count/group/whatever. [23:04] lstrojny has joined the channel [23:04] pquerna: ryah: well. there are a couple things out on github for doing dns parsing / building. but a fully done authorativie dns server... [23:06] cardona507 has joined the channel [23:07] sechrist: nodejs could distrupt the dns server niche [23:07] sechrist: none of them are really cool [23:07] cardona507_ has joined the channel [23:08] probably_ has joined the channel [23:09] pquerna: djbdns was cool [23:09] sechrist: that it was [23:09] pquerna: but its coolness has faded [23:09] pquerna: no one else likes the djb way anymore [23:10] pquerna: i'm just a lost soul stuck in the past [23:10] Throlkim has joined the channel [23:10] shlainn has left the channel [23:10] termie has joined the channel [23:10] termie has joined the channel [23:11] dguttman has joined the channel [23:11] pquerna: its okay, i'll just rebuild everything djb did in node. [23:11] tmzt: is there a good way to do sessions with redis and express that can be turned into accounts to support a login system? [23:11] jashkenas has joined the channel [23:13] sechrist: uh, sessions are sessions [23:13] sechrist: you want to store user accounts in redis? [23:13] Floxxx: hmm [23:14] tmzt: well I'm just learning how to do stuff the node+redis+nosql way [23:14] Floxxx: ACTION remembers a certain webcast mentioning storing data in redis :p [23:14] bingomanatee: You can create your own session construct in redis - or any repository - lots of people use SQL based sessions - [23:14] sechrist: I wouldn't put actual user account info in redis [23:14] sechrist: sessions sure [23:14] bingomanatee: They won't be Apache sessions. They will be your own user state tracking engine. [23:14] alek_br_ has joined the channel [23:14] tjholowaychuk: i think he means placing a reference in the session [23:15] tjholowaychuk: to fetch authenticated user data [23:15] tmzt: but that seems like a wall to me, I can do all this stuff but if I want to add a uid, and I want some things not to be in the json store [23:15] frodenius: sechrist㇀ why not? [23:15] MikhX has joined the channel [23:15] Esherido has joined the channel [23:15] sechrist: frodenius: redis is cache, not a database [23:15] bingomanatee: You could map a session to a user token in any repository. And by extension establish privileges for a user token. [23:15] frodenius: wait, what? [23:15] tjholowaychuk: redis is a great candidate for sessions [23:15] tmzt: yeah, I was actually considering having nginx pre scan it and make sure the cookie is valid as an authentication layer, so I can make the routes themselves almost direct json rpc [23:15] frodenius: last time i checked, redis was a key-value store [23:16] sechrist: frodenius: nothing that is limited by the amount of memory you have should be a database [23:16] frodenius: not a cache (that would be sth like varnish for me) [23:16] sechrist: don't even mention sharding it [23:16] tmzt: well, most of my data is session data, there's a little 'account' data but I mostly need to recover sessions [23:16] bingomanatee: Just keying a user id in a repo to a session token is pretty SOP. Most people prefer to store no more than a user ID in session. [23:16] frodenius: sechrist㇀ so you have unlimited disk space? [23:16] sechrist: exactly [23:17] delapouite has joined the channel [23:17] sechrist: it's a hell of a lot more clear to scale out a datastore that uses disk than to shard certain information to certain memory-based kv stores [23:17] sechrist: granted some people do that, but it's not standard practice and it should be considered a solution for a specific use case [23:18] frodenius: but, user information [23:18] ita has joined the channel [23:18] frodenius: come on, how much do you store? [23:18] ita: ryah: ping [23:18] tmzt: can you explain? is there a good kv solution if you need it persistent? [23:18] frodenius: (especially auth) [23:18] bingomanatee: you can use redis / memcacheD/ mongoDB to store recent user activity in RAM but as a system of record you are best off with physical media. That is why memcacheD has hooks for missing data to pull it from physical storage. [23:18] tmzt: frodenius: very little data per user, but I want to support a lot of users (potentially) [23:18] frodenius: tmzt㇀ mysql [23:18] Floxxx: matt ranney mentioned at node camp never to use redis to store data you NEED [23:18] tjholowaychuk: tmzt: redis will be great for sessions, use it, but use something else for your actual user data [23:18] tjholowaychuk: just reference via id [23:19] mape: tjholowaychuk: I've had a lot of issues using redis as a store for express [23:19] bingomanatee: what he said. [23:19] tjholowaychuk: mape: really? ive never had any [23:19] mape: Every single page load the user got a new id [23:19] tjholowaychuk: :s [23:19] mape: Ie lost their session [23:19] mape: And I know javajunky knew of other people with the same issue [23:19] tmzt: why would that happen? [23:20] mape: No idea, worked fine with the memory store [23:20] tjholowaychuk: strange, sounds more like a cookie issue [23:20] tjholowaychuk: hm [23:20] tjholowaychuk: thats really weird... we use it in production [23:20] tmzt: tjholowaychuk: sure, but does it still make sense to pull that stuff into the cache at some point? mostly I need to pull it up in response to twilio callbacks [23:20] dgathright has joined the channel [23:20] tjholowaychuk: hell i always use redis for sessions [23:21] mape: Ive used it before [23:21] tjholowaychuk: I use matt's redis lib now [23:21] mape: mjr yeah [23:21] tjholowaychuk: but yeah shouldnt matter its just basic get/set etc [23:21] tjholowaychuk: well setex [23:22] tjholowaychuk: maybe you had an old redis-server [23:22] tahu has joined the channel [23:22] mape: possible [23:22] mape: worked fine with the redis module though [23:22] tjholowaychuk: i dont see how it could be connect-redis, its so basic [23:22] tjholowaychuk: lol [23:23] bingomanatee: So - and I am not saying this is anything but an outlier - if you map sessions to user IDs in reddis, tjholowaychuk, what is your fallback strategy for when redis runs out of memory? [23:23] tjholowaychuk: could be some connect middleware bugs [23:23] mjr_: Floxxx: I did say that, but I sort of regret it now because people take it the wrong way. [23:23] tmzt: tjholowaychuk: tiny [23:23] tmzt: that was a bit of a suprise [23:23] tjholowaychuk: bingomanatee: you could say that about anything [23:23] tjholowaychuk: your shit will break lol regardless [23:23] mjr_: Floxxx: what I wish I had said was, "Databases require you to understand them, and even if they are very easy to use, you still need to know what you are doing." [23:24] mjr_: Since Redis is so easy to get started with, people use it in ways that I believe will harm them down the road. [23:24] pquerna: nsd is neat. it compiles its zone files into a COW in memory red black tree of the zone. [23:24] mjr_: But the same is probably true of any database to a certain degree. [23:24] bingomanatee: specifically given HTTP statelessness, you aren't going to get a lot of "Hey I am done with my session, sign me out" signals from users unless they explicitly log off which is the exeption - do you have a timeout daemon that wipes your user sessions from redis? [23:24] tjholowaychuk: bingomanatee: setex [23:24] tjholowaychuk: set + expires [23:25] bingomanatee: ah, nice. [23:25] tjholowaychuk: so yes [23:25] bingomanatee: 3crowd.copm uses Redis a lot - its their "memcached-killer" [23:25] jchris has joined the channel [23:25] bingomanatee: I'm doing a lot of log analysis type work so client data caching isn't my main concern at the moment but I do want to give it a go one of these days. [23:25] mjr_: I love me some Redis. [23:26] pdelgallego has joined the channel [23:26] mjr_: We use it all over the place. It is very good at what it does. [23:26] tjholowaychuk: mjr_: do you know how far along the clustering stuff is? [23:26] tjholowaychuk: i dont know any of the details [23:26] mjr_: Supposedly early access in jan/feb [23:26] tmzt: does aof improve things? [23:26] mjr_: I wonder which will land first, good https in node or clustering in Redis? [23:27] tjholowaychuk: :D [23:27] mjr_: it's a race! [23:27] mikew3c_ has joined the channel [23:29] Floxxx: mjr_: well, you should use stuff what it's made for, and if you decide to take your chances you'd better know what you're doing :p [23:29] ita has left the channel [23:29] ukev: isaacs: no, I couldn't get the npm problem solved [23:29] tjholowaychuk: worst that happens really is "oh noes I lost my shopping cart" [23:29] tjholowaychuk: well for sessions at least [23:30] tmzt: there's nothing like redis with a shadow backing store? [23:30] ukev: but thanks that you are asking [23:30] Floxxx: you said something about it being possible to use redis for normal data storage but you shouldn't do it unless you know what you're doing :p [23:30] tjholowaychuk: tmzt: antirez was talking about maybe having it defer to another store when the cap is reached [23:30] CrypticSwarm: tjholowaychuk: I just pushed changes to js-yaml up to github to fix a few of the issues. [23:30] tjholowaychuk: not sure if that is acctually what he is considering [23:30] tjholowaychuk: CrypticSwarm: cool I will check it out [23:31] TheEmpath has joined the channel [23:32] isaacs has joined the channel [23:32] TheEmpath: will crankshaft apply to node.js? [23:32] beta has joined the channel [23:33] tmzt: tjholowaychuk: I'm brand new here, been stuck with php and mysql and recently asp.net mvc, trying to learn a new stack. I build a very basic game in node in a few hours and now I'm trying something like a real application but I'm only building/testing on my vps. if I can use redis and migrate the persistent data to something else it shoudl fit nicely into the asynchronous model and I would only have to pull the data once per session and push it back when it chang [23:33] dguttman_ has joined the channel [23:33] Alex3000 has joined the channel [23:33] Floxxx: tmzt: check out mongodb or couchdb [23:34] mjr_: Floxxx: yes, many people use Redis for storing data more durably. You need to use AOF, and you need to make sure you know the implications of that on a restart. [23:34] tmzt: sure I'll look at those as well, actaully mongoose would be perfect if I could get dojo compatible jsonrpc with a small layer [23:34] Floxxx: mongoose is just a framework [23:34] Floxxx: it uses mongo [23:35] TheEmpath: ACTION loves node.js. [23:35] tmzt: right [23:35] mjr_: TheEmpath: crankshaft is already in node at master. It works on x86 32-bit only at the moment, and not all functions benefit from the new optimizations. [23:35] mjr_: But some certainly do. [23:35] tmzt: that's what I mean, the object framework part of it [23:35] Floxxx: ah [23:35] TheEmpath: mjr_: yaaaaaaaaaaaay [23:35] Floxxx: right [23:36] Floxxx: hmm, mongo using 78GB of virtual memory :p [23:36] sechrist: hot [23:38] sechrist: Anybody know a redis or ampq based task queue that is decent? [23:38] sechrist: basically I need a spawn a job, and have processes listening for a specific job, and only have that job execute once [23:38] tmzt: so what in express pushes the session data back? I see where it's loaded (with connect-rdis) [23:39] tjholowaychuk: tmzt: on writeHead() the session data is commited, so you just need to alter req.session [23:39] mjr_: sechrist: if you don't care about losing a job when a worker dies, you can just use Redis and blpop. [23:39] tjholowaychuk: bit of an assumed convenience since you dont directly have control over that, but it saves a lot of headache [23:39] tmzt: tjholowaychuk: okay, didn't realize it would hook that [23:39] tjholowaychuk: forcing you to manually save it all over [23:39] sechrist: mjr_: so the workers just grabs jobs and they disappear from the broker, so if a worker dies it's gone? [23:40] mjr_: sechrist: yeah, in the simple case of blpop. [23:40] tjholowaychuk: tmzt req.session is an instanceof Session so you can take a look at those methods and req.sessionStore etc [23:40] eee_c has joined the channel [23:40] tjholowaychuk: req.sessionID is req.session.id now but both work [23:40] sechrist: Well the complication is I need to be able to create jobs in python and node [23:40] quest88 has joined the channel [23:41] sechrist: which would be fine with blpop [23:41] Floxxx: mjr_: isn't it easier to leave the job in the broker but set a lock on it, and when the job is done remove it from the broker? [23:41] mjr_: sechrist: just landed is a blpoprpush so you can atomically take ownership of a job and put it in your own queue. Then you can get a watchdog process that cleans up after crashed workers. [23:41] sechrist: but I want a real task queue [23:41] sechrist: BRPOPLPUSH, say that three times fast [23:41] Floxxx: lol [23:41] mjr_: Of course, you could also just do blpop, then set it back somewhere, and it wouldn't be atomic, but chances are low that it would matter. [23:41] mjr_: wouldn't matter [23:42] mjr_: in other words. [23:42] Floxxx: :p [23:42] tjholowaychuk: haha you cant $ redis-cli help [23:42] tjholowaychuk: without connecting [23:42] tjholowaychuk: I should probably fix that [23:42] sechrist: yeah but this is pretty low to the redis metal [23:42] sechrist: nobody has abstracted this into libs? [23:42] mjr_: oh sure. There are message queues on redis [23:43] sechrist: Well AMPQ is also on the table [23:43] mscdex: node.js rules! [23:44] mjr_: it's a big table, really [23:45] mscdex: BigTable? [23:45] mscdex: :> [23:46] strmpnk has joined the channel [23:47] cjm has joined the channel [23:47] ryah: is redis-cli part of the node package? [23:47] bingomanatee: Okay I have one - can you use the fs module to tell you if any file in a directory is added/deleted/changed ? [23:48] bingomanatee: ANY file - not a specific one [23:48] tjholowaychuk: ryah: ? redis-cli comes with redis [23:48] tjholowaychuk: along with redis-server redis-benchmark etc [23:49] CIA-18: node: 03Ryan Dahl 07master * rc970968 10/ (doc/api/net.markdown lib/net.js test/simple/test-sendfd.js): better option parsing for socket.write() - http://bit.ly/elRVus [23:49] CIA-18: node: 03Ryan Dahl 07master * rc4161f3 10/ (4 files in 3 dirs): Add callback to socket.write() - http://bit.ly/ehZ2b3 [23:50] mjr_: ryah: redis-cli comes with redis. [23:50] mjr_: but I want to make one with the node repl [23:50] mjr_: and readline and coloring of output and everything. It would be great. [23:50] mjr_: Node's readline is better than redis-cli. [23:51] ryah: btw - socket.write("hello", function () { console.log("written"); }) works now [23:51] tjholowaychuk: i think redis-cli is fine [23:51] tjholowaychuk: i didnt notice anything bad about it [23:52] mjr_: tjholowaychuk: control-d doesn't work right in redis, but does work right in node. [23:52] tjholowaychuk: hm [23:52] mjr_: And the output from many commands is hard to understand in redis, but would be simple to just util.inspect or whatever. [23:52] tjholowaychuk: works fine to me [23:52] saschagehlich has joined the channel [23:52] tjholowaychuk: for* [23:52] mjr_: control-d in the middle of a line deletes to the right. [23:53] Floxxx: bingomanatee: only if you loop through the files [23:53] mjr_: except in redis it always kills the line [23:53] tjholowaychuk: ah gotcha [23:54] dguttman has joined the channel [23:56] bingomanatee: http://jlouisramblings.blogspot.com/2010/12/differences-between-nodejs-and-erlang_14.html [23:56] cjm has joined the channel [23:57] quest88 has joined the channel [23:58] CIA-18: node: 03Ryan Dahl 07master * r632da2a 10/ (3 files in 3 dirs): Add callback paramenter to socket.connect() - http://bit.ly/h5ZrNN [23:59] EGreg: http://howtonode.org/facebook-connect [23:59] EGreg: hey guys what is this? [23:59] EGreg: use(Foo) [23:59] EGreg: use(MethodOverride) [23:59] isaacs: ukev: sorry, I keep having meetings today. I'll be back in an hour or two. I'll ping you when i get back. you can also email npm-@googlegroups.com [23:59] EGreg: is "use" some kind of keyword?