Earlier quoted context omitted.
There's only one language that's more dangerous than C and that is unsafe Rust. I say that only half-jokingly.
What do you mean? C is unsafe 100% of the time. Rust is only unsafe in unsafe{} blocks.
Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
661–670 of 862 posts
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#662I think like most people, I don’t have a problem with Andrew “calling a spade a spade,” even if I find his reasoning motivated. The bigger problem with the post is that it talks out of both ends of the mouth: it’s clearly meant as a personal attack, but also insists that it isn’t. When I read the post, my first thought was that I wouldn’t want to build things in Zig, because any technical decision I make, good or bad…
It might be helpful to read the latest revision of Andrew's post, which may address this concern for you. It received several revisions: https://github.com/andrewrk/andrewkelley.me/commits/master/p...
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#663I think like most people, I don’t have a problem with Andrew “calling a spade a spade,” even if I find his reasoning motivated. The bigger problem with the post is that it talks out of both ends of the mouth: it’s clearly meant as a personal attack, but also insists that it isn’t. When I read the post, my first thought was that I wouldn’t want to build things in Zig, because any technical decision I make, good or bad…
my instinct is to step up and defend Andrew: to say that truly, he has strong opinions -- which is to say he _cares_ about doing things right -- but that he's more patient and accommodating than you're judging him to be from this 10,000ft view.
that's kinda weird: you might view this as a personal attack _from_ Andrew against Bun and i might view the reactions as personal attacks _against_ Andrew. viewing it through this lens without our preconceptions ought to make either both parties or neither party look bad, i think? i don't know the solution except to highlight the outsized impact that our individual preconceptions play when judging a situation from 10,000ft away.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#664Earlier quoted context omitted.
Except that writing safe rust often requires designing the architecture around rust's ownership model, meaning a file by file, line by line translation doesn't necessarily leave you much closer to safe rust than you were at the start.
This is untrue. You can do a file by file translation by using clone and copy liberally. After you're done, you can incrementally introduce borrowing.
That's usually the case for Rust programs because the language encourages it. Are Zig programs like that?
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#665Did we read the same Anthropic and Andrew Kelly's posts? Anthropic is not in the programming language market; their post about rewriting Bun in Rust is full of technical details that led to improving the end product for their users. Zig's response is a sour opinion piece full of personal attacks. For context, I'm using Codex and have no interest in either Zig or Rust, so just observing this drama from the sidelines.
> Anthropic is not in the programming language market; their post about rewriting Bun in Rust is full of technical details that led to improving the end product for their users Anthropic absolutely is in the programming language market. If/since AI makes rewrites to certain languages relatively easy, a success story will tie the given language(s) to the given AI company. Rust may have a tremendous success in the futu…
- The ZSF is obviously upset because of the poor publicity
No where did they describe zig as poor choice, and there were zero evidence ZSF was getting poor publicity.
Had whole of HN, Reddit and Twitter all laughing at Zig this would have make more sense. But that was not the case. As a matter of fact I don't even record a single comment about it. If anything a lot of these "poor publicity" and "Zig as poor choice" were completely fabricated.
Had the internet turned against Zig, the response may have deserve a lot more weight.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#666There's so much good stuff in this post. Can't help to think of a recent HN post about most AI-generated projects being abandoned within months. Why? Because value of a project is not in the code produced. It's in the amount of battle-testing that code has seen. Battle-tested, mature code > fresh rewrite. Existing Zig codebase has seen X amount of battle-testing. Rust rewrite: 0 (except -I'm assuming- passing test su…
- Why would we do that?
- This seems pointless.
- This is fucking dumb.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#667Earlier quoted context omitted.
The funny thing is that Rust works perfectly fine with statically preallocated memory. It's not even against its idioms - most code will work with zero changes. In a way, the borrow checker is the perfect tool for this situation, since nothing owns any memory and everything is borrowed from the static allocation.
There's definitely one code change that's needed - you need to override the Allocator being used by standard library containers (or, live without standard library containers) and by any third-party dependencies you have. That feature is not even stable, let alone idiomatic.
I used "most" in the pedantic sense of "just a little bit over 50% if you count individual lines and not whole libraries". Most code doesn't operate on Box, Vec, String etc. directly, and is happy with & and &mut to underlying data. And even when it does, it's usually used for giving static lifetime to data, which is a non-issue here because all your preallocated memory has static lifetime already.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#668Earlier quoted context omitted.
>When I read the post, my first thought was that I wouldn’t want to build things in Zig, because any technical decision I make, good or bad, might subject me to this kind of article from their BDFL. I think it is worse than that, the comments from people in threads about this suggest that this is an attitude that is creeping into the community. They may not be a majority, but if kinder souls decide to leave for a mor…
There seems to be a team sport mentality with AI topic in HN these days. Almost feels like people are picking sides, and thus not being very thoughtful or rational. Sigh, there definitely an attitude creeping into the community and it's a huge turn off unfortunately.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#669Earlier quoted context omitted.
I program C for my day-job. I see Rust encroaching in proposed transitions. It may even happen. That said, it is a poor match for it compared to something like Zig (or Odin). It's hard to make the new Rust code use existing allocator abstractions (so now you have two systems doling out memory, how do you reliably free composite objects with memory from both? How do they share?) and you increasingly have to either aba…
If you allow, I’m curious: If you felt familiar with the language just as much as with C/Zig/Odin, would you prefer Rust for a completely greenfield project that requires no C interop (or none more detailed than say providing a general ABI)?
Just my opinion. It really depends. For systems- kind of software (low-level, DBs, file systems (also user-space)) no, I wouldn’t - if you manage memory with arenas and/or can plug in an allocator to tell you if you leaked memory (provided the codepath is triggered), I mostly get what I want with less mental overhead. Also, I very often want to interface with C libraries.
For games, again, I wouldn’t. I again strongly suspect I would and could organize my use of memory better.
I suspect Rust is best when you don’t want to interface with C code (except through bindings others wrote) and you’re maybe more doing applications development where C++ has also stood strong. I completely see how, theoretically, Rust can make a great language for an office suite, browser and so on.
That’s actually also when I tried Rust for a personal project. I wrote a desktop application and while I spoke to C code, I only did so through bindings others had written.
It was/is fine :) I still got a segfault bug though hehe.
Basically I liked Ocaml so I have huge appreciation for all that Rust tries to bring into the mainstream on that front. I am just not thinking that the borrow-checker makes it well placed to interop with C. It becomes much better for relatively isolated applications work.
Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke
#670I think like most people, I don’t have a problem with Andrew “calling a spade a spade,” even if I find his reasoning motivated. The bigger problem with the post is that it talks out of both ends of the mouth: it’s clearly meant as a personal attack, but also insists that it isn’t. When I read the post, my first thought was that I wouldn’t want to build things in Zig, because any technical decision I make, good or bad…
> The bigger problem with the post is that it talks out of both ends of the mouth: it’s clearly meant as a personal attack, but also insists that it isn’t. my instinct is to step up and defend Andrew: to say that truly, he has strong opinions -- which is to say he _cares_ about doing things right -- but that he's more patient and accommodating than you're judging him to be from this 10,000ft view. that's kinda weird:…
I liked Zed Shaw. I liked Ted Unangst. They made solid technical points and they were kinda mean about it. They didn't act like butter wouldn't melt in their mouths at the same time.