From 0305d58d1846ce55437711caed5c261ee207750c Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sun, 18 Jul 2021 04:12:32 +0000 Subject: [PATCH] New language: Carp --- langs/carp.yaml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 langs/carp.yaml diff --git a/langs/carp.yaml b/langs/carp.yaml new file mode 100644 index 0000000..227d5bf --- /dev/null +++ b/langs/carp.yaml @@ -0,0 +1,47 @@ +id: "carp" +name: "Carp" + +info: + year: 2015 + desc: "Programming language designed to work well for interactive and performance sensitive use cases like games, sound synthesis and visualizations" + ext: carp + web: + source: "https://github.com/carp-lang/Carp" + category: general + mode: interpreted + platform: [] + syntax: lisp + typing: static + paradigm: + - functional + - imperative + usage: [] + +install: + manual: | + install -d "${pkg}/opt/carp" + install -d "${pkg}/usr/local/bin" + + ver="$(curl -sSL "https://api.github.com/repos/carp-lang/Carp/releases" | jq '.[].tag_name' -r | grep Linux | sort -rV | grep -Eo '[0-9.]+' | head -n1)" + wget "https://github.com/carp-lang/Carp/releases/download/v${ver}_Linux/v${ver}.zip" -O carp.zip + unzip carp.zip + mv "v${ver}/bin"/* "${pkg}/usr/local/bin/" + mv "v${ver}/core" "${pkg}/opt/carp/" + +repl: | + CARP_DIR=/opt/carp carp +input: | + (* 123 234) + +main: "main.carp" +template: | + (use IO) + + (println "Hello, world!") + +run: | + CARP_DIR=/opt/carp carp main.carp + +scope: + code: | + (def x (* 123 234))