Live data from Hacker News

File for divorce from LLVM

github.com

151–160 of 167 posts

Re: File for divorce from LLVM

#151

Earlier quoted context omitted.

> now that it's declared as a goal No. It's an unaccepted proposal.

By the creator and benevolent dictator of the Zig language. I think it's same to assume it's an official goal, now.

Here’s a list of rejected proposals made by the BDFL:

https://github.com/ziglang/zig/issues?q=is%3Aissue+label%3Ap...

Re: File for divorce from LLVM

#152

Earlier quoted context omitted.

By the creator and benevolent dictator of the Zig language. I think it's same to assume it's an official goal, now.

Here’s a list of rejected proposals made by the BDFL: https://github.com/ziglang/zig/issues?q=is%3Aissue+label%3Ap...

And most of those were rejected without all that much pushback, as opposed to this one where there's about 100 comments already.

Re: File for divorce from LLVM

#153

Earlier quoted context omitted.

I think this blog post addresses the bootstrapping issue: https://ziglang.org/news/goodbye-cpp/

Suppose you are implementing a new feature, how do you test it? First you compile the bootstrapping compiler. Then you use the bootstrapping compiler to compile an unoptimized optimizing compiler. Then you use the optimizing compiler to compile an optimized optimizing compiler. If the compiler doesn't rely on llvm then there will be more code to compile which will make this procedure slower. Especially since the boot…

No. Bootstrap is involved only if you are making a breaking change. For normal development, this doesn't change anything.

Re: File for divorce from LLVM

#154

One of the its biggest features is that the Zig toolchain is vastly superior to any other and opens up new possibilities to Devs of C/C++/Obj-C. One of its biggest selling points is to be able to use build.zig inside of projects with a C/C++/Obj-C codebase and thus get around using a shit ton of build tools. If zig cc and zig c++ die I would instantly stop using the language!

(Rust user here, but admirer from afar of Zig and the principles it seems rooted in.) My peanut gallery observation is that a very bright person named Andrew set out on a journey of hard work to come up with a new language. Along the way he (and others) solved many tough ancillary problems related to the toolchain of this new language and how it should provide a useful path for interoperability and migration from cod…

The net result might be a split into zig-cc and zig-lang.

I think the disappointment might come with the ratio who choose zig-cc.

Re: File for divorce from LLVM

#155

Some of this reasoning is just wild. 1. "We can attract direct contributions from Intel, ARM, RISC-V chip manufacturers, etc., who have a vested interest in making our machine code better on their CPUs." They are nowhere near popular enough (or used enough by some particularly important customer) for any major architecture vendor to spend any time contributing except as someone's random side project. To think otherwi…

My impression is that LLVM spends the bulk of its time chasing pointers, so one could fix the issue by "only" changing the layout of the data to one that is friendlier to computers.

downvoters are of course free to post perf traces demonstrating that LLVM retires many instructions per cycle :)

Re: File for divorce from LLVM

#156
post #91

Earlier quoted context omitted.

Can Swift really be called a success when it's only being used in the very narrow niche (the Apple software ecosystem - and only because it's essentially dicated by the platform owner)?

Yes, that is how languages become a success on the market, either being pushed by the platform owner no matter what, or by having a framework written in them that everyone feels like using. Everything else are aspiring extras in the cinema of programing languages, waiting on the sidelines for that major role that will come someday, it really will, one just has to believe enough.

Counterexample: python

Re: File for divorce from LLVM

#157
post #90

Two issues here. The first is code generation and the other is bootstrapping. Ime, the optimizing passes of a compiler are easy and fun to write. You have to read research papers to understand how register allocation and ssa form works, but it's fun code to write. You just send the ir through various optimizing passes, each refining it in some way. You can write high-quality optimization passes without llvm. But then…

Zig already bootstraps from its C backend, so the second issue is not a problem.

Wasm, I believe.

Re: File for divorce from LLVM

#158

I think they should keep LLVM as a fallback or as an optimizing backend. This part is pretty solid, even if all the dependencies is hard to deal with, I am not convinced that building your own would lead to better results. The most annoying part is the slow compilation in non-release, this can be fixed more easily with support for a minimal number of targets.

I don't think the proposal says that llvm will be dropped as an optimising backend. It also doesn't say that you can't call clang at compile time using some other mechanism. It just says the zig compiler will not depend on llvm.

Re: File for divorce from LLVM

#159

Earlier quoted context omitted.

Suppose you are implementing a new feature, how do you test it? First you compile the bootstrapping compiler. Then you use the bootstrapping compiler to compile an unoptimized optimizing compiler. Then you use the optimizing compiler to compile an optimized optimizing compiler. If the compiler doesn't rely on llvm then there will be more code to compile which will make this procedure slower. Especially since the boot…

No. Bootstrap is involved only if you are making a breaking change. For normal development, this doesn't change anything.

Any change to the compiler can break or cause unintended side-effects to bootstrap. For example, adding an import to a module in the compiler might break bootstrap if the imported module uses syntactic constructs the bootstrap compiler doesn't support. The problems are often very subtle.

Re: File for divorce from LLVM

#160
post #118

Earlier quoted context omitted.

Apple’s entire ecosystem is based on clang. How does that mean they dropped LLVM? They’re one of the primary maintainers.

For WebKit.

Ah of course. Sorry the thread was long and winding so I didn’t realize that’s the part you were referring to.

For reference to anyone else, this is what they’re referring to

https://webkit.org/blog/5852/introducing-the-b3-jit-compiler...

Post reply on HN