change help msg in READMe

This commit is contained in:
NunoSempere 2024-10-01 09:59:45 +02:00
parent 98225e4bb9
commit 5cc14e310b

View File

@ -48,11 +48,12 @@ beta 1 200 # fraction of people that have a piano
=: piano_tuners
```
If you type "help", you can see a small grammar:
If you type "help" (or run fermi -h), you can see a small grammar and some optional command flags:
```
$ fermi
help
1. Grammar:
Operation | Variable assignment | Special
Operation: operator operand
operator: (empty) | * | / | + | -
@ -61,8 +62,9 @@ help
beta: beta alpha beta
Variable assignment: =: variable_name
Variable assignment and clear stack: =. variable_name
Special:
Special commands:
Comment: # this is a comment
Summary stats: stats
Clear stack: clear | c | .
Print debug info: debug | d
Print help message: help | h
@ -71,23 +73,31 @@ help
Exit: exit | e
Examples:
+ 2
# this is a comment
/ 2.5 # this is an operation followed by a comment
* 1 10 # "low high" is interpreted as lognormal
/ 2.5
* 1 10 (interpreted as lognormal)
+ 1 10
* beta 1 10
1 10 # multiplication taken as default operation)
1 10 (multiplication taken as default operation)
=: x
. # return the stack to 1.
.
1 100
+ x
* 1 12
# this is a comment
* 1 12 # this is an operation followed by a comment
* (
1 10
+ beta 1 100
)
=. y # save to variable and clear stack
exit
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
-n int
Specifies the number of samples to draw when using samples (default 100000)
-h Shows help message
```
You can see real life examples [here](https://x.com/NunoSempere/status/1831106442721452312), [here](https://x.com/NunoSempere/status/1829525844169248912), [here](https://x.com/NunoSempere/status/1818810770932568308), [here](https://x.com/NunoSempere/status/1816605190415401100), [here](https://x.com/NunoSempere/status/1816604386703081894), [here](https://x.com/NunoSempere/status/1815169781907042504)