3 ms·
Beautiful CoffeeScript code for metaheuristic optimization. The visualizations are done in Protovis. A common misconception is that Protovis has its own languag
by TrevorBurnham 15y ago
Beautiful CoffeeScript code for metaheuristic optimization. The visualizations are done in Protovis. A common misconception is that Protovis has its own language, since Protovis code is usually in
<script type="text/javascript+protovis">
tags, which lets you write code like
function(x) x*x
This is actually JavaScript 1.8 (see https://developer.mozilla.org/en/New_in_JavaScript_1.8 https://developer.mozilla.org/en/New_in_JavaScript_1.8); Firefox can handle it directly, but Protovis down-compiles it to standard JavaScript for the benefit of other browsers.
That design decision made a lot of sense before CoffeeScript existed, since standard JavaScript becomes extremely unwieldy in a Protovis context. I expect to see a lot more Protovis code done in CoffeeScript in the future.
- deleted 15y ago[deleted]
- TrevorBurnham 15y agoHappens to everyone.