Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/applejag/adventofcode-2024-ocaml
My (failed) attempt at Advent of Code 2024 using OCaml https://adventofcode.com/2024
https://github.com/applejag/adventofcode-2024-ocaml
advent-of-code advent-of-code-2024 advent-of-code-ocaml ocaml
Last synced: 12 days ago
JSON representation
My (failed) attempt at Advent of Code 2024 using OCaml https://adventofcode.com/2024
- Host: GitHub
- URL: https://github.com/applejag/adventofcode-2024-ocaml
- Owner: applejag
- Created: 2024-12-01T12:55:28.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T19:01:47.000Z (2 months ago)
- Last Synced: 2025-01-23T00:30:34.194Z (19 days ago)
- Topics: advent-of-code, advent-of-code-2024, advent-of-code-ocaml, ocaml
- Language: OCaml
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2024 via OCalm
This repo contains my attempt at Advent of Code 2024 ()
> [!NOTE]
> I gave up on OCaml. In summary, what a horrible mess when trying to look
> at docs to learn how to use stuff. It's like when trying to use Emacs
> or NixOS for the first time, people online write "oh to get this thing
> working, just add this stanza to your moniker list, super simple" like
> WHAT ARE YOU TALKING ABOUT???
>
> I just wanted to use some Regex on [day 3](https://adventofcode.com/2024/day/3)
> but I've spent so much time digging through docs and StackOverflow
> answers to try understand how to just *get a damn regex working!*
>
> In summary: OCaml needs to work on their onboarding and improve their
> docs before I ever try that language again.
> For now, this endevour can die in hell while I'm going to skip over to
> a different language.
>
> To not spend too much time thinking, I've decided to use my main
> language instead: Go## Running
Requires regular install of OCaml (v5.2.1+) with `opam` (v2.3.0+)
and `dune` (v3.17.0+):```console
$ dune exec adventofcode -- --help
adventofcode
--file Input file inside the inputs/dayXX/ directory
-help Display this list of options
--help Display this list of options
``````console
$ dune exec adventofcode -- 1
=== file: inputs/day01/input.txt
=== day 01, part 1:
sum: 2430334=== day 01, part 2:
array len: 99980
sum: 28786472
```