From b64a7249353002138bc66ae52e57eeec286d65f1 Mon Sep 17 00:00:00 2001 From: ~karx Date: Thu, 8 Apr 2021 17:19:37 +0000 Subject: [PATCH] Update 'README.md' --- README.md | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f51c69f..48b472f 100644 --- a/README.md +++ b/README.md @@ -8,39 +8,23 @@ *"Well, Rust's logo is a crab, right? And crabs live on beaches. Beaches have sand. A program is just a bunch of bytes one after another. So what do you bite that's related to sand? A sandwich!"* -## Running +## Example -Use `cargo` to run an input file. - -```bash -git clone https://tildegit.org/karx/sandwich -cd sandwich -cargo run -``` - -## Reference - -`sandwich` is comprised of *opcodes*. The syntax looks like this: -``` -opcodeArguments -``` - -The currently available opcodes are as follows: - -- `p` - print out the arguments: `pHello World!` prints "Hello World!" -- `a`, `s`, `m`, `d` - add, subtract, multiply, and divide, respectively: `a2-2` adds 2 + 2. -- `l` - declare a variable: `lv9` declares variable `v` with value `9`; doing `p$v` prints out 9. -- `f` - declare a function: see [the devlog entry](https:/tilde.team/~karx/blog/sandwich-devlog-3-function-junction.html) for more info -- `i` - import variables and functions from another file: see [the devlog entry](https://tilde.team/~karx/blog/from-cup-import-coffee-sandwich-devlog-4.html) for more info. - -Here's an example "Hello world" program: - -``` +```sandwich lhHello lwWorld! +# prints hello world p$h $w ``` +## Running + +See the [Running/Installation](/karx/sandwich/wiki/Running) instructions for more info. + +## Documentation + +Documentation is hosted on [the wiki](/karx/sandwich/wiki/Reference). + ## Contributing