diff --git a/README.md b/README.md index fdf534c..13a6aff 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project is a minimalist, calculator-style DSL for fermi estimation. It can ## Motivation -Sometimes, [Squiggle](https://github.com/quantified-uncertainty/squiggle), [simple squiggle](https://git.nunosempere.com/quantified.uncertainty/simple-squiggle) or [squiggle.c](https://git.nunosempere.com/personal/squiggle.c) are still too complicated and un-unix-like. +Sometimes, [Squiggle](https://github.com/quantified-uncertainty/squiggle), [simple squiggle](https://git.nunosempere.com/quantified.uncertainty/simple-squiggle) or [squiggle.c](https://git.nunosempere.com/personal/squiggle.c) are still too complicated and un-unix-like. In particular, their startup cost is not instant. ## Installation @@ -94,7 +94,7 @@ Command flags: -echo Specifies whether inputs should be echoed back. Useful if reading from a file . -f string - Specifies a file with a model to run + Specifies a file with a model to run. Sets the echo command to true by default. -n int Specifies the number of samples to draw when using samples (default 100000) -h Shows help message @@ -194,6 +194,7 @@ Done: To (possibly) do: +- [ ] With the -f command line option, the program doesn't read from stdin after finishing reading the file - [ ] Add functions. Now easier to do with an explicit representation of the stakc - [ ] Think about how to draw a histogram from samples - [ ] Dump samples to file diff --git a/fermi b/fermi deleted file mode 100755 index 4b843d5..0000000 Binary files a/fermi and /dev/null differ diff --git a/fermi.go b/fermi.go index e40fdf8..5c87623 100644 --- a/fermi.go +++ b/fermi.go @@ -459,7 +459,7 @@ replForLoop: func main() { num_samples_flag := flag.Int("n", N_SAMPLES, "Specifies the number of samples to draw when using samples") - filename := flag.String("f", "", "Specifies a file with a model to run") + filename := flag.String("f", "", "Specifies a file with a model to run. Sets the echo flag to true") echo_flag := flag.Bool("echo", false, "Specifies whether inputs should be echoed back. Useful if reading from a file.") help_flag := flag.Bool("h", false, "Shows help message") flag.Parse() @@ -472,6 +472,7 @@ func main() { if *filename != "" { file, err := os.Open(*filename) if err == nil { + *echo_flag = true reader = bufio.NewReader(file) } else { fmt.Printf("Error opening filename; reading from stdin instead\n")