News for hackers. Stuff that matters.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by Laremere on Tuesday July 30, 2024 @06:26AM (#41107716)
See these posts on the LLVM issue by Andrew. They clearly state that this functionality isn't going anywhere, just the method of achieving said functionality is changing:

https://github.com/ziglang/zig/issues/16270#issuecomment-161... https://github.com/ziglang/zig/issues/16270#issuecomment-161...

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by ajnin on Tuesday July 30, 2024 @10:18AM (#41109445)
Not involved with Zig at all, but this comment is a bit concerning :

> This is not the first controversial change I have made to the Zig project, and it won't be the last. I have a vision, and I know how to execute it. People are often surprised by what Zig has accomplished, and they wonder why other projects have not done what Zig does. Well, you are seeing the magic right now. I ignore the peanut gallery and do what I know is right, while taking care of my users' needs at the same time. If you don't understand now, you will understand once this plan unfolds. By that time it will seem obvious in hindsight.

He's probably brillant and all but this ... feels like hubris.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by eyelidlessness on Tuesday July 30, 2024 @11:41AM (#41110268)
I simultaneously understand why that comment gives you pause, and find comfort in seeing such a clear expression of vision.

As someone who often thinks several steps ahead about where I want to take a project, I find it’s just as often difficult to communicate that vision at the level of detail necessary to establish a shared understanding of what those steps mean, and how various apparent minutiae come together to make them all valuable together.

I would be lying if I said I don’t wish I shared this particular hubris, and the corresponding expectation that execution will be sufficient to bolster any trust challenged along the way.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by acedTrex on Tuesday July 30, 2024 @10:35AM (#41109580)
Wow, that actually makes me want to look into zig a lot more. so many projects, rust included, get bogged down in design by committee and half baked decisions that please no one.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by bunderbunder on Tuesday July 30, 2024 @11:13AM (#41109937)
Agreed. Andrew Kelley's ability to have, communicate and maintain a clear and consistent vision is one of the most refreshing things about Zig. I don't actually use it, but this might actually be the main thing attracting me to it.

Plenty has already been said about design-by-committee and relying overmuch on user feedback, but one thing that doesn't get mentioned as often is that this approach tends to transform additive bias[1] from a cognitive bias into an iron law. Once you let that happen, you're on a relatively short and slippery slope to having a kitchen sink language. And one refreshing thing about Zig is that's it's clearly working very hard at not becoming a kitchen sink language. I'm not sure I can say the same about most other newer systems programming languages.

That doesn't mean having a BDFL is all kittens and rainbows, and I'm sure Andrew has made plenty of mistakes. But I've also never seen any indication that he's acted out of anything other than good faith. That last paragraph is possibly the closest I've ever seen to him saying something arrogant, and I see it as the exception that proves the rule. Finding such a tactful way to remind people that this is a BDFL project and he's the BDFL could not have been easy, and I imagine he put a lot of care into crafting that paragraph.

1: https://www.scientificamerican.com/article/our-brain-typical...

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by nkozyra on Tuesday July 30, 2024 @02:55PM (#41112851)
I agree that letting the community completely dictate direction is a bad idea, but so too is being so dogmatic and idealist that you ignore the feedback.

Rust definitely swayed more to the former than I'd have liked, but you also have Go as a counterexample where generics were dismissed for a decade+ in response to user feedback and then kind of :shrug: ok fine we'll add generics.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by BiteCode_dev on Tuesday July 30, 2024 @10:28AM (#41109528)
Or very high confidence backed up by experience and skill, expressed through an honest personality.

In a world of humble bragging and cheap talk, I find it refreshing.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by JasonSage on Tuesday July 30, 2024 @10:24AM (#41109500)
Reading that comment for the first time just now, and I love that. More power to them.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by carapace on Tuesday July 30, 2024 @10:34AM (#41109569)
Don Quixote or St. George? Only time will tell. Meanwhile the code works.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by jay-barronville on Tuesday July 30, 2024 @01:38PM (#41111949)
> He's probably brillant and all but this ... feels like hubris.

I don’t think it’s hubris, because Andrew’s results speak for him, but it’s certainly alienating, to be honest.

Although I understand the struggle of having to prioritize opinions and perspectives, it comes across like Andrew only values the opinions and perspectives of very specific folks, whom he often calls out.

Here’s what I mean: I love Zig and I write a lot of Zig code, especially within the past year (almost daily), but none of the Zig code I’ve been working on is publicly available or open-source (although I hope I can open-source various components soon, fingers crossed). I’ve gained a lot of valuable experience with Zig—including successfully convincing folks (mainly C programmers) to use it who wouldn’t have tried it otherwise. When I read these interactions, even though I have thoughts I’d like to share as a committed user who wants to see the project succeed and gain mainstream adoption, I get the feeling that my thoughts aren’t welcome since I don’t have a huge Zig project or something, so I just keep my thoughts to myself. Andrew seems to mostly care about feedback from the creators of Bun, TigerBeetle, etc., which, if I’m correct, is fine (it’s his project and therefore his right), but I imagine there are plenty of users like me who aren’t just part of “the peanut gallery” yet staying out of it to avoid the drama.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by dangets on Tuesday July 30, 2024 @02:38PM (#41112669)
This type of stance is what de-popularized the Elm language.

Don't get me wrong - I wish the best for both languages and am thoroughly impressed by the work of their creators. I can see that it must be a hard thing to balance.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by kasajian on Tuesday July 30, 2024 @11:05AM (#41109866)
Sounds like damage control. I have to say, for a brilliant guy, andrewrk knows nothing about marketing. The fact that the Zig project can make this significant of a change to their core-value because "trust me i know what I'm doing", makes it impossible (for now) to rely on this in any type of a widely-deployed Enterprise setting. This just made the highly risky move of moving to Zig make it darn near impossible.

What he should have done is announce a project at the same time that will maintain the current developer experience, even if that project is not part of the zig foundation. The developer doesn't care about how he builds zig. They want 1) download 2) use. It doesn't matter from where. If today it's directly from zig, and tomorrow it's from elsewhere to download a combined package, that 's all the devs needed to hear.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by flohofwoe on Tuesday July 30, 2024 @11:31AM (#41110137)
Unfortunately there's a lot of people on the internet who haven't even used Zig nor plan to use it anytime in the future and who just enjoy to create drama by amplifying any decision with a hint of controversy around it (also see the 'unused variables are errors' drama which turned out to be a non-issue after it was actually implemented).

Unrelated to Zig, it's the exact same thing with "WASM can't access the DOM" btw, comes up everytime when WASM is in the news, but is a complete non-issue in practice for anybody actually using WASM, and I'm sure each popular software project has at least one such 'drama issues'.

The 'LLVM divorce' has been announced waaaay ahead (maybe years) of any actual steps to make that happen, for a language ecosystem that's still unstable anyway, and with the promise that a solution will be in place before LLVM is actually kicked out.

Not sure what else could have been done better, and as other have said, this sort of decision making process is much preferable to a committee approach.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by kasajian on Tuesday July 30, 2024 @12:13PM (#41110737)
The fact that WASM requires a JS is a marketing fail and misses what could have been a marketing opportunity to make the claim, "finally an alternative to JavaScript".

In this case, this is not a non-issue. If you look at the original github issue, it does a lot of damage, followed by a lot of confusion, followed by a damage-control post that shouldn't have been required if it the original issue was written with more care. It wasn't, because the marketing aspect of Zig was not the focus -- the technical issue was. So it blew up. Hopefully it'll be a lesson learned, but I suspect it isn't. It will take 20 more of such incidents before it sinks in.

As far as it was "announced years ago", I don't see how that matters. The people who are seeing the issue now, and this discussion weren't there to see the announcement years ago.

But I do understand what you're saying. You're point is that the onus is on the the reader to the do their research before overreacting. That's a perfectly fine position. I have a counter opinion which is that the person making the statement / claim / annoucement, simply be understanding of the implication of their statements.

This thing blowing up should not have been a surprise to anyone. Sounds like it would have been to you, so the fact that it blew up is evidence that you would have misjudged. Unless you also agree that the initial message should could have been better worded, in which case, what exactly are you disagreeing with?

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by jeltz on Tuesday July 30, 2024 @12:06PM (#41110633)
The LLVM divorce has also gotten criticism since it first was announced and we have so far not seen any complete solution. Maybe we will land in one but if people did not voice their concerns there is no reason to think such a solution would be found.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by throwawaymaths on Tuesday July 30, 2024 @12:31PM (#41111012)
What is there to criticize though? What "solution" is necessary?

LLVM is not and was never going away as a compiler backend, it will just not be the default one and you will be able to compile zig without it (though in practice everyone will for prod releases)

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by throwawaymaths on Tuesday July 30, 2024 @12:29PM (#41110991)
You have to admit that "divorce" was not really a good metaphor, though it did get eyes on the drama.
Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by throwawaymaths on Tuesday July 30, 2024 @11:22AM (#41110037)
Wait what is controversial here? Removing llvm as a dependency and making it a (probably default available) plugin instead? Seems "obviously good", if you ask me.

Weird machinations around projects that are and aren't (but are privileged because he's the creator) part of the zig foundation would be more concerning, quite frankly.

Re:C Macro Reflection in Zig – Zig Has Better C Interop Than... by pharrington on Tuesday July 30, 2024 @02:10PM (#41112307)
Zig's not at version 1.0.0 yet. Yes, it would be very irresponsible to use current-day Zig in a widely-deployed Enterprise setting. The release notes explicitly acknowledge Zig is currently immature, and is currently only suited to people willing to participate in the language development process.