5 ms·
Zig 0.13.0 Release Notes
- fwsgonzo 2y agoAs usual the HTTP client example is broken again: https://github.com/fwsGonzo/libriscv/blob/master/binaries/zig/http.zig https://github.com/fwsGonzo/libriscv/blob/master/binaries/zi...
- ladyanita22 2y agoMany examples out there are broken. As a sidenote, I've been benchmarking Zig, Rust and C++ with a fibonacci benchmark and the results basically show that C++ is the fastest, but within a 3% margin of error against Rust and Zig, which are mostly similar (Rust so ever slightly faster).
- mikemitchelldev 2y agoHave you published these benchmarks?
- ladyanita22 2y agoNot yet, but I'll soon
- steeve 2y agoCan you please share the code? On my tests late last year it was basically Zig, C++, Rust. Sorry I don’t have the code anymore.
- ladyanita22 2y agoSoon I'll write something and publish it.
- __s 2y agoWhat's compiling C++? Having faster compilers available is nice, but comparing same llvm version would be interesting
- ladyanita22 2y agoI'll write something an post it here in HN
- steeve 2y agoI mean it’s a random repo, what do you expect from the Zig authors?
- fwsgonzo 2y agoI used the "official" example. It's OK that things break - just that I can't figure out how to update my previously working code. So, I'm wondering - where is the updated official example of using the HTTP client?
- AndyKelley 2y ago0.13.0 did not make any breaking changes to the std.http APIs. Upgrade guide is in the 0.12.0 release notes: https://ziglang.org/download/0.12.0/release-notes.html#Reworked-HTTP https://ziglang.org/download/0.12.0/release-notes.html#Rewor...
- fwsgonzo 2y agoThank you! That explains it. I must have made the example for 0.11!
- marler8997 2y agoHere's an example: https://github.com/marler8997/zigup/blob/4d25c7e387a996c6b83a5b5fd98a2a6622557577/zigup.zig#L55 https://github.com/marler8997/zigup/blob/4d25c7e387a996c6b83...
- rofrol 2y agohttps://github.com/zigcc/zig-cookbook/blob/main/src/05-01.zig https://github.com/zigcc/zig-cookbook/blob/main/src/05-01.zi...
- sph 2y agoWill Github ever fix their Zig syntax highlighting so it's not all brown text by default?
- deleted 2y ago[deleted]
- tiffanyh 2y agoI really appreciate the time, effort and detail of the release notes. That's super rare these days and takes considerable effort and discipline to perform. It's also indicative of a well run project. Please consider donating: https://ziglang.org/zsf/ https://ziglang.org/zsf/
- punkbit 2y agoGood news! If all goes well, seems that 0.14.0 will bring async/await https://github.com/ziglang/zig/issues/6025 https://github.com/ziglang/zig/issues/6025
- sph 2y agoHere too? Never mind function colouring, async/await itself is a feature that infects entire languages. Such a terrible abstraction of concurrency for our 1970-style languages. Zig doesn't have strings because they're too high level, but async/await is fine.
- qwelias 2y agoFrom what we know their async/await should be noticeably distinct from the usual, otherwise the previous revert was for nothing.
- ksec 2y agoI still can't find a decent explanation as to why zig, a C replacement needs to have Async built in by default. I actually think this should belong to a higher level abstraction.
- kristoff_it 2y agoZig doesn't have to have it, but in Zig's specific case it can offer a surprisingly innovative implementation of it. The grandparent post mentioned how async/await infects languages (it does) and Zig is in a unique position where this would be not as true. Note that async/await has to gain a lot by being "built in" as opposed to a pure userland thing, as it basically is used to rewrite function bodies and mess with calling conventions. As for the correct level of abstraction of async/await I believe that it's actually a very low-level primitive that should only be offered in low-level languages as it's very footgunny to use in high-level languages and generally worse than actors/csp.
- esoteric_wombat 2y ago