# SPDX-License-Identifier: CC0-1.0 language = 'Pony' display = 'Pony (ponyc 0.59.0)' license = [ { name = 'BSD-2-Clause', url = 'https://github.com/ponylang/ponyc/blob/main/LICENSE' }, ] library.regex = { license = [ { name = 'BSD-2-Clause', url = 'https://github.com/ponylang/regex/blob/main/LICENSE' }, ] } library.valbytes = { license = [ { name = 'BSD-2-Clause', url = 'https://github.com/ponylang/valbytes/blob/main/LICENSE' }, ] } filename = 'Main.pony' install = ''' # SHELL variable must be set for the judge system export SHELL=bash sudo apt-get update sudo apt-get install -y clang git sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ponylang/ponyup/latest-release/ponyup-init.sh)" export PATH=$HOME/.local/share/ponyup/bin:$PATH ponyup default x86_64-linux-ubuntu24.04 ponyup update ponyc release-0.59.0 ponyup update corral release # create project and install libraries corral init gh_latest_version() { local owner owner="$1" local repo repo="$2" local info info="$(curl -s https://api.github.com/repos/"$owner"/"$repo"/releases/latest)" local version version="$(echo "$info" | sed -n '/tag_name/ { s/.*: "v\?\(.*\)".*/\1/;p }')" echo "$version" } AC_REGEX_VERSION="$(gh_latest_version "ponylang" "regex")" corral add --version="$AC_REGEX_VERSION" github.com/ponylang/regex.git AC_VALBYTES_VERSION="$(gh_latest_version "ponylang" "valbytes")" corral add --version="$AC_VALBYTES_VERSION" github.com/ponylang/valbytes.git corral update ''' compile = ''' export PATH=$HOME/.local/share/ponyup/bin:$PATH if ! corral run -- ponyc -b a.out -V=0 > err-out; then tail -n +4 err-out 1>&2 fi ''' object = 'a.out' execution = [ './a.out', ]