diff --git a/packages/hy/1.0a4/build.sh b/packages/hy/1.0a4/build.sh new file mode 100644 index 0000000..3f1e9fe --- /dev/null +++ b/packages/hy/1.0a4/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +curl "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz" -o python.tar.gz +tar xzf python.tar.gz --strip-components=1 +rm python.tar.gz + +./configure --prefix "$PREFIX" --with-ensurepip=install +make -j$(nproc) +make install -j$(nproc) + +cd .. + +rm -rf build + +bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy +bin/pip3 install --pre hy==1.0a4 hyrule==0.1 toolz multipledispatch funcy funcy_chain pyrsistent diff --git a/packages/hy/1.0a4/environment b/packages/hy/1.0a4/environment new file mode 100644 index 0000000..977a5e8 --- /dev/null +++ b/packages/hy/1.0a4/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH diff --git a/packages/hy/1.0a4/metadata.json b/packages/hy/1.0a4/metadata.json new file mode 100644 index 0000000..fe827af --- /dev/null +++ b/packages/hy/1.0a4/metadata.json @@ -0,0 +1,5 @@ +{ + "language": "hy", + "version": "1.0a4", + "aliases": ["hy", "hy1.0", "hy1.0a4"] +} diff --git a/packages/hy/1.0a4/run b/packages/hy/1.0a4/run new file mode 100644 index 0000000..4fd0359 --- /dev/null +++ b/packages/hy/1.0a4/run @@ -0,0 +1,3 @@ +#!/bin/bash + +hy "$@" diff --git a/packages/hy/1.0a4/test.hy b/packages/hy/1.0a4/test.hy new file mode 100644 index 0000000..d47e36b --- /dev/null +++ b/packages/hy/1.0a4/test.hy @@ -0,0 +1,16 @@ +(print (cut "abcdef" 1 4)) + +(defn test [a b [c None] [d "x"] #* e] + [a b c d e]) +(print (test 1 2)) ; => [1, 2, None, 'x', ()] +(print (test 1 2 3 4 5 6 7)) ; => [1, 2, 3, 4, (5, 6, 7)] + +(import math) +(print (math.sqrt 2)) + +(import hyrule [inc]) +(require hyrule [assoc]) +(print (list (map inc [1 2 3]))) +(setv d {}) +(assoc d "a" 1 "b" 2) +(print d) diff --git a/readme.md b/readme.md index 7724fdb..f2d21aa 100644 --- a/readme.md +++ b/readme.md @@ -398,6 +398,7 @@ Errors may return status codes as follows: `groovy`, `haskell`, `husk`, +`hy`, `iverilog`, `japt`, `java`,