basalt-bedrock 1.0.0

Definitions for Basalt competition packets
Documentation
port = 80

[setup]
# import = "./setup.toml"

# install = { import = "./install.sh" }
install = '''
dnf install opam
'''

# init = { import = "./init.sh" }
init = '''
opam init -y
eval $(opam env)
'''

[game]
# a user will score two point less than the person who scored previously
score = "p - 2*max(c,a)"
question_point_value = 20

[test_runner]
# import = "./test-runner.toml"

timeout = "60s"
trim_output = true
max_memory = { compile = 128, run = 64 }
max_file_size = 8192

[languages]
python3 = "latest"
java = "21"
ocaml = { build = "ocamlc -o out solution.ml", run = "./out", source_file = "solution.ml" }

[[accounts.hosts]]
name = "Teacher"
password = "abc123"

[[accounts.competitors]]
name = "StudentOne"
password = "123abc"

[[accounts.competitors]]
name = "StudentTwo"
password = "deadbeef"

# Specify information about the packet itself
[packet]
# import = "./packet.toml"
title = "Example Packet"
preamble = '''
This packet includes problems of a difficulty *vastly*
surpassing the capabilities of the average computer
science student. Be wary as these problems will
certainly give you great intellectual trouble. There
is little hope for anyone without a Ph.D in computer
science.

If you decide to attempt these problems anyways, good
luck. You will be rewarded for swiftness in your answers.
'''

[[packet.problems]]
# import = "./problem1.toml"
title = "Reversing a string"
description = '''
Reversing a string is one of the most *basic* algorithmic
problems for a beginner computer science student to solve.

Solve it.
'''

[[packet.problems.tests]]
input = "hello"
output = "olleh"
visible = true

[[packet.problems.tests]]
input = "world"
output = "dlrow"
visible = true

[[packet.problems.tests]]
input = ""
output = ""

[[packet.problems.tests]]
input = "aa"
output = "aa"

[[packet.problems.tests]]
input = "racecar"
output = "racecar"

[[packet.problems]]
# import = "./problem1.toml"
title = "Determine palindrome status"
description = '''
Determine whether the provided string is a palindrome.

You should return "is a palindrome" for palendromes,
and you should return "is not a palindrome" for non-palindromes.

Solve it.
'''
points = 40

[[packet.problems.tests]]
input = "hello"
output = "is not a palindrome"
visible = true

[[packet.problems.tests]]
input = "racecar"
output = "is a palindrome"
visible = true

[[packet.problems.tests]]
input = ""
output = "is a palindrome"

[[packet.problems.tests]]
input = "a"
output = "is a palindrome"

[[packet.problems.tests]]
input = "aa"
output = "is a palindrome"

[[packet.problems.tests]]
input = "hannah"
output = "is a palindrome"