Skip to content

Commit

Permalink
add nim
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Dec 22, 2023
1 parent fae1d95 commit fae1cad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- java
- julia
- kotlin
- nim
- node
- perl
- php
Expand Down Expand Up @@ -72,6 +73,11 @@ jobs:
juliaup add release
wget -qO choosenim.sh https://nim-lang.org/choosenim/init.sh
bash ./choosenim.sh -y
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
export PATH="$HOME/.nimble/bin:$PATH"
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
mkdir -p /opt/zig && cd $_
Expand Down
7 changes: 7 additions & 0 deletions count.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os, strutils

var i: int = 0
let target = parseInt(paramStr(1))
while i < target:
i = (i + 1) or 1
echo i
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,7 @@ build-julia: (_check "julia")

build-coffeescript: (_check "coffee")
echo 'coffee ./count.coffee {{i}}' > CMD

build-nim: (_check "nim")
nim compile --opt:speed ./count.nim
echo './count {{i}}' > CMD

0 comments on commit fae1cad

Please sign in to comment.