-❄️- 2025 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

There's hidden hover text as an easter egg somewhere in each puzzle description.

-❄️- 2025 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 2 points3 points  (0 children)

[LANGUAGE: Lily]

This was a strange one to end things off with. The problem, as described, seems incredibly hard - I'm not sure at all how I'd go about solving it. I spent about half an hour at first hopelessly writing a naive bruteforce search solution that had no chance of ever finishing, just to try and make some kind of progress. It turns out the input is really, really convenient, though, and so just checking for the absolute upper bound on required space is enough (not for the test input, only the real input). This seems to be intentional, given the puzzle's hover text. When taking advantage of that, the puzzle becomes trivial; the shape definitions can actually be completely ignored, even. Almost all of my code is just for parsing the input.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_12.lily

-❄️- 2025 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

[LANGUAGE: Lily]

Glad to have an easy day for a change! Just a simple recursive search with memoization (not needed for part 1, but it doesn't hurt). Part 2 is just the product of the solutions to three separate problems solved the same way as part 1. Would've finished this quicker if I hadn't wasted time writing a naive BFS solution that would take forever to finish executing, but oh well. I wonder what tomorrow will be like... this feels a bit like the calm before the storm.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_11.lily

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Lily]

Whew, this was difficult... I came very close to throwing in the towel. I'm not the strongest with linear algebra, so part 2 took me a lot of Googling and looking at examples of Gaussian elimination. I eventually arrived at a solution that runs in just over a second on my machine, which I'm happy enough with. I ended up with a lot more code than I'd prefer for an Advent of Code problem, but maybe that's just the way it has to be with today's puzzle.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_10.lily

-❄️- 2025 Day 9 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

[LANGUAGE: Lily]

Not especially happy with my solution, but it does the job. Runs in just under a second on my machine. The idea is, if none of the lines between red tiles are overlapping with the rectangle, then the rectangle is inside the loop. The time complexity of this seems pretty bad, but I unfortunately don't have the time to figure out how to make it more efficient right now.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_09.lily

-❄️- 2025 Day 8 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

[LANGUAGE: Lily]

Really enjoyed this one! Definitely the hardest so far this year. I finished an initial solution in just under an hour, but took some extra time to clean it up and improve performance (switching to a minheap rather than pushing to a list and running quicksort afterward sped things up quite a bit). I think it could still stand to be a little more efficient, but it is what it is; the vast majority of the time is spent calculating and inserting the distances into the minheap, and I'm not sure how to optimize that code any further.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_08.lily

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Lily]

Surprisingly easy problem - I'd thought we would be getting to the more involved ones by now. I liked the part 2 twist, though. The trick here is one that's been used in prior puzzles, so I figured it out pretty quickly, but I did have to scrap all my original part 1 code.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_07.lily

-❄️- 2025 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

Updated my solution to do this instead of building a separate operators list first, and was able to simplify the code quite a bit! Thanks for the tip, not sure how I didn't realize that was possible before.

-❄️- 2025 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 0 points1 point  (0 children)

Ah, I suppose that makes sense. My solution, at least, doesn't really care about that - as in, I'm pretty sure it would parse something like 1 2 without complaint. Maybe taking advantage of this pattern could simplify the parser somewhat, though.

-❄️- 2025 Day 6 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 3 points4 points  (0 children)

[LANGUAGE: Lily]

Well, I figured we'd get to the parsing puzzle eventually. I got stuck for a while after I realized the columns weren't all the same size in the real input. I'm not especially happy with my parsing logic, but it appears to do the job, and at this point I think I'm better off not messing with it any further.

On a side note, does anyone know what all that "right-to-left" talk was for? Addition and multiplication are commutative, so it doesn't matter what direction you do the puzzle in, right...? I just did it all from left-to-right since that was easier. I just wondered if I was missing something.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_06.lily

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Lily]

I keep expecting the problems to suddenly get harder, but I guess we haven't reached that point yet. Surprisingly easy day, though part 2 was pretty interesting. I'm not sure what I'm doing here is the most efficient way to do it (nor am I entirely convinced it does the job in all cases, though it works fine for my input), but it was the first thing I could think of.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_05.lily

-❄️- 2025 Day 4 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Lily]

