Live data from Hacker News

File for divorce from LLVM

github.com

41–50 of 167 posts

Re: File for divorce from LLVM

#41
post #34

Earlier quoted context omitted.

I see your comment is getting downvotes, but that's probably because people didn't get the joke. In addition to being the name of the programming language, Zig is a character in the old Namco 'Zero Wing' game, which is where the meme "All your base are belong to us" comes from [1]. "For great justice" is part of the same meme. [1] https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us

I did not get this, and appreciate you providing the context

It does require a bit of a PhD on gaming and Internet history.

Re: File for divorce from LLVM

#42

So I spent ~4 years writing all my embedded projects (and libraries) in Zig and now several "tier 1" supported arches are just going to be dropped? It's your language so do whatever you want but please adjust the branding accordingly...

Are they being dropped?

Im guessing you'll have two categories of tier 1 support: - Built-in tier 1 support. - Tier 1 support through the optional LLVM backend.

If they already have tier 1 support for an architecture, I don't see why they'd loose that support when they make the LLVM backend an optional dependency?

And as Andrew writes in the proposal, this way might provide a path for better support for more obscure architectures. I would happily work on a backend for Zig for some interesting processor architecture. No way I will ever contribute to LLVM. Working with C++ in not something I'll ever do to fun

Re: File for divorce from LLVM

#43

With the amount Zig promoted being able to use it to compile c (and maybe c++ I forget) only to decide no LLVM at all seems wild. Without a LOT more people chipping in to support the odds of even coming close to the platform support of LLVM seems incredibly unlikely as well. I would understand planning to add another backend of their own for those who want that, but just getting rid of LLVM seems... rash?

>and maybe c++ I forget

I use Zig as a C++ compiler on my Rust project since it was the least painful way to do cross-compilation in GitHub Actions.

Re: File for divorce from LLVM

#44

With the amount Zig promoted being able to use it to compile c (and maybe c++ I forget) only to decide no LLVM at all seems wild. Without a LOT more people chipping in to support the odds of even coming close to the platform support of LLVM seems incredibly unlikely as well. I would understand planning to add another backend of their own for those who want that, but just getting rid of LLVM seems... rash?

This was exactly my take on it.

I'd recently been reading a bit more about zig, and even tried out using it as an easy way to compile c++ with llvm without having to fuss with system packages -- transitioning from c/c++ to zig was a major selling point

It just seems really abrupt, certainly unexpected. I'm not saying it's the right/wrong thing for the project -- just really really out of left field from my point of view

Re: File for divorce from LLVM

#45
post #30
post #21

Earlier quoted context omitted.

Since you're already not even close to on-topic, I just want to say that people on the internet commenting about "how they misread the title" are some of the worst kind of comments. Titles could mean all kinds of various, new things if you substituted meaningful words for other meaningful words. Or in this case, acronyms hiding several words at a time. The final result of your comment is that apparently you're critiq…

I thought it was funny. They had an experience that amused them and they shared it. Not everything has to be to your personal tastes. If you think that's one of the worst kind of internet comments, you might want to recalibrate a bit. I have a variety of things from my anti-abuse work that I'd be happy to send you.

If you do anti-abuse work, maybe you're the one with a wonky calibration. No offense intended, I appreciate your work.

I live on an Internet where I mainly don't have to see any abuse, thanks to moderation and algorithms and probably good folks like yourself.

Anyway, I think you're missing my point. Look around, here in situ on HN, and compare it to even an average quality comment.

Re: File for divorce from LLVM

#46
One of the main reasons Zig was interesting to me was the fact that I could drop it in as an alternative to a C/C++ compiler. On Windows, my friends have mentioned how it is easier to install Zig as a C/C++ compiler than any other alternative.

If this proposal is accepted, I personally think Zig will drop to the popularity level of Hare or other extremely niche languages. Getting my colleagues to even try Zig out required me sending them articles about how Uber was using it in production. There is no way my colleagues would even have given it a second thought if it didn't have immediate value to their existing projects.

But I get where the proposal is coming from. LLVM compile times can seem awful, and there's lots of neat optimization tricks you could implement with your own byte code. And dealing with bugs in LLVM is basically a no-go, I've seen this happen in the Julia ecosystem as well.

If my recommendations are worth anything, I think Zig should

1. Use a custom bytecode for debug builds - fast build times, fast debug times etc 2. Use LLVM for release builds - fast runtime performance, slow release performance

If they can manage 1.) while still maintaining support for cross compiling C/C++ (just pass that part off to LLVM?) I think that might be the best of all worlds, with the tradeoff that there's additional backend code to maintain.

Re: File for divorce from LLVM

#47
post #4

The correct time to build something without LLVM was years ago, but taking the C++ functionality out now will probably be the end of Zig. I'm surprised they didn't announce a plan to write their own C++ compiler in Zig instead of phasing it out.

Just writing a parser for C++ is a gargantuan project. I'm not even sure if an individual can write a C++ compiler if they started on their 18th birthday. There may not be enough hours left in their life to write a functioning compiler.

I forget, but what was that C++ parser test suite that almost no compiler passed?

I bet you'll solve P=NP before finishing that C++ parser.

Re: File for divorce from LLVM

#48

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…

I agree that it's probably impossible to write something that is orders of magnitude faster than LLVM and better than LLVM at optimizing, but I don't see that claim in the original text.

It seems like a lot of work but also doable to create something that is orders of magnitude faster than LLVM for unoptimized debug builds. Furthermore, the Zig compiler might be an easier thing to work with than LLVM/Clang for doing productionizing of optimization research.

Re: File for divorce from LLVM

#49
Zig wants to be the world new C not so much the worlds new C++. You’ll note that C cross compilation would still be supported under this proposal.

I think this might be the right choice. C is currently used heavily in the embedded world, and that’s a space where llvm is not good. If I was Zig, I’d want to be able to target all the microcontrollers and this is the only real way to achieve that.

Re: File for divorce from LLVM

#50
post #15

This move... is it for great justice?

I see your comment is getting downvotes, but that's probably because people didn't get the joke. In addition to being the name of the programming language, Zig is a character in the old Namco 'Zero Wing' game, which is where the meme "All your base are belong to us" comes from [1]. "For great justice" is part of the same meme. [1] https://en.wikipedia.org/wiki/All_your_base_are_belong_to_us

Andrew Kelley even referenced this in the proposal:

> In exchange, Zig gains these benefits:

> - All our bugs are belong to us.

> - …

Post reply on HN