[00:00] EGreg_: how do I extend eventemitter? [00:01] mscdex: v8: {} ? true : false [00:01] v8bot: mscdex: SyntaxError: Unexpected token ? [00:01] mscdex: v8: var foo = {}; foo ? true : false [00:01] v8bot: mscdex: true [00:01] stagas has joined the channel [00:01] mscdex: v8: var foo = []; foo ? true : false [00:01] v8bot: mscdex: true [00:01] EGreg_: how do I extend eventemitter? hmm so close [00:01] mscdex: interesting... [00:02] meck: EGreg: something like: var myObj = {}; myObj.prototype = new EventEmitter() [00:02] SubStack: lots of ways [00:02] EGreg_: are you sure that's wise [00:02] mraleph has joined the channel [00:02] EGreg_: creating a new eventemitter every time the function is called [00:02] mscdex: EGreg_: you mean extend your own object with eventemitter? [00:02] EGreg_: oh I guess yea [00:02] SubStack: function Foo () {} Foo.prototype = new EventEmitter [00:02] EGreg_: yeah I guess so [00:02] EGreg_: what does Foo.prototype = new EventEmitter do [00:02] mscdex: EGreg_: i usually just use sys/util.inherits [00:03] SubStack: var obj = new EventEmitter; obj.pow = function () {} [00:03] EGreg_: it sounds like there will be just One eventemitter object, and then ALL your instances will point to that ONE eventemitter object [00:03] EGreg_: or am I wrong [00:03] EGreg_: why not just encapsulate an eventemitter [00:03] EGreg_: mscdex: wher do you find documentation on sys/util.inherits [00:03] mscdex: EGreg_: it's not documented currently. but you'd just do something like: sys.inherits(Foo, events.EventEmitter); [00:04] mscdex: then add to your prototype [00:04] EGreg_: will it be deprecated? [00:04] EGreg_: is that why it's not documented? [00:04] mscdex: i dunno, you have to ask ryah that one [00:05] mscdex: i haven't heard anything about it being removed [00:05] EGreg_: so um [00:05] EGreg_: is that all I would have to do [00:05] EGreg_: to emit events [00:05] EGreg_: why doesn't everyone use it [00:05] mscdex: EGreg_: yes [00:05] EGreg_: btw it's util.iherits now. sys.inherits is no more [00:06] chrischris has joined the channel [00:06] mscdex: EGreg_: right [00:06] mscdex: EGreg_: i can't speak for everyone, but node core uses it and i use it [00:06] AAA_awright has joined the channel [00:07] erlnoob: by doing server.listen('/tmp/echo.sock') node creates a unix socket and does not have tcp overhead right? [00:07] EGreg_: it's now util.inherits [00:07] EGreg_: not sys.inherits [00:07] EGreg_: node.js api changes a lot I think :( [00:07] EGreg_: for example .end() used to be .finis9) [00:07] EGreg_: for response [00:07] davvilla has joined the channel [00:07] mscdex: EGreg_: that's why there's a stable branch ;-) [00:07] hellp has joined the channel [00:07] SubStack: prototypes ftw [00:08] evanmeagher: EGreg_: I wouldn't say "a lot," but it's still not a 1.0 so you can expect nothing to be set in stone [00:09] EGreg_: right, ok. [00:10] ajsie has joined the channel [00:10] EGreg_: are you sure that .prototype = new events.EventEmitter is the RIGHT way [00:10] ajsie: why are people still using Narwhal? [00:10] ajsie: seems pretty dead compared to node.js [00:10] EGreg_: Pie.prototype = new require('events').EventEmitter; [00:10] EGreg_: so like that? [00:11] pietern has joined the channel [00:11] meck: it depends entirely on the context [00:11] davvilla: Hey, everyone. I have a quick question, probablly very trivial but i can't figure it out and its been 3 hours [00:11] davvilla: I got nodejs working with a normal http server. But when i try to acces lets say index.html on my server or even files that don't exist it just loads the 'hello world' which I am responding with on my server.js. Could anyone tell me what im doing wrong? My final goal is to use this with socketio [00:11] meck: setting .prototype is how you do prototypal inheritance [00:12] evanmeagher: davvilla: can you give some example code? [00:12] markwubben has joined the channel [00:12] evanmeagher: davvilla: it sounds like your 'hello world' response is preemting any file-serving [00:12] evanmeagher: *preempting [00:14] EGreg_: Pie.prototype = new require('events').EventEmitter;? [00:14] meck: EGreg_: here is some reading you can do on the subject http://www.webreference.com/programming/javascript/prototypal_inheritance/ [00:14] EGreg_: like that? [00:14] meck: that will definitely work [00:15] EGreg_: oh I see how it works! [00:15] meck: then Pie.emit("foo"); [00:15] EGreg_: because you used new X, the prototype will inherit from X.prototype -- but what that basically means is if I now add something to X.prototype, it will no longer show up in the other prototype [00:15] EGreg_: great :) [00:15] meck: err... var p = new Pie; p.emit("foo"); depending on what Pie is [00:15] Anti-X: function Pie() {}; require('util').inherit(Pie, process.EventEmitter) [00:15] Anti-X: not process [00:15] Anti-X: i think [00:15] Anti-X: but something [00:16] Anti-X: it's probably sys/util that also [00:17] davidc_ has joined the channel [00:17] slaskis: can i make spark2 watch more files than the server.js ? [00:18] mscdex: Anti-X: events.EventEmitter [00:18] Anti-X: yeah [00:18] Anti-X: but my point was, use util.inherit [00:18] erlnoob: hey guys what do you think of https://github.com/janl/awesome ? [00:18] erlnoob: with node having a memory limit, wouldn't it be a problem [00:19] mscdex: util.inherits [00:19] mscdex: ;-) [00:19] Anti-X: so is your face [00:20] mscdex: util.inherits(Pie, Delicious); [00:20] Anti-X: delicious is an attribute, not an object [00:21] Anti-X: possibly a float, probably a boolean [00:22] gf3 has joined the channel [00:25] erlnoob: hey guys, look what I found http://code.google.com/p/v8/issues/detail?id=847 [00:25] nbqx has joined the channel [00:25] erlnoob: ... "because it cannot handle more than ~140K websockets concurrent connections" ... [00:25] erlnoob: is this true? [00:29] EGreg_: var PieConstructor = function () {} [00:29] EGreg_: PieConstructor.prototype = new require('events').EventEmitter(); [00:29] EGreg_: var Pie = new PieConstructor(); [00:29] EGreg_: doesn't work! [00:29] EGreg_: why not? [00:29] EGreg_: object has no method .emit() [00:29] EGreg_: v8: require('events'); [00:29] v8bot: EGreg_: ReferenceError: require is not defined [00:30] webr3: PieConstructor.prototype.__proto__ = require('events').EventEmitter.prototype; [00:31] EGreg_: yeah... [00:31] EGreg_: but if I assign it to new EventEmitter [00:31] EGreg_: it should create a new EvetnEmitter and its __proto__ will be the .prototype [00:31] EGreg_: so what's the problem? :( [00:31] EGreg_: it should have same effect [00:31] markwubben has joined the channel [00:34] EGreg_: aha I found the problem [00:34] EGreg_: stupid js did [00:34] EGreg_: (new require('events')).EventEmitter [00:34] EGreg_: :P [00:42] webr3: erlnoob, whoever said that should try opening up ~140k concurrent HTTP connections on an apache box (or 50) [00:43] erlnoob: yea I miss read that thinking it was 140 concurrent websockets man I was like wtf :( [00:43] erlnoob: but then I was like :) [00:44] webr3: was music to my ears anyways, just finished a websocket service for a client lol [00:44] webr3: imagine how many apache servers you'd need for that on long-poll http - amazing difference [00:44] erlnoob: yea, but I'm still worried about v8's 1gb memory limit [00:45] erlnoob: I was thinking of separating the web and application/game server, with the game server doing stuff in memory like redis does [00:45] webr3: use redis for that then - it's more optimized for it [00:45] erlnoob: but this limit would mean a no-go [00:46] meck: you can always run 2 node instances for 2 gigs [00:46] mraleph: why people want to have huge GC managed heaps? *sigh* [00:47] AAA_awright: why would someone? [00:48] AAA_awright: Hmm, I wonder how easy it is to compile it down to C or something that isn't memory-managed [00:48] erlnoob: webr3: the thing is, the game server would have many sequential computations, and man, doing async io node to redis makes me see boomerangs, boomerangs everywhere! [00:48] slaskis has joined the channel [00:50] unomi: It is vital for my server-side work that V8 supports at least 32GB memory sizes [00:50] unomi: orly [00:50] erlnoob: some of you smarter people than me should make a language that compiles down to js, which makes what appears to be sync ops, to be async, with the compiler doing the dependency guesswork [00:50] unomi: erlnoob, sounds like you want coffeescript [00:51] unomi: async is great though [00:51] SubStack: it's true [00:52] SubStack: and anyways there are nifty flow control libs for handling complicated async logic [00:52] SubStack: why, I'm writing one right now in fact [00:52] jesusabdullah: Why would you want async ops to look synchronous? [00:52] jesusabdullah: I mean, I understand flow control, but [00:52] erlnoob: well it should have a different notation of course [00:53] erlnoob: but the main goal is to have less boomerangs [00:53] webr3: erlnoob - you can already do that yourself [00:53] unomi: what do you mean by boomerangs? [00:53] webr3: somethingExpectingACallback( param, this.nextMethod ) [00:54] unomi: do you realize how awesome boomerangs are? [00:54] SubStack: erlnoob: https://github.com/creationix/step [00:55] SubStack: unomi: great for hunting kangaroo [00:55] erlnoob: boomerangs are awesome, i just don't want to stare at them 3am in the morning [00:55] AAA_awright: It is vital my website appear in stereoscopic 3D and produce the smell of roasted coffee! Please implement these features! [00:55] SubStack: well that is just how javascript works [00:55] gf3 has joined the channel [00:55] unomi: sure, it can take some practice, but pound for pound there is no better hand powered projectile [00:55] webr3: no it isn't [00:55] boaz has joined the channel [00:55] webr3: that's a coding style choice, there's no need to nest 20 functions within each other [00:55] erlnoob: it is vital my website gets me laid! [00:55] webr3: infact you enver have to nest a function, ever [00:56] erlnoob: SubStack: step might do for now thanks for the link [00:56] SubStack: oh I thought 'boomerang' was about asynchronousness, not indentation style >_< [00:56] paulwe has joined the channel [00:56] SubStack: erlnoob: and soon, a better one [00:56] unomi: I thought it was about things hitting you in the head when you werent looking [00:56] AAA_awright: webr3: What about closures? [00:56] SubStack: soon being maybe 30 minutes or less [00:57] SubStack: unomi: yes that [00:57] jesusabdullah: maan where is isaacs when I need him [00:58] webr3: net.createServer( function(server) { ... vs net.createServer( my.newServer ) ? [00:58] unomi: erlnoob, considering that craigs list is toning down their skin service, there may be a realtime app niche to be filled [00:58] erlnoob: wth is skin service [00:59] unomi: happy ending massage services [01:00] erlnoob: what i had in mind was something like this: [01:00] erlnoob: line#1 x <- db.query 'select ... ' [01:00] erlnoob: line#2 foo = bar + 1 [01:00] erlnoob: line#3 print x.username [01:01] unomi: goto 1 ? [01:01] erlnoob: now since line3 depends on x, it will be executed in the callback [01:01] erlnoob: but not for line 2 [01:02] erlnoob: now let's see line4 [01:02] erlnoob: line#4 print x.lives + foo [01:02] erlnoob: ahhh, line#4 depends on x and foo [01:02] erlnoob: so the compiler would be smart enough to also put line#2 now in the callback [01:03] unomi: sounds like you are procrastinating :p [01:03] webr3: it's ambiguous [01:03] webr3: consider line two as foo += bar; [01:04] pkrumins has joined the channel [01:04] webr3: then should it be incremented before or after #line 4 [01:04] webr3: compiler has no way of knowing [01:04] erlnoob: before, just in case [01:04] erlnoob: :P [01:04] webr3: but that's wrong for me [01:04] webr3: and right for you [01:05] erlnoob: yea i get what you mean [01:05] pkrumins: hey anyone noticed that expresso no longer has assert.ok? [01:05] erlnoob: depends on what bar is at any point in time [01:05] yumike has joined the channel [01:06] AAA_awright has joined the channel [01:09] paulwe has joined the channel [01:10] indexzero has joined the channel [01:12] mscdex: pkrumins: i thought expresso just extended the core assert module? [01:13] pkrumins: turns out you're right [01:13] pkrumins: something is wrong on my machine. [01:14] Anti-X has joined the channel [01:15] zentoooo has joined the channel [01:16] InsDel has joined the channel [01:16] AAA_awright has joined the channel [01:17] gf3 has joined the channel [01:20] jimt has joined the channel [01:26] markwubben1 has joined the channel [01:33] derferman has joined the channel [01:34] derferman has joined the channel [01:36] jakehow has joined the channel [01:37] sambao21 has joined the channel [01:37] paulwe has joined the channel [01:38] mopemope has joined the channel [01:39] mopemope has left the channel [01:40] saschagehlich has joined the channel [01:42] jimt has joined the channel [01:44] niko has joined the channel [01:49] eml-mobile has joined the channel [01:51] spetrea has joined the channel [01:55] jchris1 has joined the channel [01:56] Ezku\ has joined the channel [01:56] niko has joined the channel [01:59] luke` has joined the channel [02:00] dab has joined the channel [02:05] Aikar: erm [02:06] Aikar: downloading a 500mb file (through expressjs static provider) is using up 1gb of memory.... why O.o [02:06] pkrumins has left the channel [02:08] Aikar: i take it due to caching as cancelling dl dropped it to 530M [02:09] AAA_awright: Use Nginx or sendfile or something? [02:09] Anti-X: you may wanna do a util.pump instead [02:09] Anti-X: with a file descriptor [02:09] Aikar: i was just testing something else and i figured staticProvider was quickest way to throw up a file download host [02:09] eml-mobile has left the channel [02:09] jimt has joined the channel [02:09] Aikar: and Anti-X wouldnt 0.3.X new .pipe() be better? [02:10] JimBastard has joined the channel [02:10] Anti-X: no idea [02:10] JimBastard: fucking internet [02:10] JimBastard: okay, code time [02:10] herbySk has joined the channel [02:10] Aikar: i think it sorta handles the code for .pump [02:10] Aikar: read.pipe(write) [02:13] bartt has joined the channel [02:16] agnat has joined the channel [02:19] SubStack: hooray https://github.com/substack/node-seq [02:19] dab: Yo can anyone help me with this? It uses socket.io, but crashes when a client connects :/ [02:19] dab: http://nodejs.pastebin.com/UFPmbwsF [02:19] SubStack: and now, adding {par,seq,for}Each [02:20] dab: I'm not sure what the error means :/ [02:20] SubStack: dab: __dirname + '/' [02:21] SubStack: maybe [02:21] dab: lemme try [02:21] Ldrtan has joined the channel [02:21] dab: no cigar :/ [02:22] Anti-X: cigars are nasty anyways [02:23] dab: xD true dat [02:23] dab: yea I've tried removing all but the "stream = net.createConnection('irc.dab.biz', 6667);" inside the io.on connection call [02:23] dab: but it still breaks [02:25] pydroid has joined the channel [02:25] Anti-X: you need to supply an ip [02:25] dab: oh really? [02:25] Anti-X: i would think so [02:25] Aikar: i wouldnt think so... [02:25] Aikar: that would be really silly O.o [02:25] dab: ^ [02:26] Anti-X: does it look it up itself? [02:26] dab: I'll give it a try [02:26] Aikar: it SHOULD lol [02:26] Anti-X: remember this is the net lib, not the http one [02:26] dab: yea still breaks :/ [02:26] Anti-X: oh well [02:27] Anti-X: what's the error? [02:27] dab: http://nodejs.pastebin.com/UFPmbwsF [02:31] wasabist has joined the channel [02:33] nooder has joined the channel [02:35] dab: :\ [02:35] Vekz has joined the channel [02:36] dab: lol gosh I wish I were impatient :( [02:39] dab: What does "Error: ENOENT, No such file or directory" mean ? [02:40] Anti-X: exactly that [02:40] wasabist has joined the channel [02:40] dab: O.o [02:40] yozlet has joined the channel [02:41] agnat has joined the channel [02:41] Dreamer3 has joined the channel [02:42] dab: Is there any way to debug better? Like some hidden debug flag? :\ [02:42] CIA-95: node: 03Tom Hughes 07master * r7fcfb7b 10/ src/node_child_process.cc : Fix memleak in ChildProcess:Spawn(). - http://bit.ly/evSCyB [02:42] CIA-95: node: 03Tom Hughes 07master * r6285fac 10/ src/node_buffer.cc : [02:42] CIA-95: node: Allocations with new[] must be freed with delete[]. [02:42] CIA-95: node: See http://valgrind.org/docs/manual/mc-manual.html#mc-manual.rudefn - http://bit.ly/euEC6y [02:43] dab: Thanks CIA-95 :+ [02:46] sixthgear has joined the channel [02:46] nooder has joined the channel [02:47] davvilla: is there an easy way to encode/decode msgs for socket io? [02:47] unomi has joined the channel [02:47] SubStack: JSON.{parse,stringify} [02:47] jimt has joined the channel [02:47] davvilla: <3 thanks [02:49] dab: lol wish my issue was this easy :\ [02:49] Anti-X: it is [02:49] Anti-X: do you know what a file is? [02:49] Anti-X: and a file name [02:49] dab: Yes [02:49] Anti-X: so, imagine, you're making a file name, but there's no file that has that name [02:49] Anti-X: ta-da [02:50] dab: Right, but I'm not making a file. I'm creating a connection [02:57] erlnoob has joined the channel [02:57] dab: I wish I could see what file its trying to load [02:57] wasabist_ has joined the channel [03:00] wasabist has joined the channel [03:02] bradleymeck1 has joined the channel [03:04] micheil has joined the channel [03:11] Ldrtan has joined the channel [03:11] jchris1 has joined the channel [03:15] devinus: JimBastard: dude, don't listen to those fools on reddit [03:15] JimBastard: lol thanks devinus [03:16] JimBastard: lets keep that out of main chat here [03:16] JimBastard: :-) [03:19] dab: :o [03:21] davidascher has joined the channel [03:24] wilmoore has joined the channel [03:24] abiraja has joined the channel [03:24] Wyverald has joined the channel [03:26] markwubben has joined the channel [03:28] dguttman has joined the channel [03:32] unomi: what fools on reddit? [03:33] tekky has joined the channel [03:34] erlnoob: yea i keep hearing about those mystical beings too [03:35] unomi: ah found it [03:38] Fenda has joined the channel [03:40] Wyverald has joined the channel [03:43] Fenda: Shouldn't setTimeout return an interger value? I'm getting an object full of goodies on my nodejs server. var id = setTimeout(function() {}, 2000); console.log(id); [03:44] sugardave has joined the channel [03:44] siculars has joined the channel [03:45] siculars has joined the channel [03:47] davidascher has joined the channel [03:52] rcy has joined the channel [03:54] jchris1 has joined the channel [03:56] yozlet has joined the channel [03:58] cheney has joined the channel [03:59] dab: ROFL [03:59] dab: I figured out my problem [03:59] dab: http://nodejs.org/docs/v0.3.1/api/all.html#net [03:59] dab: et.createConnection(port, [host]) [03:59] dab: I had it backwards [04:03] naturalethic has joined the channel [04:04] mscdex: Fenda: no. setTimeout is actually a method in node core in lib/timers.js [04:04] mscdex: Fenda: same with setInterval [04:05] wasabist_ has joined the channel [04:05] Fenda: mscdex: ah, i see. In some cases I want to clear the timer. Can this still be done with nodejs timers? [04:06] mscdex: Fenda: yep, just use clearTimeout or clearInterval with setTimeout or setInterval's return value respectively [04:07] Athox has joined the channel [04:07] Fenda: mscdex: oh so clearTimeout accepts an object then [04:08] mscdex: Fenda: yep [04:08] Fenda: mscdex: thanks [04:08] naturalethic: it's the integer id returned by setTimeout [04:08] naturalethic: a token [04:08] shaver: it's not an integer in node's impl [04:09] naturalethic: ah neat [04:10] naturalethic: a bit more useful [04:10] markwubben has joined the channel [04:13] wasabist_ has joined the channel [04:16] Anti-X has joined the channel [04:20] davidascher has joined the channel [04:23] hassox has joined the channel [04:26] markwubben has joined the channel [04:31] mjr_ has joined the channel [04:42] markwubben has joined the channel [04:44] unomi has joined the channel [04:44] unomi has joined the channel [04:50] meck has joined the channel [04:55] Utkarsh has joined the channel [04:55] Anti-X has joined the channel [04:57] wasabist_ has joined the channel [05:01] hassox has joined the channel [05:05] Utkarsh has joined the channel [05:05] jimt_ has joined the channel [05:05] masahiroh has joined the channel [05:10] ajpiano has joined the channel [05:11] shaver: SubStack: does node-seq let me limit parallelism of a set of || tasks? [05:11] SubStack: a set of ||? [05:11] shaver: SubStack: I have some code that slurps from an API, but I only want to run ~4 requests in parallel to avoid boning the server [05:11] shaver: sorry, parallel tasks [05:12] SubStack: like parallel logical or short-circuiting? [05:12] SubStack: *logical-or [05:12] shaver: no, sorry, no logical-or [05:12] shaver: was just using || as abbrev for "parallel", confusingly [05:13] SubStack: right now there aren't limits on the number of async requests, but that wouldn't be so impossible to add [05:14] SubStack: could add an optional first parameter to par and parEach [05:14] shaver: I started to hack it into another async lib at one point, but I was pretty new to node at the time, so it looked like someone had taken a dump in my editor window [05:14] siculars_ has joined the channel [05:15] SubStack: this lib is only 201 lines and hugs the left margin pretty well [05:15] davvilla: is it possible to do like an include in js? if im running node, so no document.write [05:16] SubStack: davvilla: require [05:16] shaver: davvilla: at top level, you can do it with eval(fs.readFileSync("file.js")) [05:16] shaver: or require if you don't need it to share a scope [05:16] SubStack: http://nodejs.org/api.html#modules-324 [05:16] dab: lol node.js is so freaking sexy btw guys [05:16] shaver: yeah [05:16] dab: now that I'm understanding hwo it works xD [05:16] SubStack: fact [05:16] davvilla: sweeet [05:16] davvilla: thanks again guys [05:16] shaver: I built this impossibly-fast search thing with node and websockets and redis [05:17] dab: nice! [05:17] shaver: people literally did not believe that I was crossing the network [05:17] dab: :o [05:17] micheil: shaver: only because of the websockets :P [05:17] micheil: (I joke) [05:17] shaver: websockets a big part of it [05:17] shaver: need compression in there, now [05:17] dab: :> [05:18] shaver: my response time is bounded by network transfer time [05:18] micheil: ACTION is trying to figure out the best api for a facebook realtime graph client to use. [05:18] shaver: gonna do LZW in JS, probably [05:18] shaver: wish node had typed arrays [05:18] Utkarsh has joined the channel [05:18] Aria has joined the channel [05:22] shaver: mjr_: if I update my node to master, is node_redis going to asplode on me? [05:23] Spion__ has joined the channel [05:23] shaver: micheil: do you have any example code that uses multiple websockets to the same host? ws://myhost/service-1, etc. [05:23] micheil: hmm.. [05:23] micheil: not really [05:24] micheil: shaver: check: https://github.com/miksago/nws-router [05:24] shaver: oh, hello [05:24] shaver: ah, so it's just in req.url [05:25] shaver: that makes sense [05:25] evanmeagher has joined the channel [05:25] micheil: it's so broken though [05:25] shaver: websocket paths, or that code? [05:25] micheil: that code [05:25] shaver: oh, ok [05:25] shaver: that's fine [05:26] micheil: but yeah, you'll end up with something like: [05:27] micheil: Router.call(websocketServer) [05:27] micheil: then store that and do: router.on("/some-path/", fn..) [05:27] shaver: and that just wires up per-path event listeners? [05:27] nolkyan has joined the channel [05:27] micheil: I think this is the line that's broken, off memory:https://github.com/miksago/nws-router/blob/master/lib/router.js#L8 [05:28] micheil: yeah [05:28] shaver: sounds reasonable [05:28] Anti-X has joined the channel [05:28] micheil: so rather then listening for connection events, you listen for path events.. [05:28] shaver: I just need to smuggle in some parameters, so I can stash it on the connection object and be OK [05:28] micheil: hmm? [05:29] micheil: like http://github.com/miksago/nws-memstore? [05:29] shaver: yeah [05:29] micheil: that'll allow you to store data on connections [05:29] shaver: right [05:29] micheil: and it was updated in the last day to work with the latest server [05:29] shaver: woot [05:30] shaver: hrm [05:30] shaver: I guess I'm basically committed to exposing node directly to the wire at this point [05:31] micheil: hmm? [05:31] shaver: or can I still put it behind nginx or similar? [05:31] Tobias|: You can [05:31] shaver: just wanted something a little more hardened than node-master listening to the raw and filthy sockets of the internet [05:31] Tobias|: Not sure about nginx [05:32] shaver: Tobias|: with websocket stuff too? [05:32] Tobias|: Provided it has a proxy module you can [05:32] Tobias|: ACTION wouldn't know about that, sorry :< [05:33] shaver: doesn't look like it yet [05:33] shaver: http://forum.nginx.org/read.php?2,129658 [05:33] shaver: that's OK [05:33] micheil: I think websockets still break with nginx fronting [05:33] wilmoore has joined the channel [05:33] micheil: but I know haproxy works, but pusherapp.com won't tell me their secrets :P [05:34] shaver: I guess anything that supports websockets supports CORS [05:37] wasabist has joined the channel [05:38] davidascher has joined the channel [05:38] mikew3c_ has joined the channel [05:42] jb55 has joined the channel [05:43] mbrochh has joined the channel [05:43] mbrochh has joined the channel [05:44] confoocious has joined the channel [05:44] confoocious has joined the channel [05:45] sivy has joined the channel [05:46] mscdex: micheil: unless they've gone in and modified the haproxy code some way, websocket draft 76 does not work with haproxy [05:49] meder has joined the channel [05:50] MikhX has joined the channel [05:57] paulwe has joined the channel [06:05] davvilla: Hey guys quick question, I have a js file I want to use so i call it with eval(fs.readFileSync("./player.js")) , then when I try to use new Player(), i get a Reference error saying "Player is not defined" [06:05] davvilla: anyone know what could be going on? [06:05] gkatsev: `eval [06:05] gkatsev: don't use eval [06:05] shaver: well, and a console.log in that file doesn't run [06:05] shaver: why not use eval? [06:05] shaver: he wants an include-alike [06:05] gkatsev: eval is evil [06:06] shaver: :eyeroll: [06:06] gkatsev: :P [06:06] davvilla: Haha, I want to simulate as you could include a header file in other languages [06:06] davvilla: and just make a new instance of that header [06:06] davvilla: good ol oop [06:06] gkatsev: I guess I don't know the exact use case, but generally, eval should be avoided. [06:06] davvilla: hmmm any other sugestions as to how i could do this? [06:06] davvilla: apart from eval [06:06] naturalethic: use the module system [06:07] naturalethic: var player = require('./player'); new player.Player(); [06:07] gkatsev: yeah, why not just do: var Player = require('./player.js'); var player = new Player(); [06:08] naturalethic: provided you have "exports.Player = Player" in your player.js [06:09] gkatsev: add what naturalethic said to the file [06:09] shaver: for gkatsev's case, you can do "module.exports = Player" [06:09] shaver: and then you import the constructor directly [06:09] naturalethic: unless you're using yabble i recently discovered [06:09] gkatsev: yabble? [06:09] davvilla: ok so that got me somewhere [06:10] davvilla: its actually accecing the player.js file now [06:10] davvilla: how would the contrusctor be tho? [06:10] naturalethic: a CommonJS module implementation, doesn't expose 'module' [06:10] davvilla: exports.Player = Player(clientId){ } ? [06:10] naturalethic: yeah, that's your constructor i take it [06:10] mscdex: davvilla: exports.Player = function(clientId) {} [06:11] gkatsev: davvilla: dont you already have a Player function in that file? in which case you just want to do expors.Player = Player; [06:11] markwubben has joined the channel [06:11] olegp has joined the channel [06:11] mscdex: davvilla: then you can add methods like: exports.Player.prototype.foo = function() {} [06:11] mscdex: or just use a variable for your Player object and then export it last [06:11] jakehow has joined the channel [06:12] shaver: OK, time to learn how people go about mocking in Node, so I can write some better tests here [06:12] mscdex: console.log('nyah nyah nyah nyah'); // mocking in node [06:12] mscdex: :p [06:12] shaver: hey-o! [06:12] Aria: ACTION grins at mscdex  [06:21] airhorns has joined the channel [06:26] markwubben has joined the channel [06:30] jesusabdullah: :D That's a good one [06:31] fangel has joined the channel [06:32] Anti-X has joined the channel [06:33] BHSPitMonkey has joined the channel [06:33] davvilla: w00t, finally got it. thanks for the help guys :D [06:33] derferman has joined the channel [06:34] matjas has joined the channel [06:36] jchris1 has joined the channel [06:37] markwubben has joined the channel [06:38] rcy has joined the channel [06:40] derferman has joined the channel [06:41] wasabist has joined the channel [06:43] wasabist_ has joined the channel [06:44] aurynn: so what's a good resource to learn to write native node extensions? [06:45] Aria: Read some. Ry's postgres module's not bad. [06:47] aurynn: mk [06:54] aurynn: I shall, as I am wanting to see an SDL binding. [06:57] Aria: Nice. [06:59] aurynn: this may be insane! [06:59] aurynn: but it'll be fun to have a canvas-like API that backs onto SDL [07:00] lianj: cairo? [07:01] mscdex: egypt? [07:01] mscdex: :p [07:03] jimt has joined the channel [07:04] aurynn: :P [07:05] zentoooo has joined the channel [07:07] mikew3c has joined the channel [07:08] jimt has joined the channel [07:09] EGreg: hey hmm [07:09] sriley has joined the channel [07:09] EGreg: v8: var x = {a: 'b', z:, 4, y: 3, b: 4}; x [07:09] v8bot: EGreg: SyntaxError: Unexpected token , [07:10] EGreg: v8: var x = {a: 'b', z: 4, y: 3, b: 4}; x [07:10] v8bot: EGreg: {"a": "b", "z": 4, "y": 3, "b": 4} [07:10] EGreg: v8: var x = {a: 'b', z: 4, y: 3, 2: 9, b: 4}; x [07:10] v8bot: EGreg: {"2": 9, "a": "b", "z": 4, "y": 3, "b": 4} [07:10] EGreg: v8: var x = {a: 'b', z: 4, y: 3, 2: 9, 3:9 b: 4}; x [07:10] v8bot: EGreg: SyntaxError: Unexpected identifier [07:10] EGreg: v8: var x = {a: 'b', z: 4, y: 3, 2: 9, 3:9, b: 4}; x [07:10] v8bot: EGreg: {"2": 9, "3": 9, "a": "b", "z": 4, "y": 3, "b": 4} [07:10] EGreg: interesting. The numbers are pushed to the front, otherwise it's in the right order. Okay, this an be useful :) [07:10] EGreg: Are there any guarantees v8 won't suddently change the order of its arguments? [07:10] mscdex: i wouldn't count on it [07:11] googol has joined the channel [07:11] chrischris has joined the channel [07:11] dgathright has joined the channel [07:11] mscdex: EGreg: Object.keys(x).sort(); [07:11] mscdex: ;-) [07:12] mscdex: v8: var x = {a: 'b', z: 4, y: 3, 2: 9, 3:9, b: 4}; Object.keys(x).sort(); [07:12] v8bot: mscdex: ["2", "3", "a", "b", "y", "z"] [07:12] nsolsen has joined the channel [07:12] quirkey has joined the channel [07:13] mscdex: v8: var x = {a: 'b', z: 4, y: 3, '2': 9, 3:9, b: 4}; x [07:13] v8bot: mscdex: {"2": 9, "3": 9, "a": "b", "z": 4, "y": 3, "b": 4} [07:13] meder: is node 0.3.1 relatively stable enough to use? [07:13] Max-Might has joined the channel [07:13] meder: or should i use 0.2.5? [07:13] heap has joined the channel [07:13] mscdex: meder: 0.2.x is the current stable branch [07:13] meder: and - does anyone on debian/ubuntu have a .deb of it? [07:14] EGreg: mscdex: what? [07:15] EGreg: I don't want to sort them :) [07:15] Anti-X: meder, can't you just compile it? [07:15] EGreg: v8: var x = {a: 'b', z: 4, y: 3, '2': 9, 3:9, b: 4}; [07:15] v8bot: EGreg: undefined [07:15] EGreg: v8: var x = {a: 'b', z: 4, y: 3, '2': 9, 3:9, b: 4}; Object.keys(x) [07:15] v8bot: EGreg: ["2", "3", "a", "z", "y", "b"] [07:15] softdrink has joined the channel [07:15] Anti-X: the installation is pretty straight forward [07:15] meder: Anti-X: i sure can, but isn't it a pain to uninstall or upgrade? [07:15] EGreg: NICE!!!! :) [07:15] Anti-X: no it's not a pain to uninstall [07:15] mscdex: meder: https://launchpad.net/~jerome-etienne/+archive/neoip [07:16] Anti-X: just delete /usr/local/lib/node [07:16] Anti-X: or whatever it is [07:16] Anti-X: it's in the makefile somewhere [07:16] EGreg: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, 3:9, b: 4}; Object.keys(x) [07:16] v8bot: EGreg: ["2", "3", "a", "z", "y", "b"] [07:16] EGreg: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "3abc":9, b: 4}; Object.keys(x) [07:16] v8bot: EGreg: ["2", "a", "z", "y", "3abc", "b"] [07:16] Anti-X: actually the makefile may have uninstall parameters... let me check [07:17] meder: guess i'll just compile it then [07:17] Anti-X: it does have an uninstall option [07:17] Anti-X: make uninstall [07:18] Anti-X: quite sexy [07:19] jameshome has joined the channel [07:20] SamuraiJack has joined the channel [07:21] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "3.0":9, b: 4}; Object.keys(x); [07:21] v8bot: mscdex: ["2", "a", "z", "y", "3.0", "b"] [07:21] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "30":9, b: 4}; Object.keys(x); [07:21] v8bot: mscdex: ["2", "30", "a", "z", "y", "b"] [07:21] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "-1":9, b: 4}; Object.keys(x); [07:21] v8bot: mscdex: ["2", "a", "z", "y", "-1", "b"] [07:21] derferman has joined the channel [07:21] mscdex: heh [07:21] mscdex: interesting [07:22] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "0":9, b: 4}; Object.keys(x); [07:22] v8bot: mscdex: ["0", "2", "a", "z", "y", "b"] [07:22] SamuraiJack has joined the channel [07:24] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "<":9, b: 4}; Object.keys(x); [07:24] EGreg: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, 2: 7, "3abc":9, b: 4}; Object.keys(x) [07:24] v8bot: mscdex: ["2", "a", "z", "y", "<", "b"] [07:24] v8bot: EGreg: ["2", "a", "z", "y", "3abc", "b"] [07:25] EGreg: v8: var x = {"08": 2, "8": 9} [07:25] v8bot: EGreg: undefined [07:25] EGreg: v8: var x = {"08": 2, "8": 9}; x [07:25] v8bot: EGreg: {"8": 9, "08": 2} [07:25] EGreg: v8: var x = {'a': 'b', "08": 2, "8": 9}; x [07:25] v8bot: EGreg: {"8": 9, "a": "b", "08": 2} [07:25] EGreg: interesting :) [07:25] EGreg: v8: var x = {'a': 2, "00": 2, "0": 9}; x [07:25] v8bot: EGreg: {"0": 9, "a": 2, "00": 2} [07:26] mscdex: v8: var x = {a: 'b', z: 4, y: "3abc", '2': 9, "!":9, b: 4}; Object.keys(x); [07:26] v8bot: mscdex: ["2", "a", "z", "y", "!", "b"] [07:26] mscdex: odd stuff [07:26] EGreg: not odd [07:26] EGreg: it just puts numbers in the front [07:26] EGreg: everything else it puts in the same order [07:26] EGreg: as you inserted it :) [07:26] markwubben has joined the channel [07:26] EGreg: I hope it stays that way, because I will use it :) [07:27] margle has joined the channel [07:28] mscdex: EGreg: -1 is a number ;-) [07:28] mscdex: so is 3.0 [07:28] mscdex: and even 08 [07:28] luke` has joined the channel [07:29] ryah: how do i get npm to install some stuff into ./deps ? [07:29] ryah: --root? [07:32] Anti-X has joined the channel [07:33] evanmeagher: ryah: believe so [07:33] bahamas has joined the channel [07:34] ryah: hm [07:34] mattcodes has joined the channel [07:38] mbrochh has joined the channel [07:46] jetienne has joined the channel [07:51] ivanfi has joined the channel [07:54] wasabist_ has joined the channel [07:56] slaskis has joined the channel [07:57] chrischris has joined the channel [07:58] SamuraiJack has joined the channel [08:04] peutetre has joined the channel [08:04] ryah: does socket.io work with node 0.3 ? [08:05] Athox has joined the channel [08:06] joeshaw has joined the channel [08:06] shaver has joined the channel [08:07] micheil: maybe [08:07] ryah: i'm not getting errors... [08:07] micheil: npm bundle is what you may have wanted before for npm [08:08] micheil: check: http://blog.izs.me/post/1675072029/10-cool-things-you-probably-didnt-realize-npm-could-do [08:08] hassox has joined the channel [08:09] micheil: ryah: so what, socket.io isn't doing what it's meant to on 0.3, but you're not getting errors? [08:09] nsolsen has joined the channel [08:10] ryah: it doesn't seem to be doing what it's meant to [08:10] micheil: hmm.. odd. [08:11] micheil: you'd probably have to talk to rauchg [08:12] Druid_ has joined the channel [08:13] altamic has joined the channel [08:14] ossareh has joined the channel [08:14] mAritz has joined the channel [08:15] ryah: do i need to wait until the document is loaded before doing "new io.Socket()" on the client side? [08:15] micheil: I think you may. [08:16] ryah: oh i needed to do "socket.connect()" :) [08:16] ryah: ACTION <-- idiot [08:20] tanepiper: finally: https://github.com/substack/node-seq [08:20] tanepiper: a flow control library that make sense! [08:21] hassox_ has joined the channel [08:22] sriley has joined the channel [08:25] markwubben has joined the channel [08:26] markwubben has joined the channel [08:26] naturalethic: tanepiper: pretty nice -- that yours? [08:28] ajsie has joined the channel [08:29] tanepiper: nope, SubStack's [08:30] naturalethic: shiny [08:31] [AD]Turbo has joined the channel [08:31] [AD]Turbo: hi there [08:32] tanepiper: yea, chaining makes more sense, and you can mix types and itterations which is nice [08:33] naturalethic: i've given that problem a whack myself but dropped it -- this looks very elegant [08:38] ph^ has joined the channel [08:41] micheil: ryah: actually, that's long been a pain point with socket.io [08:43] TurboAWAY has joined the channel [08:45] mAritz has joined the channel [08:45] ryah: micheil: that you have to connect? [08:45] mikeal has joined the channel [08:45] derren13 has joined the channel [08:46] bahamas has joined the channel [08:47] saschagehlich has joined the channel [08:49] skohorn has joined the channel [08:51] Nohryb has joined the channel [08:52] wasabist has joined the channel [08:52] teemow has joined the channel [08:53] cagdas has joined the channel [08:56] jetienne has joined the channel [08:57] pdelgallego has joined the channel [08:57] yatiohi has joined the channel [09:00] zomgbie has joined the channel [09:02] mikew3c has joined the channel [09:02] DoNaLd`z has joined the channel [09:03] ewdafa has joined the channel [09:03] ntelford has joined the channel [09:03] mraleph has joined the channel [09:05] skohorn has joined the channel [09:06] DoNaLd`z has joined the channel [09:07] evanmeagher has joined the channel [09:10] wasabist_ has joined the channel [09:10] romanb has joined the channel [09:12] Tidwell has joined the channel [09:17] SethX: webr3: after a night of sleep and some dreaming about it i got it to work. https://gist.github.com/716444 [09:17] SethX: turned out that i never was writing the header to the response [09:17] SethX: and never was closing the responses via .end() [09:19] vineyard has joined the channel [09:19] sth: It's POF [09:19] sth: err, wrong window :x [09:20] Utkarsh has joined the channel [09:20] DoNaLd`z has joined the channel [09:22] niko has joined the channel [09:23] dohtem has joined the channel [09:23] dohtem has joined the channel [09:24] virtuo_ has joined the channel [09:24] christophsturm has joined the channel [09:25] sixtus42 has joined the channel [09:27] Mikushi has joined the channel [09:27] tisba has joined the channel [09:27] jetienne has joined the channel [09:27] stonebranch has joined the channel [09:28] DoNaLdz has joined the channel [09:28] sriley has joined the channel [09:29] TomY has joined the channel [09:33] niko has joined the channel [09:36] wilmoore has joined the channel [09:38] mbrochh has joined the channel [09:39] Gruni has joined the channel [09:41] zomgbie has joined the channel [09:47] kjeldahl has joined the channel [09:50] tisba_ has joined the channel [09:50] aubergine has joined the channel [09:57] Utkarsh has joined the channel [09:58] mikedeboer has joined the channel [09:59] JonKirkpatrick has joined the channel [09:59] JonKirkpatrick: hi [09:59] TurboAWAY: does "SELECT msg FROM collection WHERE langId = 0, SORT BY(msgId)" translate (MongoDB) into collection.find({langId: 0}, {msg: true}, {sort: msgId}, function(err, cursor) ? [10:02] xla has joined the channel [10:03] murz has joined the channel [10:03] caolanm has joined the channel [10:07] slaskis has joined the channel [10:09] [[zz]] has joined the channel [10:11] felixge has joined the channel [10:11] felixge has joined the channel [10:11] Utkarsh has joined the channel [10:11] JonKirkpatrick: would anyone recommend mongo db [10:12] JonKirkpatrick: with node [10:12] felixge: does HEAD have https support right now? [10:12] felixge: Or is that all in flux? [10:13] JonKirkpatrick: what is the best module for mongodb [10:13] caolanm: JonKirkpatrick: mongo scares me... [10:13] JonKirkpatrick: does it? [10:13] JonKirkpatrick: what do you use with node? [10:13] aubergine has joined the channel [10:13] JonKirkpatrick: sqlite? [10:14] jbergstroem: does anyone know who i talk to if i want to add hardware to the buildbot cluster+ [10:14] DoNaLd`: jbergstroem: CouchDB [10:14] DoNaLd`: sorry [10:14] DoNaLd`: JonKirkpatrick: CouchDB [10:14] JonKirkpatrick: i'm trying to get away from the lamp user [10:15] JonKirkpatrick: and have been interested in new techs [10:15] JonKirkpatrick: well, new ideas in tech [10:15] caolanm: couchdb! [10:15] lstrojny_ has joined the channel [10:15] felixge: jbergstroem: I think ryan is the one to talk to [10:15] caolanm: JonKirkpatrick: I'm trying to find a post that explains why I find mongo scary [10:15] caolanm: i think mikeal wrote it [10:15] jbergstroem: felixge: ok, thanks. i messaged him through github [10:16] felixge: jbergstroem: email might be better [10:16] felixge: jbergstroem: but he's really behind on any async communication these days, so don't worry if you don't here from him right away ;) [10:16] caolanm: JonKirkpatrick: http://www.mikealrogers.com/2010/07/mongodb-performance-durability/ [10:16] felixge: catching him here usually works best [10:17] JonKirkpatrick: thanks caolanm [10:17] JonKirkpatrick: i've got an idea for a service utilizing nginx, node and a specific db [10:17] JonKirkpatrick: just researching really [10:17] caolanm: "MongoDB, by default, doesn’t actually have a response for writes. You just write your data to the socket and assume it’s going to be available when you try to read it." [10:17] JonKirkpatrick: wow [10:17] JonKirkpatrick: lol [10:18] jbergstroem: felixge: ok, thanks. [10:18] caolanm: I don't know if that's still true [10:18] JonKirkpatrick: uh.. that's pretty scarey [10:18] jbergstroem: felixge: i guess we don't share the same timezones. what time can i expect him? [10:18] caolanm: but its still quite scary that it is / was ever the case [10:18] JonKirkpatrick: hmm, this was written 142 days ago [10:18] JonKirkpatrick: but you do recommend couch? [10:19] JonKirkpatrick: because its based on erlang [10:19] JonKirkpatrick: ? [10:19] caolanm: depends what you're doing [10:19] felixge: jbergstroem: he usually start showing up here around 6pm (my TZ, berlin) [10:19] jbergstroem: felixge: thanks [10:19] caolanm: JonKirkpatrick: I really like couch when its suitable [10:20] felixge: caolanm: I think that whole argument against Mongo is BS [10:20] caolanm: felixge: quite possibly [10:20] markwubben has joined the channel [10:20] caolanm: perhaps I shouldn't be so ready to spread FUD [10:20] felixge: caolanm: Basically CouchDB only guarantees you that the data is on disk, but not that it has replicated. So if the disk goes bad -> well same problem as Mongo [10:21] felixge: caolanm: CouchDB is merely more fault tolerant against Software failures and non-HDD hardware glitches [10:21] felixge: but for real strong guarantees you'll end up having to write to multiple nodes anyway [10:21] caolanm: felixge: but provided you're reading from the same db you can ensure that the write got there [10:21] felixge: in which case the consistency guarantees of mongo and couch become quite similar [10:21] caolanm: if you need more durability, you probably want a relational db right? [10:21] caolanm: well [10:21] caolanm: * consistency * [10:22] caolanm: the idea that you don't know if the write has completed *anywhere* in mongo still sounds markedly more worrying that just having it succeed on a single db [10:22] felixge: caolanm: No, it all just depends on how you replicate [10:22] felixge: if you want strong guarantees [10:23] felixge: caolanm: of course, there is certainly an argument that CouchDB is more concerned about consistency than Mongo [10:23] felixge: but writing " I don’t see how you could actually justify using it for anything resembling the traditional role of a database" is just plain wrong [10:23] felixge: IMO [10:23] mscdex: i say forget all this nosql nonsense. let's go back to filing cabinets! [10:24] JonKirkpatrick: lol [10:24] felixge: You can use magnetic tape for the role of a traditional database, you just need to be careful to understand your requirements and setup ;) [10:24] sixtus42: punch cards! [10:24] felixge: hah [10:24] caolanm: :) [10:24] felixge: Minecraft [10:24] zentoooo has joined the channel [10:24] JonKirkpatrick: ACTION trips with a hand full of punch cards [10:24] felixge: would make a fine database actually :) [10:25] JonKirkpatrick: talk about data loss [10:25] JonKirkpatrick: what if you tripped [10:25] felixge: Anyway, people who come to an IRC channel asking which database to use will generally be fine with anything for next 6-12 months [10:25] felixge: ;) [10:25] mscdex: i once knew a guy who couldn't get one of those old 8-inch floppies to fit in a 5.25 drive, so he folded it in half and stuck it in ;-D [10:25] felixge: mscdex: haha, genius [10:25] felixge: :) [10:26] JonKirkpatrick: and what happens after 6 months [10:26] JonKirkpatrick: lol [10:26] mscdex: JonKirkpatrick: the node api changes! [10:26] felixge: JonKirkpatrick: In 6 month you will know what data problems you are actually trying to solve and you can reconsider certain choices at that point :) [10:26] mscdex: i kid i kid :> [10:26] felixge: mscdex: +1 [10:26] felixge: :D [10:26] JonKirkpatrick: mscdex nailed it [10:26] JonKirkpatrick: lol [10:27] sixtus42: when you ask the japanese, nosql is all about optimizing for the edge case [10:27] sixtus42: so, ask yourself: what's my edge case [10:27] sixtus42: then pick a solution based on that [10:27] Jonasbn_ has joined the channel [10:27] sixtus42: couch is super strong in the offline master-master scenario [10:27] felixge: personally I'm staying away from all this NoSQL witchcraft these days. The universe has yet to hand me a problem I can't solve using MySql + Memcached. [10:28] felixge: sixtus42: that's true [10:28] JonKirkpatrick: what problem can't you solve without memcache [10:28] JonKirkpatrick: lol [10:28] felixge: But I hardly know anybody using couch for that reason [10:28] felixge: (other than crazy cell phone people) [10:28] sixtus42: felixge: well you know my day job ;-) [10:29] felixge: sixtus42: You take that witchcraft even further from what you mentioned at the last JS meetup :) [10:29] sixtus42: but if you want to have you app run on your laptop in flight, installing couch locally is a very elegant option [10:30] felixge: sixtus42: yeah, but do we want to push installation stuff onto people in 2010? [10:30] felixge: sixtus42: I mean we have apple who is doing that for us, don't we? :) [10:31] sixtus42: felixge: well, talk to janl, he'll bundle you a couch into you ios app, if that's what you want [10:32] felixge: sixtus42: no, no witchcraft for me! [10:32] felixge: sixtus42: I'm a simple man, my business is to take big files and break them into smaller ones [10:32] felixge: :) [10:33] sixtus42: what ever get's the job done [10:33] felixge: Famous last words [10:33] felixge: :) [10:33] sixtus42: but you won't catch me touching mysql nor mongo [10:33] JonKirkpatrick: sixtus42 what do you prefer [10:34] sixtus42: JonKirkpatrick: for what use case? [10:34] JonKirkpatrick: mongo use case [10:34] JonKirkpatrick: trick question [10:34] JonKirkpatrick: lol [10:34] sixtus42: if you only have a hammer... [10:34] felixge: sixtus42: no need to. The kind of groping I did on the mysql protocol for the past months makes the TSA look like a joke. So no need to touch mysql at all ;) [10:35] sixtus42: see, and mongo is binary once more. plain text protocols have a very compelling argument for them: you can read them w/o tools [10:36] delapouite has joined the channel [10:36] felixge: ACTION ok. I start to act drunk but it's friday morning not evening. Time to go back to some work :) [10:36] felixge: ttyl [10:36] sixtus42: ACTION has a turkey hang over… [10:36] felixge: oh wait, nvm there was a reason I came here [10:36] sixtus42: ttyl felixge [10:36] felixge: has HTTPS been nuked from HEAD? [10:36] felixge: There is some SecurePair stuff now [10:37] felixge: but that looks like it would take a lot of screwing arround to make a https client request? [10:37] sixtus42: felixge: so far https seemed broken all along scnr [10:37] sixtus42: but I am not tracking head closely atm [10:38] felixge: sixtus42: it was kind of working at some point for me [10:38] felixge: that is only 1 fail in every few hundred requests or so [10:38] slaskis: could you create a client similar to this: https://gist.github.com/713092 ? not that i know if that even works... [10:38] felixge: which is ok for the little hacky thing I need it for [10:38] saschagehlich has joined the channel [10:39] felixge: slaskis: that looks like a start [10:39] felixge: but that's a TCP server [10:39] felixge: not HTTP [10:39] felixge: so probably still a long way to go [10:39] felixge: *sigh* [10:39] slaskis: ah [10:40] felixge: I have this feeling that curl will still be my best friend for a few months :) [10:40] mikew3c has joined the channel [10:41] pietern has joined the channel [10:42] sixtus42: ryah was projecting "by the end of the year" for ssl to get fixed [10:42] sixtus42: at least he did at jsconf.eu [10:42] felixge: sixtus42: ok so it's +-6 month of that ;) [10:42] felixge: unless this Joyent thing works nicely [10:42] felixge: and some serious contributions start coming in from it [10:43] felixge: I really wish Ryan was still in Germany [10:43] felixge: collaboration with people 9h apart is a PITA [10:45] mscdex: irc tag! [10:45] felixge: mscdex: irc tag? [10:45] mscdex: yeah, you leave each other messages in the main channel :p [10:45] mscdex: while the other is away [10:46] mscdex: it works pretty well in here [10:46] mscdex: ;) [10:46] felixge: mscdex: Well, it doesn't really fix the 9h roundtrip time issue? [10:47] felixge: I mean ryan will reply to my emails [10:47] felixge: but you basically only get to exchange 1 message a day each [10:47] felixge: so it can take 3-4 days to agree something you could have hased out in a 5min chat session : ( [10:48] d0k has joined the channel [10:48] slaskis: felixge: you'll just have to start working PST ;) [10:49] felixge: slaskis: If I do that I want In and Out burger deliveries [10:49] felixge: ;) [10:49] felixge: * In-n-out [10:50] sixtus42: felixge: it's black friday, don't expect anybody in the US to work until monday [10:50] slaskis: haha [10:50] felixge: sixtus42: except a few million people in retail? :) [10:50] sixtus42: yes, but last I checked, ryan is not in retail [10:50] mAritz has joined the channel [10:50] felixge: sixtus42: Well, I could imagine him selling you buffers at 25% off today ;) [10:51] felixge: sixtus42: fast buffers, if you're lucky [10:51] felixge: anyway, I guess I have my https answers [10:51] felixge: so I'll be back later to complain some more :) [10:51] felixge: ttyl [10:52] bzinger has joined the channel [10:55] fly-away has joined the channel [10:59] mbrochh has joined the channel [11:00] naturalethic: i should know this, but is there something like: dict.update(other_dict) built in? [11:01] sixtus42: dict being object? [11:02] naturalethic: yeah [11:02] naturalethic: i know its not standard, just wondering if node/v8 had something [11:02] sixtus42: what do you expect it to do? copy or change the prototype chain? [11:02] naturalethic: merge props from second into the first [11:03] sixtus42: what if they are present in first? [11:04] naturalethic: overwrite [11:06] naturalethic: yeah, was looking around and python has it, which is why i feel an instinct for it [11:07] naturalethic: anyway just wondering if built in.. looks not [11:07] sixtus42: naturalethic: it's not part of the language, so v8 doesn't have it. I remember seeing extend in node, but it doesn't seem documented [11:07] mscdex: i use a modified version of jquery 1.4's extend() [11:07] sixtus42: but all implementations are similiar to http://api.jquery.com/jQuery.extend/ [11:08] mscdex: https://github.com/mscdex/node-imap/blob/master/imap.js#L1233 [11:08] naturalethic: yeah, just didn't want to break out a utility dump file yet [11:09] wasabist has joined the channel [11:11] Utkarsh has joined the channel [11:14] sfoster has joined the channel [11:16] zorzar has joined the channel [11:26] mraleph has joined the channel [11:28] dohtem|desk has joined the channel [11:28] hellp has joined the channel [11:29] confoocious has joined the channel [11:29] confoocious has joined the channel [11:30] kschzt has joined the channel [11:31] kschzt: what are you guys using for profiling? I wish node-inspector used the Profiler tab :) [11:31] stagas has joined the channel [11:32] lmorchard has joined the channel [11:37] d0k has joined the channel [11:37] unomi has joined the channel [11:41] cheney has joined the channel [11:45] pdelgallego_ has joined the channel [11:46] JonKirkpatrick: hmm, so if I wanted to add a path to NODE_PATH where would I do that [11:46] JonKirkpatrick: do I do it per application? [11:51] ajsie: anyone that uses nodules? [11:51] ajsie: is it a npm replacement? [11:53] JonKirkpatrick has left the channel [11:55] faust45 has joined the channel [11:58] naturalethic: JonKirkpatrick: in your shell environment, or add to require.paths [11:58] SethX: console.log(JSON.parse('{"foo":"bar"}); << how is this wrong? i want to convert a json string to an object [11:58] ph^ has joined the channel [11:58] SethX: oh, mising ticks. [11:59] SethX: sometimes you just see things once you've pasted them on irc [11:59] naturalethic: :) [11:59] SethX: anyhow, it still doenst produce the desired result [11:59] SethX: node has an interactive shell which interprets JS, no? [11:59] naturalethic: yeah [12:00] SethX: so i should be able to just run that after starting "node" [12:00] naturalethic: yes [12:00] SethX: well i end up with "..." [12:00] SethX: what does that mean [12:00] SethX: > console.log(JSON.parse('{"foo":"bar"}'); [12:00] SethX: ... [12:00] naturalethic: its waiting for more input -- you're missing a rparen [12:01] naturalethic: from the console, just put: JSON.parse('{"foo":"bar"}'); [12:01] SethX: ok, so that is not wrong [12:01] SethX: mmm [12:01] SethX: i'm having troubles debugging [12:02] naturalethic: my mind is pretty much jelly too, i need to get some rack [12:06] markwubben has joined the channel [12:12] mikew3c: v8: parseFloat("-\t0") [12:12] v8bot: mikew3c: 0 [12:12] mikew3c: naturalethic: I need some rock too man [12:14] unomi has joined the channel [12:19] mikedeboer has joined the channel [12:19] naturalethic: lol [12:26] aubergine_ has joined the channel [12:27] micheil: ryah: yeah [12:27] SethX: uhm, does anybody know if i can set a request's POST data to be decoded from base64 ? [12:28] SethX: it seems to only support utf8 or binary [12:28] SethX: not sure what binary is exactly. [12:28] viirya has joined the channel [12:29] SethX: i'm trying to pass in a json string to JSON.parse in which a value contains unescaped ' and " 's , which would break the json string, so i thought that if i'd base64 encode that before i send it to the server i'd be safe... [12:29] SethX: does that make any sense? [12:31] romanb_ has joined the channel [12:32] SethX: ah, got it. [12:32] SethX: data is a buffer, and i can en/decode that at will [12:33] dylang has joined the channel [12:33] paulwe has joined the channel [12:39] spoobie has joined the channel [12:40] mc-work has joined the channel [12:42] Blink7 has joined the channel [12:45] lgl has joined the channel [12:51] jetienne: q. anybody knows a xml to json which works in nodejs ? [12:51] matjas has joined the channel [12:51] matjas has joined the channel [12:52] WaterCooled has joined the channel [12:53] stagas: jetienne: I've had some success with xml2js [12:53] jetienne: stagas: ok thanks [12:55] SethX: uhm, i'm encoding strings which include umlauts to base64 on the client, sending them to node, and converting the buffer back to utf8. the result contains gibberish chars which should be the umlauts... [12:55] SethX: any ideas on what to do? [12:57] skohorn has joined the channel [12:58] SethX: binary seems to do the trick [12:58] SethX: i'll stick with that then. [12:58] matjas has left the channel [12:58] SethX: shouldnt utf8 be safe for umlauts though? [12:59] stagas: jetienne: the output object is a little weird formatted but it works. inspect and compare to original xml to see how it converts [12:59] pdelgallego_ has joined the channel [13:02] lstrojny_ has joined the channel [13:05] lstrojny__ has joined the channel [13:07] aubergine has joined the channel [13:10] Kami_ has joined the channel [13:10] SubStack: oh noes expresso -c stopped working [13:11] SubStack: seems to be a problem with jscoverage [13:11] aubergine has joined the channel [13:14] Booths has joined the channel [13:16] wasabist_ has joined the channel [13:16] webr3: SethX, yes UTF-8 is safe - perhaps encoding of the source doc you got them from is incorrect (latin-1 page or such like) [13:21] zomgbie has joined the channel [13:21] sriley_ has joined the channel [13:21] vdrab has joined the channel [13:24] simme has joined the channel [13:26] namelessnotion has joined the channel [13:27] zentoooo has joined the channel [13:37] ukev has joined the channel [13:37] lstrojny_ has joined the channel [13:37] Dan has joined the channel [13:38] Dan has left the channel [13:39] ukev: hi [13:40] ukev: I'm trying to compile node.js on arm (on the popular sheevaplug) but it fails on v8, I thought arm is supported? http://pastebin.com/0Jd6PJFq [13:43] SethX: webr3: whatev, i'm sticking with binary. no risks that way [13:44] pagameba has joined the channel [13:46] ysynopsis has joined the channel [13:46] pagameba: 'morning noders [13:48] SethX: 'noon pagameba [13:52] viirya has joined the channel [13:52] kschzt has joined the channel [13:52] hellp|lunch has joined the channel [13:52] Jonasbn_ has joined the channel [13:52] slaskis has joined the channel [13:52] kjeldahl has joined the channel [13:52] niko has joined the channel [13:52] stonebranch has joined the channel [13:52] sixtus42 has joined the channel [13:52] ntelford has joined the channel [13:52] yatiohi has joined the channel [13:52] jimt has joined the channel [13:52] meder has joined the channel [13:52] spetrea has joined the channel [13:52] gf3 has joined the channel [13:52] themiddleman has joined the channel [13:52] rwaldron_ has joined the channel [13:52] ashleydev has joined the channel [13:52] zum has joined the channel [13:52] Astro has joined the channel [13:52] rleeds has joined the channel [13:52] pquerna has joined the channel [13:52] zk has joined the channel [13:52] thebigbad has joined the channel [13:52] Nevtus has joined the channel [13:52] monokrome has joined the channel [13:52] cnu has joined the channel [13:52] jspiros has joined the channel [13:52] Aikar has joined the channel [13:52] devinus has joined the channel [13:52] johan_bouveng has joined the channel [13:52] CIA-95 has joined the channel [13:52] wao has joined the channel [13:52] thecoon has joined the channel [13:52] onar has joined the channel [13:52] persson has joined the channel [13:52] vileda has joined the channel [13:52] sam_ has joined the channel [13:52] Prometheus has joined the channel [13:52] kkaefer has joined the channel [13:52] Nacho_ has joined the channel [13:52] joshpeek has joined the channel [13:52] sstephenson has joined the channel [13:52] mrkurt has joined the channel [13:52] Booths: Hmm. It appears we just survived the apocalypse [13:53] pagameba has joined the channel [13:53] kjeldahl has joined the channel [13:53] aconran__ has joined the channel [13:54] markwubben has joined the channel [13:54] Wyverald: anyone knows how to use code in jade's element attribute sections? [13:54] Wyverald: like when I have to fill an attribute with a variable [14:04] devinus has joined the channel [14:06] bradleymeck has joined the channel [14:06] markwubben1 has joined the channel [14:07] ooooPssss has joined the channel [14:11] lstrojny_ has joined the channel [14:12] derren13 has joined the channel [14:14] Sami_ZzZ has joined the channel [14:15] mbrochh has joined the channel [14:19] markwubben has joined the channel [14:21] mjr__ has joined the channel [14:26] jimt_ has joined the channel [14:32] liar has joined the channel [14:35] [AD]Turbo: http://pastebin.com/vM07YarD could you please help me? I got the reported error and i don't know why :( [14:36] [AD]Turbo: ok, stupid question [14:37] vineyard: resolved? [14:37] devinus has joined the channel [14:39] Utkarsh has joined the channel [14:41] themiddleman has joined the channel [14:42] Twelve-60 has joined the channel [14:45] Gruni has joined the channel [14:46] wilmoore has joined the channel [14:47] saikat has joined the channel [14:53] dnolen has joined the channel [14:53] InsDel has joined the channel [14:55] okuryu has joined the channel [14:56] femtoo has joined the channel [14:57] zinger has joined the channel [15:00] mbrochh has joined the channel [15:01] Gruni has joined the channel [15:02] ajsie: isnt it better to just use "git clone && npm link " than "npm install " 1. you will have the latest git-repo version 2. you can modify the git repo and see the effect [15:02] boaz has joined the channel [15:03] ajsie: 3. you can copy the git repo to your account, edit and use it , no need to push it to npm repo [15:03] cjmFloating has joined the channel [15:08] kenbolton has joined the channel [15:08] herbySk has joined the channel [15:08] aubergine has joined the channel [15:09] lstrojny_ has joined the channel [15:10] derencius has joined the channel [15:10] cheney has joined the channel [15:13] galaxywatcher has joined the channel [15:14] aconbere has joined the channel [15:24] aqva has joined the channel [15:26] MattJ has joined the channel [15:26] aqva: Hi! How can node.js code access system environmental variables? ($USER, $PATH, $HOSTNAME and such) Thanks! [15:27] skampler: aqva: provess.env [15:27] ooooPssss has joined the channel [15:28] aqva: skampler: perfect, thanks a lot! =) [15:30] ooooPssss has joined the channel [15:31] jimt has joined the channel [15:32] jetienne_ has joined the channel [15:34] aheckmann has joined the channel [15:37] skampler: np! [15:39] jan____ has joined the channel [15:40] sriley has joined the channel [15:41] jan____: heya, I did `brew install node` (I have v0.2.5) and `brew install npm`, then `npm install request` and now I use `var request = require('request');` and get Error: Cannot find module 'request' [15:41] jan____: what am I doing wrong? [15:42] amerine has joined the channel [15:46] mattcodes has joined the channel [15:46] saschagehlich: is anyone of the learnboost team here? [15:47] adambeynon has joined the channel [15:49] jan____: setting NODE_PATH helps. Would be great if npm would detect that [15:54] MikhX has joined the channel [15:54] jankoprowski has joined the channel [16:00] nsolsen has joined the channel [16:01] daniellindsley has joined the channel [16:05] pagameba has joined the channel [16:07] sh1mmer has joined the channel [16:07] vineyard has joined the channel [16:07] jelveh has joined the channel [16:08] sh1m has joined the channel [16:09] ajpiano has joined the channel [16:11] bingomanatee has joined the channel [16:11] jelveh: what's the hip way to send a binary file to an http client? stream ? [16:12] SubStack: jelveh: I would just use some module [16:12] SubStack: like connect staticProvider or that other one [16:13] jelveh: SubStack: interesting, will check it out! :) [16:13] jelveh: t [16:13] jelveh: hanks [16:13] sh1mmer has joined the channel [16:14] chrischris has joined the channel [16:15] jelveh: do you have a link SubStack ? [16:15] xla has joined the channel [16:18] SubStack: http://senchalabs.github.com/connect/ [16:20] webr3: anybody know how to build https://github.com/ajaxorg/o3 , specifically node-o3-xml ? (for 0.3+) [16:21] spetrea_ has joined the channel [16:21] sixtus42 has left the channel [16:22] tj has joined the channel [16:23] confoocious has joined the channel [16:23] confoocious has joined the channel [16:24] pagameba: node-waf configure build ? [16:24] webr3: wasn't working for me at all the other day, on *nix [16:24] webr3: mind you i see a new commit saying "build fix" should probably try that :p [16:25] dylang has joined the channel [16:25] pagameba: lol [16:28] pagameba: doesn't build cleanly for me but I didn't really check to see if there are dependencies that I am missing (osx) [16:28] killfill: hey guys.. a simple html5 manifest example works good on my nginx server.. but as soon as i serve it with node (express) it stops working well. [16:28] killfill: i think its becouse it adds Cache-Control: public max-age=31557600 [16:28] killfill: nginx is not sending that [16:29] slaskis: how can i add decoders to connect.bodyDecoder? i'd like a simple text/plain decoder [16:29] killfill: how do i make it not set that header? [16:30] drudge: killfill: are you using connect with caching or what [16:30] tj: slaskis: iirc its connect.bodyDecoder.decode['whatever/mimetype'] = function(){} [16:30] killfill: drudge: it explicit.. im not telling anything about cache.. [16:30] tj: check the source :p [16:30] killfill: maybe be default it is.. hm.. [16:30] tj: easiest way to answer your own questions [16:31] spetrea has joined the channel [16:31] dgathright has joined the channel [16:31] drudge: i blame tj [16:31] fanicular has joined the channel [16:31] killfill: :P [16:31] tj: killfill: connect has a cache manifest middleware [16:32] slaskis: tj: thanks, i'll give it a shot [16:32] killfill: hm.. [16:32] killfill: maybe express is enabling it by default? [16:32] tj: nope [16:33] tj: I dont see why it wouldnt work with a cache-control header though.. :s [16:33] tj: hm [16:33] killfill: me neither.. all i know manifest thingy works ok with chrome, but not on webkit of android [16:33] tj: with staticProvider you can pass { root: path.., maxAge: 0 } or whatever [16:33] killfill: im guessing its that cache thing [16:33] tj: its configurable [16:34] tj: I would try even a simple fs.readFile / res.write() first to see if that is your problem [16:36] killfill: hm. true.. like withouth connect [16:37] drudge: yeah you gotta watch connect, that thing will do exactly what you tell it! [16:38] tj: its reasonably configurable but most people just do a staticProvider('path') and call it a day [16:38] tj: but seem a bit odd if a max-age would mess you up there [16:42] saml has joined the channel [16:42] saml: is there debugger for node.js [16:43] drudge: node-inspector and node --debug [16:45] saml: drudge: thanks [16:47] MaSch_ has joined the channel [16:47] Atm0z has joined the channel [16:47] stagas has joined the channel [16:49] sfoster has joined the channel [16:50] cjmFloating has joined the channel [16:56] stephank has joined the channel [16:57] dgathright has joined the channel [16:58] gnrfan has joined the channel [17:00] killfill: hm.. android is caching the file.. i think i need to put something else in the header.. :S [17:03] tj: killfill: we dont really have config at a file level for staticProvider, so if you need specifics you might be better off just transfering the file without any HTTP caching if that is what is needed [17:04] tj: let me know if you need options added [17:06] heavysixer has joined the channel [17:07] cagdas has joined the channel [17:08] sivy has joined the channel [17:12] googol has joined the channel [17:16] Booths has joined the channel [17:16] Aikar: hmm wonder why msgpack isnt on npm [17:18] nXqd has joined the channel [17:19] Booths: node keeps crashing w/ call_and_retry_2 allocation failed - process out of memory... heap used right before crash was 5mb... [17:20] markwubben has joined the channel [17:20] stagas: Booths: achievement unlocked [17:20] stagas: :P [17:21] Booths: Yeah it's driving me crazy lol [17:22] stagas: Booths: doing any JSON.parse ? [17:22] jchris1 has joined the channel [17:22] nXqd: hello guys, my question is very basic question [17:22] nXqd: how can I use haml render in expressjs [17:22] Booths: stagas: actually quite a bit [17:23] Aikar: grr msgpack isnt compiling for me, /src/msgpack.cc:180: error: âclass node::Bufferâ has no member named âlengthâ h and a bunch others l missing members like data, any ideas? [17:23] stagas: Booths: that might be it, if the string to parse is too big [17:23] Aikar: nXqd: npm install haml, then app.set('view engine', 'haml') [17:23] Spion_ has joined the channel [17:23] tj: nXqd: just use .haml as your view extension [17:23] tj: and res.render('foo.haml') [17:24] tj: or app.set('view engine', 'haml') like mentioned by Aikar and res.render('foo') [17:24] tj: or for example if you use ejs, but want .html, you can do app.register('.html', require('ejs')) [17:24] jchris1 has joined the channel [17:25] marienz has joined the channel [17:25] Booths: stagas: That sucks... [17:25] Booths: stagas: Mostly using socket.io, passing json that way [17:26] nXqd: tj: where do I put foo.haml ? /views/foo.haml or ./foo.haml [17:26] Aikar: whereever you define view folder [17:26] tj: nXqd: you can configure otherwise, but ./views/foo.haml typically [17:27] Wyverald: in jade, is there a way to conveniently check whether a local variable is defined or not? [17:27] zomgbie has joined the channel [17:27] tj: nXqd: you will want app.set('views', __dirname + '/views') [17:27] nolkyan has joined the channel [17:27] tj: Wyverald: due to js freaking out its a bit hard, but mape had a trick, you can use - if (locals.foo) instead of say - if (typeof foo == 'undefined) [17:28] nXqd: tj: OK, it still not work @@. (/ntfs-data/dev/nodejs/haml/views/index.haml): Unexpected identifier at Function (unknown source) [17:28] tj: nXqd: did you install express from npm? [17:28] Wyverald: so 'locals' is the object that holds all the locals, reasonable enough [17:29] tj: yup [17:29] Wyverald: what does 'this' refer to, then? [17:29] nXqd: tj: yes [17:29] tj: Wyverald: in express the request by default [17:29] tj: nXqd: hmm.. can you send a gist of your config [17:29] tj: nXqd: I should note jade gets far more love than haml, I havent touched haml for a good 5 months or so [17:29] Wyverald: tj: I mean in jade.. uhh.. or did you mean that inside jade 'this' refers to the request? [17:30] tj: Wyverald: well Express controls that [17:30] tj: you can set it to whatever you want [17:30] tj: but Express sets it to the request by default [17:30] Wyverald: ohh nice enough [17:30] tj: res.render('foo', { scope: {} }) [17:31] nXqd: it's quite strange that I can get haml work normally with nodejs base [17:31] Wyverald: I thought that 'this' referred to some 'global' variable, which apparently seems to be the object containing all those locals [17:31] nXqd: I'll try jade instead, express seems to use this one as default :) [17:31] Wyverald: nXqd: go forth, it's pretty cool [17:32] tj: nXqd: its not a default, there is no default template engine, but jade is actively developed [17:32] tj: haml is pretty dead [17:32] tj: nXqd: if you feel lost check out the examples in the express repo, I have a few using ejs / jade etc [17:34] nXqd: tj: it's very nice if I can look at them :) [17:34] Anti-X has joined the channel [17:36] nXqd: tj: are you there ? [17:37] tj: nXqd: yeah? [17:37] tj: https://github.com/visionmedia/express/tree/master/examples/ [17:38] tj: well, actually use the 1.x examples https://github.com/visionmedia/express/tree/1.x/examples [17:38] nXqd: tj: yay, thanks :) I'll check it out after 5 hrs . It's 1 am now :P . Bb :) [17:38] tj: ahaha nice! [17:38] cjmFloating has joined the channel [17:38] nXqd: look like visionmedia is doing something real big with nodejs :P [17:39] tj: im visionmedia :p just a crappy choice to name after my old company [17:39] tj: that I no longer run haha [17:39] tj: oh well [17:39] tj: pretty dead in here today [17:40] EvanDotPro has joined the channel [17:40] zomgbie has joined the channel [17:40] bartt has joined the channel [17:40] deepthawtz has joined the channel [17:41] nXqd: tj: wow, it's impressive :) [17:41] nXqd: are you guys a team ? [17:41] tj: nope just me [17:41] nXqd: or 1 man - project [17:41] nXqd: oh :| [17:41] tj: I have way more projects on the go, but no time [17:41] saikat has joined the channel [17:42] nXqd: so cool :P How about speed, does jade any better than html ? [17:42] nXqd: pure html load file [17:42] tj: for speed you would want something like ejs or mustache [17:42] tj: jade/haml are more convenience [17:44] arrty has joined the channel [17:44] zemanel has joined the channel [17:44] nXqd: thanks , I'm pretty amazed that it's one man - project :) [17:44] Booths: Posted this on SO, if anyone here has any input that'd be fantastic http://stackoverflow.com/questions/4287494/node-js-process-out-of-memory-error [17:44] nXqd: I hope you will keep your work :P [17:44] arrty: how does node.js work server side? can it hit php scripts or does it need to connect to the database on it's own? [17:44] nXqd: bb, see u later in morning :P [17:45] Booths: arrty: There's modules for connecting to mysql databases [17:45] pietern has joined the channel [17:45] pietern_ has joined the channel [17:46] arrty: is that what most people use, or is there a better way to connect it to an existing MVC site? [17:47] Booths: I wouldn't have a clue what most people are doing w/ node, but I believe (and I may be wrong) that you'd have to have Apache listening on a different port than the node.js server in order to run them both on the same machine, and then post messages to eachother. [17:47] deepthawt has joined the channel [17:48] Booths: I'd rather just use a module though, otherwise you're adding an extra layer you have to secure against [17:50] jpld has joined the channel [17:50] jpld has joined the channel [17:50] b_erb has joined the channel [17:50] arrty: yeah true. i'm trying to find the best way to implement web sockets for live content [17:51] b_erb: are there any techniques to parse a long streaming json struct? i mean reading intermediate parts while still receiving? [17:53] Booths has left the channel [17:53] Booths has joined the channel [17:53] tj: b_erb: are you controlling the json? or is it from some other service [17:53] b_erb: tj: yeah, i stream it [17:54] fanicular: tj: your express is owned [17:54] fanicular: by persevere =) [17:54] tj: haha oh yeah? [17:54] fanicular: yeah! [17:55] fanicular: just tried it .. so WOW [17:55] fanicular: but only in beta still [17:55] tj: express is a vastly different framework [17:56] fanicular: persevere is kinda the new Rails .. but better in every way ... 100% restful, 100% json [17:56] tj: yeah, and I hate rails lol [17:56] fanicular: yeah but it aint rails =) [17:56] tj: like I said, vastly different [17:57] fanicular: yeah .. i like express still [17:57] fanicular: clean and neat documented [17:57] fanicular: persevere's documentation sucks [17:58] tj: it will never be an opinionated framework like persevere [17:58] fanicular: tj: yeah ... good and bad [17:58] tj: its only bad if you hate writing code, in which case IMO you should not be using node in the first place [17:59] tj: if you are afraid to write your own [17:59] fanicular: tj: i wont put it as afraid of writing code .. more as needing standard way of doing things and dont want to reinvent much [17:59] tj: express is still just a tool, not some magical thing that attempts to solve all your problems [17:59] aubergine has joined the channel [18:00] fanicular: cause a lot of people want to write app specific code .. not code the framework itself [18:00] tj: yeah, but that is what I mean, they have different audiences [18:01] fanicular: yupp [18:01] tj: hell I would just use rails if I had that mentality [18:01] fanicular: how would you describe express's audience? [18:01] fanicular: tj: yeah me 2 .. if rails was in js =) [18:02] tj: yeah, and I still would not touch it lol [18:02] pt_tr has joined the channel [18:05] Booths: Potentially stupid question: I'm having memory problems so I'm wondering... am I supposed to be using delete after each objects served it's purpose? I have constructs which create objects and then supply them to a callback, but wouldn't that only survive in memory until all functions are done w/ it? [18:07] stride: shortly after that, when the gc notices that there are no further references to it I guess. are you sure you're not accidentally keeping them somewhere? [18:07] jimt_ has joined the channel [18:09] fanicular: tj: why do you hate Rails? [18:10] tj: fanicular: because it annoys me, I like to explicitly see what my app is doing, not have 99% magic [18:10] tj: magic which is opinionated, and often not what I want [18:10] Arro has joined the channel [18:10] Booths: stride: Yeah, I'm basically parsing things, creating an object and then returning that object [18:10] tj: its just like Drupal (used to be a core dev), its great for 80% of what you want, and will screw you over badly for the other 20% [18:10] fanicular: tj: yeah i hate magic too .. i want configurable conventions [18:11] stride: Booths: hm, strange. maybe one of the profiler thingys could help you to debug that [18:11] tj: fanicular: thats the thing, just have conventions for YOUR app, they will be different than anyone else [18:11] Booths: stride: What sort of profiler? [18:11] fanicular: Drupal: configuration over convention, Rails: convention over configuration .. ideal framework: configurable convention [18:12] fanicular: tj: have you tested Persevere? [18:13] tj: not recently no [18:13] rbranson: rbranson@wm0-prod-app0:~$ netstat -an | grep TIME_WAIT | wc -l [18:13] rbranson: 4302 [18:13] rbranson: that's hot [18:13] fanicular: tj: so you have been coding php, ruby and js [18:13] fanicular: are you still on php and ruby? [18:13] tj: fanicular: php like 3 years ago lol so no [18:13] kschzt: heh this channel is more about rails than node :) [18:13] tj: c++ / c / ruby / erlang / js now [18:13] fanicular: kschzt: =) [18:13] tj: fanicular: https://github.com/kriszyp/pintura ? [18:13] tj: that one [18:13] tj: ? [18:14] brianmario has joined the channel [18:14] marienz has joined the channel [18:14] fanicular: tj: that is one part of the framework (request handler + authentication) [18:14] fanicular: http://persvr.org/Page/Persevere [18:15] tj: I see [18:15] fanicular: better to start from there .. also here is the blog tutorial..kinda good to have an overview: http://www.sitepen.com/blog/series/ssjs/ [18:15] fanicular: i really love their way of doing the Models [18:15] tj: I really dont [18:15] tj: what if I want to use mongoose etc [18:15] tj: then im fucked [18:16] tj: and the way they define schemas is terrible for mongo [18:16] SubStack: the future of ORMs will look like endtable I bet [18:16] jimt has joined the channel [18:17] fanicular: tj: http://pastebin.com/a5Ubsm1p [18:17] SubStack: where you just update plain old objects without having to care that there is a database at all [18:17] tj: fanicular: yeah not a fan [18:17] fanicular: tj: but you still can i think [18:17] ossareh has joined the channel [18:17] Arro: im going to launch an app i made in node, and i want a way of knowing if my server has crashed (probably an email or something), what's the best way to accomplish this? [18:17] fanicular: tj: oh no you cant =) [18:18] fanicular: tj: thats very opinionated =) [18:18] tj: fanicular with express I dont have to think, I just use what I want, mongoose, node_redis, etc [18:18] mbrochh-droid has joined the channel [18:18] tj: I dont want to be restricted by other peoples ideas [18:18] fanicular: tj: its good to have no structure [18:19] fanicular: but the bad thing is when you have to care for everything yourself [18:19] Me1000 has joined the channel [18:19] mbrochh-droid: hey folks.. when using node.js and socket.io... what is the maximum number of connections possible at one time? [18:19] fanicular: security and stuff [18:19] SubStack: fanicular: you can just use libraries for that stuff [18:19] programble has joined the channel [18:20] SubStack: incrementally [18:20] SubStack: instead of all up-front [18:20] tj: yeah, you can integrate them all together [18:20] stride: Booths: sorry took a second, I thought there was some tools to debug that GC situation but I can't find something in node-profiler or node-inspector right now [18:20] stride: s/tools/tool/ [18:20] fanicular: but then the effect COULD be like jQuery .. you are hammering everything together [18:21] fanicular: thats the difference for me between jQuery and Sproutcore .. for bigger apps you want a structure .. you put your code in the gaps [18:21] derferman has joined the channel [18:21] fanicular: it takes care of the basic stuff everyone needs .. thats my opinion only what a future framework will look like [18:22] mbrochh-droid: anyone? [18:22] SubStack: the effect could be like a lot of things, but that's just speculation [18:22] tj: fanicular: if you are strictly an "app" sure [18:22] Arro: mbrochh-droid: not sure, might try the socket.io google group [18:22] fanicular: i dont think low level tools are for end users directly...but for coders building another framework on top with [18:22] SubStack: I'm of the radical opinion that big apps shouldn't exist [18:22] fanicular: SubStack: yeah? [18:22] mbrochh-droid: arro, k thx [18:22] tj: I just find it is easier to build your own little framework, than to hack apart some monolithic framework [18:22] tj: trying to get it to behave like you want [18:23] SubStack: roll stuff out into reusable libraries until your big app is a little app [18:23] cjmFloating has joined the channel [18:23] SubStack: and publish them to npm! [18:23] tj: exactly [18:23] fanicular: tj: it isnt monotolic ... its composed by a lot of small frameworks .. [18:23] tj: working on smaller components often leads to far better code anyway [18:23] fanicular: and libs [18:24] fanicular: and they are all available on github [18:24] SubStack: you can test the pieces in isolation and they can't naively share state [18:24] fanicular: http://persvr.org/Page/Documentation [18:24] SubStack: plus, it's easier to use other people's tiny libraries when your own code is a collection of tiny libraries [18:24] ysynopsis: mbrochh-droid: i saw this v8 issue the other day, not sure how applicable it is, but they note 140k websocket connections—limited by v8 memory usage [18:24] fanicular: also: https://github.com/kriszyp/commonjs-utils [18:24] ysynopsis: http://code.google.com/p/v8/issues/detail?id=847 [18:25] tj: fanicular: yeah, see im not a fan of ANY of those projects [18:25] tj: so I wouldnt use persevere [18:25] fanicular: tj: i have noticed =) [18:25] tj: jsgi == meh [18:25] fanicular: jsgi vs connect huh =) [18:25] tj: mutli-node is stupid, I dont need that in my source [18:26] Booths: stride: I put the question on SO as well, http://bit.ly/h81TDH, but it's a really difficult problem to find, it only seems to happen after several hours. [18:26] tj: when it can be abstracted [18:26] mbrochh-droid: ysynopsis, cool thank you... [18:26] tj: an app should run regardless of something like that, aka how I made spark do it via exports [18:26] quirkey has joined the channel [18:26] tj: perstore, to opinionated, etc [18:27] fanicular: tj: but isnt Mac opinionated too [18:27] tj: what does that have to do with anything [18:27] fanicular: maybe some kind of opinion is good [18:28] SubStack: fanicular: the comparison doesn't work very well since apple builds tools for people to use [18:28] SubStack: whereas software is about building tools [18:29] fanicular: SubStack: but a framework is only a framework .. not the app [18:29] derferman has joined the channel [18:29] SubStack: it's like /using/ a rails app versus /writing/ one [18:29] tj: fanicular: im just saying you can either start with an framework that does a lot for you, and break it down [18:29] RevoOf has joined the channel [18:29] tj: or start with one that provides some tools, and build it up [18:29] rcy: software is only opinionated if you don't agree [18:29] tj: they often lead to similar amount of work IMO [18:29] stride: Booths: you're using the object generated in the end-event, right? [18:30] RevoOf: hi. is there a way to read data from the shell like from a (file) stream? [18:30] jimt has joined the channel [18:30] Arro: tj: totally know what you mean, going from django to node [18:30] Booths: In the parser? [18:30] SubStack: soon I'll be building my own dnode process-based, rpc-oriented web framework ^_^ [18:30] fanicular: rpc???!!! :) [18:30] Booths: stride: yeah, I'm creating a new object within the parser.on('end') and sending that to the callback [18:31] fanicular: yeah .. very well ... lets see if persevere is good match for me then .. *continue reading* [18:31] tj: fanicular: ive said it many times but I still consider Express a framework-framework, I have (part) of a CMS for example that I am building [18:31] Booths: I also removeListener('end', thefunction) within the on('end') [18:31] tj: but express itself will never be opinionated like that [18:31] fanicular: tj: is express ideally used for building another framework you mean? [18:32] fanicular: cause you have to build your structure first in express .. to use it for building app right? [18:32] tj: fanicular: yes. even if that framework is just specific to your app's needs [18:32] fanicular: okay [18:32] tj: or for small apps it might be fine right away [18:32] tj: ive built CI servers etc [18:32] tj: with very little customization at all [18:32] tj: just throw in redis [18:33] jchris1 has joined the channel [18:34] MattJ: Framework frameworks > frameworks [18:37] sriley has joined the channel [18:38] fanicular: tj: are you still using Ruby? [18:39] tj: fanicular: not often no [18:39] fanicular: ok [18:39] tj: I dont have much respect for the language anymore, but that is a whole other discussion lol [18:40] steffkes has joined the channel [18:43] fanicular: tj: oh..im curious about it [18:43] fanicular: how can one not like Ruby [18:43] fanicular: or even disrespect it=) [18:43] Arro: here's my question: why is Ruby typically the language of choice with open source hackers and not Python [18:43] tj: its gimmicky [18:44] fanicular: Arro: its beautiful [18:44] fanicular: tj: could you elaborate [18:44] rbranson: gimmicky? [18:44] tj: haha, I dont want to get started it will be a long convo [18:44] tj: I have debugging to do lol [18:44] fanicular: tj: i want to hear! [18:44] rbranson: we're in the #node.js channel, home of gimmicks :) [18:44] Arro: correct me if I'm wrong, but i belive Ruby doesnt even have whitespace! [18:44] fanicular: Arro: no .. thats the beauty =) [18:45] jimt has joined the channel [18:45] tj: Arro: doesnt have whitespace? [18:45] rbranson: Arro: aghast... neither does C! [18:45] Arro: that's why I love Python syntax [18:45] fanicular: hate whitespace structured code .. you cannot copy paste or autoformat [18:45] rbranson: meh [18:45] Arro: fanicular: yes you can [18:45] rbranson: whitespace is a distraction as far as python vs ruby is concerned [18:45] tj: I kinda like python for that reason, it forces you to not have stupidly ugly code haha [18:45] tj: better than end end end end end [18:46] rbranson: python doesn't have inline closures... that's my biggest problem with it [18:46] fanicular: i hate ; in js [18:46] tj: fanicular: its optional [18:46] tj: in nearly every case [18:46] fanicular: really? but i am afraid it will not be compatible in all browsers [18:46] fanicular: so better have ; [18:47] rbranson: meh [18:47] fanicular: so many vendors [18:47] fanicular: and engines [18:47] bradleymeck: python has inline closures, just not readable ones... [18:47] tj: rbranson: my ideal language would look a bit like python, more like IO, all async core like node, with the raw pure flexibility of js [18:47] rbranson: heh [18:47] fanicular: tj: so back to ruby .. gimmicky? [18:47] rbranson: JS isn't really that great either [18:47] tj: nope [18:47] tj: its not [18:47] rbranson: but it's flexible, yeah [18:47] tj: but *better* IMO [18:48] fanicular: at least it has object literals! [18:48] fanicular: very powerful and neat looking [18:48] ehaas has joined the channel [18:48] fanicular: and first class functions .. not like Ruby .. its kinda an ugly hack [18:48] tj: haha in my ruby the other day I was trying to use hashes like js object lits [18:48] rbranson: I do that all the time [18:48] fanicular: tj: haha i tried that too before [18:48] tj: made me a little sad [18:49] fanicular: tj: please i want to know what you mean with gimmicky [18:49] fanicular: you cannot throw such a statement with no further explanation =) [18:49] rbranson: he's probably talking about it in the perl sense [18:49] rbranson: it has a lot of sugar options [18:49] rbranson: in the syntax [18:49] fanicular: oh [18:49] fanicular: :) [18:49] fanicular: but why is that bad [18:49] tj: yeah, the grammar the biggest mess ever [18:50] fanicular: if it looks neat it looks neat [18:50] rbranson: because people is retahded [18:50] tj: i like purity [18:50] fanicular: tj: yeah i agree with that [18:50] fanicular: o.method.method.method arg1, arg2 // cant have method afterwards [18:51] tj: which is why I like prototypal languages more, its not like oh heres a class, and a singleton class, and im going to define this method by instance_evaling it with this string [18:51] tj: blah blah [18:51] rbranson: I mean Python also has the funky ass transparadigm shit like len(str) str.len [18:51] rbranson: I know they're trying to get away from that [18:51] tj: len(str) ? [18:51] fanicular: yeah =) [18:51] tj: i dont know py really [18:51] tj: that sounds like php lol [18:51] tj: count(array) or whatever [18:51] tj: php is the worst though omg [18:51] rbranson: well, Python started out as non-OOP [18:51] fanicular: yeah php is a total mess [18:51] tj: AWESOME NAMESPACE SYNTAX GUYS [18:52] rbranson: so you can choose between using len(str) or str.len to get the length of a string [18:52] tj: oh I thought you said you have to use len(str) haha [18:53] rbranson: tons of people still use str(len) -_- [18:53] rbranson: er [18:53] rbranson: len(str) [18:53] fanicular: i love node.js so much for letting me have js everywhere [18:53] rbranson: I would choose Python for any mathematics or algorithmic work though, if I had reams of code to write [18:53] rbranson: the libraries are pretty fantastic [18:53] rbranson: and perform well [18:53] tj: fanicular: yeah that is a bonus [18:54] rbranson: GMP support in python is wicked fast [18:54] tj: i like that python is everywhere, makes me want to learn it for certain things [18:54] tanepiper: PHP makes me sick [18:55] fanicular: i wonder why narwhal didn't have this big success .. did people really care about 100% asynchronous code on backend? [18:55] tj: like im really sick of system package managers, so I started writing one, but writing it with node is just not really a good idea haha [18:55] rbranson: fanicular: no, but hype is everything [18:55] rbranson: fanicular: and people _HATE_ the JVM [18:55] fanicular: rbranson: but how could it get to that hype stage [18:55] fanicular: it was Ryan's presentation skills? [18:55] tj: ahaha [18:55] Yuffster has joined the channel [18:55] rbranson: lululul [18:55] tj: node is far more natural for js [18:56] rbranson: meh [18:56] noahcampbell has joined the channel [18:56] fanicular: maybe it was narwhal was on java? [18:56] rbranson: software developers have a pre-mature optimization fetish [18:56] tj: sync stuff just seems tacked on with rhino or whatever [18:56] SubStack: yeah fuck optimization [18:56] SubStack: I write stuff the slow way on purpose [18:56] rbranson: haha [18:56] tanepiper: heh: http://web.archive.org/web/20070916144913/http://wp.netscape.com/newsref/pr/newsrelease67.html [18:56] fanicular: =) [18:56] rbranson: I said pre-mature optimization, not optimization :) [18:56] fanicular: then you optimise it when you need it [18:56] tanepiper: who would have know that that press release would lead us to being here today :D [18:56] SubStack: I was actually being a little bit serious [18:57] SubStack: just leaving out that 'the slow way' is also 'the pretty way' [18:57] rbranson: SubStack: intentionally slow, or intentionally readable / bugless? [18:58] fanicular: i laughed my ass off when I read about Ryan is the new DHH [18:58] Anti-X has joined the channel [18:58] rbranson: totes [18:58] rbranson: it doesn't smell like axe body spray when Ryan walks into the room [18:59] jakehow has joined the channel [18:59] fanicular: i wondered if he has Aspergers .. cause he is stepping back and forth when presenting [18:59] rbranson: ryan? [18:59] rbranson: no [18:59] fanicular: okay .. natural talented [19:00] rbranson: I think Ryan was pretty quickly thrust into the whole having to be a presenter thing, most people get an easier ramp up [19:01] tj: haha yeah it just kinda exploded [19:01] tj: I cant even remember how I heard of node [19:01] davidascher has joined the channel [19:01] rbranson: was last december, I was sitting in my favorite chair, listening to the radio, and a tw... [19:01] rbranson: probably hacker news :D [19:01] fanicular: i remember i want in Rails channel .. some dude entered and said "Rails is owned ... Node.js's gonna kick Rails butt!" [19:02] fanicular: was in [19:02] marienz has joined the channel [19:02] rbranson: love the rails / node comparisons [19:02] yenz: 11:58 < rbranson> it doesn't smell like axe body spray when Ryan walks into the room [19:02] fanicular: yeah haha [19:02] yenz: lol, harsh [19:03] rbranson: yenz: rails is fucking brilliant, but zed is right [19:03] SubStack: Rails? Brilliant? You must be thinking of something else. [19:03] dnolen has joined the channel [19:03] tanepiper: haha, yea [19:03] rbranson: like what? struts? [19:03] yenz: rbranson: yeah too bad zed is such a spaz. shoots himself in the foot while making solid arguments [19:04] tanepiper: i just didn't get rails [19:04] rbranson: people take zed too literally [19:04] Nevtus_ has joined the channel [19:04] tj: did rails get rid of plugin generator things yet? [19:04] yenz: tanepiper: it's not that interesting [19:04] Nevtus_ has joined the channel [19:04] tj: that is the dumbest way to structure plugins... [19:04] tanepiper: Trolling zed is fun :D [19:04] tj: ever [19:04] rbranson: tj; plugin generator? [19:04] tj: rbranson: i dont know, the plugins that chuck themselves all over your app and mutate files [19:04] tj: hate it [19:04] rbranson: oh [19:04] rbranson: yeah that's sort of not cool now [19:05] yenz: mutate is a little extreme... [19:05] rbranson: it's still possible, but the most any do these days is generate some DB migrations and config files [19:05] SubStack: require 'rubygems' # ugh [19:05] tj: as soon as i saw that, I was like wow... im never using rails [19:05] SubStack: and then if you forget to do that your program doesn't run >_< [19:05] rbranson: ? [19:05] rbranson: my ruby scripts run just fine without gems [19:05] jesusabdullah has joined the channel [19:06] tanepiper: i like Django's structure (seperate apps) but i hate it's ORM and bad practices and when apps are written bad, and you need to hack them to get them working [19:06] tanepiper: node, and especially npm, makes the whole seperate apps thing much easier [19:07] rbranson: clearly there are better frameworks out there than Rails [19:07] rbranson: but the community element is missing in many of them [19:07] tanepiper: express! [19:07] tanepiper: :) [19:08] rbranson: i mean, we barely have functioning MySQL and PostgreSQL drivers for node :D [19:08] SubStack: good [19:08] phidelta has joined the channel [19:08] aurynn: Drivers are hard, thanks :D [19:08] rbranson: good what? [19:09] aurynn: (mutters.. mine functions..) [19:09] mraleph has joined the channel [19:09] SubStack: that we don't have them [19:09] rbranson: alternatives being fucking MongoDB? [19:10] tanepiper: CouchDB is easier [19:10] Anti-X has joined the channel [19:10] rbranson: MongoDB is NoSQL for people who can't give up SQL... it's got a huge fucking query language that doesn't scale [19:10] tanepiper: no need for drivers [19:10] tanepiper: rbranson: yea, people need to learn nosqk properly [19:10] tanepiper: map/reduce isn't that hard [19:10] aurynn: sql scales just fine [19:11] rbranson: aurynn: I was talking about Mongo :) [19:11] aurynn: :) [19:11] aurynn: rbranson, I've heard horror stories about mongo.. [19:11] aurynn: like replication disables authentication [19:11] rbranson: I would never, EVER use Mongo for data I gave a shit about [19:11] tanepiper: oh yea, i've heard too many bad things about mongo [19:11] rbranson: well, in it's current state :) [19:12] rbranson: I've played around with it enough and broken it in a few ways that are highly disturbing [19:12] tanepiper: the nice thing about CouchDB is it's javascript [19:12] tanepiper: i can take my forms, save them directly to the db and reload them without doing anything [19:12] SubStack: I am really hopefully for endtable [19:13] tj: SubStack: endtable? [19:13] aurynn: poor openldap :\ [19:13] SubStack: tj: https://github.com/bcoe/endtable [19:13] rbranson: too bad LDAP is so fucking arcane [19:13] tanepiper: yea, i want to use endtable, but i'm going to rip out cradle after out investor meeting on the 8th :) [19:13] tj: SubStack: ah :) [19:13] aurynn: ldap is arcane. [19:14] Nevtus has joined the channel [19:14] SubStack: tj: and here's the blog post http://www.benjamincoe.com/post/1656130884/endtable-an-orm-for-couchdb-on-node-js [19:14] tj: oh noes lol its using jspec [19:14] Nevtus has joined the channel [19:15] tj: hm [19:15] cheney has joined the channel [19:16] tj: ahaha FML I just got bit by this http://groups.google.com/group/nodejs/browse_thread/thread/b2f1d60dab0dab61 [19:17] rbranson: endtable looks hot [19:17] rbranson: like mnesia hot [19:18] phidelta has left the channel [19:20] Anti-X has joined the channel [19:22] chrischris has joined the channel [19:24] tj: ewWwwWW this persevere code is horrid [19:24] tj: and wont run [19:26] isaacs has joined the channel [19:26] Booths: if I do something like var y = {}; function somefunc(callback) { var obj={..}; callback(obj); } and then somefunc (function(data) { y[indentifier] = data; }); am I causing some sort of memory leak? [19:27] killfill has joined the channel [19:29] dnolen has joined the channel [19:30] Anti-X has joined the channel [19:32] bartt has joined the channel [19:38] tanepiper: oh yea, i think i looked at that early on tj, didn't really like it [19:39] karboh has joined the channel [19:40] bartt has joined the channel [19:40] hoffa_ has joined the channel [19:41] Anti-X has joined the channel [19:44] richcollins has joined the channel [19:44] sh1mmer has joined the channel [19:48] fly-away has joined the channel [19:51] Dreamer3 has joined the channel [19:54] jpick has joined the channel [19:54] Anti-X has joined the channel [19:55] Locke23rus has joined the channel [19:56] marienz has joined the channel [19:58] cagdas has joined the channel [20:00] jimt_ has joined the channel [20:02] Max-Might has joined the channel [20:02] mgc: any way to seed math.random()? if forking, and both processes end up generating the same random numbers. [20:03] isaacs: mgc: npm install srand [20:03] Booths has joined the channel [20:03] mgc: aha [20:03] mgc: thanks [20:03] isaacs: https://github.com/isaacs/node-srand [20:03] isaacs: wow, i really didn't document that at ALL [20:04] isaacs: bad isaac! [20:04] dnolen has joined the channel [20:04] mgc: hah, I like that it throws an exception with usage instructions [20:05] jimt has joined the channel [20:05] isaacs: yeah, if you know how to use srand and rand in C, it's the same thing [20:06] jchris1 has joined the channel [20:06] isaacs: the code is pretty small. docs might be overkill, actually: https://github.com/isaacs/node-srand/blob/master/srand.cc [20:07] bradleymeck has joined the channel [20:07] Anti-X has joined the channel [20:08] evanmeagher has joined the channel [20:08] chovy has joined the channel [20:11] stagas has joined the channel [20:13] mw has joined the channel [20:16] Nevtus_ has joined the channel [20:17] yozlet has joined the channel [20:19] kschzt: hmm, doesn't pgriess hang out here? :) [20:19] Anti-X has joined the channel [20:19] kschzt: got a couple lines for him for webworker [20:22] tisba has joined the channel [20:28] jimt has joined the channel [20:29] aconbere has joined the channel [20:35] kschzt: ouch, i need to make a node.js svn client :s [20:35] jimt_ has joined the channel [20:36] dahankzter has joined the channel [20:38] altamic has joined the channel [20:41] yatiohi has joined the channel [20:41] wilmoore has joined the channel [20:41] viirya has joined the channel [20:42] deepthawtz has joined the channel [20:42] marienz has joined the channel [20:42] maushu has joined the channel [20:43] sixtus42 has joined the channel [20:45] teemow has joined the channel [20:45] deepthawtz has joined the channel [20:52] psema4_ has joined the channel [20:57] mr_daniel has joined the channel [20:59] dnolen has joined the channel [20:59] mohiam_ has joined the channel [21:04] isaacs has joined the channel [21:09] Spion_ has joined the channel [21:10] mscdex: Booths: no [21:14] RevoOf has joined the channel [21:15] jimt has joined the channel [21:18] bnoordhuis has joined the channel [21:20] _mql has joined the channel [21:25] oal has joined the channel [21:26] maushu_ has joined the channel [21:27] marienz has joined the channel [21:28] dahankzter1 has joined the channel [21:31] Anti-X has joined the channel [21:36] herbySk has joined the channel [21:38] charlenopires has joined the channel [21:38] justin_ has joined the channel [21:41] evanmeagher has joined the channel [21:43] Anti-X has joined the channel [21:45] cnu: can node do STARTTLS now? i found some 1 year old blog posts saying it would be possible later [21:46] dmno has joined the channel [21:47] dmno: hey all =D [21:47] nickbruun has joined the channel [21:48] tj: heyyy [21:49] erlnoob has joined the channel [21:49] nickbruun: hey? :) [21:49] sveisvei has joined the channel [21:50] namelessnotion_ has joined the channel [21:52] namelessnotion has joined the channel [21:53] psema4_ has joined the channel [21:54] Anti-X has joined the channel [21:55] jakehow has joined the channel [22:00] webr3 has joined the channel [22:01] aconbere: tj: so... is there a cure for getting in stylistic / cleanup patches to node's JS? [22:02] tj: aconbere: dunno [22:02] tj: i can understand them not getting in, the project is young so its tough to have time to fiddle with styling [22:02] tj: but best to get it "right" the first time I suppose [22:02] tj: i dunno [22:03] aconbere: I mean in that patch was also the removal of a variable, that was vared, and then never assigned to. [22:03] mscdex: cnu: what are you needing starttls for? [22:03] tj: aconbere: yeah that one is pretty valid [22:03] tj: if anything it was more confusing the other way [22:04] aconbere: ACTION nods [22:04] cnu: mscdex, i need to use a proxy to connect to the internet. so it's not exactly starttls, but same concept. [22:04] mscdex: oh [22:05] aconbere: It would be nice to have a style guide to refer to for JS, which would in turn validate patches like this [22:05] mscdex: aconbere: jslint? [22:05] aconbere: mscdex: JSLint leaves a lot of be desired for style. [22:05] tj: im with brendan "fuck jslint" haha [22:06] mscdex: aconbere: but it should pick up on things like unused declared variables? [22:06] aconbere: well, that's just a bug [22:06] aconbere: :) [22:06] aconbere: my patch also tweaks some really non-idiomatic JS [22:06] Anti-X has joined the channel [22:06] nickbruun has left the channel [22:07] aconbere: (completely valid non-idiomatic JS but, just sloppy) [22:07] dahankzter has joined the channel [22:08] faust45 has joined the channel [22:08] aconbere: it's my feeling that applying common JS idioms to the node code will help onboard devs faster [22:08] JohnDav has joined the channel [22:08] aconbere: and it gives new devs a place to work on while learning the code [22:08] mscdex: cnu: have you already tried setSecure() after having connected to the server? [22:09] aconbere: besides which, since they're easy to test, they should be fairly safe to apply [22:09] tj: require() should use hasOwnProperty() for the cache [22:09] tj: found that out the hard way [22:09] tj: haha [22:10] aconbere: right [22:10] aconbere: the whole module section is really tangled [22:10] aconbere: it would be nice to be able to via a series of small patches [22:10] hoffa_ has joined the channel [22:10] aconbere: get that down to a really readable section of code [22:10] cnu: mscdex, i assumed it would fail since i first have to read the response and i didn't find a way to only read X bytes. [22:10] aconbere: (especially since it's used so often) [22:10] tj: yeah that would be nice.. [22:10] tj: id be down with helping out, just not sure anyone is really interested [22:10] aconbere: right! [22:11] tj: I do find it tough to look at though [22:11] aconbere: heh [22:11] aconbere: It just find it a bit of a mind bender [22:11] tj: I understand from a "lets just get it working" point of view, but we all have to live with this [22:11] mscdex: cnu: just search for the response you're looking for and if you find it and there's extra bytes after that, just re-emit them to your net.Stream's 'data' event [22:11] mscdex: that's what i do [22:12] cnu: oh, thanks! [22:12] aconbere: tj: I think what's even more valid, is that getting pieces like this ironed out, makes the next time someone needs to add a feature, or fix a bug, that much easier. [22:12] aconbere: AND [22:12] aconbere: it's something that devs that aren't part of the core team can actually work on [22:12] aconbere: python has suffered from this for ever :P [22:13] tj: haha as did my old jspec library. was my first "real" javascript library but it was such a clusterfuck no one could help [22:13] tj: even if they wanted to [22:15] aconbere: hmm [22:15] aconbere: maybe I should actually try to follow the contributor agreement [22:15] aconbere: err.. steps [22:16] sveisvei has joined the channel [22:17] marienz has joined the channel [22:18] Anti-X has joined the channel [22:20] richcollins has joined the channel [22:21] Tidwell: anyone know of a way with socket.io to send to a specific client within a message handler for a different client. I have the sessionId I want to send to... Or do I have to broadcast to all the clients? [22:21] dahankzter has joined the channel [22:23] pdelgallego has joined the channel [22:23] pdelgallego_ has joined the channel [22:25] sveisvei has joined the channel [22:27] markwubben has joined the channel [22:29] dahankzter has joined the channel [22:29] murz has joined the channel [22:30] Anti-X has joined the channel [22:42] Anti-X has joined the channel [22:43] wasabist has joined the channel [22:44] Tidwell: nermind...answered my own question - io.clients.CLIENTID.send() [22:46] gilesgoatboy has joined the channel [22:47] herbySk: tj: re "id be down with helping out, just not sure anyone is really interested" nterested in making modules better for six months, i just lost the hope [22:47] tj: herbySk: yeah its understandable [22:47] Ond has joined the channel [22:48] tj: better to make it work first [22:49] herbySk: s/nterested/i am interested/ [22:49] digitaltoad has joined the channel [22:50] herbySk: tj: i believe in refactoring more than in "make it work" as a right tool to actually make it work, just... i seem to be alone [22:51] tj: nah, im with you, I just accept that most are not like that [22:51] teemow has joined the channel [22:52] tj: i never consider my stuff done until it cant be refactored anymore haha [22:52] tj: which almost never happens [22:52] bnoordhuis: ryah: in case you're here, calling exit() from a signal handler isn't safe [22:53] Anti-X: explain [22:54] bnoordhuis: Anti-X: what that remark aimed at me? [22:54] Anti-X: ya [22:54] bnoordhuis: with pleasure then [22:54] bnoordhuis: exit() runs exit handlers registered with atexit() and there is no telling what those will do [22:55] Anti-X: because i have code that calls exit from signal handlers [22:55] Anti-X: :P [22:55] bnoordhuis: hah [22:55] sh1mmer has joined the channel [22:55] Anti-X: oh, so exit actually does clean up too? [22:55] gilesgoatboy has joined the channel [22:55] bnoordhuis: yep [22:55] bnoordhuis: _exit() however is safe to call from a signal handler [22:56] dahankzter has joined the channel [22:57] erlnoob: step vs flow-js which do you think is better? [22:58] naturalethic: erlnoob: how about https://github.com/substack/node-seq [22:58] tj: erlnoob: using regular callbacks [22:58] tj: lol [22:58] herbySk: bnoordhuis: doesn't reallyExit exit without calling them? [22:59] marshall_law has joined the channel [23:00] bnoordhuis: herbySk: no, that one also calls exit() [23:01] bradleymeck: generally callbacks / event emitters [23:01] noahcampbell has joined the channel [23:01] mscdex: time to find a new protocol to implement for node [23:01] mscdex: :D [23:01] naturalethic: mscdex: what cha thinkin [23:01] mscdex: i dunno [23:02] mscdex: maybe OSCAR [23:02] mscdex: heh [23:02] bnoordhuis: herbySk: it doesn't matter for js signal handlers btw, those are called from the main event loop [23:02] naturalethic: mscdex: facebook has a brighter future :) [23:03] dahankzter has joined the channel [23:03] mscdex: facebook stuff has already been done though [23:03] kenbolton has joined the channel [23:04] naturalethic: mscdex: oh? where? [23:04] dahankzter has joined the channel [23:04] naturalethic: i'd like to see node+cocoa bindings [23:05] dahankzter has joined the channel [23:05] mscdex: naturalethic: i've seen a few of them, but here is one: https://github.com/masylum/facebook-js [23:06] dahankzter has joined the channel [23:06] naturalethic: mscdex: yeah looked at that one -- doesn't do much [23:07] naturalethic: mscdex: i was specifically thinking of chat -- i wonder if that's already native in pidgin -- speaking of, why not just write a binding to that [23:07] naturalethic: er pigeon [23:08] dahankzter has joined the channel [23:08] aconbere has joined the channel [23:08] dahankzter has joined the channel [23:12] isaacs has joined the channel [23:13] intacto has joined the channel [23:13] intacto: hi, is there any performance difference between debug build and nondebug build [23:15] Anti-X has joined the channel [23:16] rbranson: intacto: not significant [23:20] markwubben has joined the channel [23:21] intacto: thanks rbranson [23:21] Ond has left the channel [23:22] loophole- has joined the channel [23:24] evanmeagher: isaacs: is there an easy way to tell if a user has entered a space after a given command-line token? [23:24] isaacs: evanmeagher: not sure. [23:24] isaacs: evanmeagher: i think all you get are those CWORD and CWLIST vars or whatever. [23:24] evanmeagher: isaacs: this example is kind of hard to articulate :P [23:24] evanmeagher: isaacs: there's COMP_POINT too, but it doesn't appear to be what I'm looking for [23:25] isaacs: evanmeagher: the docs on bash completion are *really* lacking [23:25] isaacs: i couldn't find any that weren't just "here, look at what this example is doing" [23:25] evanmeagher: yeah, i'm finding the same [23:25] evanmeagher: the issue is roughly when you have two commands like `npm update` and `npm update-dependents` where the first portion of the command match [23:25] isaacs: i see [23:26] evanmeagher: i want to be able to add a space after `update` and have it go along the update route [23:26] isaacs: i would skip any plumbing commands [23:26] isaacs: maybe we need a way to mark those as "something you really probably don't need to be doing directly" [23:26] evanmeagher: but it sees the update and keeps trying to complete it with `npm update update` [23:26] cjmFloating has joined the channel [23:26] isaacs: right [23:27] isaacs: so maybe the npm.deref command should not deal with build or update-dependents [23:27] isaacs: or "completion", for that matter [23:27] isaacs: and maybe it could also be removed from the abbrev list. [23:27] evanmeagher: isaacs: that'd work for npm base commands [23:27] isaacs: then "npm upd" would work [23:27] isaacs: (though "npm up" already does) [23:27] evanmeagher: but the same issue arises for example if you have two pkgs like express and expresso [23:27] isaacs: right [23:28] c4milo has joined the channel [23:28] evanmeagher: i like the deref solution for direct npm commands [23:28] isaacs: well, when you add the space, doesnt' it register as an empty cword? [23:29] evanmeagher: but i'm wondering if there's a more general solution that would cover deeper subcmds too [23:29] evanmeagher: no, the args list is the same length [23:30] isaacs: right, but the COMP_CWORD is the args lenght, instead of being the args.length-1 [23:31] intacto: my nodejs application has about %95 CPU with 1500 online socket users, how can I find the problem? I tried the --prof but it doesnt give me too much information about the bottleneck [23:31] evanmeagher: isaacs: ah, that might work [23:31] evanmeagher: i'll play around and get back to you [23:32] isaacs: yeah, so: [23:32] isaacs: npm up cword = 1, args = ["npm", "up"] [23:32] isaacs: npm up (with the space) is the same, but cword = 2 [23:33] isaacs: evanmeagher: ^ [23:33] evanmeagher: exactly [23:33] evanmeagher: exactly what i needed :) [23:33] evanmeagher: thanks [23:34] aconbere: herbySk: have you tried submitting a patch to ry by email? [23:35] aconbere: (just wondering if folks have gone through the actual patch steps) [23:36] isaacs: evanmeagher: remove the `--loglevel silent` in npm-completion.sh, and you'll be able to use log = require("./utils/log") in completion.js [23:36] isaacs: what gets written to stderr doesn't "count" as completion options [23:36] isaacs: it's just usually obnoxious [23:37] mikew3c has joined the channel [23:37] evanmeagher: will do. I removed the silent and have been using console.log, which is less than ideal [23:37] isaacs: yeah, console.log will confuse the output [23:37] isaacs: the log() function goes to stderr [23:38] erlnoob: process.memoryUsage returns an object which has "rss" and "vsize" as properties. anyone know what they are? [23:38] Anti-X has joined the channel [23:40] SamuraiJack has joined the channel [23:42] mape: isaacs: Thought any about the npm achivements? [23:43] tj: erlnoob: resident / virtual [23:43] [[zz]] has joined the channel [23:48] dahankzter has joined the channel [23:50] Anti-X has joined the channel [23:52] grahamalot has joined the channel [23:52] ajsie has joined the channel [23:53] ajsie: tj: do you like the object capability model in persevere? [23:53] ajsie: http://www.sitepen.com/blog/2010/03/08/object-capability-model-and-facets-in-perstorepintura/ [23:54] deepthawtz has joined the channel [23:54] tj: i dont want to read all that haha to lazy right now [23:54] bingomanatee has joined the channel [23:55] tj: ajsie: so its basically just some model hooks? or something? [23:55] tj: doesnt look to amazing [23:55] hornairs has joined the channel [23:57] ajsie: tj: from what i have understood: you get authenticated as a user belonging a group .. depending on what group you belong to you are assigned a Facet object .. that facet object (ThreadFacet) is for interacting with the model (Thread) .. you are defining on the ThreadFacet which methods on Facet model the user of that group can access [23:58] ajsie: seems pretty elegant [23:58] tj: why not just go with user roles [23:58] ajsie: http://www.sitepen.com/blog/2010/03/08/object-capability-model-and-facets-in-perstorepintura/ [23:58] tj: just a matrix of user roles/perms [23:59] Athox has joined the channel [23:59] ajsie: oh i already posted that =) [23:59] tj: seems like they are over complicating things that are not complicated lol [23:59] cjmFloating has joined the channel