Advent (of code) is here!
On 1st December every year since 2015 starts the best advent calendar: Advent of Code! It's a series of 50 small programming challenges that get progressively harder every day and can be solved in any programming language!
Quote from the creator, Eric Wastl:
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. People use them as a speed contest, interview prep, company training, university coursework, practice problems, or to challenge each other.
I can't find any mentions about AoC on BBS which is a true shame, because PICO-8 is perfect for solving and visualising AoC puzzles! (At least the first ones.) I wanted to share this awesome contest with you and in this post I will be including carts with my solutions for as long as I can keep up. GL;HF!
If you want to compete here's my private leaderboard code:
Days 1-6 (need to paste inputs):
Left/Right to cycle between days.
Up/Down to toggle between part 1 and part 2.
Paste your input and press O to run, then press O again to go back to day selection.
Make sure you have pasted the input from the correct day, or the cartridge will break.
Days 1-3 (with my inputs):
Looking forward to AoC this year. I thought about using PICO-8 last year, but so many of the puzzles required number math far beyond the scope of what PICO-8 can deal with natively. I'm sure there are workarounds that can be done, though. I ended up using last year's AoC to get back in the saddle with Python.
@MBoffin I stumbled into PICO-8 related problems on the first day already :P The answers don't fit in a PICO-8 number so I've had to leave them as multiplications. I'm looking forward to solving such problems in the future, but I'll surely switch to Python at some point. I'll try to delay this as much as possible though, no matter how many questionable workarounds it requires.
@olus2000 Yeah, it's tough. However, if you poke around the BBS, you'll find some interesting solutions for dealing with large numbers. I believe @Felice posted a quite elegant, token-light solution for dealing with large numbers. If I find it again, I'll link it here. Nice work on the last two days, though! :)
With a lot of delay caused by work and my attempts at creating a bigint "class" (metatable + constructor function) I'm trying to catch up with AoC. Day 4 input was so big it wouldn't fit on a .p8.png cart, so I switched the approach and now you have to (or are able to) paste your input to be used by the solution. New cart features big numbers and an extremely ugly plane. Enjoy!
[Please log in to post a comment]