Live data from Hacker News

Zig Is Self-Hosted Now, What's Next?

kristoff.it

141–150 of 159 posts

Re: Zig Is Self-Hosted Now, What's Next?

#141

Earlier quoted context omitted.

Going by your own comment, you seem to not be an "early enough" adopter. That's totally fair, maybe Zig will be more interesting for you once it stabilizes more in the future.

I don’t believe this to be true. Zig is 6 years old now going by Wikipedia. In comparison I use Rust in an more extensive way than Zig for almost 20 years now. I for sure wrote more Rust in 2012 when it was ~2 years? old than Zig last year, yet I don’t remember miscompilations on that level. The same is true for my recollection of using very early D which however at this point was in an earlier life of mine and very…

20 years? Something doesn't add up.

Re: Zig Is Self-Hosted Now, What's Next?

#142

I wonder if Zig is getting too much hype at the moment considering its immaturity (and so many easy to hit bugs as noted by other commenters). Is it getting hype before it's ready? Will it be able to recover from that?

Compared to Rust at this stage of its development? No, Rust was far more popular.

If you search headline with Zig which reached HN front page, you will only see about 1 - 2 per month. Compared that to Rust, which isn't even as popular as it once was.

But still, I do wish the Zig community could quiet down a little bit. It would be nice if decent zig submission hit HN front page once every two months. Keeping the interest alive but not too much so people felt it is over hyped.

We will have a November Release soon and I can guarantee it will hit HN front page again.

Re: Zig Is Self-Hosted Now, What's Next?

#143
post #140
post #136

Earlier quoted context omitted.

Frankly I don't care if the problem gets fixed or not. I've already started a rewrite in Rust, and I don't plan on revisiting the Zig version until Zig has hit 1.0. Coming from a Clojure background I generally agree with Hoare's "One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.", and in that sense Zig should easily be more correc…

Am I missing something here? You are comparing a language which hit 1.0 and had seven years of additional refinement, to a language which is still at least 2-3 years away from 1.0 and spent most if not all its time in the past 12 months on self hosting compiler?

> Am I missing something here?

Yes. I'm comparing the stability of very early Rust e.g. 0.x, to the stability of Zig now. Not Rust 1.6 with Zig 0.x.

Re: Zig Is Self-Hosted Now, What's Next?

#144
post #44

I hope Zig continues to ship clang, because Zig is the easiest way to install clang.

If i am not mistaken, that's one of the larger selling points in Favour of Zig, isn't it?

I am pretty sure the C/C++ capabilities will stay in the Zig toolchain for a very long time :)

Re: Zig Is Self-Hosted Now, What's Next?

#145
post #141

Earlier quoted context omitted.

I don’t believe this to be true. Zig is 6 years old now going by Wikipedia. In comparison I use Rust in an more extensive way than Zig for almost 20 years now. I for sure wrote more Rust in 2012 when it was ~2 years? old than Zig last year, yet I don’t remember miscompilations on that level. The same is true for my recollection of using very early D which however at this point was in an earlier life of mine and very…

20 years? Something doesn't add up.

It’s a typo. Was supposed to say 10.

Re: Zig Is Self-Hosted Now, What's Next?

#146
post #136

Earlier quoted context omitted.

Frankly I don't care if the problem gets fixed or not. I've already started a rewrite in Rust, and I don't plan on revisiting the Zig version until Zig has hit 1.0. Coming from a Clojure background I generally agree with Hoare's "One is to make the program so simple, there are obviously no errors. The other is to make it so complicated, there are no obvious errors.", and in that sense Zig should easily be more correc…

I'd be interested in some constructive feedback on your Zig experience. There's nothing I can do with the claim that Zig users have a culture problem, especially since the "the zig community" does not work on the compiler - it's just me and a handful of other people - and I'm not really able to evaluate the claim about Rust being in a more "production ready" state at a comparable point in its life. To be honest, thes…

No post body was provided.

Re: Zig Is Self-Hosted Now, What's Next?

#147

Earlier quoted context omitted.

> and then busting out the hardcore QA This thinking seems... backward (or at least overall counterproductive/like more work) to me. Do you not have a test suite? At least, unit tests for core language features? It seems (with all due respect) a bit irresponsible not to have this, it would at least prevent most regressions in tested code for example (such as breaking "for" loops, as someone else mentioned)

Zig has thousands of tests, but the problem space of a programming language is pretty big, making fuzzing and other similar techniques worth the effort in the long run. The discussion wasn't about the existence of basic unit tests. https://github.com/ziglang/zig/tree/master/test

I also possibly misinterpreted someone else's comment about "for" breaking, assuming it was a regression instead of an intended syntax change which might have been covered by units. My bad

Re: Zig Is Self-Hosted Now, What's Next?

#148
post #75

Earlier quoted context omitted.

This is not the case, optimizing compilers were quite far along by the 16MB era. RISC relied on them, GCC was widely adopted due to optimizations, etc.

The level of optimization available back then is a far cry from what we have today, as far as I've ever heard or seen. Based on looking at some histories of GCC, the EGCS fork in 1997 was responsible for starting to introduce meaningful optimizations into GCC, such as global CSE (common subexpression elimination), and that wasn’t merged back into mainline GCC until years later. LLVM didn’t really hit its stride until…

https://ftp.gnu.org/old-gnu/gcc/ has old GCC versions. Eg checking the manpage gcc.1 from the 2.7 tarball there's inlining, loop unrolling, strength reduction, cse, peephole, instruction scheduling, jump threading, and others, probably better described in thebtexinfo doc.

There are opts not covered in the command line options. Eg see this discussion of tail call optimizations already in GCC 1.x: https://groups.google.com/g/gnu.gcc.bug/c/Zzbfyvi2uAM/m/GVDI...

Sure, later compilers did more, but the above-mentioned opts made GCC known as an optimizing compiler. And there were other optimizing compilers too, for C but also other languages.

Fortran compiler histories are interesting, they were doing their own thing on numerical code, SIMD (called vector processors back then), etc. Eg https://www.deepdyve.com/lp/wiley/evaluation-of-fortran-vect...

Re: Zig Is Self-Hosted Now, What's Next?

#149

Earlier quoted context omitted.

I'd be interested in some constructive feedback on your Zig experience. There's nothing I can do with the claim that Zig users have a culture problem, especially since the "the zig community" does not work on the compiler - it's just me and a handful of other people - and I'm not really able to evaluate the claim about Rust being in a more "production ready" state at a comparable point in its life. To be honest, thes…

Quoted post unavailable.

No post body was provided.

Re: Zig Is Self-Hosted Now, What's Next?

#150

Congrats Zig Team! Allow me to comment from my professional perspective: I have been working deep inside the spaghetti-stuffed soft underbelly of the computational infrastructures of multitudes of international “Big Science” projects and consortia. Zig seems like a very, very good fit. Are there any static code analysis tools that support it? Such functionality would be a killer app… Wild idea: what about building on…

It would be awesome if zig implemented compiler hooks, for example: shoot off messages at various stages (sema of files, zir on individual functions, linker events), with some sort of defined binary structure (ok if it's defined in zig itself!) at say a tcp port.

Yes, that would be amazing, full classes of approaches to problem solving would be unlocked at once and we wouldn't have to invent new languages, DSLs, transpilers, etc, but just leverage zig.
Post reply on HN