Hi. 👋🏽 👋 We are happy you are here. 🎉 🌟
exercism/odin
is one of many programming language tracks on Exercism.
This repo holds all the instructions, tests, code, and support files for Odin exercises currently under development or implemented and available for students.
🌟 Track exercises support the dev-2024-08
release of Odin.
Exercises are grouped into concept exercises which teach the Odin syllabus, which will eventually live here, and practice exercises, which are unlocked by progressing in the syllabus tree 🌴 .
Concept exercises are constrained to a small set of language or syntax features.
Practice exercises are open-ended, and can be used to practice concepts learned, try out new techniques, and play. These two exercise groupings can be found in the track config.json, and under the odin/exercises
directory.
🌟🌟 Please take a moment to read our Code of Conduct 🌟🌟
It might also be helpful to look at Being a Good Community Member & The words that we use.
Some defined roles in our community: Contributors | Mentors | Maintainers | Admins
Here to suggest a new feature or new exercise?? Hooray! 🎉
We'd love if you did that via our Exercism Community Forum where there is a dedicated thread for the new Odin track.
Please read Suggesting Exercise Improvements & Chesterton's Fence.
Thoughtful suggestions will likely result in faster & more enthusiastic responses from volunteers.
✨ 🦄 Want to jump directly into Exercism specifications & detail?
Structure | Tasks | Concepts | Concept Exercises | Practice Exercises | Presentation
Writing Style Guide | Markdown Specification (✨ version in contributing on exercism.org)
If you are interested in contributing a new exercise, please have a look at this issue to see which exercises are waiting on implementation. Leave a comment in the issue to notify other contributors which exercise you plan to implement.
The bin/
subdirectory contains several scripts to help you contribute exercises that will run correctly on Exercism:
configlet
is a tool to help track maintainers with the maintenance of their track. Fetch it by running thebin/fetch-configlet
script. Runbin/configlet lint
to verify that the track is properly structured.bin/fetch-ols-odinfmt.sh
will fetch the Odin language server (ols
) that can assist with verifying Odin code directly in your IDE.odinfmt
is a tool that can format Odin code according to the specification inodinfmt.json
. Please runodinfmt
before pushing your changes to the repository. whenever new code is pushed to the repository.bin/format-all.sh
will runodinfmt
on all.odin
files in the repository.bin/run-test.sh
runs the tests for a specific exercise, or for all exercises if no exercise name is provided.bin/verify-exercises
checks the integrity of all exercises, including tests. It is used by the build system whenever new code is pushed to the repository.bin/configlet
can be used to generate a new exercise. More details follow below.
- Run
bin/configlet create --practice-exercise <slug>
to automatically generate the exercise skeleton in theexercises/practice/<slug>/
directory and to updateconfig.json
to reference the new exercise. You can add--author <your_exercism_username>
as option to mark yourself as the creator of this exercise (or add it later in the exercise's.meta/config.json
file.) - Add a solution stub at the exercise's
<slug>.odin
file. This is what students will begin with when they start the exercise. It should make it as easy as possible to understand what they need to solve, without revealing too much of the solution. Stub functions should usually panic, e.g.#panic("Please implement the <stub> function.")
. - Add tests to
<slug>_test.odin
. Verify that the slug solution would fail all tests. - Implement a reference solution at
.meta/<slug>_example.odin
. - Use
bin/run_test.sh <slug>
to verify that your reference solution passes.