News for hackers. Stuff that matters.
Re:Show HN: DubJS: A New Way to Build Web Apps by timruffles on Tuesday September 11, 2012 @09:52AM (#4505373)
I can't see how the compiled code for Type is supposed to work?

If you deference a JS function from an object, you lose the context of `this`. So in

    Ruby.prototype.cut = function () {
      this.shape(); this.polish();
    };

    var old = Ruby.prototype.cut;

    Ruby.prototype.cut = function () {
      old(); this.engrave();
    };
`Ruby.prototype.cut` will be called with `window` as `this`, so `this.shape` will be undefined. Use `old.call(this)` to get the behaviour you want.
Re:Show HN: DubJS: A New Way to Build Web Apps by keen on Tuesday September 11, 2012 @10:38AM (#4505631)
You're right. I knew I'd miss something! Thanks for catching my mistake.