Compare commits
No commits in common. "a859f2572f611b590ee2c17007eb4a176e36837f" and "7ff3b2148e5abc8cdb872faa7d6c1bb680c40d50" have entirely different histories.
a859f2572f
...
7ff3b2148e
|
@ -1,6 +1,6 @@
|
|||
# A minimalist calculator for fermi estimation
|
||||
|
||||
This project is a minimalist, calculator-style DSL for fermi estimation. It can multiply, divide, add and substract scalars, lognormals and beta distributions.
|
||||
This project is a minimalist, stack-based DSL for fermi estimation. It can multiply, divide, add and substract scalars, lognormals and beta distributions.
|
||||
|
||||
## Motivation
|
||||
|
||||
|
@ -120,7 +120,6 @@ help
|
|||
|
||||
- It's conceptually clearer to have all the multiplications first and then all the divisions
|
||||
- For things between 0 and 1, consider using a beta distribution
|
||||
- Because the model reads from standard input, you can pipe a model to it. For instance, try cat more/piano-tuners.f | fermi
|
||||
|
||||
## Different levels of complexity
|
||||
|
||||
|
@ -162,7 +161,6 @@ Done:
|
|||
|
||||
To (possibly) do:
|
||||
|
||||
- [ ] Specify number of samples as a command line option
|
||||
- [ ] Document parenthesis syntax
|
||||
- [ ] Add functions. Now easier to do with an explicit representation of the stakc
|
||||
- [ ] Think about how to draw a histogram from samples
|
||||
|
|
3
f.go
3
f.go
|
@ -364,7 +364,6 @@ replForLoop:
|
|||
|
||||
switch {
|
||||
case strings.TrimSpace(new_line_trimmed) == "": /* Empty line case */
|
||||
continue replForLoop
|
||||
/* Parenthesis */
|
||||
case len(words) == 2 && (words[0] == "*" || words[0] == "+" || words[0] == "-" || words[0] == "/") && words[1] == "(":
|
||||
new_stack := runRepl(Stack{old_dist: INIT_DIST, vars: stack.vars}, reader)
|
||||
|
@ -393,6 +392,8 @@ replForLoop:
|
|||
fmt.Printf("%s ", words[1])
|
||||
prettyPrintDist(stack.old_dist)
|
||||
stack.old_dist = INIT_DIST
|
||||
// fmt.Println()
|
||||
// continue replForLoop
|
||||
default:
|
||||
op, new_dist, err := parseWordsIntoOpAndDist(words, stack.vars)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user