Login
You're viewing the ruby.social public feed.
  • Nov 22, 2026, 7:15 PM

    So, Zig. Zig, I'm told, is a project based around one dude with a strong personality, and the dude hates AI. Zig simply bans AI usage in the project's own development. Zig moved from Github to Codeberg over the "embrace AI or get out" statement. An anti-AI Rust contributor I spoke to talks of hypothetical, experiments-in-progress future backend swaps to avoid LLVM's slop; Zig *already has the backend swap in place* and appears to be working on *removing* LLVM. This is the moral clarity I seek.

    💬 4🔄 25⭐ 103

Replies

  • Nov 22, 2026, 7:15 PM

    Better yet, the GenAI negativity from the Zig project seems to already be having downstream effects on the community. (The hidden lesson of the once-and-future "Open Source Community" is that software is not valuable. Communities are valuable.) The more Rust allows "just a little Claude, as a treat", the more LLM coders will flock there. The more anti-AI Zig is perceived as being, the more anti-AI coders will adopt Zig. We get a virtuous cycle. Which maybe means a clean package ecosystem.

    💬 8🔄 27⭐ 135
  • Nov 22, 2026, 8:33 PM

    This puts an odd color on learning Zig that wouldn't have been present one year ago. It would have been nicer to go in with a tone of "maybe this has a useful place in my game work" rather than "if I had to move here suddenly, would I be happy?"

    Anyway! That's 14 posts about my *preconceptions* of Zig, and I haven't opened the manual yet. (Since last night I *have* successfully built the toolchain form source, and established the IRC channel is dead and the discord is the place to go for help.)

    💬 11🔄 2⭐ 51
  • Nov 25, 2026, 1:54 AM

    Oh, right, I was doing this.

    There's an "In-depth overview" linked on ziglang.com/intro ; reading that. Is there something else that's *better* as a tutorial?

    "Zig’s entire syntax is specified with a 580-line PEG grammar file." Well, I do like that.

    "No hidden control flow… If Zig code doesn’t look like it’s jumping away to call a function, then it isn’t." Okay, I guess. Feels like something 90s programmers would like— a kind of optimization game programmers care about, but not many others.

    💬 5🔄 2⭐ 13
  • Nov 22, 2026, 7:55 PM

    @mcc I have never written anything in Zig, personally. But what I am a bit more upset about, is that now, most of the time, if I see a new project written in Rust it's slop. (Not always the case, but frequently).

    💬 0🔄 0⭐ 4
  • Nov 22, 2026, 7:56 PM

    @mcc i hope that cycle comes to pass! i'm very interested in zig but also get the feeling (not based on any particular evidence) that it's destined to reach the point where (e.g.) politics related to fundraising will nudge it over into the "claude as a treat" category. and as a language/software it seems like it's still pretty heavily in flux, with no clear point where you can say "this version is fine, let's freeze/fork from here." both of which make me nervous

    💬 4🔄 0⭐ 0
  • Nov 22, 2026, 8:15 PM

    @aparrish @mcc Yeah, this is kind of what stopped me seriously investigating zig, it felt like it's still so early for it. Like a tutorial I was following along didn't work because the API to do a printf analogue had changed between the tutorial being written and Zig 0.16

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 2
  • Nov 22, 2026, 8:22 PM

    @aparrish @mcc Andrew Kelley gave a talk at HMS 2024 -about- funding for Zig youtube.com/live/zYAif5PhhoQ?t and used the metaphor of using a nonprofit to tie himself to the mast of a ship.

    The talk in question is not about LLMs, but it is a demonstration of the zig software foundation taking quite a long term approach to how they approach funding. The greater Zig ecosystem I can't speak for, but the core zig team seems like they know how to take long term principled stances.

    All that to say, I am optimistic about their ability to navigate the current mess and come out the other end with something both nonslopped and sustainable.

    💬 0🔄 0⭐ 3
  • Nov 22, 2026, 8:22 PM

    @aparrish The firewall of Zig, Servo, Redox, Rocket against AI code is all that One Very Opinionated Person Who Runs The Community. I think I trust the Opinions of all four of those people. But it's very hard for a community to be run by a single person indefinitely. And when the project democratizes I don't know what happens. (Though there's also the question of whether something happens economically in the next 9 months to change "AI agent use as a default" among open source contributors.)

    💬 1🔄 0⭐ 15
  • Nov 22, 2026, 11:10 PM

    @mcc @aparrish the "OVOPWRTOC" part is one of the reasons why i'd like to see some government funding for long-term maintenance of open-source projects—maybe in the EU, maybe Canada, but in any event, necessarily in a place with a good human rights framework.

    because then it can be a regular job with a clear mission statement, a budget for doing research (e.g. on user needs, user interface testing, etc), and regulations to conform to (e.g. for accessibility) and a clear plan for succession.

    💬 1🔄 1⭐ 1
  • 💬 1🔄 0⭐ 2
  • 💬 0🔄 0⭐ 2
  • Nov 22, 2026, 8:02 PM

    @mcc What I appreciate about Rust (and, admittedly, about C and C++ as well) is *stability*. In the sense that a program written 10 years ago will still compile and run unmodified on a compiler released yesterday. As far as I know, Zig doesn't do that yet. Probably not much of an issue for gamedev though!

    💬 0🔄 0⭐ 2
  • Nov 22, 2026, 8:11 PM

    @mcc I will say that the greater Zig ecosystem is far from slop free, but that because the Zig toolchain is written using the Zig standard library, there isn't a syn/serde shaped hole in the Zig ecosystem. The stdlib has JSON parsing (both low level token-at-a-time stuff and high level reflectiony stuff) and an http client and server, for instance, and comptime makes reflectiony things a lot more straightforward than it is in Rust.

    Out of the heirs attemptant to C and C++, it is my favorite so far

    💬 1🔄 0⭐ 4
  • Nov 22, 2026, 10:48 PM

    @sakiamu @mcc There was a proposal to improve reflection in Rust, but the developer got pissed off by receiving racist nonsense and abandoned it. This was before LLMs became popular. But LLM enthusiasts strike me as a fairly anti-social bunch so if they're flocking to Rust the culture in Rust-land is likely to get even worse.

    💬 0🔄 1⭐ 1
  • Nov 22, 2026, 11:05 PM

    @mscibing That incident is the reason I will never choose Rust first for anything I write where I'm calling the shots.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 22, 2026, 8:37 PM

    @mcc as someone spending the last couple days getting the bugs worked out of their netbsd setup, it's eerie how closely rust->zig parallels debian->netbsd

    💬 1🔄 1⭐ 0
  • Nov 22, 2026, 8:39 PM

    @technomancy except i don't think one of the elements of a debian->netbsd switchover is "well, i'm at a significantly elevated risk of CVEs now"

    💬 0🔄 0⭐ 6
  • 💬 0🔄 0⭐ 1
  • Nov 22, 2026, 8:43 PM

    @mcc We are very in tune so thanks for doing so this legwork. I'm lucky in that I don't have time to code while all this plays out, and was forced to abandon all my Rust work when the project I was helping went full blown AI.

    If I come back to code hopefully the #noAI path will be clear and the community established. It's heartening at least to know I'm not alone, though disheartening to see so many who I thought were fellows do not give a damn about the harms they are doing to others.

    💬 1🔄 0⭐ 5
  • Nov 22, 2026, 8:47 PM

    @happyborg well, over the next week this thread will have a chronicle of writing a simple program in Zig, so maybe that will be helpful to you.

    💬 1🔄 0⭐ 6
  • 💬 1🔄 0⭐ 1
  • 💬 1🔄 0⭐ 2
  • Nov 22, 2026, 8:53 PM

    @mcc I may though just retreat into the nostalgia of resurrecting projects, starting with hardware, that I made as a hobby circa 1980. No AI there!

    For that I just bought my first oscilloscope but am confident it is AI free, so just in time perhaps. 🤣

    Good luck with #Zig, I hope it does what you need and look forward to reading how you get on.

    💬 0🔄 0⭐ 3
  • Seancomplexmath@hachyderm.io
    Nov 22, 2026, 9:04 PM

    @mcc I *just* started looking at Zig because of this thread, and... it seems very C-like in that I don't see a way to indicate memory ownership in code, and I'm not entirely sure that it's possible to craft a smart pointer. I'm also really concerned that I'd spend as much time fussing over allocator stuff as I did managing pointer types in C++, which is a whole lot. The scope guard features seem nice though, and metaprogramming looks pretty clean. I dunno, I'm curious to hear how your adventure goes. At first blush it seems like a language I'd use for a personal project but that I might hesitate to use in a team scenario, but I'd love to discover I'm wrong.

    💬 1🔄 0⭐ 0
  • Nov 22, 2026, 9:40 PM

    @complexmath I mean, I ultimately think people should be using GC languages unless they have a good, specific reason not to.

    💬 1🔄 0⭐ 3
  • 💬 1🔄 0⭐ 0
  • Seancomplexmath@hachyderm.io
    Nov 23, 2026, 2:47 AM

    @neku42 @mcc While there was promise of pause-free garbage collection in D (I think Andrei had proposed a reference-counting mechanism as an option at one point), I don't think it ever materialized, and stop the world mark and sweep doesn't really fit my personal needs. Also, I wasn't tremendously happy with how certain specifics of the threading model worked out--a lot of that design was left kind of til the last minute and didn't get the discussion it very much deserved. Though I'm fairly proud of std.concurrency. I think it could be replicated in C++ now too.

    💬 1🔄 0⭐ 1
  • Nov 23, 2026, 2:54 PM

    @complexmath You can do reference counting in D but it doesn't play well w/ the current immutability model.

    But reference counting is not 'pause-free' or deterministic either - you can have unbounded 'random' cascades.

    💬 1🔄 0⭐ 0
  • Nov 23, 2026, 2:55 PM

    @complexmath Also agree on concurrency as `shared` still feels very undercooked but w/o it (or something similar) and immutability in the language I don't think std.concurrency can be replicated really.

    If you are comfortable w/ current C++ approach of picking arbitrary parts of the language or standard library to ignore you would feel right at home w/ D (including avoiding built-in GC).

    💬 1🔄 0⭐ 0
  • Seancomplexmath@hachyderm.io
    Nov 23, 2026, 6:16 PM

    @neku42 You know, one thing with the D runtime that I wish people had cared more about is that it's actually three distinct libraries with well-defined interfaces between them--the compiler runtime, the garbage collector, and a small set of core standard library features like the thread implementation (because the GC needs to know about threads, etc). With the way it's set up, the selection of a garbage collector could be a link-time decision, and a compiler writer could drop in their own compiler runtime without having to fuss with threading or garbage collection at all, making for a clear separation of concerns for implementers. Initially, the runtime literally shipped as three separate libraries, but no one wanted to deal with it so I wound up bundling them into one as a packaging step. So like if you look at the LLVM D implementation it clones the entire standard library (last I checked) even though it doesn't need to.

    💬 0🔄 1⭐ 2
  • 💬 0🔄 0⭐ 0
  • 💬 2🔄 0⭐ 1
  • 💬 0🔄 0⭐ 1
  • Nov 25, 2026, 7:19 PM

    @mcc@mastodon.social @complexmath@hachyderm.io Nope. Not at all. The standard explicitly says that when the result of an operation is undefined the compiler can compile the program and the result of executing such program can be anything whatsoever. Such as demons flying out of your nose.

    And the nasal demons properly illustrate how absurd and adversarial such language definition is. For example, in C signed arithmetic overflow is undefined. That means that a C compiler that generates code that on signed arithmetic overflow executes 'rm -rf /' is completely fine and standards-compliant.

    I am not aware of any language other than the C language family into which zig invited itself by adding this to its standard that has such a great feature
    ​:bunhdgoogly:​

    💬 0🔄 0⭐ 0
  • Nov 25, 2026, 7:31 PM

    @bunny @complexmath "The standard explicitly says that when the result of an operation is undefined the compiler can compile the program and the result of executing such program can be anything whatsoever"

    Isn't that the definition of UB?

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • Nov 25, 2026, 8:18 PM

    @bunny @complexmath One reason it is hard to avoid a de-facto rule of "the compiler may create incorrect, unrelated code when undefined behavior occurs" is that *assuming* undefined behavior does not occur typically allows compilers to do optimizations. Optimizations are in nature code-rewriting. If the compiler is making incorrect assumptions about which optimizations are safe, it is difficult or impossible to put bounds on what kinds of generated code could result.

    💬 1🔄 0⭐ 1
  • Nov 25, 2026, 8:39 PM

    @mcc@mastodon.social @complexmath@hachyderm.io However, where you allow the compiler to assume undefined behavior is on the creator of the standard. That any soundness goes out the window the moment you randomly scribble over memory is understandable, and unfortunately C is historically about randomly scribbling over memory. That 'a-b' can result in pretty much any code whatsoever when a and b are signed is completely different can of worms. And yes, I understand that assuming a-b to not overflow ever allows the compiler to make some stupid optimizations. I don't think such optimizations are are really worth it. It reminds me of the joke about the f00f bug

    i386: Hooowww mmmuuuch iiisss 2 + 2 ...
    Pentium: 5!
    i386: thhhatsss wwrrooonnnggg ...
    Pentium: but fast!

    💬 0🔄 0⭐ 0
  • Nov 25, 2026, 8:24 PM

    @mcc@mastodon.social @complexmath@hachyderm.io That's very different from what C UB provisions are like.

    What it basically says is that if you include unsafe{} in your code you are free to do the equivalent of randomly scribbling over your memory, and any soundness goes out the window as a result. It does not allow 'a-b' to generate code to execute 'rm -rf'.
    ​:abunhd:​

    💬 1🔄 0⭐ 0
  • Seancomplexmath@hachyderm.io
    Nov 25, 2026, 8:30 PM

    @bunny @mcc It's much easier to just say "we don't know what will happen if you violate these rules" than to try and state specifically what will happen when your language targets an unbounded set of computer architectures.

    💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 25, 2026, 8:32 PM

    @bunny @complexmath I am not a compiler engineer and have not worked on rustc. But given the way Rust ownership has implications for things like aliasing or whether a variable even exists, I'd be *very* surprised if Rust UB is restricted to "could cause runtime state corruption" rather than encompassing actual incorrect codegen. Rust's confinement of UB to unsafe {} blocks makes it a better language than C, but it doesn't mean Rust is using a different definition of the term "UB" altogether.

    💬 1🔄 0⭐ 0
  • Nov 25, 2026, 8:34 PM

    @bunny @complexmath I do notice the Rustinomicon:

    doc.rust-lang.org/nomicon/what

    early on states "Invoking Undefined Behavior gives the compiler full rights to do arbitrarily bad things to your program". Which sounds equivalent to the definitions in C and Zig. This is the document the Undefined Behavior page in the reference manual credits as the source of in-practice information about how unsafe {} is used.

    💬 0🔄 0⭐ 0
  • Nov 25, 2026, 8:18 PM

    @mcc@mastodon.social @complexmath@hachyderm.io I mean, there are some degrees of leeway possible.

    Like any code for which the result cannot be defined must not be compiled. Thus for the signed arithmetic case if there is a possibility that the operation would overflow it would cause a compilation error.

    Or something called 'implementation-defined', typically. The result is not prescribed but for a specific compiler implementation executing the same operation with same operands always gives same result.

    Or something even more generous: The result is not prescribed, and it need not be consistent but in any case result of a signed operation that overflows is some numeric value, and whatever the case nothing but the result is affected by the operation.

    But no. C went for nasal demons
    ​:bunhdgoogly:​

    💬 0🔄 0⭐ 0
  • Nov 25, 2026, 8:20 PM

    @bunny @complexmath "Like any code for which the result cannot be defined must not be compiled."

    A language with this rule, by definition, does not have UB.

    💬 1🔄 0⭐ 0
  • Nov 25, 2026, 9:02 PM

    @mcc@mastodon.social @complexmath@hachyderm.io Yes, and my impression is that for most programming languages this is the standard. To cause UB you would have to use FFI to load to a C library or something. That rust does allow that inline using unsafe{} is an interesting design choice but whatever. Yes, there is a lot of languages that I did not examine in detail, I do not see any reason whatsoever for them to have UB, and they might ​:abunhd:​

    💬 0🔄 0⭐ 0
  • Nov 22, 2026, 9:13 PM

    @mcc I always just preferred zig's aesthetics. I always deeply disliked rust. But, what do I know. I like c++. And c. And scheme. I think the memory management issues you refer to are overstated. But I also do most of my c++ work on embedded where constraint sensitive programming is king.

    💬 0🔄 0⭐ 0
  • Nov 23, 2026, 12:12 AM

    @mcc In terms of getting help, Ziggit (the forum, ziggit.dev) also seems like a good option. I've been lurking there for a while as I toy with the idea of learning Zig, and the community seems active and helpful.

    💬 0🔄 0⭐ 1
  • Nov 23, 2026, 12:20 AM

    @mcc Zig is the most engineeringest language I know. It makes the things C assumes you know are happening highly visible and mindful choices, so you really feel the mechanism more.

    It’s the opposite of GC or Rust, Zig assumes the format and venue are the problem, and if you were asked the right questions there wouldn’t be a memory issue.

    Very cool language!

    💬 0🔄 0⭐ 1
  • Nov 23, 2026, 10:18 AM
    @mcc@mastodon.social I've recently started fiddling with Zig in some of my spare time. Was attracted to it in big part because of their LLM stance. I have to say I kinda like it, because I kinda liked C. About as verbose, from what little I checked.
    I'm interested in comparing it to Odin too, but I can't find their position on LLM.
    💬 0🔄 0⭐ 0
  • Nov 24, 2026, 6:20 PM

    @mcc I *really* wanted to like Zig, and some of its regularity and conveniences are beautiful. But even when I got to the "hello world" tutorial it was just so hideously verbose - worse even than Mercury.
    I may come back to it since the Zig community seems up there with the Scheme and Clojure people in terms of their contempt for LLMs, which immediately endeared them to me. But... oh my god it's verbose and you have to pass allocators around everywhere.

    💬 0🔄 0⭐ 0
  • 💬 1🔄 0⭐ 1
  • Nov 25, 2026, 2:03 AM

    @SirJohnOldcastle @mcc +1, Ziglings is an approachable tour of the language, generously sprinkled with @ratfactor's trademark whimsy. I've been chipping away at it in spare scraps of time but I'm only about halfway through, so I'm not sure how much of the more advanced/interesting stuff it covers. But definitely worth a try at least.

    💬 0🔄 0⭐ 2
  • 💬 1🔄 0⭐ 2
  • Nov 25, 2026, 2:14 AM

    @mcc @SirJohnOldcastle @ratfactor Makes sense. I don't think I've come across anything that quite fits the bill – I'll be curious to hear if you do find something.

    Maybe because the language is still undergoing such substantial flux (and maybe because of ... other issues affecting tech education in recent years) there seems to be a lack of comprehensive explainer/tutorial resources for Zig. I'd love to be wrong though!

    💬 1🔄 0⭐ 1
  • 💬 0🔄 0⭐ 1