1. 77

Advent Of Code 2021 is go!

  1.  

  2. 9

    There is an IRC channel for us lobsters on Libera.Chat: #lobsters-advent.

    1. 6

      I’m going to try Zig this year, adding solutions to the same repository mk12/aoc.

      1. 2

        Also trying Zig, and my first time attempting the AoC. My repo

        1. 1

          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/

          1. 4

            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)

            1. 2
            2. 4

              Join us for another year of festive programming fun! (For certain values of fun..)

              1. 3

                Let’s go!

                I think this year I’m gonna stick with the basics… and learn a new language! 😄

                1. 3

                  Since you asked, Zig is nice. :)

                2. 3

                  I will try Eiffel or Ada. Something that involves writing contracts

                  1. 1

                    Please let us know how it goes. I’d love to see either language used.

                    1. 1

                      Ah. Ada sounds like a fun thing to try. I may be joining!

                    2. 2

                      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.

                      1. 2

                        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.

                        1. 5

                          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.

                          1. 1

                            Seconding racket. Massive standard library, maybe the most popular lisp these days alongside clojure.

                          2. 3

                            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.

                            1. 2

                              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.

                              1. 1

                                I used Janet last year, and had a great time with it.

                                1. 2

                                  My programming language/solutions monorepo: https://github.com/healeycodes/adventlang 🎅

                                  1. 2

                                    I’m doing Lean

                                    1. 1

                                      Nice! I’m doing Isabelle/HOL. I couldn’t think of any way to state correctness for day 2, though.

                                      1. 2

                                        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.

                                    2. 2

                                      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.

                                      1. 2

                                        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 :)

                                        1. 2

                                          I am trying to do it all in AWK-in-a-file this year - day one and day two so far.

                                          1. 2

                                            I hope I don’t get filtered before 20 this year…

                                            1. 2

                                              20 was my nemesis last year. I’m poking at it now…

                                            2. 2

                                              I will share my repo: https://github.com/tumdum/aoc2021 🦀

                                              1. 4

                                                https://github.com/timvisee/advent-of-code-2021

                                                This year I’ll be trying to solve all 50 puzzles combined in <1 second again.

                                                1. 2

                                                  How difficult did that end up being last year?

                                                  1. 3

                                                    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.

                                              2. 2

                                                Giving it a try in Rust this year: https://gitlab.com/legoktm/advent-of-code-2021

                                                1. 1

                                                  How about a private leaderboard for lobste.rs? Join with this code: 400344-db76bd5d.

                                                  And here’s my repo: https://github.com/Scorpil/aoc2021

                                                  1. 1

                                                    Is that the board with id 989653? Because there is already a private leaderboard for lobste.rs

                                                    1. 1

                                                      I wasn’t aware of that, do you mind sharing the code? I’ll edit my comment.

                                                      1. 2

                                                        Just linked to last year’s thread in a top level comment; that mentions

                                                        There are 2 leaderboards for this site, here are the codes

                                                        989653-afc97283 (already full?)

                                                        400344-db76bd5d

                                                      2. 1

                                                        Ah thanks, I wondered what that 1000xEngineer was on my private leaderboards :D

                                                    2. 1

                                                      FWIW, here’s my repo (with links to the repos for previous years, if anybody is interested): https://github.com/narimiran/AdventOfCode2021

                                                      1. 1

                                                        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.

                                                        1. 2

                                                          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

                                                          1. 2

                                                            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!

                                                        2. 1

                                                          Trying my luck with Nim 1.6.0 this year ! 👑