Live data from Hacker News

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

tigerbeetle.com

81–90 of 213 posts

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

#81
post #46

The reason for not choosing Rust still doesn't make any sense to me. If you don’t want to OOM, need correctness, are following the power of ten (where you aren’t allocating anyways), I don’t see the conflict or harm of additional enforced correctness. Also, Rust does support checked arithmetic and has stable toolchains.

Several types of correctness are more difficult to enforce in Rust than in some other languages due to its relatively weak compile-time facilities. Modern database engines don't allocate memory at runtime, aren't multithreaded, they explicitly schedule ownership, etc. They also use the types of data structures and patterns that give the borrow checker fits. Rust's correctness capabilities are relatively less valuable in this context.

Extensive compile-time capabilities that allow you to verify many other types of correctness add enormous value when building database engines. This is a weak part of Rust's story.

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

#82
post #20

Earlier quoted context omitted.

>leaving Rust for Zig for the sheer enjoyment of using it instead. What do people find more enjoyable?

Zig feels like a better C with modern tooling. It is a tool that works for me. Rust feels like a better C++ with modern tooling. I am a tool that works for it.

Rust needs stronger compile-time features and capabilities if it wants to be a better C++. This is critical functionality for many types of safety.

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

#86
post #70
post #46

The reason for not choosing Rust still doesn't make any sense to me. If you don’t want to OOM, need correctness, are following the power of ten (where you aren’t allocating anyways), I don’t see the conflict or harm of additional enforced correctness. Also, Rust does support checked arithmetic and has stable toolchains.

There's a change in the tradeoffs in the above scenario: - you still get extra benefit from Rust, but the magnitude of the benefit is reduced (e.g., no UAF without F). - you still get extra drawbacks from Rust, but the magnitude of drawbacks is increased, as Rust generally punishes you for not allocating (boxing is a common escape hatch to avoid complex lifetimes). Just how much tradeoff is shifted is hard to qualify…

I mainly use Rust in embedded now. I don’t always rely on encoding all of the correctness in the Rust type system. To a degree all the old ways of enforcing correctness are still in play, I am just choosing when to take use idiomatic Rust or escape hatch out via shim to C-style Rust. It reminds me quite a bit of how C and C++ shops require another layer of macros or templates be used for containers, resources, etc.

The build time of Zig seems like the most desirable piece worth deciding over. Developer time is money, but it isn’t weird to have multi-hour build times in a mature project either C, C++, or Rust. The correctness suite is a bigger time sink than the build though. When building a database, you could drive the build time to 0 and still have hours in CI.

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

#88
post #63

Earlier quoted context omitted.

I think most folks would agree that Rust is an "acquired" taste. You need to kneel to the borrow-checker and develop something like a Stockholm syndrome before you find the language delicious.

It's not kneeling it's literally just eliminating bugs. It's kind of like saying that we kneel to logic while doing math

The problem I have with what I call "bondage and discipline" languages is that while it has value making sure the code is correct, it is not pleasant (for me) to work with.

Sometimes I just want to try out stuff, I know there is a bug, in fact, it breaks everything, but that's exactly what I want, I will revert it once my little expertement is complete. Strict languages will refuse to run anything unless you make sure that code follow all the rules, which is useless work as you know it won't stay (because it breaks things on purpose).

It is not just Rust, it is just that Rust has a lot of that. There is also C++ not allowing me to access private class members, or Python being annoying with its indentation, these are all good things for production code, but it gets in the way of experimentation.

Combine this with slow compilation times and it makes Rust not very experiment-friendly, which I think is the reason why many people don't have a good time with it.

As I understand it, Zig is more permissive and also has fast compilation as a design goal, which I think is a big contributing factor in making it more "pleasant".

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

#89
post #20

Earlier quoted context omitted.

>leaving Rust for Zig for the sheer enjoyment of using it instead. What do people find more enjoyable?

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…

Yet computers are abstract concepts :-)

And C is basically high level assembly for the PDP, which has little in common with x86, for example.

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

#90
post #63

Earlier quoted context omitted.

I think most folks would agree that Rust is an "acquired" taste. You need to kneel to the borrow-checker and develop something like a Stockholm syndrome before you find the language delicious.

Having a well designed type system is a as addictive as sugar. Also, Rust has a bunch of annoying warts but the borrowck ain't one of them (unless you're trying to write a linked list but it's not really something that happens IRL).

The funny thing is, in a language like Zig where memory allocation is explicit, linked lists are way more popular, just like they were in C. What happens IRL depends on your environment. :)
Post reply on HN