- “we don’t care about perf”
- “clojure should be fast”
- “we’re using mongo!”
- “clojure might not be fast enough, we should use type hints”
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
Routine { | |
s = Server.default; | |
s.waitForBoot; | |
// max buffer duration | |
~dur = 8.0; | |
// 4-channel buffer: pitch, clar, amp, flatness | |
~buf = Buffer.alloc(s, s.sampleRate * ~dur, 4); |
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/bash | |
cd ~ | |
echo "Linking .nvimrc into home directory (~)" | |
if [ -z "$XDG_CONFIG_HOME" ]; then | |
export XDG_CONFIG_HOME=~/.config | |
fi | |
if [ ! -d $XDG_CONFIG_HOME/nvim ]; then | |
echo "Creating $XDG_CONFIG_HOME/nvim..." |
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 jLouvain = function () { | |
//Constants | |
var __PASS_MAX = -1 | |
var __MIN = 0.0000001 | |
//Local vars | |
var original_graph_nodes; | |
var original_graph_edges; | |
var original_graph = {}; | |
var partition_init; |
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
# Returns a lambda used to determine what number is at t in the range of a and b | |
# | |
# interpolate_number(0, 500).call(0.5) # 250 | |
# interpolate_number(0, 500).call(1) # 500 | |
# | |
def interpolate_number(a, b) | |
a = a.to_f | |
b = b.to_f | |
b -= a | |
lambda { |t| a + b * t } |