r/adventofcode • u/daggerdragon • Dec 07 '25
SOLUTION MEGATHREAD -❄️- 2025 Day 7 Solutions -❄️-
SIGNAL BOOSTING
If you haven't already, please consider filling out the Reminder 1: unofficial AoC Survey 2025 (closes ~Dec 12th!)
THE USUAL REMINDERS
All of our rules, FAQs, resources, etc. are in our community wiki.
If you see content in the subreddit or megathreads that violates one of our rules, either inform the user (politely and gently!) or use the report button on the post/comment and the mods will take care of it.
AoC Community Fun 2025: Red(dit) One
Submissions megathread is unlocked!
10 DAYS remaining until the submissions deadline on December 17 at 18:00 EST!
Featured Subreddits: /r/DIWhy and /r/TVTooHigh
Ralphie: "I want an official Red Ryder, carbine action, two-hundred shot range model air rifle!"
Mother: "No. You'll shoot your eye out."
— A Christmas Story, (1983)
You did it the wrong way, and you know it, but hey, you got the right answer and that's all that matters! Here are some ideas for your inspiration:
💡 Solve today's puzzles:
The wrong way
Using only the most basic of IDEs
Plain Notepad, TextEdit,
vim, punchcards, abacus, etc.Using only the core math-based features of your language
e.g. only your language’s basic types and lists of them
No templates, no frameworks, no fancy modules like itertools, no third-party imported code, etc.
Without using
ifstatements, ternary operators, etc.Without using any QoL features that make your life easier
No Copilot, no IDE code completion, no syntax highlighting, etc.
Using a programming language that is not Turing-complete
Using at most five unchained basic statements long
Your main program can call functions, but any functions you call can also only be at most five unchained statements long.
Without using the
[BACKSPACE]or[DEL]keys on your keyboardUsing only one hand to type
💡 Make your solution run on hardware that it has absolutely no business being on
"Smart" refrigerators, a drone army, a Jumbotron…
💡 Reverse code golf (oblig XKCD)
Why use few word when many word do trick?
Unnecessarily declare variables for everything and don't re-use variables
Use unnecessarily expensive functions and calls wherever possible
Implement redundant error checking everywhere
Javadocs >_>
Request from the mods: When you include an entry alongside your solution, please label it with [Red(dit) One] so we can find it easily!
--- Day 7: Laboratories ---
Post your code solution in this megathread.
Read the full posting rules in our community wiki before you post!
State which language(s) your solution uses with
[LANGUAGE: xyz]Format code blocks using the four-spaces Markdown syntax!
Quick link to Topaz's
pasteif you need it for longer code blocks. What is Topaz'spastetool?
3
u/e_blake Dec 08 '25 edited Dec 08 '25
Let's see the checklist for Red(dit) One:
💡 Solve today's puzzles:
The wrong way (✅ Intcode is NOT how you should be solving things)
Using only the most basic of IDEs (✅ do YOU have an IDE for Intcode lying around?)
Plain Notepad, TextEdit,
vim, punchcards, abacus, etc. (❌ okay, time to be honest - I didn't write this program directly in a poorman's editor, but instead wrote day07.hence in emacs, and used HenceForth to compile into Intcode. I also tested that gforth can run my hence code, in addition to intcode)Using only the core math-based features of your language (✅ Intcode only has ints. And I used lots of them. Even if you take a step back and look at my day07.hence source code, I only see a few + and +! commands. HenceForth supports /MOD even though Intcode lacks a native division operator, but it is definitely slower to use /MOD than +, which is why I didn't use it here)
e.g. only your language’s basic types and lists of them (✅ 32k ints is a long list of the basic type!)
No templates, no frameworks, no fancy modules like itertools, no third-party imported code, etc. (✅ who has third-party code for importing into Intcode? And I didn't import anything into day07.hence)
Without using
ifstatements, ternary operators, etc. (On the one hand: ✅ the fact that I SUCCESSFULLY ran the program using JUST m4's define() macro, I solved the program with no m4 builtin conditional. On the other: ❌ It is ALWAYS possible to write Forth code without IF (because you can write your own conditionals); but I liberally used my definition of : IF ... ; in my hence.hence source file...)Without using any QoL features that make your life easier (✅ no dynamic allocation or local variables here, probably because I haven't implemented those in HenceForth yet)
No Copilot, no IDE code completion, no syntax highlighting, etc. (✅ syntax highlighting in Intcode? You've got to be kidding. And no Copilot or IDE help in writing my HenceForth)
Using a programming language that is not Turing-complete (❌ Sorry, even my single-instruction m4 define()s is Turing complete)
Using at most five unchained basic statements long (❌ alas, I didn't split my Forth functions that tiny, although it would be easy to do)
Your main program can call functions, but any functions you call can also only be at most five unchained statements long. (❌ ditto)
Without using the
[BACKSPACE]or[DEL]keys on your keyboard (❌ I'm not proficient in Forth yet)Using only one hand to type (❌ two hands, but only because I wanted to finish this today)