[00:00] podman has joined the channel
[00:01] jhurliman: how are the office hours going?
[00:02] ryanfitz has joined the channel
[00:13] cl0udy: need help
[00:13] cl0udy: why does
[00:13] cl0udy: console.log('Hello');
[00:13] cl0udy: setTimeout(console.log('World'),2000);
[00:13] cl0udy: execute World right away
[00:13] CoverSlide: because you need to pass a function as the first argument of setTimeout
[00:14] CoverSlide: console.log('world') is an expression, not a function
[00:14] CoverSlide: and expressions get evaluated immediately
[00:14] cl0udy: thanks alot that was helpful :)
[00:14] mt3ck has joined the channel
[00:14] CoverSlide: setTimeout(function(){console.log('world')},2000)
[00:14] slickplaid: v8: setTimeout(function(){console.log('hello clarice')},2000)
[00:14] v8bot: slickplaid: ReferenceError: setTimeout is not defined
[00:15] slickplaid: aww
[00:15] cl0udy: what about
[00:15] cl0udy: console.log('Hello');
[00:15] cl0udy: function bla(){
[00:15] cl0udy: console.log('World');
[00:15] cl0udy: }
[00:15] cl0udy: (function(){
[00:15] cl0udy: setTimeout(bla(),20000);
[00:15] cl0udy: })();
[00:15] cl0udy: still doesnt work
[00:15] CoverSlide: remove the parens after bla
[00:15] CoverSlide: bla() becomes evaluated
[00:15] cl0udy: ah ok
[00:15] CoverSlide: just pass the function name
[00:15] tk has joined the channel
[00:15] cl0udy: yea
[00:15] cl0udy: works now thx :)
[00:16] MooGoo: is there any reason setTimeout is called within an anynon function
[00:16] slickplaid: Have to pass it the function object not the evaluated response :)
[00:16] cl0udy: i absolutely get it now :) thanks alot
[00:16] cl0udy: does this only apply to setTimeout?
[00:17] isaacs: cl0udy: it applies to anythign that you'd pass a function
[00:18] isaacs: function foo () { return 100 }; typeof foo // "function"; typeof foo() // "number"
[00:18] shanez has joined the channel
[00:18] isaacs: .. function foo () { return 100 }; [ typeof foo, typeof foo() ]
[00:18] Calvin: [ 03'function', 03'number' ]
[00:18] cl0udy: thanks peeps
[00:19] isaacs: jhurliman: pretty quiet.
[00:19] isaacs: jhurliman: just hacking in a conferrence room instead of an office :)
[00:19] jhurliman: i didn't realize they were happening today or i would have headed into SF
[00:20] jhurliman: i had a whole rant prepared about http request timeouts in node :)
[00:20] isaacs: hehe
[00:20] isaacs: jhurliman: the mailing list is a good place to put those
[00:20] jhurliman: k
[00:20] isaacs: or, ya know, just scream at me or ryan or mikeal or someone
[00:20] isaacs: that's usually more fun
[00:21] isaacs: :)
[00:21] AphelionZ has joined the channel
[00:22] jerrysv: isaacs: i've met you - can't see how screaming at you would be fun
[00:22] isaacs: well, it'd be fun for me
[00:22] isaacs: LOuD NOiSES!!!!!!!!!
[00:23] slickplaid: i love lamp
[00:23] jhurliman: my understanding of the situation is that node switched over to using a client pool for http requests, which made most things nicer but also made it trickier to do things like setting a per-request connection timeout
[00:23] jhurliman: so the author of the request library just punted on supporting connection timeouts, which had a trickle-down effect to every other library that uses request
[00:23] neoesque has joined the channel
[00:24] jhurliman: now node-crawler has no way of changing the connection timeout from the default two minutes, and i have to disable connection pooling for the requests to http services in my backend where i need to set a short timeout
[00:24] isaacs: i see
[00:24] Poetro1 has left the channel
[00:25] paul_k has joined the channel
[00:25] isaacs: so, you can opt-out of the request pooling stuff by just setting {agent:false} in the request options object.
[00:25] jhurliman: so i just want to know where the fix needs to be made (is it in the request library or does something in node.js have to change) and how can it be fixed
[00:25] isaacs: jhurliman: it'll still use an agent, of course, but it'll create a fresh one
[00:25] jhurliman: that's what i currently do
[00:25] isaacs: i think you can also use getAgent() to get an agent, and then monkey with it, and then do { agent: myAgent }
[00:26] jhurliman: but it would be nice to take advantage of agent pooling. especially for a situation like pinging a backend service where you are going to hit it thousands of times per minute and want to keep the connection open
[00:26] isaacs: so, i'm thinking you should be able to customize the request timeout stuff there. lemme rtfs and see if i'm right or just full of it...
[00:26] jhurliman: hmm, ok. i need to figure out where in the request library to plug that in
[00:28] igl1 has joined the channel
[00:28] Tobsn has joined the channel
[00:29] isaacs: hm... it seems like you'd have to do req.socket.setTimeout(someOtherNumber)
[00:29] isaacs: where `req` is the thing returned by http.request
[00:29] jhurliman: let me grab my notes
[00:29] isaacs: ACTION writing up a quick test
[00:30] jhurliman: so in my testing, that only works when agent pooling is disabled
[00:30] jhurliman: so my modified version of request looks like: if (options.pool === false) { if (options.timeout) options.req.socket.setTimeout(options.timeout); } else { /* no timeout can be set? */ ... }
[00:31] isaacs: hm, interesting
[00:31] isaacs: also, the server's timeout is hard-coded to 120s, afaic
[00:31] isaacs: *afaict
[00:31] stepheneb has joined the channel
[00:32] jhurliman: i'm less worried about that (someone else might care though). my major issue is that i need to fetch data from a backend service, and that service may or may not be online or reachable. i can't wait around for 120 seconds to find out though
[00:33] konobi: you can replace the agent iirc
[00:33] jhurliman: if a connection can't be established after ~5 seconds i need to bail out and fall back to plan b
[00:33] jhurliman: konobi, would that mean implementing a custom agent pool in the request lib?
[00:33] konobi: (on a per-request basis that is)
[00:33] davidcoallier has joined the channel
[00:34] konobi: http.request({ agent: my_shiny_agent, ...
[00:34] MooGoo: you can set timeouts yes?
[00:34] MooGoo: on requests?
[00:34] dget has joined the channel
[00:34] isaacs: konobi: yeah, but i think he's looking to take advantage of the code that's already there and not rewrite the http agent :)
[00:34] konobi: isaacs: sure, he can just overload one part of it though
[00:34] isaacs: so, it seems like, if you were to subclass http.Agent, the thing to dig into would be the _getConnection function
[00:34] isaacs: yep
[00:35] jhurliman: if i do have to rewrite the http agent, i'd like to build that into the request library so that it is usable in any new project i code up
[00:35] isaacs: jhurliman: no, i can just subclass http.Agent
[00:35] isaacs: Agent.prototype._getConnection = function(host, port, cb) {
[00:35] isaacs: override that function
[00:35] MooGoo: socket.setTimeout(5000)
[00:35] MooGoo: ?
[00:35] jhurliman: ok, thanks
[00:35] jhurliman: i'll take a look at that
[00:36] isaacs: it's around line 1358 of lib/http.js in the v0.4 branch
[00:36] cl0udy has joined the channel
[00:36] isaacs: simple function. just calls net.createConnection(port, host)
[00:37] MooGoo: http is an instance of Socket?
[00:37] matty has joined the channel
[00:37] isaacs: you could do this:
[00:37] isaacs: MyAgent.prototype._createConnection = function (host, port, cb) {
[00:37] isaacs: var c = Agent.prototype._createConnection.call(this, host, port, cb)
[00:37] isaacs: c.setTimeout( this._timeout )
[00:37] isaacs: return c
[00:38] shiawuen has joined the channel
[00:38] jhurliman: easy enough, thanks
[00:38] isaacs: and otherwise, just a pretty straight subclass. function MyAgent () { Agent.apply(this, arguments) } ; MyAgent.prototype = Object.create(Agent.prototype, { constructor: { value: MyAgent }})
[00:39] isaacs: nb: untested, might not work :)
[00:39] cl0udy: %s is string %d is number
[00:39] cl0udy: where can i hv a complete reference of these?
[00:39] cl0udy: what are they called?
[00:39] xerox: Agent.007
[00:39] MooGoo: printf..?
[00:39] cl0udy: %j
[00:39] AvianFlu has joined the channel
[00:40] cl0udy: hmm dont know
[00:40] isaacs: cl0udy: just %s, %d, and %j
[00:40] cl0udy: nothing else?
[00:40] isaacs: cl0udy: lines 42-44 of lib/console.js
[00:40] cl0udy: thanks isaacs
[00:40] isaacs: anything else just gets util.inspect()'ed
[00:40] jhurliman: ok i will give that a go and send a pull request to the request library if it works for me, thanks
[00:41] cl0udy: thanks
[00:41] isaacs: jhurliman: it'd be worth a pull request to node, imo
[00:41] xerox: why are commits called pulls
[00:41] isaacs: jhurliman: even though it probably won't go in v0.4
[00:41] xerox: isn't it backwards
[00:41] jhurliman: that's fine
[00:41] isaacs: xerox: because yor'e requesting that i pull from your repo
[00:41] isaacs: hence, "pull request"
[00:42] jhurliman: speaking of 0.5/0.6 though, how far along is libuv?
[00:42] isaacs: not sure. it's moving, though :)
[00:42] isaacs: i'm not working on it
[00:42] xerox: makes perfect sense
[00:42] isaacs: piscisaureus: you around?
[00:42] piscisaureus: isaacs: yeah
[00:42] isaacs: piscisaureus: how far along is libuv?
[00:42] isaacs: any idea?
[00:43] piscisaureus: hmm good question
[00:43] piscisaureus: long probably
[00:43] azeroth__ has joined the channel
[00:43] piscisaureus: as a whole
[00:43] piscisaureus: but we should be adding net bindings real soon
[00:43] isaacs: ok, rad
[00:43] piscisaureus: like, a week or so
[00:43] isaacs: oh, that soon, really?
[00:44] piscisaureus: hmm
[00:44] piscisaureus: maybe a 2 then :-)
[00:44] piscisaureus: ryan is working on it
[00:44] Timothee has joined the channel
[00:44] piscisaureus: some other guys are working on dns support
[00:45] podman has joined the channel
[00:45] piscisaureus: but moving file io, child processes, stdio to libuv is kinda far off
[00:46] piscisaureus: but it doesn't really matter - for file io we can stick with libeio for a while and for cp/stdio we already have proper special casing in node itself
[00:46] piscisaureus: which is ugly but works
[00:46] davidbanham has joined the channel
[00:47] podman1 has joined the channel
[00:49] Timothee_ has joined the channel
[00:50] ap3mantus has joined the channel
[00:51] isaacs: kewl
[00:51] jhurliman: good to hear
[00:52] MooGoo: how bout an in-node way to have outgoing connections bind to a specfic IP
[00:52] piscisaureus: isaacs: why? you need it soon?
[00:52] MooGoo: teehee
[00:52] isaacs: piscisaureus: jhurliman was asking
[00:52] piscisaureus: oh, ok
[00:52] isaacs: piscisaureus: people wanna add stuff into fs and netowrking stuff, and we're always like, "nono, can't do that yet, gonna refactor soon"
[00:52] piscisaureus: yeah
[00:53] piscisaureus: It sucks I know
[00:53] jhurliman: i already switched from windows to osx for node development :)
[00:53] piscisaureus: if people want to do net stuff they can join the libuv party I think
[00:58] edude03 has left the channel
[00:58] edude03 has joined the channel
[01:00] harth has joined the channel
[01:01] WRAz: what do you guys think about using MooTools/other libs for OOP in Node.JS ?
[01:01] yokoe has joined the channel
[01:01] MooGoo: if you like mootools...
[01:01] MooGoo: go for it
[01:02] McMAGIC-1Copy has joined the channel
[01:02] hassox has joined the channel
[01:02] namelessnotion has joined the channel
[01:03] WRAz: I like it, I'm just worried. I'm building a pretty complex system of objects that then use Dnode to communicate across servers
[01:03] MooGoo: does MooTools extend any native prototypes?
[01:03] gtramont1na has joined the channel
[01:03] WRAz: yes
[01:03] MooGoo: well...try it out I guess
[01:03] WRAz: but it seems to work with Node
[01:04] MooGoo: I mean you can always
[01:04] MooGoo: vm.runInNewContext
[01:04] MooGoo: if you get something that really refuses to work
[01:04] MooGoo: but likely that will be pretty rare
[01:05] WRAz: yeah, just use to frameworks always wanting you to do things "their" way
[01:05] WRAz: node appears to be pretty open ended.
[01:05] MooGoo: that's how I write all my shit
[01:05] MooGoo: I do what I want
[01:06] MooGoo: probably melt jslint
[01:06] MooGoo: not aware of any node modules that rely on enviornment changing libraries
[01:06] warreng has joined the channel
[01:06] MooGoo: sounds like it would be bad practice
[01:07] WRAz: it mostly adds functionality rather than change it
[01:07] gavin_huang has joined the channel
[01:07] MooGoo: there's always some chance that different versions of "string".trim() might maybe cause problems
[01:07] MooGoo: I guess
[01:07] MooGoo: but you shouldnt let it keep you from using your toolset
[01:09] bartt has joined the channel
[01:09] AvianFlu has joined the channel
[01:09] erictj has joined the channel
[01:10] c4milo1 has joined the channel
[01:11] TomsB has joined the channel
[01:12] cbiscardi has joined the channel
[01:14] AddZero has joined the channel
[01:15] Mrfloyd has joined the channel
[01:16] cconstantine has joined the channel
[01:17] cole has joined the channel
[01:17] cconstantine: newb question: how do I get the length (number of keys) from an associative array?
[01:18] AphelionZ has joined the channel
[01:18] xandrews has joined the channel
[01:20] MooGoo: count them manually
[01:20] MooGoo: well
[01:20] MooGoo: Object.keys(obj).length
[01:20] MooGoo: that works if you have it
[01:21] mynyml has joined the channel
[01:21] cconstantine: awesome, that appears to work. Thanks :)
[01:21] davidbanham has joined the channel
[01:23] isaacs: cconstantine: don't call it an "associative array"
[01:23] isaacs: cconstantine: in js, there is no such thing
[01:23] isaacs: that's a php-ism, where stdObject and array() are two different types
[01:23] cconstantine: ew, php
[01:23] isaacs: in JS, {} is an Object, and [] is an Array
[01:23] cconstantine: ok, what's the js term?
[01:24] cconstantine: so, object?
[01:24] isaacs: jsut Object :)
[01:24] isaacs: yeh
[01:24] isaacs: Note that Array is a subclass of Object
[01:24] MooGoo: glad someone explained that for me
[01:24] cconstantine: okie. I never know; each language is different :(
[01:24] isaacs: so you *can* do stuff like: x = []; x.y = "z"
[01:24] isaacs: of course, that's why we're here :)
[01:25] MooGoo: ever seen the PHP syntax for inline stdObjects
[01:25] briznad has joined the channel
[01:25] isaacs: MooGoo: i didn't know there was one?
[01:25] MooGoo: there is
[01:25] MooGoo: been awhile tho...
[01:25] isaacs: MooGoo: unless you mean array_to_object(array( "x" => "y" ))
[01:25] brianmario has joined the channel
[01:25] MooGoo: nah
[01:25] isaacs: MooGoo: if there is, it's after my time :)
[01:26] MooGoo: lucky u
[01:26] MooGoo: you got out early
[01:26] MooGoo: this is >=5 I'm pretty sure
[01:26] isaacs: yeah, i lived php from about 3.1 until 5.2/5.3
[01:26] abraxas has joined the channel
[01:26] isaacs: right about when 5.3 was getting released is when i finally completely jumped ship to js-only
[01:26] nibblebot has joined the channel
[01:27] MooGoo: just had so much leagcy php stuff
[01:27] MooGoo: love to develop an almost pure js app
[01:27] cconstantine: I jumped straight from c++ to ruby
[01:27] MooGoo: that only goes back to the server for database and shit
[01:31] tonymilne has joined the channel
[01:32] ryanfitz has joined the channel
[01:32] aperiodic has joined the channel
[01:34] bartt has joined the channel
[01:34] matty has joined the channel
[01:36] Marak has joined the channel
[01:37] kawaz has joined the channel
[01:39] fairwinds has joined the channel
[01:41] Marak: who wants to test this insane thing i just released
[01:41] Marak: the demo will make you laugh 100%
[01:41] WRAz: does it print candy
[01:41] Marak: tons of custom sound effects
[01:41] lukstr: is that rhetorical?
[01:41] isaacs: I DO OMG I WANT TO TEST YOUR INSANE RELEASED THING
[01:41] isaacs: (office hours a little slow today)
[01:42] boazsender has joined the channel
[01:42] slickplaid: alright, i'll bite too
[01:42] WRAz: this is how STDs are spread.
[01:43] Marak: you guys got macos?
[01:43] Marak: https://github.com/Marak/hook.io
[01:43] Marak: i got AvianFlu patching play.js right now to work on linux
[01:43] brianseeders has joined the channel
[01:43] Marak: the demo will work without sfx, but its lame as shit
[01:43] Marak: the sfx hook can be attached / detached seamlessly, so you can just not start it up
[01:43] Marak: every hook is a process
[01:43] Marak: can have many upstreams or downstreams
[01:44] Marak: just released a few minutes ago
[01:44] Marak: so everything is prob broken
[01:44] Marak: but it works on my computer!
[01:44] Marak: also *cough*
[01:44] Marak: Message publishing has a one-one API with EventEmitter class Message Publishing and Subscribing done through node's native EventEmitter API EventEmitter API is extended with namespaces using EventEmitter2
[01:45] Marak: buzzwords!
[01:45] Marak: fuck your pub sub, we use the EventEmitter
[01:45] isaacs: Marak: the readme is all wrong
[01:45] isaacs: it says to do hook/blah
[01:45] isaacs: it should be hooks/blah
[01:45] isaacs: (note the s)
[01:45] Marak: isaacs: on it
[01:46] ryanmcgrath has joined the channel
[01:46] RyanD|Home has left the channel
[01:46] Marak: pushed, thanks isaacs
[01:46] unlink has joined the channel
[01:46] kawaz has joined the channel
[01:46] Marak: i really cant stress the awesomeness of the sfx, cross platform coming in the hour
[01:47] joey101 has joined the channel
[01:47] Marak: ill make a real demo soon too, which actual real-time data providers
[01:47] Marak: with*
[01:47] isaacs: "Eh! I'mma ded!"
[01:47] isaacs: Marak: also, it's a lot better if you put & after all those commands
[01:47] isaacs: since otherwise they'll sit there blocking
[01:48] Marak: isaacs: so like, when you call .start for a downstream, you can specify a string or array of hooks
[01:48] Marak: that will automatically start them all via forever
[01:48] Marak: i gotta do a quick patch and add docs for that, but its there
[01:48] unlink: How could I accomplish requiring the correct .node binary module depending on the architecture of the node process? I.e. if I am running on a 32-bit system, load library-i686.node, versus loading library-x86_64.node on a 64 bit system.
[01:48] isaacs: kewl
[01:48] edude03 has joined the channel
[01:48] Marak: isaacs: but you are saying that blocks? i had no idea
[01:49] isaacs: unlink: require("path/to/library-" + require("os").arch() )
[01:49] Marak: im running each one of those in a new tab
[01:49] isaacs: unlink: but os.arch() isn't =in 0.4
[01:49] Marak: so isaacs you it worked?!?!
[01:49] isaacs: unlink: so sadly, it'll have to wait for 0.5 or 0.6
[01:49] Marak: GREAT SUCCESS?!?!?!?
[01:49] isaacs: Marak: yah, they totaly killed the enemy
[01:49] isaacs: GREAT SUCCESS!!!!!
[01:49] Marak: huzaah!
[01:49] jslatts_ has joined the channel
[01:49] Marak: thanks isaacs
[01:50] Marak: im gonna keep hacking on this and make a screencast
[01:50] Marak: im not sure if that demo is compelling enough to show whats going on
[01:51] skm has joined the channel
[01:52] unlink: isaacs: Yeah, gotcha. Any clever ways to fake this today that you know of?
[01:52] pyrony has joined the channel
[01:52] isaacs: unlink: well, you could call uname in a child_process, but that's pretty lame
[01:52] Sidnicious has joined the channel
[01:52] isaacs: unlink: or just compile it on the target architecture, which i'm guessing if you could do, you would be doing already
[01:53] MooGoo: I just dont understand what this hook thing does
[01:53] unlink: isaacs: I'm aiming to distribute self-contained tarballs that run out of the box.
[01:54] AphelionZ1 has joined the channel
[01:55] Marak: MooGoo: its an I/O party
[01:55] MooGoo: hot chicks?
[01:55] Marak: MooGoo: hooks can have many downstreams ( servers ) and upstreams ( clients )
[01:55] Marak: MooGoo: messages are passed to the current upstream and rebroadcasted to all siblings
[01:55] unlink: isaacs: I could write a C extension that gives me the string I want, but there is one small issue with that approach.
[01:55] Marak: you see how that works MooGoo ?
[01:55] jslatts has joined the channel
[01:55] isaacs: unlink: exactly
[01:56] Marak: this is prob the best project ive ever written
[01:56] Marak: i dont say that lightly
[01:56] MooGoo: so....it one to manys servers
[01:56] MooGoo: or something
[01:56] Marak: MooGoo: many to many
[01:56] Marak: MooGoo: I/O party
[01:56] MooGoo: is it random
[01:56] MooGoo: just sending stuff all over the place
[01:56] MooGoo: randomizing ports and shit
[01:56] Marak: its like a directed graph? im not a computer scientist
[01:56] Marak: MooGoo: its incremented, still havent written all that logic yet
[01:56] MooGoo: neither am I clearly
[01:57] Marak: its very basic right now, the it works and the framework is in place. going to attack kohai with this
[01:57] MooGoo: so it's an array of servers
[01:57] Marak: and get all the hooks we need, twitter, irc, etc
[01:57] Marak: got all the code already
[01:57] Marak: hook.io is back and meaner then ever
[01:57] MooGoo: what can it do
[01:57] Marak: EVERYTHING
[01:57] MooGoo: that you cant do with...noraml stuff
[01:57] MooGoo: wow
[01:57] sh1mmer has joined the channel
[01:57] MooGoo: can it wash my dishes
[01:58] sh1mmer: isaacs: finally got back from my meeting
[01:58] markstory has joined the channel
[01:58] Marak: the concept is that you separate every piece of functionality into a distinct unit ( a hook ), which is a node process... this means you have many many node processes running, all doing almost no work
[01:58] isaacs: sh1mmer: nice
[01:58] isaacs: go well?
[01:58] Marak: and since its a directed graph, you can have pieces of it go down without affecting the rest of the graph
[01:59] Marak: i.e. isolation extreme
[02:00] MooGoo: so it's not nesecarily for networking
[02:00] MooGoo: so confused
[02:00] MooGoo: so like
[02:00] MooGoo: my irc bot, if each module were running in its own process....that'd be like hook somehow
[02:00] langworthy has joined the channel
[02:00] Marak: MooGoo: yeah, and if you need to take down a hook, it wont disconnect you from urc
[02:00] Marak: irc
[02:00] Marak: in fact, you can update the code, and reconnect it seamlessly
[02:01] Marak: thats the whole point
[02:01] MooGoo: I got it to do that without seperate processes
[02:01] MooGoo: but I see
[02:01] MooGoo: the eval bot runs in a seperate process out of nesecity
[02:01] Marak: you can also do things like implement seamless fault tolerance of any piece of your system
[02:01] MooGoo: and I wrapped a sync sqlite3 module in a seperate process
[02:01] Marak: so if a service dies you can reroute to another hook
[02:02] MooGoo: so its like a mini os
[02:02] Marak: ehhh, no
[02:02] Marak: i dunno
[02:02] Marak: its hook
[02:02] sh1mmer: MooGoo: are you talking about erlang?
[02:02] MooGoo: possibly
[02:02] Marak: sh1mmer: i rewrote hook.io for the 3d time
[02:02] MooGoo: node doesnt really give you control over any multitasking
[02:02] Marak: sh1mmer: https://github.com/marak/hook.io rough demo
[02:02] Marak: requires macos for sounds atm
[02:02] sh1mmer: Marak: rewriting is good :)
[02:02] joey101 has left the channel
[02:03] Marak: sh1mmer: its unstoppable now, and it "works"
[02:03] sh1mmer: heh
[02:03] Marak: sh1mmer: about to rewrite the kohai bot plugin system using it
[02:03] Marak: this is the best thing ive done yet, it still needs a lot of work though
[02:03] Marak: core lib is clocking in at like 80 lines of code right now...
[02:03] Marak: :-)
[02:04] Marak: still very rough
[02:04] MooGoo: is process communication somehow abstracted away
[02:04] Marak: screencast coming
[02:04] Marak: MooGoo: yes
[02:04] Marak: MooGoo: just use the event emitter
[02:04] MooGoo: but all async yea
[02:04] Marak: MooGoo: you can also use wildcards in the event emitter now
[02:04] Marak: MooGoo: since its EventEmitter2
[02:05] MooGoo: is that a module
[02:05] MooGoo: or node
[02:05] Marak: https://github.com/hij1nx/EventEmitter2
[02:05] Marak: it extends and replaces the built in node one
[02:05] MooGoo: whats the difference
[02:05] Marak: backwards compat
[02:05] Marak: read the docs
[02:06] zmbmartin: with mongoose when updating a embedded doc do you use push or something else?
[02:08] Vertice: does anybody have any idea about how to write a test for wether my system generates an email correctly >
[02:08] Vertice: ?
[02:08] mandric has joined the channel
[02:08] Vertice: i'm using expresso
[02:10] davidban_ has joined the channel
[02:10] unlink: isaacs: I could look for magic bytes in the header of the node binary, but I am somewhat disinclined to do that.
[02:13] Kami_ has joined the channel
[02:14] k1ttty has joined the channel
[02:15] joshuaroesslein has joined the channel
[02:16] thoolihan has joined the channel
[02:18] justinTNT has joined the channel
[02:18] daniellewis has joined the channel
[02:18] daniellewis: so whats the news on nodejs?
[02:18] daniellewis: or where can i find nodejs news
[02:18] MooGoo: news.google.com
[02:19] cbiscardi has left the channel
[02:19] Marak: tetsu: http://www.reddit.com/r/node/
[02:19] Marak: tetsu: or the node.js google group
[02:19] Marak: the google group is good
[02:20] ebryn has joined the channel
[02:20] lackac has joined the channel
[02:22] justinw312 has joined the channel
[02:22] justinw312: Does anyone know of the top of their head if the V8 gc handles circular references?
[02:22] _jdalton has joined the channel
[02:22] MooGoo: handles them how
[02:23] justinTNT: heya, anyone using msgpack with node?
[02:23] MooGoo: like not disposing not disposing of them correctly
[02:23] MooGoo: er
[02:23] justinw312: in the not a memory leak sense
[02:23] MooGoo: anyway pretty sure it handles them fine
[02:23] mikegerwitz: justinw312: if both are out of scope, it shouldn't matter
[02:23] MooGoo: only worry about IE
[02:23] justinw312: Awesome, thanks
[02:23] justinw312: I want to have two objects with refs to each other that will commonly be created/destroyed
[02:24] mikegerwitz: justinw312: I can't say that with certainty, just from evaluating how GC works. I'd ask someone like mraleph when he pops in again
[02:24] MooGoo: MS had a pretty interesting article on exactly when IE memory leaks are created
[02:24] MooGoo: but its pretty much an IE thing
[02:25] justinw312: Well, I'll probably throw in a few delete's for good measure. Can't hurt.
[02:25] justinw312: If nothing else, it'll make the gc easier.
[02:25] MooGoo: have faith in the GC
[02:26] mikegerwitz: justinw312: delete won't do anything that letting the object fall out of scope won't
[02:27] justinw312: a.b = b; b.a = a; delete a.b; delete b.a; // Totally the same as just letting them go out of scope?
[02:27] ezl- has joined the channel
[02:28] mikegerwitz: justinw312: Depends what you're looking for. If a and b go out of scope, a.* and b.* are freed. However, if a or b will never go out of scope, then yes you need delete
[02:28] patrickarlt has joined the channel
[02:28] ebryn_ has joined the channel
[02:28] justinw312: mikegerwitz: Alright, thanks. That helps.
[02:28] MooGoo: delete is limited anyways
[02:28] MooGoo: you cant to delete a
[02:29] MooGoo: so
[02:29] mikegerwitz: justinw312: Just keep in mind that delete doesn't mean "free the object that this is pointing to". It'll only delete that reference. So if anything else references it, you're still in trouble.
[02:29] MooGoo: yes
[02:29] MooGoo: in the case you shoed
[02:29] MooGoo: showed
[02:29] MooGoo: it just deletes a reference
[02:29] justinw312: YEah
[02:29] MooGoo: both objects still exist
[02:30] justinw312: that was the goal, to get rid of the circular reference
[02:30] boogyman has joined the channel
[02:30] yhahn has joined the channel
[02:30] mikegerwitz: justinw312: should be good, then :)
[02:30] justinw312: Sweet, thanks.
[02:33] Murugaratham has joined the channel
[02:38] isaacs: justinw312: actually, delete makes GC slower
[02:39] justinw312: Really?
[02:39] tbranyen: does it?
[02:39] isaacs: justinw312: delete obj <-- that is silly and pointless
[02:39] isaacs: justinw312: delete obj.foo <-- that breaks hidden classes
[02:39] tbranyen: delete obj[prop] is the only way to truly remove a property
[02:39] tbranyen: setting to undefined doesn't remove it
[02:39] isaacs: so, if you delete a member from your object, then v8 can't use the cached "these are the properties on this object" thingie behind the scenes, and dealing with your object, any read or write on it, will be slower.
[02:40] dguttman has joined the channel
[02:40] tbranyen: v8> var obj={prop:'val'}; obj.prop = undefined; obj
[02:40] v8bot: tbranyen: {prop:undefined}
[02:40] tbranyen: v8> var obj={prop:'val'}; delete obj.prop; obj
[02:40] v8bot: tbranyen: {}
[02:40] isaacs: tbranyen: yep
[02:40] tbranyen: delete is important
[02:40] isaacs: totally
[02:40] isaacs: but you should not use it unless the slight cosmetic benefit is worth losing the benefit of hidden classes.
[02:40] isaacs: in some cases, it's actually faster to make a new object with just the properties you want
[02:41] justinw312: It's only circular references on objects I want to vanish that I'm worried about
[02:41] isaacs: justinw312: circular refs are fine.
[02:41] isaacs: those can be gc'ed without any trouble
[02:41] isaacs: once the whole cycle is unreachable, the whole cycle will be harvested.
[02:41] justinw312: Thats perfect, then
[02:41] pyrony has joined the channel
[02:41] isaacs: a = {}; a.b = {}; a.b.a = a
[02:41] isaacs: once you lose the ref to "a", then the "a.b" object isn't reacahble either, and the whole circle dies.
[02:42] justinw312: Thats what I was hoping
[02:43] arieru has joined the channel
[02:43] chilts: what about: a = {}; b = {}; a.b = b; b.a = a; ?
[02:43] chilts: if you lose reference to a and b at the same time, but they still point to each other?
[02:44] MooGoo: they point to nothing since they dont exist
[02:45] mikegerwitz: chilts: if they're both unreachable, it doesn't matter
[02:45] chilts: yeah, but are they gc'd?
[02:45] IJackToMadonna has joined the channel
[02:45] MooGoo: they will be
[02:45] MooGoo: whenever the gc cycle occurs
[02:45] chilts: and you're sure about that?
[02:45] MooGoo: yes
[02:45] chilts: that's pretty nice then
[02:45] mikegerwitz: chilts: They'r eonly GC'd if they cannot be referenced in any way
[02:46] chilts: the thing is, that would trip up a number of garbage collectors, since the reference count for each would be 1
[02:46] IJackToMadonna: Are there any plans to port node to other languages besides EMCAScript?
[02:46] chilts: so does that mean V8 doesn't do reference counting, it does it some other way?
[02:46] MooGoo: hm?
[02:47] MooGoo: there's 2 references
[02:47] MooGoo: the local var a
[02:47] MooGoo: and the property a
[02:47] IJackToMadonna: I would love a node.java
[02:47] justinw312: mark and sweep from some research
[02:47] MooGoo: omfg
[02:47] MooGoo: someone suggested porting nodejs to java
[02:47] chilts: heh
[02:47] MooGoo: r there ops here
[02:47] dibber_ has joined the channel
[02:48] chilts: justinw312: cool, that answers my question then - thanks :)
[02:48] mikegerwitz: chilts: If a goes out of scope, a.b is freed. That'll decrease the ref count
[02:49] IJackToMadonna: MooGoo: Umm, who wouldn't want the robuestness of Java, but async?
[02:49] MooGoo: dont even see how it would be fiesable with java's lack of support of closures
[02:49] mikegerwitz: IJackToMadonna: Java lacks elegant async methods.
[02:49] MooGoo: less it hast hose...
[02:49] MooGoo: those
[02:49] mikegerwitz: IJackToMadonna: Scala would be better suited
[02:49] MooGoo: I guess it could work
[02:49] gtramont1na has joined the channel
[02:50] MooGoo: there are async java libraries yes?
[02:50] IJackToMadonna: mikegerwitz: Well, providing the async methods would be part of the effort.
[02:50] MooGoo: all node is is async libraries for javascript
[02:50] MooGoo: nothing special
[02:50] IJackToMadonna: Right, so someone could do it for Java.
[02:51] MooGoo: but you couldnt really have the same syntax or API
[02:51] MooGoo: so it'd just be another async library
[02:51] ryanfitz has joined the channel
[02:51] davidbanham has joined the channel
[02:51] eric_f has left the channel
[02:51] IJackToMadonna: Right now, our Java web app takes 615 ms to load a basic page.
[02:52] justinw312: java has nonblocking i/o
[02:52] IJackToMadonna: We have lighttpd running the Java via CGI, so it has to start up the whole JVM each time.
[02:53] justinw312: That seems suboptimal
[02:53] MooGoo: isnt that a configuration issue
[02:53] MooGoo: I mean
[02:53] IJackToMadonna: Good thing it's only used for admin stuff
[02:53] MooGoo: PHP has a whole vm
[02:53] mikegerwitz: node provides an API that is conventionally unavailable to JS. It's pointless to port sucha n API to Java, because Java already has everything node does and more.
[02:53] MooGoo: and it is pretty fast
[02:53] jtsnow has joined the channel
[02:55] MooGoo: you could write some kind of wrapper library that trys to simulate the behavior of the node API if you really wanted
[02:55] MooGoo: I guess
[02:56] materialdesigner has joined the channel
[02:57] isaacs: chilts: if they're unreachable, it'll be harvested.
[02:57] isaacs: IJackToMadonna: there are no such plans.
[02:58] isaacs: IJackToMadonna: the JS vm's these days are some of the best vm's ever devised by humans.
[02:58] IJackToMadonna: isaacs: Okay. The effort's focus is appreciated (we're using node.js right now).
[02:58] bentruyman has joined the channel
[02:58] isaacs: awesome :)
[02:59] isaacs: IJackToMadonna: ryah likes to wax philosophical about the c-style no-gc language he's going to build one day. maybe there's gonna be a node.ry eventually
[02:59] isaacs: but i kinda doubt it, myself.
[02:59] isaacs: javascript is the language we're stuck with
[03:00] MooGoo: you could use one of those crazy Java to Javascript compilers...
[03:00] IJackToMadonna: Well, if he ever builds it, I'd love to try it.
[03:00] isaacs: and by "we", i don't mean "people of node", but rather, "people of earth"
[03:00] MooGoo: it could be worse
[03:00] MooGoo: couldnt it
[03:00] dibber has joined the channel
[03:00] jmoyers: javascript is fucking rad.
[03:00] MooGoo: of all the fucked up programing languages out there
[03:01] MooGoo: which inclues most popular ones
[03:01] jmoyers: and the beauty of node is that you get the latest features, as they get rolled into v8
[03:01] jmoyers: so all that harmony syntax coming down the pike...
[03:01] IJackToMadonna: I kind of like my strict typing.
[03:01] jmoyers: ACTION shudders
[03:01] MooGoo: and given the way javascript evolved, by historical accretion...
[03:01] jmoyers: i kind of dont
[03:01] MooGoo: I think we got a pretty good deal
[03:02] IJackToMadonna: Yes, I do like node.js. I just still have some Java habits.
[03:02] fakewaffle has joined the channel
[03:02] isaacs: good night, everybody
[03:02] jmoyers: peace.
[03:02] MooGoo: IJackToMadonna you might want to check out altjs.org
[03:02] IJackToMadonna: bye
[03:02] MooGoo: its got all kinds of crazy to-javascript compilers including ones that add static typing and stuff
[03:04] Corren has joined the channel
[03:05] jmoyers: ACTION tries not to respond to the ngnix thread on the mailing list
[03:06] Bradleymeck_ has joined the channel
[03:06] tolmasky-macbook has joined the channel
[03:06] brainproxy: the code that ocamljs spits out is either frightening or amazing
[03:06] brainproxy: or both
[03:07] themiddleman has joined the channel
[03:07] brainproxy: froc is a functional reactive lib built with ocaml; apps built w/ froc can then be compiled to javascript, and there are some interesting examples
[03:08] brainproxy: i'll get a link
[03:08] cl0udy has joined the channel
[03:08] Marak: jmoyers: check it out man just released , https://github.com/marak/hook.io
[03:08] Marak: demo should work... macos required for hilarious sfx
[03:08] kriszyp has joined the channel
[03:08] boogyman_ has joined the channel
[03:08] arieru: Hello... I am starting a new development with node. Do you recomenr 0.4.9-pre or 0.5.0-pre ?
[03:09] dipser has joined the channel
[03:09] Marak: arieru: 0.4.x is the stable branch
[03:10] jmoyers: Marak so, brokerless message queue type thing?
[03:10] jmoyers: or does it have a broker? the battle = the main event queue?
[03:10] yhahn has joined the channel
[03:10] Marak: jmoyers: each node can have many upstreams ( outgoing client connections ) and many downstreams ( listening servers )
[03:11] Marak: jmoyers: the demo uses 1 downstream and a few upstreams
[03:11] Marak: its contrived
[03:11] Marak: but even with one downstream, you can do a shit ton of stuff
[03:11] davidbanham has joined the channel
[03:11] Marak: jmoyers: and every hook is a new node process...
[03:11] jmoyers: ah
[03:11] jmoyers: i'd call this like
[03:11] brainproxy: EventEmitter2 looks interesting
[03:12] jmoyers: a distributed topic exchange
[03:12] jmoyers: or something
[03:12] Marak: jmoyers: i have no idea, i think its a direct graph
[03:12] jmoyers: looks tight, i'll check it out
[03:12] Marak: with bidirectional comm
[03:12] Marak: directed graph*
[03:12] arieru: Marak: thanks. So, 0.5.0 is near to be released ? Something new? it worth the waiting ?
[03:12] Marak: im not a computer scientist
[03:12] Marak: arieru: 0.4.x will be stable for dev
[03:12] jmoyers: ah, so the upstream clients
[03:12] MooGoo: I've been using 5 for awhile and it seems relativly stable
[03:12] jmoyers: can they communicate with *each other*?
[03:12] Marak: jmoyers: yep
[03:12] MooGoo: dunno what it has over 4 tho
[03:13] Marak: jmoyers: the rules are as follows:
[03:13] Marak: jmoyers: upstreams broadcast their messages to a downstream. downstreams broadcast messages to all upstreams connected ( except origin of message )
[03:13] jmoyers: ah
[03:13] Marak: jmoyers: so upstreams broadcast to their siblings, and their siblings children
[03:13] Marak: you can also mess with that logic, its not hard
[03:14] MooGoo: can you have some sort of circular reference of hooks
[03:14] Marak: MooGoo: we are thinking about that over here, gonna build out the hook library first before we get into that issue
[03:14] Marak: MooGoo: but right now, you could prob make a circ ref, maybe not
[03:14] brainproxy: Marak: ah DAGs
[03:15] Marak: brainproxy: hrmm?
[03:15] jmoyers: yeah, similar to a 'topic exhange' from rabbitmq, but without a centralized 'broker' then -- zeromq has something like this
[03:15] brainproxy: directed acyclic graphs
[03:15] philtor has joined the channel
[03:15] jmoyers: me likey
[03:15] MooGoo: maybe you should open VISIO or something to better explain this
[03:15] brainproxy: yes, you could create a tight cycle, but the way to do that is to defer the send-event logic when you hit a point where it become a loop
[03:15] Marak: brainproxy: reading http://en.wikipedia.org/wiki/Directed_acyclic_graph , im a noob
[03:15] brainproxy: I'm dealing w/ a lot of the same stuff
[03:16] Marak: brainproxy: i think its a dag
[03:16] Marak: dominictarr agrees
[03:16] brainproxy: if it's indeed push based, you can end up w/ some weird garbage collection issues
[03:16] brainproxy: well not weird but surprising
[03:16] boazsender has joined the channel
[03:16] febits[0] has joined the channel
[03:17] brainproxy: for example, downstream shouldn't keep track of who it receives from in a recv-from list
[03:17] Marak: brainproxy: dags dont have bi-directional com channels by default?
[03:17] darshanshankar has joined the channel
[03:17] jmoyers: Marak usually in a DAG, an operation is applied to the input as you go
[03:17] jmoyers: git is a DAG
[03:17] jmoyers: diff on diff on diff on diff = this output
[03:17] brainproxy: Marak: a DAG is more abstract than that
[03:17] Marak: got ya
[03:18] S3ig3 has joined the channel
[03:18] Marak: im gonna go work on this a bit
[03:18] Marak: just ate cheeseburger
[03:18] Marak: im good to go
[03:18] jmoyers: boom
[03:18] brainproxy: hey chat me up some time, I think we may be working on complementary things
[03:18] S3ig3: Hi, I am trying to do a http.get call to google.com
[03:18] brainproxy: or at least we may be able to give each other some ideas
[03:18] eyesUnclouded has joined the channel
[03:18] S3ig3: and i get this : ENODATA, DNS server returned answer with no data
[03:19] Marak: brainproxy: #Nodejitsu is good place to idle
[03:19] Marak: :-)
[03:19] brainproxy: joining...
[03:19] S3ig3: anyone knows why that might happen ?
[03:25] mandric has joined the channel
[03:28] kmiyashiro has joined the channel
[03:29] ditesh|cassini has joined the channel
[03:33] blaenk has joined the channel
[03:33] overra has joined the channel
[03:34] JakeyChan has joined the channel
[03:34] jzacsh: what's the difference between exports and module.exports? (what is module?)
[03:34] derferman has joined the channel
[03:35] softdrink has joined the channel
[03:35] JakeyChan: jzacsh: it's my question, i want to know too
[03:36] gsmcwhirter: jzacsh, nothing so far as i know. module.exports is just more verbose
[03:36] gsmcwhirter: module is the "global" for that .js file
[03:36] igl: module.exports is the actual object the module returns
[03:37] shachaf has joined the channel
[03:37] igl: exports gets added
[03:37] igl: to module.exports later on
[03:37] jzacsh: aAAah
[03:37] jzacsh: igl thank you :)
[03:37] brownies has joined the channel
[03:37] Aria has joined the channel
[03:37] jzacsh: igl: so to do exports = module.exports = [some stuff] -- wouldn't be a good idea? (or not necessary, at the least)?
[03:38] jzacsh: s/igl/whoever-knows/
[03:38] gf3: jzacsh: http://nodejs.org/docs/v0.4.8/api/modules.html#module.exports
[03:38] mbrevoort has joined the channel
[03:39] blaenk: hey guys I'm new to node, just kind of confused about the node_modules directory. I just did npm install socket.io, where should I keep node_modules relative to my source tree?
[03:39] jmoyers: blaenk in your project root
[03:39] jzacsh: gf3: docs :) awesome
[03:39] igl: useage wise, the difference is you cant overwrite exports. but you can overwrite module.exports
[03:39] igl: exports = function(http) {} < wont work
[03:39] igl: module.exports = function(http) {} < works
[03:40] jzacsh: okay, that explains a lot.
[03:40] igl: the nodejs docs says its the same object.
[03:40] igl: but since i ran into this prob, i never use exports anymore
[03:41] devrim has joined the channel
[03:41] gf3: the docs don't say it's the same object
[03:41] darshanshankar has joined the channel
[03:41] blaenk: jmoyers: thanks. if I have /coffee (coffeescript), and a /js directory for the compiled js?
[03:41] ryanfitz has joined the channel
[03:41] blaenk: and /node_modules. should I move /node_modules somewhere else?
[03:41] boehm has joined the channel
[03:41] igl: "In particular module.exports is the same as the exports object. "
[03:41] jmoyers: nope
[03:41] igl: o.O
[03:41] jmoyers: thats fine
[03:41] blaenk: oh okay thanks
[03:41] blaenk: thank you
[03:41] jmoyers: np
[03:42] ceej has joined the channel
[03:42] Aria: jzacsh: the thing to remember is that modules, exports, and require actually passed in to the module as function parameters. That's why they work the way they do syntactically.
[03:42] gf3: igl: "The `exports` object is created by the Module system. Sometimes this is not acceptable, many want their module to be an instance of some class. To do this assign the desired export object to `module.exports`."
[03:43] igl: ah
[03:44] brainproxy: win 51
[03:44] brainproxy: whoops
[03:45] igl: so as soon as you overwrite module.exports, exports gets discarded
[03:45] Emmanuel__ has joined the channel
[03:45] flippyhead_ has joined the channel
[03:48] seangaffney has joined the channel
[03:48] arpegius has joined the channel
[03:48] davidbanham has joined the channel
[03:50] derferman has joined the channel
[03:55] Dreamer3 has joined the channel
[03:58] Marak: wtf did npm link break?
[03:58] Marak: why am i going crazy
[03:59] mandric has joined the channel
[04:00] rburhum has joined the channel
[04:00] brettgou_ has joined the channel
[04:00] SubStack: Marak: it's the drugs I slipped into your coffee probs
[04:00] Marak: SubStack: thanks!
[04:00] davidbanham has joined the channel
[04:00] Marak: they are working
[04:01] Marak: SubStack: woah npm link did change, its a two step thing now
[04:04] SubStack: wheee I love this: burrito.wrap()
[04:04] Aria: HA
[04:04] SubStack: it's isaacs's code which he ripped from uglify or whatever and then sh1mmer came up with the name
[04:04] SubStack: but I'm taking all the credit naturally
[04:05] Aria: Oh wow. That is crazy surprising, the link behavior.
[04:08] flippyhead has joined the channel
[04:09] matjas has joined the channel
[04:16] Nican_ has joined the channel
[04:16] khrome has joined the channel
[04:17] harth has joined the channel
[04:19] timmywil has joined the channel
[04:23] foxkid has joined the channel
[04:23] jacobolus has joined the channel
[04:25] sh1mmer: SubStack: .wrap :) nice
[04:26] perezd has joined the channel
[04:29] tmpvar has joined the channel
[04:32] brianseeders has joined the channel
[04:33] brianseeders has joined the channel
[04:40] matwill has joined the channel
[04:42] guybrush: Marak: this up to date right? https://github.com/isaacs/npm/blob/master/doc/link.md
[04:42] Marak: guybrush: looks like it to me, 1.0.10
[04:43] guybrush: didnt install 1.0.10 yet :p fearing the changes!
[04:47] sreeix has joined the channel
[04:49] darshanshankar has joined the channel
[04:52] jaket has joined the channel
[04:54] sudhirjonathan has joined the channel
[04:54] brownies has joined the channel
[04:55] sudhirjonathan: I'm looking at node-db-mysql now, but it seems to require access to the mysql_config binary. (https://github.com/mariano/node-db-mysql/). How does the library work with a DB not hosted on the same machine?
[04:55] pifantastic has joined the channel
[04:56] ebryn has joined the channel
[04:58] mordred has joined the channel
[05:02] cronopio has joined the channel
[05:11] killfill has joined the channel
[05:12] timmywil has joined the channel
[05:14] petrjanda has joined the channel
[05:14] fakewaffle: anyone write a local file sync program?
[05:14] fakewaffle: or know of?
[05:15] mscdex: sudhirjonathan: have you tried node-mysql?
[05:15] mscdex: fakewaffle: rsync? :p
[05:15] fakewaffle: lol
[05:15] duncanbeevers: towski put together a LAN-like realtime dropbox thingie.
[05:15] duncanbeevers: I think it's called telepathy
[05:15] fakewaffle: can you have rsync run *constantly*?
[05:15] fakewaffle: or monitor folders?
[05:15] duncanbeevers: fakewaffle: https://github.com/towski/telepathy
[05:16] sudhirjonathan: mscdex: no, not tried yet... right now I'm still wondering whether to start writing an app on heroku / node, so I'm trying to find which deps I'll need
[05:16] catshirt has joined the channel
[05:16] fakewaffle: duncanbeevers: thanks
[05:16] mscdex: fakewaffle: http://code.google.com/p/lsyncd/
[05:17] mscdex: :p
[05:17] fakewaffle: mscdex++
[05:17] v8bot: fakewaffle has given a beer to mscdex. mscdex now has 21 beers.
[05:17] sudhirjonathan: I've seen node-mysql, though... the maintainer doesn't seem to think it's ready for production yet :(
[05:17] mscdex: sudhirjonathan: i haven't personally run into any issues with it during my usage of it
[05:18] sonnym1 has joined the channel
[05:18] sudhirjonathan: yeah, it does seem well taken care of. will look at it instead...
[05:18] Renegade001 has joined the channel
[05:18] __tosh has joined the channel
[05:19] ph^ has joined the channel
[05:19] mscdex: fakewaffle: that was just the first hit from google, there may be other better (read: non-lua) solutions out there
[05:19] mscdex: ;>
[05:20] GOP-USA_dotcom has joined the channel
[05:21] raidfive has joined the channel
[05:21] fangel has joined the channel
[05:22] meso_ has joined the channel
[05:23] k1ttty has joined the channel
[05:24] brimster has joined the channel
[05:27] xavl has joined the channel
[05:27] dnuke has joined the channel
[05:30] samyak has joined the channel
[05:30] saurabhverma has joined the channel
[05:30] herbySk has joined the channel
[05:31] joshthecoder has joined the channel
[05:31] jtsnow has joined the channel
[05:32] samyak has joined the channel
[05:32] matyr has joined the channel
[05:33] tahu has joined the channel
[05:36] descipher_ has joined the channel
[05:36] samyak has joined the channel
[05:36] ewdafa has joined the channel
[05:37] jmoyers: anybody here done much with canvas?
[05:37] jmoyers: bitmaps in a renderloop?
[05:38] sreeix has joined the channel
[05:39] samyak has joined the channel
[05:42] mwhooker has joined the channel
[05:42] yozgrahame has joined the channel
[05:42] samyak has joined the channel
[05:43] shanez has joined the channel
[05:43] joshthecoder has joined the channel
[05:47] springify has joined the channel
[05:48] sreeix has joined the channel
[05:52] smgt has joined the channel
[05:52] steadicat has joined the channel
[05:53] tmm1 has joined the channel
[05:54] jetienne: jmoyers: i did some, why do you aks
[05:54] jetienne: ask
[05:54] jmoyers: in my tiny exploration
[05:54] jmoyers: is seems like drawImage is super super slow
[05:54] jmoyers: for medium sized images
[05:54] Emmanuel__ has joined the channel
[05:54] jmoyers: i was looking at this: http://kangax.github.com/fabric.js/test/demo/
[05:54] jmoyers: seems if you add a few images (maybe 15 or so), the fps drops like a rock
[05:55] jmoyers: i put together a naive test: https://gist.github.com/1018295 -- very very poor performance (8 fps or so) on Chrome 13. I'm guessing I'm doing something horrible there
[05:56] jetienne: jmoyers: it dfepends on the perf of your computer and how you draw on the canvas
[05:56] jmoyers: well yes
[05:56] jmoyers: this is a not-so-slow macbook pro
[05:56] jetienne: jmoyers: notice how img1 is much slower than img2
[05:56] jetienne: find out why, it may be interesting
[05:57] jmoyers: resolution, i'd imagine
[05:57] jetienne: jmoyers: imagine less :)
[05:57] jetienne: jmoyers: in chrome you can enable 2d hw accel in about:flags
[05:57] jmoyers: yeah
[05:57] jmoyers: i am more curious about the general case
[05:58] jmoyers: if i were to use it in our product, anyway
[05:58] jmoyers: yea, that google image is 7k
[05:58] jmoyers: the pug is 135kb
[05:58] jetienne: jmoyers: if the perf are still not good enougth, you may consider webgl, it is the fastest way to do 2D in a webpage currently
[05:58] _jdalton has left the channel
[05:58] jmoyers: yeah
[05:59] Marak: anyone know how to do this?
[05:59] jmoyers: per angry birds approach
[05:59] Marak: replModule.start("hi: "); process.stdin.write('var i = "123";');
[05:59] Marak: trying to inject some code into the repl
[05:59] jetienne: jmoyers: facebook did some nice bench on this
[05:59] Emmanuel__ has joined the channel
[05:59] jetienne: http://developers.facebook.com/blog/post/460/
[05:59] jmoyers: nice
[05:59] jmoyers: checking it out
[06:00] samyak has joined the channel
[06:00] Murugaratham has joined the channel
[06:01] Marak: ryah: do you know how to inject code into the repl? replModule.start("hi: "); process.stdin.write('var i = "123";'); > Error: Socket is not writable
[06:02] abraham has joined the channel
[06:02] Marak: creationix: how about you?
[06:02] NetRoY has joined the channel
[06:03] shiawuen has joined the channel
[06:04] liar has joined the channel
[06:04] SubStack: Marak: vm.runInThisContext()?
[06:04] jmoyers: jetienne huh, interesting
[06:04] Marak: SubStack: hrmmm?
[06:04] jmoyers: digging into their code https://github.com/facebook/jsgamebench/blob/master/engine/core/ui.js
[06:04] SubStack: (disclaimer: I've never gotten runInThisContext to do anything interesting)
[06:04] Marak: SubStack: trying to start up a repl session on the console with some pre-run code
[06:04] jmoyers: they don't appear to be using canvas at all
[06:05] bkozal has joined the channel
[06:05] jmoyers: at least for their simple tests
[06:05] SubStack: Marak: using the repl module?
[06:05] jetienne: jmoyers: they did a first version with