Preparing for Advent of Code 2021Andrew Fontaine <email@example.com>
This will be my fourth (😮) year doing the Advent of Code challenges! The first three years, I have attempted the challenges in elixir. I was new to elixir, and (while still an amateur) I’ve grown pretty comfortable with the language. It was fun creating simple OTP processes to handle “communication” between two “computers”, but I felt it was time to strike out and learn something new!
Then, I came across
bucklescript reason ReScript. ReScript is
and a lot of tooling to make that syntax compile very nicely to
but with a much more general purpose attitude. It was perfect. I
problems. It turns out I may have bitten off more than I could chew. I
still come back to the screeps project every now and then, but I mostly
tinker for a few hours before forgetting about it.
It did get me thinking about how interesting a language ocaml is, though. It’s got a lot of depth and history, and has inspired a lot of other languages. I had remembered hearing something about a language trying to bring ocaml to the BEAM, erlang’s (and elixir’s) virtual machine. It looked to be a great candidate for this year!
this past weekend to actually check out the language and make sure it would work well within my existing advent of code infrastructure. I already had lovely mix tasks for downloading puzzle input and running solutions, so if Caramel would work with all that, I’d be pretty happy.
It turns out that the maintainer of Caramel hasn’t had the ability to build out a lot of the language. I understand! My own [library] withers on a vine while I find the energy to work on it. I just don’t want to struggle and fight and be missing features I would normally expect to be there and so on and so on. Learning how ocaml works on top of figuring out these problems is enough, and I don’t want to be frustrated with the tooling, too. Maybe next year I’ll have enough of an idea of what I am doing, and can help out!
For now, it looks like the only solution is to turn to the original…
So yeah, in a few day’s time I’ll be doing advent of code in ocaml. I played around with it a bit this weekend to get to a level of infrastructure similar to my mix tasks to get a taste of the language (more to come on that if I am capable). I can download input and have something set up to nicely run solutions, although I think that second one could probably use a bit of work.
For now? It works, and should be able to hit the ground running come Dec. 1, and keep this updated on my progress.
Any other advent of code fans out there? Any ocaml fans with tips? Let me know!
Want to discuss this post?
Reach out via email to ~firstname.lastname@example.org, and be sure to follow the mailing list etiquette.Other posts