Ask HN: Which language for Advent of Code in 2024?
I’ve considered Mercury and Picat this year but I don’t want to go without regex and/or associative arrays. Also Mercury seems moreso about performance than semantics.
I think it’s Prolog for me again this year but with an effort to complete the problems in a more “Prologesque” way.
https://github.com/betaveros/noulith
Designing a programming language to speedrun Advent of Code: https://hw.leftium.com/#/item/38255808
> I did not design and implement a programming language for the sole or even primary purpose of leaderboarding on Advent of Code. It just turned out that the programming language I was working on fit the task remarkably well.
-- "betaveros, the guy who won 1st place in Advent of Code every single year since 2019"
Last year I had just started learning Rust so used that. That turned out to be a mistake, I was spending most of my time figuring out what the borrow checker was complaining about rather than looking at the actual problems.
Hopefully that's behind me now so I will use Rust again.
That sounds about right if your aim was to learn the language. I had the same experience with Prolog.
Python. I want to focus on having fun with the puzzles instead of decrypting unfamiliar syntax errors.
I didn't do it last year, but the years before I used Racket and Common Lisp. I might try Common Lisp again since I really want to rediscover the experience of programming w/ Sly (a fork of SLIME).
I'm also considering trying to solve everything with Z3.
I watched somebody on YouTube solve some AoC problems in Excel, so I’m going to try that this year. Not sure how far I’m going to get, but it’ll be a fun challenge!
I’ve been tempted in that direction too. Or using something like “Forth”. Both strike me as a “solve AoC with an abacus” style approaches, requiring bigger levels of problem understanding.
I’m ready to give zig another try.
gleam was a lot of fun last year, for those who are gleam curious.
For those who are doing something like protocol hackers, instead of adventure code, ocaml 5+ with effects was super fun
Typescript for me, although I only ever do the first few days. I don't have the time to spend on it after that.
Yep.
I like the puzzle-solving aspect of it - like doing Sudoku, or Alphaguess - but I don't particularly have the time in my life right now to use AoC to learn a new language. (The last time was approximately 6 years ago, when I was learning Elixir - which was also for work. It was also when my child was young enough that I had spare time after her bedtime, but not so young that she didn't sleep through teh night.)
?? turn <language of choice> into api over prolog ??
C# again. I aspire to get back to C++ but this isn’t the year for me.
Will be doing it in F# this year. Last year I did C#/Rust split until real life took over and they ended up being too similar to each other at solving AoC type of challenges.
F# sounds fun, I’ve been goofing off with Haskell in my spare time and really liking how it handles parsing problems. I’d think F# would be elegant for AOC too
math :)