Thoughts

mental health break ,./'"**^^$_---
I just hang out in the Zig Discord server and laugh at people trying to use a systems programming language to do things that I would not do
with a systems programming language. This person wants to know why the standard library has functions for dealing with OS file descriptors and not a Path datatype. They're trying to write a build system for a legacy project. I'm like, if we assume that your project really needs a custom build system (make, just, earth, and the zig build system are all not applicable, which I find difficult to believe), why does your build system have such stringent memory or performance or interface requirements that you've decided a low-level systems programming language is the best option? This person wants to write a command line tool "without heap allocation". They haven't even started yet. 'Okay guys how do I not do a heap allocation.' This person wants to, quote, "link two static libraries." That is not how linking or libraries work. This person is trying to write a binary search and "avoid branches." They link to a compiler explorer and give no further context. Have you done a benchmark and established that branches in your binary search implementation are actually causing a performance problem or did you write a Hello World program in Zig and copy-paste it into compiler explorer and then go on the Zig Discord to complain about how there are branches in the generated code? I don't know. They have run some benchmarks; I don't know. They probably know more about computer engineering than I do. Oh yeah, "I come from Rust" how do I use traits in Zig. Bro this is C with meta-programming we do not have traits here. Read the language ref and redesign your program.
Link 11:56 p.m. Jul 14, 2024 UTC-4