Zig 0.7.0 tagged
ziglang.org
ziglang.org
Zig infers whether a function is async, and allows async/await on non-async functions, which means that Zig libraries are agnostic of blocking vs async I/O. Zig avoids function colors."
Nice! I had the impression that Zig wasn't so simple as I've imagined it due to features like this, but this actually sounds like a lot of thought was put into this to adhere to Zig's principles. Looks cool!
Edit: it's over now. I'm still working on the tarballs and release notes.
> This guide assumes you’re using a master build of Zig as opposed to the latest major release, which means downloading a binary from the site or compiling from source; the version of Zig in your package manager is likely outdated. This guide does not support the 0.7 build of Zig.
[1] https://buttondown.email/ZigSHOWTIME/archive/e83ee9c5-53e0-4...
Jonathan Blow is a very smart individual, in a sense that goes way past his programming ability (as exemplified by the fact that 2 out of the 3 talks of his that I link to in the newsletter are not about programming), that said he has approached the development of Jai in a diametrically opposite way compared to what Zig is doing.
We have a full-fledged OSS project with contributors, PRs, etc; while JB, while IIRC he plans to open-source the code eventually, does development in private and even got to the point of refusing to showcase new features he's adding because he doesn't want other projects to copy him.
Clearly there is a philosophical disagreement there between Zig and Jai, but, as I said earlier, I really think Jai is a valid project and as such I'm not dismissive of those disagreements.
On our side of the argument we have a constantly increasing number of contributors, so the point I was making in the newsletter is that it really means something, because, at least according to my perception from watching JB's streams, we're moving at a faster speed.
I've personally learned a lot watching Casey and John stream themselves coding (Casey also started a youtube channel on legal cases, which is another very interesting watch), but they're not perfect and in the specific case of developing in the open vs developing in a cave, I think I have a priviledged PoV where I can raise valid criticism.
Does everything we write on the internet have to be investor-friendly? Fuck I hope not.
> Does everything we write on the internet have to be investor-friendly? Fuck I hope not.
I don't see it at all reflective about "investor-friendly" but more the existing community around the language. It's great that zig's is active, but if some of the major community members spend seemingly equal/the majorityu of something like a newsletter about a fairly big development release being incredibly negative toward another project while pretending to be respectful, eh.
I'm not saying you have to cater to me, since I'm a nobody, but this and a few other things about the zig community have made me less interested in spending my limited free time playing with it.
So you don't refute any of my points about the available information on Jai, but you instead dismiss my entire argument a priori, classifying it as a farce. Ok.
I personally really enjoy Rust's commitment to safety and I do find that the difficulty of writing Rust code that will pass the borrow checker and its stricter type system is well worth it but I know that some people find it frustrating and not very pragmatic. If you fall in this camp then Zig might well be worth a try.
Basically coming from C if you think that Rust goes too far, try Zig. If you think that Zig doesn't go far enough, try Rust.
You can call C code from Rust as well but it's not as tightly integrated into the language (and probably can't be, since C code is inherently unsafe).
They are both low-level compared to Python but fill different niches.
In what way? Nim gives full access to hardware, memory management & co, but the expressiveness is very similar to Python.
Whoa, whoa, whoa. UB on unsigned!? Best of luck.
So, to be safe people should build both Debug and Release?
It is also possible to selectively disable/enable safety for individual code blocks.
Worth noting that UB is also checked in ReleaseSafe mode. Related issue: https://github.com/ziglang/zig/issues/2301
A point: Benchmarks produce metrics measured in seconds. Bugs don't produce metrics you can measure but the costs are unbounded.
Aren't you contradicting yourself here?
And I do think that some UB optimizations make a lot of sense. Actually if you look at the way Rust does it, it gets rid of many UBs not by adding checks for them but by explicitly forbidding the UB condition to occur in safe code (therefore "optimizing on UB" by enforcing that the UB condition cannot happen in correct code, not by adding checks for it and slowing things down). That's why for instance pointer arithmetic is unsafe in Rust, since arbitrary pointer offsets can lead to UB.
Although I agree that there are a few C UBs that I think ought to be relaxed because they don't make a lot of sense for modern architectures though (signed overflow being the main one).
Bringing up signed overflow. I did some tests once flipping back and forth between using a int and an unsigned int and wasn't impressed with the speed up. I've also done tests with aligned and an packed data structures and on a modern processor, also not impressed.
I don't think it's a contradiction. I think what's being said is that it's the wrong default, i.e. the special different-looking operators should be the ones with UB, not the obvious "normal"-looking ones.