trite / aoc-melange

Made this in 2022, started a new one as of 2023 at https://github.com/trite/melange-aoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARCHIVED REPOSITORY INFO

This was what I used in 2022. Updated things in a new repo in 2023 at: https://github.com/trite/melange-aoc

aoc-melange

Setting up to do Advent of Code problems using ReasonML, compiling with Melange

Quick Start

make init

# build watch with:
make watch

# run something:
node _build/default/src/2022/Day01.bs.js

Folder Structure

Code and data folders are laid out to allow for multiple years of Advent of Code solutions in the same project.

  • Data in data/{year}/ (ex: data/2022/Day01.txt)
  • Code in src/{year}/ (ex: src/2022/Day01.re)

Commonly reused helper stuff lives in src/shared.

Commands

You can see all available commands by running make help or just make. Here are a few of the most useful ones:

  • make init: set up opam local switch and download OCaml, Melange and JavaScript dependencies
  • make install: install OCaml, Melange and JavaScript dependencies
  • make watch: watch for the filesystem and have Melange rebuild on every change

About

Made this in 2022, started a new one as of 2023 at https://github.com/trite/melange-aoc

License:MIT License


Languages

Language:Reason 96.0%Language:Makefile 2.3%Language:C++ 1.1%Language:HTML 0.4%Language:Shell 0.2%