Live data from Hacker News

TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

tigerbeetle.com

151–160 of 213 posts

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#151
post #56

I'm absolutely struggling to understand what Synadia even does. it's been an infuriating experience navigating through their marketing site. It's been minutes and I still don't understand what it is. What is NATS? Edit: I had to google what NATS.IO is. The marketing site is infuriatingly useless. Please, can we stop doing this? Edit: At the bottom on the footer it says compare NATS to Kafka. It took me to a page that…

NATS and Synadia's other tech is easy to understand. You're not the target demographic for the Synadia site. They're targeting enterprise.

You can find the NATS site here [1]. NATS is so flexible it's admittedly easy to get lost in what exactly it is or what it's good for. The easy explanation is it's a message broker that can let programs send and receive messages to each other. Unlike a message queue, it has no persistence. Clients can that express "interest" in a topic receive messages to that topic, but messages disappear if nobody listens to them. It's kind of like UDP without addresses. It's clustered and supports complicated topologies where clusters route messages to each other, and has a powerful ACL system for exposing clusters to unprivileged actors that shouldn't be given full access (which means you can easily make it multi-tenant). The closest comparable technology might be MQTT, and indeed NATS offers an MQTT mode.

NATS also has a bunch of higher-level stuff built on top of it: A Kafka-like "stream" feature called Jetstream, RPC, a key/value store, an object (blob) store, and so on. The NATS message bus is the core primitive that these features use.

[1] https://nats.io/

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#152

Earlier quoted context omitted.

Most people stop feeling like they are fighting with rust a few months into using it. The borrow checker is something that becomes second nature and you still use the same techniques that would please the borrow checker outside of rust because it's generally better program structure in many cases and avoids bugs. If you want to do something that you know us correct that rust normally doesn't allow, just use unsafe. I…

The ergonomics of unsafe rust are abysmal. It would have been 10 times better if they just let you do inline C instead.

Do you have some examples of what's bad about the ergonomics?

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#153
post #134

> In all these things, what impressed me most was Zig’s approach to safety when working with the metal. Not in terms of an on/off decision, but as a spectrum. Not aiming for 100% guarantees across 1 or 2 categories, but 90% and then across more categories. Not eliminating classes of bugs, but downgrading their probability. All while preserving the power-to-weight ratio of the language, to keep the language beautifull…

Why is 90% enough?

What are you trading off to get from 90% to 100%?

How about compile speed? Are you willing to wait an extra second to get 100%? How about 10 seconds? A minute? 10 Minutes? An hour?

Rust is notoriously slow at compiling and people have been banging on it for a while. At some point, you have to accept that the language, itself, has properties that make compilation slow.

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#154
I'd probably agree with most in the comment section. Comparing Rust & Zig is not productive. I spent the last month familiarizing myself with Zig after having done a 2 years stint with Rust and Zig is a much younger language with a far smaller ecosystem to work with. If I were to reach for C i'd recommend Zig. If I were reaching for C++ then it would be Rust.

Both are fantastic languages and I hope to see them both evolve in years to come. Zig has a longer road ahead but it really is elegant and simple to work with.

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#155
post #56

I'm absolutely struggling to understand what Synadia even does. it's been an infuriating experience navigating through their marketing site. It's been minutes and I still don't understand what it is. What is NATS? Edit: I had to google what NATS.IO is. The marketing site is infuriatingly useless. Please, can we stop doing this? Edit: At the bottom on the footer it says compare NATS to Kafka. It took me to a page that…

i asked gemini to investigate on my behalf, and it basically said that Synadia is to NATS what HiveMQ is to MQTT. seems fair enough. thank goodness for llms to spare us the marketing drivel!

I dunno why you're being downvoted. This is a pretty great use of LLMs in my experience. I also used it to tell me what the hell Databricks is.

Of course there's a chance it's hallucinating (more likely with this niche thing) but it's not like it's critical information anyway.

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#156

Earlier quoted context omitted.

The ergonomics of unsafe rust are abysmal. It would have been 10 times better if they just let you do inline C instead.

