insolor
insolor.bsky.social
insolor
@insolor.bsky.social
Python developer, learning ziglang
https://github.com/insolor

Founder of the Dwarf Fortress (fan) localization project
https://github.com/dfint
I've looked up the code (I wanted to know how the graphics is done), and surprisingly it is done in terminal, just with emojis :)
December 12, 2024 at 10:48 AM
Yes, this is another way to do it. I'm moving to zig from python, and I think in sets and dicts. Using of a 2d bool array is an interesting approach, I'll remember it :)
December 12, 2024 at 10:46 AM
The only thing I can say, part 2 can be solved fast and with minimal memory consumption.
December 11, 2024 at 8:48 PM
Thanks, I've got an idea
December 11, 2024 at 8:24 PM
I tried, and I failed :) I hope, free disk space won't end too soon
December 11, 2024 at 8:12 PM
#AdventOfCode 2024 in #ziglang
- Day 10: part 1 was simple, part 2 was even simpler (just counting instead of using of a hash set). ~1h 20min for the first part, 8 min for the second part.
December 11, 2024 at 12:03 PM
#AdventOfCode 2024 in #ziglang
- Day 9: done first part 1, second part works on the test sample, but fails on the full data. Reimplemented in python with slightly different approach. Gives the same result on full data. Skipped for now.
December 11, 2024 at 11:57 AM
About snake case, I'm still getting used to the naming conventions of zig. I used to write code in Java, and it seems that my brain just automatically applied their naming convention to the code in zig.
December 7, 2024 at 12:22 PM
As for ArenaAllocator, it is useful for such short tasks in general, but I'm still learning zig, and I'm trying to discipline myself to not forget to add necessary defers.
December 7, 2024 at 12:22 PM
Thanks for the review!
Yes, you are right, this is reasonable to return ?Position instead of panic, if there's no `^` character.
December 7, 2024 at 12:22 PM
#ziglang #AdventOfCode 2024 day 6
The second part works a bit slowly on the full data (about a minute), but it's good enough. And I compiled it in the debug mode, compilation in the release mode could make it faster, I think.

github.com/insolor/aoc2...
aoc2024.zig/src/day06.zig at main · insolor/aoc2024.zig
Advent of Code 2024 in zig. Contribute to insolor/aoc2024.zig development by creating an account on GitHub.
github.com
December 6, 2024 at 7:41 PM