From fae1210d0a3fd98762e1397e6b275478adad4b45 Mon Sep 17 00:00:00 2001 From: acheronfail Date: Wed, 20 Dec 2023 07:48:52 +1030 Subject: [PATCH] add julia --- .github/workflows/ci.yml | 3 +++ count.jl | 6 ++++++ justfile | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 count.jl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ff1c63..7bb9009 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,6 +68,9 @@ jobs: cargo install timers cargo install hyperfine cargo install ripgrep --features 'pcre2' + cargo install juliaup + + juliaup add release mkdir -p /opt/zig && cd $_ wget --quiet -O zig.tar.xz $(curl --silent https://ziglang.org/download/index.json | jq -r '.[keys_unsorted[1]]["x86_64-linux"].tarball') diff --git a/count.jl b/count.jl new file mode 100644 index 0000000..17ff42e --- /dev/null +++ b/count.jl @@ -0,0 +1,6 @@ +i = 0 +target = parse(Int, ARGS[1]) +while i < target + i = (i + 1) | 1 +end +println(i) diff --git a/justfile b/justfile index 0749072..aa948d0 100644 --- a/justfile +++ b/justfile @@ -118,3 +118,6 @@ build-assembly: (_check "nasm") build-cobol: (_check "cobc") cobc -O3 -free -x -o count count.cbl echo './count {{i}}' > CMD + +build-julia: (_check "julia") + echo 'julia ./count.jl' > CMD