From 9d5c6fa275ce4efc41e41a8d023943abcc195a76 Mon Sep 17 00:00:00 2001 From: Mario Arias Date: Mon, 13 Dec 2021 20:33:53 +0800 Subject: [PATCH] README.md --- README.md | 23 ++++++++++++++++++++++- benchmarks.sh | 2 ++ build.sh | 2 ++ checks.sh | 4 ++++ repl.sh | 2 ++ tests.sh | 2 ++ 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 benchmarks.sh create mode 100755 build.sh create mode 100755 checks.sh create mode 100755 repl.sh create mode 100755 tests.sh diff --git a/README.md b/README.md index 047970b..389eab4 100644 --- a/README.md +++ b/README.md @@ -1 +1,22 @@ -# monyet \ No newline at end of file +# Monyet + +[Crystal](https://crystal-lang.org/reference/1.2/index.html) implementation of the [Monkey Language](https://monkeylang.org/) + +Monyet has a sibling implementation for Kotlin: [monkey.kt](https://github.com/MarioAriasC/monkey.kt) + +## Status + +The two books ([Writing An Interpreter In Go](https://interpreterbook.com/) +and [Writing A Compiler in Go](https://compilerbook.com/)) are implemented. + +## Commands + +Before running the command you must have crystal and shards installed on your machine + +| Script | Description | +|-----------------|--------------------------------------------------------------------------------------------------------------------| +| `tests.sh` | Run all the tests | +| `checks.sh` | Run format tool and ameba checks | +| `build.sh` | Release build | +| `benchmarks.sh` | Run the classic monkey benchmark (fibonacci(35)), requires one command (`--eval`,`--eval-fast`,`--vm`,`--vm-fast`) | +| `repl.sh` | Run the Monyet REPL | \ No newline at end of file diff --git a/benchmarks.sh b/benchmarks.sh new file mode 100755 index 0000000..8e645e0 --- /dev/null +++ b/benchmarks.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +./bin/monyet "$1" diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..569a7c5 --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +shards build --release diff --git a/checks.sh b/checks.sh new file mode 100755 index 0000000..b463a71 --- /dev/null +++ b/checks.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +crystal tool format +shards install +crystal bin/ameba.cr \ No newline at end of file diff --git a/repl.sh b/repl.sh new file mode 100755 index 0000000..e0fe3b6 --- /dev/null +++ b/repl.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +./bin/monyet --repl diff --git a/tests.sh b/tests.sh new file mode 100755 index 0000000..d2ad038 --- /dev/null +++ b/tests.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +crystal spec --verbose \ No newline at end of file