If I had never written Lisp and I wanted to attempt this in a Lisp-language which one would you suggest? Ideally I want something that I can learn quickly (the basics to solve some problems at least) and is batteries-included enough to let me parse strings or whatever without too much of a hassle.
Racket is quite user friendly and has good docs. The standard library is massive too, it comes with a pretty good GUI library and an IDE written with it in its default distribution.
I completed the advent in Clojure last year, and found it very suitable to the task.
The standard library is comprehensive, but small; the batteries-included (persistent) data-structures are a real treat; and the sequence-processing primitives are well suited to the advent problems.
Clojure was my first lisp, and I’ve enjoyed every minute of it.
I’m stuck on day 1 because I’ve never Haskelled and now it’s time to do the ridiculous thing of getting stuck on simple file input. But I expected to fall behind on AOC so I’m not worried.
Going to see if I can manage to do everything in Raku.
I’ve been following the language for literally 20 years but I generally manage to spend about 1 day a year actually working with it. So this will be an attempt to boost that number to 25 this year.
Since this is a year ago, I can’t express this in numbers. But yeah, it took me quite some effort to get the runtime of some solutions down. I had to be smart about using algorithms and minimizing runtime. I wrote about some of it here.
I decided to try out Erlang for this year. I’ve avoided trying to learn a language through AoC up to now, but since last year I managed to get to the end without dropping out halfway through I’m confident enough that I’ll make it this year too. Erlang is also in a particular spot where I find it somewhat familiar (the functional style, pattern matching) but also foreign enough (the concurrency model) to make it an interesting choice. I also don’t have any particularly good ideas of what I could make with it so I think it’ll be a good chance to get acquainted with it.
I used Elixir last year and I think there were some things in the Erlang stdlib that let you use mutable arrays. It might be helpful if you hit a wall with immutability. (On the elixir forum there was much groaning on some days.)
Yeah, I ended up using mutable data structures in last year’s F# fairly often. Some problems just aren’t suited for (usual) immutable data structures. I’m sure there’s some exotic data structures out there that would make performance acceptable but I don’t know if the trade-off is worth it.
Thank you for the tip about atomics, though I think I’ll just retreat to Ruby or OCaml/F# if I’m having too much trouble!
There is an IRC channel for us lobsters on Libera.Chat:
#lobsters-advent
.I’m going to try Zig this year, adding solutions to the same repository mk12/aoc.
Also trying Zig, and my first time attempting the AoC. My repo
Good luck, it is a very enjoyable language to work with :)
PS: Lightweight standard library documentation can be found here => https://ziglang.org/documentation/0.8.1/std/
Last year’s thread: https://lobste.rs/s/3uxtgb/advent_code_2020_promotion_thread
I’m not actually a software engineer by trade, but I am giving this a go in…Go (https://git.sr.ht/~ols/advent-of-code-2021)
I also chose Go! https://github.com/addy/AoC2021
Join us for another year of festive programming fun! (For certain values of fun..)
Let’s go!
I think this year I’m gonna stick with the basics… and learn a new language! 😄
Since you asked, Zig is nice. :)
I will try Eiffel or Ada. Something that involves writing contracts
Please let us know how it goes. I’d love to see either language used.
Ah. Ada sounds like a fun thing to try. I may be joining!
I’m planning to do AoC in Kotlin this year.
Jetbrains has put together a github template and a blog post with some information (they are sponsoring the event).
Here’s my repository.
If I had never written Lisp and I wanted to attempt this in a Lisp-language which one would you suggest? Ideally I want something that I can learn quickly (the basics to solve some problems at least) and is batteries-included enough to let me parse strings or whatever without too much of a hassle.
Personally I’d choose a Scheme variant if I was trying something Lisp-like for the first time. Probably Racket? https://racket-lang.org/
Or you could go minimal and choose one of the R5RS schemes like Chicken. But Racket has nice tool support.
Seconding racket. Massive standard library, maybe the most popular lisp these days alongside clojure.
Racket is quite user friendly and has good docs. The standard library is massive too, it comes with a pretty good GUI library and an IDE written with it in its default distribution.
I completed the advent in Clojure last year, and found it very suitable to the task.
The standard library is comprehensive, but small; the batteries-included (persistent) data-structures are a real treat; and the sequence-processing primitives are well suited to the advent problems.
Clojure was my first lisp, and I’ve enjoyed every minute of it.
I used Janet last year, and had a great time with it.
Doing the AoC in Uxntal https://paste.sr.ht/~rabbits/4739fd7f8c0b8f0833a6eeaa75d44d9c905991dd
My programming language/solutions monorepo: https://github.com/healeycodes/adventlang 🎅
I’m doing Lean
Nice! I’m doing Isabelle/HOL. I couldn’t think of any way to state correctness for day 2, though.
I’m stuck on day 1 because I’ve never Haskelled and now it’s time to do the ridiculous thing of getting stuck on simple file input. But I expected to fall behind on AOC so I’m not worried.
Going to see if I can manage to do everything in Raku.
I’ve been following the language for literally 20 years but I generally manage to spend about 1 day a year actually working with it. So this will be an attempt to boost that number to 25 this year.
Doing it in PureScript again this year!
All my solutions (for all years) are up in a repo.
Hoping to make it through all 25 days this year :)
I am trying to do it all in AWK-in-a-file this year - day one and day two so far.
I hope I don’t get filtered before 20 this year…
20 was my nemesis last year. I’m poking at it now…
I will share my repo: https://github.com/tumdum/aoc2021 🦀
https://github.com/timvisee/advent-of-code-2021
This year I’ll be trying to solve all 50 puzzles combined in <1 second again.
How difficult did that end up being last year?
Since this is a year ago, I can’t express this in numbers. But yeah, it took me quite some effort to get the runtime of some solutions down. I had to be smart about using algorithms and minimizing runtime. I wrote about some of it here.
Giving it a try in Rust this year: https://gitlab.com/legoktm/advent-of-code-2021
How about a private leaderboard for lobste.rs? Join with this code: 400344-db76bd5d.
And here’s my repo: https://github.com/Scorpil/aoc2021
Is that the board with id 989653? Because there is already a private leaderboard for lobste.rs
I wasn’t aware of that, do you mind sharing the code? I’ll edit my comment.
Just linked to last year’s thread in a top level comment; that mentions
Ah thanks, I wondered what that 1000xEngineer was on my private leaderboards :D
FWIW, here’s my repo (with links to the repos for previous years, if anybody is interested): https://github.com/narimiran/AdventOfCode2021
I decided to try out Erlang for this year. I’ve avoided trying to learn a language through AoC up to now, but since last year I managed to get to the end without dropping out halfway through I’m confident enough that I’ll make it this year too. Erlang is also in a particular spot where I find it somewhat familiar (the functional style, pattern matching) but also foreign enough (the concurrency model) to make it an interesting choice. I also don’t have any particularly good ideas of what I could make with it so I think it’ll be a good chance to get acquainted with it.
I used Elixir last year and I think there were some things in the Erlang stdlib that let you use mutable arrays. It might be helpful if you hit a wall with immutability. (On the elixir forum there was much groaning on some days.)
** EDIT **
It was atomics. Man, that was a rough day…
https://elixirforum.com/t/advent-of-code-2020-day-15/36228/30
Yeah, I ended up using mutable data structures in last year’s F# fairly often. Some problems just aren’t suited for (usual) immutable data structures. I’m sure there’s some exotic data structures out there that would make performance acceptable but I don’t know if the trade-off is worth it.
Thank you for the tip about atomics, though I think I’ll just retreat to Ruby or OCaml/F# if I’m having too much trouble!
Trying my luck with Nim 1.6.0 this year ! 👑