[00:00] creationix: man, updating my server to node 1.29 is a lot of work. At least the api changes are for the better
[00:08] mikeal has joined the channel
[00:18] mattly has joined the channel
[00:19] atcrabtree has joined the channel
[00:24] JimBastard has joined the channel
[00:24] JimBastard: stupid disqus.com and their blocking script injection
[00:24] JimBastard: i got it non-blocking, but it still sucks
[00:25] gwoo has joined the channel
[00:30] pdelgallego has joined the channel
[00:37] jashkenas: straw poll: got a favorite node.js templating library?
[00:39] tmpvar has joined the channel
[00:40] kriskowal_ has joined the channel
[00:42] creationix: jashkenas: haml-js of course ;)
[00:42] jashkenas: Coulda guessed.
[00:43] creationix: though I like most of them
[00:43] jashkenas: How about code size -- any really tiny ones?
[00:43] creationix: http://ejohn.org/blog/javascript-micro-templating/
[00:44] jashkenas: I guess an implementation of Resig's micro-templating will always be the smallest.
[00:44] jashkenas: Right.
[00:44] creationix: mustache is pretty good too
[00:45] creationix: jashkenas: there were a couple of long threads on the list arguing over this. Why do you ask?
[00:45] jashkenas: Just curious what people are using, and how happy they are with them and Node. The last bit of
[00:46] jashkenas: The last bit of Ruby in CoffeeScript is the ERB documentation generation, and when I replace it I'll need a Node templating substitute for ERB.
[00:46] creationix: I find micro-templates a pretty good erb substitute
[00:47] creationix: I think janl has the main mustache port http://github.com/janl/mustache.js
[00:50] RayMorgan: I also maintain a mustache clone specifically for Node at: http://github.com/raycmorgan/Mu though will have to update a couple things tonight to reflect the new API changes in the latest version of Node
[00:51] RayMorgan: really just posix -> fs changes
[00:51] jashkenas: creationix: are your fs changes the only breaking ones, or were there more yesterday to watch out for?
[00:53] stepheneb has joined the channel
[00:55] JimBastard: MUSTACHE
[00:55] JimBastard: FOR SHIZZLE
[00:56] mikeal: haha
[00:57] mikeal: janl added streamed writes to mustache.js
[00:57] mikeal: but it's not node specific
[00:59] jed has joined the channel
[01:04] dekz_ has joined the channel
[01:13] blackdog` has joined the channel
[01:18] guan has joined the channel
[01:23] jashkenas: ryah_away: the assert module uses "throws" to assert that an exception was thrown -- unfortunately, "throws" is one of the Java keywords reserved by JavaScript. It doesn't get past JSLint.
[01:24] pdelgallego has joined the channel
[01:25] ryah_away: jashkenas: that's annoying.
[01:25] kriskowal: indeed
[01:26] kriskowal: commonjs should change that
[01:26] kriskowal: i think it's on the list of known issues
[01:26] cloudhead has joined the channel
[01:27] kriskowal: oh, it's not. i'll add it
[01:28] jashkenas: cloud be assert.throwsObject, or assert.raises, or assert.exception, or assert.throwsException
[01:28] jashkenas: s/cloud/could
[01:28] kriskowal: my first proposal was assert.error(…)
[01:28] jashkenas: ah, better.
[01:28] kriskowal: http://wiki.commonjs.org/wiki/Unit_Testing/A/Voting
[01:29] deanlandolt: isn't that no longer an issue in es5?
[01:29] kriskowal: yes, it's not a problem in ES5
[01:30] kriskowal: but it is a problem in ES5 as implementable in ES3 :P
[01:30] jashkenas: But, it's not a problem in the browser.
[01:30] deanlandolt: still, i know we should be good and backward compatible...but if you're in es3 then suck it up and use your quotes :D
[01:30] kriskowal: rhino and some versions of safari still choke on it
[01:30] jashkenas: Not the latest safari.
[01:30] deanlandolt: i'm sure rhino will fix that
[01:30] kriskowal: yeah, a lot of things are better in recent safari
[01:30] pdelgallego has joined the channel
[01:31] jashkenas: fortunately, safari has rapid uptake
[01:31] kriskowal: i used to file bugs against it for a living :P
[01:31] kriskowal: my personal favorite was the 99 frame stack limitation, and second favorite was console.log.call(null) crashed the whole app
[01:35] bryanl has joined the channel
[01:38] gwoo has joined the channel
[01:43] mattly has joined the channel
[01:45] isaacs has joined the channel
[01:45] tmpvar: how valuable do you guys think a workflow type engine would be in node?
[01:46] isaacs: ugh, i see talk of microtemplates in the logs.
[01:46] isaacs: i should really finish up the ejs implementation...
[01:46] jashkenas: (sorry issacs) -- your objection is?
[01:46] tmpvar: ejs?
[01:46] isaacs: my objection is that resig's microtemplate example is agood proof of concept that kind of sucks a lot.
[01:47] isaacs:
this breaks a lot
[01:47] tmpvar: agreed, i like beepole/pure :)
[01:47] isaacs: <% print("%>") // so does this, for two reasons %>
[01:47] jashkenas: yeah, it's just a regex, but in real-world use it's never let me down.
[01:47] davidjrice: eh, what version did posix change to fs?
[01:47] isaacs: davidjrice: the most recent one
[01:47] jashkenas: two days ago, or thereabouts.
[01:47] mikeal: mustache FTW
[01:48] tmpvar: so no love for the "workflow" engine idea huh?
[01:48] isaacs: tmpvar: not sure what that means
[01:48] davidjrice: isaacs: cool cheers
[01:48] davidjrice: mikeal: yes, mustache!
[01:48] tmpvar: fine fine, ill proof it :)
[01:48] jashkenas: my objection to templating languages that don't allow you to execute arbitrary code is that at a certain point, you'll need to.
[01:49] isaacs: tmpvar: code is much more eloquent than talking
[01:49] tmpvar: agreed
[01:49] jashkenas: And then you're screwed.
[01:49] isaacs: jashkenas: exactly, that's why erb is good, and a nice haml style thing would be good, to
[01:49] tmpvar: i dont like templating engines that destroy the template by evaling/removing tags
[01:51] isaacs: using regexes on html lets demons out of the firey abyss.
[01:51] isaacs: that's why i usually avoid it.
[01:52] davidjrice: I've actually found using mustache and a 'value object' quite a nice paradigm
[01:52] davidjrice: it's basically like, the presenter pattern then
[01:52] JimBastard: jashkenas: doesnt mustache fix that?
[01:53] JimBastard: kinda just butting in sorry
[01:53] tmpvar: shame on you
[01:53] JimBastard: heh i had to deal with disqus.com and their stupid ass blocking JS widget all day
[01:53] tmpvar: (aka, whaaz up JimBastard!)
[01:53] JimBastard: :-(
[01:53] JimBastard: lolz
[01:53] jashkenas: JimBastard: mustache let's you execute arbitrary code?
[01:53] JimBastard: well i guess not inside a view
[01:54] JimBastard: but you can pass it arbitrary code kinda
[01:54] JimBastard: since you are passing it JSON you can embed methods
[01:54] JimBastard: or reference other methods
[01:54] tmpvar: i dont like that at all
[01:54] jashkenas: sure, if you get things set up correctly beforehand, then simple variable substitution is all you need, but sooner or later it'll bite you, I promise.
[01:54] JimBastard: it works well for me because at the end of the day my views are crazy simple to work with
[01:54] JimBastard: so i can pass off the HTML to a designer
[01:54] jashkenas: It happened to the NYTimes this afternoon.
[01:55] jashkenas: Using Liquid for the olympics coverage.
[01:55] JimBastard: ohh?
[01:55] jashkenas: Couldn't call to_string on an integer when the needed to.
[01:55] tmpvar: jashkenas, you work for the times?
[01:55] jashkenas: They could easily update the views, but didn't want to have to do a full deploy of the Rails app.
[01:55] JimBastard: yeah
[01:55] JimBastard: well i'm only using mustache for JS
[01:55] JimBastard: not ruby at all
[01:56] jashkenas: Twenty minutes of panic -- if they could have used arbitrary code, there's no worry about getting caught in golden handcuffs.
[01:56] tmpvar: i know a couple people that work at the times
[01:56] jashkenas: tmpvar: with them, not for them -- DocumentCloud is under the auspices of the Times.
[01:56] jashkenas: oh?
[01:56] tmpvar: yeah, a flex person, and a java dev
[01:56] JimBastard: ohh yeah jashkenas you are the underscore and coffee script guy right
[01:57] jashkenas: tmpvar: In the Web department?
[01:57] tmpvar: i believe so
[01:57] jashkenas: tmpvar: I'm more on the newsroom side -- different floors, different teams, etc.
[01:57] tmpvar: got ya
[01:59] JimBastard: at the end of the day templating languages are only a tool, if you find yourself in a situation where its becoming a hassle just don't use one or build some custom shit
[01:59] Yuffster has joined the channel
[01:59] bpot has joined the channel
[01:59] JimBastard: thats assuming your dev team won't choke
[02:01] JimBastard: mixing logic into your views isnt the end of the world, you just gotta be really aware of the repercussions
[02:01] mahemoff has joined the channel
[02:01] Yuffster has joined the channel
[02:02] Yuffster has joined the channel
[02:21] stepheneb has joined the channel
[02:29] abadr has joined the channel
[02:31] isaacs has joined the channel
[02:36] kriskowal has joined the channel
[02:43] dnolen has joined the channel
[02:51] pdelgallego has joined the channel
[02:53] pdelgallego has joined the channel
[02:56] jashkenas: Are there any known issues with Node/UTF8? I just got a bug report from someone who had an ellipsis character become an ampersand, and an umlaut become a question mark.
[02:56] jashkenas: But when I try it, they come out the other end just fine -- (On Node on OS X)
[02:57] jashkenas: ryah_away: Perhaps this is better addressed to you -- any funny business with Node/UTF8 on different platforms?
[02:57] abadr: jashkenas: I don't know anything about Node, but there are two issues: 1. Is the server sending the right bytes? and 2. Is the browser interpreting them correctly?
[02:57] jashkenas: This is entirely from the command line
[02:58] jashkenas: No browser/server involved here.
[02:58] abadr: Well nevermind then :)
[02:58] jashkenas: http://github.com/jashkenas/coffee-script/issues#issue/178
[02:59] inimino: jashkenas: I've seen a few issues with encoding confusion
[03:00] inimino: jashkenas: if you can produce a small test case that runs in node I can probably tell you what's going on or if it's a bug
[03:01] jashkenas: inimino: Well, I can't reproduce it -- it's working fine for me (on OS X). I'm thinking it's an underlying library or platform thing.
[03:01] inimino: hm, ok
[03:02] inimino: hard to say without a reproducible test case...
[03:03] jashkenas: I'll let him know -- thanks.
[03:03] inimino: sure
[03:05] bengl has joined the channel
[03:09] creationix has joined the channel
[03:09] arlolra has joined the channel
[03:09] kriskowal: looking at the code the other day, it's entirely possible that utf-8 multi-byte sequences might be broken across data chunk boundaries
[03:10] creationix has joined the channel
[03:10] jashkenas: His precise test case is in that ticket, but when it compile it it comes out fine as JS on the other end, so it's not inherent to Node.
[03:11] [Pwner]John has joined the channel
[03:12] [Pwner]John: ACTION suicides
[03:13] [Pwner]John: Bah, I can't get it to work :(
[03:15] bronson has joined the channel
[03:20] [Pwner]John: So is it something wrong with the linux or am I missing something.
[03:21] dnolen has joined the channel
[03:21] scudco has joined the channel
[03:26] jed has joined the channel
[03:28] gbot2 has joined the channel
[03:28] davidjrice: hey guys, anyone written an upstart script, having trouble getting it to be found
[03:28] brandon_beacher has joined the channel
[03:33] unomi has joined the channel
[03:53] JoePeck_ has joined the channel
[03:54] [Pwner]John: ACTION facepalms
[03:54] ryah_away: [Pwner]John: still the waf problem?
[03:54] [Pwner]John: yep.
[03:54] ryah: :<
[03:54] [Pwner]John: ACTION headdesks
[03:54] [Pwner]John: Is there something wrong with my python? :<
[03:55] [Pwner]John: or did my admin install it wrong
[03:56] [Pwner]John: Oh! Is missing a component a problem with this?
[03:56] [Pwner]John: and do you need root access
[03:56] Yuffster has joined the channel
[03:59] creationix: davidjrice: I've got two out of three of mine working
[04:24] hassox has joined the channel
[04:34] steadicat has joined the channel
[04:53] r11t has joined the channel
[04:53] dnolen has joined the channel
[04:59] isaacs: ryah: hey, pull this: http://gist.github.com/308443
[05:00] isaacs: http://github.com/isaacs/node/commit/d7ad45c231b369289f2b7ee20e494ae2b693fafb
[05:00] isaacs: tiny bugfiz
[05:16] mikeal has joined the channel
[05:25] creationix: Is it bad if I feel anger when people don't understand what continuations are and go of talking about how promises are better?
[05:25] creationix: I don't know why it gets to me
[05:26] hassox has joined the channel
[05:26] abadr: This might be pretty basic, but what's the best way to run multiple versions of node? Turns out I need the net2 branch
[05:27] creationix: adabr: run one from the build/default directory
[05:27] creationix: or manually install it to a different location
[05:27] unomi has joined the channel
[05:28] abadr: Ok, thanks. Any idea on merge plans for that branch?
[05:30] [Pwner]John: ryah: Would installing waf help?
[05:31] Tim_Smart has joined the channel
[05:38] kriszyp: creationix: I am curious what you mean by continuations?
[05:38] kriszyp: JS doesn't support continuations
[05:38] kriszyp: well, rhino does, but no other VMs
[05:38] creationix: well, I'm not really sure what they should be called http://gist.github.com/308452
[05:38] creationix: inimino called them continuations
[05:39] creationix: but it's a function that returns a function that accepts a callback
[05:39] creationix: instead of returning an object that has a method to attach a callback (promise)
[05:40] kriszyp: so you are angry at people that don't understand continuations, but you don't know what is a true continuation?
[05:40] kriszyp: not trying to being mean
[05:40] kriszyp: just seems a little harsh
[05:40] creationix: like I said, it shouldn't bother me
[05:40] mikeal has joined the channel
[05:40] creationix: I hope my email didn't come out too harh
[05:40] kriszyp: A true continuations is a capture of a call stack
[05:41] kriszyp: V8 doesn't support true continuations
[05:41] kriszyp: and it is doubtful that true multi-frame continuations like scheme's will ever be in EcmaScript
[05:41] kriszyp: although JS1.7 generators are sort of a form of single-frame continuations
[05:41] inimino: kriszyp: I called them continuables, but I don't agree with that definition of a true continuation
[05:42] inimino: kriszyp: a continuation is just the remainder of a computation to be performed
[05:42] inimino: (people use it in the call/cc sense, but it has a broader meaning as well)
[05:43] kriszyp: there is continuation passing style is which is often used to refer to the less formal notion of a capture of continuing execution
[05:43] kriskowal: in any case, "continuables" are simply a variation on "continuation passing style", which is distinct from true call/cc continuations
[05:43] kriszyp: and "continuable" doesn't have any formal CS definition, so you can use that however you want
[05:43] inimino: I think Tom Van Cutsem's reply was well-meaning but he probably hasn't been following the thread, so may have inadvertently stepped on some toes :)
[05:44] kriskowal: a continuation is a first class object that represents a capture of the call stack, which can be effectively modeled as cascading function calls
[05:45] kriszyp: yeah, if you use formal CS terms, IMO they should be used correctly, but continuables is a nice cute term for CPS
[05:45] inimino: kriskowal: that's a call/cc style definition, I'd say that's "the current continuation" but a narrower meaning than "continuation" itself
[05:46] creationix: how about we just call them deferred functions or curried functions
[05:46] inimino: and "continuables" as I use it has a more specific meaning than just CPS
[05:46] creationix: it's easier to type anyway
[05:46] kriszyp: anyway, I think that the gist we collaborated on was pretty self-evident of the relative ease of each construct (https://gist.github.com/602efd6a0d24b77fda36)
[05:46] kriskowal: "curried for callbacks" is probably a succinct name.
[05:47] kriszyp: yeah, thats seems like an accurate name
[05:48] inimino: yes, that's the meaning
[05:48] kriskowal: i think the problem that "callback curriers" solve is the partitioning the the argument space, so the options and variadics of the base function can be separated from the callback and optional errback
[05:48] inimino: but the name continuable is much more catchy :)
[05:48] creationix: well, it's obvious that I can't keep continuation and continuation apart in my mind. I said continuation when I meant continuation 3 times in the last 10 minutes
[05:49] creationix: lol
[05:49] inimino: creationix: ...
[05:49] inimino: hehe
[05:49] kriskowal: in any case, they do not solve the problem that tom says promises solve
[05:49] creationix: ** continuation when I mean continuable (see, there's proof)
[05:49] creationix: kriskowal: how so?
[05:49] inimino: creationix: you did it both times :P
[05:49] kriskowal: which is true; the percolation of rejections. nor do they solve rejection recovery.
[05:50] kriszyp: right, continuables don't provide the safety and ease of use promises, thats why the promise examples in the gist were so much simpler and clearer
[05:50] kriskowal: promises model async try/catch semantics
[05:50] abadr: Sorry for newb questions. I cloned node, checked out the net2 branch, configured and maked. Now I'm trying to run node-aqmp by referencing the `node` executable in build/default, but it's saying it can't find the module 'net'. What am I missing?
[05:50] inimino: kriszyp: I didn't find them any simpler or clearer, fwiw
[05:50] kriskowal: so, if you neglect to associate an errback, there's a causal graph behind the scenes that the rejections can forward to
[05:50] kriszyp: serious?
[05:50] creationix: the library bentomas made abstracts away the error handling, my version doesn't abstract anything away, but it's simple and direct
[05:50] inimino: kriszyp: perfectly
[05:51] kriskowal: promises dramatically cut back on the amount of error recovery code you need to scaffold
[05:51] kriszyp: I find hard to believe you are looking at it objectively then
[05:51] kriszyp: sorry, if I sound rude :/
[05:51] inimino: kriszyp: I would doubt either one of us is.
[05:51] kriskowal: and tom's point that the API doesn't change is spot-on; you return promise instead of T
[05:52] fwg: i don't see major difference in character count
[05:52] kriszyp: anyway, I am perfectly comfortable letting the examples speak for themselves
[05:52] kriskowal: character count is not the point
[05:52] abadr: anyone? :)
[05:52] kriskowal: i mean, i've played my share of perl golf, but this isn't the place for it
[05:53] inimino: kriskowal: that's what a Continuable really is, it's a typeclass
[05:53] creationix: abadr: I think it's called net2
[05:53] fwg: abadr: try starting from build/default
[05:53] inimino: Continuable A is a function that takes a function which is called with type A at some future point, that's it
[05:53] abadr: creationix: it's not
[05:54] abadr: fwg: same thing
[05:54] kriskowal: inimino you really ought to read markm's paper; he speaks the point so much more clearly than we students can
[05:54] creationix: abadr: sounds like you're using the wrong node version for the library. Ryan should know if you can find him
[05:54] kriskowal: there are a lot of subtle invariants that promises maintain, way beyond simply calling a function with an eventual result.
[05:54] inimino: kriskowal: which one?
[05:54] abadr: where does node look for modules?
[05:55] kriskowal: they separate resolution from observation, they protect from malicious attempts to re-resolve, and they guarantee that callbacks will be fired exactly once in future turns
[05:55] creationix: abadr: for an uninstalled node, I'm not sure. The path for regular installed node is clearly documented on the api page
[05:55] kriskowal: google mark miller thesis
[05:55] kriskowal: "robust composition"
[05:56] inimino: kriskowal: continuables only handle one thing, they don't deal with failure or error reporting
[05:56] kriskowal: it talks about async shared-nothing event loop concurrency, promises, and object capabilities; how they can solve deadlock and improve the liveliness and progress of programs
[05:56] kriskowal: it's not just reporting, it's recovery that is important
[05:57] mikeal has joined the channel
[05:58] inimino: kriskowal: I'll give it a read
[05:58] kriskowal: it's also about constructing a causal graph for debugging. all that and the price is negligible in comparison to the other proposals that have been made here, which for the most part address aesthetic issues without any of the real behavioral composition problems that could be solved with the promise API
[05:58] kriszyp: one can argue that you could make javascript language simpler if you removed throw/try/catch, but then the burden would be hoisted on developers to manually propagate and handle errors
[05:59] kriskowal: i would miss exceptions
[05:59] kriszyp: such a simplification would be nice for implementors, but not for users
[05:59] creationix: try/catch/throw is the GOTO of async programming
[05:59] kriskowal: even the pathetic token of exceptions supported by js
[05:59] kriszyp: I hope you understand the difference between try/catch/throw and GOTO
[05:59] creationix: err, not async, functional programming
[06:00] creationix: doesn't really work with async programming, hence the problem we're discussing
[06:01] inimino: invalid security certificate :(
[06:01] creationix: inimino: it's safe I promise
[06:03] inimino: it's just a hassle
[06:03] inimino: ACTION used curl
[06:03] creationix: kriszyp: so just to make sure we're on the same page, "function (arg, callback) {...}" is CPS?
[06:04] Tim_Smart_ has joined the channel
[06:04] kriskowal: that's one form of cps, for sure
[06:04] creationix: that would explain why Tom thought that's what we were calling continuables
[06:04] inimino: CPS is continuation-passing style, it generally refers to anything in which the remainder of a program is "passed forward" rather than happening after a call returns
[06:05] creationix: ok, so my manually curried version is CPS too then?
[06:05] inimino: (...I'm sure wikipedia has a better explanation than that one)
[06:05] kriszyp: I think you could describe that as an alternate form of CPS
[06:05] kriskowal: yeah, "continuables" certainly count as CPS, "cps-currying"
[06:05] inimino: yes, they are basically CPS with partial application
[06:05] kriskowal: m. partial application != currying
[06:05] creationix: ok, it all makes sense now
[06:06] inimino: kriskowal: indeed
[06:06] inimino: (but it's the partial application that gives you a continuable, the currying is just a requirement of JavaScript)
[06:07] creationix: I'll have to admit, I really like the "when" construct
[06:07] creationix: and it should be able to with with my curried-cps too, right?
[06:08] kriszyp: yes, I think you could create a curried-cps version of when
[06:08] creationix: here's a question. my main worry is that creating all those objects cost more than creating simple closures. I'm not sure this is even true
[06:08] creationix: from what I understand of V8, they optimized it for objects
[06:08] kriszyp: well, my argument is that whenever you are messing with async operations, you are probably dealing with things that are vastly more expensive than object creation
[06:09] inimino: yes, `when` is useful
[06:09] kriszyp: and yeah, especially in V8
[06:09] inimino: creationix: the performance consideration is mostly irrelevant, in most cases
[06:10] abadr: having trouble with node-amqp. i'll dig in but in case anything's obvious: http://pastebin.com/d680b8755
[06:10] creationix: vastly more expensive? I would think non-blocking IO cost very little, but maybe I don't understand the cost of all those interrupts
[06:10] inimino: if you are doing things that can be either synchronous or asynchronous, continuables have less overhead
[06:10] Tim_Smart has joined the channel
[06:10] inimino: well, "expensive" is relative...
[06:10] kriszyp: sending a hard drive head off to find a sector is expensive
[06:11] kriszyp: You might be able to do some other CPU processing in the mean time, but you don't have infiinite multitasking in your HD
[06:11] inimino: you should probably consider "CPU cycles spent in node" separately from "waiting for the drive to return a read"
[06:11] creationix: abadr: what's on amqp.js:9
[06:12] creationix: well, I think we can all agree that current node promises aren't going to cut it
[06:12] kriskowal: yes
[06:12] abadr: process.Buffer.prototype.toString = ...
[06:13] inimino: creationix: yes, I think most noders have a warped view of promises for that reason
[06:13] inimino: that's why I want the current Promise implementation out :)
[06:13] kriskowal: i would prefer to have curried cps in node's base layers than the current promises, not least because it's easy enough to build promises on top of them.
[06:13] creationix: abadr: are you sure you're running the node from net2?
[06:13] kriszyp: I guess in the sense that I feel compelled to monkey patch process.Promise, yes, I agree :)
[06:13] micheil has joined the channel
[06:14] inimino: but I don't want to replace it with continuables, I want it to be simple and we can all build our libraries on top of it
[06:14] mikeal: anyone here used dirty?
[06:14] abadr: creationix: no, that was it :|
[06:14] mikeal: felixge isn't around
[06:14] inimino: I'm happy with plain (non-curried) callback functions in node
[06:14] kriszyp: it is true, AFAICT, that we could build continuables on top of promises, and promises on top of continuables
[06:15] inimino: yes, it's quite simple
[06:15] kriszyp: at least assuming that continuable don't completely swallow errors
[06:15] inimino: ACTION points kriszyp to fileIO
[06:15] kriszyp: uncatcheable or silent errors are not good
[06:15] inimino: http://inimino.org/~inimino/blog/fileio_first_release
[06:15] micheil: morning all
[06:15] creationix: agreed, ignoring exceptions is unacceptable
[06:16] inimino: (they don't swallow errors)
[06:16] creationix: http://github.com/creationix/do/blob/master/lib/do/fs.js is my wrapping of node promises with curries-cps
[06:16] creationix: *curried-cps
[06:16] kriszyp: cool, thats good to know we can round trip...
[06:16] kriszyp: and good that there are several things that we agree on :)
[06:17] inimino: but the performance benefits of continuables go away if they are built on top of promises :-)
[06:17] kennethkalmer has joined the channel
[06:18] kriszyp: sure, although didn't you just say perf effects were neglible?
[06:18] inimino: anyway, node already exposes low-level stuff, so there's no big issue for node here
[06:18] inimino: kriszyp: it most cases, sure
[06:18] kriszyp: but I understand what you are saying
[06:18] kriszyp: always nice to have fewer layers
[06:18] inimino: exactly
[06:19] kriszyp: which is why you prefer plain functions with callbacks for the core node api for other libraries to build on
[06:19] creationix: I'm fine with the base being either straight cps or curried cps, it means only one layer for me
[06:19] kriszyp: and that seems reasonable to me as well
[06:19] kriskowal: me 2
[06:20] kriskowal: but with a caveat…
[06:20] kriskowal: if that's the case, i think the low level apis need to move out of prime module-id real-estate
[06:20] kriszyp: straight cps would be the lowest cost foundation for everyone, I think
[06:20] kriskowal: e.g., fs vs fs-base
[06:21] creationix: so fs-sync, fs-base and fs (fs being promise based)?
[06:21] creationix: but real promises, not node promises
[06:21] inimino: ACTION doesn't care much about module naming conventions
[06:21] kriskowal: that's my hope
[06:21] inimino: hm...
[06:21] creationix: of course I'd rather fs be curried-cps, but real promises are good enough
[06:21] kriszyp: fs-sync, fs-base, fs-promise, fs-curry-cps, :)
[06:21] inimino: why is this such a constrained namespace?
[06:22] kriskowal: it's not really constrained; there's plenty of room, but the best spots are short names with no ./
[06:22] creationix: kriszip: if you're going to have 4, then fs-base should be just fs
[06:22] inimino: I don't see why we can't have different 'fs' modules as long as they don't all ship with node
[06:22] kriszyp: sorry, I am just being silly
[06:22] kriskowal: well, fs-base is an unrelated thing…
[06:22] creationix: of course I just do "do/fs" for my curried-cps version
[06:23] kriskowal: fs-base was broken off of fs because commonjs had trouble swallowing a whole fs api at once
[06:23] creationix: and the promise library could to "promise/fs"
[06:23] inimino: anyway, I'm going to stay out of the name bikeshedding
[06:23] kriskowal: fs-base provides the components that *must* be provided by the engine and fs builds on that with pure-js stuff
[06:23] inimino: whatever module I use is going to be "fs" in the code where I use it
[06:23] creationix: remember that ryan doesn't want to mantain several versions of the lib
[06:23] inimino: whatever I have to use to pull it in from my package manager, or whatever, I couldn't care less about
[06:24] inimino: creationix: well I don't want him to have to maintain any of them, except the lowest-level one
[06:24] isaacs has joined the channel
[06:24] creationix: and the sync one
[06:24] kriskowal: once we have all this core io stuff all standard, it'll be awesome; we can break out of the module id namespace with url-packages
[06:24] inimino: and the sync variant, yeah
[06:24] kriskowal: but i imagine that'll take a bit more time.
[06:24] inimino: isaacs is working on 'npm' I think
[06:24] kriszyp: so would node-narwhal build on an fs-base then, or does it go lower level?
[06:25] kriskowal: i'll have tusk working on node soon enough
[06:25] inimino: don't know if it's workable yet
[06:25] kriskowal: so far i've been able to work entirely with the current "fs" native module injection
[06:25] kriszyp: nice
[06:25] creationix: also, there is already process.fs with is pure cps based
[06:26] isaacs: kriskowal: url packages?
[06:26] kriskowal: using-packages
[06:26] kriskowal: like cadorn's stuff
[06:26] isaacs: like, package("http://foo").require("bar")?
[06:26] kriskowal: maybe even live loaded :-)
[06:26] creationix: even without packages, it's not hard to make a symlink in .node_packages to the lib folder
[06:26] kriskowal: ah, well, syntax considerations aside, sortof
[06:26] hassox has joined the channel
[06:26] kriszyp: I thought it was the second arg to require?
[06:27] kriszyp: (the package name)
[06:27] kriskowal: that's the present notion, yeah
[06:27] kriskowal: require(id, pkg)
[06:27] isaacs: kriskowal: that rubs me very much teh wrong way for some reason
[06:27] kriskowal: pkg being a short-name for the project in a package-local catalog
[06:27] kriszyp: I should start using that...
[06:27] isaacs: not just syntax.
[06:27] inimino: it seems quite wrong to me too
[06:27] inimino: I think you should have a separate component that gets modules, and require should be kept simple
[06:27] isaacs: a) having a single module namespace is actually a good thing, and adding pkg just moves the problem over to another area
[06:28] isaacs: b) a module in pkg A shouldn't have to know that it needs some internal of pkg B, or else, how is that any different than what we've got?
[06:28] kriskowal: one where we have to do less agreeing, at the price of, at the end of the day, disk storage and some performance
[06:28] isaacs: in npm, a package is a whole independent thing with a name. it has one or more of a main module, a lib folder, and a make command.
[06:28] isaacs: (and version, name, etc.)
[06:29] isaacs: (zero or more, really)
[06:29] isaacs: so if you have package foo with lib/bar, then you can install it with npm, and do requre("foo/bar")
[06:29] kriskowal: npm and tusk and the styles of packages they entail won't be obviated by the more general form
[06:29] isaacs: my problem is with the more general form. i think it's a Bad Thing.
[06:30] kriskowal: it's very important for the widgets on the web story
[06:30] kriskowal: i don't expect that everyone or even many folks will use them.
[06:30] isaacs: you know, there's a reason why the dom and the filesystem are different, and why css and chmod don't take the same syntax.
[06:30] isaacs: maybe it's ok for browser JS and server JS to be different in some areas.
[06:30] isaacs: or require different harnesses.
[06:31] isaacs: i mean, require.async isn't too far off from what yui3 and jquery already do
[06:31] kriskowal: it really isn't, indeed.
[06:31] creationix: hey guys, type process.fs in a node-repl terminal
[06:31] gf3 has joined the channel
[06:31] creationix: we've already got a full sync and async cps based fs module built in
[06:31] bentomas has joined the channel
[06:32] isaacs: creationix: right, but that's kinda the undocumented internals thing.
[06:32] inimino: creationix: yeah, that's what fileIO uses
[06:32] isaacs: the fs module is "official"
[06:32] mikeal: isaacs: I think eventually npm will need to define it's own require and not put modules in the base module directory
[06:32] creationix: yes, but that's the point, we're talking about writing libraries at the level of "fs"
[06:32] mikeal: it's the only way to do multiple versions of the same module
[06:33] isaacs: kriskowal: so, i guess i don't buy that the pkg thing is important for the "widgets on the web" story, since successful module-loading widgets on the web don't use them.
[06:33] mikeal: the one I did in "experimental" won't work for obvious Promise.wait() related reasons
[06:33] isaacs: mikeal: so, i *really* want to be able to do the sort of thing with npm where it loads something, and then you don't touch it except at install time.
[06:33] kriskowal: mutually suspicious widgets on the web
[06:34] mikeal: say that again
[06:34] isaacs: kriskowal: don't put suspicious code in your page.
[06:34] mikeal: i'm a little confused by that
[06:34] kriskowal: facebook apps
[06:34] mikeal: npm loads something where?
[06:34] kriskowal: ads on yahoo.com
[06:34] isaacs: kriskowal: facebook apps suck. ads should use adsafe, not require() able modules
[06:34] kriskowal: just saying the caja people care about these things
[06:34] kriskowal: adsafe is a similar story
[06:35] isaacs: kriskowal: they do. i know. i helped build YAP, i've been down this road.
[06:35] isaacs: i know what kind of hell it is.
[06:35] abadr has joined the channel
[06:35] kriskowal: in any case, on the server, distributed computing applications have similar potential implications
[06:35] isaacs: mikeal: so, you use npm to install something, and it builds you a file structure representing the packages you've installed, then you just use require() normally.
[06:35] mikeal: i'm not even buying that most modules will be usable in multiple SSJS platforms, let alone between the browser and the server side
[06:35] isaacs: mikeal: ++ exACTly
[06:35] inimino: ACTION wanders off
[06:35] mikeal: anything non-trivial will need access to sockets and files, and those are going to be platform specific
[06:36] kriskowal: that's depressing fatalism
[06:36] isaacs: that being said, i just helped davglass get yui running on nodejs...
[06:36] isaacs: so dont' take me too seriously
[06:36] mikeal: isaacs: so, the problem with that is that I really want to be able to import a specific version of a library for one module and use a different version in another
[06:36] kriskowal: but i trust that in the end these things will converge
[06:36] isaacs: mikeal: yeah, so, i'm working that out. but, i think the solution there is to have different roots for them.
[06:36] mikeal: and unless we override the global require, i don't see how you can do that without using a different import method
[06:37] isaacs: mikeal: but, i'm not really convinced it's a problem.
[06:37] isaacs: if they have the same module ID, it'd collide in node anyhow
[06:37] mikeal: so, what is the reason you want to stick with never touching the package manager outside of install time?
[06:37] isaacs: it's not an issue anywhere else, after all.
[06:37] isaacs: package managers are slow. node is optimized for what it does.
[06:37] mikeal: it actually *is* an issue
[06:38] kriskowal: it certainly is simpler not to entrain packages in require
[06:38] isaacs: less stuff in the way of running code.
[06:38] mikeal: are you coming up to the Relaxed office tomorrow?
[06:38] isaacs: mikeal: with the code i just pushed in npm, once you install something, you can do require("foo-1.0.3") to get that version of it
[06:38] mikeal: cause explaining how this is broken in Python/setuptools is something that will take a while :)
[06:38] kriskowal: in narwhal i've managed to mostly keep require, package resolution, and package installation separate. it would be a complexity explosion to combine them.
[06:38] isaacs: mikeal: yeah, um, right. i should get the location or something from you, yes?
[06:39] mikeal: 825 washington, oakland
[06:39] micheil: I reckon fs.* should take two arguments
[06:39] micheil: well, generally two arguments
[06:39] isaacs: mikeal: thanks
[06:39] mikeal: http://maps.google.com/maps?hl=en&q=825%20washington%2C%20oakland&oq=&um=1&ie=UTF-8&sa=N&tab=wl
[06:39] mikeal: suite 201 Created
[06:39] mikeal: :)
[06:39] kriskowal: ACTION wanders off as well
[06:39] micheil: fs.mkdir(path, options = {recursive: false, force: false, mode: 0755})
[06:40] micheil: fs.rm(path, options = {recursive: false, force: false, mode: 0755})
[06:40] micheil: etc
[06:41] bentomas has left the channel
[06:43] creationix: micheil: jQuery style huh?
[06:43] micheil: no
[06:43] micheil: just to save us from methods like: fs.mkdir_p() or fs.rmdir_rf()
[06:44] micheil: which are needed
[06:44] creationix: sounds good to me
[06:44] micheil: it also simplifies the sync/async apis: fs.rm(path, options); fs.rmSync(path, options)
[06:45] micheil: (sync and async need to be separate functions)
[06:45] kriskowal: i hate to be disruptive, but we did considerable work on getting user feedback on method names for fs apis last year
[06:45] micheil: kriskowal: yeah, I've just been working on them recently, and I think that's a good direction to go
[06:45] kriskowal: it's probably not consistent with node's direction, but we have this huge list…
[06:45] micheil: link?
[06:45] creationix: kriskowal: what time last year? most of the node community is new in the last few months
[06:46] mikeal: i think he means for commonjs
[06:46] micheil: kriskowal: I've only been involved in ssjs since november 2009.
[06:46] micheil: so, I'm not really knowledgeable on all the commonjs specs
[06:46] kriskowal: well, the oldest page was this http://wiki.commonjs.org/wiki/Filesystem/Names
[06:46] kriskowal: the upshot is that after we looked at that list hard enough, we decided to go with literate names
[06:47] kriskowal: across the board
[06:47] kriskowal: so, fs-base proposes makeDirectory(path)
[06:47] mikeal: most of the commonjs apis were sync by default before node came along
[06:47] micheil: kriskowal: hmm.. I don't like that
[06:47] mikeal: so it's unrealistic to think that things won't change
[06:47] kriskowal: mikael that's hardly relevant
[06:47] micheil: the unix types are what the methods are in C++
[06:47] kriskowal: and to be fair, we have file.mkdir in narwhal too
[06:48] micheil: true
[06:48] kriskowal: and a file.mkpath for the -p variant
[06:48] micheil: kriskowal: I'm modelling some of the ideas in this proposal around things like ruby and python
[06:48] kriskowal: yeah, that's where we start too
[06:49] micheil: but yeah, I wouldn't go long names, simply because it makes the api too verbose
[06:49] kriskowal: there was a point at which the unix names got stretched too far, so we swung back to something that'd be more intuitive to a newcomer
[06:49] sveisvei has joined the channel
[06:49] creationix: I think node v0.1.29 was a big step towards literate naming (posix -> fs, cat -> readFile, etc...)
[06:49] micheil: any unix hacker can pick up quickly if we use the unix methods
[06:49] kriskowal: yeah, we unix hackers are a pretty rare breed
[06:49] kriskowal: in any case, the FS/A proposal reads "makeTree" for the mkdir -p variant
[06:50] micheil: even so, I'd still like to see an options hash, rather then 50 different methods all doing creating of directories
[06:50] kriskowal: like removeTree
[06:50] kriskowal: well, in any case, it's a tired discussion, i'll leave you to it.
[06:50] micheil: fs.create() fs.mkdir() etc.. but that's personal opinion
[06:51] kriskowal: but if you ever get curious about what the other folks were thinking, there are links to the discussions at the bottom of every commonjs wiki page http://wiki.commonjs.org/wiki/Filesystem/A
[06:51] micheil: yeah
[06:51] [Pwner]John: ACTION headsmashes
[06:51] micheil: some literate apis there make sense, but anything > 10 characters I think is getting too long
[06:52] kriskowal: the price of brevity is consistency
[06:52] kriskowal: and coherence. i'm with you on wanting brevity tho
[06:53] kriskowal: in any case, if you go back in time to the earliest drafts of that proposal, the names look just like yours
[06:53] kriskowal: might be worth a look
[06:53] micheil: I mean, you wouldn't want to write something like: makeDirectoryRecursiveWithMode(path, 0777)
[06:53] micheil: that just makes no sense
[06:54] kriskowal: http://wiki.commonjs.org/index.php?title=Filesystem/A&oldid=278
[06:55] kriskowal: also some great research http://spreadsheets.google.com/pub?key=p9uiX8MUHeTiP0kPT591RUw
[06:56] micheil: kriskowal: I like the idea of .lastModified(path)
[06:57] micheil: probably just interfaces with fs.stat, just like fs.exists()
[06:57] kriskowal: yes, it does.
[06:57] kriskowal: we used to call it .mtime(path)
[06:57] kriskowal: the trouble with .mtime, .atime, and .ctime is that even most experienced unix hackers get really confused about them
[06:58] kriskowal: like, there's a common misconception that .ctime means "creation date"
[06:58] micheil: I don't really know the difference
[06:58] kriskowal: .ctime is the time that the inode was last changed
[06:58] micheil: mtime = modified, atime = attr change, ctime = ?
[06:58] kriskowal: which is distinct from .mtime which is the last time that the file was opened for write
[06:58] micheil: irrc.
[06:58] kriskowal: atime is access, last time opened for read
[06:58] micheil: there we go then
[06:58] kriskowal: in any case, we went with literate names
[06:59] micheil: so if I chmod'd a file, that'd change the ctime
[06:59] kriskowal: yes
[06:59] micheil: righteo
[06:59] kriskowal: and the trouble with going with literate names is that they look inconsistent side-by-side with unix names, which come in two flavors anyway: command line names, and c internal names.
[06:59] micheil: so.. lastModified, .lastRead, ?
[06:59] kriskowal: rm vs unlink
[07:00] kriskowal: we just went with remove
[07:00] micheil: I still haven't worked out rm vs unlink
[07:00] micheil: rm works on both links and files, so,..?
[07:01] kriskowal: so does unlink
[07:01] micheil: oh, okay
[07:01] kriskowal: we deliberately distinguished remove from removeTree
[07:01] micheil: O.o
[07:01] kriskowal: only remove and make have recursive variants, so it's not a slippery slope
[07:02] micheil: hmm.. fs.rmdir -> fs.remove(path) if path == dir && not empty: throw Error?
[07:02] micheil: (well, emit Error, but same idea)
[07:02] micheil: kriskowal: chmod can also have recursive, same with chgrp, and chown
[07:02] kriskowal: yeah
[07:02] kriskowal: good point; we haven't done those.
[07:03] kriskowal: yet
[07:03] micheil: I've implemented chmod in node
[07:03] kriskowal: yeah, we have chmod in narwhal's file module
[07:03] micheil: and I have ideas on how to do chgrp and chown
[07:03] kriskowal: but we also have a permissions abstraction in the "fs" standard, which should help with windows interop
[07:03] micheil: I think we really need ryah for some more discussion
[07:03] micheil: Do we really need to support windows?
[07:03] kriskowal: in any case, i encourage you to bring it up with #commonjs
[07:03] micheil: (well, dos)
[07:04] dekz has joined the channel
[07:04] micheil: I mean, what are the chances of wanting to use opensource stuff like node on a windows server
[07:04] nsm has joined the channel
[07:04] kriskowal: decent, really.
[07:04] kriskowal: unfortunately
[07:04] micheil: hmm..
[07:05] kriskowal: we have narwhal users on windows
[07:05] creationix: micheil: I think the biggest use would be people wanting to develop on their windows laptop
[07:05] kriskowal: thankfully they're used to pain, because we haven't done much to relieve it
[07:05] micheil: creationix: true
[07:05] creationix: it's a pain to get linux or osx on most pc laptops
[07:05] micheil: creationix: yeah, node-grit is taking a while to implement, due to the fs changes needed
[07:05] kriskowal: i have to use windows at work because of the IT communications infrastructure.
[07:05] kriskowal: among other reasons
[07:06] micheil: kriskowal: although, do you do node stuff at work?
[07:06] kriskowal: i do all kinds of stuff at work :P
[07:06] micheil: :P
[07:06] creationix: I work from home, so it's all mixed here :)
[07:06] kriskowal: we hack freebsd
[07:07] creationix: ohh, fun
[07:07] creationix: I always wanted a bsd laptop, but I never could get a laptop and bsd distro that would talk to eachother
[07:07] micheil: I mean, there are so many issues surrounding trying to support windows, for one the difference in posix availability, two, porting things like libev and libeio and stuff across
[07:08] micheil: heh, my brother has a friend who formatted a macbook pro and stuck windows vista on it – she couldn't work out os x.
[07:08] isaacs: micheil: !!!!!
[07:09] micheil: isaacs: ?
[07:09] dekz_ has joined the channel
[07:09] micheil: isaacs: need me for something?
[07:09] isaacs: i mean, not liking os x is one thing, but of all the windows!!
[07:09] isaacs: vista!?
[07:09] creationix: I think running, but slower would be good enough. obviously there is no kqueue or epoll or any of that on windows (there are some win specific apis, but porting to them would be a lot of work)
[07:09] micheil: yeah
[07:09] isaacs: only ME or 95 would've been worse
[07:09] micheil: creationix: I think the cost/benefit would be very low
[07:10] micheil: atleast with ryah porting node to work on solaris has a big benefit, joyent can then use it
[07:10] micheil: but that sort of work really requires a company backing the port
[07:10] isaacs: supporting windows is really not a good idea.
[07:10] isaacs: i kind of hope that never happens.
[07:11] isaacs: the abstraction always leaks.
[07:11] micheil: I think people should just use virtualenv's on windows.
[07:11] micheil: if they have to use windows
[07:11] creationix: micheil: BTW, I'm rewriting the node-blog engine to use Do instead of Combo, we'll see how much my library actually helps
[07:11] isaacs: yeah. hell, sometimes i use a linux vm on osx
[07:11] micheil: creationix: okay
[07:11] creationix: I know a developer who runs a ubuntu in a vm on his macbookpro just so he can use gedit
[07:11] micheil: creationix: I was thinking of doing a delayed job grit + mongodb
[07:11] mikeal: i want windows support to happen, i just hope nobody wastes a lot of time trying to make it fast
[07:11] isaacs: for some stuff, osx is just kinda a little borked.
[07:12] isaacs: concurrency is weir.
[07:12] isaacs: d
[07:12] micheil: creationix: I would, if I hadn't brought textmate
[07:12] mikeal: it's really borked sometimes
[07:12] mikeal: fsyncs really suck sometimes
[07:12] isaacs: but for a LOT of other stuff, it's REALLY nice.
[07:12] mikeal: there are a lot of bugs in stdio and it's really slow for some unexplainable reasons, possibly due to all the bugs
[07:12] mikeal: they need to throw away their filesystem
[07:12] isaacs: there's so much beautiful beautiful software for the mac system.
[07:12] micheil: mikeal: I've never had any issues
[07:12] creationix: micheil: I'm excited for grit, I'm just doing a quick refactor right now, no new features
[07:13] micheil: the filesystem is a small one, but there's some interesting things to it
[07:13] micheil: like case insensitivity
[07:13] mikeal: don't get me wrong, it's my only desktop environment, there are just issues
[07:13] micheil: /dir and /DiR are the same on os x
[07:13] micheil: I think that's good, but others tell me that's bad
[07:13] mikeal: you can turn on case sensistivity
[07:13] mikeal: it's a filesystem option
[07:13] creationix: micheil: you can reformat to case sensitive if you want
[07:13] isaacs: micheil: i actually really like that.
[07:14] micheil: isaacs: I do too
[07:14] isaacs: it bugs me when other systems are case sensitive, and try to download multiple copies of the same folder with different cases.
[07:14] micheil: It forces better filesystem organizeation
[07:14] isaacs: in fact, i'd really prefer that file systems only support lower case.
[07:14] isaacs: easier to look at, easier to type
[07:14] mikeal: haha, that would be awesome
[07:14] micheil: isaacs: that would be interesting
[07:14] creationix: I'll admit, I bought a mac for textmate (but the backlit keyboard, and metal casing were good bonuses)
[07:14] mikeal: oh-my-zsh helps a lot with that
[07:14] micheil: isaacs: people who love CamalCase would die
[07:15] isaacs: micheil: i <3 camelCase. just not for filenames.
[07:15] isaacs: css-case for filenames.
[07:15] micheil: heh heh
[07:15] micheil: creationix: yeah, I brought mine so I could use the adobe suite
[07:15] isaacs: i guess that would be weird in my music library, where folder names get to have spaces and caps and "björk" and such
[07:16] micheil: (total kit price: 2500$ MBP, CS4 300$, Textmate 30$)
[07:16] creationix: ouch
[07:16] creationix: mine was about $1100
[07:16] isaacs: i just ditched adobe
[07:16] creationix: I wish inkscape and gimp didn't require x11
[07:16] micheil: I needed the software, especially illustrator and indesign
[07:16] creationix: I miss those
[07:16] isaacs: license ran out, and i wasn't about to foot the bill. turns out, pixelmator is fantastic.
[07:17] creationix: heh, that's what I boot the ubuntu vm for, graphic design
[07:17] isaacs: it's like photoshop, but it works
[07:17] micheil: I used inkscape all the time on ubuntu, but on mac, it's shit
[07:17] fwg: x11 runs on mac os
[07:17] micheil: isaacs: I don't use photoshop really
[07:17] isaacs: fwg: and crippled turtles "run" in races, i'm sure.
[07:17] fwg: it's just ugly
[07:17] mikeal: isaacs: hahaha
[07:17] fwg: if they want to win :)
[07:17] micheil: isaacs: good call!
[07:17] isaacs: hehe
[07:18] mikeal: running an x11 app on Mac is a good way to remind me why i don't run Linux
[07:18] micheil: isaacs: I'd ditch adobe if it weren't for things like indesign + illustrator
[07:18] isaacs: whenever X starts on my mac, i have a little minor ragestorm in my head. part of me is just pacing around in there knocking stuff of shelves and complaining.
[07:18] isaacs: micheil: yeah, i don't know of an illustrator-alike. and never used indesign
[07:18] isaacs: illustrator IS a damn fine svg editor.
[07:18] creationix: indesign is awesome for page layouts
[07:19] creationix: I was a graphic designer in a past life, but have since repented of my artsy ways
[07:23] CIA-77: node: 03Ryan Dahl 07master * rca02b4f 10/ AUTHORS :
[07:23] CIA-77: node: Fix AUTHORS again
[07:23] CIA-77: node: I hope I won't spend all my time now maintaining this file... - http://bit.ly/9dAu1R
[07:24] kennethkalmer has joined the channel
[07:25] hober has joined the channel
[07:26] creationix: quick javascript questions for anyone: what's the easiest way to convert [["name", "Tim Caswell"], ["age", 27]] to {name: "Tim Caswell", age: 27} ?
[07:27] creationix: best I can think of involves a manual loop setting the keys of a new object
[07:27] fwg: map with a func
[07:27] isaacs: arr.reduce(function (el, obj) { obj[ el[0] ] = el[1]; return obj; }, {})
[07:28] creationix: isaacs: thanks
[07:28] isaacs: wait a sec, bug
[07:29] isaacs: [["name", "Tim Caswell"], ["age", 27]].reduce(function (obj, el) { obj[ el[0] ] = el[1]; return obj; }, {})
[07:29] isaacs: the prev value comes first.
[07:29] isaacs: but the manual loop is probably faster.
[07:30] creationix: well, I was going to use arr.forEach, so probably not
[07:30] isaacs: oh, yeah, then reduce is faster.
[07:30] creationix: now here's my real problem, there is async involved
[07:30] isaacs: ?
[07:30] micheil: ryah: hate to tell you that, but I have another patch for it
[07:30] isaacs: like you're adding to the array as youre reducing it?
[07:30] creationix: I want list_of_filenames -> hash of filename: contents
[07:31] micheil: js> [["name", "Tim Caswell"], ["age", 27]].reduce(function (obj, el) { obj[ el[0] ] = el[1]; return obj; }, {})
[07:31] gbot2: micheil: Error: TypeError: [["name", "Tim Caswell"], ["age", 27]].reduce is not a function
[07:31] micheil: bugger
[07:31] isaacs: micheil: looks like it doesn't have reduce?
[07:31] creationix: node does
[07:31] isaacs: yeah, v8 does now
[07:31] micheil: heh heh
[07:31] micheil: js> node
[07:31] gbot2: micheil: Error: ReferenceError: node is not defined
[07:31] micheil: js> .helpo
[07:31] gbot2: micheil: Error: SyntaxError: syntax error: .helpo ^
[07:32] micheil: I think gbot2 is rhino
[07:32] isaacs: creationix: so, you could do a reduce that assigns each element as a reference to a promise.
[07:32] isaacs: and when the promise resolves, set the contents.
[07:32] creationix: digesting...
[07:33] isaacs: listOfFiles.reduce( function (obj, file) { (obj[file] = fs.readFile(file)).addCallback(function (contents) { obj[file] = contents }); return obj }, {})
[07:33] creationix: except I'm using curried-cps/continuable/whatever-the-heck-we-call-these-things
[07:33] creationix: same idea I'm sure though
[07:33] isaacs: ok, well, same difference, really
[07:34] isaacs: either way, you say "save the promise, and when it's resolved, put it here"
[07:34] isaacs: you might not need to save the promise, though
[07:34] isaacs: listOfFiles.reduce( function (obj, file) { fs.readFile(file)(function (contents) { obj[file] = contents }); return obj }, {})
[07:34] creationix: except, how do I know when all the promises have resolved?
[07:35] creationix: I guess I finally found my use case for Do.reduce, someone was asking me about one on github and I said I couldn't think of a use case
[07:35] isaacs: var waiting = 0; listOfFiles.reduce( function (obj, file) { waiting ++; fs.readFile(file)(function (contents) { waiting --; obj[file] = contents; if (waiting <= 0) done(); }); return obj }, {})
[07:35] qFox has joined the channel
[07:36] creationix: isaacs: yeah, that would work. BTW, It's faster to set waiting to listOfFiles.length and not increment in the loop
[07:36] creationix: if you know the length ahead of time
[07:37] isaacs: oh, yeah, huh
[07:37] isaacs: just decrement
[07:37] creationix: alright, I think I'll wrap that construct into Do.reduce and use it, thanks
[07:37] isaacs: i originally wrote it to track how many had resolved, then realized that was dumb, and switched it around
[07:38] isaacs: np!
[07:39] creationix: hmm, except I need a filter in there too, I guess the reduce step can just pass the value through unchanged for the items I want to ignire
[07:39] creationix: *ignore
[07:45] micheil: creationix: fixed a few layout issues.
[07:45] creationix: cool
[07:47] creationix: micheil: was the code wrapping for someone?
[07:47] micheil: yeah
[07:47] creationix: thanks
[07:47] micheil: I turned on pre-wrap
[07:48] micheil: creationix: we really need to get a better comment system in place
[07:49] creationix: does the style bother you?
[07:49] micheil: yes
[07:49] micheil: it looks totally out of place
[07:49] creationix: they do have an advanced ajax api if you want to build a custom interface
[07:49] micheil: no thanks
[07:49] micheil: I'd rather implement something simple on top of mongodb
[07:50] creationix: sounds good to me, the more node, the better
[07:50] creationix: we just need to replace most the functionality first, it's nice that anyone with a disqus account can comment without making an account on our system
[07:51] micheil: you don't need accounts
[07:51] micheil: Realname, Email, Website, Body
[07:51] micheil: hmm..
[07:52] micheil: defunkt just recommended I don't clone grit into node, as the grit api is old
[07:53] creationix: micheil: I guess captca would be good enough
[07:54] micheil: well, really, you don't even need that
[07:54] creationix: we will if the spam bots get ahold of it
[07:54] micheil: make each page have a uuid as a hidden form value
[07:55] rednul has joined the channel
[07:56] abadr: ACTION is making progress. Node is fun!
[07:56] micheil: abadr: of course!
[07:58] abadr: hey, I implemented the disqus api
[07:58] abadr: would probably do it a little differently now
[07:58] micheil: hmm?
[07:59] creationix: disqus? please share
[07:59] abadr: share what?
[08:00] creationix: oh, it's not a library (disqus implementation)
[08:01] creationix: (If I seem a little off it's because I've been up for far too many hours today)
[08:01] abadr: no no, it just caught my attention that you were talking about it... i implemented it on their end, not a client
[08:01] abadr: used to work there
[08:01] bpot has joined the channel
[08:01] micheil: abadr: oh, okay
[08:02] abadr: got something working. tomorrow i will figure out why my server only responds to the first request, hehe
[08:03] abadr has left the channel
[08:04] isaacs: imo, it
[08:04] isaacs: s
[08:04] isaacs: it's better to just not have comments.
[08:04] isaacs: have a link to tweet something, and a hastag that you have a search listening to.
[08:05] isaacs: i've seen a few blogs doing this, and it kinda rocks. way less spam, more relevant, etc.
[08:07] micheil: isaacs: we're open for ideas
[08:07] isaacs: though, i guess, with something like this, you really want to have a conversation, and let people discuss the article that way.
[08:07] fujiwater has joined the channel
[08:08] isaacs: another thing to do would be to have a link to the HN or reddit page.
[08:08] isaacs: basically, i think comments are more and more just becoming spammy clutter, and not a real way for users to engage in meaningful conversation with the author or each other.
[08:09] isaacs: taking it off to a dedicated community site makes it much more relevant.
[08:09] isaacs: disqus kinda sorta tries to be that, but doesn't do a great job, since they're also trying to be the classic "moderated comments on a page" thing, which just is deeply broken.
[08:09] isaacs: and disqus is about the best around at that.
[08:10] creationix: what about linking to the comment page on github
[08:11] isaacs: creationix: that'd be fantastic.
[08:11] creationix: of course as soon as you push a typo fix, all the comments are lost in the last version
[08:11] isaacs: hm... true...
[08:11] isaacs: unless you tag it, and just push --force for your typo fixes
[08:12] micheil: something like this is node would be cool: http://github.com/schacon/grack
[08:12] isaacs: so that you update the tag. wonder if the comments there would survive..
[08:13] creationix_ has joined the channel
[08:13] creationix: ACTION wonders about the karma effect of routine push --force
[08:13] micheil: isaacs: I was thinking using a mongodb with the keys: [article, gittag, comments[...]]
[08:14] isaacs: creationix: i hope it's not a problem, because i rebase and push all the time on a few repos i have
[08:14] isaacs: mostly
[08:14] isaacs: mostly node
[08:14] creationix: I encourage people to fork howtonode.org, but if they're not changing other people's articles I wonder if it will be fine
[08:14] isaacs: yeah, you only get github comments on commits
[08:15] isaacs: not tags or trees or files
[08:16] creationix: and I'm not sure I want to be reliant on an external provider anyway
[08:16] micheil: yeah, I was going to use tags, so when node versions increment so does the howtonode tag
[08:16] isaacs: creationix: well, you already are.
[08:16] isaacs: creationix: i mean, for comments.
[08:16] creationix: both github and disqus have been down for me more in the last week
[08:16] isaacs: most of the discussion happens here or on nodejs or twitter.
[08:16] micheil: then we code easily deprecate articles based on bleeding edge and not have people bitch about old information in old articles
[08:16] creationix: I know, that's why we're trying to replace disqus
[08:17] micheil: I think something similar to djangobook.com would be ideal
[08:17] javajunky has joined the channel
[08:18] isaacs: well, i think howtonode is a good thing. it'd be just as good a thing without comments. comments are just graffiti that we encourage.
[08:19] ryah: man the module implmentation sucks
[08:19] ryah: it's super hard to read
[08:19] isaacs: ryah: i had a thought to clean it up a bunch, but then it changed a lot.
[08:19] isaacs: i agree, though
[08:20] isaacs: it'd also be nice if it wasn't in node.js
[08:20] micheil: ryah: did you see the conversation on the fs module?
[08:20] isaacs: though, i'm not sure how thats possible
[08:20] ryah: micheil: no
[08:20] micheil: ryah: basically moving things around and having an optional second arg of options
[08:21] kjeldahl has joined the channel
[08:21] micheil: eg, fs.delete(path, options={recursive: false, force: false});
[08:21] kjeldahl has joined the channel
[08:23] rednul has joined the channel
[08:24] ryah: micheil: that's probably the way to go - but i want to focus on getting the core bindings setup now
[08:24] ryah: i which makes me think that mkdir_p should be postponed
[08:24] micheil: well, if I'm rewriting a large amount of fs stuff, I may as well do it all at once
[08:24] micheil: or are core bindings different?
[08:24] ryah: core bindings = in libeio
[08:25] micheil: ah, yeah
[08:25] ryah: maybe lightly more, like the string argument to open()
[08:25] ryah: *slightly
[08:25] micheil: do you think it'd be wise for me to start a node_fs.cc / .h
[08:25] micheil: and then build off that?
[08:25] ryah: i just don't want to have to maintain a massive fs library
[08:26] micheil: I mean, fs probably doesn' have to be core
[08:26] ryah: node_file is fine as it is. it's just a name
[08:27] ryah: i think having a delete(path, options={recursive: false, force: false}); is really useful and probably what commonjs defines
[08:27] micheil: I mean, a complete rewrite (obviously using node_file as reference)
[08:27] ryah: i just don't want to put it in node yet :)
[08:27] micheil: hmm..
[08:27] ryah: hard enough maintaining what's there
[08:27] micheil: what about if we have fs and fs-ext?
[08:28] micheil: fs-ext mixins into fs, providing the extra features
[08:28] ryah: sounds good
[08:28] micheil: var fs = require("fs"); fs.useExtensions()
[08:28] creationix: how much slower is just sys.exec("mkdir -p")
[08:29] ryah: creationix: probably orders of magnatude
[08:29] micheil: which loads up and mixes in the fs-ext.js utilities
[08:29] ryah: creationix: but unless you're calling mkdir -p all day it won't matter much :)
[08:29] micheil: ryah: I think now could be a good time to start redefining our filesystem modules
[08:30] ryah: micheil: no - the file system is just going to libeio stuff maybe a few other things like glob()
[08:30] micheil: okay
[08:31] micheil: so how / when should I implement the options thing?
[08:31] ryah: i think having a fs-ext file floating around is useful though
[08:31] ryah: something people can just throw into their app
[08:31] micheil: does fs-ext just map fs.mkdir to fs._mkdir and then provide it's own?
[08:32] ryah: shrug fs = require('./fs-ext')
[08:32] micheil: okay
[08:32] ryah: it mixes in fs
[08:34] micheil: oh, yeah, what about getuid / getgid?
[08:34] felixge has joined the channel
[08:34] micheil: because the gnu c++ api allows for a getuid(name:string)
[08:34] felixge has joined the channel
[08:34] micheil: and for id:int
[08:34] micheil: iirc
[08:36] dekz has joined the channel
[08:37] ryah: micheil: yeah - they need to be done in the thread pool
[08:37] micheil: hmm?
[08:37] ryah: i think
[08:37] micheil: http://www.gnu.org/s/libc/manual/html_node/Lookup-User.html#Lookup-User
[08:37] micheil: tbh, I don't really know that much C/C++
[08:38] ryah: they're blocking
[08:38] micheil: true
[08:38] micheil: I'm not sure how you'd do non-blocking
[08:38] micheil: unless you extend libeio
[08:38] ryah: eio_custom
[08:38] micheil: okay then
[08:38] creationix: quick question for you two, is there a cp -r or a cp I could bundle with readdir?
[08:39] micheil: creationix: could be
[08:39] creationix: so not yet then
[08:39] micheil: there's no move or copy methods yet
[08:39] ryah: rename
[08:39] creationix: yeah, I need a copy, not a move
[08:40] micheil: ryah: so how does eio_custom work?
[08:40] creationix: I suppose I could readFile -> writeFile. Would that be faster than a sys.exec("cp")
[08:42] ryah: creationix: link then unlink
[08:42] ryah: creationix: i think ?
[08:42] micheil: that's move
[08:42] micheil: I think
[08:42] ryah: er right
[08:43] micheil: no, that's broken
[08:43] creationix: ok, I'll just sys.exec for now, it's not a big deal
[08:44] micheil: ryah: all the documentation I can find on the libeio library doesn't say much on eio_custom, do you have anything using it currently?
[08:46] ryah: micheil: yes, http://github.com/ry/node/blob/07423f3a879b5980547b647575fc8264b6a2d16e/src/node_net2.cc#L1071-1221
[08:46] ryah: it's a bit complicated
[08:48] ryah: creationix: i guess copy is just done by actually copying data :)
[08:48] ryah: there isn't a syscall for it
[08:49] ryah: you opne a new empty file and start moving data over
[08:49] creationix: ryah: ok, what about binary files like png's
[08:49] ryah: a good use for pump() :)
[08:49] creationix: pump?
[08:50] ryah: when we have unified streams, i'll define a simple function called pump() which can connect writable streams to readable ones
[08:51] creationix: ok, so it's not there yet, sounds cool
[08:51] ryah: http://pastie.org/832372
[08:51] creationix: nice
[08:52] creationix: so for copying over a binary file, which encoding is safest raw, ascii, or utf8
[08:52] ryah: openTempFileStream(function (tmpFile) { pump(request, tmpFile); })
[08:52] ryah: creationix: 'binary'
[08:53] ryah: file upload to a webserver ----^
[08:53] creationix: pump does sound very cool
[08:54] ryah: yeah - well that's my dream anyway
[08:54] ryah: lot has to be done before that
[08:54] micheil: ryah: do we have a tempfile interface?
[08:55] ryah: no
[08:55] micheil: http://www.gnu.org/s/libc/manual/html_node/Temporary-Files.html#Temporary-Files
[08:55] micheil: perhaps
[08:55] micheil: tmpnam from that
[08:56] ryah: yeah, would be good to have
[08:56] micheil: although, see the security things
[08:56] micheil: in node, it may fail badly
[08:58] ryah: micheil: mkstemp sounds good
[08:58] micheil: okay, so, that would return a temporary file name?
[08:58] micheil: (based on template)
[08:58] ryah: it returns a new fd
[08:59] micheil: and then you'd have to fs.open(fs.tmpfile())
[08:59] micheil: yeah?
[08:59] micheil: oh wait
[08:59] micheil: mkstemp open's the file
[09:00] micheil: another case for eio_custom.
[09:01] ryah: i think mkstemp could probably be just added to eio
[09:01] ryah: probably getpwnam too
[09:02] micheil: okay
[09:03] micheil: added as in edit libeio?
[09:03] ryah: if you're interested in doing that maybe you should email the libeio author, marc
[09:03] ryah: ask him wat he thinks
[09:03] micheil: okay
[09:03] ryah: eah
[09:03] ryah: *yeah
[09:03] ryah: shouldn't be bad - just a few lines
[09:03] micheil: hmm..
[09:03] micheil: getpwnam isn't related to file i/o
[09:04] micheil: or even any sort of i/o
[09:04] ryah: well- it is if it has to open up /etc/passwd
[09:04] micheil: hmm..
[09:04] piranha has joined the channel
[09:05] mAritz has joined the channel
[09:06] eikke has joined the channel
[09:07] ryah: creationix: i like the idea of having fs all taking a callback as a last argument and having an external function to create promises
[09:07] ryah: from them
[09:07] ryah: like when(fs.open("/tmp/hello", "a+"), function (fd) { puts("open!"); })
[09:07] creationix: cool, it will be a pretty thin wrapper over process.fs except for the connivence stuff
[09:07] ryah: that seems really clean
[09:08] creationix: as long as we have an errback also
[09:08] creationix: so last two arguments
[09:08] ryah: right. i really hate that errback in a second argument
[09:08] creationix: or make the value be an instance of Error in the single callback
[09:09] creationix: either style is fine
[09:09] micheil: creationix: shouldn't be testing for type of Error on error
[09:10] ryah: yeah
[09:10] ryah: this sunds pretty good
[09:10] creationix: well, none of the fs functions will have an instance of Error as a valid success result, so it's pretty easy to rell apart
[09:10] micheil: even so
[09:10] ryah: then we can do serialize(fs.open(blah), fs.read(123))
[09:10] ryah: without creating a million promises
[09:10] micheil: ryah: which module would these be in?
[09:11] micheil: or maybe just making Do core?
[09:11] micheil: (well, similar to Do)
[09:11] ryah: oh i don't know.
[09:11] creationix: let me test Do some more, it may have leaky abstractions
[09:11] ryah: we'll have something
[09:11] creationix: kriszyp's promise stuff is pretty well thought out
[09:12] teemow has joined the channel
[09:12] creationix: if course you can use curries-cps/continuables without Do just fine
[09:12] creationix: *curried
[09:13] ryah: oh.. hm. wait maybe i have this messed up a bit
[09:14] ryah: no, i was thinking when(fs.open, "/tmp/hello
[09:14] ryah: er
[09:14] micheil: hmm..
[09:14] ryah: when(fs.open, "/tmp/hello", "a+", function(fd) {}) // returns promise
[09:15] ryah: fs.open("/tmp/hello", "a+", function (fd) {}) // returns null
[09:15] ryah: var p = promise(fs.open, '/tmp/hello', 'r+')
[09:16] micheil: ryah: currently with fs.* the sync vs async makes a lot of sense
[09:16] ryah: p(function (fd) { puts('complete') })
[09:16] micheil: it's a very clean pattern
[09:16] ryah: promise(fs.open, '/tmp/hello', 'r+')(function (fd) { puts('complete') }
[09:16] ryah: so continuations, but you must explicitly create the promise
[09:16] creationix: so "promise" does some sort of curry then
[09:17] micheil: fs.open2(path, mode, callback, errback)
[09:17] micheil: or do you watch for a return back?
[09:17] ryah: promise(fs.open, '/tmp/hello', 'r+')(function (fd) { puts('complete') }, function (e) { puts('error') })
[09:18] ryah: fs.open('/tmp/hello', 'r+', 0x666, function (error, fd) { if (error) { puts('error') } else { puts('complete') } })
[09:18] micheil: ryah: that would almost mean that all fs methods would be sync by default, which wouldn't be right
[09:18] ryah: ^-- same without promises
[09:19] ryah: sorry it's getting a bit too large to read
[09:19] ryah: so, my concern is always creating these promise objects. some people just want the low-level interface
[09:19] creationix: fs.open("/tmp/hello', 'r+')(function (fd) {...}, function (e) {...})
[09:19] micheil: do we want fs to be naturally sync, but be promisable?
[09:20] creationix: curried CPS is just a step more than plain CPS, but it's much more flexible
[09:20] micheil: (which may lead to damaging remarks about node's fs not being very fast or stuff like that, as people may not understand that the methods are sync by defualt)
[09:20] micheil: CPS?
[09:21] creationix: continuation passing style
[09:21] micheil: ah
[09:21] creationix: the whole thing that inimino and I have been calling continuables are really just curried cps functions
[09:21] creationix: or in plain english, callback based
[09:22] ryah: http://pastie.org/832398
[09:22] micheil: async(method_call, callback, errback);
[09:23] ryah: i guess it should be 0600 :)
[09:23] creationix: actually it defaults to 0666, I made it optional since it ANDs with the umask anyway
[09:24] creationix: but umask is usually 0755 I think
[09:24] creationix: ryah: the pastie looks good to me
[09:25] micheil: would this work? http://pastie.org/832405
[09:26] micheil: as to allow for optional arguments
[09:26] ryah: micheil: the simpel async is trying to avoid an extra object creation
[09:26] micheil: (that's the problem I see with the simple sync)
[09:26] ryah: so it dones't return anything
[09:26] micheil: hmm..
[09:27] micheil: callback = arguments[arguments.length - 1]
[09:27] micheil: yeah?
[09:27] micheil: ryah: do we wish to branch for this sort of work on the filesystem module?
[09:28] ryah: micheil: yeah
[09:28] micheil: okay, are you wanting to manage branches in your master?
[09:28] ryah: micheil: er - sorry - i meant no :)
[09:28] micheil: (to keep everything together)
[09:28] micheil: okay
[09:29] ryah: i just want patches for new bindings to eio
[09:29] ryah: one per binding is good
[09:29] ryah: those are always welcome
[09:29] micheil: so hold off on this continuable stuff?
[09:29] ryah: yeah
[09:29] micheil: k
[09:29] micheil: I'll start work on chown, chgrp and the others tonight.
[09:30] micheil: (as well as some tests and documentation)
[09:30] micheil: ryah: things like cp & mv may be a little while later, as I'll have to learn more into libeio
[09:30] ryah: grad
[09:30] ryah: rad
[09:30] ryah: great + rad
[09:30] micheil: naturally.
[09:30] micheil: gtg, dinner.
[09:31] felixge: just caught up on the backlog
[09:31] felixge: so the idea is to use the simple continuations with 2 callbacks?
[09:32] felixge: simple = return function(callback, errback) { ...}
[09:32] ryah: felixge: http://pastie.org/pastes/832398
[09:32] ryah: the first two are what we have currently
[09:33] ryah: the last one uses a new type of promise construcor
[09:33] ryah: which takes the function and arguments to be made into a promise
[09:33] ryah: then uses continuations
[09:33] ryah: so- hackers can use the first two
[09:33] ryah: noobs can use the last
[09:34] felixge: : )
[09:34] felixge: ryah: but the idea is to use 2 arguments to distinguish between error / success ?
[09:34] felixge: with fixed order?
[09:35] ryah: felixge: at the moment all of process.fs has err as the first argument
[09:35] ryah: to the callback, that is
[09:35] ryah: so, yes
[09:35] ryah: but you can have more than one argument
[09:35] ryah: more than 2 i mean
[09:35] ryah: (it's late)
[09:36] felixge: ryah: not sure we should have more than 2 args.
[09:37] ryah: yeah maybe not
[09:37] felixge: ryah: you need 2 to properly abstract try..catch from the sync world, but when you add more, it will become harder to aggregate values
[09:37] felixge: but I guess that's the problem of the high level libs *g*
[09:37] felixge: not node
[09:37] felixge: I actually like this single callback
[09:37] felixge: with an explicit error argument
[09:38] felixge: it's as simple as it gets, and anything can be built on top
[09:38] ryah: yeah
[09:38] ryah: so we throw in this promise() function
[09:38] ryah: call it a day
[09:38] ryah: no need to modify the underlying interfaces
[09:39] ryah: i suppose it's a bit more complicated for the promise users
[09:39] ryah: looks kind of funky
[09:43] ryah: or maybe this: http://pastie.org/832421
[09:43] ryah: nah, that's even more complicated
[09:44] ryah: you know, it occurs to me you would only want to use promises if you were doing chaining or grouping
[09:44] ryah: otherwise you'd probably just do a callback
[09:45] felixge: ryah: why would we even throw in the promise function?
[09:46] felixge: I think if node was to not ship a blessed promise implementation, competition for good libraries would be better
[09:46] felixge: I can live with those low level callbacks, everywhere
[09:46] ryah: yeah
[09:46] ryah: hm
[09:46] ryah: well got to go to bed. later
[09:46] felixge: I gotta go to work :)
[09:46] felixge: ttyl
[09:48] creationix: I'm off to bed too, it's almost 4am here
[09:49] creationix has left the channel
[10:10] eikke has joined the channel
[10:11] BBB has joined the channel
[10:14] felixge has joined the channel
[10:14] felixge has joined the channel
[10:17] kennethkalmer has joined the channel
[10:20] jasondavies has joined the channel
[10:20] jasondavies has joined the channel
[10:33] markwubben has joined the channel
[10:33] felixge_ has joined the channel
[10:33] felixge_ has joined the channel
[10:39] ithinkihaveacat has joined the channel
[10:47] eikke has joined the channel
[10:59] cadorn has joined the channel
[11:01] bru_ has joined the channel
[11:03] keeto has joined the channel
[11:13] jed has joined the channel
[11:26] Tim_Smart has joined the channel
[11:40] micheil: ryah_away: hmm.. on that promises / continuables, function(err, result){}, what's the scope?
[11:41] micheil: if you set the scope to be that of the function.. wait..
[11:41] micheil: no, that wouldn't work
[11:41] micheil: I was thinking having something like result.isError();
[11:43] mahemoff has joined the channel
[11:47] ollie has joined the channel
[11:49] bryanl has joined the channel
[11:50] micheil: ryah_away: what is the go with line 1104 of net2.cc?
[11:50] micheil: I think I get what you're doing but at the same time it looks confusing
[12:15] onar has joined the channel
[12:29] markwubben_ has joined the channel
[12:30] alex-desktop has joined the channel
[12:31] gwoo has joined the channel
[12:41] charlenopires has joined the channel
[12:44] unomi has joined the channel
[12:44] happyelephant has joined the channel
[12:46] micheil: hey, ryah_away, could you ping me if you're about
[12:47] micheil: I think I've worked out how to move forward and use libeio, eio_custom and the ASYNC_CALL
[12:48] micheil: something like: // ASYNC_CALL(custom, args[1], MY_LONG_RUNNING_FUNCTION)
[12:48] micheil: eg, in the net2 module, the last argument would be Resolve
[12:50] creationix has joined the channel
[12:50] micheil: creationix: woah
[12:57] jashkenas has joined the channel
[13:30] pmuellr has joined the channel
[13:30] keeto_ has joined the channel
[13:31] kriszyp has joined the channel
[13:32] micheil: okay.. so I've gotten custom eio stuff working
[13:33] kjeldahl has joined the channel
[13:35] lifo has joined the channel
[13:43] Tim_Smart has joined the channel
[13:50] gf3 has joined the channel
[14:04] larsschenk_ has joined the channel
[14:05] mahemoff has joined the channel
[14:12] micheil: woooo
[14:12] micheil: just got mkstemp working
[14:12] guan has joined the channel
[14:12] morgan has joined the channel
[14:14] micheil: oh man.. this just has this feeling of "epic"
[14:27] steadicat has joined the channel
[14:27] jashkenas has joined the channel
[14:31] micheil: ryah_away: ping
[14:33] micheil: erm.. if you went to bed, that'd have to mean you worked the night instead
[14:37] piranha: that's bad that __dirname/__filename is not following symlinks and just returns ~/bin/ instead of real directory with script... :-(
[14:37] micheil: piranha: hmm?
[14:37] micheil: is this the path module?
[14:37] piranha: micheil: __dirname?
[14:37] piranha: it's global variable
[14:38] micheil: oh
[14:38] micheil: var path = require("path"); path.normalize(__dirname);
[14:38] micheil: I think
[14:38] piranha: hm
[14:38] piranha: one moment please
[14:40] piranha: micheil: no, does not work
[14:40] micheil: what's it give?
[14:40] micheil: also, is process.cwd() better?
[14:42] piranha: it returns same name
[14:42] piranha: no, it's not
[14:42] piranha: actually look at usecase:
[14:42] saimon has joined the channel
[14:43] piranha: micheil: there is __file__ global variable in python which contains path to your file (not a path to symlink). Knowning it you can add some directory with your libraries to sys.path (which are bundled with this file)
[14:44] piranha: I though to get same behavior in node, but instead I've got ~/bin/coffee as a path to a file, which is a symlink
[14:44] micheil: piranha: try process.cwd();
[14:44] piranha: it returns ~ :-)
[14:44] micheil: it shouldn't
[14:44] piranha: why not?
[14:44] piranha: I'm running it from ~, so it returns ~
[14:44] micheil: or atleast, that's not what I'm getting
[14:44] micheil: oh, wait, yeah
[14:44] micheil: my bad
[14:45] micheil: piranha: so you'd be looking for something that does realpath?
[14:45] piranha: hm, yep
[14:46] davidsklar has joined the channel
[14:46] piranha: but better would be to improve __dirname/__filename imho...
[14:46] micheil: piranha: I believe I will be able to provide a readlink method
[14:47] jashkenas: piranha: what are you working on?
[14:47] micheil: fs.readlink(link)
[14:47] piranha: jashkenas: trying to get coffee work without installing in /usr/local :-)
[14:47] jashkenas: How about path.expand(p)
[14:48] piranha: hmm
[14:48] jashkenas: piranha: maybe we should move this conversation to #coffeescript, but I'd like to hear your advice.
[14:48] piranha: ok, one moment, a bit busy in real world :)
[14:49] jashkenas: The current install script is just a quick test -- but I'd like to make "cake install" flexible enough to use wherever.
[14:49] jashkenas: Sure thing, no rush.
[14:49] micheil: piranha: last I recalled there was no path.expand(p)
[14:49] jashkenas: micheil: sorry, that was a suggestion for the path module, not a real method.
[14:49] piranha: =)
[14:49] micheil: however, libeio does provide a readlink method, so I could pretty easily hook into that and provide you with an async / sync api to http://www.gnu.org/s/libc/manual/html_node/Symbolic-Links.html#Symbolic-Links
[14:49] micheil: (see readlink)
[14:50] micheil: it'd probably appear at fs.readlink(path)
[14:50] micheil: and fs.readlinkSync(path)
[14:50] micheil: at this stage
[14:50] eikke has joined the channel
[14:54] piranha: micheil: btw, is there any use cases to __dirname/__filename with current implementation?
[14:54] micheil: umm..
[14:54] micheil: usecases as in?
[14:55] piranha: as in I see why anybody needs __filename which is path to real file
[14:56] jashkenas has left the channel
[14:56] mahemoff has joined the channel
[14:56] jashkenas has joined the channel
[14:56] piranha: but almost no ideas why it should be exposed as a path to a symlink, as it is right now...
[14:57] dnolen has joined the channel
[14:57] jashkenas has left the channel
[14:57] jashkenas has joined the channel
[14:57] jashkenas has left the channel
[14:57] jashkenas has joined the channel
[15:01] happyelephant has joined the channel
[15:02] Connorhd has joined the channel
[15:02] micheil: piranha: give me a few minutes and I'll put together a patch for you in order to do readlink
[15:03] micheil: I'm just 75% of the way through some other work
[15:04] eikke has joined the channel
[15:05] dnolen has joined the channel
[15:07] piranha: ok :-)
[15:09] micheil: epic. got tempfile working.
[15:11] micheil: I've really gotta learn git stash
[15:12] gwoo: micheil: i actually prefer to make branches
[15:13] micheil: gwoo: I can't without stashing
[15:13] micheil: or commiting
[15:13] micheil: and I need the single commit for a patch
[15:13] jashkenas: git stash is easy
[15:13] micheil: I've never used it
[15:13] jashkenas: git add . / git stash / git stash pop
[15:13] jashkenas: that's all you need
[15:13] gwoo: micheil: yeah git stash is easy
[15:13] gwoo: jashkenas: you don't even need git add
[15:14] jashkenas: gwoo: does it take files not in the index these days?
[15:14] gwoo: yup
[15:14] jashkenas: indeed
[15:14] gwoo: micheil: you hsould be able to checkout a new branch
[15:14] gwoo: even without stashing or adding
[15:15] micheil: bugger it, I'll do it in my other clone
[15:15] brosner has joined the channel
[15:15] cloudhead has joined the channel
[15:17] Booster has joined the channel
[15:18] gwoo: micheil: git checkout -b new-patch && git add . && git commit -m "stashing work on xyz" is basically what git stash does
[15:18] micheil: gwoo: I'll do it on another clone, because if anything goes wrong on my current master, I'd shit myself bad.
[15:19] gwoo: hehe
[15:19] gwoo: yeah i used to worry about git too
[15:19] micheil: gwoo: so far it's taken me about 8 hours of hacking to work out mkstemp as async
[15:20] gwoo: tar -cf node.master.tar node
[15:20] gwoo: hehe
[15:21] piranha has joined the channel
[15:21] cedricv has joined the channel
[15:21] creationix has joined the channel
[15:21] micheil: piranha: is async okay?
[15:21] brosner has left the channel
[15:22] atcrabtree has joined the channel
[15:24] piranha: micheil: oh, no, I need sync version in this case...
[15:25] micheil: ugh. okay
[15:31] micheil: piranha: I think I've got it... just waiting for make
[15:34] piranha: cool :-)
[15:34] piranha: that's fast :-)))
[15:34] binary42 has joined the channel
[15:40] jashkenas: I'm seconding piranha's request for __filename to be the absolute path to the file. Usually you need to look for related files relative to its absolute path on disk.
[15:48] micheil: piranha: looks like it wasn't so simple
[15:49] micheil: rather, readlinkSync works, just not async
[15:49] piranha: heh
[15:50] micheil: oh duh.. ?I didn't add it to the callback
[15:53] mikeal has joined the channel
[15:55] cedricv has joined the channel
[15:58] micheil: okay.. so it works to the level that it can only follow the exact symlink's path
[15:58] micheil: so why it does read links, it won't be what you want.
[16:00] micheil: piranha: http://gist.github.com/308823
[16:00] micheil: now, I'm heading to bed
[16:00] piranha: good night :-)
[16:01] micheil: if anyone sees ryan, tell him I've got a partial implementation of mkstemp file
[16:05] piranha: micheil: just a report - works like a charm :)
[16:09] quirkey has joined the channel
[16:09] saimon has joined the channel
[16:24] kennethkalmer has joined the channel
[16:26] creationix_ has joined the channel
[16:26] quirkey_ has joined the channel
[16:27] charlenopires has joined the channel
[16:28] lifo has joined the channel
[16:30] cedricv has joined the channel
[16:32] rednul has joined the channel
[16:38] alexiskander has joined the channel
[16:41] brapse has joined the channel
[16:43] happyelephant has joined the channel
[16:43] jcrosby has joined the channel
[16:47] dnolen has joined the channel
[16:47] bpot has joined the channel
[16:48] davidjrice: afternoon
[16:50] davidjrice: so who's done upstart work? trying to get installed on ubuntu.
[16:51] gwoo: davidjrice: did you restart the server?
[16:51] davidjrice: oh. rly?
[16:55] rtomayko has joined the channel
[16:57] creationix: davidjrice: what do you have working so far?
[16:58] steadicat has joined the channel
[16:58] creationix has joined the channel
[16:59] creationix_ has joined the channel
[17:01] cedricv has joined the channel
[17:04] davidjrice: creationix: I have node running but it's not as a daemon
[17:05] creationix: did you see Tim Smart's article on howtonode.org
[17:05] stepheneb has joined the channel
[17:05] creationix: I used it and it worked for 2/3 of my node sites
[17:05] RayMorgan has joined the channel
[17:05] RayMorgan has joined the channel
[17:07] ithinkihaveacat: davidjrice: you shouldn't need to restart
[17:07] ithinkihaveacat: $ sudo start node
[17:07] ithinkihaveacat: $ sudo initctl list
[17:07] ithinkihaveacat: that should show you what services are running
[17:08] ithinkihaveacat: (oh, you will need probably to restart or equivalent if nothing is currently using upstart)
[17:09] gwoo: ithinkihaveacat: yeah i think that was my issue
[17:09] gwoo: upstart had never been started so i needed to reboot the machine
[17:12] brapse has joined the channel
[17:14] davidjrice: creationix: yeah that's what I'm following
[17:15] creationix: davidjrice: one thing I had to change in all my scripts was to convert all file paths to fully-qualified by using __dirname
[17:15] creationix: and if you use any libraries in ~/.node_libraries, make sure HOME is set to the right HOME
[17:15] creationix: I run all my sites as a normal user, so my $HOME isn't /root
[17:16] creationix: but one of my sites simply won't start with upstart, and two others will, and I can't seem to figure out whats different
[17:17] gwoo: creationix: what did you use instead?
[17:17] joshbuddy has joined the channel
[17:17] creationix: the one that I couldn't figure out? I'm just running it in a screen
[17:17] n8o has joined the channel
[17:17] creationix: it works till the server gets restarted
[17:18] gwoo: i have heard http://supervisord.org/ was good tooo
[17:18] brapse_ has joined the channel
[17:18] creationix: gwoo: looks cool
[17:19] gwoo: i have been using daemontools
[17:19] gwoo: and this seems very similar
[17:20] joshbuddy has joined the channel
[17:23] brapse has joined the channel
[17:24] davidjrice: I'm wondering should I need to be root to start a node with upstart?
[17:25] gwoo: probably
[17:25] nsm has joined the channel
[17:25] davidjrice: okay that's better
[17:26] davidjrice: I didn't think of that last night at 5am
[17:26] davidjrice: I wonder why!
[17:26] gwoo: haha
[17:26] davidjrice: So, 'start: unknown job: app' is what I get
[17:26] gwoo: so that's probably the path issue
[17:27] davidjrice: I've called the file app.conf and put it into /etc/init/app.conf && /etc/event.d/app.conf
[17:29] gwoo: hmmm
[17:29] gwoo: initctl reload app?
[17:30] davidjrice: initctl invalid command: reload
[17:30] rednul has joined the channel
[17:31] gwoo: oops i spelled it wrong
[17:31] gwoo: darn typos
[17:31] gwoo: wait
[17:31] gwoo: no that's right
[17:31] gwoo: weird
[17:32] davidjrice: initctl version (upstart 0.3.9)
[17:32] quirkey has joined the channel
[17:33] gwoo: that's old
[17:33] gwoo: initctl (upstart 0.6.3)
[17:33] davidjrice: aye, seeing 0.6.5 as latest
[17:33] quirkey has joined the channel
[17:33] davidjrice: will upgrade
[17:33] davidjrice: that was what apt gave me!
[17:33] gwoo: ha
[17:33] gwoo: of course
[17:35] mahemoff has joined the channel
[17:36] davidjrice: it should be the law to put version numbers of all software used in tutorials
[17:36] gwoo: agreed
[17:37] ithinkihaveacat: davidjrice: not sure if you need the .conf extension--do the other files in /etc/event.d have extensions? does "sudo initctl list" output anything at all?
[17:39] davidjrice: ithinkihaveacat: bingo
[17:40] ithinkihaveacat: sweet
[17:40] ithinkihaveacat: upstart is quite nice
[17:41] ithinkihaveacat: i think you can just use the "respawn" command to restart if the process quits, rather than using monit
[17:41] ithinkihaveacat: maybe monit has some other advantages, not really sure about server stuff
[17:41] creationix: I think monit can actually test ports and check for valid http responses, upstart only knows if the pid is dead
[17:41] creationix: but usually that's good enough
[17:43] ithinkihaveacat: creationix: right, that makes sense
[17:50] mikeal has joined the channel
[17:54] teemow has joined the channel
[17:57] kjeldahl has joined the channel
[17:59] drostie has joined the channel
[18:01] stephenlb has joined the channel
[18:02] RayMorgan_ has joined the channel
[18:04] larsschenk has joined the channel
[18:10] RayMorgan has joined the channel
[18:21] CIA-77: node: 03Ryan Dahl 07master * r860d008 10/ (src/node.js test/mjsunit/test-remote-module-loading.js): (log message trimmed)
[18:21] CIA-77: node: Truly synchronous require()
[18:21] CIA-77: node: This is to reduce our dependency on wait(). For some reason this patch
[18:21] CIA-77: node: affects the timer test:
[18:21] CIA-77: node: % ./node test/mjsunit/test-timers.js
[18:21] CIA-77: node: diff: 989
[18:21] CIA-77: node: diff: 989
[18:21] CIA-77: node: 03Ryan Dahl 07master * r7647835 10/ (6 files in 3 dirs):
[18:21] CIA-77: node: Remove Promise.prototype.wait()
[18:21] CIA-77: node: I don't want users to have to think about coroutine safety.
[18:21] CIA-77: node: http://thread.gmane.org/gmane.comp.lang.javascript.nodejs/2468/focus=2603 - http://bit.ly/bi7ajV
[18:28] creationix: And there was much rejoicing!
[18:34] cloudhead: Oo
[18:34] cloudhead: so you can't execute a promise synchronously anymore?
[18:34] cloudhead: ACTION dies
[18:34] mikeal has joined the channel
[18:37] creationix: cloudhead: the whole point of promise is to be async, most the fs functions have a sync version
[18:37] cloudhead: creationix: does TCP have a sync version?
[18:38] creationix: no, I think it's just the file system stuff
[18:38] cloudhead: hmf
[18:38] mikeal: tcp should never have a sync api
[18:38] creationix: anything that could have a large latency really shouldn't be sync anyway
[18:38] cloudhead: well it's really useful when testing
[18:38] mikeal: the whole reason for using node is that it doesn't have a sync TCP api :)
[18:38] mikeal: cloudhead: there is a thread on the list about async testing
[18:39] creationix: cloudhead: plus we're going to be making async coding a lot easier now
[18:39] mikeal: there are some good libraries for grouping synchronous actions
[18:39] cloudhead: mikeal: I don't have any problems with asynch testing, it's just for the actual setup
[18:39] cloudhead: not a big deal, just gonna add some overhead
[18:39] mattly has joined the channel
[18:39] mikeal: lots of testing involves a series of synchronous actions444
[18:39] mikeal: wow, where did the 4's come from
[18:39] mikeal: anyway
[18:40] cloudhead: creationix: yea I look forward to that
[18:40] mikeal: there are some good libraries for grouping the sync steps in testing
[18:40] mikeal: creationix: what do you mean about making async coding easier?
[18:40] creationix: the continuable and promise libraries that will wrap node's new async interfaces
[18:40] gwoo has joined the channel
[18:40] mikeal: that's not for sure yet
[18:40] mikeal: that's just a discussion
[18:41] bentomas has joined the channel
[18:41] creationix: I think it's pretty much decided, the work just needs to be done now
[18:41] mikeal: i don't actually find continuables easier than promises actually, but that's just me
[18:42] creationix: I find them easier than node promises, but commonjs promises seem the easiest of all
[18:42] bentomas: is anyone else really excited about the async api decided on for Node?
[18:42] mikeal: ryah hasn't said that any part of that is solidified yet
[18:42] mikeal: it's still an active API discussion
[18:42] bentomas: mikeal: he sounds pretty decided: http://groups.google.com/group/nodejs/msg/0c483b891c56fea2
[18:42] mikeal: i really don't like commonjs promises
[18:42] mikeal: they do the deferred thing of manipulating the emitted value in a chain
[18:43] mikeal: which is just dredful when you have more than one programmer
[18:43] creationix: well, I'm not sure if it's commonjs, but the stuff kriszyp has been showing of is what I mean
[18:43] bentomas: creationix: yeah it's commonjs
[18:43] mikeal: bentomas: hahaha, that was sent while i was in my car on the way to the office
[18:44] mikeal: i assumed things were the same as they were an hour ago
[18:44] mikeal: welcome to node, where things change EVERY MINUTE
[18:44] stepheneb has joined the channel
[18:44] creationix: so true
[18:44] bentomas: mikeal: they are more powerful (in the sense that they give you more flexibilty), if you are afraid of stepping on other programmers toes (which is a valid concern) then agree with the other programmers to not modify the results
[18:44] bentomas: haha, yeah!
[18:45] creationix: or use stuff like my Do library, it's a lot simpler but less powerful
[18:45] creationix: but everyone will get their choice now, which is great
[18:45] mikeal: bentomas: the problem is that there are no assurances, so you can't create good public interfaces for other programmers to use and attach to because importing a new module and installing another plugin may change the value in the chain
[18:46] mikeal: i've ran in to it over and over again with Twisted
[18:46] mikeal: and it's really hard to debug
[18:46] mikeal: simple is good
[18:46] bentomas: yeah, I bet. I guess I have never worked on a large project that uses them
[18:47] mikeal: i've never been someone who advocates interfaces or things that sacrifice dynamic features for assurances but this is the one case where the flexibility isn't worth the tradeoff.
[18:48] mikeal: creationix: in javascript i find the simpler apis a lot more expressive
[18:48] bentomas: mikeal: I'm not going to argue with you, I like simple. A lot.
[18:48] bentomas: And I think using something like Do makes things pretty simple
[18:49] mikeal: you want to do some crazy thing, you can probably do it in the closure, so as long as you just take a simple callback you get a lot of expressive capabilities without increasing the API surface
[18:50] mikeal: one nice thing about the new async API is that it give the node API a lot more leverage in the CommonJS discussions
[18:51] mikeal: it doesn't depend on any node specific object that gets returned
[18:52] inimino: yes, three cheers for the recent API decision :-)
[18:55] ryah_away: v8 is insane:
[18:55] ryah_away: 213 files changed, 23731 insertions(+), 4858 deletions(-)
[18:55] ryah_away: that's a point relesae
[18:55] inimino: o_O
[18:56] inimino: maybe they moved some stuff around
[18:56] creationix: cool, I've got a few bug reports in that release
[18:56] creationix: "Implemented Object.defineProperty" Is super cool
[18:57] ryah_away: inimino: includes a new MIPS compiler
[18:57] inimino: oh, heh
[18:57] mikeal: is defineProperty part of ECMA5 of does it only define get and set?
[18:57] inimino: well, maybe they just wrote 23k lines of new code then
[18:57] mikeal: s/of/or
[18:57] creationix: it's a ES5 thing
[18:57] inimino: mikeal: it is in ES5
[18:57] mikeal: good
[18:57] CIA-77: node: 03Ryan Dahl 07master * rbcf163d 10/ (213 files in 20 dirs): Upgrade V8 to 2.1.1 - http://bit.ly/9uJU9r
[18:57] creationix: basically gives you full control over setting properties (including the enumerable property)
[18:58] creationix: so you can extent Object.prototype without breaking for...in
[18:58] creationix: *extend
[18:58] mikeal: defining a single property without overloading the optimizations for normal property get and set makes me happy
[19:00] inimino: ryah_away: I think everybody's really happy that we got the promises/etc stuff resolved
[19:00] inimino: ACTION gets to work ...so much to do
[19:01] mikeal: yeah, it's comforting to things move forward quickly even if your idea isn't the one used
[19:01] mikeal: to see
[19:01] mikeal: i can't type on friday
[19:11] richtaur has joined the channel
[19:11] richtaur has left the channel
[19:13] ashb has joined the channel
[19:13] bryanl has joined the channel
[19:13] JimBastard has joined the channel
[19:15] kriszyp: mikeal: just to clarify, the commonJS promises are specifically *not* supposed to modify the emit value
[19:15] JimBastard: so i'd like to build a node app that can send out massive amounts of http requests. i'll have a queue of like 10,000 requests and i'll need to send them out as quickly as possible. any suggestions to the best approach? obviously i want to have it be "mutlithreaded" as it will send out more then one http at once, but it shouldn't spam
[19:15] kriszyp: that is one of the key differnces from dojo 1.x's deferreds
[19:16] kriszyp: and actually that will be fixed in dojo 2.0, most likely
[19:16] kriszyp: so I am definitely in agreement with you, modifying inputs is bad
[19:18] mcarter has joined the channel
[19:18] creationix: Object.defineProperty works! https://gist.github.com/2c6f62d1ae939b98048c
[19:18] creationix: I love node
[19:19] kriszyp: Object.defineProperty is great
[19:19] creationix: did rhino ever get it? I know it's part of Mozilla's JavaScript 1.9.3
[19:19] kriszyp: rhino was the very first vm to implement it
[19:19] kriszyp: rhino has the most extensive ES5 support of any engine available ATM
[19:20] kriszyp: it has all the Object.* methods
[19:20] creationix: I never could use Rhino personally because the startup time was always terrible
[19:20] kriszyp: so we've been leveraging that stuff for a while in narwhal, definitely great stuff, and great that it is getting in V8 now.
[19:21] kriszyp: yeah, it is painful, that is true
[19:23] RayMorgan has joined the channel
[19:24] creationix: how is tracemonkey in comparison?
[19:24] creationix: kriszyp: is the same engine as latest Firefox right?
[19:25] mikeal: tracemonkey optimizes executing the same functions many times with different values
[19:25] mikeal: which you actually see a lot in web applications
[19:26] mikeal: v8 optimizes funciton execution in general, including short lived functions, which is a little more common when doing backend stuff, at least in node
[19:27] mikeal: v8 and tracemonkey both have insane optimizations written by crazy people, but they aren't identical
[19:27] creationix: and V8, from what I can tell, aims more to be a general purpose c++ library instead of just a backend for a browser
[19:27] mikeal: also, mozilla is working on doing function inlining in spidermonkey to complement the tracer work, since they work better for different cases
[19:28] mikeal: spidermonkey's vision is still to be general purpose
[19:28] mikeal: but like most things at Mozilla, Firefox ends up being the bigger priority
[19:28] creationix: the biggest thing I miss in V8 is not having some of the nice syntax like array comprehensions and generalized array functions
[19:28] mikeal: also, the C bindings for spidermonkey are still XPCOM, which SUCK compared to v8's bindings
[19:29] mikeal: i do miss array comprehensions
[19:29] mikeal: i do NOT miss let and const
[19:29] creationix: but overall, I'm quite satisfied with Ryan's decision to go with V8
[19:31] mikeal: i think anyone who ever had to write an XPCOM binding is happy with Ryan's decision to go with v8 :)
[19:33] maritz has joined the channel
[19:35] voodootikigod: http://post.ly/Ogq2
[19:35] creationix: voodootikigod: I just read it, sounds great
[19:36] voodootikigod: yups
[19:36] creationix: too bad I won't be there
[19:36] voodootikigod: now if only a certain someone who wrote promised based software .....
[19:37] creationix: I feel better about my submission being rejected after reading stuff like that
[19:41] bentomas: kriszyp: thanks for the clarification about Promises. But if they return a different value, does that get propagated along?
[19:42] teemow has joined the channel
[19:45] kriszyp: you want me to talk at to another jsconf sometime, voodootikigod?
[19:46] kriszyp: felt like my last jsconf wasn't that great :/
[19:46] kriszyp: last jsconf talk...
[19:46] voodootikigod: it was great
[19:46] voodootikigod: what are you talking about
[19:47] kriszyp: I don't know, maybe i'll come up with something for next jsconf...
[19:47] mikeal: so, when i load the speakers page, bill hoffman is up front http://jsconf.us/2010/speakers.html
[19:47] mikeal: but if i click his picture, i get Ryah Dahl :)
[19:47] voodootikigod: oh shit
[19:47] voodootikigod: good catch
[19:47] mikeal: i expect a free ticket to jsconf :)
[19:47] voodootikigod: maybe thats cause someone... umm failed to give his junx nudge ryah_away
[19:47] mikeal: the price of QA :P
[19:47] voodootikigod: haha
[19:47] voodootikigod: how do you know thats a bug
[19:48] mikeal: hahaha
[19:48] voodootikigod: and not just a big WTF to ryan
[19:48] voodootikigod: :)
[19:48] mikeal: o
[19:48] voodootikigod: you can have janl's ticket
[19:48] voodootikigod: :)
[19:48] mikeal: it's a bigger WTF to Billy :)
[19:48] voodootikigod: haha
[19:49] kriszyp: bentomas: in regards to callback return values, those are propagated to the returned promise, but does not affect the source promise
[19:49] mikeal: being sued for violating the DMCA is the best thing you could ever have on your resume
[19:49] bentomas: right
[19:49] bentomas: that's what I thought
[19:49] mikeal: i'm sitting next to jan____, he said i can have his ticket :P
[19:50] voodootikigod: mikeal: allegedly
[19:50] voodootikigod: allegedly
[19:50] mikeal: only one of those things isn't true :)
[19:50] voodootikigod: billy -> ryah_away fixed
[19:50] bentomas has left the channel
[19:50] mikeal: bug verified
[19:50] mikeal: expecting payment in full
[19:50] voodootikigod: feature
[19:50] voodootikigod: fea-ture
[19:50] mikeal: haha
[19:58] jan____: WAIT WHAT?
[20:03] voodootikigod: sorry
[20:03] voodootikigod: already reassigned
[20:03] voodootikigod: should have not been relaxing as much
[20:03] voodootikigod: :)
[20:03] mikeal: score!
[20:03] jan____: osnap
[20:03] tilgovi_ has joined the channel
[20:03] mikeal: too bad he signs my paychecks :(
[20:03] voodootikigod: zing
[20:04] voodootikigod: thats what we call -- kick to the node
[20:04] jan____: you're getting a paychek
[20:04] jan____: ?!
[20:04] mikeal: hahaha
[20:04] jan____: ACTION goes and yells at damien
[20:04] jan____: haha
[20:05] voodootikigod: hahaha
[20:05] Booster has joined the channel
[20:06] cloudhead: jan____: you still got room at couchio?
[20:07] mikeal: my desk might be open if i steal jan's ticket to JSConf :)
[20:07] cloudhead: haha
[20:09] jan____: hehe
[20:09] jan____: cloudhead: wanna step by?
[20:09] cloudhead: jan____: I'd have to take a plane to do that : |
[20:09] mikeal: yeah, today is "anyone from open source should stop by and hang out" friday
[20:09] jan____: heh
[20:10] cloudhead: sounds cool though
[20:11] cloudhead: so do you just chill out all day, or is there some dev going on right now?
[20:11] cloudhead: hehe
[20:11] jan____: discussing and working no stuff :)
[20:11] mikeal: jan is avoiding winter in Berlin
[20:11] mikeal: the rest of us live in the area
[20:12] cloudhead: ah I see!
[20:18] cloudhead: urgh, gonna have to find a different strategy for testing without promises
[20:18] cloudhead: it was working perfectly ; /
[20:21] brosner has joined the channel
[20:22] brosner has joined the channel
[20:24] voodootikigod: jan____:
[20:24] jan____: voodootikigod:
[20:29] brosner has left the channel
[20:41] happyelephant has joined the channel
[20:51] kjeldahl has joined the channel
[20:55] dnolen has joined the channel
[20:57] brapse has joined the channel
[21:05] rolfb has joined the channel
[21:06] deanlandolt has joined the channel
[21:06] ollie has joined the channel
[21:13] rakeshpai has joined the channel
[21:14] cloudhead: why can't event.Promise not be changed to work with the new event API?
[21:14] cloudhead: why does it have to be removed?
[21:16] creationix: I think mainly so ryan doesn't have to maintain it and can stay out of the whole debate on prefeences
[21:16] cloudhead: but that means one of the corner stones of node will be 3rd party
[21:16] cloudhead: which doesn't make sense
[21:17] cloudhead: if there's one thing which should be in core, it's a way to work with events
[21:17] cloudhead: and asynchronicity
[21:18] bentomas has joined the channel
[21:18] creationix: well, once we get a good library it might be distributed with node if most people prefer it
[21:18] cloudhead: hopefully..
[21:18] bentomas has left the channel
[21:19] creationix: but even if it's not distributed with node, it's just another library to install with all the other ones your app needs
[21:19] creationix: you can't do much without db, routing, mongo, etc...
[21:20] cloudhead: yea but this is much more fundamental, promises are a building block
[21:20] rakeshpai: I agree with creationix. There's only so much node should do. Libraries have to take on the rest of the responsibility.
[21:20] cloudhead: they shape the style of the code
[21:20] brosner has joined the channel
[21:20] ryah_away: cloudhead: now you can make your own: http://pastie.org/833380
[21:21] rakeshpai: there you go!
[21:22] cloudhead: but everyone is going to be using different asynch libraries now
[21:22] rakeshpai: and IMHO, that's a good thing
[21:22] cloudhead: making it harder to write modular code
[21:23] rakeshpai: that's not necessarily the case. there won't be so much difference in async models that it'd be hard to adopt to them
[21:24] cloudhead: there's a huge difference!
[21:24] cloudhead: promises vs continuables vs function as last argument
[21:24] creationix: as long as libraries follow node's lead and export all async functions in the low-level mode and not their preferred abstraction, then we're good
[21:24] cloudhead: if one db lib uses one of them, and the other uses the other, and I want to make a wrapper
[21:24] cloudhead: you've just doubled the complexity
[21:25] creationix: yes, libraries shouldn't export a different api style than node
[21:25] cloudhead: creationix: so you're suggesting db libs export two sets of functions?
[21:25] inimino: cloudhead: it's pretty trivial to wrap either in the other style
[21:25] creationix: cloudhead: no, they should just export one set in node style
[21:25] cloudhead: creationix: or are you saying libraries shouldn't use any form of asynch abstractions
[21:25] cloudhead: right
[21:25] ryah_away: cloudhead: if something becomes popular and everyone is using it, i'll pull it in
[21:25] creationix: they can use them internally, but not in exported apis
[21:25] cloudhead: and let the users chose how to wrap it
[21:25] inimino: I think the node style with function last is pretty weak
[21:26] inimino: because of the varargs issue
[21:26] cloudhead: +1
[21:26] cloudhead: reminds me of jquery
[21:26] ryah: inimino: more readable though
[21:26] inimino: but other things can be built on top of it, which is all I really care about
[21:27] ryah: inimino: we're just going to have to use if(isFunction(arguments[arguments.length-1]))
[21:27] creationix: it is the most readable, and as long as all those "slice" and "apply" calls are cheap, it's a thin abstraction
[21:27] inimino: ryah: it's not really much more readable if you use named functions
[21:27] creationix: ryah: can't we just assume the last one is a function regardless
[21:27] cloudhead: how would you implement late callback binding though, with the new style?
[21:28] creationix: cloudhead: through the abstraction library
[21:28] inimino: cloudhead: by wrapping it in a promise
[21:28] inimino: (which a library will do for you)
[21:28] cloudhead: hmm
[21:28] inimino: but the idea of everyone adopting node-style callbacks for everything (database libraries, etc) I do not expect to see happen
[21:29] cloudhead: inimino: but that's the problem
[21:29] cloudhead: if it doesn't happen, it sucks
[21:29] ryah: the main point is - i can't spend all day taking patches on Promise - which is what i've been doing for the last month. i can't focus on improving the core i/o
[21:29] inimino: yeah.
[21:29] cloudhead: and if it does, it sucks too, cause it's not necessarily a good fit for every library
[21:29] ryah: so if we draw the line here, i can do more :)
[21:29] inimino: that's why I'm happy with the current solution, it lets ryah move on :)
[21:30] inimino: and node shouldn't be tied up in this endless debate
[21:30] creationix: my only suggestion would be to upgrade the node style to a curried version where the callback is in the second call
[21:30] inimino: cloudhead: like I said, they are easy to wrap and convert between
[21:30] cloudhead: creationix: +1 on that
[21:30] creationix: then it's usable by itself, but still quite low level and wrappable
[21:30] ryah: creationix: no, i want to be able to call these things without the extra object creation
[21:31] rakeshpai: I'm not the hugest fan of the current promises myself, but I don't want to fight that battle. If it's better that we move on, let's do that. I can have my ideas put through in a library, so it's no biggie. Let's seriously move on.
[21:31] inimino: cloudhead: promises have some momentum and with a good Promise implementation they may become the de facto standard
[21:31] creationix: ryah: object creation? I'm just saying to return a function that's expecting the callback instead of undefined
[21:32] inimino: creationix: it's creating an extra function (which is an object)
[21:32] ryah: creationix: yeah, the function you return
[21:32] alexiskander has joined the channel
[21:34] creationix: the net effect would be faster is object creation is cheaper than arguments surgery (slice, apply)
[21:34] creationix: *if
[21:34] creationix: probably not, I'd have to bench it to know for sure
[21:34] cloudhead: inimino: yea, I just think multiple callbacks and late binding are basic stuff event-driven programming needs
[21:35] inimino: cloudhead: well, then you'll import your favorite library and move on
[21:35] inimino: anyway, back to code
[21:35] cloudhead: yeh
[21:35] inimino: ACTION afks
[21:35] cloudhead: well it's as if String wasn't in the core library
[21:36] creationix: I'm fine with using my favorite library, but this will only work at large is all library writers follow node's style and not export promises or continuations
[21:36] inimino: cloudhead: and if there were multiple competing String implementations, none of them obviously optimal, that would be a good thing
[21:37] inimino: creationix: as I said it's pretty trivial to convert between them, so even that isn't a crisis
[21:37] inimino: anyway...
[21:37] inimino: ACTION really gets back to work
[21:37] cloudhead: : )
[21:37] creationix: cool
[21:37] creationix: ryah: want help removing promises?
[21:38] creationix: if you know what format you want, I don't mind doing the grunt work to get it moving faster
[21:39] brosner has left the channel
[21:40] tjholowaychuk has joined the channel
[21:41] sztanpet has joined the channel
[21:41] tjholowaychuk: Hey guys, just released a 62 page, $3 ebook named "Advanced JavaScript" for anyone who is interested :) http://www.dev-mag.com/2010/02/18/advanced-javascript/
[21:41] cmlenz has joined the channel
[21:41] creationix: wow, that's got underscore and express even
[21:42] cloudhead: tjholowaychuk: does it include semi-columns?
[21:42] cloudhead: semicolon*
[21:42] cloudhead: : )
[21:42] tjholowaychuk: hahaha :P
[21:42] tjholowaychuk: creationix: just touches on them, each issue will be highlighting cool new technologies and libraries
[21:43] tjholowaychuk: creationix: I want to get sass / haml for js in the next one to help promote those
[21:43] creationix: cool stuff
[21:43] tjholowaychuk: ps docbook is a PAIN haha omg
[21:44] rakeshpai: cloudhead: interesting that you bring up semicolons. I was just thinking today if there's as much value as we attribute to them.
[21:46] tjholowaychuk: there really is not. with client-side stuff that is compressed yeah sure
[21:46] tjholowaychuk: it can prevent bugs
[21:46] tjholowaychuk: but if you understand the grammar well you hopefully just dont omit them in the wrong places
[21:47] tjholowaychuk: ps. anyone have an idea when the node API will start to stabilize ? I want to update express but its becoming a bit chore to upgrade along with node each time
[21:49] cloudhead: tjholowaychuk: tell me about it.. now that promises are gone, I have to rethink 3 of my libraries v_v
[21:49] cloudhead: rakeshpai: I think it's more of a matter of style at this point, and I prefer having them
[21:50] tjholowaychuk: cloudhead: I still have to read up on the recent changes, there has not been a tag with the promises gone has there?
[21:50] cloudhead: curly braces are more important imo
[21:50] cloudhead: tjholowaychuk: it's not yet implemented
[21:50] cloudhead: it's just recently been decided to remove them
[21:50] tjholowaychuk: ah i gotcha
[21:50] cloudhead: I think it'll be 0.1.30
[21:50] tjholowaychuk: in favor of ?
[21:50] tjholowaychuk: hopefully still something portable, node is decently anti-framework at the moment
[21:50] cloudhead: in favor of passing the function as the last argument
[21:51] cloudhead: s/function/callback
[21:51] cloudhead: jquery style
[21:51] tjholowaychuk: hm
[21:51] tjholowaychuk: pretty annoying for variable args
[21:51] cloudhead: indeed
[21:51] tjholowaychuk: I think foo()(function(){})
[21:51] tjholowaychuk: looks funny
[21:51] tjholowaychuk: but beats the variable arg crap
[21:52] tjholowaychuk: plus for frameworks like mine you kinda have to use the portability of promises
[21:52] tjholowaychuk: thankfully I dont use them tons yet
[21:52] cloudhead: same for what I'm doing
[21:52] cloudhead: I need late binding etc
[21:52] VeXocide has left the channel
[21:52] cloudhead: hopefully someone will implement a nice promise library soon
[21:53] tjholowaychuk: fuck lol
[21:53] tjholowaychuk: i need to get kiwi done so we have some package management
[21:53] cloudhead: heh
[21:53] tjholowaychuk: i have like 5 submodules in express lol its just .. kinda lame
[21:54] ryah: cloudhead: i'm sure by the time i've ported promises we'll have a promise library :)
[21:54] cloudhead: yea, but that's just how the cookie crumbles
[21:54] ryah: s/ported/removed/
[21:54] cloudhead: we just need a nice packaging system
[21:55] ryah: people love promises
[21:55] ryah: but only their own :)
[21:55] creationix: lol
[21:55] creationix: so true
[21:55] cloudhead: ryah: yea, I'm sure that'll be the case
[21:55] cloudhead: infact I bet there will be something up by tomorrow night
[21:55] ryah: actually i'm going to write one
[21:55] cloudhead: ryah: oh the irony
[21:55] tjholowaychuk: haha
[21:55] ryah: i'll just take what i rip out and put it in a gist
[21:56] creationix: ryah: if it's alright, I'm going to start a branch to remove the use of promises everyhwere?
[21:56] tjholowaychuk: anyone have some free server space to donate for getting the kiwi server up? then we can have distributed packages for node
[21:56] ryah: creationix: i'm already doing it
[21:56] creationix: ok, then I'll leave you to it
[21:56] creationix: I've got a mostly idle linode
[21:57] tjholowaychuk: whoop!
[21:57] creationix: what does kiwi need, static file serving?
[21:57] tjholowaychuk: mine is chugging so its no good
[21:57] tjholowaychuk: yup and a tiny little sinatra app for querying / looking up versions etc
[21:57] tjholowaychuk: which needs some major refactoring in terms of performance but its functional
[21:57] tjholowaychuk: just hits the disk to much right now
[21:57] cloudhead: tjholowaychuk: why not node.js?
[21:58] tjholowaychuk: other than that i think all the major stuff is ready to go
[21:58] tjholowaychuk: because node keeps changing! haha
[21:58] tjholowaychuk: static will just be nginx
[21:58] creationix: I don't want to host any more ruby apps, but I can help porting the sinatra app to node
[21:58] cloudhead: mmmmmyes
[21:58] tjholowaychuk: fair enoguh
[21:58] tjholowaychuk: im down
[21:58] creationix: and host that along with the static files
[21:59] tjholowaychuk: if your interested i am totally down http://github.com/visionmedia/kiwi
[21:59] creationix: btw, what did you think of the article on express and mongo?
[21:59] tjholowaychuk: was pretty good, few things i noticed could have been improved upon but over all rad
[22:00] creationix: well, please let Ciaran know of any suggesstions, he was looking for feedback
[22:01] creationix: my only complaint was that it's too long for my rss reader, I had to go to the site to read it.
[22:01] tjholowaychuk: haha
[22:01] tjholowaychuk: only thing i remember was he halt()ed instead of just returning a string for the super simple routes he had
[22:01] tjholowaychuk: get('/foo', function(){ return 'bar' })
[22:01] tjholowaychuk: that kinda thing
[22:02] creationix: I have no clue, I've never used express (too busy making up my own stuff)
[22:02] tjholowaychuk: i still need to update the upload support to the new node, fuck haha so much shit
[22:02] tjholowaychuk: fair enough! i know the feeling
[22:02] creationix: but I guess I'll have to learn kiwi to help with that :P
[22:02] tjholowaychuk: i dont have any production stuff with express yet but once node settles down it will be pretty solid
[22:03] creationix: I just use node-router for everything. It's simple, but works
[22:03] felixge has joined the channel
[22:03] felixge has joined the channel
[22:04] tjholowaychuk: express wont be for people who want to rape node for performance, more for "complete" apps
[22:04] tjholowaychuk: but for people who have adhoc needs just regular node will always be the best way to go
[22:05] creationix: I see express as the closest thing to rails in node
[22:06] tjholowaychuk: mostly inspired by sinatra, but ya i agree its the most complete framework in terms of regular web apps
[22:06] tjholowaychuk: i hate rails to be honest
[22:06] creationix: me too
[22:06] creationix: it's like sinatra in style, but like rails in position
[22:09] tjholowaychuk: yup lol
[22:09] tjholowaychuk: mark from joyent was supposed to call me last week, not sure what happened to that
[22:09] tjholowaychuk: i would love to work on express and other js stuff full time
[22:11] creationix: ok, back to porting kiwi...
[22:12] creationix: that would be exciting
[22:13] creationix: I'd go for it, except, I'm tied to Dallas till I finish school
[22:14] tjholowaychuk: what school stuff are you doing?
[22:15] tjholowaychuk: ive gotten so many good offers but i cant work in the US
[22:15] tjholowaychuk: google, facebook etc
[22:15] micheil: did someone want me?
[22:15] tjholowaychuk: im working on kiwi a bit, seems like I have some kind of registration error that popped up magically
[22:15] tjholowaychuk: thought everything was fine
[22:15] rtomayko has joined the channel
[22:17] cloudhead: tjholowaychuk: why can't you work in the US?
[22:17] creationix: tjholowaychuk: I'm working on a bachelors on Software Engineering(security focus) and masters in Computer Science(programming language focus)
[22:17] micheil: ryah: you about?
[22:17] tjholowaychuk: its just a huge process, the facebook guys said it could take up to 9 months to MAYBE work in the US, to get a visa or whatever etc
[22:17] cloudhead: wtf
[22:18] tjholowaychuk: creationix: awesome! is it worth going to school for this stuff? I never have
[22:18] cloudhead: it's supposed to take 1-2 months
[22:18] rakeshpai has left the channel
[22:18] tjholowaychuk: hm
[22:18] cloudhead: there's *a lot* of people on visas over there
[22:18] tjholowaychuk: oh well, I just moved to vic so another big move would suck
[22:18] cloudhead: like, in the tech sector I mean
[22:18] creationix: well, the graduate classes have helped me understand compiler theory and all that jazz, mainly I plan on teaching someday, so a graduate degree is required
[22:19] tjholowaychuk: creationix: very cool! I am really into the same stuff as you, lexing, parsing all that jazz
[22:19] tjholowaychuk: shit
[22:19] tjholowaychuk: i didnt event notice you said jazz too... my had haha.. fuck
[22:20] creationix: just never ask my opinion on semicolons;
[22:20] brosner has joined the channel
[22:20] tjholowaychuk: haha fair enough
[22:20] tjholowaychuk: a lot of people are quite passionate about having semicolons for js
[22:21] tjholowaychuk: i dont have a problem with that i just like to complain about things
[22:21] micheil: ryah: this is the current mkstemp file that I'm working with, it currently has no error checking in the async version though: http://gist.github.com/309284
[22:21] tjholowaychuk: creationix: how much longer until your done school?
[22:22] creationix: tjholowaychuck: If I can make enough by June, then I can quit working and finish school by December
[22:22] creationix: that's the goal atleast
[22:22] tjholowaychuk: cool cool
[22:22] tjholowaychuk: makes me want to go to school, didnt know they had interesting stuff like that
[22:22] tjholowaychuk: maybe they dont here
[22:23] creationix: well, the problem is that you have to suffer through undergrad first
[22:23] creationix: for those of us who already program for a living, it's quite boring
[22:23] tjholowaychuk: yeah i can imagine
[22:23] tjholowaychuk: my friend wait to a place called nait here.. and man.. he learnt absolutely nothing
[22:23] tjholowaychuk: its insane. I would much rather take 2years off and just focus on teaching myself
[22:23] mynyml has joined the channel
[22:24] creationix: and then half the graduate classes are pure academia
[22:24] tjholowaychuk: than pay 30k t kinda learn a bit
[22:24] tjholowaychuk: what do you guys learn compiler-wise? are you guys actually building languages or what
[22:24] creationix: the value in school (besides the diploma) is you learn the boring stuff you would never have the patience to learn on your own
[22:25] tjholowaychuk: haha
[22:25] tjholowaychuk: i just have a hard time deciding what i want to focus on learning
[22:25] tjholowaychuk: i have a huge list
[22:25] tjholowaychuk: im like you, i love working on language related stuff even though it does not bring in any money (for me at least)
[22:27] creationix: tjholowaychuk: so does kiwi work yet?
[22:27] tjholowaychuk: i guess we could use Heroku for kiwi actually.. hmm
[22:27] tjholowaychuk: just trying to figure out whats wrong
[22:30] tjholowaychuk: hmm seems to be working now
[22:33] tjholowaychuk: here is a gist of the repl
[22:33] tjholowaychuk: http://gist.github.com/309298
[22:35] rictic has joined the channel
[22:35] tjholowaychuk: parsing yaml with bash is ... interesting
[22:38] brandon_beacher has joined the channel
[22:38] creationix: I just get "Error: failed to unpack. Seed is invalid or corrupt."
[22:39] tjholowaychuk: you have to `make server-start` first
[22:39] tjholowaychuk: with thin installed
[22:40] creationix: nope, no good
[22:40] tjholowaychuk: but once its live we just point SERVER_ADDR=0.0.0.0 to our linode or w/e
[22:40] tjholowaychuk: hmm
[22:40] tjholowaychuk: what are you getting?
[22:41] creationix: nothing, but when I run the rackup file directly it complains about missing gems
[22:41] creationix: we should get this thing running and the write an article about using kiwi and how to get your project into the repository
[22:42] tjholowaychuk: thats all it probably is
[22:42] tjholowaychuk: i just dont have a script for developers to install the gems
[22:42] tjholowaychuk: yeah man
[22:42] creationix: so you need a server to be a client?
[22:42] tjholowaychuk: nope they wont its just for dev
[22:43] tjholowaychuk: its easy tho `kiwi register name pass` then in a dir with seed.yml `kiwi release express 0.0.1`
[22:43] tjholowaychuk: etc
[22:43] tjholowaychuk: all we need is an IP then we are more or less good to go
[22:44] creationix: ok, so if I run the sinatra app on my machine, then we can use it for hosting?
[22:44] tjholowaychuk: yup
[22:44] creationix: impressive command line interface btw (it's running now that I installed the gems)
[22:45] micheil: good damn.. 85 emails on the node.js ml in 7 hours
[22:45] tjholowaychuk: shit.. i suppose the lib/kiwi.js will need an update too.. fuck haha stupid node
[22:45] creationix: sorry, I probably send about 20 of those
[22:45] tjholowaychuk: thankya!
[22:46] creationix: ok, I can run one ruby app for now then
[22:47] creationix: what subdomain do you want kiwi.creationix.com ?
[22:47] tjholowaychuk: both the bash script, server, and the client js support version resolution so you can have '= 0.0.1', '> 0.0.1', '>= 0.0.1', '>~ 0.0.1' etc
[22:47] tjholowaychuk: hmm
[22:47] tjholowaychuk: I did not buy anything yet but i was thinking kiwijs.org or kiwijs.com
[22:47] tjholowaychuk: or kiwi.nodejs.org ;) haha
[22:48] tjholowaychuk: actually we do not even need a domain name for now to be honest
[22:48] creationix: ryah would probably go for that
[22:48] tjholowaychuk: there is no public interface, just what bash uses
[22:48] creationix: yeah, but dns means less to change if we move it
[22:48] tjholowaychuk: personally I never go to gemcutter.org or anything I would rather just do it via terminal. but would be nice to have a little flashy page for promotion
[22:48] tjholowaychuk: true
[22:49] tjholowaychuk: but kiwi updates itself :) `kiwi update self`
[22:49] tjholowaychuk: haha
[22:49] tjholowaychuk: so no worries
[22:49] creationix: I'll host it at port 80 of http://kiwi.creationix.com/ for now... just a sec...
[22:49] tjholowaychuk: i need to fix some paths n shit for nginx to have an easier time with statics
[22:49] tjholowaychuk: I got a bit carried away with restful stuff
[22:50] micheil: creationix: there's a pull: http://github.com/rsdoiel/howtonode.org/tree/master
[22:52] creationix: micheil: looks like the code needs to be indented, I'll give some feedback to him
[22:53] tjholowaychuk: creationix: kiwi supports multiple envs too, so you can test out new version of a lip quickly, stuff like that without cluttering an env
[22:53] creationix: cool
[22:54] micheil: kk
[22:55] jcrosby has joined the channel
[22:56] creationix: Arrrg, latest node broke the blog engine
[22:56] tjholowaychuk: hahaha fuck
[22:56] creationix: it was running on the 0.1.29 release, I wonder what changed since then
[22:56] mrd`: All of it.
[22:56] mrd`: :)
[22:56] tjholowaychuk: i really hope it's reasonably stable soon
[23:03] creationix: hmm, I don't see any api changes except for removing wait (which I wasn't using)
[23:03] creationix: this is since the 0.1.29 release
[23:08] creationix: ahh, I was in the middle of rewriting the engine last night and didn't finish. That will do it
[23:14] rtomayko has joined the channel
[23:18] creationix: alright new article live and express article updated, I had to push it blindly since my local dev environment is fried
[23:21] tjholowaychuk: dopee
[23:24] jashkenas has joined the channel
[23:26] abadr has joined the channel
[23:29] tjholowaychuk: need some GSOC kids working on this stuff
[23:30] creationix: tjholowaychuk: send me an email with instructions for setting up the server, I just got swamped for the next few hours
[23:30] tjholowaychuk: whats your email
[23:30] creationix: tim@creationix.com
[23:32] voodootikigod_ has joined the channel
[23:33] gf3 has joined the channel
[23:38] tjholowaychuk: creationix: what stuff were you wondering about? the ruby side of things or setting up nginx n whatnot?
[23:39] tjholowaychuk: my servers are kinda bloated lol monit / thin clusters / nginx / collectd / mysql / etc
[23:39] tjholowaychuk: sqlite sucks with multiple processes so i guess we need mysql or some nosql
[23:41] edspencer has joined the channel
[23:48] tjholowaychuk: I could just set up a slice I guess
[23:48] tjholowaychuk: hmm
[23:50] cloudhead has joined the channel
[23:56] abadr: I'm trying to make a simple web server that listens to an AMQP queue and spits out results when available. This http://pastebin.com/d5d87a66d is broken because (I think) the first subscriber gets all the messages and is never removed. What's the right solution?
[23:56] jan____: mikeal: http://github.com/quirkey/jim
[23:56] abadr: I thought of using a module-scoped array to store messages in, with only one subscriber object, but then how would the requests check for new values without polling?
[23:57] quirkey: jan____: My main reason for creating was to use with couchapp ;)
[23:57] jan____: quirkey: that is awesome!
[23:57] abadr: I guess I'm looking for a queue with a non-blocking "wait for new item and remove it".
[23:57] jan____: quirkey: couchapp has a vendor system tho
[23:58] quirkey: yeah, but it doesnt compress/bundle my files
[23:58] jan____: yea
[23:58] jan____: but it uses git for that
[23:58] jan____: sorta
[23:58] quirkey: I've just been doing too much C+V
[23:58] jan____: quirkey: isaacs has a great plan for js packaging that would be a great server component for jim
[23:58] jan____: quirkey: yeah, I resported to symlinks now, but there needs to be asolution, jchris will love you forever
[23:59] quirkey: jan____: this might work for that
[23:59] quirkey: you can point a vendor dir at your couch app dir and jim will search that before JIMHOME for files