#advent-of-code — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #advent-of-code, aggregated by home.social.
-
#adventofcode 2015 in C, day 17.
A very quick one here. Mostly brute forcing, and some probably unnecessary right-shifting, just because it looks nice.
-
oh my god I finally have arbitrary precision math AAAAAAAAAAA IT'S TAKEN OVER 2 YEARS to get time and motivation for this
here, have 30 factorial using uint128, in #forth on #hp200lx
so now I can FINALLY do the #AdventOfCode puzzles that need >=64 bit math, without falling back to something like Lua.
-
#adventofcode 2015 in C, day 16.
The puzzle was easy enough, and then I spent waaaay too long hunting down a dumb malloc/free error. In the spirit of being transparent about my process, which is kind of the point of this series, I'll leave my flailing around in the blog post.
-
A strange package has arrived. Received for my outstanding performance on last year's #AdventOfCode. Except the year is wrong on the shirt :) I suppose it's a prediction for this year's event ;-p
-
#adventofcode 2015 in C, day 14
Once again, "reading the puzzle incorrectly" is the main source of error here, otherwise very straightforward. We get to add a bit to our parsing toolbox along the way, as a bonus.
-
One of my fondest memories when doing #AdventOfCode was a time that I just said YOLO and decided to read the input at compile time (w/ macrolet 💅) convert the line into a plist and then expand the plist into the body of a defmethod each rule mapped to a different implementation using eql specifiers.
Yes, it was a bad idea.
Yes, it was inefficient.
But #CommonLisp doesn't care, so I wrote it anyway! -
#adventofcode 2015 in C, day 13 again. Copy-pasting from day 9 was working, but a bit too ugly for my taste. So we refactor a bit, make it marginally less ugly, and finish the puzzle easily thanks, for once, to good design choices made at the beginning.
-
#adventofcode 2015 in C, day 13.
Another graph-like structure, leading to a lot of copy-pasting from day 9.
-
#adventofcode 2015 in C, day 12: lots of parsing, but also an opportunity to implement a basic stack structure. Nice little puzzle overall.
-
#adventofcode 2015 in C, day 10 and 11
Both quick and easy, which means that either I've become reasonably good at this C thing, or I'm being lured into a false sense of confidence.
-
#adventofcode 2015 in #C, day 9. A very quick solution for part 2. An unexpected bug in my file reading function lead me to discover that the most upvoted solution on StackOverflow for "how to get the size of a file to copy its content to a string" is, in fact, incorrect and unsafe, because fseek and ftell are not guaranteed to work as we'd expect them to work.
As usual, the docs do warn about it. This combination of "well documented but extremely unintuitive" keeps tripping me up.
-
#adventofcode 2015 en C, day 9, suite. Où l'on s'y remet doucement après une pause, en résolvant la première partie mais en découvrant au passage qu'on a probablement un gros bug dans le fond du programme quelque part...
-
I just completed all 25 days of Advent of Code 2018! #AdventOfCode https://adventofcode.com/
-
Happy easter everybody! Today is the final day of my little #AdventOfCode inspired coding challenge, and it's my favourite one this year.
Head over to https://easters.dev/2026/easter-sunday if you want to try it out. Or just head over to see the gorgeous @prahou art. -
And a good #HolySaturday to everybody; coincidentally the holy saturday problem of my little #AdventOfCode inspired website just went live: https://easters.dev/2026/holy-saturday
-
A #GoodFriday to everybody! My little #AdventOfCode inspired coding site has gone into its second year and the first problem just went live.
https://easters.dev/2026/
If you want a little challenge over the easter weekend maybe check it out. -
As is tradition (well, I’ve decided that it’s my tradition), I’m doing #AdventOfCode on older hardware. I’m also a bit of a Windows 2000 fan, because … I don’t know why, weird irrational nostalgia, I guess. Either way, I’d like to do some Win2k thingie for AoC this year.
The minimum system requirements are a Pentium 133 and 32-64 MB of RAM. That’s pretty much exactly what I have. So, let’s try to install it.
The installation took well over an hour, but once it’s done, it’s actually quite usable. Here’s a video of the boot process (just takes about a minute) and a bit of web browsing:
https://movq.de/v/5dbc55dbaa/MVI_9356.MOV.mp4
It’s also the first time that I saw this screen (see below). Windows can’t power off the PC by itself, I have to push the button. I only knew similar screens from Win9x.
I don’t know yet which programming language I’ll use. Maybe Visual Basic? 🤪
-
#adventofcode 2015 in C, day 9.
We have to solve the traveling salesman problem. How hard could it be?
In this first part, I lay down the groundwork and, this time, do the parsing of the puzzle input earlier in the process. We'll see if that helps!
-
Another interlude to my (fascinating I'm sure) #adventofcode 2015 in C narrated solutions to take stock of what I've learned so far.
In short:
1. Read the docs
2. Object-oriented C is fun! -
#adventofcode 2015 in C.
Day 8 is a parsing puzzle. After my painful slog through day 7, this one was quick. Not particularly happy with how the code looks, but I don't think refactoring this one will lead to something super interesting.
-
#adventofcode 2015 in C. Finally solved day 7, after less refactoring than I feared. And the second part of the puzzle fortunately didn't require too much change.
I keep getting tripped up by the behaviour of the standard library functions, which almost always have something counter-intuitive (to me) going on. This is easily solved by reading the docs, of course, but I have the bad habit of trying things out first, then coming back to check the docs if it doesn't work out. Works well enough with Python, not so much in C!
-
#adventofcode 2015 in C, still on day 7.
I get very close to finally starting to solve the puzzle, but then I realize that I made a big design mistake in my prep work, and that some more refactoring will be needed.
So this is part 3, and still no star. I'm pretty sure I know what to do next, though. We'll see.
-
Part 2 and still no solution to #adventofcode 2015 in C, day 7.
We're almost there, but I still need to parse the input, and parsing is usually not my favourite part in C... (I mean, not so much in Python either, but it's less painful!)
-
#adventofcode 2015 in C, day 7.
Part 1: this require a fair amount of setup before we can attempt a solution. We are making a network of wires and gates, and I'd like to make sure that I can mesh things together properly before I start parsing the input. So this doesn't solve part 1 yet. Hopefully soon?
-
-
#adventofcode 2015 in C, day 6, part 2.
Lesson of the day: reading the docs, not a bad idea...