News for hackers. Stuff that matters.

rvrb

Re:What Zig felt like, coming from Rust on Saturday September 19, 2026 @04:58PM (#49770081)
sure, it sounds like there is a difference here. I'm not aware of any stance by the Zig core team on the subject.

I am genuinely interested in a place that this matters for a program, or any practical consequence this has for an end user of the language.

no idea why your response was flagged originally.

Re:What Zig felt like, coming from Rust on Saturday September 19, 2026 @04:00PM (#49769675)
there has been a ton of work on making comptime a pure and deterministic execution environment. I do not expect that work to stop. I don't know where you are getting the idea that it is not an important design consideration for the language.
Re:Rewriting Bun in Rust on Wednesday July 08, 2026 @10:05PM (#48840053)
you're right that that is a weak argument against C++ in that use case (biased by my own dislike of the language); but it is also a niche that Zig fits into quite well. so it's weird for the OP to claim it's ok to drop down to C++ when needed while kind of suggesting they don't get why anyone would use Zig
Re:Rewriting Bun in Rust on Wednesday July 08, 2026 @09:54PM (#48839969)
that you understand and think dropping down to C++ is what you need to do when you "need the best performance" is quite enough of a tell to invalidate the rest of your opinion here. if you "need the best performance", you need to ditch OOP and RAII, and you're probably reaching for C. Zig wants to be the better choice there. that's a perfectly reasonable niche for a language to exist in.

if you read the article carefully, jarred is pretty clear about how their specific requirements with Bun cause friction when bridging the manual memory management of Zig with a garbage collected JS runtime. at face value, that makes quite a lot of sense to me, and it's a pretty specific scenario that is not the full on condemnation of memory unsafe languages that your comment is.

Re:Holding Community Space on Monday May 11, 2026 @02:05PM (#48098427)
hello!! I have been planning to reach out to Synth Library Portland; it's awesome to hear from someone connected to it. I know they recently got kicked out of their Lloyd Center location and were looking for a home. I was hoping to talk to them about this. I will email you
Re:Holding Community Space on Monday May 11, 2026 @01:41PM (#48098100)
thanks for sharing this. not sure if you are the author, but it's really useful reading this right now.

I am working, quite literally as I write this, on starting a community space like yours for 'digital makers' in Portland.

I wake up every morning feeling charged and ready; I go to sleep every night full of anxiety and doubts -- "who am I to start this thing? does anyone want this? I don't know what I'm doing!". ultimately, I feel, failure is better than not trying.

and it helps to know it's not about me. every person I talk to in my community feels the need for this thing. and that's why we want help from other people like us. we're just getting started!

if you live here and this sounds interesting to you, you can find us here: https://rcdc.space

What is your point? I feel I made the one you are making before you even responded the first time.

That Discord communications can be exfiltrated in this specific set of circumstances (again, something I already said) does little to change that Colibri is implemented in the least privacy preserving way possible, short of publishing directly to every news and intelligence agency on your behalf, and does little to make that very clear in the first place.

First, the user knows this when joining a public community.

Second, the moderators can choose to remove someone who has joined the community in bad faith.

Third, it is entirely different than broadcasting every single action taken by every single user in every single community on the entire protocol to anyone with one URL.

Users in a Discord server/local community on tools like Discord naturally expect that their actions within that community are private in so far as they trust everyone in the community (including the operator) to keep it so.

By using ATProto, Colibri fundamentally makes all of your communication within any community completely public to everyone on the internet.

That’s fine for something like Twitter, where the product sets the expectation of such a thing. You can imagine how big of an issue this is when you try to do it in a trusted community model. Add on that Discord is used by kids who likely don’t know this and you can see why this is dangerous.

I consider this not only just a liability but bordering negligence. It is fundamentally broken, at an architectural level

Re:Separating the Wayland Compositor and Window Manager on Sunday March 15, 2026 @03:19PM (#47390901)
Binary space partitioning
Re: on Saturday January 24, 2026 @03:29PM (#46747331)
`extern` and `packed` container types have well defined layouts. a regular `struct` is an "auto" layout - and the compiler can and will rearrange whenever it wants.

if you need a well defined layout, use `extern`. if your struct makes sense to represent as an integer, use `packed`. I think it is often ill advisable to use `packed` otherwise.

you can explore this yourself on the Type info returned from @TypeInfo(T):

https://ziglang.org/documentation/master/std/#std.builtin.Ty...

https://ziglang.org/documentation/master/std/#std.builtin.Ty...

https://ziglang.org/documentation/master/std/#std.builtin.Ty...

Re:Anthropic acquires Bun on Tuesday December 02, 2025 @04:08PM (#46126896)
Nah, critical thought and applied experience.

Maybe ironically, demeaning that with a cute putdown like "vibes" is the exact kind of anti-intellectualism you think you are criticizing here. You've made an attempt to shutdown a discussion without any kind of your own experience or thought necessary.

In case you are actually interested in what can be an interesting discussion, there's real evidence that writing idiomatic Zig code does not breed endless memory leaks or UMA: https://mitchellh.com/writing/ghostty-gtk-rewrite

A take away from that article:

  For most complex libraries that expose a C API, the C API represents a boundary where object lifetime
  is transferred or blurred. Whatever language you're using to interact with it, the safety you're
  guaranteed is only as good as understanding the semantics of the API and writing a good wrapper.
But thinking critically is not the easiest way to win imaginary fights on the internet, so I'll forgive you if you're not interested in using your brain or challenging your preconceptions.
Re:Anthropic acquires Bun on Tuesday December 02, 2025 @03:04PM (#46126075)
I haven't verified this, but I would be willing to bet that most of Bun's issues here have more to do with interfacing with JavaScriptCore through the C FFI than Zig itself. this is as much a problem in Rust as it is in Zig. in fact, it has been argued that writing unsafe Zig is safer than writing unsafe Rust: https://zackoverflow.dev/writing/unsafe-rust-vs-zig/
Re:Migrating the main Zig repository from GitHub to Codeberg on Wednesday November 26, 2025 @09:27PM (#46064857)
you say this like it's some own or something, but I'd be more surprised if they didn't. believe it or not, they are already donating some of their funds to the upstream ecosystem[0].

[0]: https://ziglang.org/news/2025-financials/

Re:Zig (and the Design Choices Within) on Tuesday November 11, 2025 @04:30PM (#45893159)
C, C++, Rust, Zig. Rust and C++ have an infamous learning curve. If you know anything about using any systems language other than Zig, Zig is incredibly simple to pick up, like C. Unlike C, it pushes you toward making less mistakes.

If you don't know anything about using a systems language, Zig makes it easier for the people who do to review your code and make sure you didn't mess it up. It does this with very intentional design that makes it easier to understand the full impact of code quickly, reducing the cost of review, making review practical to catch the issues. It also has many other fail safes to catch these problems before they ever reach a production release.

So, yeah, it's totally depending on where you are coming from -- but Zig is not a tool built for a web developer who doesn't know anything about memory to go and ship an application within their first week. It does make it easier for that person to learn the ropes at a steady pace.

Meanwhile, everyone complaining that Zig is not memory safe doesn't seem to care that applications written in Zig do not have the vulnerabilities that memory safety solves on the scale that C does[0].

If you have not written a real application in Zig and evaluated it for vulnerabilities, but are claiming that creating Zig was irresponsible, and using it is too; you are cargo culting.

If you have, you probably understand there is a niche that Zig fits in and that it isn't surprising it exists to fill it. Like all things in our industry, there is a cost/benefit analysis required for choosing the tools you build with.

No one reasonable has claimed that memory safe languages should not exist, but there is a maddening number of people being disrespectful toward those who think there are other ways of addressing the same problems.

[0]: https://mitchellh.com/writing/ghostty-gtk-rewrite

Re:Zig (and the Design Choices Within) on Monday November 10, 2025 @06:44PM (#45882425)
Zig is famously simple to pick up and write with, so I don't know what you mean by "difficult". Software is dangerous. Memory safety is one of a million ways it can be dangerous. A compiler barfing when it thinks you are doing something unsafe with pointers is one approach to dealing with one of the ways that code can be dangerous to execute.

Zig does not ignore that particular danger, it just takes a different approach to dealing with it than some other modern languages. An approach that, I believe, leaves the developer with a little more humanity by allowing them the benefit of the doubt that they know what they are doing.

Everyone that has not built a systems language, or has not built a real application with both Zig and a memory safe language, that is reacting emotionally to what I've said should put a lot of consideration into whether they are cargo culting or using critical thought. Consider that we still do not yet know what is best, and shutting down attempts to explore different ideas with things like "creating [and using] this language is ignoring the humanity of the end user" is, well.. dumb.

Re:Zig (and the Design Choices Within) on Monday November 10, 2025 @01:39PM (#45879227)
Zig is a tool that helps professionals prevent those mistakes.

"Memory safe languages" are tools that prevent professionals from making those mistakes.

It's a subtle but important difference. Zig attempts to leave some humanity to the developer.

When someone says they are incapable of earning or deserving that, I feel sad.

Re:Why is Zig so Cool? on Friday November 07, 2025 @07:57PM (#45853101)
the answer I've seen when it has been brought up before is that (for allocators) there is not a practical impact on performance -- allocating takes way more time than the virtual dispatch does, so it ends up being negligible. for code bloat, I'm not sure what you mean exactly; the allocator interface is implemented via a VTable, and the impact on binary size is pretty minimal. you're also not really creating more than a couple of allocators in an application (typically a general purpose allocator, and maybe an arena allocator that wraps it in specific scenarios).

for IO, which is new and I have not actually used yet, here are some relevant paragraphs:

  The new Io interface is non-generic and uses a vtable for dispatching function calls to a concrete implementation. This has the upside of reducing code bloat, but virtual calls do have a performance penalty at runtime. In release builds the optimizer can de-virtualize function calls but it’s not guaranteed.
  
  ...
  
  A side effect of proposal #23367, which is needed for determining upper bound stack size, is guaranteed de-virtualization when there is only one Io implementation being used (also in debug builds!).
https://kristoff.it/blog/zig-new-async-io/

https://github.com/ziglang/zig/issues/23367

Re:Why is Zig so Cool? on Friday November 07, 2025 @07:51PM (#45853060)
out of curiosity, what feature do you want?
Re:Why is Zig so Cool? on Friday November 07, 2025 @07:43PM (#45853009)
not being a direct competitor to either of these already existing languages is exactly why it is interesting!
Re:Why is Zig so Cool? on Friday November 07, 2025 @07:36PM (#45852967)
I've tried writing a similar post, but I think it's a bit difficult to sound convincing when talking about why Zig is so pleasant. it's really not any one thing. it's a culmination of a lot of well made, pragmatic decisions that don't sound significant on their own. they just culminate in a development experience that feels pleasantly unique.

a few of those decisions seem radical, and I often disagreed with them.. but quite reliably, as I learned more about the decision making, and got deeper into the language, I found myself agreeing with them afterall. I had many moments of enlightenment as I dug deeper.

so anyways, if you're curious, give it an honest chance. I think it's a language and community that rewards curiosity. if you find it fits for you, awesome! luckily, if it doesn't, there's plenty of options these days (I still would like to spend some quality time with Odin)

Re:Why is Zig so Cool? on Friday November 07, 2025 @07:25PM (#45852916)
matklad did it justice in his post here, in my opinion

https://matklad.github.io/2025/08/09/zigs-lovely-syntax.html

Re:macOS becomes iOS: Safari video controls on Wednesday September 24, 2025 @03:31PM (#45364960)
I know they’re different workflows entirely, but you could start dabbling with Bitwig, which is really good and runs on both macOS and Linux, then eventually switch when you feel like you’re out of the workflow hole

But to be honest, I’m still using Bitwig on a Mac for my studio despite having switched everywhere else to Linux

Re:Bluefin LTS Is Released on Friday September 19, 2025 @09:25PM (#45308972)
Sure there is zero immediate risk, I just genuinely don’t know what I would get out of taking on the risk of adding a community maintained middleman into the supply chain. I know, because rpm-ostree, it’s not the same as some random distribution. If there’s nothing to get out of it personally that layering a package or two can’t give me (or better, writing my own simple image).. why?

I’m not saying there isn’t a reason; I’m genuinely looking for it

Re:Show HN: Zedis – A Redis clone I'm writing in Zig on Friday September 19, 2025 @09:13PM (#45308834)
Good point, the database written in Zig with a bug mascot tells us nothing about writing a database in Zig without a bug mascot
Re:Bluefin LTS Is Released on Friday September 19, 2025 @12:29PM (#45303528)
As someone quite happy with a vanilla Fedora Silverblue install on both my desktop and laptop, can anyone explain why I would rebase to Bluefin instead? It seems like there must be technical merit to the Universal Blue spins beyond adding preinstalled software/configs, but I can't find it, despite looking.
Re:macOS Tahoe on Monday September 15, 2025 @08:50PM (#45256739)
If it supported M4 I would be using it on my MacBook, but I am using a ThinkPad P14s gen 6 (AMD) right now. Some issues with suspend that I worked around with a kernel parameter but other than that, everything else worked out of the box
Re:macOS Tahoe on Monday September 15, 2025 @06:13PM (#45255611)
Fedora Silverblue is the closest feeling to the macOS experience I fell in love with that I’ve had on Linux in, well, ever. Very happy with it on my desktop and laptop. It’s not perfect but it is less imperfect than modern macOS has become.

Finding a laptop that works well is annoying, however.

Re:macOS Tahoe on Monday September 15, 2025 @05:15PM (#45255002)
It was the straw that broke the camel’s back for me. After trying out the preview for a month, the writing was on the wall, and I began the process of switching to a Thinkpad with Linux. I am now fully off macOS for the first time in 20 years of being an Apple die hard. I could use a lot of emotionally loaded words to describe how I feel about this release, but the long and short of it is that I am no longer the target audience for Apple.
Re:We rewrote the Ghostty GTK application on Friday August 15, 2025 @01:40PM (#44915239)
> extracted via reflection

I think you are talking about dispatch of virtual methods, which is still a thing, but the performance cost can be somewhat mitigated.

the names of the methods are interned strings (called `StringName`). a naive implementation will allocate the `StringName`, but you can avoid the allocation with a static lifetime string. we expose a helper for comptime strings in Zig[0].

then, extension classes need to provide callback(s)[1] on registration that lookup and call the virtual methods. as far as I know, the lookup happens once, and the engine stores the function pointer, but I haven't confirmed this yet. it would be unfortunate if not.

at least right now in GDZig, though this might change, we use Zig comptime to generate a unique function pointer for every virtual function on a class[2]. this implementation was by the original `godot-zig` author (we are a fork). in theory we could inline the underlying function here with `@call(.always_inline)` and avoid an extra layer indirection, among other optimizations. it is an area I am still figuring out the best approach for

virtual methods are only ever necessary when interfacing with the editor, GDScript, or other extensions. don't pay the cost of a virtual method when you can just use a plain method call without the overhead.

[0]: https://gdzig.github.io/gdzig/#gdzig.builtin.string_name.Str...

[1]: https://github.com/godotengine/godot/blob/e67074d0abe9b69f3d...

[2]: https://github.com/gdzig/gdzig/blob/5abe02aa046162d31ed5c52f...

Older »