Live data from Hacker News

Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

raymyers.org

661–670 of 862 posts

Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

#661

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.

This is nonsense. There is quite a subset of C which is perfectly safe and an even larger one which can easily be safe with tooling. You could argue that unsafe keyword is easier to spot than the unsafe features of C, so that makes it somewhat easier to screen for issues. But if you screen for memory safety only, this is problematic anyhow.

Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

#662

I 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...

I don't think the style of multiple revisions to walk back the most problematic parts really helps the case. It very much leaves me with the impression that the original version is the one that the author really meant, with the revisions being just a weak attempt to deflect criticism.

Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

#663

I 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: 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

#664

Earlier 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.

Well, only if Clone/Copy is compatible with the semantics of the API. I.e., the called function doesn't need to modify anything. No &mut params (or data members) except perhaps `&mut self` (which would refer to definitions the same file).

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

#665
post #3

Did 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…

- When they rewrote the project to Rust, and described Zig as poor choice, there has been a negative fallout for Zig

- 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

#666

There'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…

It's more than just the battle testing. Things that are not wanted by a community or by users are not important. AI delusion memes are fairly reductive but a commonality I see in many overtly ai evangelistic groups is an urge to build without motivation and agreement. The yes we can answer AI gives to user's every question is a failure mode trigger. LLMs are missing the filter an engineer with a human body may give you to an idea...

- Why would we do that?

- This seems pointless.

- This is fucking dumb.

Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

#667
post #565

Earlier 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.

Using the allocator interface is only required if you allocate, which in this context you explicitly don't. If you want to use static preallocated memory in Rust, you'd have to use #[no_std] and only have access to the core part of the standard library. On the plus side, this is a very well supported and stable configuration, the core library is still pretty rich, and there's plenty of no_std libraries to choose from in the ecosystem.

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

#668
post #430

Earlier 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.

"These days"? Only if "these days" start in 2022 when LLMs first hit the scene. Everyone recognized in their gut, pretty early on, what they were and what they represented.

Re: Zig Creator Calls Spade a Spade, Anthropic Blows Smoke

#669
post #452

Earlier 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)?

Sure thing :)

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

#670

I 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 think it's weird to say crap like "So and so was a stinky manager" and then be like it's not a personal attack!

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.

Post reply on HN