From 9ada50655dbaa40402f17b6d0319284f604e85a3 Mon Sep 17 00:00:00 2001 From: Raimo Radczewski Date: Tue, 8 Oct 2024 09:11:44 +0200 Subject: [PATCH] Revert "[roc] Remove roc as it isn't version-stable" This reverts commit 7742cd7e405a72749c3dccfda7d7cbe3a5f65dc5. --- roc/.devcontainer/Dockerfile | 16 ++++++++++++++ roc/.devcontainer/devcontainer.json | 33 +++++++++++++++++++++++++++++ roc/.gitpod.yml | 7 ++++++ roc/README.md | 18 ++++++++++++++++ roc/main.roc | 11 ++++++++++ roc/roc.svg | 13 ++++++++++++ 6 files changed, 98 insertions(+) create mode 100644 roc/.devcontainer/Dockerfile create mode 100644 roc/.devcontainer/devcontainer.json create mode 100644 roc/.gitpod.yml create mode 100644 roc/README.md create mode 100644 roc/main.roc create mode 100644 roc/roc.svg diff --git a/roc/.devcontainer/Dockerfile b/roc/.devcontainer/Dockerfile new file mode 100644 index 00000000..e7d18f84 --- /dev/null +++ b/roc/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu +RUN mkdir -p /opt/roc +RUN curl \ + --retry 5 \ + --retry-all-errors \ + --fail \ + --silent \ + --show-error \ + --location \ + https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_$(uname -p)-latest.tar.gz | \ + tar -xz --strip-components=1 -C /opt/roc + +ENV PATH="/opt/roc:${PATH}" + +RUN roc --version + diff --git a/roc/.devcontainer/devcontainer.json b/roc/.devcontainer/devcontainer.json new file mode 100644 index 00000000..c8a60be9 --- /dev/null +++ b/roc/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +{ + "name": "roc", + "build": { + "dockerfile": "Dockerfile", + "context": "." + }, + "customizations": { + "github.com/rradczewski/kata-bootstraps": { + "failingTestVerification": "roc test | tee /dev/stderr | sed 's,\\x1B\\[[0-9;]*m,,g' | grep -q '1 failed and 1 passed'", + "testCommand": "roc test", + "languageLogo": "../roc.svg", + "resources": [ + { + "name": "roc Tutorial", + "url": "https://www.roc-lang.org/tutorial" + }, + { + "name": "roc Documentation", + "url": "https://www.roc-lang.org/docs" + }, + { + "name": "Builtins", + "url": "https://www.roc-lang.org/builtins" + } + ] + }, + "vscode": { + "extensions": [ + "IvanDemchenko.roc-lang-unofficial" + ] + } + } +} \ No newline at end of file diff --git a/roc/.gitpod.yml b/roc/.gitpod.yml new file mode 100644 index 00000000..6eb17bc2 --- /dev/null +++ b/roc/.gitpod.yml @@ -0,0 +1,7 @@ +image: + file: .devcontainer/Dockerfile +tasks: + - name: Init +vscode: + extensions: + - IvanDemchenko.roc-lang-unofficial diff --git a/roc/README.md b/roc/README.md new file mode 100644 index 00000000..6b2984ed --- /dev/null +++ b/roc/README.md @@ -0,0 +1,18 @@ + + +# Kata-Bootstrap: roc + +| [Open in GitHub Codespace](https://github.com/codespaces/new?hide_repo_select=true&repo=rradczewski%2Fkata-bootstraps&ref=roc) | [Open in GitPod.io](https://gitpod.io/#https://github.com/rradczewski/kata-bootstraps/tree/roc) | [Open locally in VSCode](https://rradczewski.github.io/kata-bootstraps/redirect.html?url=vscode%3A%2F%2Fvscode.git%2Fclone%3Furl%3Dhttps%253A%252F%252Fgithub.com%252Frradczewski%252Fkata-bootstraps.git%26ref%3Droc) | +|---|---|---| + +## Test Command + +```sh +$ roc test +``` + +## References + +- [roc Tutorial](https://www.roc-lang.org/tutorial) +- [roc Documentation](https://www.roc-lang.org/docs) +- [Builtins](https://www.roc-lang.org/builtins) diff --git a/roc/main.roc b/roc/main.roc new file mode 100644 index 00000000..cd4e6645 --- /dev/null +++ b/roc/main.roc @@ -0,0 +1,11 @@ +app [main] { + # TODO: Renovate this + pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.12.0/Lb8EgiejTUzbggO2HVVuPJFkwvvsfW6LojkLR20kTVE.tar.br" +} + +import pf.Stdout + +main = Stdout.line "Hello, World!" + +expect Bool.true == Bool.true +expect Bool.false == Bool.true \ No newline at end of file diff --git a/roc/roc.svg b/roc/roc.svg new file mode 100644 index 00000000..408e06d4 --- /dev/null +++ b/roc/roc.svg @@ -0,0 +1,13 @@ + + The Roc logo + A purple origami bird made of six triangles + + + + + + + \ No newline at end of file