News for hackers. Stuff that matters.
Re:Zig 0.13.0 Release Notes by fwsgonzo on Friday June 07, 2024 @03:52AM (#40606298)
As usual the HTTP client example is broken again: https://github.com/fwsGonzo/libriscv/blob/master/binaries/zi...
Re:Zig 0.13.0 Release Notes by ladyanita22 on Friday June 07, 2024 @07:35AM (#40607606)
Many 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).
Re:Zig 0.13.0 Release Notes by steeve on Friday June 07, 2024 @08:10AM (#40607888)
Can 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.

Re:Zig 0.13.0 Release Notes by ladyanita22 on Saturday June 08, 2024 @03:21PM (#40619650)
Soon I'll write something and publish it.
Re:Zig 0.13.0 Release Notes by mikemitchelldev on Friday June 07, 2024 @07:55AM (#40607752)
Have you published these benchmarks?
Re:Zig 0.13.0 Release Notes by ladyanita22 on Saturday June 08, 2024 @03:22PM (#40619656)
Not yet, but I'll soon
Re:Zig 0.13.0 Release Notes by __s on Friday June 07, 2024 @10:51AM (#40609295)
What's compiling C++? Having faster compilers available is nice, but comparing same llvm version would be interesting
Re:Zig 0.13.0 Release Notes by ladyanita22 on Saturday June 08, 2024 @03:22PM (#40619655)
I'll write something an post it here in HN
Re:Zig 0.13.0 Release Notes by steeve on Friday June 07, 2024 @08:05AM (#40607846)
I mean it’s a random repo, what do you expect from the Zig authors?
Re:Zig 0.13.0 Release Notes by fwsgonzo on Friday June 07, 2024 @09:32AM (#40608543)
I 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?
Re:Zig 0.13.0 Release Notes by AndyKelley on Friday June 07, 2024 @01:20PM (#40610724)
0.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#Rewor...

Re:Zig 0.13.0 Release Notes by fwsgonzo on Friday June 07, 2024 @03:35PM (#40612120)
Thank you! That explains it. I must have made the example for 0.11!
Re:Zig 0.13.0 Release Notes by marler8997 on Friday June 07, 2024 @06:32PM (#40613643)
Re:Zig 0.13.0 Release Notes by rofrol on Friday June 07, 2024 @02:32PM (#40611511)
Re:Zig 0.13.0 Release Notes by sph on Friday June 07, 2024 @05:58PM (#40613405)
Will Github ever fix their Zig syntax highlighting so it's not all brown text by default?
Re:Zig 0.13.0 Release Notes by tiffanyh on Friday June 07, 2024 @02:11PM (#40611282)
I 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/

Re:Zig 0.13.0 Release Notes by heldrida on Friday June 07, 2024 @04:28PM (#40612642)
Good news! If all goes well, seems that 0.14.0 will bring async/await https://github.com/ziglang/zig/issues/6025
Re:Zig 0.13.0 Release Notes by sph on Friday June 07, 2024 @05:56PM (#40613396)
Here 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.

Re:Zig 0.13.0 Release Notes by qwelias on Friday June 07, 2024 @06:58PM (#40613787)
From what we know their async/await should be noticeably distinct from the usual, otherwise the previous revert was for nothing.
Re:Zig 0.13.0 Release Notes by ksec on Sunday June 09, 2024 @11:51PM (#40629967)
I 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.
Re:Zig 0.13.0 Release Notes by kristoff_it on Monday June 10, 2024 @09:27AM (#40633436)
Zig 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.

Re:Zig 0.13.0 Release Notes by esoteric_wombat on Friday June 07, 2024 @10:38PM (#40614868)
Unfortunately I think this is not the case -- it might just be that the async/await issue is getting pushed into the next milestone tag with each release. In the most recent roadmap video[1] Andrew said that the main focus right now is compilation speed, and that async/await specifically was going to take a long time. My memory is that he says something about how it doesn't work well with LLVM and is generally a hard problem that they would prefer to do correctly instead of quickly.

[1]: https://www.youtube.com/watch?v=5eL_LcxwwHg

Re:Zig 0.13.0 Release Notes by heldrida on Saturday June 08, 2024 @05:03AM (#40616290)
You are absolutely right, he did indeed share those thoughts. I do remember now! Thanks