Do you have some examples of what's bad about the ergonomics?

Almost everything. Can't even do pointer arithmetic without x.add() and x.offset()

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#157

Earlier quoted context omitted.

The ergonomics of unsafe rust are abysmal. It would have been 10 times better if they just let you do inline C instead.

Do you have some examples of what's bad about the ergonomics?

https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/

https://news.ycombinator.com/item?id=41944121

The TLDR is that there’s all sorts of invariants that the Rust compiler internals assume about Rust code (eg pointers don’t alias). In C such assumptions can’t be made. Unsafe rust requires you to uphold all the same invariants that safe rust does without any guardrails and it has more such assumptions than C. C however is uniformly dangerous - there isn’t a safe subset to write your code in.

One example would be that you could have something like:

    let x = 5;
    do_something(&x as *const _ as *mut _);
Now do_something might dereference and write to the pointer. Now you have non-local safety to reason about because if the compiler realizes you’ve tried to dereference a mutable pointer to an immutable variable it’s free to declare that UB and do bad unsound things (the non-locality is because the unsafe is inside do_something but the problem is with the pointer cast in safe rust). There’s all sorts of subtle things like that.

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#158

Earlier quoted context omitted.

In a way, it's a return to simpler times. I remember learning programming C and it was about programming computers, not abstract concepts. As languages got higher level abstractions, we lost touch with the computer. That's why programs are so bloated today. Zig respects that we are programming a computer, with concrete behaviours, it doesn't try to abstract things away, doesn't hide complexity, and yet gives you tool…

I truly do not understand why anyone would think Rust is abstracting things away. Like, to be clear: if you want to develop in Zig because you like it for whatever reason, you should do that. There is no world, nor will there ever be a world, where there's "one language to rule them all". This comment should not be read as "you should write Rust instead". I just don't find any of your descriptions of Zig to be things…

I think what happens is that people discover a new language, find that they really enjoy it and then struggle to explain why they like it. While they’re struggling they sometimes put down a “competing” language even if no one asked.

They could say it just really vibed with them but they don’t.

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#159

Earlier quoted context omitted.

I truly do not understand why anyone would think Rust is abstracting things away. Like, to be clear: if you want to develop in Zig because you like it for whatever reason, you should do that. There is no world, nor will there ever be a world, where there's "one language to rule them all". This comment should not be read as "you should write Rust instead". I just don't find any of your descriptions of Zig to be things…

Well, for example, every function that allocates expects allocator as an argument, it is not abstracted away. Resource deallocation is not abstracted away, you have to explicitly free your resources. Ever function that uses IO expects it as an argument. It doesn't have operator overloading, which is also an abstraction. It is a very explicit language.

Local allocators are also in the works for Rust, as well as a general effect system (including potentially an IO effect). Rust also doesn't have fully general operator overloading, it currently uses traits instead. (Though explicit local notations are generally a better way of handling operator semantics, and a future edition of Rust could potentially achieve this via macros.)

Re: TigerBeetle and Synadia pledge $512k to the Zig Software Foundation

#160

Earlier quoted context omitted.

Do you have some examples of what's bad about the ergonomics?

https://chadaustin.me/2024/10/intrusive-linked-list-in-rust/ https://news.ycombinator.com/item?id=41944121 The TLDR is that there’s all sorts of invariants that the Rust compiler internals assume about Rust code (eg pointers don’t alias). In C such assumptions can’t be made. Unsafe rust requires you to uphold all the same invariants that safe rust does without any guardrails and it has more such assumptions than C. C…

> The TLDR is that there’s all sorts of invariants that the Rust compiler internals assume about Rust code (eg pointers don’t alias).

There are fairly straightforward ways to disclaim these invariants to a greater or lesser extent as appropriate, such as accepting &Cell arguments (or even, e.g. Option>) in lieu of &mut T. But the Rust standard library is not yet comprehensively built with this in mind, so this might be an area where Zig's library facilities have a real advantage unless an effort is made to address this gap.

Post reply on HN