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
#!/bin/sh | |
# Minify js files | |
COMPILER="java -jar compiler.jar" | |
OPTIONS="--compilation_level=ADVANCED_OPTIMIZATIONS" | |
SRC=lib | |
DEST=dist |
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
var reduce = Function.prototype.call.bind(Array.prototype.reduce); | |
var trie = (function(){ | |
var wordReduce = function(parent, l) { | |
return (parent[l] = (parent[l] || {})); | |
}; | |
var wordsReduce = function(trie, word) { | |
var node = reduce(word, wordReduce, trie); | |
node[''] = null; | |
return trie; |
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 range(start, end) { | |
var indicies = [], out = []; | |
for (var i = start; i < end; ++i) | |
indicies.push(i); | |
while (indicies.length) { | |
var index = Math.floor(Math.random() * indicies.length); | |
out.push(indicies[index]); | |
indicies.splice(index, 1); | |
} | |
return out; |
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
var transactionalTryStatement = function(body, handlerId, handler, finalizer) { | |
return bind(getState, function(state) { // Get the current state. | |
return tryStatement( // Then evaluate a try statement with an exception handler that | |
body, // restores the saved state and executes the passed in handler. | |
handlerId, | |
next(setState(state), handler), | |
finalizer); | |
}); | |
}; |
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
var _ = {}; | |
var placeholder = function(f /*, ...*/) { | |
var bound = [].slice.call(arguments, 1); | |
return function(/*...*/) { | |
var indx = 0; | |
return f.apply(f, [].reduce.call(arguments, function(p, c) { | |
while (indx in bound) { | |
var val = bound[indx]; | |
if (val === _) |
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
model.location.subscribe(\current -> { | |
if (current && current.start) | |
cm.removeLineClass(current.start.line - 1, 'background', 'active-line'); | |
}, null, 'beforeChange'); | |
model.location.subscribe(\x -> { | |
if (x) | |
cm.addLineClass(x.start.line - 1, 'background', 'active-line'); | |
}); |
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
var fac = let | |
facImpl = \n, sum -> | |
(n ? ['fac', n - 1, n * sum] : ['done', sum]), | |
trampoline = \k -> { | |
while (true) { | |
switch (k[0]) { | |
case 'done': return k[1]; | |
case 'fac': k = facImpl(k[1], k[2]); break | |
} |
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
var idToken = letter; | |
var divToken = character('/'); | |
var regularExpressionToken = binds( | |
enumeration( | |
between(character('/'), character('/'), | |
eager <| many(letter)), | |
optional('', letter)), | |
\body, flag -> | |
always('/' + body +'/' + flag + ')')); |
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
#!/bin/sh | |
KHEPRI="khepri" | |
OPTIONS="" | |
SRC=lib | |
DEST=dist | |
DEST_NODE=dist_node | |
function _compile { |
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
500 Words Generated from a charcter level recurrent neural network (https://github.com/jcjohnson/torch-rnn) | |
trained on Urban Dictionary: https://github.com/mattbierner/urban-dictionary-entry-collector | |
Sampled when RNN was about 20% complete. | |
---- | |
sweats houd | |
Parrsticky Fucking |