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.
-
8:05:17
SpartakusLIVE
10 hours agoSolos on ARC: UNBANNED
253K10 -
30:29
Robbi On The Record
10 hours ago $10.76 earnedWhales Are Selling. Banks Are Nervous. Bitcoin analysis ft Simply Bitcoin Tv
20.9K9 -
2:28:12
vivafrei
18 hours agoEp. 291: More Epstein Documents! Stacey Plaskett SCANDAL! Butler Cover-Up, Tucker Smea & MORE!
215K266 -
6:06:22
xLuigi34x
10 hours ago100 Follower Special! Going to 100% The DKC Trilogy on stream!
53.7K8 -
50:27
Sarah Westall
8 hours agoMusk Helps Expose the Most Consequential Political Blackmail Operation in Modern British History
38.4K22 -
4:52:47
Due Dissidence
16 hours agoTrump GOES NUCLEAR on MTG, Tucker Exposes Butler COVERUP, Shmuley SUED For HILARIOUS Reason
53.7K29 -
20:13
RealReaper
11 hours ago $5.69 earnedPredator Badlands: If You Like This Movie Then I Hate You
37.5K20 -
LIVE
GritsGG
9 hours ago#1 Most Warzone Wins 4000+!
514 watching -
41:54
Nicholas Bowling
11 hours ago $7.00 earnedWhile Preaching to Muslims, EX-MUSLIM Shares Why He Left Islam (London, UK)
38.4K14 -
2:25:28
bucketofish
8 hours agoNoise Floor \\ Behind the Mix - Ep 002 - Wide Awake by Katy Perry
38.1K1