o
odinpkg.dev
packages / app / aoc-2024

aoc-2024

ed29ea6app archived

MOVED TO git.liten.app/krig/aoc-2024 - Advent of Code 2024 - New language each day!

MIT · updated 2 years ago

Advent of code, 2024

Languages:

  1. Zig
  2. Odin
  3. Janet
  4. Python
  5. Janet - Again. Tried Gleam but no (see below).
  6. Back to Odin
  7. Also Odin! I liked Odin.
  8. Odin
  9. Odin!
  10. Odin!!

Running with Zig

Zig version used is current master when the code was written.

Example run:

cd 1
zig build run

Running with Odin

Odin version is 2024-11.

Example run:

cd 2
odin run .

Running with Janet

Janet version is 1.36.0-homebrew.

cd 3
janet solution.janet

Running with Python (uv)

Python version is 3.13.

cd 4
uv run --with pytest solution.py

Hare

Hare doesn't work in Mac OS, otherwise I would have used it. :(

Gleam

For day 5 I tried using Gleam. I installed it via Homebrew and got version 1.6.2. First I tried to just gleam run a gleam file, but that didn't work: I need a project. So I ran gleam new followed by gleam run, and was met by a wall of deprecation warnings. That was enough of a bad first impression to make me decide not to use Gleam, and so I did another one in Janet which I had a better experience with.