commit 355ad371a7773e5db5094b29d0bb32bbb1038f27
parent 290be7720474dd9af4a98f958d77337503f9135b
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date: Fri, 10 May 2024 22:47:34 +0100
savepoint
Diffstat:
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
@@ -61,15 +61,30 @@ Why use make instead of the built-in go commands? Because the point of make is t
## Usage together with standard Linux utilities
-```
+```bash
f
-ed -u "s|#.*||" | sed -u 's|M|000000|g' | f
+sed -u "s|#.*||" | sed -u 's|M|000000|g' | f
+
cat more/piano-tuners.f | f
cat more/piano-tuners-commented.f | sed -u "s|#.*||" | sed -u 's|M|000000|g' | f
+
tee -a input.log | go run f.go | tee -a output.log
tee -a io.log | go run f.go | tee -a io.log
+
+function f(){
+ sed -u "s|#.*||" |
+ sed -u "s|//.*||" |
+ sed -u 's|K|000|g' |
+ sed -u 's|M|000000|g' |
+ sed -u 's|B|000000000|g' |
+ /usr/bin/f
+}
```
+## Tips & tricks
+
+Conceptually clearer to have all the multiplications first and then all the divisions
+
## Roadmap
- [x] Write README
@@ -81,3 +96,5 @@ tee -a io.log | go run f.go | tee -a io.log
- [x] Add show more info version
- [ ] Program into a small device, like a calculator?
- [ ] Think of some way of calling bc
+- [ ] Think how to integrate with squiggle.c to draw samples
+- [ ] Think about how to draw a histogram from samples
diff --git a/f.go b/f.go
@@ -82,7 +82,9 @@ EventForLoop:
fmt.Printf("=> %.1f %.1f\n", old_low, old_high)
logmean_old, logstd_old := boundsToLogParams(old_low, old_high)
fmt.Printf("=> Lognormal, with logmean: %.1f, logstd: %.1f\n", logmean_old, logstd_old)
+ continue EventForLoop
}
+ fmt.Println(error_msg_cont)
continue EventForLoop
case 2:
new_low, err1 = strconv.ParseFloat(tokens[0], 64)