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.
-
LIVE
Jim Jordan
1 hour agoEurope’s Threat to American Speech and Innovation
483 watching -
LIVE
The State of Freedom
5 hours agoFLF: #16 Delivering the Truth Comes at a Cost w/ Joe Hoft
15 watching -
31:01
Rethinking the Dollar
1 hour agoWe're In A NEW Monetary Reality! Xi & Putin Knows How This ENDS | Morning Check-In: Let's Talk...
5.97K -
LIVE
House Committee on Energy and Commerce
2 hours agoExamining Opportunities to Advance American Health Care through the Use of AI Technologies
19 watching -
1:04:12
Crypto Power Hour
3 hours ago $0.19 earnedSmart Contracts & Fintech 101
4.94K5 -
45:55
Randi Hipper
1 hour agoBITCOIN HOLDS CRITICAL LEVEL! NEXT MOVE DETERMINES EVERYTHING
5.38K -
3:10:58
The Pete Santilli Show
12 hours agoMORNING STREAM Wednesday September 3, 2025 ▐ THE PETE SANTILLI SHOW & SANTILLI REPORT 9/2
9.7K1 -
1:41:59
Dear America
3 hours agoNational Guard To Chicago!!! 33k Epstein Files Released!! + Did Trump Threaten China?!
98.9K65 -
2:20:10
Matt Kohrs
11 hours agoStock Market Open: Bounce or Bust?! || The Best Live Trading Show
28.2K2 -
LIVE
Wendy Bell Radio
7 hours agoHello And Good Night
6,664 watching