A workshop for algorithms and data-structure puzzles — pronounced like "auto zone"
This repository has been archived on 2026-06-17. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 53.1%
  • Ruby 14.5%
  • Go 14%
  • Rust 10%
  • JavaScript 8.2%
  • Other 0.2%
Find a file
Kai Siren c2d4b5dc04
Some checks failed
Run Tests / go (push) Has been cancelled
Run Tests / js (push) Has been cancelled
Run Tests / python (push) Has been cancelled
Run Tests / ruby (push) Has been cancelled
Run Tests / rust (push) Has been cancelled
docs: route dev commands through ward (coily -> ward migration)
Flip Surface A dev-verb routing to `ward exec` / .ward/ward.yaml.
coily ops cloud passthroughs stay on coily (no ward ops surface yet).

closes #11

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 23:46:17 -07:00
.agents/skills/repo-algo-zone chore: add repo-algo-zone pointer skill 2026-06-02 01:02:17 -07:00
.claude lockdown: sync to coily v2.55.0 [skip ci] 2026-06-15 00:26:19 +00:00
.coily chore: add .coily/coily.yaml marker file 2026-05-26 10:37:57 -07:00
.github/workflows SQL CREATE TABLE in python (#89) 2023-10-21 17:03:07 -07:00
.ward chore: add .ward/ward.yaml bridge (.coily -> .ward migration) 2026-06-14 15:09:49 -07:00
data Tokenizer (#92) 2023-10-22 21:48:44 -07:00
docs chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00
snippets chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00
src chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00
.gitignore Tokenizer (#92) 2023-10-22 21:48:44 -07:00
.pre-commit-config.yaml chore: remove broken coily-trailer prepare-commit-msg hook 2026-06-05 22:57:24 -07:00
AGENTS.md docs: route dev commands through ward (coily -> ward migration) 2026-06-16 23:46:17 -07:00
CLAUDE.md chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00
config.yml Refactor & Modernize (#83) 2023-10-14 20:38:49 +00:00
Pipfile Add rust builtin sorting (#13) 2019-12-30 02:09:25 -08:00
Pipfile.lock Pull latest language versions (#82) 2023-09-24 00:44:21 -04:00
README.md chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00
tasks.py chore: adopt agentic-os v0.11.1 hook block and catalog trifecta 2026-05-30 10:32:25 -07:00

algo-zone

pronounced like "auto zone", a place for figuring out algorithms

Installation Prereqs

  • python
  • docker

Usage

Install the required dependencies:

pip install invoke pyyaml

Then run any of the algos:

invoke test $language $script         $data_index
invoke test python    insertion_sort  any
invoke test python    any             any
invoke test rust      selection_sort  any
invoke test python    sql             any
invoke test python    sql             0

You will get output like so:

$ invoke test python any

docker run ... python ./src/python/sort_builtin.py
  ⏱  ./src/python/sort_builtin.py on ./data/sort_input_0.txt ran for 0.52 seconds
  🟢 ./src/python/sort_builtin.py on ./data/sort_input_0.txt succeeded
docker run ... python ./src/python/sql_test.py
  ⏱  ./src/python/sql_test.py on ./data/sql_input_2.sql ran for 0.75 seconds
  🟢 ./src/python/sql_test.py on ./data/sql_input_2.sql succeeded
docker run ... python ./src/python/sql_test.py
  ⏱  ./src/python/sql_test.py on ./data/sql_input_1.sql ran for 0.74 seconds
  🟢 ./src/python/sql_test.py on ./data/sql_input_1.sql succeeded

✨ script run success ✨

(note: the example above may drift from real output)

New Languages

Adding new languages is a multi-step process, wherein you have to adapt each language to use parent python script's API. Which is to say, tasks.py expects every language to operate in roughly the same way, so each language needs modification to give them some uniformity of behavior. algo-zone was implemented in python first, so expect languages to be easier to add the more similar they are to python.

The broad steps to adding a language, are:

  • Add it to config.yml. The only truly "required" keys are the dockerImage and scriptInvoker. Everything else is about modifying the languages to behave in a uniform manner. Your new language will likely require its own new special one-off key, like rust needing useShortScriptName.

  • Create a folder in src/. If you're lucky, then you can get away with src/ only needing the source file. The first source file you will want to add is sort_builtin. Every sort_builtin file just calls the language's native sorting function. You will also of course want to add any necessary language metadata, like go.mod or Cargo.toml.

  • Handle any special cases. There are always special cases. I can only imagine this repo running out of special cases once it has 10+ languages. Some existing special cases include:

    • Languages that simply do not have a way to say "run this one individual language file inside this folder". golang has this. The workaround was to make every file be a "test" file.
    • Compiled languages each require a special something. rust specifically requires the target scripts to be mentioned in its manifest file (Cargo.toml). This can result in confusion if you add a new algo but forget to add it to the manifest file.

The most important thing to understand is: you need to figure out how to get your language to execute some code in a specific file. It its weird and complicated, when you add your new special case handling code to tasks.py. After that, you should be able to do:

invoke test cobol insertion_sort

Which will spin up a docker container for your brand new fancy language. The tests run inside that docker container. That docker container will be expecting a file as output, look at the existing language examples to get an idea of what this means.

Overall you should expect this process to take a few hours. It's hard getting all these languages to play nice with each other!!!

See also

Cross-reference convention from coilysiren/agentic-os#59.