This contains solutions to selected coding challenges from codingchallenges.fyi, implemented in the Odin programming language.
The goal is to learn Odin's unique features, such as its type system, explicit error handling, and low-level memory model while solving interesting problems.
Each challenge is organized in its own directory.
wc— Unixwctool: count lines, words, characters, and bytesjson-parser— JSON parser with span-based error reporting
You'll need Odin installed. If you use Nix, a flake.nix is provided with Odin and the OLS language server. With direnv the environment is activated automatically when entering the directory — otherwise run nix develop manually.
To run a challenge:
cd <challenge-directory>
odin run . -- <args>To run tests:
odin test <challenge-directory>/tests