From a50de3437f86c6446dc2415434f754fb1bc565c4 Mon Sep 17 00:00:00 2001 From: Boris Kayi Date: Mon, 10 Jul 2023 17:12:30 +0200 Subject: [PATCH] Docs (#17) * chore: code cleaning * docs: add installation script * docs: update download script * Update README.md --- .gitignore | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 17 +++++++++- 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3b735ec..9eef093 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,94 @@ # Go workspace file go.work + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser +.vscode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix diff --git a/README.md b/README.md index 0a78e99..92ac72f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,22 @@ --- ## Quick Start -You start playing with the REPL by running the main file located in `crafting-interpreters/glox` +### From Binary (only available on macos and linux): +The script below will download the `glox` binary in your system and give it executable permission. After this script, you can run `./glox` and it should start the REPL. + +> Make sure you have [curl](https://curl.se/) installed in your system before running the script +```sh +curl -L -s https://api.github.com/repos/silverhairs/crafting-interpreters/releases/latest \ +| grep "browser_download_url.*glox-$(uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/macos/')-$(uname -m)" \ +| cut -d '"' -f 4 \ +| wget -qi - \ +&& chmod +x glox-$(uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/macos/')-$(uname -m) \ +&& sudo mv glox-$(uname -s | tr '[:upper:]' '[:lower:]' | sed 's/darwin/macos/')-$(uname -m) $PWD/glox +``` + +### From Source +Cloning the repository and runing `main.go` should start the REPL. `main.go` is located in `crafting-interpreters/glox`. You need to have Golang installed in your system for this option. + ```sh go run main.go ```