Skip to content(if available)orjump to list(if available)

Synadia and TigerBeetle Commit $512k USD to the Zig Software Foundation

eggy

In performing an assessment of which ecosystem and PL to use to develop our high-integrity automation software for mission-critical applications, we assessed Rust, Zig, and Ada/SPARK. Rust had the support behind it from a big corp., a passionate developer community, and some adoption by significant entities, but none with cyber-physical systems. And it has been interesting to see some developers leaving Rust for Zig for the sheer enjoyment of using it instead. Our software will be controlling machinery overhead and other close coupling with machinery and people. Rust does not have the legacy in these areas or the ecosystem to cover formal verification. Zig was considered, but was even more new than Rust, and had similar disadvantages as listed for Rust. SPARK, a relatively newer PL, a subset of Ada, has legacy in high-integrity, mission-critical applications, and formal verification tooling that along with human review, makes it the strongest choice to meet the government's latest push for such critical software, and the language though verbose, is low friction to learn and apply. I found Zig to be a great second choice, and look forward to both Rust and Zig's future. Glad to see Zig moving along since Andrew started it. Congrats Andrew and the team currently pulling this off!

chc4

https://ferrocene.dev/en/ is a Rust toolchain which has achieved some certifications for mission critical applications similar to Ada/SPARK.

7thaccount

Interesting to see this. I bought a book on Ada 2012 awhile back. Pretty cool stuff - especially with Spark.

The license model always made me uncomfortable for when you were using the commercial compilers though. Does this lock you into Spark forever?

tayo42

>leaving Rust for Zig for the sheer enjoyment of using it instead.

What do people find more enjoyable?

lukaslalinsky

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 tools for managing it. That's why I enjoy it.

gorjusborg

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.

jandrewrogers

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.

pyrolistical

This is what people don’t understand. Zig and Rust are not competitors. Rust is a better C++ but C was the good part of C++.

rishabhaiover

You're a poet, kind sir.

npalli

Rust is a worse C++ with modern tooling.

LexiMax

Some people enjoy the relative simplicity and straight forwardness of C, some folks enjoy the flexibility and zero cost abstractions C++ gives you.

Some people can appreciate both. I actually like both languages for different reasons and I don't really understand why they're consistently being pitted against each other. Language wars are... for lack of a more appropriate and less-crass term... stupid.

hnlmorg

> Language wars are... for lack of a more appropriate and less-crass term... stupid.

I couldn’t agree more!

tayo42

With limited time and mental energy and I woukd say the languages are fighting for attention. The war is over why should I pay attention and for territory in my head.

ozgrakkurt

I find it easier to develop low level code like file format, async io library and similar stuff in zig

tkz1312

Zig is orders of magnitude more pleasant and enjoyable to use than Rust.

estebank

>>> Zig is more enjoyable than Rust

>> Why is that?

> Zig is more enjoyable than Rust

You didn't really leave the GP more informed than before.

littlestymaar

It's like saying bacon is better than cheese. I totally get why some people would feel that way, but it's far from a universal feeling.

Tastes are just subjective.

lagniappe

Speaking for myself, the community is more humble and kind on the zig side, and their chats are more on-topic.

anymouse123456

They aren't even close.

Trying to write Rust as a noob feels like being in a blackout swamp, waist deep in muck, fighting through thick air and trying, but failing to run from danger. Being utterly constrained in every direction.

Writing Zig as a noob feels like having the clouds part to reveal a bright, sunny Spring clearing and suddenly being able to cover land in a cheerful group with clarity, purpose and focus.

[Edit] Of course, this is purely subjective, obviously a skill issue and YMMV

derekcollison

grg0

Yeah, that is a lot more insightful than Synadia's marketing spew, thanks.

The BDFL point is particularly interesting to me having followed C++ for almost two decades and having been disenfranchised by the inconsistency of the design. I am more of the belief now that a BDFL is the right model for programming language design, particularly one that isn't insular and listens to feedback, but upholds their vision for the language above all else.

tm11zz

> We run a fuzzing fleet of 1,000 dedicated CPU cores 24/7.

that a lot

tazjin

Assuming they're being economical (and considering the level of thinking TigerBeetle seems to put into stuff - they probably are) this might be only a few beefy physical servers.

For them it seems safety and QA is a large part of the sales pitch, so that seems worth it.

jorangreef

Thanks! It's around 21 boxes, 48 cores each [1], and in Finland so there's natural efficient cooling.

Fun fact, Hetzner were surprised at the size of the order, and sent us an email to confirm. ;P

[1] https://x.com/TigerBeetleDB/status/1841089728935821674/quote...

jorangreef

Thank you Derek, such a pleasure to do this with you.

praveenperera

Are you guys using Zig?, love NATS by the way.

derekcollison

We are waiting on the IO abstraction for a supported Zig client (There are others though today), but this is specifically for a new initiative at Synadia that we will share more details about soon!

jtrueb

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.

jandrewrogers

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.