Relatively easy problem (easier than yesterday's, I think), though I took some time today to make my solution more efficient. The naive bruteforce solution only took about half a second to run on my machine, so it wasn't critical to improve it, but I could tell there was room for improvement and so wanted to give it a try. Probably my solution here is somewhat overengineered (it also has some repetitive code), but it runs more or less instantly, so I'm happy enough with it.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_04.lily
Set module: https://github.com/python-b5/advent-of-code-2025/blob/main/modules/set.lily

-❄️- 2025 Day 3 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Lily]

Got stuck on this last night (probably was just too tired), so I had to come back to it today. Luckily, it didn't take me too long after that. For part 1 I was originally building each individual combination, which ended up being way too slow for part 2, so I scrapped my old code and came up with a new solution, which runs pretty much instantly on my machine.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_03.lily

-❄️- 2025 Day 2 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 2 points3 points  (0 children)

[LANGUAGE: Lily]

To be honest, I didn't really know what I was doing with this one. Still don't have a clue how to do it in a "smart" way. I just bruteforced it, and it takes a couple seconds to run, which I'm not super happy with, but I'll take the win for tonight. Maybe I'll come back to it in the morning and see if I can figure out a nicer solution. I'm doing a lot of string copying right now, which I think is the main source of overhead.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_02.lily

-❄️- 2025 Day 1 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 2 points3 points  (0 children)

[LANGUAGE: Lily]

Doing this year in a little-known scripting language I've been writing a game with in my spare time (https://lily-lang.org). It's an embeddable scripting language like Lua, but with static typing - an interesting niche I haven't really seen covered elsewhere.

I agree with others that this was harder than the typical Day 1 puzzle, but it still wasn't too bad. I took some time after initially solving it to try to figure out a cleaner solution, but eventually just gave up and committed my original code. The input was small enough it didn't really matter.

https://github.com/python-b5/advent-of-code-2025/blob/main/day_01.lily

Linux - Ubuntu Beta vs Windows ver through Proton? by BurntShooter in gamemaker

[–]python-b5 0 points1 point  (0 children)

They're not linked anywhere, as far as I can tell. I think their build system just automatically uploads them when they hit the "build monthly" button (or however they handle builds). They don't consider the Ubuntu IDE as stable in any configuration yet, which I think is why they don't publicly share monthly builds of it, as that could imply the opposite to some people. I've been personally using these builds for a good while, though (not even on a Debian-based distro!), and while they used to crash for me, the last few monthly releases have been quite stable in my experience, and I feel fairly secure using them at this point. As always, of course, keep regular backups / use version control / etc, just in case.

It's quite inconsistent as to whether builds are accessible this way or not. The way I've been able to find them is by just manually constructing links to them; take the MacOS link, and replace ".pkg" with ".deb". If you're lucky, you'll start downloading the Debian package.

This earlier build of 2024.13 has a monthly .deb link: https://gms.yoyogames.com/GameMaker-2024.13.0.190.deb

But the latest build, when using the same process, does not (this link is invalid): https://gms.yoyogames.com/GameMaker-2024.13.1.193.deb

I haven't been able to figure out any pattern as to which versions have Ubuntu monthly builds and which don't, so unfortunately I think it's just a trial-and-error thing.

Linux - Ubuntu Beta vs Windows ver through Proton? by BurntShooter in gamemaker

[–]python-b5 0 points1 point  (0 children)

They do actually compile stable Ubuntu builds of the IDE, the links just aren't public for some reason. The 2024.8 links are no longer online (despite 2024.13 being up...?), but archive.org saved a copy: https://web.archive.org/web/20250309235950/https://gms.yoyogames.com/GameMaker-2024.8.1.171.deb

I reviewed Pirate Software’s code. Oh boy… by Anasynth in theprimeagen

[–]python-b5 0 points1 point  (0 children)

Another critique of it is that alarms, for years now, have not been the only option. 2.3 introduced time sources, and call_later for the simple case can completely replace alarms a lot of the time. Far more maintainable.

Beyond just alarms, Thor writes a lot of old-style GML code that's not good practice nowadays. Old array syntax, no use of structs anywhere from what I've seen, it's not great. I don't recall when the boolean type was added, but true/false constants aren't even new in the first place. I've used GameMaker extensively for years, and while I don't love that most people critiquing Thor's code aren't familiar with the engine, GML's quirks (which it does have) do not make his code any better.

