After 30+ years of daily driving manual transmission cars, we're now an all-electric family.
End of an era for sure. Bitter sweet....
@int2str.net.bsky.social
After 30+ years of daily driving manual transmission cars, we're now an all-electric family.
End of an era for sure. Bitter sweet....
Yeah, but is your hearing as *sharp* as it should be ?! π
31.01.2025 15:59 β π 1 π 0 π¬ 0 π 0@forrestvalkai.bsky.social
Re: Center for Inquiry talk
Amen!?11!!1!!!
Here's a full write-up on what I learned along the way:
whtwnd.com/int2str.net/...
During #AdventOfCode 2024, I dove deeper into #C++ ranges and views. Here's some of what I learned:
How to make custom C++ views:
whtwnd.com/int2str.net/...
"In all fairness, people only said that because it's true."
- @forrestvalkai.bsky.social , 2025
lol :)
What language are you coding in?
Also, ImGui?
Bubble sort in C++23?!???
I made an "nm_pairs" view during #AdventOfCode, largely as a tool to better understand what it takes to make a custom view in #C++.
github.com/int2str/nm_p...
Yup π
08.01.2025 17:12 β π 0 π 0 π¬ 0 π 0Make your #AdventOfCode problem twice as fast with this one weird trick ...
I was absolutely sure the compiler (clang-18) would do this for me, but alas, it didn't.... Went from ~40ms to ~20ms.
Hat tip to @49pctber.bsky.social
I peeked at their code and was like "nah, THAT can't be it..."
Finally figured out how to make my "Utils::views::nm" play nicely with C++23 ranges/views.
This makes the final #AdventOfCode problem super nice in C++!
I need to do a proper write-up on both the AoC problem, as well as the difficulties of making a C++23 custom view....
@daveeddy.com tiny tip of the day based on your (awesome) day 16 video:
wc -l -> Get number of lines in a file (you did that)
wc -L -> Gets longest line in the file ;)
So, grid size for day 16 -> wc -lL
#AdventOfCode
Yup, fixed it:
github.com/int2str/adve...
The slowest way to the fastest*** Advent Of Code solution whtwnd.com/int2str.net/...
Here's my write up of my #AdventOfCode "solution" for Day 17.
Yes, an embarrassing long time :)
However, not any of the new features (ranges etc.) that I used extensively (like day 25).
Yes, that's about right.
Unfortunately my hand rolled "nm_view" doesn't have the proper "view" interface to play well with C++ ranges. That's a long winded way of saying, if I fix my nm_view, it would be completely clean and functional.
One day...
121 commits
9598 lines of C++
64 unit tests
3 SFML animations
1 x86_64 JIT compiler
25 awesome puzzles (well except you, day 21...)
50 stars :)
Thank you, #AdventOfCode!
I tried a whole bunch of new/different things and had a blast learning all December!
Public repo:
github.com/int2str/adve...
It's Neovim actually, but that part is actually not important. You need a font with ligature support (like Fira Code). So as long as your terminal supports it, it'll just work. π
25.12.2024 17:33 β π 2 π 0 π¬ 0 π 0Yes, it can be done, even in less than (one) second[s] :)
25.12.2024 13:42 β π 0 π 0 π¬ 0 π 0Congrats!
Was starting to think I'm the only one doing C++ around here :)
I've completed "Code Chronicle" - Day 25 - Advent of Code 2024 #AdventOfCode
Man, if I could just turn my mn_const_view() into an actual view, this would actually have been a "one liner" in C++ :)
Thank you, AoC team and participants!
Merry x-mas and happy holidays!!!!!!
"Crossed Wires" - Day 24 - Advent of Code 2024 #AdventOfCode
Ohhhhh nooooo AoC - I'm almost done writing a completely unnecessary, overkill JIT compiler for Day 17.... Don't make me write another one!!! :p
I keep running in the issue that std::unordered_map<> in C++ is slow. Yes, maps are super convenient (I see you, my Python friends...), but they are not free and can hide their complexity.
Using a flat array and a bitset, Day 22 went from my slowest to be super fast!
#AdventOfCode
Tried your code and it runs hella fast, kudos.
Of course Perl remains a write-only language in 2024 :p
Given we know the shape of the problem, part 2 can be written cleaner as well...
#AdventOfCode
With the benefit of sleep, this can be written much shorter/cleaner/simpler...
#AdventOfCode
I've completed "LAN Party" - Day 23 - Advent of Code 2024 #AdventOfCode
Maybe it's the embedded programmer in me, but I always gravitate towards bit-masks for problems like these. No recursion, no graph theory etc., just a bunch of bits...
I've completed "Monkey Market" - Day 22 - Advent of Code 2024 #AdventOfCode
Day 22 was an absolute breeze and a blast, after 21 was a thorough kick in the pants for me... Both done now and officially caught up!
Always fun to use fold_left() weirdly :)
Hopefully, no more hard ones 'til x-mas :D
I think (still working on it), it matters what direction you're going because of the previous direction pad. Any direction change costs, because it ripples 2 direction pads down.
Also, you need to avoid the gap completely. I missed that part at first.
For context, screenshot is the part of the OUT operator that masks the bottom bits. %r9 is the output register.
21.12.2024 22:46 β π 0 π 0 π¬ 0 π 0