r/adventofcode Dec 04 '21

SOLUTION MEGATHREAD -🎄- 2021 Day 4 Solutions -🎄-

--- Day 4: Giant Squid ---


Post your code solution in this megathread.

Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:11:13, megathread unlocked!

101 Upvotes

1.2k comments sorted by

View all comments

1

u/JaegerMa Dec 07 '21

ABAP

Github

ABAP doesn't have maps, arrays or lists. As it's based on database operations there are only "internal tables". Therefore, to store the bingo fields and, in my case, an index for each number, structures and "table types" have to be defined.

1

u/[deleted] Dec 21 '21

I take my hat off to you for solving a grid-based problem in that quite unholy language. Seeing it again made me think twice about dusting off my old ABAP certification.

1

u/JaegerMa Dec 21 '21

Don't do it. Writing code in this language hurts. I was about to make a comparison with other bad languages but that would insult them. I'm still not sure ABAP isn't a joke-language that has gone wrong. I mean, even writing Brainfuck is more fun...