New language: Carp

This commit is contained in:
Radon Rosborough 2021-07-18 04:12:32 +00:00
parent 82411182bb
commit 0305d58d18
1 changed files with 47 additions and 0 deletions

47
langs/carp.yaml Normal file
View File

@ -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))