I wonder how helpful GPT-3 and Copilot will be for this :) Not necessarily to solve the whole puzzle but rather to give hints when I'm stuck with a particular task.
Last year when I was doing AoC in Go, I was pleasantly surprised how good Copilot is and it felt like magic. Given most of the time I use Terraform, YAML, JSON, jq, and Bash these days, I can't really appreciate Copilot, but last year I did!
Advent of Code 2022 is nigh
111–120 of 150 posts
Re: Advent of Code 2022 is nigh
#112First 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
#113Earlier quoted context omitted.
“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…
Feel I have to disagree on this one. Firstly, most programming competitions I've been to have this kind of problem description as well, just check Kattis problems for instance. But secondly, while the problems in the beginning are trivial, you still have a huge advantage if you can immediately start programming without having to think, or having to look up a function in the stdlib. (Spoilers:) I probably wasted a min…
I did s.split("\n\n").fold... But this was first thing in the morning and where I lost time was that what I actually did at first was: s.split("/n/n")
Re: Advent of Code 2022 is nigh
#114Re: Advent of Code 2022 is nigh
#115I 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!
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…
curl https://adventofcode.com/2022/day/1/input
Puzzle inputs differ by user. Please log in to get your puzzle input.Re: Advent of Code 2022 is nigh
#116Earlier 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…
One downside of OCaml is that its standard library is not very powerful and there are multiple third party replacements that are popular. Jane Street's base/core, Containers, Batteries Included, to name a few. So you have to make a choice.
Having said that, I think you can live with the built in standard library to solve most of the AOC problems.
Re: Advent of Code 2022 is nigh
#117Earlier 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…
How do you grab the inputs? I get the following error: curl https://adventofcode.com/2022/day/1/input Puzzle inputs differ by user. Please log in to get your puzzle input.
If you do use a download script make sure you check whether or not you've downloaded it before. He's also requested that you put in a user agent that provides some contact info (rather than being generic). The server has been getting slammed by people hitting it too often and he's considering banning some, and wants a way to reach out to people who may have a misbehaving script.
https://adventofcode.com/2018/day/21 - My one top 100 result
https://adventofcode.com/2018/day/16
https://www.reddit.com/r/adventofcode/comments/z9dhtd/please...
Re: Advent of Code 2022 is nigh
#118Looks like fun. Too bad you can't sign up anonymously or simply with a username and password. What a shame.
Re: Advent of Code 2022 is nigh
#119Earlier quoted context omitted.
> site should ask for the language used to solve the problem and then use this as semi-scientific data for comparing "time-to-solution" for various languages. I think this would just show you the average time zone of the language's users.
Today 4 minutes gets you top 1000. There’s more than enough users starting when the problem gets released that an analysis could be done by checking for solutions submitted within the first hour.
Re: Advent of Code 2022 is nigh
#120Earlier quoted context omitted.
Each year does vary slightly in theme and focus, so it's possible you'll have more fun this time if you give it another chance. Or not. But remember that it's never too late to give up. :) My favorite so far is 2019, where several of the problems had you write and extend an emulator for the imaginary (and wacky) "IntCode" computer.
2019 was excellent. Each day, the puzzle would have you adding new features (new instructions, addressing modes, input/output handling) to the emulator. The early days were fairly simple, but things got progressively more complicated. On one day the puzzle input was code that played a game of Breakout. Your task was to implement an emulated joystick that would play perfectly. The solution was the final score. On anot…
It reminded me of Wastl's other big puzzle collection (Synacore) which also had a big emphasis on implementing a VM to host further puzzles on top of.