Skip to content

Instantly share code, notes, and snippets.

@fasterthanlime
Created November 4, 2014 17:18
Show Gist options
  • Save fasterthanlime/4c348adeca79370bf58c to your computer and use it in GitHub Desktop.
Save fasterthanlime/4c348adeca79370bf58c to your computer and use it in GitHub Desktop.
Ki source map / stack trace problem.
_ki = {
init: function (self$1813, ns_name$1814) {
if (_ki.namespaces[ns_name$1814] === undefined) {
_ki.namespaces[ns_name$1814] = { vars: {} };
}
self$1813._ki_ns_name = ns_name$1814;
self$1813._ki_ns_ctx = self$1813;
_ki.intern.bind(self$1813)(_ki.modules.core);
_ki.intern.bind(self$1813)(_ki.modules.mori);
_ki.intern.bind(self$1813)(_ki.modules);
_ki.intern.bind(self$1813)(_ki.namespaces[_ki_ns_name].vars);
},
intern: function (obj$1815) {
for (var e$1816 in obj$1815) {
this[e$1816] = obj$1815[e$1816];
}
},
namespaces: {},
modules: {
core: {
truthy: function (x$1817) {
return x$1817 === false || x$1817 == null ? false : true;
},
falsey: function (x$1818) {
return !truthy(x$1818);
},
not: function (x$1819) {
return !truthy(x$1819);
},
eq: function () {
return equals.apply(null, arguments);
},
neq: function () {
return !equals.apply(null, arguments);
},
add: function () {
var res$1820 = 0;
for (var i$1821 = 0; i$1821 < arguments.length; i$1821++) {
res$1820 += arguments[i$1821];
}
return res$1820;
},
sub: function () {
var res$1822 = arguments[0];
for (var i$1823 = 1; i$1823 < arguments.length; i$1823++) {
res$1822 -= arguments[i$1823];
}
return res$1822;
},
mul: function () {
var res$1824 = 1;
for (var i$1825 = 0; i$1825 < arguments.length; i$1825++) {
res$1824 *= arguments[i$1825];
}
return res$1824;
},
div: function () {
var res$1826 = arguments[0];
for (var i$1827 = 1; i$1827 < arguments.length; i$1827++) {
res$1826 /= arguments[i$1827];
}
return res$1826;
},
mod: function (a$1828, b$1829) {
return a$1828 % b$1829;
},
lt: function () {
var res$1830 = true;
for (var i$1831 = 0; i$1831 < arguments.length - 1; i$1831++) {
res$1830 = res$1830 && arguments[i$1831] < arguments[i$1831 + 1];
if (!res$1830)
break;
}
return res$1830;
},
gt: function () {
var res$1832 = true;
for (var i$1833 = 0; i$1833 < arguments.length - 1; i$1833++) {
res$1832 = res$1832 && arguments[i$1833] > arguments[i$1833 + 1];
if (!res$1832)
break;
}
return res$1832;
},
leq: function () {
var res$1834 = true;
for (var i$1835 = 0; i$1835 < arguments.length - 1; i$1835++) {
res$1834 = res$1834 && arguments[i$1835] <= arguments[i$1835 + 1];
if (!res$1834)
break;
}
return res$1834;
},
geq: function () {
var res$1836 = true;
for (var i$1837 = 0; i$1837 < arguments.length - 1; i$1837++) {
res$1836 = res$1836 && arguments[i$1837] >= arguments[i$1837 + 1];
}
return res$1836;
},
prn: function () {
console.log.apply(console, arguments);
},
str: function () {
return String.prototype.concat.apply('', arguments);
}
},
mori: function () {
try {
return require('ki/node_modules/mori');
} catch (e$1838) {
try {
return require('mori');
} catch (e$1839) {
return mori;
}
}
}()
}
};
(function () {
_ki.init(this, '_ki');
return function () {
_ki_ns_ctx['problem'] = function () {
return function () {
throw 'Hey there';
}.call(this);
};
_ki.namespaces[_ki_ns_name].vars.problem = _ki_ns_ctx['problem'];
return _ki_ns_ctx['problem'];
}()(function () {
_ki_ns_ctx['problem2'] = function () {
return problem();
};
_ki.namespaces[_ki_ns_name].vars.problem2 = _ki_ns_ctx['problem2'];
return _ki_ns_ctx['problem2'];
}(), function () {
_ki_ns_ctx['problem3'] = function () {
return problem2();
};
_ki.namespaces[_ki_ns_name].vars.problem3 = _ki_ns_ctx['problem3'];
return _ki_ns_ctx['problem3'];
}(), function () {
_ki_ns_ctx['problem4'] = function () {
return problem3();
};
_ki.namespaces[_ki_ns_name].vars.problem4 = _ki_ns_ctx['problem4'];
return _ki_ns_ctx['problem4'];
}(), problem4());
}());
//# sourceMappingURL=stack.js.map
ki require core
ki (
(defn problem []
(throw "Hey there"))
(defn problem2 []
(problem))
(defn problem3 []
(problem2))
(defn problem4 []
(problem3))
(problem4))
{"version":3,"sources":["stack.ki.js"],"names":["_ki","init","self$1468","ns_name$1469","namespaces","undefined","vars","_ki_ns_name","_ki_ns_ctx","intern","bind","modules","core","mori","obj$1470","e$1471","truthy","x$1472","falsey","x$1473","not","x$1474","eq","equals","apply","arguments","neq","add","res$1475","i$1476","length","sub","res$1477","i$1478","mul","res$1479","i$1480","div","res$1481","i$1482","mod","a$1483","b$1484","lt","res$1485","i$1486","gt","res$1487","i$1488","leq","res$1489","i$1490","geq","res$1491","i$1492","prn","console","log","str","String","prototype","concat","require","e$1493","e$1494","call"],"mappings":"AAwkBMA,GAAA,GAAM;AAAA,IACJC,IAAA,EAAM,UAAUC,SAAV,EAAgBC,YAAhB,EAAyB;AAAA,QAC7B,IAAIH,GAAA,CAAII,UAAJ,CAAeD,YAAf,MAA4BE,SAAhC,EAA2C;AAAA,YACzCL,GAAA,CAAII,UAAJ,CAAeD,YAAf,IAA0B,EAAEG,IAAA,EAAM,EAAR,EAA1B,CADyC;AAAA,SADd;AAAA,QAI7BJ,SAAA,CAAKK,WAAL,GAAmBJ,YAAnB,CAJ6B;AAAA,QAK7BD,SAAA,CAAKM,UAAL,GAAkBN,SAAlB,CAL6B;AAAA,QAM7BF,GAAA,CAAIS,MAAJ,CAAWC,IAAX,CAAgBR,SAAhB,EAAsBF,GAAA,CAAIW,OAAJ,CAAYC,IAAlC,EAN6B;AAAA,QAO7BZ,GAAA,CAAIS,MAAJ,CAAWC,IAAX,CAAgBR,SAAhB,EAAsBF,GAAA,CAAIW,OAAJ,CAAYE,IAAlC,EAP6B;AAAA,QAQ7Bb,GAAA,CAAIS,MAAJ,CAAWC,IAAX,CAAgBR,SAAhB,EAAsBF,GAAA,CAAIW,OAA1B,EAR6B;AAAA,QAS7BX,GAAA,CAAIS,MAAJ,CAAWC,IAAX,CAAgBR,SAAhB,EAAsBF,GAAA,CAAII,UAAJ,CAAeG,WAAf,EAA4BD,IAAlD,EAT6B;AAAA,KAD3B;AAAA,IAYJG,MAAA,EAAQ,UAAUK,QAAV,EAAe;AAAA,QACrB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