Premium Only Content
Learning: Zig Programming Language
Streamed on 2024-12-26 (https://www.twitch.tv/thediscouragerofhesitancy)
I've wanted to take the Zig programming language for a test drive and today is the day. I scanned through some of the Zig information on the webpage, downloaded it and installed it. To learn a programming language the best thing to do is have a project. I have never done an Advent of Code (AOC) so that's what we'll do. I don't want someone in the stream to know the solutions so I went back in time to the 2020 AOC.
I worked my way through three days of the 2020 AOC. We solved the puzzles and parts of it were easy enough with Zig. However, there are some usability and documentation issues. It is not obvious or easy to find how to do things. For example, in the case of reading a file line-by-line all the examples won't work with Windows line endings. I found various feature requests and forum discussions on the topic from 2020 (coincidentally the same year as our AOC) and it hasn't been addressed since then. The first AOC day puzzle I ended up reading in the whole file, then scanning it myself for the lines. The second day of AOC I read the whole file and then used std.mem.tokenizeAny on the text. This was better, but I still don't like it. Luckily the AOC day 3 didn't need any line splitting.
It doesn't feel like Zig is ready for prime-time. Maybe I'll revisit it later.
-
6:14
Buddy Brown
7 hours ago $1.61 earnedLaw Enforcement Caught SNOOPING on PRIVATE LAND! | Buddy Brown
4.66K13 -
16:21
Real Estate
1 month ago $0.28 earnedIt’s Not Just You..NO ONE CAN AFFORD KIDS ANYMORE
3.99K6 -
LIVE
LFA TV
1 day agoLIVE & BREAKING NEWS! | MONDAY 11/3/25
1,036 watching -
1:11:07
vivafrei
3 hours agoFishing for Lawsuits! I Get Blocked Because Zohran is Anti-Gay? Halloween Terror Plot & MORE!
85.9K29 -
1:12:46
Russell Brand
5 hours agoWE’RE BACK! The Fight for Freedom Starts NOW - SF645
81.3K76 -
1:07:56
The Quartering
4 hours agoBen Shapiro Vs Tucker Carlson, Blackface Trick Works, Kash Patel Under Fire, Based Woman Vs Trans
69K30 -
1:35:28
The HotSeat With Todd Spears
3 hours agoEpisode 202: Ladies it's YOUR Battle too!
12.9K13 -
1:24:44
DeVory Darkins
5 hours agoTrump dominates 60 minutes interview as Democrats surrender to Mamdani
127K43 -
7:29
China Uncensored
7 hours agoThey’re Beautiful. They’re Dangerous. They Work for the CCP.
12.3K16 -
1:50:43
Tucker Carlson
5 hours agoChris Williamson’s Advice to Men: How to Survive a World of OnlyFans and AI Girlfriends
81.4K84