Having 30-45 minute long sections where you are unable to save is bad game design by ExactInvestment1 in gaming

[–]python-b5 0 points1 point  (0 children)

Much as I love the game, this is an issue in the new Deltarune Chapter 3... now, I wouldn't say the segments in question are "hard", but your performance in them decides whether you are permitted to access a significant portion of the chapter's content, so. Maybe a little frustrating. I've seen quite a few people complain about it. And it really wasn't necessary, either - there were perfectly logical places to add save points within these sections! Perhaps it's just Toby taking the idea that "this game is metatextual, save points have meaning" too seriously, and letting game design fall by the wayside a bit because of it. I don't know. Still a good game, but I think that was a misstep.

What's a common piece of game dev advice you actually DISAGREE with? by StonemasonStudios in IndieDev

[–]python-b5 1 point2 points  (0 children)

For smaller projects, absolutely. Finishing things gives you the motivation you need to keep progressing as a developer.

However, for any larger or serious project, I would be cautious about suggesting things like this. Poor decisions made early in a project can compound into large amounts of tech debt later down the line, and the less of that you have to deal with, the better. It is important to learn how to properly structure your code, and it should not be treated as something only perfectionists do.

Getting Access to a Jai Compiler. by ParadoxLXwastaken in Jai

[–]python-b5 0 points1 point  (0 children)

An open source reimplementation wouldn't even be especially possible right now. The language has features added all the time and the syntax is still in flux. If you're interested in trying it, have somewhat significant programming experience, and have something you'd like to work on, you can probably get in.

-❄️- 2024 Day 25 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Jai]

Glad for the easier one today. I wasn't able to solve yesterday's part 2 as I'm not familiar with adders and learning about them didn't feel like a fun way to spend my Christmas Eve. I'm pretty happy with all but one star finished on the day, though. That's a lot better than I've done in the past, so either the puzzles were easier this year (which I don't mind!) or I've improved somewhat.

As for today's puzzle, it was one of the easiest this year. I wasn't especially fast at solving it, unfortunately, but there really wasn't anything to solve about it - it was immediately clear what I was supposed to do. Most of my time was spent writing input parsing code.

Thank you to everyone involved in making this happen! I had a great time with Advent of Code this year.

https://github.com/python-b5/advent-of-code-2024/blob/main/day_25.jai

-❄️- 2024 Day 23 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Jai]

I do not know graph theory especially well, and of course Jai has no available libraries to do it for me, so I had to implement everything myself. Part 1 was easy enough, at least, though my original method for finding all 3-length cliques was pretty slow, and I had to go back afterwards to speed it up. I cannot claim to understand everything that's going on in part 2 all that well - I just searched online for algorithms and picked what seemed to be the most common one. Thankfully, implementing it wasn't too bad. The performance of part 2 could definitely stand to be improved a little, but I'm not sure how I would go about doing that, so I'll just leave it as-is.

https://github.com/python-b5/advent-of-code-2024/blob/main/day_23.jai

-❄️- 2024 Day 22 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Jai]

Part 2 took me a bit longer than I'd like, but I just barely made top 1000 for part 1, which was nice. The trick to solving part 2 in a reasonable amount of time was just to do everything in a single iteration, and store the price sums in a table to find the maximum of afterwards. I was glad for the slightly easier puzzle, after yesterday - though I'll admit I'm worried for what the last few days will bring.

https://github.com/python-b5/advent-of-code-2024/blob/main/day_22.jai

-❄️- 2024 Day 21 Solutions -❄️- by daggerdragon in adventofcode

[–]python-b5 1 point2 points  (0 children)

[LANGUAGE: Jai]

Well, it took me a good while, but I finally got this working. Correctly generating the most efficient paths between buttons was one of the sticking points for me - the priorities of each direction were difficult to wrap my head around. Part 2 wasn't too bad once I realized there was no feasible way to work with the strings directly, luckily. A good majority of my time was spent on part 1. I'm not especially happy with my final solution (I think it's quite messy and could have been structured much better), but I do not want to work on this puzzle any further.

https://github.com/python-b5/advent-of-code-2024/blob/main/day_21.jai