This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(args) { | |
var i, j, k; | |
// ... | |
// j acquires some interesting value | |
// Who called foo when j took this interesting value? | |
// | |
var e = new Error('dummy'); | |
var stack = e.stack.replace(/^[^\(]+?[\n$]/gm, '') | |
.replace(/^\s+at\s+/gm, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: compile | |
time=/usr/bin/time | |
compile: dart typescript coffeescript haxe jsx | |
dart: | |
$(time) dart2js -ooutput/dart.js source/simple.dart | |
typescript: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A list of languages which compile to JS (Elm, Purescript, OCaml) | |
(Inspired by this thread: https://groups.google.com/forum/#!topic/elm-discuss/Um7WIBTq9xU) | |
They all support curry calling convention by default. | |
Some interesting results: | |
1. `min` is curried function, only OCaml(BuckleScript) managed to optimize this overhead. | |
2. All optimize the self tail call | |
3. Only BuckleScript and PureScript type-specialized comparison functoin (>=) and inlined |