Hey!
This is started kit for working Advent of Code puzzle. You can clone it and build it with esy
git clone https://github.com/ManasJayanth/reason-aoc-starter
cd reason-aoc-starter
esyTo enable Flambda optimisations on your compiled binaries, use @release
Examples,
esy @release # to just build
esy start:release # to run flambda opt enabled binary
If you dont have esy already installed,
npm i -g esy
# or
yarn global add esyWe recommend the following editor plugins
- OCaml Platform for VSCode/VSCodium
- reason-mode with esy-mode for Emacs
- vim-reasonml for Vim
Associated forum post can be found here.
If you have any questions, feel free to ask on the there. Tag me on Discord if you are on Reason Servers. I'm Manas (prometheansacrifice)#0219 there.
Tips and new ideas are welcome too!
@reason-native/consolefor logging@reason-native/fsfor file utilities@reason-native/fpfor type safe path handling@reason-native/relyfor unit testing the puzzle cases@reason-native/clifor CLI parsing@opam/containerfor an extended standard library@opam/angstromfor parsing the puzzle input
- Dune - to build the project
- Pesy - to provide an alternative convenient JSON syntax for Dune file. Optional. Use
esy pesy eject ./path/to/sub-packageto use the Dune file for that subpackage.
(TODO)
Reason is a type safe language and functions have to be intentionally
written in a way accept arguments of any type. Benefits of such strong
typing is seen in large codebases, but for simple printing, one could
need type specific printers like print_int etc.
@reason-native/console provided a familiar generic Console.log
inspired by the browser's console.log. See here
Console.log("Some string here");
Console.log(true);
Console.log(Some("hi"));
Console.log(None);