Elixir ended up being a great choice last year. I contemplated using ocaml, sbcl, or guile this go round but ultimately decided to see how far I can get with awk. I'm feeling confident I can get by with awk using getline as needed, we'll see how long I endure... Best of luck to everyone!
Yes! I did two years in awk ( https://github.com/tomberek/advent ) and loved the ability to dig in and truly grok the language. The performance wasn’t bad, but the multidimensional array support and ergonomics were…meh. I’m contemplating Elixir.
Advent of Code 2022 is nigh
71–80 of 150 posts
Re: Advent of Code 2022 is nigh
#72Tangential question - why does the HN crowd hate these types of questions in interviews but apparently likes to do them on their own time? Different folks answering to different posts? Honestly curious.
Re: Advent of Code 2022 is nigh
#73Earlier quoted context omitted.
1. Have everything in place at the start (a script to grab the inputs helps). 2. Use a language that makes the edit/run cycle short. 3. Be very familiar with that language and how to process input in it. 4. Have solved many similar problems in the past so you can parse these problem statements quickly. 5. Have solved many similar problems in the past so you know exactly what code to write or use (if you have a utilit…
“Have solved many similar problems in the past so you can parse these problem statements quickly” This sounds like an advent of code specific thing. The problem itself is trivial, no need to have solved anything similar in the past, but the description is so verbose (because it’s a cute Santa-related story) that it becomes hard to parse the problem we’re trying to solve, quickly. I don’t think this is common in any o…
Re: Advent of Code 2022 is nigh
#74Here's how today's #1 did it (day 1 solution SPOILER): https://youtu.be/Vl1w7kWRtDg?t=144
Re: Advent of Code 2022 is nigh
#75First day was a pretty fun start. Just heard about this for the first time this year and going to give it a go. Tangential question - why does the HN crowd hate these types of questions in interviews but apparently likes to do them on their own time? Different folks answering to different posts? Honestly curious.
Re: Advent of Code 2022 is nigh
#76Time for my yearly tradition of making it to day 4 in Haskell and feeling very smart before completely giving up on the first hard problem that needs regular arrays :)
Re: Advent of Code 2022 is nigh
#77Time for my yearly tradition of making it to day 4 in Haskell and feeling very smart before completely giving up on the first hard problem that needs regular arrays :)
Try Ocaml instead :)
I want to try again this year, do you have any advice for how to get going with Ocaml as someone who has programmed long enough to understand how recursion, linked lists, and all that jazz works, and just wants to figure out how to be productive in the language?
Re: Advent of Code 2022 is nigh
#78Re: Advent of Code 2022 is nigh
#79I wonder how the persons on the leader board manages it? First person today solved part1 after 39 seoncds, and was done with part2 after 53 seconds! I felt I was quite fast in being done with part1 after 3 minutes and part2 in 4 minutes (rank ~1000). I even tried to skimread the explanation to be fast, have a script to download the input and run it etc., but still no match!
Who cares what others do with the game? Have fun while doing it
Re: Advent of Code 2022 is nigh
#80Earlier quoted context omitted.
Try Ocaml instead :)
I tried that last year, and got worn down by how often I'd Google how to do something and get an answer explaining how recursion works from first principles as opposed to just pointing at the deciding standard library function that did what I needed. I want to try again this year, do you have any advice for how to get going with Ocaml as someone who has programmed long enough to understand how recursion, linked lists…
Guide: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
Reference: https://fsharp.github.io/fsharp-core-docs/
Also you can use F# notebooks with .NET Interactive and the Polyglot Notebooks Visual Studio Code extension, which is great for something like Advent of Code.