Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
Zig Is Self-Hosted Now, What's Next?
11–20 of 159 posts
Re: Zig Is Self-Hosted Now, What's Next?
#12Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
I'm not so familiar with Zig, are you saying that the compiler fails to compile correct (i.e. according to spec) code?
Re: Zig Is Self-Hosted Now, What's Next?
#13Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
> The self-hosted compiler brings many advantages, but it did cost us a significant amount of effort and time. While Zig is still going up in popularity and starting to make a tiny dent in the industry, people that have been following along for long enough will know that this work has reduced our momentum in the last two years.
> Bug fixes in the compiler have been often put on hold since fixing the bootstrap compiler was ultimately useless, and accepted feature proposals have been piling up because it would have required implementing everything twice.
Re: Zig Is Self-Hosted Now, What's Next?
#14Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
I'm not so familiar with Zig, are you saying that the compiler fails to compile correct (i.e. according to spec) code?
Re: Zig Is Self-Hosted Now, What's Next?
#15Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
Looks like your complaint was a known tradeoff. > The self-hosted compiler brings many advantages, but it did cost us a significant amount of effort and time. While Zig is still going up in popularity and starting to make a tiny dent in the industry, people that have been following along for long enough will know that this work has reduced our momentum in the last two years. > Bug fixes in the compiler have been ofte…
Pretty much all of the talks and blog posts on the `in-Zig` compiler are about better performance, lower memory footprint, e.t.c.
I would much rather have heard a talk about how they improved correctness through automatic testing, formal methods, simple language design e.t.c.
A language that (does or doesn't) compile your code in 0.1 seconds to a broken binary is worse than piping your code into dev/null.
Re: Zig Is Self-Hosted Now, What's Next?
#16Re: Zig Is Self-Hosted Now, What's Next?
#17Nice achievement. Curious about this though: > building the compiler itself used to require 9.6GB of RAM, while now it takes 2.8GB. Why is the RAM usage so high? It was only a few years back and we were building C++ compilers on machines with barely 16MB.
Re: Zig Is Self-Hosted Now, What's Next?
#18Quoted post unavailable.
Re: Zig Is Self-Hosted Now, What's Next?
#19Nice achievement. Curious about this though: > building the compiler itself used to require 9.6GB of RAM, while now it takes 2.8GB. Why is the RAM usage so high? It was only a few years back and we were building C++ compilers on machines with barely 16MB.
> It was only a few years back and we were building C++ compilers on machines with barely 16MB. "A few years" seems like a serious understatement, but beyond that... compilers in the time period you're talking about weren't really doing optimizations, they were just shoveling assembly out the door. Doing very little work takes very few resources, but the resulting binaries were way slower than they could have been. A…
Re: Zig Is Self-Hosted Now, What's Next?
#20Correctness please. Zig is a way too simple language to justify all the really easy to hit bugs. I'd give everything for a zig compiler that's 10 times as slow but actually compiles my code. Also testing infrastructure. Zig really needs fuzzing and property testing tooling build-in. Hitting stage 2 with arbitrary autogenerated zig code and IR, would have really helped detect regressions for example.
Looks like your complaint was a known tradeoff. > The self-hosted compiler brings many advantages, but it did cost us a significant amount of effort and time. While Zig is still going up in popularity and starting to make a tiny dent in the industry, people that have been following along for long enough will know that this work has reduced our momentum in the last two years. > Bug fixes in the compiler have been ofte…