HACKER Q&A
📣 aredox

Which language will you try for this year's Advent of Code and why?


Which language will you try for this year's Advent of Code and why?


  👤 Jtsummers Accepted Answer ✓
Same language as every year, Common Lisp. I've finished all but 9 problems since 2018 using it (2019 has 5 left, 2021 has 4 left), and went back and finished 2015-2017 with it as my warmups for 2019 through 2022.

I usually pick a second language that I'm either curious about or want to improve with, not sure what that'll be this year. I'm starting on a temporary assignment where we'll be using a lot of JavaScript so there's a decent chance I'll use it as my second language. I usually get about half the problems done with the second language before writing two (or three last year) solutions a day becomes too much of a time sink.

For my second languages I generally try to avoid any external libraries and focus on the language standards. If I pull in anything it's regexp/parsing tools if the base language doesn't have it as part of its library. Last year I also took a heavy TDD approach on my second implementation to try out Hypothesis (property-based testing for Python, great tool). I usually do a TDD-lite approach for my first solution in Lisp.

I've used Ada (2020), Rust (2021), Python (2022), and C++ (2022).


👤 usgroup
Oh I'm glad you asked :-) Yes, I'll try it if I have the time, Prolog will be my language of choice, because unlikely a conventional language, when writing in Prolog you are expressing the problem in a computational logic with a proof procedure. Its much closer to a knowledge representation language than anything else.

👤 karmakaze
Previously I used F# and Rust which were good to see how they're good/better and/or different from what I know Java, C++.

Since last year the most interesting languages I've read are Inko[0] and Jai, but I don't know the latter is available/ready. Pony is another one that's had my interest and I hadn't tried yet.

[0] https://news.ycombinator.com/item?id=38270265#38271412


👤 archargelod
Nim!

This year will be my first live advent of code. I've been learning programming in general and Nim language for the past half a year. And only start feeling confident with it.

So, while learning it, I've got through most problems of 2021 and 2022 AOC with multiple days or week-long delays between.

I'm a bit nervous to be burnt out by making myself go through AOC daily. Because I know how hard for me to solve the problems past first 15.


👤 mikewarot
More than likely, I'll use pascal, again.[1] It's a fun thing, pascal is NOT something to try to speedrun it with... you'd be better off in Python, or perhaps STOIC or LISP

[1] https://github.com/mikewarot/Advent_of_Code_in_Pascal


👤 Measter
I'm going to be boring and just use Rust again. I might also do some of the earlier ones in my own language, but it's so primitive that it's hard to do non-trivial things.

👤 daltont
Inko would be interesting (https://inko-lang.org/)