- compiler.js is very complex
- can rendering be pulled out?
- can it be ignorant of line names, ASSERT, DEFINE?
- analyst.js and analyst_worker.js are unused
- editor.js is too complex
- maybe factor out validity polling
- navigate.js needs a description, what does it do?
- how could it be made more general?
- switch to CommonJS module format
- factor sync out of corpus.js
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
# This faster version uses a vectorized pyro.plate and pyro.mask | |
# to perform vectorized inference. | |
def vectorized_model(x, y, truncated): | |
rate = my_regression_function(x) | |
y_dist = dist.Exponential(rate) | |
with pyro.plate("data", len(x)): | |
with pyro.mask(~truncated): | |
pyro.sample("obs", y_dist, obs=y) | |
with pyro.mask(truncated): | |
pyro.sample("truncated_obs", |
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
// 1. render a line from the corpus | |
var line = ...from corpus... | |
var term = syntax.compiler.load(line); | |
var renderableTerm = syntax.compiler.parenthesize(term); | |
...render renderableTerm via angular... | |
// 2. move the cursor to a line | |
var cursor = ...global... | |
var line = ...from corpus... | |
var term = syntax.compiler.load(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
/* from the cython compiler */ | |
#ifdef __GNUC__ | |
/* Test for GCC > 2.95 */ | |
#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) | |
#define likely(x) __builtin_expect(!!(x), 1) | |
#define unlikely(x) __builtin_expect(!!(x), 0) | |
#else /* __GNUC__ > 2 ... */ | |
#define likely(x) (x) | |
#define unlikely(x) (x) |