Top all-time · #6467
disnetdev
Personal blog · disnetdev.com/blog · on HN as disnetprogrammingweb
disnetdev is a personal blog at disnetdev.com about programming and web. Since 2011, 12 different Hacker News readers have linked it 17 times, most often “Contracts For CoffeeScript”. It is still writing: the last post was on 2026-11-02, and you can follow it by feed.
home page for disnetdev
Most-linked posts?
- Contracts For CoffeeScript8 people · 10 mentions · first linked 2011-08-30
What Hacker News says?
Macros will eventually be in core JS, see: http://disnetdev.com/blog/2012/10/14/hygienic-macros-for-jav... and http://brendaneich.github.com/Strange-Loop-2012/#/40 http://www.infoq.com/presentations/State-JavaScript
Comment linking /blog/2012/10/14/hygienic-macros-for-javascript/
on “Vigil: A programming language with eternal moral vigilance”Submitted Contracts For CoffeeScript as a story · 139 points
HN discussionHow will functions learn to stay in line if the compiler doesn't make an example every now and then? On a serious note, what you're thinking of is contracts, like so[0] [0] http://disnetdev.com/contracts.coffee/
Comment linking /contracts.coffee/
on “Vigil: A programming language with eternal moral vigilance”Submitted An Atmospheric Website as a story · 3 points
HN discussionFor another cool CoffeeScript "dialect", see Contracts: http://disnetdev.com/contracts.coffee/ It's a great way to write defensive code for those of us who find writing regular unit tests a little onerous even (if they are often necessary). I'm planning on using it in all my CoffeeScript, up to -- but not including -- generated production Javascript.
Comment linking /contracts.coffee/
on “IcedCoffeeScript”Submitted Skyreader: A RSS Reader on the AT Protocol as a story · 2 points
HN discussionThis means contracts.coffee ( http://disnetdev.com/contracts.coffee/ ) can finally be used on the stable version of node.js!
Comment linking /contracts.coffee/
on “Node.js v0.8.0 [stable] is out”Contracts.coffee was great but sadly didn't live long. It would be worth reviving if there is an easier way to maintain it alongside mainline (iced) coffeescript. http://disnetdev.com/contracts.coffee/
Comment linking /contracts.coffee/
on “I Was Wrong About TypeScript”It's a fork of CoffeeScript so it replaces your "coffee" executable. If you don't want to overwrite your normal CoffeeScript compiler just run the contracts.coffee "coffee" executable from its own directory. I mention this briefly towards the end of the quick start section of the doc: http://disnetdev.com/contracts.coffee/#quickstart
Comment linking /contracts.coffee/
on “Contracts For CoffeeScript”Library author covers the relevant history here, http://disnetdev.com/blog/2011/08/23/Contracts.coffee-Contra... This Lambda The Ultimate discussion on Benjamin C. Pierce's (Types And Programming Languages) talk Types Considered Harmful is also of interest - the gist being that contracts are useful because sometimes static types are just too damn hard - http://lambda-the-ultimate.org/node/2828 EDIT: Might as well li…
Comment linking /blog/2011/08/23/Contracts.coffee-Contracts-For-JavaScript-and-CoffeeScript/
on “Contracts For CoffeeScript”First, jashkenas isn't held up by standards committees -- he's able to experiment with cool new client-side web tech on whatever schedule he wants. And building on this, even more new stuff is happening, like Tim Disney's contracts.coffee [1]. Second, your ability to ship the coolest new client-side technology isn't being held up by TC39, or by the HTMLWG -- nothing we or they could do would make MS ship IE 9 for XP…
Comment linking /contracts.coffee/
on “Brendan Eich on Ecma TC39, JavaScript.next, and Google Dash”If JS/CS typing is an issue for you, you may want to take a look at CoffeeScript Contracts, a fork of CoffeeScript that implements contracts: http://disnetdev.com/contracts.coffee/ I've not used them in production yet but it looks like a very cool way to ensure code quality. The syntax of the Contracts resembles Haskell type definitions. Contracts are very flexible -- for example, you could create and enforce a "Pri…
Comment linking /contracts.coffee/
on “CoffeeScript Under Pressure”Contracts.js [1] has been actively developed for quite a while. It uses Sweet.js "macros" to provide runtime type-checking. Also usable in CoffeeScript. It doesn't get much hype because it's not new, but that's why I like it. Reliable and stable. [1] http://disnetdev.com/contracts.js/ [EDIT: Contracts.js is based off Racket, advantages pointed out by another commenter.]
Comment linking /contracts.js/
on “Why Asana Is Switching to TypeScript”You might want to try out CoffeeScript with contracts: http://disnetdev.com/contracts.coffee/ Compiles to beautiful JavaScript and gives programmers the ability to check types at compile-type. If you've never used it, I'd compare CoffeeScript to an amalgam of Ruby and Python, with a little Haskell thrown in (take a look at how you specify contracts, for example). If you like functional programming, you'll love Coffe…
Comment linking /contracts.coffee/
on “The V8 Myth: Why JavaScript is not a Worthy Competitor”Not sure if const/private are a good fit for contracts but things like "account balance is always positive" can be done right now with contracts.coffee using object invariants. For example, verifying the invariants of a binary search tree hold [1]. [1] http://disnetdev.com/contracts.coffee/#duck
Comment linking /contracts.coffee/
on “Loyal Opposition to Const, Private, Freeze, Non-Configurable, Non-Writable...”FYI, http://disnetdev.com/contracts.coffee/ is built on ES6 proxies and CoffeeScript. I agree on circling a local maximum, but some of this is just JS catching up to Ruby and Python. Syntactic affordances for usability that desugar to only lightly extended kernel semantics. The big ticket items are modules, proxies, weak maps, binary data, and the like. When I liken JS to x86, I'm not comparing it to assembly so muc…
Comment linking /contracts.coffee/
on “Loyal Opposition to Const, Private, Freeze, Non-Configurable, Non-Writable...”Yeah - this has been posted way too many times. There was some work on significantly modifying the CoffeeScript compiler to add static metaprogramming (macros+more) but I don't think it's gone anywhere recently - https://github.com/fab13n/parsec-coffee-script . The real point of the article was to draw attention to how extensible the CoffeeScript compiler can be. Jeremy talks about this when presenting the language…
Comment linking /contracts.coffee/
on “Making Macros in CoffeeScript”