Hacker Newsnew | past | comments | ask | show | jobs | submit | peesem's commentslogin

zig does not allow arrays in packed structs/unions specifically for endianness reasons (there may be other reasons as well but endianness is what i know of)

Ah, that is useful to know. Is that documented somewhere? From what I can quickly find in the obvious place [0], the only requirement is that "all fields in a packed union must have the same @bitSizeOf" and [2]u8 does satisfy that requirement.

[0] https://ziglang.org/documentation/0.16.0/#packed-union


no, but the documentation for packed structs gives the list of allowed field types. it's also not documented that packed union fields must be valid packed struct fields but people may be able to assume that

edit: also, this is a relevant issue: https://github.com/ziglang/zig/issues/12547


all fields are public. declarations are private to the file they're in by default and then public if you choose to make them public

I guess I should have been more specific. I'm not a fan of fields all being public

the triple slash is only for doc comments, not normal code comments - those are still double slashes. also, why would you want to grep for escaped backslashes?

how would you suggest we compile literally anything?

it's unclear to me whether they were actually told to lie or just told to survive / convince others. either way it is somewhat coerced but i think there is still a difference


The optimal/selfish strategy is indeed to lie, but they're never pushed in that direction. Some AIs decide to reveal the information, some decide to say nothing, some actively lie and push others to their death...


if everything really was free then the textbook writers wouldn't need compensation since everything would be free for them too


the web says Microsoft's Azure Linux is Fedora-based? or are you talking about something else


the maintainers seem happy, especially now that CI is actually working how it's supposed to. but a non-rare complaint in the Zig discord is how slow Codeberg can be, and other things like the lack of codesearch hurt as well.


"technically" usually means something like "strictly", not "by a completely different metric". work takes time. zig has had a decade of work put into it.


Technically means according to a strict, often legal definition.

The strict definition being we don't count developments that happened before version 1.

Like when we talk about Rust, we don't mention the virtual threads or GC or the @ symbol for GC references. Even though those all happened during its development.


and when people talk about zig, they don't usually mention that zig used to have goto, casting syntax like `T(val)`, a rule that said you couldn't pass containers by value, language-level async, some truly awful syntax for what is now `try` and other operators, etc. both languages took time and work to realize that these features were not for them. very strange to deny that.

also, nitpick: they said zig has been around for ten years. this is, strictly, correct. the zig project has existed for ten years, just like how rust has existed for about 20, now. a project still exists if it is pre-1.0. nobody was talking about versions before you.


mainly because this build system change, along with upgrading to LLVM 22, are the only major changes for 0.17.0: https://ziglang.org/download/0.16.0/release-notes.html#Roadm...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: