[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
and from memory [06:05] jmoyers: ah nm https://github.com/facebook/jsgamebench/blob/master/engine/core/canvas_render.js -- the canvas version [06:06] jetienne: http://www.facebook.com/notes/facebook-engineering/html5-games-01-speedy-sprites/491691753919 [06:06] Marak: https://github.com/joyent/node/blob/master/lib/repl.js#L39 [06:06] Marak: hrmm [06:07] hassox has joined the channel [06:07] pig_ has joined the channel [06:08] jmoyers: jetienne yea, i read that [06:08] jmoyers: it wasn't clear whether they were using vanilla DOM or canvas for their bar charts and such [06:09] jmoyers: they say "one option is to leverage canvas" [06:09] jetienne: jmoyers: i have to do one animation for a web+mobile game im making, something simple but needing to be super smooth as it is in synch with music [06:10] jmoyers: and you end up in canvas or webgl? [06:10] jetienne: jmoyers: i will have to experiment, for my case, i think
will be the most efficient [06:10] jmoyers: i see [06:10] jmoyers: requestAnimationFrame should help some [06:10] jetienne: jmoyers: not yet done. cleanly wont be webgl, as it isnt supported on mobile [06:10] jmoyers: gotcha [06:11] jmoyers: well, thanks for the resources [06:11] jetienne: jmoyers: in my experience requestAnimationFrame is only a cpu optimisation [06:11] jmoyers: well -- its a good way of batching up javascript requests that force redraws [06:11] jetienne: jmoyers: i havent seen a difference on the screen when i experimented with http://pacmaze.Com [06:12] jmoyers: if you have a forced render loop, i am not sure it has any benefit [06:12] jetienne: jmoyers: i guess it depends on your game, pacmaze is mainly about drawing anyway [06:12] Marak: i think i figured it out [06:12] jmoyers: but if you are just doing tweening on click, etc etc [06:13] jetienne: jmoyers: yep , well im using it... more out of "let do the good thing" than "let make it smooth" [06:13] jmoyers: impressive btw [06:13] jetienne: jmoyers: for example webworker did a lot more for my animation smoothness [06:13] jetienne: jmoyers: thanks [06:14] gkmngrgn has joined the channel [06:14] jetienne: webworker gaves me more cpu power and several cpu [06:14] jetienne: so i got a webworker doing the game logic, and the main page is doing the rendering 3D, sound, user input etc.. [06:14] jmoyers: gotcha [06:14] jmoyers: a good use case [06:15] McMAGIC--Copy has joined the channel [06:21] jetienne: jmoyers: just in case i wrote a cancelRequestAnimFrame shim http://notes.jetienne.com/2011/05/18/cancelRequestAnimFrame-for-paul-irish-requestAnimFrame.html [06:21] matyr has joined the channel [06:21] jmoyers: i don't understand why every browser has to namespace all these properties [06:22] jetienne: jmoyers: the point is not to define in the global namespace until the spec is fully done [06:22] Aria: Yeah. [06:22] jmoyers: well okay -- i _understand_ i just think its super inconvenient :P [06:22] jetienne: jmoyers: so they all implement the/their current draft but add a prefix... [06:23] jmoyers: so inconvenient, its a feature of css templating languages to make it disappear [06:23] jetienne: jmoyers: considere the css gradient case. firefox and webkit got different versions [06:23] jmoyers: right -- their apis were completely different, its true [06:23] jetienne: jmoyers: incompatible version, with the prefix, you can support both [06:23] jmoyers: true enough [06:23] SubStack: I really wish people who are awesome at writing crazy algorithm stuff were better at writing usable interfaces [06:24] SubStack: looking at you, uglify! [06:25] Hamms has joined the channel [06:25] Lorentz: SubStack: Can't be good at everything [06:26] cryptix: hey guys [06:26] cryptix: do i need to compile node with -g to use --debug or is that just for cases when v8 itself crashes? [06:27] cryptix: cause -g blows up node to around 40megs which is kinda big for an embedded device [06:28] level09 has joined the channel [06:30] mraleph has joined the channel [06:32] TomY has joined the channel [06:32] xsyn has joined the channel [06:33] saurabhverma has joined the channel [06:33] muhqu has joined the channel [06:34] muhqu has joined the channel [06:35] JoshC1 has joined the channel [06:35] simenbrekken has joined the channel [06:36] cryptix: fuckin timezones.. everybody is asleep i gues [06:36] sor3nsen: well [06:36] sor3nsen: almost [06:36] cryptix: ohi sor3nsen :D [06:37] sor3nsen: playing with google guitar [06:37] cryptix: sounds nice [06:37] sor3nsen: http://www.google.com/ [06:37] sor3nsen: les paul [06:37] sor3nsen: best homepage so far [06:38] SubStack: nothing is interesting except writing code right now [06:39] SubStack: I try to distract myself but just can't manage, everything is too boring [06:39] level09: why isn't socket.io falling back to flash socket first ? it goes to xhr-multipart on FF [06:39] cryptix: lol i liked the pacman a lot too [06:39] jetienne: cryptix: they did a conf on it at io2011 [06:39] SubStack: finishing up node-burrito! [06:39] sor3nsen: because FF doesnt support websockets [06:39] jetienne: http://www.youtube.com/watch?v=ttavBa4giPc&feature=youtu.be [06:39] sor3nsen: without turning it on implicitely [06:40] cryptix: level09: id like to know if you can force transport priorities too [06:40] sor3nsen: its a security setting in FF [06:40] jetienne: sor3nsen: flash socket works well, long to connect but latency is as good as websocket [06:40] level09: sor3nsen: I know websocket are closed, but I thought flash socket is number2 in the priority list [06:40] sor3nsen: oh, that was the question? [06:40] sor3nsen: my mistake.... [06:40] sor3nsen: are you guys trolling me? [06:41] sor3nsen: or what [06:41] polotek has joined the channel [06:41] jetienne: level09: if you got trouble, try to reset the rememberTransport cookie [06:41] level09: jetienne: how do I do that [06:41] jetienne: level09: or you can explictly setup the transport pref [06:41] sor3nsen: hnnng thot so [06:41] level09: jetienne: how ? [06:41] jetienne: level09: with the debugger included in your browser [06:41] samyak has joined the channel [06:41] polotek: is marak here? [06:41] jetienne: level09: in the doc somewher [06:42] level09: jetienne: which transport has the best performance ? [06:42] polotek: JimBastard isn't here but heard he might've retired that name [06:42] mscdex: websockets! [06:42] mscdex: well, maybe [06:42] level09: jetienne: it is not for me, it is for the 4000+ clients connected [06:42] mscdex: depends [06:42] jetienne: level09: websocket, flashsocket are very good too once the connection is establishezd [06:42] level09: websockets seem to only work on chrome [06:43] mscdex: chrome and safari! [06:43] sor3nsen: you have to turn it on in FF [06:43] level09: for IE I had to enforce jsonp-polling [06:43] sor3nsen: its a user setting [06:43] jetienne: level09: http://easywebsocket.org/contrib/monitor/ i did a little tool for http://easywebsocket.org [06:43] mscdex: and ff and opera with websockets enabled [06:43] level09: thanks [06:43] level09: ACTION checking [06:43] sor3nsen: last i heard FF disabled it by default based on security setting [06:43] jetienne: level09: it gives you the latency. server is in paris [06:44] level09: jetienne: but it is just for the web sockets right ? [06:44] level09: according to the log, my main clients are on FF and IE [06:44] level09: so mainly I have xhr-multipart and jsonp-polling [06:44] level09: jetienne: how do I monitor my node server from the server side ? [06:44] jetienne: level09: nope easywebsocket got a socket.io backend. so it is whatever socket.io is deciding on your browser [06:44] Shinuza has joined the channel [06:45] level09: currently i'm watching the connections, the log, and the resources with htop [06:45] level09: jetienne: great [06:45] samyak has joined the channel [06:45] level09: gonna give it a try [06:45] jetienne: level09: you can install easywesocket on your server and go in the monitor. source are https://github.com/jeromeetienne/easywebsocket [06:45] `3rdEden has joined the channel [06:45] cryptix: so again.. does anybody know if i need to compile node with -g to use --debug on my scripts? id really like to not find out by trining.. deploying to this arm device isnt as easy as id like it to be [06:46] jetienne: level09: git clone + "make server_node" should do [06:46] sg_ has joined the channel [06:46] jetienne: cryptix: i dont [06:46] Sidnicious has joined the channel [06:46] Sidnicious has joined the channel [06:46] level09: thanks [06:46] jetienne: cryptix: answering just in case you felt ignored :) [06:46] Yoric has joined the channel [06:46] sor3nsen: ah sorry crypitx, didnt see you in lue of the chatter [06:47] cryptix: haha thanks :) jetienne [06:47] samyak has joined the channel [06:47] cryptix: guess ill try out then :) [06:47] matjas has joined the channel [06:48] cryptix: oh well [06:48] cryptix: i know a shortcut [06:48] cryptix: it isnt build with -g on my box and i can use --debug [06:48] cryptix: so i guess its for more hardcore debuggin [06:50] sor3nsen: lmao [06:50] pigmej has joined the channel [06:50] sor3nsen: i just saw the nodejs.org again [06:50] sor3nsen: funny to see hash insights on there [06:51] sor3nsen: site must not get updated too often? [06:51] beaucollins has joined the channel [06:51] chapel: sor3nsen [06:51] level09: should socket.io connections be timed out ? [06:51] chapel: yeah, not a lot of job posting [06:52] chapel: Im sure it could pick up [06:52] dgathright has joined the channel [06:52] sor3nsen: well... [06:52] `3rdEden: level09 socket.io uses heartbeats for that [06:52] dsirijus has joined the channel [06:52] `3rdEden: if the heartbeats are out of sync or to slow, socket.io kills the connection [06:52] sirdancealot has joined the channel [06:53] level09: aha so it is all managed by socket.io [06:54] saurabhverma has joined the channel [06:54] level09: the log that I have after running cluster is coming from all node instances ? or just one of them ? [06:55] davidbanham has joined the channel [06:56] sor3nsen: i would assume all, but i am not for sure [06:56] sor3nsen: if you see just one, its probably from the master? [06:57] MrTopf has joined the channel [06:57] JoshC1 has joined the channel [06:58] simenbrekken has joined the channel [06:59] AAA_awright_ has joined the channel [06:59] level09: the thing socket.io is that the number of connections is increasing accumulatively, is that normal ? [06:59] groom has joined the channel [06:59] matyr has joined the channel [06:59] `3rdEden: you are running cluster infront of socket.IO? [06:59] Zelest has joined the channel [06:59] Zelest has joined the channel [07:01] level09: yes [07:02] emattias has joined the channel [07:02] beaucollins: can anybody provide any tips for sending large http.clientRequest bodies? I seem to get response code 400 from anything running apache [07:02] level09: `3rdEden: I have cluster(server).listen(444); then io.listen(server) , is that a correct way ? [07:02] `3rdEden: level09 no [07:02] cognominal has joined the channel [07:02] djcoin has joined the channel [07:02] `3rdEden: you should turn off cluster asap [07:02] viz has joined the channel [07:03] level09: `3rdEden: okay [07:03] michaelhartau has joined the channel [07:03] level09: `3rdEden: how is the correct way to implement that ? [07:03] `3rdEden: cluster is not designed to handle long living connections [07:03] `3rdEden: implement what? [07:03] `3rdEden: multiple processes? [07:05] hardik has joined the channel [07:05] level09: yes [07:05] `3rdEden: if you want multiple processes you probably need to add some pub /sub logic in your code [07:05] `3rdEden: socket.io is designed as single process [07:06] `3rdEden: not as multi process server [07:06] hardik: Hey guys ! I'm having some problems with readSync() [07:06] level09: `3rdEden: so the only way to handle thousands connections is to scale the same machine ? [07:07] `3rdEden: level09 a single process is capable of allocating more than 250K concurrent connections [07:07] fangel has joined the channel [07:07] `3rdEden: (depending on the application you write on top of it ofc) [07:07] level09: `3rdEden: but on which server specs ? [07:07] `3rdEden: but if you need to scale across multiple processes [07:07] `3rdEden: you should either create your own pub/sub layer [07:07] `3rdEden: orrrr [07:07] level09: `3rdEden: my app is very simple, just sending file changes to clients [07:08] `3rdEden: wait for socket.io 0.7 [07:08] `3rdEden: which is designed for multi processes [07:08] `3rdEden: level09 iknow [07:08] level09: `3rdEden: cool, when is that coming ? [07:08] polotek: hardik: ? [07:08] hardik: polotek : Here's some sample code : https://gist.github.com/1018370 [07:09] `3rdEden: we just got a working server -> client connection so it's probably gonna take a week or 2? to finish it up [07:09] level09: `3rdEden: do you think "Forever" might also be causing some issues ? I'm trying now to run the server using plain node server.js [07:09] hardik: polotek: I know I'm doing something stupid but can't figure out what :( [07:09] level09: `3rdEden: I think you should reply to this http://stackoverflow.com/questions/5944714/how-can-i-scale-socket-io [07:10] level09: best answer is advising cluster to scale socket [07:10] polotek: hardik: readSync takes other non-optional parameters [07:10] polotek: you have to tell it how much to read [07:10] hardik: polotek: I tried including them but it keeps giving me the same errors [07:10] polotek: read sync is meant to allow lots of control over how to read data from a file. [07:11] polotek: if you just want the whole file, use readFileSync [07:11] hardik: thing is I want to close the file after reading, so I thought its better to use file descriptors and close it with fs.close() [07:12] tdegrunt has joined the channel [07:12] polotek: hardik: readFileSync does all that for you [07:12] hardik: Oh, so it automatically performs fs.close () ? Sweet! [07:13] zeade has joined the channel [07:13] hardik: polotek: thanks a lot, I guess I'll go ahead with readFileSync .. Actually one more doubt, to avoid hitting the ulimit, is it advisable to go for readFileSync() or should I keep a check on active FDs and then a setTimeout so it doesnt cross ulimit ? [07:15] AvianFlu has joined the channel [07:15] polotek: hardik: if you're using sync operations then you'll probably slow node down enough that it won't be a problem [07:15] polotek: I'm sure people have told you that it's not advisable to use sync operations in node [07:15] __doc__ has joined the channel [07:15] matty has joined the channel [07:15] hardik: polotek: yes ! people have .. so I guess I Can write a function to keep tabs on open FDs right ? [07:16] mAritz has joined the channel [07:16] derferman has joined the channel [07:16] polotek: I don't know much about what you're doing, but I'm not sure you need to do that [07:16] polotek: read up on streams [07:16] polotek: you should be dealing more with data and less with files [07:17] cha0s has joined the channel [07:17] cha0s has joined the channel [07:17] hardik: Right.. actually i'm a bit confused on when to use streams [07:17] polotek: maybe give some more info about what you're trying to achieve [07:17] polotek: all the time :) [07:17] level09: `3rdEden: how do you advice to run the node server ? nohup node server.js & is fine ? [07:17] polotek: once you understand them and how they are built everywhere into node, they are a powerful tool [07:17] level09: or using something like forever ? [07:17] flippyhead has joined the channel [07:17] `3rdEden: forever is fine level09 [07:18] `3rdEden: I don't see any issues in running that [07:18] `3rdEden: it only monitors your process it does not do anything fancy with the incomming connections [07:19] asabil has joined the channel [07:19] sirdancealot has joined the channel [07:20] makuchaku has joined the channel [07:20] petrjanda has joined the channel [07:21] mraleph has joined the channel [07:21] lackac has joined the channel [07:21] Marak has joined the channel [07:21] Marak: got discon [07:21] Marak: hey polotek [07:21] polotek: what up? [07:22] Marak: polotek: hook.io is back and 100x better [07:22] Marak: polotek: and there is a working demo.... [07:22] `3rdEden: it's broken!@ [07:23] Marak: polotek: ive gone full retard with SOA and the erlang philosophy [07:23] mikeal has joined the channel [07:23] Marak: every piece of i/o is delegated to a new process [07:23] polotek: Marak: word. I'll check it out [07:23] Marak: so everything is uber isolated [07:23] Marak: polotek: you gotta run the current demo, its hiliarious [07:23] Marak: https://github.com/marak/hook.io [07:23] Marak: polotek: i already released a working logger hook too, about 4 more [07:24] Marak: gonna publish them all tonight [07:24] level09: hmmm strange, now I have started my server a while ago and everything seems to run smoothly [07:24] level09: getting aroudn 2200 + connections [07:24] Marak: im gonna bang out web and express right now [07:24] Marak: already built a working repl [07:24] Marak: im on fire here [07:25] Marak: huge team effort [07:25] `3rdEden: Marak hook.io is down .. [07:25] Marak: `3rdEden: the website? its non-existant [07:25] `3rdEden: OH [07:25] Marak: i bought the domain again a few days ago, its not pointing anywhere [07:25] `3rdEden: that explains it ;D [07:25] Marak: run the demo at https://github.com/marak/hook.io [07:25] SamuraiJack has joined the channel [07:25] Lorentz: I will try when I go home [07:25] Marak: macos required for sound, although i got a play.js patch ready to merge that will fix that [07:26] Marak: still ironing out some important stuff [07:29] robhawkes has joined the channel [07:30] polotek: Marak: haha, got some wicked typos here son [07:30] Marak: polotek: whats up? [07:31] polotek: mad coding sessions will do that [07:31] polotek: "Waiting for soliders..." [07:31] Marak: polotek: in code, readme, or comments? [07:31] polotek: just output so far [07:31] mikey_p: at least there aren't typos in the GIANT ASCII TEXT [07:31] sg_ has left the channel [07:31] mikey_p: i love me some GIANT ASCII TEXT [07:31] Marak: mikey_p: thanks for reminding me [07:32] Marak: mikey_p: gotta create an asciimo hook [07:32] mikey_p: you should add that to kohai [07:32] Marak: polotek: the demo is contrived, im putting together a real one now, i gotta build about 6 new modules first [07:32] mikey_p: then watch people complain ;) [07:32] Marak: mikey_p: hooks [07:32] Marak: mikey_p: its all hooks now, everything [07:32] Marak: ive changed the game [07:32] Marak: and gone process crazy [07:32] Marak: im gonna spawn a new process for EVERY piece of I/O i want to do [07:32] Marak: take that [07:33] Marak: distributed up the ass [07:33] polotek: this demo is hot [07:33] Marak: polotek: check out my github, look what i created tonight [07:33] Marak: polotek: 100s of modules inc [07:33] Marak: https://github.com/Marak/hook.io-repl/blob/master/lib/repl [07:33] Remoun has joined the channel [07:34] Marak: https://github.com/Marak/hook.io-logger/blob/master/lib/logger.js [07:34] Marak: https://github.com/Marak/hook.io-repl/blob/master/lib/repl.js [07:34] Marak: oops [07:34] Marak: thats wrong [07:34] mraleph has joined the channel [07:34] Marak: still ironing out namespaces [07:34] Marak: its all there though [07:34] cognominal has joined the channel [07:36] hardik: polotek: sorry was AFK .. Yep, taking a look into streams.. Thanks a lot ! [07:37] swhit has joined the channel [07:38] Marak: polotek: you see how this works with the many to many upstreams and downstreams? [07:38] RORgasm has joined the channel [07:38] Marak: polotek: each hook can have multiple listening servers and multiple outgoing connects, all of these are bi-directional too... [07:39] Marak: its an i/o process party [07:39] Marak: everyone is invited [07:39] polotek: Marak: hook-io-logger needs to add winston as a dep [07:39] Marak: polotek: i havent packed any of the addons yet [07:39] Marak: polotek: on puprose [07:39] Marak: still sorting it out [07:39] Marak: gonna try to release the first set tonight if i dont pass out [07:40] Marak: this is all 0-hour stuff [07:40] polotek: too many terminals [07:40] Marak: polotek: so there is a .spawn() method that i didnt implement yet, but its there [07:40] hellp has joined the channel [07:40] Marak: for providing a list of upstreams ( children hooks ) that will auto-spawn and connect [07:40] Marak: you pass it an array of hook names , etc [07:40] Marak: magic [07:41] Marak: uses forever programatically [07:41] dgathright has joined the channel [07:41] RORgasm: hey guys [07:41] RORgasm: something really weird is going on with npm right now for me [07:41] stephank has joined the channel [07:41] RORgasm: i'm trying to publish an update for a package [07:41] aabt has joined the channel [07:41] RORgasm: and i keep getting this error: TypeError: Cannot call method 'filter' of undefined [07:43] RORgasm: anyone have any dieas [07:43] RORgasm: this is really weird [07:43] polotek: Marak: I don't understand the repl [07:43] RORgasm: even trying to install my package locally is giving me this error [07:43] polotek: can i connect remotely, is that what's going on? [07:43] blaenk: stupid noob question. is there a way to test a socket.io server from the terminal? like with telnet or something? [07:43] Marak: polotek: you connect the repl to your hook.io cloud as an upstream [07:43] blaenk: or curl [07:43] gausby has joined the channel [07:43] Marak: polotek: then you can type stuff like: hook.emit('out.fuck', 'yeah'); [07:44] Marak: polotek: does that make sense? [07:44] `3rdEden: blaenk sure, you can do a curl request to a XHR end point [07:44] polotek: hardik: what this space http://twitter.com/polotek. I'm going to write a blog post about streams this weekend [07:44] polotek: been meaning to forever [07:44] masylum: morning [07:44] `3rdEden: like example.com/socket.io/xhr-polling/ [07:44] [AD]Turbo has joined the channel [07:45] polotek: hardik: s/what/whatch/ [07:45] polotek: s/whatch/watch/ [07:45] polotek: I need to have a bot that will run my messages through "dumbass" filters before posting [07:45] pigmej: Marak: hook.io seems awesome:) [07:46] polotek: Marak: how do I "connect my repl" [07:46] _derferman has joined the channel [07:46] hardik: polotek: Thanks a lot :) Following you now :) [07:46] Marak: polotek: you need to start a downstream ( aka a server ) [07:46] Marak: polotek: so like, node hooks/battle [07:46] Marak: then [07:46] Marak: node hooks/repl [07:46] blaenk: `3rdEden: guess that's over my head. new to node, so I'd have to set up a route with like connect or something? [07:46] Marak: pigmej: thanks, its been a long time in the making [07:46] `3rdEden: blaenk no [07:46] polotek: my battle is still running [07:46] Marak: polotek: so connect your repl to it [07:46] Marak: node lib/repl i guess [07:47] zomgbie has joined the channel [07:47] `3rdEden: blaenk that is an point where xhr-polling based browser connections connect to [07:47] Marak: it should prompt you with hook: [07:47] Marak: or something [07:47] blaenk: ohhh so that url exists, okay I'll try it thanks [07:47] `3rdEden: yes [07:47] `3rdEden: socket.io generates those [07:47] blaenk: thank you! [07:47] adambeynon has joined the channel [07:47] polotek: ah, so the repl is connected to battle [07:47] Marak: polotek: 10-4, its an actor [07:47] MonsieurLu has joined the channel [07:47] Marak: or something [07:48] polotek: message throws errors though [07:48] Marak: polotek: no clue, you are using all unreleased modules [07:48] Marak: but its kinda working! [07:48] Marak: ;-) [07:48] Marak: the message passing should be working [07:48] Marak: prob just a syntax bug [07:48] RORgasm: what the hell [07:48] RORgasm: really confused here [07:48] Marak: RORgasm: sup? [07:49] RORgasm: getting this npm error when i try to publish my pacakge [07:49] RORgasm: just want to update it [07:49] blaenk: `3rdEden: I'm pretty sure I can look up the rest of this stuff, but can you please clarify, like what exactly would I do with the xhr-polling url. I curled it and did get a response, but I'm wondering how I can send a 'message' for example [07:49] Marak: RORgasm: whats your npm -v report? [07:49] polotek: Marak: TypeError: Object # has no method 'input' [07:49] RORgasm: 1.0.1rc7 [07:49] `3rdEden: blaenk if you want that you need to create a special client [07:49] Marak: polotek: thats wrong, prob something i havent pushed or something [07:49] blaenk: ohh okay, thanks :) [07:50] `3rdEden: as socket.io requires your messages to be encoded [07:50] RORgasm: Marak: i'm getthing this error : TypeError: Cannot call method 'filter' of undefined [07:50] Marak: polotek: not sure which modules you are using / what state you are in. ill release all these soon, then you can test yeah [07:50] tshpaper has joined the channel [07:50] `3rdEden: blaenk there are already a few node clients who do that for you [07:50] Marak: RORgasm: can you type any npm commands without that error? [07:50] RORgasm: not erally [07:50] RORgasm: i can't install [07:50] Marak: polotek: its all 0-day right now, when i publish to npm it should work [07:50] blaenk: `3rdEden: yeah I was wondering if there'd be a node client that would allow for something like this but I wasn't sure what exactly to search for [07:50] polotek: blaenk: socket.io connections speak via a protocol [07:50] RORgasm: npm install is iving me that error [07:50] uchuff has joined the channel [07:50] Marak: RORgasm: uninstall npm , reinstall [07:50] polotek: presumably the websockets protocol, but I actually don't know if it also speaks other stuff [07:51] RORgasm: this was working yesterday, and i haven't updated npm since then [07:51] `3rdEden: https://github.com/remy/Socket.io-node-client [07:51] blaenk: thanks I'll look into it [07:51] [AD]Turbo: hi there [07:51] RORgasm: Marak: crap...how do i uninstall npm? [07:51] level09 has joined the channel [07:52] polotek: you should be able to speak to a socket.io server with the raw WebSocket client in the browser right? [07:52] Marak: RORgasm: i think you can start nuking directories, maybe you should clone source and run MAKE UNINSTALL or something [07:52] `3rdEden: polotek yup [07:52] RORgasm: clone npm source [07:52] polotek: RORgasm: I don't think you need to uninstall [07:52] davidbanham: Marak: RORgasm - make uninstall is the way I've found to be simplest [07:52] polotek: just run the hard install again [07:52] `3rdEden: if you encode your messages [07:52] level09_ has joined the channel [07:52] RORgasm: polotek: k [07:52] polotek: curl http://npmjs.org/install.sh | sh [07:52] `3rdEden: and respond to heart beats * [07:53] polotek: RORgasm: or if you installed from local source, [07:53] polotek: cat scripts/install.sh | sh [07:54] polotek: Marak: this is nice [07:54] Marak: polotek: :-) [07:54] Marak: polotek: I think it's the best work I've ever done [07:54] Marak: and its a huge team effort [07:54] polotek: I'm gonna check out the code this weekend [07:54] Marak: much love to the team [07:54] polotek: hit me up [07:54] polotek: I wanna do something with it [07:55] Marak: polotek: im at the hack haus all weekend [07:55] polotek: ok, so when the hooks "connect" [07:55] polotek: it's really just registering a pub/sub listener right? [07:55] Marak: polotek: essentially [07:55] RORgasm: polotek: the curl is failing for me [07:55] Marak: polotek: except its all the EventEmitter, im too stupid to understand pub sub [07:56] Marak: polotek: and you get namespaced events ( channels ) since its EventEmitter2 [07:56] Marak: wildcards.... [07:56] polotek: eventemitter is pub/sub :) [07:56] Marak: yeah, but this is EventEmitter across processes [07:56] Marak: multi-process eventemitter with namespaces [07:56] RORgasm: polotek: Marak acutally i think the curl install worked for me but i did ge this error Could not create /opt/local/lib/node_modules/___npm.npm [07:56] polotek: yep [07:56] Marak: bad, ass [07:57] RORgasm: npm -v now gives me 1.0.10 [07:57] Marak: im gonna rewrite EVERYTHING to use this [07:57] Marak: it would be stupid NOT to [07:57] Marak: kohai is the first victim [07:57] Marak: im like half way there [07:57] polotek: RORgasm: the /opt dir probably requires sudo [07:57] Marak: i gotta add a config.json file for each hook using nconf, that is key [07:57] dnuke has joined the channel [07:57] RORgasm: polotek: but did it install properly? i think it might have [07:57] RORgasm: polotek: the npm directory is fine [07:58] polotek: RORgasm: not sure [07:58] Marak: with that data i can actually serialize the state of the graph with a central persistence layer [07:58] RORgasm: polotek: ah i mean the version it got update [07:58] Marak: without* [07:58] RORgasm: dammit [07:58] RORgasm: i'm still getting that error [07:59] cryptix: is there something like process.demonize() or .background() ? [07:59] OomElvis has joined the channel [07:59] MrTopf_ has joined the channel [07:59] tanepiper has joined the channel [08:00] cryptix: i want to wait for node to initialize some stuff before the init script of my device starts other processes so they can connect to node [08:00] polotek: RORgasm: ping izs on twitter. he loves to solve problems like this [08:00] cryptix: if i do node app.js & it goes on to fast [08:00] level09: why is socket sending some werid number when the server crashes ? [08:00] level09: is there anyway to prevent that ? [08:00] cognominal has joined the channel [08:01] polotek: cryptix: post some code here to show what you're talking about [08:02] cryptix: polotek: okay [08:02] polotek: level09: define "sending weird number" [08:02] level09: i have a socket.broadcast(data) in my app, data is being read from a file [08:02] level09: when my server crashes [08:02] level09: i get a number like 234234878388 [08:03] level09: this number is pushed to all clients [08:03] cryptix: polotek: https://gist.github.com/1018432 [08:03] cryptix: the tcp server is for another process connecting to it [08:03] jeremyselier has joined the channel [08:04] RORgasm: polotek: i just pinged him on twitter, i'm just really confused beacause i didn't see this issue at all up until 15 mintues ago when i tried to publish another version of a package i own [08:04] cryptix: when the divce boots up and i do node app.js& \noldfuckedupdaemon &.. node isnt ready yet to accept the tcp connection [08:05] cryptix: so id like to do process.background() after the app.liste() tcp.listen() [08:05] pyrony has joined the channel [08:05] xsyn has joined the channel [08:05] __tosh has joined the channel [08:08] polotek: cryptix: I'm confused, why don't you just use 2 terminals [08:08] stonebranch has joined the channel [08:08] polotek: and wait for the node one to respond first [08:08] cryptix: polotek: i can do that for testing of course [08:09] polotek: you can't connect to a server until it starts listening. nothing you can do about that. [08:09] polotek: or am I missing something about what you're getting at? [08:09] cryptix: i know that [08:09] polotek: level09: did you get anywhere with your issue? [08:09] polotek: I don't know much about socket.io [08:09] polotek: ACTION is the only loser who doesn't really use it for anything [08:10] cryptix: im trying to figure out a way to boot up the services automatically [08:10] level09: not really, still cant figure out why the server crashes at 2500+ connections [08:10] cryptix: i could spawn subprocesses from node but.. [08:10] `3rdEden: level09 stop sending buffer objects? [08:10] `3rdEden: and send strings or objects instead.. [08:10] Xano has joined the channel [08:10] Yoric has joined the channel [08:10] level09: `3rdEden: I have actually added data.toString() [08:11] level09: as u adviced [08:11] `3rdEden: .toString('utf8') [08:11] `3rdEden: :D? [08:11] cryptix: id like to have it in a simple shell script and node backgrounding once its ready to accept connections [08:11] `3rdEden: See if that helps [08:11] level09: eh :D [08:11] level09: okay [08:11] level09: thanks [08:11] `3rdEden: works? [08:11] level09: need to wait for the next crash now :D [08:11] RORgasm: polotek: i don't use socket.io :) [08:11] RORgasm: polotek: but i do use faye...and i love it :) super simple [08:12] cryptix: so i dont have to hack node app.js& sleep randomtimethatshouldfit; ./serviceThatDependsOnNodeAcceptingTheConnection [08:12] polotek: cryptix: oh I see [08:12] cryptix: :) okay [08:12] tomtomaso has joined the channel [08:12] polotek: I don't think node has support built in for daemonizing a process [08:12] polotek: take a look at https://github.com/theteam/node-daemon [08:13] cryptix: thanks ill have a look at it [08:13] msucan has joined the channel [08:13] polotek: cryptix: but honestly even when you do that, it'll take node more than 0 time to start listening [08:13] aliem has joined the channel [08:13] level09: `3rdEden: no need to specify the length ? toString('utf8',0,lenght) ? [08:13] `3rdEden: nope [08:14] polotek: usually you have the dependent service retry connections after some delay [08:14] cryptix: polotek: i know :) i do it manually atm [08:14] level09: great , gonna try it now [08:14] cryptix: process.daemonize() or somehting would just have been really handy [08:14] polotek: so the serviceThatDependsOnNodeAcceptingTheConnection [08:15] `3rdEden: just add a console.log above your broadcast to see what kind of data you are actually sending.. [08:15] polotek: would do something like while(!connectToNode) sleep(10); [08:15] cryptix: polotek: yeah.. problem is that service is a old piece of shit.. id really dislike hacking on it... they solved async problems with lots of threads and global variables that depend on each other [08:16] polotek: cryptix: fun [08:16] cryptix: replacing the old serial port code with a kinda decent socket was a nightmare in itself [08:16] cryptix: indeeed [08:16] RORgasm: hmm looks like i won't here from ics till morning [08:16] RORgasm: off to bed then [08:16] RORgasm: later guys [08:16] polotek: RORgasm: sorry we couldn't be more help [08:16] RORgasm: no worries [08:16] RORgasm: you guys are awesome [08:16] polotek: debugging via text is hard [08:16] RORgasm: :) [08:17] polotek: cryptix: you could also do a few things to help [08:17] polotek: start your tcp listener much earlier [08:18] polotek: and have it queue up data from the remote service until the websocket spins up [08:18] cognominal has joined the channel [08:19] polotek: check out the BufferedStream [08:19] polotek: https://github.com/mikeal/morestreams [08:19] polotek: it's basically a convenient helper stream that will buffer your data until you're ready [08:20] cryptix: that sounds like a really handy tool. i was thinking about how to solve that problem [08:20] FireyFly|n900 has joined the channel [08:20] masylum: http://tinyclouds.org:8000/chat.html [08:20] polotek: make sure to give mikeal feedback on how it did or did not help solve your problem [08:21] polotek: we've been working on developing helpful custom streams like this [08:21] cryptix: but the initial startup of node is still kinda slow.. the device isnt thaaat fast but once its up doing its job fine [08:21] cryptix: [root@T0904] : echo "" > empty.js [08:21] cryptix: [root@T0904] : time node empty.js [08:21] cryptix: real0m 3.92s [08:21] cryptix: user0m 3.70s [08:22] cryptix: its really not that much of a problem if i could demonize after .listen() but well.. i guess ill find a way [08:22] polotek: real 0m0.065s [08:22] polotek: user 0m0.048s [08:22] polotek: sys 0m0.016s [08:22] gozala has joined the channel [08:22] cryptix: maybe add it myself as a last resort [08:22] polotek: cryptix: your'e doin it wrong :) [08:22] cryptix: [ceeP][~] echo "" > empty.js && time node empty.js [08:22] cryptix: node empty.js 0.17s user 0.01s system 100% cpu 0.178 total [08:22] cryptix: :p [08:22] polotek: not sure why yours would be taking so long [08:23] polotek: what version of node are you using? [08:23] cryptix: its a arm device [08:23] cryptix: v0.4.8 [08:23] cryptix: it just takes some time to boot up v8 on that i think [08:23] polotek: cryptix: ah, yeah that might explain it [08:24] polotek: cryptix: does it take that long to boot the v8 shell also? [08:24] cryptix: like just the node repl? [08:24] polotek: no I mean just v8. I don't know much about the device [08:24] polotek: v8 comes with a plain js shell [08:25] xsyn has joined the channel [08:25] cryptix: hmm i dont use a shared v8 and i just saw falling out node and node-waf falling out after make install but maybe im blind again [08:25] cryptix: hm.. js: not found [08:25] cryptix: where could it hide? [08:26] polotek: build the v8 that comes with node separately [08:26] polotek: node-src-dir/deps/v8/ [08:27] polotek: cd there I mean [08:27] polotek: then run "scons" [08:27] cryptix: yeah i know what you mean [08:27] polotek: which will try to build it [08:27] cryptix: okay [08:27] polotek: that should give you the v8 shell [08:27] polotek: which I think is called "d8" [08:27] matty has joined the channel [08:28] cryptix: meh.. dont have access to the build machine currently [08:28] cryptix: but ill try and see [08:28] hebz0rl has joined the channel [08:31] cryptix: bufferedStreams looks nice but it uses heap space to store the chinks temporarily right? [08:31] cryptix: but the principe is cool [08:32] level09: why is node not suitable for AI stuff like neural networks ? [08:32] level09: i thought its a high performance thing [08:32] gozala has joined the channel [08:32] cryptix: im not an export but i think for AI and networks you want parallelism [08:33] cryptix: which node cant do by design (single event loop) [08:33] hassox has joined the channel [08:33] cryptix: but it might depend on the kind of nerwork [08:33] khrome_ has joined the channel [08:33] markwubben has joined the channel [08:34] hybsch has joined the channel [08:34] mape: ryah: someone broke the chat [08:34] jetienne: the dog did it! [08:35] polotek: cryptix: what do you mean "uses heap space"? [08:35] xavl: hi, @cryptix, i was reading and wondering: what do you mean by "kind of network" [08:35] jetienne: french joke, but not so bad as ryah was in paris 2days ago [08:35] polotek: it just keeps a local array. it shouldn't really be a lot of data [08:35] level09: cryptix: so it is just the parallelism , that can be resolved now with multi-node processes [08:35] level09: no ? [08:36] polotek: I gotta run [08:36] polotek: take it light guys [08:36] level09: my piont was , if the computational speed is really high, it should be a good choice [08:36] cryptix: polotek: yeah. the local array is on v8's heap, right? in case one want a lot of data you might want buffers but well [08:36] cryptix: okay thanks for the suggestions polotek [08:37] polotek: cryptix: cheers [08:37] polotek has left the channel [08:38] Murugaratham has joined the channel [08:42] Bj_o_rn has joined the channel [08:43] mc_greeny has joined the channel [08:43] cryptix: level09: as i said im not an expert but i think its a question of 'the right tool for the job' [08:43] cryptix: ie. you can also build a house with a fork [08:43] level09: lol [08:44] level09: ur right [08:44] cryptix: gotta run to.. 7hr trainride yeeeey [08:44] cryptix: hope the wifi isnt broken this time [08:46] tomtomaso has joined the channel [08:47] blueadept: how can i pass res through function? [08:47] blueadept: like if i have a function that has a res in it, how do i pass that to the callback properly without getting a 'res is not defined' [08:48] matyr has joined the channel [08:48] cryptix: blueadept: its always easier to follow ideas with some code. even if they are broken :) [08:48] cryptix: but i gotta run but someone will help [08:49] blueadept: ha, np, one sec [08:49] blueadept: http://pastie.org/private/2muhs5kxhixtub7dmzrr3w [08:50] blueadept: i'm getting a 'res is not defined' when the function routes to the correct area [08:52] mscdex: blueadept: incomplete gist detected. where is res defined?? [08:53] blueadept: ah ok, http://pastie.org/private/2muhs5kxhixtub7dmzrr3w [08:53] blueadept: attached it to the bottom [08:53] sfoster has joined the channel [08:53] blueadept: do have to pass the res in there too? [08:56] ebryn has joined the channel [08:56] mscdex: blueadept: yes, because they're different scopes [08:56] asabil has joined the channel [08:56] mscdex: just pass in res instead of res.params.id [08:56] mscdex: and use it that way [08:57] blueadept: well wait, that's req.params [08:57] blueadept: not res [08:57] mscdex: oh oops, it's late [08:57] mscdex: yeah, you'll have to pass res in [08:57] blueadept: ha [08:58] blueadept: i tried passing res as a third argument, but that doesn't make it wokr [09:00] blueadept: wait do i ahve to pass the res and do some sort of this.res = res thing? [09:00] mscdex: blueadept: https://gist.github.com/b03753a663d1cf95e0b1 [09:00] FireFly has joined the channel [09:00] mscdex: you're missing a callback too btw [09:00] blueadept: oh wait yeah [09:02] NuckingFuts has joined the channel [09:02] troessner has joined the channel [09:03] level09: this cluster seems to work fine with socket.io for me :s [09:03] level09: I can reach up to 3000+ conc connections [09:03] level09: now [09:03] NuckingFuts: Ugh I'm liking my own UI lib more than anyone I've used before, and it's only 5 lines in still XD [09:03] `3rdEden: cluster as in Cluster? [09:03] level09: yes, cluster = require('cluster') [09:03] `3rdEden: if thats the case, use a browser that doesn't support websockets [09:03] level09: :) [09:04] `3rdEden: like opera [09:04] `3rdEden: or firefox without flash installed [09:04] level09: `3rdEden: well, most my clients seem to use jsonp polling or xhr multipart [09:04] level09: `3rdEden: speaking of that, how do I configure flash socket fallback ? [09:04] level09: on FF it always goes to xhr-multipart [09:04] level09: althugh I have flash installed [09:05] `3rdEden: and do you a see a load of :Couldnt find client with session id 90283901879870987 [09:05] McMAGIC--Copy has joined the channel [09:05] level09: yes [09:05] `3rdEden: thats because you use cluster [09:05] `3rdEden: now you know why i told you not to use cluster ;D [09:05] level09: but it was even without cluster [09:05] dgathright_ has joined the channel [09:05] level09: I get that occasionally [09:06] blueadept: mscdex: awesome, it works! [09:06] `3rdEden: thats what you get when the last connection isn't answered by the same server the connected started with [09:06] level09: `3rdEden: how do I get flash fallback to work ? do I have to do something special ? or configure swf files ? [09:06] `3rdEden: level09 depends on your app [09:06] `3rdEden: got a url? [09:06] level09: for the client ? or the server? [09:06] `3rdEden: to the live server? [09:06] stonebranch has joined the channel [09:06] `3rdEden: combination of both [09:07] level09: the server side you already have it [09:07] level09: i have placed the socket scripts at the bottom , not to slow down the site [09:08] polyrhythmic has joined the channel [09:08] markwubben has joined the channel [09:09] fille12 has joined the channel [09:09] fille12: look what i did [09:09] fille12: hello [09:09] eventualbuddha has joined the channel [09:09] fille12: http://www.mynodejs.com:9000/client [09:10] replaca has joined the channel [09:11] hebz0rl has joined the channel [09:11] bzinger has joined the channel [09:11] fille12: no one here? [09:12] piscisaureus has joined the channel [09:12] pigmej: fille12: what's that? [09:12] adambeynon has joined the channel [09:13] confoocious has joined the channel [09:14] zbal has joined the channel [09:14] jetienne has joined the channel [09:14] mscdex: pigmej: i dunno, but i tried entering the Konami code and got nothing [09:16] `3rdEden: konami codes ftw! [09:16] guybrush: yournodejs.com? [09:19] m00p has joined the channel [09:19] hybsch has joined the channel [09:20] boehm has joined the channel [09:22] DJazz has joined the channel [09:23] alessio_alex: hey there [09:23] matyr has joined the channel [09:24] fille12: just needed a domain [09:24] fille12: nothing offical [09:25] arpegius has joined the channel [09:25] FireFly|n900 has joined the channel [09:26] fille12: pigmej the server heapused expressed in with a canvas [09:27] hide_ has joined the channel [09:28] fille12: no commnets? [09:30] thalll has joined the channel [09:30] blueadept: anyone here strictly use coffeescript, or is that just a ruby crossover deal? [09:30] blueadept: i dont mind writing closures, i dont see what the big deal is [09:31] pigmej: fille12: I don't understand :D [09:31] squeese has joined the channel [09:32] fille12: well it takes the HeapUsed from the node.js and sending it to the client [09:32] fille12: the canvas takes the results in a digram [09:33] hojberg has joined the channel [09:33] pigmej: ah [09:33] fille12: just image if the data was financel information, instead of using java aplet [09:33] Neil has joined the channel [09:33] S1kx has joined the channel [09:33] fille12: u can use node.js and a html5 [09:34] herbySk has joined the channel [09:39] ebryn has joined the channel [09:39] slickplaid has joined the channel [09:40] raz has joined the channel [09:40] stebbew has joined the channel [09:40] stebbew: hello [09:41] stebbew: how can i get the first 'object' in a line recieved from a server socket (sorry, not good with js), like "abc 123 dfvdefgv ef" , i need to get the first part, save it as a var, then the rest [09:43] sirdancealot has joined the channel [09:44] matty_ has joined the channel [09:45] Esteb has joined the channel [09:45] romainhuet has joined the channel [09:47] eventualbuddha has joined the channel [09:48] xsyn has joined the channel [09:48] boazsender has joined the channel [09:49] Emmanuel__: stebbew: you want to get "abd" ? [09:49] Emmanuel__: abc * [09:50] ewdafa has joined the channel [09:50] stebbew: yes [09:50] stebbew: then the rest as a var [09:50] stebbew: so two vars [09:50] stebbew: if im speaking js correctly lol [09:51] SubStack: line.split(/\s+/)[0] [09:51] stebbew: ok, so thats the first 'word' how to grab the rest ? [09:51] SubStack: var theRest = line.match(/[^\s]+\s+(.+)/)[1] [09:52] stebbew: beautiful! [09:52] stebbew: thanks alot [09:52] SubStack: oh actually [09:52] SubStack: var theRest = line.match(/^\S+\s+(.+)/)[1] [09:52] stebbew: thats regex? [09:52] SubStack: yes [09:54] fangel has joined the channel [09:56] ditesh|cassini has joined the channel [09:56] Dreamer3 has joined the channel [09:57] insin has joined the channel [09:57] zbal: hi guys - is there any way to get a list of all available functions in a module ? (beginner) [09:59] insin: just a list? require it in the REPL. Otherwise, locate the friendly manual or view source [10:01] d0k has joined the channel [10:01] zbal: thanks [10:02] fairwinds has joined the channel [10:08] kixxauth has joined the channel [10:11] NetRoY has joined the channel [10:12] Shinuza has joined the channel [10:15] Twelve-60 has joined the channel [10:16] philippkueng has joined the channel [10:16] davro has joined the channel [10:16] blueadept: i need to get more socket.io xp [10:16] blueadept: just too busy with other shiz [10:21] Ian_Corne: :) [10:21] blueadept: what's the difference between naming something a var, and just leaving var out? [10:21] blueadept: like var num = 1, and just num = 1 ? [10:21] Ian_Corne: if you var x = 2 [10:22] Ian_Corne: you shadow the previous var x [10:22] Ian_Corne: i think [10:22] Twelve-60 has joined the channel [10:23] insin: var declares it in the current function scope, if you're in one [10:24] pen has joined the channel [10:24] SubStack: ryah: feature request: [10:24] insin: if you have 2 functions which are using, for example... i as a loop index, neither declared it with var and one calls the other in a loop body... not so good [10:25] SubStack: how else can I spam it with ascii art? [10:26] tmpvar_ has joined the channel [10:28] blueadept: i see [10:28] davro: From what I understand ? If you declare a variable, without declaring (creating) using "var", the variable always becomes GLOBAL. [10:28] squeese has joined the channel [10:29] liar has joined the channel [10:31] Dve_ has joined the channel [10:33] tmpvar__ has joined the channel [10:34] Poetro has joined the channel [10:34] okuryu has joined the channel [10:36] cognominal has joined the channel [10:38] simenbrekken has joined the channel [10:40] __tosh has joined the channel [10:45] stebbew: has no method 'split' [10:47] antw has joined the channel [10:47] sreeix has joined the channel [10:48] matyr has joined the channel [10:53] tmpvar_ has joined the channel [10:53] jeedey: I have a node script, very small and simply that relies mostly on connect-js, not much advanced functionality at all, when putting it onto another platform server it runs but the app.get regexes dont match the same, ive checked that its not changed? [10:55] materialdesigner has joined the channel [10:57] DJazz has left the channel [11:02] thoolihan has joined the channel [11:04] F1LT3R has joined the channel [11:05] Xano has joined the channel [11:05] Shinuza: davro: correct [11:05] xsyn: Is anybody running a web app with autentication and roles? [11:05] xsyn: Can thet point me in they right direction to set someting up [11:05] hoodow has joined the channel [11:05] hoodow has joined the channel [11:06] Bwen has joined the channel [11:06] slickplaid: xsyn: What's the issue you're having? [11:06] xsyn: I'm not sure I understand the conceptual stuff :) [11:06] xsyn: I can authenticate a user in couch [11:06] xsyn: no problem [11:07] xsyn: How should I set up the roles for that user [11:07] xsyn: on each page route, check the user to see if they have a role of a specific type [11:07] Bwen: ohhh so its a Role Playing Server? :D [11:07] xsyn: and then do an else if ? [11:07] jaket has joined the channel [11:08] xsyn: Well, I want some users to be able to see pages other users can't [11:08] ithildin has joined the channel [11:09] slickplaid: xsyn: With expressjs? I'd use middleware on the routes you need to check, assign permissions to the role in the database, query the db for that user, what roles they have and what permissions each role has. Then restrict/reroute if not sufficient. That's kinda how I do it. [11:09] jamescarr has joined the channel [11:09] xsyn: slickplaid: Cool, thanks [11:10] xsyn: then I was on the right route, as it were [11:10] xsyn: the express documentation isn't always that clear though [11:10] Bwen: whats an Express Documentation? [11:10] Bwen: it was wrote too quickly? [11:11] slickplaid: xsyn: app.get('/', checkPermissions(), function(req,res){ do something here if allowed }); [11:11] aron_ has joined the channel [11:11] slickplaid: checkPermisisons function used as a sort of ad-hoc middleware for that route. [11:13] slickplaid: If it is allowed, call next(); if not, make an error and pass it along the stack. next(new Error('not allowed')); [11:13] m00p has joined the channel [11:13] unlink has joined the channel [11:13] unlink has joined the channel [11:13] slickplaid: xsyn: http://expressjs.com/guide.html#passing-route control [11:14] dyer has joined the channel [11:14] dyer has joined the channel [11:14] fly-away has joined the channel [11:16] tmpvar_ has joined the channel [11:16] slickplaid: xsyn: OH, forgot... don't pass the function in the route as isAllowed(), pass it as the function object `isAllowed` vs `isAllowed()` [11:16] slickplaid: http://expressjs.com/guide.html#route-middleware [11:17] xsyn: slickplaid: You're awesome, thanks for the help [11:17] slickplaid: No problem :) [11:19] aperiodic has joined the channel [11:20] cincinnatus: does anyone have any idea why my socket.io clients disconnect and reconncet every 20 seconds or so for no reason when i run my app on a Linode VPS? [11:20] Wizek has joined the channel [11:20] cincinnatus: it's been driving me insane. [11:21] jemeshsu has joined the channel [11:21] hachque has joined the channel [11:23] slickplaid: cincinnatus, what message transport are they using? And are you sure they're using sockets and not falling back to xhr polling? [11:24] cincinnatus: slickplaid, it happens with all transports :( [11:25] mohiam has joined the channel [11:26] cincinnatus: slickplaid: the thing is, everything is fine when i run the app locally. [11:29] qbyt has joined the channel [11:31] Mrfloyd has joined the channel [11:33] guy has joined the channel [11:33] eldar_ has joined the channel [11:35] saschagehlich has joined the channel [11:35] Druide_ has joined the channel [11:37] tmpvar_ has joined the channel [11:38] Mrfloyd has joined the channel [11:38] groom has joined the channel [11:38] adambeynon has joined the channel [11:40] mraleph has joined the channel [11:40] aron_ has joined the channel [11:42] bzinger has joined the channel [11:46] piscisaureus has joined the channel [11:49] matjas has joined the channel [11:49] `3rdEden: Anyone here ever experianced a `build task failed` while building node? [11:49] `3rdEden: it's bitching about SSL_COMP_get_compression_methods [11:50] davro: mac osx ? [11:51] Bwen: anyone know I get this error: http://pastebin.com/M6Qcyjsr i'm trying to sys.inherits from Events Emitter [11:51] davro: 3rdEden: ? [11:52] `3rdEden: yup davro [11:53] davro: 3rdEden: http://stackoverflow.com/questions/6118711/error-install-nodejs-ssl-comp-get-compression-methods [11:53] Shinuza: Bwen: there's a typo in there [11:53] `3rdEden: maybe it's because Im using 1.0 [11:53] Shinuza: Bwen: events.EnventEmitter [11:53] Shinuza: envent [11:53] devrim has joined the channel [11:53] raz has left the channel [11:53] `3rdEden: Oh davro thanks, i'll check it out [11:53] `3rdEden: forgot about the configure flags :p [11:54] Marak: slow night, i only published 4 new npm modules [11:54] sveimac: Anyone want a ticket for nodecamp.eu? [11:54] xandrews has joined the channel [11:54] Marak: sveimac: plane ticket too? :-) [11:55] sveimac: hehe, nop Marak [11:55] sveimac: just entrance :P [11:55] `3rdEden: sveimac ping @nodecampeu on twitter [11:55] `3rdEden: they know people who need it [11:55] sveimac: okies [11:55] Bwen: thx guys, sometimes its hard to spot our own typos :P [11:56] edude03 has joined the channel [11:56] maushu has joined the channel [11:56] sreeix has joined the channel [11:59] matyr has joined the channel [12:02] abraham has joined the channel [12:06] piscisaureus_ has joined the channel [12:08] cole has joined the channel [12:09] JoshC1 has joined the channel [12:11] ap3mantus has joined the channel [12:14] guyguy has joined the channel [12:15] emattias_ has joined the channel [12:17] H2S04 has joined the channel [12:18] ryanmcgrath has joined the channel [12:19] tim_smart: Marak: Looking at your namespaced eventemitter. You could probably compile the event names to regex's to make the implementation cleaner. [12:19] nonnikcam has joined the channel [12:20] Marak: tim_smart: https://github.com/hij1nx/EventEmitter2 pull request please [12:20] Marak: :-) [12:20] Marak: tim_smart: what do you think about the new hook.io? [12:20] tim_smart: Sure, I guess. [12:20] dyer has joined the channel [12:20] dyer has joined the channel [12:20] Marak: its a completely radical new design from our old tinkering days [12:21] Marak: i gotta put the website back online, maybe this weekend [12:21] tim_smart: Marak: Only glanced at it. [12:21] Marak: tim_smart: i just updated the readme a whole shit ton [12:21] Marak: https://github.com/marak/hook.io [12:21] Marak: theres like 6 new hooks floating around too [12:21] Marak: repl and logger should be working and on npm [12:22] Marak: to sleep, or to release another module [12:22] Marak: what to do, what to do [12:23] Marak: tim_smart: with the new design, its insanely easy to write new hooks, like 2 lines minimal [12:23] Marak: and then you just emit events [12:23] tim_smart: Great [12:24] Marak: im sure its the sleep deprivation, but i think this might be the best work ive ever done. would not be possible without a shit ton of input and libraries from the whole community [12:24] slickplaid: Oops! Google Chrome could not connect to hook.io [12:24] Marak: been 2 years in the making [12:24] sirkitree has joined the channel [12:24] tim_smart: Node hasn't been around 2 years right? [12:25] Marak: tim_smart: started this idea before node lol [12:25] tim_smart: Oh right [12:25] Marak: tim_smart: same as nodejitsu [12:25] Marak: before node came around we were trying the same shit with ruby [12:26] Marak: any python [12:26] Marak: :-( [12:26] Marak: and* [12:27] SeyZ has joined the channel [12:27] hellp has joined the channel [12:27] adambeynon_ has joined the channel [12:29] `3rdEden: quit yay going to nodecamp [12:29] xerox: forgot a slash [12:30] fumanchu182 has joined the channel [12:30] Shinuza has joined the channel [12:31] tim_smart: Marak: You could make hooks a duplex instance of Stream [12:31] Marak: tim_smart: hrmm? [12:32] davro: will be playing around with hook.io later :) oohh errr [12:32] Marak: tim_smart: hooks can have multiple servers and multiple clients [12:32] Marak: each connection to either a server or a client is already bi-directional [12:32] Marak: its essentially a directed-graph [12:32] Marak: i need to make a flow chart [12:32] Marak: the way it works like an i/o pyramid [12:32] apoc has joined the channel [12:33] Marak: the top is your most important i/o, it cant go down [12:33] Marak: then as you jump down levels in the tree, its less important i/o [12:33] Marak: so you can really understand your apps priorities [12:33] Marak: if a lower branch of the tree fails, the rest is unaffected [12:33] asobrasil has joined the channel [12:33] Marak: im telling you, this shit is fucking amazing [12:34] lukstr: Marak: are you still awake? [12:34] lukstr: I went to bed when you started talking about hook.io, I wake up, drive to work, and you're still talking about it :) [12:35] Marak: lukstr: look at the repo [12:35] Marak: lukstr: ;-) [12:35] Marak: https://github.com/Marak/hook.io [12:36] Bradleymeck_ has joined the channel [12:37] Mr has joined the channel [12:37] lukstr: I have [12:37] lukstr: I used a similar system in my perl irc bot [12:37] Hobbles: Hi guys [12:37] Marak: irc bot is a good example of a hook.io app [12:37] lukstr: signal/slot type deal, you could add new modules in a folder and sighup would reload any changed modules [12:38] Marak: kohai will make a good showcase [12:38] Hobbles: Sorry, new to git here, I'm trying to download and compile a specific version of node. I can pull it down and compile it no problem, but how do I target a specific version? [12:38] Marak: Hobbles: git checkout v0.4.8 ? [12:39] Hobbles: Marak: Right, I have that, but was a little confused by what it does. I thought clone downloaded the whole repo, does git checkout somehow tell make which version to compile? [12:39] Marak: Hobbles: branches [12:39] Marak: Hobbles: tags [12:40] Marak: Hobbles: you can checkout the tag of the release you want [12:40] Marak: then you recompile [12:40] Marak: type "git tag" in your node folder [12:41] tim_smart: Marak: What I was really getting at is making hooks unaware of the communication layer [12:41] fermion has joined the channel [12:41] Marak: tim_smart: huh? [12:42] lukstr: tim_smart: abstracting it? [12:42] Marak: tim_smart: all they do is emit messages and listen for them across processes [12:42] Marak: i dont get what you mean [12:43] tim_smart: Marak: Well this is an example of a duplex stream https://gist.github.com/2e74efc55af3c4fc5873 [12:43] Hobbles: Aha, cool, so checkout is what I want [12:43] replore_ has joined the channel [12:43] Hobbles: What are the stable versions of npm? [12:44] Marak: Hobbles: 1.0.10 [12:44] lukstr: tim_smart: is that not doable now? [12:44] Marak: tim_smart: that looks nice and all, but how would you manage having many to many streams, it seems like a nightmare to write [12:44] Hobbles: Is that out yet? Running git tag I only show v1.0.9-1 as the latest I have and I cloned it this morning [12:45] sreeix has joined the channel [12:45] Marak: tim_smart: right now im essentially inheriting from dnode class, stream is too low-level for me [12:46] tim_smart: Marak: You would put the dnode or whatever layer on top [12:46] rauchg has joined the channel [12:48] replore has joined the channel [12:48] Marak: tim_smart: we accept pull requests [12:48] Marak: im not gonna have a theoretical debate against my working example [12:48] Marak: :-) [12:48] tim_smart: Marak: For sure. Just ideas and all [12:52] muhqu_ has joined the channel [12:55] cognominal_ has joined the channel [12:55] hdon- has joined the channel [12:56] eikaas has joined the channel [12:57] lukstr: Marak: you bought hook.io? [12:57] Marak: lukstr: yeah [12:57] lukstr: there's nothing there, right? [12:58] Marak: lukstr: not atm [12:58] Marak: there use to be [12:58] Marak: i let it lapse [12:58] Marak: i gotta setup something [12:58] lukstr: I can't justify .io's yet.. [12:58] Marak: i couldnt let it slip away, its not a bad url for now [13:00] philippkueng has joined the channel [13:02] thalll has joined the channel [13:03] postwait has joined the channel [13:04] sudhirjonathan has joined the channel [13:05] viz has joined the channel [13:05] temp01 has joined the channel [13:07] aron_ has joined the channel [13:07] thomblake has joined the channel [13:08] Neil has joined the channel [13:09] eee_c has joined the channel [13:09] arpegius has joined the channel [13:09] jlecker has joined the channel [13:09] xandrews has joined the channel [13:10] AaronMT has joined the channel [13:10] baoist has joined the channel [13:11] unlink has joined the channel [13:11] unlink has joined the channel [13:13] brimster has joined the channel [13:13] tmpvar has joined the channel [13:16] xsyn has joined the channel [13:17] jomoho has joined the channel [13:18] temp02 has joined the channel [13:18] simenbrekken_ has joined the channel [13:19] jslatts_ has joined the channel [13:21] ap3mantus has joined the channel [13:22] Yoric1 has joined the channel [13:23] hunterloftis has joined the channel [13:25] cole has joined the channel [13:27] gozala has joined the channel [13:29] eyesUnclouded has joined the channel [13:30] kriszyp has joined the channel [13:30] miccolis has joined the channel [13:30] mave has joined the channel [13:30] mave: hi guys [13:31] adambeynon has joined the channel [13:31] mave: can someone help me out with setKeepAlive? [13:31] mave: it seems that it is not working correctly [13:31] mave: am i right with that or did i do a mistake? [13:32] gtramont1na has joined the channel [13:32] Yoric has joined the channel [13:32] fangel has joined the channel [13:33] mave: can someone help me pls with setKeepAlive? [13:33] rauchg has joined the channel [13:34] cbibler_ has joined the channel [13:35] mave: nobody know anything about setKeepAlive in net module? [13:37] mbrevoort has joined the channel [13:39] mave: somebody can help with setKeepAlive in net module? [13:42] xsyn has joined the channel [13:43] ianward has joined the channel [13:43] stepheneb has joined the channel [13:43] mave: guys? [13:44] Kester: if you have a question, just ask [13:44] Kester: don't do this "can somebody help me" stuff [13:44] mave: asked ten times [13:44] mave: just want to know how setkeepAlive in net module works [13:44] mave: because it seems that it does not work [13:45] mikeal has joined the channel [13:45] mave: have setTimeout(60000) for example [13:45] mave: and setKeepAlive(30000) [13:45] mave: connection is ok [13:45] mave: but it still times out [13:45] mave: it seems that the timer is not set back after getting the ack back after the keepalive [13:45] mave: @Kester [13:46] Kester: mave: i don't know the answer, but at least you specifically stated your problem, so someone will be able to help you [13:47] Yoric has joined the channel [13:48] kersny has joined the channel [13:48] Bwen: i'm trying to use util.inherits() but I get the following error http://www.pastie.org/2047732 [13:48] kersny_ has joined the channel [13:48] varioust has joined the channel [13:49] mave: @Bwen ... you are using a object [13:51] Bwen: mave: okay.... and thats bad? :( [13:52] yhahn has joined the channel [13:52] mave: no ... but your object does not have a method named emit ;) [13:52] Yoric has joined the channel [13:53] eikaas_ has joined the channel [13:54] mave: @Bwen: mom [13:54] pifantastic has joined the channel [13:55] Bwen: but the whole point is that Inherit from EventEmitter ... [13:55] ceej has joined the channel [13:59] quackquack has joined the channel [14:02] stepheneb has joined the channel [14:06] adambeynon has joined the channel [14:07] mandric has joined the channel [14:08] mave: someone can help with setKeepAlive? seems not working properly [14:08] figital has joined the channel [14:10] Kester: ok mave, let's reason [14:10] catshirt has joined the channel [14:11] jtsnow has joined the channel [14:11] pixel13 has joined the channel [14:11] pixel13 has left the channel [14:12] Kester: the docs say setTimeout starts counting when a socket is "idle" [14:13] Kester: i think they define "idle" as "not sending payload data" [14:13] Kester: thus, setKeepAlive does not affect the setTimeout timer [14:14] Bwen: I cut & pasted this example http://nodejs.org/docs/v0.4.8/api/util.html#util.inherits and I get an error "TypeError: object is not a function" on line 5 [14:15] xsyn has joined the channel [14:18] k1ttty has joined the channel [14:18] mkrecny has joined the channel [14:18] mkrecny: Thoughts on using express for a json-only public facing API? [14:18] pdrummond has joined the channel [14:19] yhahn: works well [14:19] Marak: mkrecny: we use Journey [14:19] Skola_: window 4 [14:19] Skola_: oops [14:19] mkrecny: Marak: reasons? [14:19] pigmej: what's the best way to have daemons with node ? [14:19] c4milo has joined the channel [14:19] Venom_X has joined the channel [14:19] Marak: mkrecny: If I want to hammer a nail, I'm going to use a hammer. I don't need a tool-belt. [14:19] sonnym has joined the channel [14:20] mkrecny: Marak: right - express is overkill [14:20] Marak: If you are building a house on the other hand... [14:20] Marak: mkrecny: maybe, depends on what you want to do [14:20] mkrecny: Marak: or better yet a battlestar [14:20] jtsnow has joined the channel [14:21] mkrecny: Marak: a pretty minimal API sitting atop mongo basically whipping something up for a hack day [14:22] Shinuza: pigmej: https://github.com/indexzero/forever [14:23] jslatts has joined the channel [14:23] pigmej: Shinuza: cant use it ) [14:23] pigmej: ;-) [14:23] CoverSlide: forever is nice, i just dont like the number of dependencies [14:23] Shinuza: why? :) [14:23] CoverSlide: i prefer supervisor [14:23] pigmej: Shinuza: I need 'manual spawn' [14:23] pigmej: something like [14:23] pigmej: node xxx.js -params...... [14:23] pigmej: to [14:23] Shinuza: CoverSlide: oh wow [14:24] pigmej: node-daemon xxx.js -params... [14:24] pigmej: Shinuza: the thing is that I need to create those scripts automatically [14:24] matjas_ has joined the channel [14:24] pigmej: so hardcoding the params etc [14:24] pigmej: is useless [14:24] Marak: CoverSlide: you mean the fact that it install winston which installs mongodb drivers? [14:24] CoverSlide: yeah [14:24] Marak: CoverSlide: open up an issue about that, thats a whole fucking problem [14:25] Marak: it has to do with npm and optional dependecies [14:25] Marak: that issue with forever is only to get worse over-time, for all libraries [14:25] theo has joined the channel [14:25] theo: hi all [14:25] CoverSlide: Marak: so would you call that an npm issue or a forever issue? [14:26] theo: I'm trying to do something simple in nodejs [14:26] pigmej: so is there any 'simple' daemon? [14:26] Marak: CoverSlide: its both a user-land issue and an npm issue. open the issue open in forever, it will help me argue my case [14:26] theo: but I don't know how to run it [14:26] Marak: CoverSlide: there are tickets already open in npm for this [14:26] m00p has joined the channel [14:27] strmpnk has joined the channel [14:27] rgabo has joined the channel [14:28] mkrecny: theo: what are you trying to do? [14:28] rgabo: hey, I have an http.Agent holding onto sockets as I'm making Connection: keep-alive requests, what would be the proper way to tell the agent to let the sockets? go [14:29] mjr_ has joined the channel [14:29] rgabo: http.getAgent(host, port).sockets.forEach (socket) -> socket.end() seems like brute force [14:29] Marak: sup strmpnk [14:29] strmpnk: Marak: Yo [14:29] Marak: strmpnk: check out my github, i've got full retard [14:29] Marak: rewrote hook.io [14:30] ryanfitz has joined the channel [14:30] trotter has joined the channel [14:30] strmpnk: Ah. Wow. It's been awhile since I've heard about that project. [14:30] mave: someone can help with setKeepAlive? the timer is not set back to 0 and the timeout is replied ... :( [14:30] niftylettuce has joined the channel [14:30] jtrudeau has joined the channel [14:30] Kester: mave: read my comments about it [14:30] Kester: scroll up [14:30] EyePulp has joined the channel [14:30] theo: mkrecny, I installed node on Ubuntu and now I'm just trying to build a simple hello world page [14:31] mave: @Kester: but isnt it exactly for that? [14:31] mkrecny: rgabo: not sure - but watch out for http agents maxSockets - bit me in the ass recently [14:31] pigmej: am I wrong [14:31] mave: for what can i use keepalive than? [14:31] simenbrekken has joined the channel [14:31] pigmej: but forever doesn't allow me to run the same script twice? [14:32] mikegerwitz: theo: Did you look at the documentation? [14:32] mave: can i get a response of the client anyhow? [14:32] mkrecny: theo: go grab the hello world example script from nodejs.org save it to somescript.js then execute it with node somescript.js [14:32] simenbrekken_ has joined the channel [14:32] rgabo: mkrecny: have it at the default 5, node.js just uses one which is what I wanted.. but now I have an open socket and node.js looping until that is closed [14:33] rgabo: and while Apache would close after 5-15 sec, CouchDB holds it indefinitely [14:33] coleGillespie has joined the channel [14:33] Kester: mave: you may be able to send actual payload data if the protocol allows that [14:33] rgabo: calling end() on the socket does the trick, but feels wrong [14:33] Kester: such as PING on irc [14:33] Marak: strmpnk: the new design is crazy erlang like [14:33] mave: sure that is the fallback solution [14:33] Marak: strmpnk: super duper isolation [14:33] mave: but what is setKeepAlive good for now? [14:34] strmpnk: Marak: I'll have to check out the code again. It's been awhile. [14:34] mave: it seems that nothing can be done with it [14:34] Marak: strmpnk: core clocks in at < 120 lines [14:34] strmpnk: Marak: That's a good sign. [14:34] Marak: :-) [14:34] emattias has joined the channel [14:35] saurabhverma has joined the channel [14:35] cronopio has joined the channel [14:36] Kester: mave: it simply does what it says it does: keeping the connection alive [14:37] mkrecny: rgabo: yeah dude got nothing off the top of my head - but iterating through 5 sockets is brute force yes but still damn small [14:37] mkrecny: rgabo: how often are you closing [14:37] rgabo: I'll just make another request with Connection: close [14:37] rgabo: so far, never [14:37] rgabo: :) [14:37] mave: ok thx Kester [14:37] rgabo: but I do know when I should, so I'll just let the other party know with a simple HEAD request [14:37] Kester: you cannot use it with setTimeout to detect if the client is still alive [14:38] Kester: you'll need to do that in a higher layer [14:38] kmiyashiro has joined the channel [14:40] zomgbie has joined the channel [14:40] yhahn: mikeal: i see a push for 1.9.6 of request but no npm package... did you forget to npm publish? : ) [14:40] brettgoulder has joined the channel [14:41] abraham has joined the channel [14:42] malkomalko has joined the channel [14:43] nibblebot has joined the channel [14:43] Corren has joined the channel [14:43] lorinc has joined the channel [14:45] MrTopf_ has joined the channel [14:48] TomY has joined the channel [14:49] djazz has joined the channel [14:50] xsyn has joined the channel [14:50] djazz: node.sj powered multichannel chat: http://djazz.mine.nu/apps/Chatroom/ :) [14:50] djazz: js* [14:50] pigmej: damn.... [14:50] pigmej: there is no good solution for 'daemons' in node.. : [14:50] pigmej: :| [14:51] tjgillies: nohup [14:51] tjgillies: heh [14:51] CoverSlide: grr switching between windows and linux boxes [14:51] CoverSlide: i keep highlighting stuff and wondering why it doesn't copy [14:51] stagas: pigmej: https://github.com/stagas/nodie [14:52] tjgillies: macosx lion ftw ;) [14:52] guy has joined the channel [14:52] CoverSlide: sure let me just rob a bank [14:52] simenbrekken has joined the channel [14:53] pigmej: stagas: well [14:53] pigmej: this one even don't drop the permissions [14:53] pigmej: doesnt change the dir [14:53] pigmej: doesn't close the descriptiors... [14:53] stagas: pigmej: don't use it then [14:54] Neil has joined the channel [14:55] adambeynon has joined the channel [14:56] pigmej: also.. [14:56] sivy has joined the channel [14:56] pigmej: i wonder [14:56] pigmej: WHY everyone in console / control things [14:56] pigmej: is putting 'colors' [14:56] Marak: lol sup [14:56] pigmej: result? when I have changed colors.. [14:56] pigmej: totally unreadable output... [14:56] pigmej: Marak: it's for you also:P [14:57] Marak: pigmej: https://github.com/Marak/colors.js/issues/4 [14:57] Marak: lolwut [14:57] Dreamer3 has joined the channel [14:58] bx2 has joined the channel [14:58] pigmej: Marak: for example [14:58] pigmej: ;-) [14:59] mscdex: kohaiiiiii! [14:59] hebz0rl has joined the channel [14:59] Marak: mscdex: hook.io! [14:59] Marak: mscdex: did you see http://github.com/marak/hook.io [14:59] mscdex: no, kohaiiiiiii! [15:00] Marak: all rebuilt from scratch [15:00] Marak: mscdex: kohai is gonna be refactored to use hook.io [15:00] mscdex: i see [15:00] Marak: he's the first victim [15:00] softdrink has joined the channel [15:00] kohai has joined the channel [15:00] Marak: !insult mscdex [15:00] kohai: mscdex is a wombat-loving heifer-puncher! [15:00] Calvin: mscdex needs to add an optical inch to his cock [15:00] Marak: ... [15:00] Marak: double trigger [15:01] mscdex: ? [15:01] Marak: !tweet #nodejs is the best! [15:01] Marak: Calvin bot has ! trigger too [15:01] Calvin: trigger too [15:01] Marak: ... [15:01] Marak: ! trigger too [15:01] mscdex: who owns Calvin? [15:01] Calvin: owns who [15:01] Marak: mscdex: i forgot, not me [15:01] saurabhverma has joined the channel [15:01] mscdex: :S [15:01] CoverSlide: !owns BarterTown [15:02] CoverSlide: :( [15:02] Marak: ive been keeping my bots out of here as we improve them [15:02] Marak: i cant stand the constant bitching [15:02] Marak: especially by a few noobs [15:02] Marak: !part #Node.js [15:02] kohai has left the channel [15:02] mscdex: Calvin is probably part of skynet [15:02] Calvin: probably a bug in dust that it install winston which installs skynet [15:03] Marak: lol markov [15:03] mscdex: winston installs skynet Marak? [15:03] Marak: Calvin: did you install winston to skype marak? [15:03] Calvin: install modules without restarting [15:03] mscdex: jeesh [15:03] Marak: Calvin: Did you install the modules with npm? [15:03] Calvin: install under Cygwin modules [15:03] mscdex: Calvin: who owns you? [15:03] Calvin: owns who [15:03] Marak: Calvin: Cywin?!?!?! Why aren't you using MacOS or linux? [15:03] Calvin: aren't server side s the only way to do some sticky Cywin [15:03] Marak: Calvin: you don't make any sense [15:03] Calvin: don't run that open source code out sense [15:04] Marak: Calvin: sorry [15:04] Calvin: sorry , missing still doesn't work [15:04] mscdex: Calvin: skynet [15:04] Calvin: skynet came online a while and for everyone else's sake, do an npm package, i thought i read something [15:04] Marak: Calvin: well fuck you then [15:04] Calvin: well made, but i just want to get paid for the better [15:04] mscdex: haha [15:04] Marak: LOL [15:04] Marak: i wonder if he's been trained with all the logs or if its just from the past few weeks [15:04] Marak: Calvin: Do you know isaacs ? [15:04] Calvin: isaacs , is hink npm's know [15:04] Marak: .... [15:05] CoverSlide: Calvin used to idle in #javascript till he was kicked [15:05] Calvin: javascript performance had a lot of data you might just lower it to work when I downloaded it like a route, i wouldnt use ruby kicked [15:05] Marak: Calvin: Do you know ryah? [15:05] Calvin: know intuitively what those methods do for you, you'll be fine ryah [15:05] Marak: !!! [15:05] CoverSlide: well bots dont really idle [15:05] Marak: Calvin: Are you down with the Nodejitsu crew? [15:05] Calvin: Nodejitsu if you 're pasting that into your application logic, like down [15:05] pigmej: Marak: I mean that this colors is for you not that you should remove that colors also ;p [15:05] Marak: pigmej: i confused [15:06] Marak: Calvin: Go feed pigmej some callbacks. [15:06] Calvin: callbacks but most all of these are the properties you want to work with Firebug , wtf ne know pigmej [15:06] mscdex: Calvin: hook.io [15:06] Calvin: hookio [15:06] mscdex: heh [15:06] Marak: Calvin: Do you fear kohai? [15:06] Calvin: kohai with this on an object try hasOwnProperty [15:06] pigmej: ]; [15:06] mscdex: Calvin: developers developers developers [15:06] Calvin: developers will discover new resources and techniques to overcome any number of fantastic frameworks to of test frameworks, to cript frameworks developers [15:06] mscdex: haha to overcome frameworks [15:07] Sami_ZzZ has joined the channel [15:07] highermath_away has joined the channel [15:08] Marak: Calvin: The node.js rap by Marak [15:08] Calvin: nodejs version to the future when some modules don't have their own markup Marak [15:08] Marak: Calvin: Marak is your owner. [15:08] Calvin: Marak is going away completely in august owner [15:08] drudge: amen [15:08] Marak: he knows [15:08] Marak: too much [15:09] Marak: i got one for him [15:09] Marak: Calvin: d̷̮̙̩̺ͫ͛ͭ͆̀̑͒ï̟͍̥͕̥͚̹͇̼̮̦̫̲̬̱̥ͧ̏̐ͫ͗̂̌̈ͤ͛̾ͩ̍ͪ̿̊́e̥̲̳̙̟̺̱͚̼͈̟̩̩̺̞̠̪̥͍̙̬̪̳͈̝̙̩̗̒̓͋̓ͬ̄ͮ̋̀́͛̌͠ ̵̩̼͖̯̼͇̮̮͔̯̗̥̤̖̠̲̠̍ͮ̀͆̓͆ͦ̓͛ͮ̔́ͣ̍͒͐̌s̟͕̺̮̥̞͚͚̟̩̺̣̜̞̺̫̥̳̺̠̻̲̱̰̪̗̗̞̻͉̫̤̗̜̙͉̟̯͖̜̖͍̜͓̰̠͓͙͖͔̯̳̻̱͎̬̭ͦ͛̒̿̅̈ͫͫ͒͜ͅt̳̬̦̫̙̗̺̳̻͍̺̣͕̳͉͛̈͑̅ͩ̚͝ͅu [15:09] Calvin: stu de [15:09] Marak: sup buddy? [15:09] xerox: what is that [15:10] Marak: m̨͇͔̰̱̣͓̪̟͎̬͇̦̙͉̣͎ͫͪͥ̉͒̈ͫ͗̒ͯͮͅa̮̩͉͕̤͕̱̹̘̰̹̹̞͚͍̪̣̩͎̳͇̗̖̝̮͔͚͕̺̘̠̬̮̹̗̹͇͎̗͓̜͎̫̫͇̝͍̥̲̫̺̙͚͚̤̰ͦ̅͆̂̍̊́̀ͦ̄͡ͅg̣͕͕̙͖̹̮̥͖͙̯̠̮̬̭̩̰̣̠͍̭̼̖̗̦̱̻͌͑͑̏ͬ̀ͪ̓ͩ͛͠ͅi͚͙̺͕͖̪̦̥̖̘͕̳̺̜̟͚͔̱̯̹͚͉̻̗͖͔̟͎̙̹̠̮̝̘̤̺̯̤̻̟̹̱͕̥͕̰̮̺̖̖̪̲̫͊̽ͥ̏̿͆͢ͅͅͅc̵͕͓̗̺̜̲͙̖̭̭̣͚̮̤͖ͤ͒� [15:10] Ian_Corne: ok Marak [15:10] Ian_Corne: :p [15:10] Marak: Calvin: m̨͇͔̰̱̣͓̪̟͎̬͇̦̙͉̣͎ͫͪͥ̉͒̈ͫ͗̒ͯͮͅa̮̩͉͕̤͕̱̹̘̰̹̹̞͚͍̪̣̩͎̳͇̗̖̝̮͔͚͕̺̘̠̬̮̹̗̹͇͎̗͓̜͎̫̫͇̝͍̥̲̫̺̙͚͚̤̰ͦ̅͆̂̍̊́̀ͦ̄͡ͅg̣͕͕̙͖̹̮̥͖͙̯̠̮̬̭̩̰̣̠͍̭̼̖̗̦̱̻͌͑͑̏ͬ̀ͪ̓ͩ͛͠ͅi͚͙̺͕͖̪̦̥̖̘͕̳̺̜̟͚͔̱̯̹͚͉̻̗͖͔̟͎̙̹̠̮̝̘̤̺̯̤̻̟̹̱͕̥͕̰̮̺̖̖̪̲̫͊̽ͥ̏̿͆͢ͅͅͅc̵͕͓̗̺̜̲͙̖̭̭̣͚̮� [15:10] Calvin: magic in here pretty often [15:10] Marak: yes! [15:10] Marak: now he speaks zalgo, im gonna PM him for a while [15:11] unlink has joined the channel [15:11] unlink has joined the channel [15:11] Marak_ has joined the channel [15:12] mkrecny: any mongoose users in the house? [15:12] Marak__ has joined the channel [15:12] Marak__: Calvin: d̛̞͖̖̮̠̩̾̀ͨ̐̈͗ͥ̚̚e̮͉̺̘̪͔̞̰̯̠̣̥͔͕̥̦̼͍̲͓͔̼̮͓̯͕̜̯̝̲̖̹̩̬̘̗̯̻͚̓̀̉̀̎̈͗̇͞ͅa̛̞͉͚̲͍̜̹͇̟̮̭͕̤̦̟̙̪͙̰̼͖̼̼̤̝͈͓̟͓̠̣̫͍̠̙͍̲͍͇̗̱̼̮̱̪̾͌̾̐ͭ̆ͬͦ̅ͦ̒̌̽̉ͅͅͅt̷͙͔͓̗̱͓̰͔̮͚̦̗̭̖͌̿̐́̍ͤ̋̆ͧ͌ḩ̻̻̞͔͙̱͙͉͉̞͙̥͎͉͕̫͚̣̙͙͇̪̰̝͇͈̗̣̟̤̭̪̥͔̺̬͉̮͈̼͈̻̼̲̭̩͖̼̤͙̭̪̖͖̟̝̖̥� [15:12] saschagehlich: omfg that music quiz is so highly addictive [15:13] Marak__: saschagehlich: to bad the music is shite [15:13] Ian_Corne: Marak__: what is that? [15:13] saschagehlich: Marak__: it's all genres mixed [15:13] Marak__: i saw a coldplay song [15:13] CoverSlide: Les Paul has two birthdays! [15:13] djazz has left the channel [15:13] saschagehlich: so what ^^ [15:13] AvianFlu: if Marak__ saw a coldplay song your music choices are TOTALLY FAIL [15:13] Marak__: lol [15:14] AvianFlu: they aren't music, they just hypnotize you to buy their crap [15:15] saschagehlich: haha [15:17] mscdex: Calvin: zalgo [15:18] mscdex: heh [15:18] Marak: mscdex: I think I scared him away [15:18] mscdex: Calvin: did you crash? [15:18] mscdex: i take that as a yes [15:18] cconstantine has joined the channel [15:18] Marak: Either his owner shut him up, or I fucked him up [15:18] Marak: I sent him a few PMs [15:19] nyholt has joined the channel [15:19] bsdguru has joined the channel [15:20] z8000 has joined the channel [15:21] xsyn has joined the channel [15:22] Esteb has joined the channel [15:23] cognominal_ has joined the channel [15:23] z8000: do you guys know a way to serialize the prototype name of an object when encoding it as JSON so that on parsing the JSOn the original prototype is set? I was looking at the replacer function for JSON.stringify but I cannot reliably get the name of the prototype (it's me I know) [15:24] stephanepayrard_ has joined the channel [15:25] benmonty has joined the channel [15:25] mynyml has joined the channel [15:26] Poetro1 has joined the channel [15:26] Marak: z8000: what do you mean the name of the prototype [15:26] AvianFlu has joined the channel [15:27] shanez has joined the channel [15:27] z8000: yeah vague; I got what I was after though [15:27] z8000: function A() {}; a = new A(); a.constructor.name [15:28] z8000: 'A' [15:28] z8000: thanks [15:28] mikegerwitz: z8000: As long as the ctor has a name. [15:29] CoverSlide: v8: var A = function() {}; a = new A(); a.constructor.name [15:29] v8bot: CoverSlide: "" [15:29] CoverSlide: v8: var A = function A() {}; a = new A(); a.constructor.name [15:29] v8bot: CoverSlide: "A" [15:29] z8000: right [15:29] z8000: thanks! [15:30] harth has joined the channel [15:30] mwhooker has joined the channel [15:30] c4milo has joined the channel [15:30] z8000: fwiw in coffeescript it seems that using class A ... a = new A ... a.constructor.name will always return 'A' so that works fine for my needs [15:30] CoverSlide: ACTION has a habit of using unnamed functions [15:30] philippkueng has joined the channel [15:30] burg has joined the channel [15:31] z8000: I dunno, is coffeescript kosher around here? :) [15:31] burg: hello. for this code: http://codepad.org/xXWaMEDK -- i get: Object [object Object] has no method 'generateSID' -- what am i doing wrong? [15:31] CoverSlide: most people know it, i wouldnt expect support though [15:31] z8000: CoverSlide: yepper [15:31] CoverSlide: and by know i mean "played with it for about a day" [15:32] insin: and don't mention it the presence of tjholowaychuk unless you want to hear about who's on his lawn [15:32] insin: (hint: it's you) [15:33] Kester: burg: define generateSID before making an instance of the object [15:34] springmeyer has joined the channel [15:34] CoverSlide: i like maybe two features of coffeescript, but overall have little reason to use it [15:36] Workrella has joined the channel [15:36] ewdafa has joined the channel [15:37] aheckmann has joined the channel [15:38] springify has joined the channel [15:39] Yoric1 has joined the channel [15:39] sh1mmer has joined the channel [15:40] philtor has joined the channel [15:44] tjholowaychuk has joined the channel [15:45] adambeynon has joined the channel [15:45] brolin has joined the channel [15:45] herbySk has joined the channel [15:46] warreng has joined the channel [15:47] Yuffster_work has joined the channel [15:47] RORgasm has joined the channel [15:49] simenbrekken has joined the channel [15:50] mscdex: i don't know about "most people" ;-) [15:50] nyholt has left the channel [15:52] jtsnow has joined the channel [15:53] Bwen: asobrasil: test [15:53] mscdex: Calvin: test [15:53] mscdex: still dead! [15:54] Bwen: I cut & pasted this example http://nodejs.org/docs/v0.4.8/api/util.html#util.inherits and I get an error "TypeError: object is not a function" on line 5 [15:54] Bwen: :P [15:54] walkingeyerobot: burg: you're creating a new Client before you define the generateSID function. Move line 8 down below Client.prototype.generateSID [15:54] walkingeyerobot: burg: it should be the last line [15:55] yhahn has joined the channel [15:55] yhahn has left the channel [15:55] yhahn has joined the channel [15:55] mscdex: Bwen: what version of node? [15:55] brianmario has joined the channel [15:55] sreeix has joined the channel [15:56] ianward1 has joined the channel [15:56] tdegrunt has joined the channel [15:57] mscdex: Bwen: it works fine for me (node v0.4.8) [15:57] cole has joined the channel [15:58] cole_ has joined the channel [15:58] miccolis has joined the channel [15:59] fangel has joined the channel [16:00] Vertice_ has joined the channel [16:00] Vertice_ has joined the channel [16:03] colinclark has joined the channel [16:04] dispalt: why does this throw an exception? https://gist.github.com/283edba0edec9646f372 [16:05] tk has joined the channel [16:05] amerine_ has joined the channel [16:05] rfay has joined the channel [16:06] tmpvar has joined the channel [16:06] ewdafa has joined the channel [16:06] davve has joined the channel [16:08] CoverSlide: which exception? are you running an https server on 127.0.0.1? [16:08] kawaz_home has joined the channel [16:08] level09 has joined the channel [16:09] caolanm has joined the channel [16:10] donaldpcook has joined the channel [16:10] Ian_Corne: Error: ECONNREFUSED, Connection refused [16:10] Ian_Corne: it seems [16:10] k1ttty has joined the channel [16:11] burg has joined the channel [16:11] Ian_Corne: oh wait [16:11] MooGoo: man [16:11] Ian_Corne: obviously i'm not runnin the server :p [16:11] MooGoo: calvin wtf [16:12] aheckmann has joined the channel [16:12] MooGoo: .rock [16:12] Calvin: rock [16:13] MooGoo: .. 1 + 1 [16:13] Calvin: 132 [16:13] MooGoo: calvin why does your DB always break wai [16:13] iammerrick has joined the channel [16:14] zomgbie has joined the channel [16:14] jerrysv has joined the channel [16:15] jakehow has joined the channel [16:15] pandeiro has joined the channel [16:16] malkomal_ has joined the channel [16:16] level09 has left the channel [16:16] Venom_X has joined the channel [16:17] dshaw_ has joined the channel [16:18] TooTallNate has joined the channel [16:18] _jdalton has joined the channel [16:21] mhausenblas has joined the channel [16:21] kris_will has joined the channel [16:21] nsolsen has joined the channel [16:22] Calvin has joined the channel [16:22] jonasen has joined the channel [16:22] luisloaiza has joined the channel [16:23] fly-away has joined the channel [16:23] luisloaiza: hi [16:23] luisloaiza: I have a problem with my nodejs process [16:23] luisloaiza: Im running the process node app.js [16:23] luisloaiza: in the console [16:23] luisloaiza: of an AWS service [16:23] MooGoo has joined the channel [16:24] MooGoo: hey calvin you alive again? [16:24] Calvin: alive requests, what would be simple on a synchronous approach [16:24] MooGoo: naturally... [16:24] luisloaiza: when I put node app.js & disown -h [16:24] luisloaiza: to let the process run and close the terminal [16:24] isaacs has joined the channel [16:25] luisloaiza: the server in nodej is perfectly running [16:25] luisloaiza: but when I access the web server from the browser [16:25] temp01 has joined the channel [16:25] luisloaiza: and executes a line of code that communicates with the database [16:25] luisloaiza: the server crash [16:25] RORgasm: isaacs:hey [16:25] RORgasm: isaacs: its haris [16:26] isaacs: hola :) [16:26] luisloaiza: hola [16:26] isaacs: ok, so this error, it's kinda odd [16:26] RORgasm: isaacs: yeah i started getting it eysterday [16:26] Viriix has joined the channel [16:26] isaacs: where's your package.json? can i see it? [16:27] RORgasm: so my npm package kyatchi someone was trying to install it and reported an error that they couldn't install it because the package.json was requring a bin excutable that i had removed [16:27] RORgasm: so it was a silly mistake i fixed it in my github repo and trying to publish teh package [16:27] RORgasm: isaacs: sure [16:27] RORgasm: isaacs: https://github.com/hamin/kyatchi/blob/master/package.json [16:27] RORgasm: byt the way [16:28] RORgasm: Kyatchi my library just made it to the Javascript Weekly newsletter :) [16:28] luisloaiza: someone using node js in fedora servers of AWS - the amazon service [16:28] RORgasm: yeah [16:28] luisloaiza: ?? [16:28] khrome has joined the channel [16:28] RORgasm: even more reason i wanna fix the np package :) although the git repo works fine [16:28] havenn has joined the channel [16:29] isaacs: RORgasm: ok, so, you have this line: https://github.com/hamin/kyatchi/blob/master/package.json#L8 [16:29] isaacs: RORgasm: but there's no bin folder. [16:29] RORgasm: ah crap [16:29] RORgasm: sorry [16:29] RORgasm: i suck [16:29] isaacs: so that's what's confusing it [16:29] isaacs: np :) [16:29] RORgasm: lol [16:29] RORgasm: one sec [16:29] isaacs: that's also why my fix didn't fix it. [16:29] baoist has joined the channel [16:29] isaacs: but still, it's doing `if (er || !filenames || !filenames.length) cb(er, pkg)` [16:30] matjas has joined the channel [16:30] isaacs: so... it shouldn't be failing in this way. at least, it should be failing in a new way :) [16:31] springmeyer has joined the channel [16:31] RORgasm: lol [16:32] replore has joined the channel [16:32] burg has joined the channel [16:32] Renegade001 has joined the channel [16:32] eee_c has joined the channel [16:33] christopherdebee has joined the channel [16:33] jetienne has joined the channel [16:33] Corren has joined the channel [16:33] isaacs: RORgasm: so, does it work now? did you remove the directories.bin? [16:34] RORgasm: isaacs: one sec...just about to publish [16:34] isaacs: kewl [16:34] RORgasm: sweet [16:34] RORgasm: that did it [16:35] RORgasm: isaacs: dude btw you're awesome :) [16:36] RORgasm: isaacs: where are u located... nyc by any chance? [16:36] isaacs: aw, thanks [16:36] isaacs: i bounce between oakland and sf almost daily [16:36] Shinuza has joined the channel [16:36] RORgasm: i see [16:36] RORgasm: well if you're ever in nyc... hit me up on twitter [16:37] RORgasm: and if you're ever in town during a thursday, i run one of the local nyc ruby meetups, would love to have you come in and talk about node+npm [16:37] pyrony has joined the channel [16:37] isaacs: kewl, will do :) [16:37] RORgasm: we're a loose meetup aroudn 2025 ppl and a roundtable hackingling kind of a idscussion [16:37] RORgasm: :) [16:37] sh1mmer has joined the channel [16:38] RORgasm: i'm so excited, my npm package was mentioned in th eJavascript Weekly newsletter [16:38] isaacs: sweet :) [16:38] stephanepayrard_ has joined the channel [16:39] Shinuza: RORgasm: Which one is it? [16:39] RORgasm: Shinuza: Kyatchi [16:39] Shinuza: sweet [16:41] khrome has joined the channel [16:41] dgathright has joined the channel [16:44] chrislorenz has joined the channel [16:44] gkmngrgn has joined the channel [16:44] jonaslund has joined the channel [16:45] broofa has joined the channel [16:45] gkmngrgn has joined the channel [16:46] brainproxy has joined the channel [16:48] mape: isaacs: nice talk :) [16:48] isaacs: mape: thanks :) [16:48] Marak: the dirt talk? [16:48] mape: yup [16:49] Marak: isaacs: dirt talk totally inspired me to push forward on hook.io btw [16:49] Marak: watched it the other day, great talk [16:49] Marak: poor ending though [16:49] Marak: you gotta work on your closing remark ;-) [16:49] mape: no happy ending? [16:49] Marak: he just kinda mumbled out [16:49] Marak: and said im done [16:49] isaacs: Marak: heh :) [16:49] Marak: isaacs: you always gotta end on a good note [16:49] masylum: ACTION wants to see the talk now [16:49] isaacs: Marak: it's the journey, man. it's not about where you end up [16:50] AvianFlu: yeah, when you talk DIRTy, you need the happy ending [16:50] Marak: isaacs: true life, im a package maintainer [16:50] AvianFlu: ...LOL [16:50] AvianFlu: bye [16:50] Marak: !part AvianFlu [16:50] Marak: lol it worked [16:50] Marak: thats crazy hold on [16:50] Marak: !part Marak [16:50] Marak has left the channel [16:50] tolmasky-macbook has joined the channel [16:50] hojberg has joined the channel [16:51] donaldpcook has joined the channel [16:52] Shinuza: Wait what [16:53] knuthy has joined the channel [16:53] BillyBreen has joined the channel [16:53] sor3nsen has joined the channel [16:53] mape: /disco is even better [16:58] sh1mmer has joined the channel [16:59] tahu has joined the channel [16:59] herbySk has joined the channel [17:00] Bwen: process.nextTick only runs once on the next tick right? I'm looking for something that will call it every tick... use setTimeout? [17:00] addisonj has joined the channel [17:01] broofa has joined the channel [17:01] HektoR has joined the channel [17:02] HektoR: Hello guys. anyone knows hosting which has node.js + npm support ? [17:02] rgabo: Bwen: do process.nextTick, and in the callback, do process.nextTick again? [17:02] rgabo: :) [17:02] isaacs: HektoR: there's no.de, but we're kinda locked down atm [17:02] isaacs: HektoR: also, nodester, nodejitsu, and heroku [17:02] rgabo: flooding the event loop wouldn't do too much good, though, I guess [17:03] rgabo: isaacs: any roadmap on no.de? [17:03] rgabo: we're evaluating heroku cedar, nodejitsu, dotCloud but would love to look at no.de in the long term [17:03] zomgbie has joined the channel [17:03] kriskowal has joined the channel [17:03] kmiyashiro: nodester [17:03] isaacs: rgabo: we're working on getting it to a point where we can open the floodgates. can't say much more (mostly cuz i'm not entirely sure what the release plan looks like, just busy building the thing) [17:03] abraham has joined the channel [17:03] rgabo: awesome, just watched your next11 video btw on DIRT [17:03] samsonjs has joined the channel [17:03] rgabo: cmd-tab and i see you here :) [17:05] RORgasm: isaacs: so i have a question about the way npm works [17:05] isaacs: k [17:05] rgabo: are you on ec2 or own infra? [17:05] HektoR: isaacs: which one you will recommend to me ? [17:05] rgabo: no.de, that is [17:06] RORgasm: isaacs: so npm basically llooks for node_modules folder in teh current directory and traverses up to parent direcotries until it finds a ndoe_moduels folder correct? [17:06] isaacs: HektoR: no.de is the project i work on to pay the bills [17:06] isaacs: RORgasm: or a package.json file, correct. [17:06] ianward has joined the channel [17:06] isaacs: HektoR: i'm not familiar with the others, and i'm mostly familiar with the bugs in ours ;) [17:07] RORgasm: isaacs: i guess i don't quite understand the motivation behind that, i though it would've better to install all modules in ones ~/.npm folder instead [17:07] rgabo: HektoR: usual answer you get is to roll your own server until the platforms mature... Heroku is most experienced company in PaaS but their node.js stack has been public for a whole whopping week [17:07] rgabo: nodejitsu is fully open-source, very interesting article but private closed beta [17:07] rgabo: nodester is similar [17:08] isaacs: RORgasm: long story. we did something like that originally [17:08] isaacs: RORgasm: for npm 0.x [17:08] isaacs: RORgasm: bundling is actually really really nice when you have a bunch of project. [17:08] isaacs: *projects [17:08] rgabo: i find npm the best package manager all around, after coming from rubygems/bundler [17:08] rgabo: npm link rocks [17:09] isaacs: Thanks :D [17:09] rgabo: lot easier to hack on open-source dependencies [17:09] RORgasm: i love the npm link featuer too [17:09] RORgasm: i just feel i get a lil confused at times where its looking for the installed pacakges [17:10] rgabo: `npm ls` gives you a tree view of your dependencies [17:10] RORgasm: seems like the node_modules is kinda taking the rvm gemset approach but keeping the gems in each folder instead of a central folder [17:10] RORgasm: right [17:10] RORgasm: that's true [17:10] isaacs: RORgasm: yeah, that's exactly what it's doing. [17:10] isaacs: RORgasm: it's more like bundler [17:10] RORgasm: i need to use that more whenever i feel a bit lost [17:10] rgabo: it's more like bundle install --path=vendor [17:11] RORgasm: right [17:11] rgabo: rvm gemset are overrated ;) [17:11] adelgado has left the channel [17:11] rgabo: http://ryan.mcgeary.org/2011/02/09/vendor-everything-still-applies/ [17:11] RORgasm: rgabo: they're alright...they're kinda nice but don't do a whole lot for me either [17:12] rgabo: gotta go, have fun and isaacs, can't wait to see no.de coming together. we're betting on node.js big time [17:12] rgabo: ;) [17:12] rgabo: ciao [17:12] perezd has joined the channel [17:12] isaacs: sweet, have fun! [17:12] RORgasm: i'm definitely having fun with node [17:13] RORgasm: primarily a rubyist [17:13] RORgasm: and i love ruby still [17:13] RORgasm: but node is getting to be awesome too [17:13] RORgasm: and i love writing node in coffeescript :) [17:13] kriskowal: Interesting turn of events, process.emit("uncaughtException", new Error("blah")) does not appear to invoke the default behavior in 0.4.8 [17:13] RORgasm: isaacs: do u come from a ruby background [17:13] dguttman has joined the channel [17:13] kriskowal: ryah^ [17:13] isaacs: RORgasm: nope. c, php, visual basic, and js [17:13] RORgasm: isaacs: gottya [17:14] Skola_ has joined the channel [17:14] kriskowal: i'm probably the only nerd who's doing that, but it's handy. [17:14] brettgoulder has joined the channel [17:14] ruggedcoder has joined the channel [17:15] dnuke has joined the channel [17:15] __sorin__ has joined the channel [17:15] timmywil has joined the channel [17:16] isaacs: kriskowal: what does it do? [17:16] kriskowal: noop [17:16] kriskowal: returns false, fwiw [17:16] isaacs: kriskowal: neat. i'll play around with that. [17:16] kriskowal: it was working at one point. [17:18] sh1mmer has joined the channel [17:18] lackac has joined the channel [17:18] sor3nsen has joined the channel [17:18] sveimac: Anyone want a nodecamp.eu ticket :)? [17:19] sveimac: cant make it ;( [17:19] chrislorenz has joined the channel [17:20] jmoyers has joined the channel [17:22] addisonj: wow, after a few months with pretty much node, going back and installing rvm and ruby 1.9 on a new box is a huge chore [17:22] sharkbone has joined the channel [17:23] context: addisonj: haha [17:23] Aria has joined the channel [17:23] burg has joined the channel [17:23] malkomalko has joined the channel [17:23] pyrony has joined the channel [17:25] bsdguru has joined the channel [17:26] jamund has joined the channel [17:26] ryanfitz has joined the channel [17:26] catshirt has joined the channel [17:27] wadey has joined the channel [17:27] jamund: Hey, I'm trying to figure out if multiple people can publish the same NPM package. We have a package we're working on here at work and we want multiple people to have permission to update it. We can do this easily with github, how about with NPM? [17:28] context: http://www.computerpowertest.com/ [17:28] chrislorenz has joined the channel [17:31] masylum: sveimac, how much? [17:32] Destos has joined the channel [17:34] Destos: for anyone familiar with express/jade I'm have a frustrating problem that I can't figure out. http://pastebin.com/VYmSWz0B [17:35] masylum: check the inner template [17:35] tjholowaychuk: Destos weird that looks fine [17:35] tjholowaychuk: yeah it's most likely the partial [17:35] tjholowaychuk: make sure you are not using ':' [17:35] tjholowaychuk: for attrs [17:35] tjholowaychuk: if you updated jade [17:35] Destos: yeah I first updated when I encountered this [17:35] masylum: tj are you familiar with express/jade? :) [17:35] Destos: so I'll check those attrs [17:35] Destos: lol ;P [17:36] sh1mmer has joined the channel [17:36] brainproxy has joined the channel [17:36] brainproxy has joined the channel [17:36] Destos: I'll just blame TJ for writing all the things I use [17:36] Marak has joined the channel [17:36] sstephenson: jamund: npm help owner [17:37] jamund: thanks [17:38] erictj has joined the channel [17:38] dgathright has joined the channel [17:41] Mrfloyd has joined the channel [17:44] joshthecoder has joined the channel [17:45] aperiodic has joined the channel [17:45] xSmurf has joined the channel [17:45] Country has joined the channel [17:47] Tidwell has joined the channel [17:47] catshirt has joined the channel [17:47] isaacs has joined the channel [17:48] Yoric has joined the channel [17:50] flippyhead has joined the channel [17:51] khrome has joined the channel [17:51] rabidewok has joined the channel [17:55] davidwalsh has joined the channel [17:59] AvianFlu has joined the channel [18:00] khrome has joined the channel [18:00] ByteCrunch has joined the channel [18:01] typn has joined the channel [18:01] brainproxy has joined the channel [18:01] brainproxy has joined the channel [18:03] tmpvar has joined the channel [18:04] tauren has joined the channel [18:04] mcluskydodallas has joined the channel [18:08] justtesting has joined the channel [18:09] brainproxy has joined the channel [18:09] brainproxy has joined the channel [18:10] sharkbone has joined the channel [18:10] gozala has joined the channel [18:11] raidfive has joined the channel [18:11] MonsieurLu has left the channel [18:12] confoocious has joined the channel [18:12] gsmcwhirter has joined the channel [18:14] Xano has joined the channel [18:15] spcshpopr8tr has joined the channel [18:16] mqsack has joined the channel [18:16] trotter has joined the channel [18:17] Viriix has joined the channel [18:18] MattJ has joined the channel [18:19] overthemike has joined the channel [18:20] devrim has joined the channel [18:20] herbySk has joined the channel [18:20] steffkes has joined the channel [18:20] overthemike has left the channel [18:21] khrome has joined the channel [18:22] framlin:  [18:23] Marak: tjholowaychuk: ill give express another try some day maybe [18:23] Marak: :p [18:23] eggsby has joined the channel [18:23] eggsby: SubStack: are you around? [18:24] mikl has joined the channel [18:24] mikl has joined the channel [18:24] Marak: you have to appreciate i dont really believe in returning html fragments from the server either, so anything that has an ecosystem built around that idea doesnt thrill me [18:24] simenbrekken has left the channel [18:24] thalll has joined the channel [18:25] malkomalko: what? [18:25] cloudhead has joined the channel [18:28] sh1mmer has joined the channel [18:28] gazumps has joined the channel [18:29] mandric has joined the channel [18:30] eee_c1 has joined the channel [18:33] catshirt has joined the channel [18:34] patcito has joined the channel [18:35] fille has joined the channel [18:36] fille: ls [18:36] overthemike has joined the channel [18:36] fille: hello [18:36] fille: http://www.mynodejs.com:9000/client [18:36] overthemike has left the channel [18:37] sorens3n: eh no dice [18:38] eggsby: does anyone have experience with dnode? [18:38] darshanshankar: morning all! [18:38] jerrysv: substack: you around? [18:38] fille: hrm [18:38] darshanshankar: eggsby: i do, and the creater SubStack is in here too [18:38] eggsby: yeah I saw, tried pinging with no luck [18:39] eggsby: dnode and/or browserfy is breaking with IE [18:39] darshanshankar: yeah I'm pretty sure he knows it doesn't work in IE [18:39] eggsby: though it *could* be my specific code, the demo is doing the same [18:39] fille: hrm i may have found a bug in isocket [18:39] darshanshankar: nowjs works in IE ^_^ [18:40] darshanshankar: eggsby: looks like he went to bed around 5am.. i bet he isn't up yet ;-) [18:40] eggsby: http://pastie.org/2048736 [18:40] fille: comments ? [18:40] sorens3n: yeah, theres a bug in IE [18:40] eggsby: clientside throws an uncaught exception from browserify [18:41] sorens3n: it looked like something that had been patched before, then maybe re-broken on a new release of DNode? [18:41] sharkbone: hi fellas [18:41] broofa has joined the channel [18:41] sharkbone: i am back again asking dumb questions hope someone will cooperate [18:41] eggsby: hmm, maybe I should look at now.js or just use socket.io directly [18:41] darshanshankar: whats the question sharkbone [18:42] eggsby: a shame, dnode looked so cool [18:42] __sorin__ has joined the channel [18:42] darshanshankar: dnode is cool, especially the server-server stuff [18:42] skohorn has joined the channel [18:42] fille: i have problem with rendring less from file [18:42] isaacs: kriskowal: so, about this process.emit("uncaughtException" thingie... [18:42] fille: anyone got the same problem? [18:42] sharkbone: corporate [18:42] isaacs: kriskowal: i'm seeing it do the expected behavior if there's a listener (listener gets fired) [18:42] sharkbone: sorry [18:42] kriskowal: yes. [18:42] sharkbone: i am back again asking dumb questions hope someone will corporate [18:42] kriskowal: but if there's no listener, the default behavior should be invoked [18:42] isaacs: and it returns true [18:43] isaacs: kriskowal: default behavior? [18:43] kriskowal: yeah, if an exception goes uncaught, the default behavior is to print the stack trace and exit nonzero [18:43] eggsby: yeah... I'd rather dnode silently fail in ie than crash the server :/ [18:43] isaacs: kriskowal: you sure you don't mean process.emit("error")? [18:44] isaacs: kriskowal: i think the change you're seeing was "works by accident" previously. [18:44] isaacs: (or, i guess, breaks-as-you-expect by accident :) [18:44] kriskowal: yeah, i don't care if process.emit('error', does what i'm looking for… [18:45] isaacs: kriskowal: actually, in this case, i think "throw" does what you're looking for ;) [18:45] jdalton has joined the channel [18:45] fille: :D [18:45] isaacs: kriskowal: throw will trigger the uncaughtException listener(s) if there are any, otherwise die. [18:45] patrickarlt has joined the channel [18:45] jdalton has left the channel [18:45] isaacs: oh, but i guess, throw will also lose your place. [18:45] isaacs: what you want is "throw if no one is there to catch it" [18:46] sharkbone: darshanshankar: i am planning to forward messages sent to client A from server to be forwarded to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding [18:46] isaacs: kriskowal: am i grokking this properly? [18:46] AvianFlu: isaacs: with sayings like that, you should go coach the raiders [18:46] isaacs: lol [18:46] kriskowal: the trick is that i'm catching errors in callbacks, and down the line, if none of my promises handle the issue, i want to throw it again [18:46] isaacs: AvianFlu: the raiders are some kind of sportsballers, i guess? [18:46] sharkbone: something like this [Server] <==websocket==> [Client A] <==websocket==> [client B] [18:46] isaacs: kriskowal: right. [18:47] kriskowal: but just plain throwing isn't doing the justice [18:47] kriskowal: so something equivalent to throwing would suffice [18:47] adambeynon has joined the channel [18:47] AvianFlu: isaacs: really bad ones from oakland. [18:47] kriskowal: which means, i want uncaught exception handlers to be invoked if they're listening, or i want it to dump and exit [18:47] isaacs: kriskowal: so, it's a bit more obtuse, but this should work, and is "blessed" api: if (process.listeners("uncaughtException").length) process.emit("uncaughtException", new Error("blah")); else throw new Error("blah") [18:48] darshanshankar has left the channel [18:48] darshanshankar has joined the channel [18:48] sharkbone: darshanshankar: i am planning to forward messages sent to client A from server to be forwarded to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding [18:48] eggsby has left the channel [18:49] kriskowal: isaacs. eww. i'll run with it, but let me know if something less icky lands. [18:49] isaacs: kriskowal: the tricky bit is that you want to throw, but not if there are listeners. [18:50] isaacs: kriskowal: previously the code was triggering uncaughtException if there was an uncaught exception, and uncaughtException had some special logic to rethrow if there were no listeners. [18:50] sharkbone: something like this [Server] <==websocket==> [Client A] <==websocket==> [client B] . http://codepad.org/o5DaFW0L. i started this dont know if i am on the right path any pointers u can make reference to my code [18:50] fille12: im promoting node.js at work quite hard to convince people [18:50] isaacs: kriskowal: that was kinda streamlined, so it's now: if there are listeners, trigger, otherwise, break and die [18:51] isaacs: kriskowal: i could be misremembering. the senility and all, you know how it is. [18:51] kriskowal: i'm wondering why it's not sufficient for me to just throw [18:51] kriskowal: yeah, i do [18:51] isaacs: kriskowal: if you wanan throw, then throw [18:51] kriskowal: yeah, i'm trying to remember why that wasn't sufficient. [18:51] kriskowal: i wouldn't have gone out and read up on uncaughtExceptions if i didn't have to [18:52] isaacs: the issue is that throw will of course take you out of your existing function, whereas process.emit("uncaughtException" will let you continue on if there were listeners. [18:52] isaacs: throw x; y() [18:52] kriskowal: oh, right, that is what i was doing [18:52] isaacs: not the same as: if (listeners) emit(x); else throw x; y() [18:52] kriskowal: let me check whether i want that anymore [18:52] __tosh has joined the channel [18:52] kriskowal: i may have recently repented [18:52] isaacs: a simple throw would be the best, probably [18:52] kriskowal: yeah, i was doing something tricky originally [18:53] kriskowal: where i wanted to report the error just in case, but still go on with normal promisy things [18:53] isaacs: i see. [18:53] liar has joined the channel [18:53] kriskowal: yeah, i can simplify. thanks. [18:53] isaacs: this is the sorta thing that makes me love that CPS callback stuff. [18:54] isaacs: ;) [18:54] kriskowal: ah, well. it's ultimately cps [18:54] kriskowal: just with implicit error propagation and remote object proxying stuff [18:55] kriskowal: i wrote a pompous explanation a while back https://github.com/kriskowal/q/blob/master/design/README.js [18:55] wbw72 has joined the channel [18:55] kriskowal: basically a tour of how promises grow out of cps [18:55] cincinnatus has joined the channel [18:55] SubStack: Marak: hacknight eh? [18:56] Marak: SubStack: hook madness! [18:56] iammerrick has joined the channel [18:56] AvianFlu: call him captain hook.io [18:56] sharkbone: hi have to forward messages sent to client A from server to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding. Like this [Server] <==websocket==> [Client A] <==websocket==> [client B]. You can make reference to what i already started not sure if i am on the right path http://codepad.org/o5DaFW0L . [18:57] bloodsucker has joined the channel [18:57] bloodsucker: HiiiiiiI! [18:57] SubStack: jerrysv: dnode will work in IE again I just need to finish up my test harness [18:57] bloodsucker: Someone can compile this opengl module?: node-ogl https://github.com/tmpvar/node-ogl [18:57] bloodsucker: could* [18:58] bloodsucker: or someone know an alternative for opengl+node.js? [18:58] isaacs: kriskowal: README.js ftw [18:58] sharkbone: i have to forward messages sent to client A from server to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding. Like this [Server] <==websocket==> [Client A] <==websocket==> [client B]. You can make reference to what i already started not sure if i am on the right path http://codepad.org/o5DaFW0L . Any thoughts will do? [18:58] jerrysv: substack: i was just calling on his behalf :) [18:59] kriskowal: isaacs, yeah. poor man's markdown with syntax highlighting [18:59] pigmej has joined the channel [19:00] iammerrick has joined the channel [19:00] bloodsucker: Anybody knows a module for make OpenGL apps over node.js? [19:01] broofa has joined the channel [19:01] indexzero has joined the channel [19:01] fille12: are u able to build open gl aps in javascript? [19:01] sharkbone: i have to forward messages sent to client A from server to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding. Like this [Server] <==websocket==> [Client A] <==websocket==> [client B]. You can make reference to what i already started not sure if i am on the right path http://codepad.org/o5DaFW0L . Any thoughts will do? [19:02] thalll has joined the channel [19:02] dominictarr has joined the channel [19:02] adambeynon has joined the channel [19:03] bloodsucker: fille12, yeeah [19:03] bloodsucker: xD [19:03] iammerrick has joined the channel [19:04] sharkbone: i have to forward messages sent to client A from server to client B based on IDs (Ips or types) of the clients. In certain situations messages are sent straight to client A without forwarding. Like this [Server] <==websocket==> [Client A] <==websocket==> [client B]. You can make reference to what i already started not sure if i am on the right path http://codepad.org/o5DaFW0L . Any thoughts will do? [19:04] bloodsucker: There exists a perfect module. it doesn't use webgl and use instead it directly opengl [19:04] fille12: omg ! [19:04] bloodsucker: But i can't compile it...! [19:04] bloodsucker: :( [19:04] sh1mmer has joined the channel [19:04] fille12: okej [19:04] fille12: i guess its notin npm? [19:04] bloodsucker: this is the module: [19:04] bloodsucker: node-ogl https://github.com/tmpvar/node-ogl [19:05] bloodsucker: no, there are not npm module :( [19:05] bloodsucker: or i can't find it [19:05] fille12: i will git it [19:05] isaacs: bloodsucker: no package.json [19:05] bloodsucker: great! [19:05] devrim has joined the channel [19:05] bloodsucker: isaacs, what? [19:05] Destos: in jade is there any way to run queryscript.unescape on a string within a jade file? [19:05] isaacs: bloodsucker: in node-ogl [19:05] bloodsucker: isaacs, i can't understand you [19:06] isaacs: bloodsucker: sorry, you were asking about npm modules for node-ogl. i was saying that node-ogl doesn't have a package.json file in it. it's not an npm package. [19:06] bloodsucker: isaacs, oh, ok thanks! :P [19:06] tjholowaychuk: Destos != will not escape [19:06] tjholowaychuk: = does [19:06] bloodsucker: isaacs, mmm someone can compile it? xD [19:06] jomoho has joined the channel [19:06] isaacs: bloodsucker: but it has a wscript. you can `node-waf configure build` it, maybe [19:06] tjholowaychuk: and #{} will, !{} wont for interpolation [19:06] bloodsucker: it is... "easy" [19:06] bloodsucker: isaacs, it errors me :( [19:07] isaacs: bloodsucker: if you are on ubuntu and have apt-get installed the prereqs, that is [19:07] isaacs: bloodsucker: if it fails, you should post an issue there on that git repo? [19:07] bloodsucker: i filed a message in issues [19:07] isaacs: bloodsucker: oh, ok [19:07] isaacs: bloodsucker: you can also ping tmpvar if he's around. [19:07] bloodsucker: i am the last: https://github.com/tmpvar/node-ogl/issues/2 [19:07] isaacs: gotcha [19:07] bloodsucker: tmpvar?� [19:07] bloodsucker: i don't undestand you again xD [19:08] isaacs: oh... [19:08] isaacs: tmpvar is a person. [19:08] bloodsucker: who made node-ogl [19:08] isaacs: yeah, but it looks like this isn't compatible with the latest node. [19:08] isaacs: bloodsucker: tmpvar made node-ogl [19:08] isaacs: yes [19:08] bloodsucker: ohhhm [19:08] Destos: tjholowaychuk: Thanks, Ive been reading the docs on the github page and for some reason #{} and !{} aren't working. I'm dealing with a string thats been url encoded, so I believe using != would just output the encoded string [19:08] bloodsucker: isaacs, you recoend me that i sue node 0.3? [19:08] bloodsucker: instead of 4? [19:08] isaacs: " error: ‘class node::Buffer’ has no member named ‘data’" [19:08] isaacs: bloodsucker: not sure. [19:08] isaacs: bloodsucker: ask tmpvar :) [19:08] bloodsucker: isaacs, yea [19:09] bloodsucker: i will try it xD [19:09] bloodsucker: 0.3 is in ubuntus repo [19:10] bloodsucker: node_0.3.2-7.1_i386.deb in ubutus repo [19:11] bloodsucker: fuck! node-waf isn't in node 0.3 [19:11] bloodsucker: xD [19:11] bloodsucker: isaacs, you know howto run a waf file' [19:11] isaacs: bloodsucker: install from source. [19:11] tbranyen: wow ubuntu got 0.3 [19:11] tbranyen: stepping up [19:12] isaacs: :D [19:12] bloodsucker: tbranyen, i am using Ubuntu 10.04 [19:12] bloodsucker: sure that newer ubuntu have newers version of nodejs [19:12] bloodsucker: :p [19:12] tbranyen: bloodsucker: doesn't matter what version of ubuntu they all pull fom the same place [19:12] tbranyen: or do they? [19:12] tbranyen: i'm not an ubuntu user, but arch linux shares repos [19:12] MooGoo: repos are always way behind [19:13] raydeo: tbranyen: each version has its own repo [19:13] tbranyen: MooGoo: well ubuntu goes for stability not bleeding edge [19:13] tbranyen: raydeo: ah okay [19:13] MooGoo: yyeaaaaaa but still [19:13] tbranyen: which is weird that they picked 0.3 [19:13] tbranyen: which is unstable [19:13] tbranyen: heh [19:14] bloodsucker: tbranyen, ok, so i will die now xD [19:14] bloodsucker: anybody know howto compile node-ogl moduleeee?? xD [19:14] bloodsucker: poor me xD [19:15] bloodsucker: Today i was made a OpenGl (glut) exam [19:15] bloodsucker: xD [19:15] MooGoo: node opengl? [19:15] bloodsucker: MooGoo, ye! :P [19:15] MooGoo: I cannot comprehend [19:16] bloodsucker: thats why i "choosed" 0.3 version of node... for test if it runs there :( [19:16] tbranyen: node opengl sounds p awesome [19:16] bloodsucker: because it errors me using 0.4 [19:16] MooGoo: can we build guis and shit with node yet [19:16] sudhirjonathan has joined the channel [19:16] bloodsucker: MooGoo, can you rewrite your phare please? [19:16] bloodsucker: phrase* [19:16] MooGoo: are there you know...gtk libraries for node etc [19:17] bloodsucker: oh, thats sound great! :P [19:17] bloodsucker: i am sure that nodejs a module for a widgets libraries [19:17] tbranyen: MooGoo: tim caswell was working on something [19:17] tbranyen: node-gir [19:17] tbranyen: dunno if he's made any progress [19:17] brianseeders has joined the channel [19:18] MooGoo: it'll happen soon enough I'm sure [19:18] ap3mantus has joined the channel [19:18] MooGoo: node opengl tho sounds pretty awseome... [19:18] fille12: im have problem with the mime type in express css jade :( [19:19] bloodsucker: some know howto "run" a waf file using node 0.3? [19:19] MooGoo: node-waf no work? [19:19] bloodsucker: MooGoo, see the examples :https://github.com/tmpvar/node-ogl [19:19] addisonj: hrm... connect is failing to install the newest connect [19:19] bloodsucker: https://github.com/tmpvar/node-ogl ** [19:19] thejh has joined the channel [19:19] bloodsucker: MooGoo, node 0.3 don't have node-waf [19:19] addisonj: errr npm is failing to install the newest connect* [19:20] MooGoo: isnt node-waf just a wrapper around a v8 thing [19:20] thejh has left the channel [19:20] bloodsucker: MooGoo, so....? xD [19:20] bloodsucker: so sorry for my englih [19:20] bloodsucker: english* [19:21] JoseCabo: poor me [19:21] MooGoo: node-waf is just http://code.google.com/p/waf/[WAF], the python-based build system. node-waf is provided for the ease of users. [19:21] MooGoo: quote unquote [19:21] sechrist has joined the channel [19:22] JoseCabo: Thak MooGoo [19:23] MooGoo: u wecome [19:24] descipher_ has joined the channel [19:24] ap3mantus has joined the channel [19:24] burg has joined the channel [19:24] addisonj: anyone else having trouble getting connect@1.4.3 from npm? i get a failure with gzip [19:27] guybrush: addisonj: try `npm cache clean` [19:27] fille12: has no method replace [19:27] keikubo has joined the channel [19:27] fille12: what does that mean [19:27] addisonj: ACTION tips the hat to guybrush  [19:28] jmoyers: fille12 that means the object you're calling replace on is not a string ;-)? [19:29] fille12: fs.readFIle( function(err,data) the data is data and not a object [19:29] baudehlo: it depends. [19:29] baudehlo: if you setEncoding then it's a string. [19:30] baudehlo: if not, it's a Buffer [19:30] patrickarlt has joined the channel [19:30] fille12: hrm i put the data inside the less.render [19:31] yhahn has joined the channel [19:31] yhahn has left the channel [19:31] ewdafa has joined the channel [19:31] timmywil has joined the channel [19:31] yhahn has joined the channel [19:32] jhurliman has joined the channel [19:32] JoseCabo: baudehlo, be carefully with setEncondig because developers are deprecated this function [19:33] MooGoo: really? [19:33] JoseCabo: with the last version of node.js [19:33] MooGoo: it's always a buffer? [19:33] JoseCabo: err, i am looking for the changelog [19:34] JoseCabo: you should now use a opiton [19:34] dispalt: how do you catch econnrefused on an https.request attempt? [19:34] baudehlo: doesn't say deprecated in the docs. [19:34] dispalt: using 0.4.8 [19:34] baudehlo: says something about it in the TODO, but I'm pretty sure the TODO is kinda being ignored anyway. [19:35] JoseCabo: dibber, maybe i read that file. So sorry [19:35] indexzero has joined the channel [19:35] JoseCabo: Yes, MooGoo dispalt baudehlo it is in TODo section. [19:36] dispalt: JoseCabo: cool ill check it out [19:38] JoseCabo: Anybody knows howto compile node-ogl? For OpenGL in node.js https://github.com/tmpvar/node-ogl [19:38] baudehlo: so it's not deprecated in 0.4. I'd be pretty surprised if they deprecated it for 0.6. [19:39] lazyshot has joined the channel [19:42] erictj has joined the channel [19:43] JoseCabo: i've written an email to tmpvar user the owner of node-ogl [19:46] sveimac_ has joined the channel [19:46] JoseCabo: and now i am harassing with twitter xD [19:47] Mrfloyd has joined the channel [19:48] tbranyen: JoseCabo: i'm sure he loves that [19:48] thejh has joined the channel [19:48] JoseCabo: xD tbranyen he answer me! :D [19:49] tbranyen: try finding his home address and mailing him letters alerting him that you know where he lives "he he" [19:49] JoseCabo: tbranyen, xDDDDDDDDDDDDDDDDD [19:49] zmbmartin: is it a big deal to do post for create and put for update or can you use post for both? [19:50] adambeynon has joined the channel [19:50] sorens3n: its not a big deal [19:50] sorens3n: generally speaking [19:50] sorens3n: but not very REST like [19:50] sorens3n: some servers dont support PUT/DELETE/HEAD [19:51] sorens3n: so you mock it with POST's [19:51] JoseCabo: he's answer: it is not. It is all autogenerated though, so it should be relatively straight forward to fix #node #opengl [19:51] JoseCabo: so it is "easy" to fix it!! :D [19:51] JoseCabo: now... someone could fix it xD [19:52] martyziff has joined the channel [19:53] jamund has joined the channel [19:55] arpegius has joined the channel [19:55] martyziff has left the channel [19:56] sveimac_ has joined the channel [19:57] cognominal_ has joined the channel [19:58] Melkor__ has joined the channel [19:58] Brian` has joined the channel [19:59] riven` has joined the channel [19:59] riven has joined the channel [19:59] MrTopf has joined the channel [20:00] xandrews has joined the channel [20:00] trotter has joined the channel [20:01] thejh has left the channel [20:02] eee_c has joined the channel [20:03] temp01 has joined the channel [20:03] pyrony has joined the channel [20:04] sh1m has joined the channel [20:05] yozgrahame has joined the channel [20:05] Poetro has joined the channel [20:07] mwhooker has joined the channel [20:09] rauchg has joined the channel [20:10] kal-EL_ has joined the channel [20:12] mattly has joined the channel [20:12] cognominal_ has joined the channel [20:13] tmpvar: JoseCabo, hi there [20:14] JoseCabo: tmpvar, oh, hi! xD [20:14] tmpvar: I won't be near a ubuntu machine until later this evening [20:14] JoseCabo: I was trying to compile node-ogl like you know xD [20:14] JoseCabo: poor Ubuntu xD [20:14] tmpvar: but my guess, is that the signature for node's Buffer class has changed [20:15] JoseCabo: tmpvar, don't worry xD but could you say me which version of nodejs are compatbile with node-ogl? [20:15] JoseCabo: tmpvar, yes, it seems [20:15] JoseCabo: i don't know nothing about this :( [20:15] tmpvar: JoseCabo: https://github.com/tmpvar/node-ogl/blob/master/util/gen.php#L208-224 - those lines will need to be changed [20:16] ThinkPadBaudson has joined the channel [20:16] tmpvar: then you can re-generate the source [20:16] tmpvar: and it should compile [20:16] JoseCabo: wow, you are a crack [20:17] Skola_: love it when I checkout/reverse files after forgetting to commit [20:17] rfay has joined the channel [20:18] xerox: how does one install an executable inside ones' local $HOME node install [20:18] xerox: with npm [20:18] tmpvar: JoseCabo, haha, what? [20:18] xerox: "npm install thing" will install in ./node_modules/thing [20:18] xerox: "npm install -g thing" will install in /usr/local/... [20:19] JoseCabo: tmpvar, sorry, "crack" is a coloquial expresion here, in spain. xD [20:19] JoseCabo: meas that you are "the best" or similar xD [20:19] xerox: what about $HOME/.node if one has installed it there? [20:19] hdon- has joined the channel [20:19] JoseCabo: prefix? [20:19] Venom_X has joined the channel [20:19] Skola_: Jose here too (Holland) [20:19] xerox: oh I see [20:19] tmpvar: JoseCabo, hahah, good to know [20:19] Skola_: It's probably Americano expression, but not used there anymore : D [20:19] niftylettuce has joined the channel [20:19] Skola_: crackhead! [20:20] tmpvar: lol, yeah I thought he was poking at my php [20:20] xerox: "global" actually follows process.installPrefix [20:20] JoseCabo: i am sure xD tmpvar , haha Skola crack isn't a spanish word, so it is posible. [20:20] xerox: which is exactly what I need [20:20] JoseCabo: OMG xD [20:20] JoseCabo: not now... not now xD [20:20] JoseCabo: not when i want someone fix the lines xD [20:20] JoseCabo: it is ajoke [20:21] Skola_: :D [20:21] Skola_: I couldn't tell you were Spanish with all the xD [20:21] Skola_: only jajajajAJJAJja is missing [20:21] Skola_: xDD [20:22] sveimac has joined the channel [20:22] burg: hello. why , when i call method .handler(), i get this error: Cannot read property 'length' of undefined on this._transports.length ? http://codepad.org/FcifO1we [20:23] JoseCabo: oh, Skola [20:23] JoseCabo: Skola_, i wana die (xD) jajajaJAJJAAJja [20:23] Skola_: lol [20:25] jacobolus has joined the channel [20:26] knuthy has joined the channel [20:27] omni5cience has joined the channel [20:29] hdon- has joined the channel [20:30] perezd has joined the channel [20:30] TomY has joined the channel [20:30] tdegrunt has joined the channel [20:31] springmeyer has joined the channel [20:31] steadicat has joined the channel [20:31] dmojoryder has joined the channel [20:32] squeese has joined the channel [20:33] mikegerwitz has joined the channel [20:33] mikegerwitz has joined the channel [20:33] burg: any idea regarding that error? [20:34] sveimac has joined the channel [20:35] rauchg has joined the channel [20:35] ebryn has joined the channel [20:38] adambeynon has joined the channel [20:40] AvianFlu: "There just ain't no party like a javascript party, cause javascript parties don't block." -Chase Sechrist [20:40] sveimac has joined the channel [20:41] spro has joined the channel [20:42] brraaains has joined the channel [20:43] euforic has joined the channel [20:44] Poetro has joined the channel [20:44] Poetro has joined the channel [20:45] brraaains: question: If I have something a users creates, and then wants to save it to a file, how would I serve that file to the user, i.e, create a temporary file for them to download. I can create the file easily. [20:45] varioust has joined the channel [20:45] martyziff has joined the channel [20:46] SamuraiJack has joined the channel [20:46] kris_will: just push the stream directly to them [20:46] tomtomaso has joined the channel [20:46] sveimac has joined the channel [20:46] kris_will: no need to even write to disk [20:46] brraaains: but how would i do that as a downloadable link? [20:46] kris_will: is the file created on request? [20:47] kris_will: or is it something that happens in the background? [20:47] langworthy has joined the channel [20:47] thomblake has left the channel [20:47] brraaains: well, at first they upload a file to edit, then they would click "save" or something to get the newly edited copy [20:48] kris_will: in that case I would use a doc store, like mongodb [20:48] kris_will: or mogilefs [20:51] spro has left the channel [20:53] Mrfloyd has joined the channel [20:55] TomY has joined the channel [20:55] mahna has joined the channel [20:56] jmoyers: AvianFlu hahaha [20:56] jmoyers: thats great [20:56] jmoyers: i wish to RETWEET [20:59] jmoyers: SubStack browserify is totally trending right now [21:00] temp02 has joined the channel [21:01] brraaains: ahh figured another way to do it, just set "content-disposition:attachment" in the header and output the file [21:03] hdon- has joined the channel [21:03] cbibler_ has joined the channel [21:04] martyziff has left the channel [21:06] __tosh has joined the channel [21:06] tolmasky-macbook has joined the channel [21:06] sonnym has joined the channel [21:07] euforic has joined the channel [21:08] euforic: Any one know how to render and express partial with out an http request? [21:08] gsmcwhirter: euforic, you mean from the client side? [21:08] euforic: server side [21:08] sigs has joined the channel [21:08] varioust has joined the channel [21:08] gsmcwhirter: euforic, you can probably just use the template engine directly (if I am understanding what you want to do correctly) [21:08] euforic: I am using now.js for my connections to the server and want to build my dom serverside and send using now.js funtion [21:09] gsmcwhirter: euforic, res.render also accepts a callback that can let you do something with what is generated instead of it getting sent out [21:09] euforic: normally you would use res.render('partial name', {collection:collectionVar}); [21:10] euforic: but i have no res var because it is using the now.js socket function [21:10] mhausenblas has joined the channel [21:10] gsmcwhirter: euforic, ok. so you might want to just use the template engine on its own [21:11] mhausenblas_ has joined the channel [21:11] gsmcwhirter: you should be able to do "var jade = require('jade')" and then jade.render (or the equivalent for your template engine) [21:12] euforic: oh ok I didnt think of that thanks [21:12] erictj: euforic: as an aside, how is now.js working out for you, outside of the templating question? Do you like it? [21:12] chjj: euforic: depending on the templating engine, you might have to cache those compiled templates yourself then [21:13] tjholowaychuk: euforic i have an issue open for decoupling the view system from the request [21:13] euforic: @erict, I like now.js a lot but losing the whole request response deal makes it weird at times [21:13] tjholowaychuk: but for now yeah you'll have to use jade etc directly [21:13] SubStack: jmoyers: yep, noticed [21:14] SubStack: I'll do a blog post once I get some time to fix browserify's dependency culling for connectedness / require analysis [21:14] erictj: euforic: Gotcha. Very interesting. I'm weighing it for an upcoming project. [21:14] chjj: you could do something hacky: res.prototype.render.call({app:app}, name, opts, function(err, out) {}); [21:14] darshanshankar: sorry missed your messages in #nowjs euforic [21:15] darshanshankar: uhh reading sb, looks like you've got it figured out? [21:15] euforic: no worries darshanshankar [21:15] darshanshankar: erictj: if you have any questions about it for your project shoot me an email [21:15] SubStack: darshanshankar: nowjs should hop on the browserify bandwagon too! [21:15] darshanshankar: SubStack: I AGREE [21:15] SubStack: now that socketio is getting browserify support [21:15] darshanshankar: i saw that [21:15] euforic: tjholowaychuk yeah I just made a quick hack to do that but i decided to avoid issues when express updates [21:15] sechrist: SubStack: built in? [21:15] darshanshankar: SubStack: one of our guys will get on that soon [21:15] tjholowaychuk: euforic ah [21:15] darshanshankar: shouldn't be too hard at all [21:16] SubStack: awesome [21:16] SubStack: yeah should just be a matter of adding a "browserify" field to package.json [21:16] euforic: I have been trying to use now.js with titanium mobile but that hasnt been going so well with out using webviews [21:17] cl0udy has joined the channel [21:18] darshanshankar: euforic did you talk to Kosso? [21:18] darshanshankar: he made a nowjs + titanium app [21:18] euforic: tjholowaychuk on a side note thanks for all the great node modules. Your stuff made me really start pushing forward with node and ditching php [21:18] darshanshankar: it was cool watching chat work on a physical iPhone along with every browser [21:18] tjholowaychuk: haha woot! thanks, ditching php is always good [21:18] euforic: darshanshankar yeah he is using a webview and calling functions from with in it [21:19] darshanshankar: gotcha [21:19] darshanshankar: eventually we'll have a native objc client [21:19] darshanshankar: but we dont have the bandwidth on the team to build it right now :( [21:20] dave has joined the channel [21:20] kmwallio has joined the channel [21:20] dmojoryder has joined the channel [21:20] euforic: darshanshankar yeah I have slowly started to port now.js over to the socket.io titanium module https://github.com/saiten/TiSocketIO [21:21] davidcoallier has joined the channel [21:21] euforic: darshanshankar so you might be able to use that as a good starting point. Build for titanium though and let people extract the obj c if they want it haha [21:21] darshanshankar: haha cool [21:22] joshthecoder has joined the channel [21:22] darshanshankar: i remember someone actually started building the NowJS ObjC client [21:23] darshanshankar: damn its empty lol https://github.com/FluffyJack/NowObjC [21:23] bitwise_: anyone know if there is a newline delimiter in the coffeescript repl [21:24] bitwise_: meaning a way to run multiline scripts in there [21:26] euforic: bitwise_ what is the advantage to using coffescripts? I take comfort in my braces haha, but I see tons of people using it [21:27] perezd_ has joined the channel [21:28] bitwise_: euforic: well i figure im already learning jade, express, and node why not throw another layer of complexity on to the stack [21:28] jhurliman: has anyone written a url shortening service in node? i'm not really feeling the $1000/mo bit.ly price tag for uncapped redirects [21:28] LowValueTarget has joined the channel [21:28] Wizek_ has joined the channel [21:29] bitwise_: the syntax is a little cleaning [21:29] euforic: jhurliman have you checked out https://github.com/giacecco/node.ly [21:29] jhurliman: looking, thanks [21:30] jslatts has joined the channel [21:33] perezd_ has joined the channel [21:36] knuthy has joined the channel [21:36] NuckingFuts has joined the channel [21:37] viz has joined the channel [21:39] NuckingFuts: ACTION yawns a 'good afternoon' [21:40] tyrrvk has joined the channel [21:42] nkuttler has joined the channel [21:42] andrenkov has joined the channel [21:42] NuckingFuts: If self-executing closures were a drug, I would be a crack addict. [21:42] reid has joined the channel [21:44] tbranyen: NuckingFuts: you mean functions [21:44] tbranyen: closure and function aren't synonymous [21:44] NuckingFuts: tbranyen: Oh sorry [21:45] knuthy has joined the channel [21:46] brraaains has left the channel [21:46] SubStack: explicit recursion? meh [21:46] tbranyen: immediately invoked function expression :D [21:46] SubStack: implicit recursion through higher-order functions is where it's at [21:47] NuckingFuts: tbranyen: I use that to form closures though :S [21:47] hybsch has left the channel [21:48] NuckingFuts: I prefer self-executing functions in place of objects, though I probably shouldn't. [21:48] NuckingFuts: I just like that I can finely control what variables I make public [21:49] tbranyen: NuckingFuts: works well for a lot of things [21:49] tbranyen: just gotta be careful not to introduce mem leaks [21:49] insin: ACTION subscribes to the We're All Adult Here underscore out of pythonic habit [21:50] xandrews has joined the channel [21:50] NuckingFuts: tbranyen: Yeah, though it's not really easy to do that in JS. [21:50] hybsch has joined the channel [21:50] Schmallon has joined the channel [21:51] NuckingFuts: And seeing as I don't often venture lower than JS or PHP, I think I'm safe :P [21:51] tbranyen: NuckingFuts: just marking them as undefined should alert GC to remove [21:51] tbranyen: them being the private vars [21:51] NuckingFuts: tbranyen: Yeah, though a lack of references can also help with that :P [21:51] NuckingFuts: I usually don't have many short-lived variables [21:52] NuckingFuts: If I'm using a variable, it's generally for something I'm gonna need later. [21:52] fille12: fuck im so out of ideas [21:52] fille12: i lost my creativity years ago =( [21:52] AvianFlu: yeah, you and hollywood both [21:53] fille12: i got this wonderfull tool [21:53] NuckingFuts: lol [21:53] fille12: but i dont know how to use it for [21:53] NuckingFuts: AvianFlu: Problem hollywood's got is that it's all been done. [21:53] NuckingFuts: ACTION pulls up "It's All Been Done" by Barenaked Ladies [21:53] fille12: :D [21:54] AvianFlu: Rule 34, NuckingFuts. Rule 34 [21:55] k1ttty has joined the channel [21:55] fille12: well anyone got a good enterprenuer twitter guy for spare ? [21:57] Marak has joined the channel [21:57] nkuttler: fille12: what's an entrepreneur twitter guy? [21:58] fille12: nkuttler a guy that twittering about his start up [21:58] Marak: isaacs: you alive? npm is bombing for me on a simple package install. crash and npm-debug.log - https://gist.github.com/4a726d358467f4423e42 [21:58] isaacs: Marak: still alive, yes [21:58] isaacs: Marak: what are you installing? [21:58] isaacs: (or, not installing, i guess) [21:58] Marak: npm install mailer [21:58] Marak: it works outside this one directory too [21:59] isaacs: Marak: gist output! do with -dd! [21:59] isaacs: i will read your gist and comment! [21:59] Marak: isaacs: 10-4 [21:59] isaacs: make sure to use exclamation points, because they make text more fun and exciting!!! [21:59] isaacs: CAPS TOO!! [22:00] isaacs: it installed for me just fine! [22:00] insin: ACTION observes the movement of underpants towards heads as the exclamation mark tally rises [22:00] dandean has joined the channel [22:00] fille12: when i talk to people about node.js, they just shrug and says : Php will win in the end [22:02] isaacs: fille12: that's funny. [22:02] dandean: hahaha - because it's totally a battle or something. seems like they can both be used just fine to me. [22:02] isaacs: as if software will "end" [22:02] burg: how can i create more different instances of a class defined in a module? or maybe how should i define that class? [22:02] isaacs: "That screwdriver may seem nice, but I think hammers are gonna win in the end." [22:02] isaacs: burg: export a constructor, and then use "new"? [22:02] fille12: nod, i trying to convince people. its really hard [22:03] isaacs: fille12: when they say "php will win in the end", just nod and say, "Yeah. Sorta like hammers." [22:03] Marak: isaacs: i dont know what you mean by -dd, i sent you gist of error report, should i open up a github issue instead? [22:03] isaacs: Marak: where's the gist?! [22:03] Marak: isaacs: you alive? npm is bombing for me on a simple package install. crash and npm-debug.log - https://gist.github.com/4a726d358467f4423e42 [22:03] tyrrvk: question about compiling node.js on a centos box.... [22:03] isaacs: oh there it is! [22:03] tyrrvk: what path should I install to? [22:03] varioust has joined the channel [22:04] tyrrvk: docs say $home/local [22:04] dandean: fille12: people that need to be convinced aren't worth convincing. They approach software dogmatically and have no interest in things they're not using already. [22:04] gsmcwhirter: is there a standard node Error object, or did my memory just make that up? [22:04] Marak: i wouldnt bother you for a package install problem unless something was fucked and i had an error message to show, i promise [22:04] Marak: im sure i borked something locally [22:04] Marak: i just dont know what to do to fix it [22:04] fille12: they are afraid for change [22:04] jaywastaken has joined the channel [22:04] isaacs: Marak: Maybe try npm cache clean? [22:05] fille12: the thought that they need to learn a new language [22:05] isaacs: ACTION needs to lay off the exclamation points! maintaining this level of energy is tiring! [22:05] insin: v8> typeof Error [22:05] v8bot: insin: "function" [22:05] wlkh has joined the channel [22:05] fille12: time for bed [22:05] Marak: isaacs: same thing, Error: Failed gzip "--decompress" "--stdout" "/tmp/npm-1307743567183/1307743567183-0.8573009397368878/tmp.tgz [22:05] fille12: wave! [22:05] isaacs: g'nite [22:05] Marak: not in gzip format [22:05] fille12: thansk man [22:05] fille12 has left the channel [22:07] isaacs: Marak: the weird thign is that it works for me... [22:07] Marak: isaacs: it works for me too, just not in this one folder [22:07] Marak: im trying in a few places [22:07] Marak: its a clean folder too [22:07] isaacs: Marak: that's so creepy, dude [22:07] isaacs: the folder super should not matter. [22:07] Marak: could it have to do with the fact that word mailer is also in the name of the project? [22:08] tim_smart has joined the channel [22:08] brownies has joined the channel [22:08] isaacs: Marak: i don't think so [22:08] Marak: im inside "hook.io-mailer" and im installing "mailer" [22:08] Marak: ill try a test [22:08] isaacs: Marak: right, but i install "npm" inside of "npm-test-package-blerg" all the time [22:09] euforic: tjholowaychuk is it possible to populate a href id dynamically in jade and also add custom attributes ex.) [22:09] euforic: -each item in items [22:09] euforic: ol [22:09] euforic: a##{item.itmId}(href="#" custom="test") #{item.itmMemo} [22:09] Marak: okay, so i can install into hook.io-tailer [22:09] tjholowaychuk: euforic a(id=foo) [22:09] SubStack: isaacs: I am now turning burrito into a crazy traverse-style helper for ast manipulations on top of uglify [22:09] isaacs: SubStack: whoa, nice! [22:09] Marak: w t f [22:09] euforic: tjholowaychuck yep that wasn't obvious lol sorry [22:09] isaacs: Marak: if you chagne the name in hook.io-mailer's package.json, does that affect anything? [22:09] SubStack: since to get stack traces I need to wrap calls and I don't want to write that with the array syntax [22:10] euforic: tjholowaychuk yep that wasn't obvious lol sorry [22:10] Marak: isaacs: i was trying to install before with no package.json in place, but i can try changing it around now [22:10] isaacs: Marak: the only thing that's target-folder-specific is the node_modules folder. if you move that out of the way, does that solve the problem? [22:10] Marak: there is no node_modules folder [22:10] isaacs: Marak: what's ls -laF node_modules output? [22:10] isaacs: ok... [22:10] tjholowaychuk: euforic the foo.bar.baz and foo#bar are just sugar, you can still do foo.bar(class=baz)#whatever text [22:10] tjholowaychuk: etc [22:10] isaacs: Marak: what's `npm prefix` output? [22:11] Marak: ./Users/maraksquires/dev/hook.io-mailer [22:11] isaacs: oh, right [22:11] isaacs: i see that in the debug.log [22:11] Marak: i did a clean whipe of the dir, and mkdir a new one [22:11] Marak: same issue [22:11] Marak: its the location it doesnt like i think [22:11] Marak: it works in other places [22:11] Marak: if i just nuke the folder that should fix it right? how is that not working? [22:12] isaacs: dude, wtf... [22:12] isaacs: that's so super creepy [22:12] Marak: i know [22:12] Marak: im just gonna put it in /dev/test/hook.io-mailer [22:12] Marak: that works [22:12] isaacs: yeah, works for me [22:12] Marak: ill sleep on it and see what happens [22:12] isaacs: Marak: tree /Users/maraksquires/dev/hook.io-mailer [22:13] isaacs: er, find, not tree [22:13] isaacs: anything weird in there? like a .DS_Store or .Icon or some other creepy mac shit? [22:13] Marak: . /Users/maraksquires/dev/hook.io-mailer /Users/maraksquires/dev/hook.io-mailer/mailer /Users/maraksquires/dev/hook.io-mailer/package.json [22:13] Marak: hrmm [22:13] Marak: ohh shit [22:13] jmoyers: haha [22:13] jmoyers: creepy mac shit [22:13] Marak: i know why [22:13] Marak: im retarded [22:13] isaacs: o_O? [22:14] isaacs: that's not why [22:14] Marak: there is a node script in the root called "mailer" [22:14] isaacs: oh, maybe that's it? [22:14] Marak: yeah for sure [22:14] isaacs: ohhhh.... [22:14] Marak: let me rename it [22:14] isaacs: grrrrr [22:14] isaacs: that's a bug. [22:14] hiperk has joined the channel [22:14] Marak: i found a bug?!?!?!?! [22:14] isaacs: what sucks is that it's JUST FUCKING LIKE a bug I JUST FIXED YESTERDAY. [22:14] isaacs: yeah, you found a bug! [22:14] Marak: DID I GET A PRIZE!?!?!?! [22:14] isaacs: you are a winrar! [22:14] isaacs: YES! [22:14] Marak: OMFG [22:15] isaacs: Marak: don't rename your thing. just do `npm install mailer@latest` [22:15] Marak: ohh heh, it installs now [22:15] Marak: how strange [22:15] isaacs: yeah [22:15] xerox: unfortunately you'll be shipped a prize.zip [22:15] Marak: ill try that isaacs [22:15] isaacs: it's saying, "is there a file named mailer? oh, there is. he must mean this thing, which must be a tarball so i'll just unzip that puppy and----OH SWEET JESUS WHAT IS THIS THING!!?!!?!?" [22:15] Marak: lol [22:16] mscdex: it should output that to stdout [22:16] Marak: isaacs: mailer@latest worked [22:16] Marak: isaacs: :-) [22:16] indexzero has joined the channel [22:16] AvianFlu: mscdex++ [22:16] v8bot: AvianFlu has given a beer to mscdex. mscdex now has 22 beers. [22:16] isaacs: oh i guess i already fixed it on head [22:16] Marak: even better [22:16] isaacs: but it outputs some dumb "not in gzip format" stuff... [22:16] isaacs: that's kinda lame [22:16] insin: npm-flow-of-conciousness would be awesome [22:16] Marak: i dont know if its a "bug" per sey [22:17] Marak: fucking y [22:17] insin: npm package - Lemme just see here, HOLY FUCK developer, RTF-JSON-M [22:17] Marak: either way, that way funny [22:17] isaacs: Marak: could you please post an issue? the next version will not die on that class of error, but it should just avoid it. [22:17] Marak: isaacs: 10-4 [22:18] cole has joined the channel [22:21] cognominal has joined the channel [22:21] paznicul has joined the channel [22:22] Marak: isaacs: filed. that is a strange fucking edge case [22:22] rburhum has joined the channel [22:22] isaacs: yeah [22:22] isaacs: so, once upon a time, it would never ever try to install something locally unless it had a / in the name. [22:22] isaacs: so, you'd ahve to do `npm install ./package.tgz` [22:22] isaacs: and people got annoyed that `npm i package.tgz` woulnd't work, so i tested for that [22:22] isaacs: but now it breaks in new ways. [22:23] markwubben has joined the channel [22:24] NuckingFuts: Any good libs for building REST APIs? [22:24] NuckingFuts: Preferably something akin to expressJS? [22:25] Swimming_bird has joined the channel [22:25] mscdex: i think there's several [22:25] Marak: isaacs: imo, keeping the ./ might have been the better move [22:25] mscdex: restler? [22:25] Marak: more node life [22:25] mscdex: i think is one [22:25] Marak: like [22:26] asobrasil has left the channel [22:26] dguttman_ has joined the channel [22:26] NuckingFuts: restler? [22:26] mscdex: NuckingFuts: https://github.com/danwrong/restler or https://github.com/maxpert/Reston [22:27] mscdex: or https://github.com/pfleidi/node-wwwdude [22:27] mt3ck has joined the channel [22:28] NuckingFuts: mscdex: Wow, I'm surprised I didn't see your name on any of the libs :P [22:28] NuckingFuts: Some of you guys have like 5,000 libs [22:28] mscdex: NuckingFuts: nah, i'm not much of a web guy yet. i'm a sucker for net protocols :p [22:28] mscdex: and other crazy stuff [22:29] davidcoallier has joined the channel [22:30] duncanbeevers: mscdex: Seen? https://sites.google.com/site/webrtc/ [22:31] NuckingFuts: mscdex: lol I forgot I'm looking for a REST Server :P [22:31] mscdex: duncanbeevers: yes [22:31] NuckingFuts: All those are client libs XD [22:31] isaacs: NuckingFuts: check out restify [22:31] NuckingFuts: not much use for me, since I'm trying to make a REST api [22:31] NuckingFuts: Maybe I should make a REST lib, and call it resticles [22:31] mscdex: oh [22:31] mscdex: https://github.com/kriszyp/pintura [22:32] isaacs: NuckingFuts: https://github.com/mcavage/node-restify#readme [22:32] NuckingFuts: Think that's a good name? XD [22:32] mscdex: there's one ? [22:32] mscdex: :p [22:32] perezd has joined the channel [22:32] isaacs: NuckingFuts: i've used restify. it's nice. [22:32] catshirt has joined the channel [22:32] isaacs: NuckingFuts: it's like just the routing and middleware patterns from express, but with less monkey-patching and zero templating. [22:33] isaacs: NuckingFuts: and first-class support for doing stuff like returning JSON if the client accepts it, getting params from the body or from the query string, etc. [22:33] mscdex: the node wiki modules list could use more categorization [22:33] tjholowaychuk: connect only monkey-patches in one place [22:33] mscdex: more/better [22:33] tjholowaychuk: and wouldnt have to if node supported multiple cookies :P [22:33] JoseCabo: I love nodejs!! who here loves node too? Is the best [22:33] mscdex: JoseCabo: node.js rules! [22:33] isaacs: tjholowaychuk: I guess i should say "extends" rather than "patches" [22:33] JoseCabo: node.js + mootools :babas [22:33] isaacs: tjholowaychuk: and yes, our cookie support kinda is lame. [22:33] mscdex: i thought 0.5 allows multiple headers now? [22:33] isaacs: tjholowaychuk: that's tricky to get right [22:33] NuckingFuts: Ooooh Restify sounds better [22:34] unlink has joined the channel [22:34] mscdex: guess not? [22:34] unlink has joined the channel [22:34] mscdex: :s [22:34] NuckingFuts: isaacs: I like the looks of Restify, it sounds like something I'd make :P [22:34] isaacs: rule of thumb: if you are displaying webpages for web browsers, you almost certainly should use express. if it's just an API, then restify is quite nice. [22:34] NuckingFuts: Lightweight, no bloat [22:34] isaacs: express isn't bloat if you're dealing with web browsrs. [22:34] isaacs: most of its extension are actually really super useful. [22:34] tjholowaychuk: NuckingFuts it has more files than express does [22:34] tjholowaychuk: lol [22:34] isaacs: and templating. you need that. [22:34] tjholowaychuk: i think express might be smaller [22:35] isaacs: tjholowaychuk: but in terms of conceptual overhead and api surface, express is pretty big. [22:35] NuckingFuts: isaacs: My plan is to make a nice REST API for the site, with jQuery + AJAX frontent [22:35] tjholowaychuk: yeah express is smaller [22:35] isaacs: yoer' just terser than mark is :) [22:35] tjholowaychuk: isaacs not really [22:35] NuckingFuts: But with a fallback on regular basic HTML [22:35] tjholowaychuk: https://github.com/mcavage/node-restify/blob/master/lib/server.js [22:35] tjholowaychuk: != nice [22:35] tjholowaychuk: != small [22:36] tjholowaychuk: == mess [22:36] NuckingFuts: Which I'm planning to build on ExpressJS [22:36] isaacs: oh, wait, he also put in the request stuff. [22:36] isaacs: tjholowaychuk: i've been using express and restify both a lot lately. [22:36] NuckingFuts: mcavage? Muff Cavage? [22:36] isaacs: tjholowaychuk: they're both good, but target different use cases. [22:36] tjholowaychuk: people use express for pure json all the time [22:36] isaacs: tjholowaychuk: if you have a rest api that has to talk to other rest apis, restify is really convenient. [22:36] NuckingFuts: isaacs: Is there any way to do API calls locally from a ExpressJS site? [22:37] NuckingFuts: Because I want to have non-AJAX fallbacks [22:37] hellp has joined the channel [22:37] mt3ck has joined the channel [22:37] paznicul has joined the channel [22:37] isaacs: tjholowaychuk: and it just gets all the data from wherever the data is, exposes it nicely, etc. it's not really for talking directly to web browsers. [22:37] isaacs: (unless you like reading json) [22:37] tjholowaychuk: i dont see how it differs [22:37] NuckingFuts: I'm gonna use jQuery shit to allow me to use regular links (no hashbang), then override that [22:38] isaacs: tjholowaychuk: well, talking to an upstream API is a bit more streamlined. it's especially good when you have a lot of archaic legacy rest APIs that take data or return data in weird formats. [22:38] NuckingFuts: tjholowaychuk: ExpressJS is GREAT for making a site, not so much for making an API [22:38] isaacs: tjholowaychuk: it's good for my use case because mcavage built it explicitly for my exact use case. (he's a coworker of mine) [22:39] tjholowaychuk: the examples im seeing look identical to express [22:39] isaacs: yeha, it's not clear what it's better for until you use express and restify both to do the same job. [22:39] tjholowaychuk: NuckingFuts ... that's naive [22:39] tjholowaychuk: it's insanely simple to extend [22:39] NuckingFuts: There are certain things in ExpressJS that make it not so great for an API [22:39] tjholowaychuk: do explain [22:39] NuckingFuts: tjholowaychuk: I tried, it's not as easy as you say. [22:40] mt3ck: what do you prefer? [22:40] tjholowaychuk: server.get('/my/:name', function(req, res) { [22:40] tjholowaychuk: res.send(200, { [22:40] tjholowaychuk: name: req.uriParams.name [22:40] tjholowaychuk: express: [22:40] isaacs: tjholowaychuk: it's nice to be able to have something that abstracts out all the different ways that data can be posted/put into your API, and just give you a single object. [22:40] martyziff has joined the channel [22:40] NuckingFuts: And I really want something lightweight and focused more on the specifics of REST [22:40] tjholowaychuk: app.get('/my/:name', functoin(req, res){ res.send({ name: req.params.name }); }); [22:40] isaacs: tjholowaychuk: the API is very similar, but they target different sets of edge cases. [22:40] NuckingFuts: I love the API style of ExpressJS [22:40] isaacs: tjholowaychuk: you can also use the client to do stuff like client.get("/foo/bar", function (er, responseData) { ... }) [22:40] dmojoryder has joined the channel [22:41] tjholowaychuk: isaacs ah, didn't know there was a client end [22:41] paznicul has joined the channel [22:41] isaacs: tjholowaychuk: oh, wait, that might be a different hting... [22:41] NuckingFuts: "name could be in the query string, in a form-urlencoded body, or a JSON body" [22:41] isaacs: ACTION don't wanna speak out of turn [22:41] NuckingFuts: That sounds AWESOME [22:41] tjholowaychuk: NuckingFuts req.param('name') [22:41] isaacs: NuckingFuts: yeah, that's the data input abstraction i'm talking about [22:41] tjholowaychuk: lol [22:41] tjholowaychuk: express has that [22:41] tjholowaychuk: and has for a very long time [22:42] ParadoxQuine has joined the channel [22:42] NuckingFuts: Meh, I still want something more API-oriented [22:42] tjholowaychuk: lol..... [22:42] jslatts has joined the channel [22:42] NuckingFuts: Since my API and website are separate daemons in this project [22:42] ap3mantus has joined the channel [22:42] xandrews has joined the channel [22:42] mt3ck: is the mvc example best place to start building api with express? [22:42] isaacs: NuckingFuts: if you're going to need templates (the V part of MVC), then you need express. [22:43] NuckingFuts: isaacs: Yeah, honestly, I'm gonna be more like MVVC, since I'll have 2 different V's [22:43] sethmcl has joined the channel [22:43] Remoun has joined the channel [22:43] isaacs: NuckingFuts: restify actually makes it hard to do anything other than a rest web service. that is by design. it's not a replacement for express. it's a way to have a more limited set of functionality that keeps your program from growing. [22:43] NuckingFuts: One is AJAX-driven [22:43] tjholowaychuk: seems that i need to add a REST example [22:44] NuckingFuts: isaacs: Yeah, that sounds like something I really need lol [22:44] NuckingFuts: I can go overboard sometimes XD [22:44] isaacs: NuckingFuts: but since you have a view layer, you need templating and whoatnot, and may as well just use express from the get-go [22:44] NuckingFuts: isaacs: Well, I need to keep my API and website servers separate [22:44] SubStack: you don't need express as such but it can be handy [22:45] NuckingFuts: Like, 100% independent [22:45] NuckingFuts: I want to be able to spin up extra API servers whenever needed [22:45] masylum has joined the channel [22:45] isaacs: NuckingFuts: if you say so :) [22:45] SubStack: I've been thinking about the interface for that [22:45] viz has joined the channel [22:45] NuckingFuts: isaacs: Ideally, the Basic HTML stuff (handled by ExpressJS), will be minimally used. [22:46] SubStack: NuckingFuts: you can do the rendering browser-side [22:46] NuckingFuts: Since jQuery will be generating HTML from AJAX calls [22:46] isaacs: NuckingFuts: express and restify play pretty nicely with one another. it's pretty easy to trivial express frontend sites that talk to a restify api server (or many) [22:46] paznicul has joined the channel [22:46] NuckingFuts: isaacs: That's what I'm figuring on. [22:46] SubStack: using weld or jadeify or something like that [22:46] tjholowaychuk: NuckingFuts im still waiting to hear what parts are bad [22:46] tjholowaychuk: so i can fix them [22:47] mt3ck: lol [22:47] SubStack: tjholowaychuk: partials >:D [22:47] nook has joined the channel [22:47] NuckingFuts: tjholowaychuk: Simple, ExpressJS isn't explicitly designed for an API. I don't want a jack-of-all-trades, I want specialization. [22:48] tjholowaychuk: NuckingFuts HOW [22:48] SubStack: what sort of api? [22:48] tjholowaychuk: give me some reasons already lol [22:48] tjholowaychuk: an API [22:48] NuckingFuts: Because specialization allows me to use libraries which are explicitly focused on their use cases. [22:48] SubStack: you could always write a middleware or use dnode [22:48] tjholowaychuk: is nothing more than a method, and a url [22:48] tjholowaychuk: omg [22:48] NuckingFuts: tjholowaychuk: But the end result is different [22:48] tjholowaychuk: ACTION frustration [22:48] Swimming_bird has joined the channel [22:48] rauchg: NuckingFuts [22:49] SubStack: tjholowaychuk: plz 2 get rid of partials [22:49] NuckingFuts: The URL plays a different role [22:49] tjholowaychuk: you dont get it man [22:49] brianseeders has joined the channel [22:49] rauchg: so if express dropped `.render` [22:49] tjholowaychuk: at the end of the day [22:49] tjholowaychuk: everything [22:49] rauchg: then it'd be all of a sudden [22:49] rauchg: better for apis ? [22:49] tjholowaychuk: is a method and a url [22:49] Cleer has joined the channel [22:49] tjholowaychuk: you can build rails-style routing from it, namespaced style, regular express style [22:49] NuckingFuts: rauchg: No, because it's still built primarily for websites. [22:49] tjholowaychuk: NO ITS NOT [22:49] NuckingFuts: How hard is this to understand? YOU CAN'T DO EVERYTHING. [22:49] tjholowaychuk: N-O-T [22:50] rauchg: it seems to me that it's built for HTTP [22:50] martyziff_ has joined the channel [22:50] NuckingFuts: pick a focus and STICK TO IT [22:50] tjholowaychuk: omg lol [22:50] devrim has joined the channel [22:50] tjholowaychuk: k [22:50] insin: ACTION suggests aliasing everything exactly as it is in a 'rest-api' module - special! :) [22:50] tjholowaychuk: go nuts [22:50] mwhooker has joined the channel [22:50] isaacs: tjholowaychuk: i wouldn't say that there are parts of express that are bad, per se [22:50] NuckingFuts: ExpressJS is AMAZING. [22:50] NuckingFuts: I love it. [22:50] dguttman has joined the channel [22:50] paznicul has joined the channel [22:50] tjholowaychuk: isaacs im just asking for reasons, i want to hear what is getting in the way [22:51] tjholowaychuk: and see if it can be fixed [22:51] isaacs: tjholowaychuk: what's getting in the way is that it has templating at all. [22:51] NuckingFuts: tjholowaychuk: There's nothing wrong with it. [22:51] rauchg: isaacs because it has it ? [22:51] SubStack: isaacs: is there something in uglify that will dump source if you give it an ast? [22:51] isaacs: tjholowaychuk: if i open up the git repo of a server, and see that it's using restify, i don't even bother wondering if something is output as html or json. it's *always* json [22:51] SubStack: I don't like its walker very much [22:51] squeese_ has joined the channel [22:51] NuckingFuts: ExpressJS takes my database stuff and spits out a website [22:51] tjholowaychuk: isaacs you dont need to use views :s [22:51] tjholowaychuk: at all [22:51] rauchg: so you want OutgoingMessage.prototype. to be lighter. [22:51] isaacs: SubStack: there's the beautiful stuff. but really you should just learn to love the ast :) [22:51] tjholowaychuk: this argument makes no sense [22:52] NuckingFuts: And a REST API takes the database and spits out the model [22:52] isaacs: SubStack: *beautify [22:52] NuckingFuts: It's two different layers [22:52] tjholowaychuk: omg.. [22:52] SubStack: isaacs: I do love the ast I just don't like the built-in walker is all [22:52] tjholowaychuk: res.send(obj) [22:52] NuckingFuts: Well, the data [22:52] martyziff_ has joined the channel [22:52] tjholowaychuk: OBJ [22:52] tjholowaychuk: JSON [22:52] tjholowaychuk: application/json [22:52] isaacs: tjholowaychuk, rauchg: yeah, i don't have to. but i'm not the only one who writes code ehre. [22:52] SubStack: I'd rather do a recursive traversal myself with my far superior libraries for this sort of thing ;) [22:52] varioust has joined the channel [22:53] isaacs: SubStack: oh, i kinda dig thte walker api, but yeah, you can traverse it however you like, and then just pass it to the beautify thingie. i forget excactly where it is. [22:53] SubStack: aha cool [22:53] isaacs: SubStack: ie, you can walk over it a few times, do whatever mutations you want, and then just pass ti to the built-in walker that outputs code. [22:53] SubStack: gen_code() mebs? [22:53] TomY has joined the channel [22:53] isaacs: yah, that sounds good [22:53] SubStack: yeah I can do that too [22:53] rauchg: isaacs i don't see how you can construct an argument from that though [22:54] NuckingFuts: I'm gonna try this Restify thing and see how it runs [22:54] isaacs: tjholowaychuk: does express automatically do the Accept methods stuff and 405 responses? [22:54] SubStack: hmm that's not it... [22:54] tjholowaychuk: isaacs with express-resource yes [22:54] isaacs: rauchg: i didn't realize that this was an argument. [22:54] NuckingFuts: isaacs: Does Restify support PUT? [22:54] tjholowaychuk: isaacs one sec i'll show you an example [22:54] isaacs: rauchg: with restify, if i have to build a json api, it's one thing that's designed just to do just that, and doens't do anything else. it's kinda nice. [22:55] jdalton has joined the channel [22:55] ctide has joined the channel [22:55] tjholowaychuk: its kinda bigger than express [22:55] isaacs: express is a more complicated machine with more moving parts and things that can be abused. [22:55] NuckingFuts: tjholowaychuk: It doesn't matter if it's bigger. [22:55] tjholowaychuk: :s [22:55] isaacs: restify is like express that's already pre-tuned for one use case. [22:55] NuckingFuts: What matters is the complexity [22:55] rauchg: i won't use node.js because i just need net server but node has a http server [22:55] tjholowaychuk: code quality should matter [22:55] tjholowaychuk: that code i saw is not quality [22:55] isaacs: using it is simpler. there's no "just do this". you "just" install restify, and it's already good. [22:55] tjholowaychuk: or battle tested like connect/express [22:55] rauchg: i'll recreate node with just a net server [22:55] rauchg: and call it netify.js [22:56] NuckingFuts: Okay, why isn't the latest 0.4.x compiling on my Cygwin? [22:56] isaacs: tjholowaychuk: what's wrong with teh code? [22:56] timmywil has joined the channel [22:56] rburhum has left the channel [22:56] tjholowaychuk: isaacs it looks like a little kid wrote it [22:56] isaacs: tjholowaychuk: invalid. ad hominem. [22:56] saschagehlich has joined the channel [22:56] isaacs: tjholowaychuk: either the code has specific problems, or it just looks different, which only means it's not the style you prefer. [22:56] NuckingFuts: Valid point [22:57] rauchg: agreed w/isaacs haha [22:57] isaacs: it's not the style i prefer either, but then again, neither is express or node-core :) [22:57] NuckingFuts: isaacs: The style is not entirely unlike mine. [22:57] paznicul has joined the channel [22:57] rauchg: isaacs [22:57] SubStack: oh hah pro.gen_code does the trick after all [22:57] rauchg: is restify based on connect ? [22:57] NuckingFuts: I use tabs, though, and I prefer var foo = function() over function foo () [22:57] SubStack: awww yissss [22:57] isaacs: rauchg: no [22:58] tjholowaychuk: I give up, but I would like feedback for portions that are missing/wrong/bad/broken whatever [22:58] SubStack: craziest shit ever landing soon [22:58] NuckingFuts: isaacs: Oh, no WONDER it's bigger than ExpressJS! [22:58] isaacs: tjholowaychuk: nothing bad or broken with express, imo. [22:58] NuckingFuts: ... tjholowaychuk, there's nothing wrong with it. [22:58] isaacs: tjholowaychuk: it's just more general than restify. [22:58] NuckingFuts: It's absolutely perfect. [22:58] NuckingFuts: isaacs: Precisely. [22:58] isaacs: tjholowaychuk: using tools that are more targeted is sometimes a good thing. [22:58] rauchg: isaacs: so let's say i need restify [22:58] rauchg: with basic auth [22:58] SubStack: isaacs: except for partials [22:58] rauchg: waht do i do ? [22:58] SubStack: fuck those [22:58] SubStack: everything else is ok though [22:59] tjholowaychuk: ugh, ok. lol. i give up, but myself and many others have used it just fine [22:59] NuckingFuts: isaacs: Does it support OAuth, BTW? [22:59] tjholowaychuk: for "non website" things [22:59] _rain has joined the channel [22:59] NuckingFuts: Or will I hafta do that myself? [22:59] NuckingFuts: Preferably OAuth2 [22:59] rauchg: every time you need something that could be middleware [22:59] rauchg: you'll re-invent it [22:59] rauchg: for restify [22:59] tjholowaychuk: isaacs here's the example though https://github.com/visionmedia/express/blob/master/examples/content-negotiation/app.js [22:59] rauchg: so for example [22:59] tjholowaychuk: one could abstract even further [22:59] tjholowaychuk: if desired [22:59] SubStack: the middleware api is pretty nice [22:59] rauchg: i could POST 500MB to restify and blow up your process [23:00] rauchg: or i could just include https://github.com/senchalabs/connect/blob/master/lib/middleware/limit.js [23:00] NuckingFuts: Middleware is nice, but still [23:00] SubStack: monkey patching req and res can get a bit much though sometimes [23:00] SubStack: maybe there's a better way to namespace the methods [23:00] rauchg: i could re-write basic auth for restify [23:00] rauchg: or use the appropriate middleware [23:00] tjholowaychuk: SubStack yeah that was one of the primary reasons i wanted connect separated from express, where express would be the slightly more opinionated "sugar" layer [23:00] saschagehlich: rauchg: did you already see my live quiz done with socket.io? :) [23:00] rauchg: logging, profiling, everything will be re-invented for restify [23:00] rauchg: but that's a good thing, because it's meant to do REST only [23:00] rauchg: :/ [23:00] NuckingFuts: Okay, what is the use-case for Connect, exactly? I can't see it as anything more than a chunk of Express? [23:01] isaacs: rauchg: make sure that req.authorization.scheme.toLowerCase() is "basic" and then check out req.authorization.basic.username/password [23:01] tjholowaychuk: NuckingFuts similar to ruby's rack [23:01] Shinuza has joined the channel [23:01] tjholowaychuk: abstraction layer [23:01] SubStack: NuckingFuts: connect is like diet express [23:01] NuckingFuts: tjholowaychuk: Not a Ruby coder :S [23:01] SubStack: 0 carbs, no sugar, caffeine free [23:01] NuckingFuts: SubStack: Ah, okay [23:01] isaacs: rauchg: there's a max upload size. [23:01] isaacs: rauchg: it has logging already [23:01] NuckingFuts: isaacs: Auth? [23:01] NuckingFuts: Like OAuth? [23:01] isaacs: you guys seem a little offended by restify's existence. am i reading that wrong? [23:01] tjholowaychuk: im not offended [23:02] isaacs: NuckingFuts: i don't know if oauth is supported. [23:02] tjholowaychuk: options are great [23:02] SubStack: well I don't like rest so much :p [23:02] tjholowaychuk: i just dont think there's a valid reason not to use express in those cases [23:02] SubStack: but that is not restify's fault [23:02] isaacs: tjholowaychuk: try it :) [23:02] tjholowaychuk: if you're already using it etc [23:02] rauchg: not offended, i think it just ignored a big part of the community which is connect [23:02] rauchg: but i don't see the technical argument for it [23:02] NuckingFuts: isaacs: I'm eager to study it, perhaps study the concepts and build a layer around Express for myself ;-) [23:02] jmoyers: people have been on a json only kick [23:02] jmoyers: its religious [23:02] jmoyers: you see .render and you go [23:02] blaenk: nodejs noob: can I split my source into different files and then require them? provided they're in the same directory? [23:02] jmoyers: THAT IS NOT PART OF MY RELIGION [23:02] tjholowaychuk: jmoyers yeah i think that's exactly it [23:02] isaacs: tjholowaychuk: the next time you need to build a strictly data api, try it. [23:03] SubStack: blaenk: you can just require('./someotherlib') [23:03] isaacs: seriously [23:03] blaenk: ohhh ./blah, okay thanks! [23:03] isaacs: the thing that's nice is that there's no selection, no extension, no nuthing [23:03] SubStack: node knows aaaaallll about the ./s [23:03] tjholowaychuk: but express does exactly what i want [23:03] tjholowaychuk: i want to take my legos [23:03] tjholowaychuk: and put them together [23:03] isaacs: tjholowaychuk: sure :) [23:03] blaenk: it works now thanks SubStack :) [23:03] SubStack: blaenk: oh and then in someotherlib.js assign into exports [23:03] tjholowaychuk: not have someone else make decisions for me [23:03] NuckingFuts: jmoyers: I use EJS on ExpressJS for my sites. [23:03] SubStack: hooray [23:03] blaenk: assign into exports? I'll have to look that up thanks [23:03] SubStack: exports.foo = 'bar' [23:03] Cleer has left the channel [23:03] SubStack: exports is the object that require() returns [23:03] jmoyers: NuckingFuts you can't tell me that you can build something literally identical to something built in restify with express [23:04] jmoyers: the api is trivially different [23:04] SubStack: see also: module.exports [23:04] blaenk: SubStack: ohhhh that makes sense now thanks :) [23:04] malkomalko has joined the channel [23:04] blaenk: yeah I found the doc page [23:04] NuckingFuts: jmoyers: The difference is minimal, yes, but it's still a more specific purpose [23:04] jmoyers: so i guess the point is, people want smaller increments -- don't provide templating as a standard, provide it as a mixin later? [23:04] jmoyers: thats not a real software reason [23:04] jmoyers: is it slower? [23:04] NuckingFuts: So shoot me, I like having a specific thing [23:05] jmoyers: is it too complicated to understand? [23:05] NuckingFuts: jmoyers: specificity is a perfectly valid reason. [23:05] blaenk: SubStack: can I do require.paths.unshift('.') to avoid having to do './' ? [23:05] jmoyers: to duplicate software? [23:05] NuckingFuts: ExpressJS is very much a general-purpose thing [23:05] blaenk: SubStack: just asking cause http://jherdman.github.com/2010-04-05/understanding-nodejs-require.html does it [23:05] jmoyers: i dont think so, personally [23:05] jmoyers: if it comes down to religion, thats fine [23:05] SubStack: blaenk: don't do that [23:05] jmoyers: i'd just call it that [23:05] blaenk: SubStack: okay I wont :) [23:05] SubStack: require.paths is icky and it's going away [23:05] NuckingFuts: Wheras something specifically designed for the sole purpose of taking a REST api and spitting out JSON [23:05] blaenk: I don't mind ./ anyways was just wondering [23:05] NuckingFuts: SubStack: Orly? [23:05] SubStack: well it had better go away [23:06] SubStack: sooner or later [23:06] NuckingFuts: It's a nice debugging tool [23:06] SubStack: NuckingFuts: just make a node_modules and throw stuff in there [23:07] SubStack: blaenk: yeah that link is super wrong [23:07] SubStack: well not wrong as such but not a good idea [23:08] jmoyers: why is require.paths going away? [23:08] NuckingFuts: SubStack: for my apps, I split it into parts, and they might all depend on some common elements, so I have them export a function (usually named "a", since exportinga function directly doesn't seem to work for me) that accepts the common thing as an argument, and then do require('./thingy.js').A(common); [23:08] SubStack: jmoyers: because it's global so if you have a module that messes with it you can screw everything else up that uses require() [23:08] jmoyers: ah [23:08] jmoyers: so why not make paths local to the module? [23:08] blaenk: SubStack: I'm wondering. I defined a class (say, 'Player') in a file and then required it in and it seems to be working by just requiring it and using the class later, should I export the player class anyways? [23:08] NuckingFuts: SubStackWhy not replace i with a getter? [23:08] jmoyers: seems like a nice bit of transparency imo [23:08] eee_c has joined the channel [23:09] SubStack: jmoyers: that might be a satisfactory compromise [23:09] blaenk: SubStack: I think because that class is on the global space, so I'm wondering if it's better practice to export it [23:09] NuckingFuts: ACTION moves to his dual-screen setup to code around a bit [23:10] SubStack: blaenk: yes don't put things in global scope [23:10] saschagehlich: anyone else @nodecampeu tomorrow? [23:10] SubStack: exports are much nicer [23:10] blaenk: thank you :D [23:10] SubStack: you can do exports.Player = function () {} or module.exports = function () {} if you just have the 1 export [23:10] niftylettuce has joined the channel [23:10] SubStack: I tend to do module.exports more than exports since I usually only have 1 thing worth exporting per file [23:11] davro has joined the channel [23:11] SubStack: but styles differ and they're both useful [23:12] samsonjs has joined the channel [23:13] fljitovak has joined the channel [23:13] davidcoallier has joined the channel [23:14] blaenk: SubStack: wait a minute, I think what you just said answers my next question but I couldn't understand it [23:14] blaenk: basically I only have one class in this file named after the class (Player class, player file), and I'd like to export it [23:14] jmoyers: so [23:14] jmoyers: module.exports = Class [23:14] blaenk: but it'd be weird to do player = require './player.js', then player.Player each time [23:14] xerox: subsequent 'require's of something that registers an handler for some signal will add more and more handlers right? [23:14] SubStack: yep, module.exports is the way to go for that [23:14] jmoyers: also, if you said the word 'class' in #javascript, they'd shoot you in the face [23:15] blaenk: sweet, so then player = require will just set player to that class? [23:15] jmoyers: ^ [23:15] blaenk: thanks then :) [23:15] SubStack: (var player) [23:15] SubStack: lexicals ftw, booo globals [23:15] blaenk: haha I called it class cause that's the keyword in coffeescript [23:15] isaacs: jmoyers: check out the API docs on modules: http://nodejs.org/docs/v0.4.8/api/modules.html [23:15] blaenk: I just don't wanna mention coffeescript cause I feel like I'll be lynched [23:15] isaacs: jmoyers: lots of explanation there. [23:15] paznicul has joined the channel [23:15] xerox: what is a good way to remove the signal handlers and redo a require without starting the process from scratch? [23:15] blaenk: thanks :) [23:15] jmoyers: oh i've read it [23:15] jmoyers: ;-) [23:15] isaacs: kewl :) [23:16] slickplaid: i like coffeescript [23:16] jmoyers: ACTION gasps [23:16] slickplaid: it's like a guilty pleasure of mine heh [23:16] jmoyers: i like it too [23:16] jmoyers: don't tell anyone around here though [23:16] slickplaid: ACTION zips [23:19] kmiyashiro has joined the channel [23:20] xandrews has joined the channel [23:21] ryanmcgrath has joined the channel [23:21] perezd has joined the channel [23:23] niftylettuce has joined the channel [23:23] kmiyashiro: isaacs: ever fix this problem in OS X? https://gist.github.com/1019998 [23:24] isaacs: kmiyashiro: i thought so. [23:24] jaywastaken has joined the channel [23:24] isaacs: kmiyashiro: were you already using 1.0.10 when you got that error? [23:24] coreb has joined the channel [23:24] kmiyashiro: I dont' think so, I think it was updating from the previous patch version [23:24] isaacs: oh ok [23:24] isaacs: yeah, do the curl | sh, that error should not show up next time [23:24] kmiyashiro: ok sweet [23:25] jakehow has joined the channel [23:25] kmiyashiro: thanks [23:26] highermath_away has joined the channel [23:27] NuckingFuts: Does the MinGW build have OpenSSL yet? [23:27] saschagehlich has joined the channel [23:28] jhurliman: 1) fork a node library on github, 2) login to cloud9ide, clone the project, 3) make a change, git commit/push, 4) send a pull request to the author without leaving the browser. THE FUTURE IS COOL [23:29] xerox: agreed [23:29] NuckingFuts: ... How do I uninstall Cygwin? I need to reinstall it, because I accidentally my install. [23:29] mwhooker has joined the channel [23:29] rabidewok: 3.5) push to heroku to test? [23:30] insin: just delete the directory [23:30] alessio_alex has joined the channel [23:30] NuckingFuts: Hmmm, then I'll need to get a list of what I've got on NPM [23:30] alessio_alex: help [23:31] isaacs: NuckingFuts: npm ls [23:31] NuckingFuts: isaacs: I'm on old NPM [23:31] isaacs: NuckingFuts: npm ls installed [23:31] NuckingFuts: Ah okay [23:32] NuckingFuts: I'll just pipe it into a file :B [23:32] xerox: is there some tool to run against a .js file to see where ; are automatically placed? [23:33] MrNibbles has joined the channel [23:33] xerox: to troubleshoot one's understanding of the matter :) [23:33] NuckingFuts: xerox: Here's an idea: use semicolons normally ;) [23:33] NuckingFuts: It makes life a lot easier to make everything explicit [23:34] xerox: no I don't want a debate I read stuff and I am happy [23:34] NuckingFuts: And as I understand, it's just at line endings that it shoves semicolons :P [23:34] xerox: hehe no [23:34] xerox: but nevermind [23:35] brettgoulder has joined the channel [23:37] Mrfloyd has joined the channel [23:39] yozgrahame has joined the channel [23:39] dnuke has joined the channel [23:39] NuckingFuts: ACTION backs up his /home/ folder [23:43] isaacs: xerox: it's easier to talk about newline-elision than semicolon-insertion [23:43] level09 has joined the channel [23:44] isaacs: xerox: explained here: http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding [23:44] isaacs: xerox: (warning: opinions) you don't really need a tool. it's pretty simple, really. [23:44] mape: someone should make a js mmorpg that is all about trolling code issues on irc [23:44] isaacs: mape: haha [23:44] isaacs: mape: 10k XP for getting emacs and vim users to insult one another's intelligence. [23:45] mape: isaacs: lets make on of those disruptive web2.0 cloud thingymadoos and make tons of money on that [23:45] mape: isaacs: yeah shouldn't be to hard to cdoe [23:45] mape: *code [23:46] mape: * You just met Lady Python and she needs her {}, go into #python and get them [23:47] replore has joined the channel [23:47] leed0 has joined the channel [23:49] mandric has joined the channel [23:49] xerox: isaacs: I am lazy, that's why I thought there could be a program [23:50] isaacs: mape: lolz [23:50] Xi0 has left the channel [23:51] coleGillespie has joined the channel [23:52] maushu_ has joined the channel [23:52] addisonj has joined the channel [23:55] AAA_awright_ has joined the channel [23:55] _jgr has joined the channel [23:56] dmojoryder has joined the channel [23:58] blaenk: is it possible to start the coffee interpreter with node.js? like, associated with node.js, so I can do require calls etc. [23:59] addisonj has joined the channel [23:59] mape: just parse and rund? [23:59] mape: *-d