matklad

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 unambiguously, but, from my PoV (Rust since 2015, TB/Zig since late 2022), Zig was and is the right choice in this context.

jtrueb

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.

jorangreef

Out of interest, did you read the two posts [0][1] linked in there by matklad, creator of rust-analyzer as well as IntelliJ Rust, on our team?

Suffice to say, we know the intrusive memory and comptime patterns we use in our code base, and they wouldn't be as natural to express in a language other than Zig.

Rust is a great language, but Zig made more sense for what I wanted to create in TigerBeetle.

[0] https://matklad.github.io/2023/03/26/zig-and-rust.html

[1] https://lobste.rs/s/uhtjdz/rust_vs_zig_reality_somewhat_frie...

jtrueb

Yeah, I think BDFL wants to use Zig. I understand that it is nice for Zig to feel more like C, and that can be fun. If the toolchain is so far away from being mature, how long will it take the database to be mature?

Since previous comment was edited. I would clarify that I don’t doubt the engineering capabilities, just the timeline. A from scratch database in _established_ toolchains take 5-10 years. The Zig toolchain also is going to be evolving in the same timeframe or longer. The codegen, linking, architecture specific bugs etc. Isn’t it double the effort to bring to bear in the market?

rts_cts

This is great news! I do wish that they had push a little bit harder to get $524288 though

jorangreef

Thanks! We had to leave room at the top for the next power of two, or others would have to raise the exponent ;P

drfuchs

Real programmers would have donated $524,288. But seriously good news nonetheless.

ncruces

You can chip in remainder in soft monthly installments of $512 over two years.

jorangreef

We had to leave some room at the top for SpiralDB and ZML to get to the next power of two, or they'd have to raise the exponent. ;P

bryant

For those who don't intuitively think in base 2,

2¹⁹ bytes, or 512KiB.

benatkin

I'd prefer to express it in hexadecimals, and 1 would be 256 cents. So it would come out to be very slightly more, at 0x00030000.00 hexadollars, or 196608.00 hexadollars, or 50331648 cents – $503,316.48

I may have been looking at the binary year 2038 countdown :D https://retr0.id/stuff/2038/

elthor89

Is nats not written in go? Or does this foreshadow a switch to zig?

galangalalgol

They have clients in many languages. But the zig repo is still just a placeholder. They often have bare bones servers in the languages too, like rust has one, but I think they are mostly for testing.

lukaslalinsky

I'll shamelessly plug this. I think this is the most complete NATS client for Zig, matching the official clients in API and features: https://github.com/lalinsky/nats.zig

In fact, working on this client prompted me to start working on another Zig project, asynchronous I/O framework, which I'll be integrating with the NATS client soon: https://github.com/lalinsky/zio

fijiaarone

640k ought to be enough for anyone.

lxe

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 requires me to enter my email, name, and a message in order to download the white paper. I flipped over my desk in rage.

null

[deleted]

hmans

[dead]

webdevver

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!

renewiltord

Move Zig. Take off every Zig.

pixelpoet

For great justice.

dangoodmanUT

> For each of our companies to donate $256,000 in monthly installments over the next two years, with Synadia matching TigerBeetle, for a total of $512,000

Why over 2 years?

Like VC investment, Id assume a lump sum up front allow them to move faster with that money (hiring the right people sooner, etc.)

I wonder if projects like this care more about predictability of income (e.g. not hiring people depending on future funding to sustain them)

Aurornis

I assume it’s being budgeted out of their monthly cash flow, not coming out of cash reserves.

> Id assume a lump sum up front allow them to move faster with that money (hiring the right people sooner, etc.)

On the other hand, the monthly payments mean they’re less likely to overcommit their spending up front.

If they’re hiring someone with twice-monthly paychecks, receiving the money up front doesn’t make much difference unless they want to hire based on projections of higher future donations, which is a risky move.

SoftTalker

This is a donation, not an investment in the VC sense.

mikkupikku

Slow is smooth. Smooth is fast.

gethly

I heard that very recently in a movie, just cannot recall which one.

mikkupikku

It's popularly claimed to be a Navy SEAL saying. I have no idea if that's true, but I think it has some broad merit to many things, almost anything which benefits from careful planning or training. In this context, throwing a big lump sum of money all at once could pressure the developers to spend money / hire too fast without careful planning. Spreading the payments out could be the donor's way of saying they don't want radical hasty changes, they just want to help out in a way.

kapitar

Not a recent movie, but it was mentioned in Shooter, a Mark Wahlberg film from way back when

trenchpilgrim

Most businesses prefer to make payments monthly because it's easier on cash flow.

codegladiator

There is always a burden of deployment of assets

lxe

Is Synadia related to Shazam? The logo is pretty much the same.

jihadjihad

I opened Shazam so I could look at the logos side-by-side, and it is indeed pretty odd how alike they are. Even the angle of the shapes is virtually the same.

It’s a little OT, but interesting nonetheless.

null

[deleted]

jsbsbjs111

[flagged]