Exercism exercises in Pyret.
If you're solving Exercism exercises offline, you'll need a recent copy of pyret-npm (0.0.27+).
Currently, pyret-npm works on Linux and MacOS platforms although Windows users can run it via the WSL.
However, you can also use Pyret's online IDE.
In that case, you'll need to switch from the IDE's default essentials2021 namespace to the older starter2024 supported by pyret-npm.
For support with Pyret in Exercism, please visit the Pyret subcategory on the official Exercism forum.
Please consult the official Pyret style guide.
To test the exercises, run ./bin/verify-exercises on a Linux or MacOS platform.
This command will iterate over all exercises and check to see if their exemplar/example implementation passes all the tests.
Please see Exercism's contributing guide.
Here's the basic template for an <slug>-test.arr.
Each check block corresponds to a single test case, and its label is reported to the student.
use context starter2024
include file("<slug>.arr")
check "foo returns 1":
foo() is 1
end
check "bar returns 2":
bar() is 2
endconfiglet is an Exercism-wide tool for working with tracks. You can download it by running:
./bin/fetch-configletRun its lint command to verify if all exercises have all the necessary files and if config files are correct:
$ ./bin/configlet lint
The lint command is under development.
Please re-run this command regularly to see if your track passes the latest linting rules.
Basic linting finished successfully:
- config.json exists and is valid JSON
- config.json has these valid fields:
language, slug, active, blurb, version, status, online_editor, key_features, tags
- Every concept has the required .md files
- Every concept has a valid links.json file
- Every concept has a valid .meta/config.json file
- Every concept exercise has the required .md files
- Every concept exercise has a valid .meta/config.json file
- Every practice exercise has the required .md files
- Every practice exercise has a valid .meta/config.json file
- Required track docs are present
- Required shared exercise docs are present