Live data from Hacker News

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

kristoff.it

111–120 of 159 posts

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

#111

Earlier quoted context omitted.

I'm not sure I understand your point. Zig is clearly too unstable for your liking, by your own admission. If your point is that Rust was more stable (and why not, even an overall better project) at the same age, then I'm happy to immediately concede the point. But that doesn't really have any influence on the main question, does it?

The argument that you were making (unless I misunderstood you) is that there are more important issues for the language than correctness or appealing to early adopters to which I made the remark that this attitude is steering me away from the language. Zig is in a weird spot because it has a similar momentum behind it than some other languages I was exited about, it has even more hype (and is very hype driven with st…

> The argument that you were making (unless I misunderstood you) is that there are more important issues for the language than correctness or appealing to early adopters to which I made the remark that this attitude is steering me away from the language.

Yes, and I still stand by my assertion. Next to you in the "early adopter spectrum" are people who can put up with more breakage on one side, and people who cannot put up with the current level on the other side. At any point in time the project will be somewhere along that spectrum and people will be on either side of that line.

Similarly, different things going on in the project will move the line in either direction. Switching to a new compiler implementation is unsurprisingly a source of bugs, if you want to use Zig now, you will have to accept the current state of things.

> it has even more hype (and is very hype driven with streams and everything)

Hype driven... you mean Andrew's 100 viewer streams? Or my 30 viewer streams? What hype-driving streams are you referring to. My YouTube channel with 4k subs? (hit that milestone today btw)

> I also have to say that I find these responses unnecessarily combative.

I really don't know what to tell you. If Zig is too broken for your liking, don't use it. If other projects at the same level of age/popularity/whatever had a level of breakage that you found tolerable, then great, and if Zig doesn't meet that standard, then it means, by definition, that it's too early for you to use it.

If you want to make a different point, then state it clearly. From the early adoption perspective, I don't see any argument to be discussed here.

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

#112
post #82

Earlier quoted context omitted.

> I don't really understand your crusade. Accuracy is important in the marketplace of ideas, and especially in programming. Software is too buggy already, and it would only add more bugs to have programmers not understand the languages they use. > I made this same observation in the past, it never satisfied you. Yes, you made that same observation, and I appreciate that. But as @kbd so unintentionally demonstrated, p…

> The language reference says that sync functions are turned async if they call async functions. This implies virality of async on functions, which implies that many functions are definitely async-only. > If the compiler does something different, which it would have to if it actually makes two different versions of each function, then the language reference is wrong. Like I said, accuracy matters, so I would also lik…

That's a generic function. That's not what I'm talking about.

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

#113

Earlier quoted context omitted.

The choice of improving the performance of the compiler before working on the package manager was deliberate. With the new compiler you will be able to have plenty of dependencies and compilation times / memory usage will remain reasonable. The same could not be said of the bootstrap compiler. For us compilation speed is part of the main value offering of Zig.

Is this working? stage2 seems to take similar and large amounts of time to compile a non-async-using program from our project with no caches and with caches after a whitespace change.

The linked post mentioned that the compiler itself does compile faster, but not by much. Memory usage is the greatest impact of stage2.

The speed will come when the native backends are finished. Right now the compile time is mostly llvm. The idea is a native and fast backend for debug (development) builds, and llvm for optimized releases.

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

#114

Earlier quoted context omitted.

Does developer experience not include using function pointers in Zig?

How is calling non-async functions via @asyncCall insufficient?

@asyncCall is exactly the sort of thing the original function colors calls out.

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

#115
post #92

To all people complaining about bugs: 1. It's easy to find flaws in hard, ambitious projects. All ambitious projects start out as WIPs. 2. It is much harder to do an ambitious project. Try to be in the 2nd group.

Zig is not the first new language I try. I was an excited early adopted of a lot of many languages including D, Go, Rust and TypeScript. At no point to I remember running into miscompilations on rather fundamental issues and so quickly. So I do think this is quite out of the ordinary.

Consulting Wikipedia's "first appeared" field for each:

D: 8 December 2001; 20 years ago

Go: November 10, 2009; 12 years ago

Rust: July 7, 2010; 12 years ago

TypeScript: 1 October 2012; 10 years ago

Zig: 8 February 2016; 6 years ago

The only one of these which isn't at least twice as old as Zig is TypeScript, which has the might of Microsoft behind it, and is based on a well understood, pre-existing language.

This is not a fair comparison.

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

#116

Earlier quoted context omitted.

Zig is not the first new language I try. I was an excited early adopted of a lot of many languages including D, Go, Rust and TypeScript. At no point to I remember running into miscompilations on rather fundamental issues and so quickly. So I do think this is quite out of the ordinary.

Consulting Wikipedia's "first appeared" field for each: D: 8 December 2001; 20 years ago Go: November 10, 2009; 12 years ago Rust: July 7, 2010; 12 years ago TypeScript: 1 October 2012; 10 years ago Zig: 8 February 2016; 6 years ago The only one of these which isn't at least twice as old as Zig is TypeScript, which has the might of Microsoft behind it, and is based on a well understood, pre-existing language. This is…

The more reasonable interpretation (backed up by his other posts on this article and his use of "was") is that he is comparing Zig as it stands today to D, Go, Rust, and TypeScript when they were similarly new.

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

#118
post #3

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.

If bugs are your concern, then this upcoming release is good news for you. Total number of open bug reports is 1,124. However if we remove bugs labeled "stage1" - that is - bugs that are no longer applicable because this release changes the default compiler to the self-hosted one - then the number drops to 514. It would be a fair characterization to say that this release cuts the number of known bugs in half. We have…

> 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)

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

#119
> What’s interesting about this [C] backend is that it will play a role in our plan to replace the old bootstrap compiler implementation

That's super neat. I'm guessing the plan is to generate stage1 during CI or something with this backend?

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

#120

Earlier quoted context omitted.

If bugs are your concern, then this upcoming release is good news for you. Total number of open bug reports is 1,124. However if we remove bugs labeled "stage1" - that is - bugs that are no longer applicable because this release changes the default compiler to the self-hosted one - then the number drops to 514. It would be a fair characterization to say that this release cuts the number of known bugs in half. We have…

> 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

Post reply on HN