commit 09583a312c149732a21b4df486d1b2efc92252cd
parent 2262d5b617c0092440fa41cbc84c969f34eb2665
Author: NunoSempere <nuno.semperelh@protonmail.com>
Date: Mon, 3 Jun 2024 09:28:16 +0200
add spec for more expressive DSL
Diffstat:
1 file changed, 19 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md
@@ -105,3 +105,22 @@ Conceptually clearer to have all the multiplications first and then all the divi
- [ ] 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
+- [x] Display output more nicely, with K/M/B/T
+- [ ] Consider the following: make this into a stack-based DSL, with:
+ - Variables that can be saved to and then displayed
+ - Other types of distributions, particularly beta distributions? => But then this requires moving to bags of samples. It could still be ~instantaneous though.
+
+Some possible syntax for a more expressive stack-based DSL
+
+```
+1B to 20B
+* 1 to 100
+/ beta(1, 2)
+=: x # content of the stack at this point saved into x
+
+1 to 10
+10 to 100
+=: y # content of the stack at this point saved into y
+
+x - 10B * y # if interpreting x and y as list of samples, you could do - and + operations as well
+```