GitHub seems to be the worst of both worlds - partially rendered on the server, but then the frontend inexplicably pulls in additional data like... commit messages??
It's a double hit of latency, and for bonus points, the commit messages won't load at all if your browser is slightly out of date
Android already has this strict oversight, in theory, in the form of the Play Store. And yet.
Personally I feel much more safe and secure downloading a random app from F-Droid, than I do from Google, whose supposed watchful eyes have allowed genuine malware to be distributed unimpeded.
Most of Zig's safety, or lack thereof, seems inherent to allowing manual memory management, and at least comparable to its "C replacement" peers (Odin, C3, etc).
I guess formal verification tools? That is the peak that even rust is trying to reach with creusot and friends. Ada has support for it using Spark subset [which can use why3 or have you write the proofs in coq]
Frama-C exists for C.
Astree exists for C++ but i dont think lone developers can access it. But it is used in Boeing.
Package management in Zig is more manual than Rust, involving fetching the package URL using the CLI, then importing the module in your build script. This has its upsides - you can depend on arbitrary archives, so lots of Zig packages of C libraries are just a build script with a dependency on a unmodified tarball release. But obviously it's a little trickier for beginners.
Zig makes it really easy to use C packages directly like this, though Zig's types are much more strict so you'll inevitably be doing a lot of casting when interacting with the API
It's also worth pointing out that the Zig std library covers a lot more than the rust one. No need for things like rustix, rand, hashbrown, and a few others I always have to add whenever I do rust stuff.
Can’t speak for the op but there’s a number of high performance interfaces that avoid redundant computations that are only available directly from hashbrown.
Yes that’s exactly it. If speed is a priority and the input is trusted, change the hasher to something faster like ahash. The ahash crate makes this easy.
const now = ctx.flag("now", bool); // type-safe flag access
This is type-safe, but only at run time. Since your flags are (or could be) known at compile time, it would be nice to have this throw a compile error if the type is invalid.
Or even better - fully lean into comptime and generate a struct so you can use field access without specifying a type:
You don't even necessarily need bindings to use Raylib in Zig. It uses Zig's build system so you can just clone Raylib's repo, add a couple of lines to build.zig, and it's ready to go with autocompletion and everything.
Both Raylib and Zig include all dependencies too, so I was able to build a single 700kb .exe from Linux, copy that to my Windows machine, and it just worked immediately without any issues. Pretty amazing.
Would you have any tutorial on how to do this? I am unable to get zig .11 to work with the latest raylib without binding libs. I am not sure what all changes I need to make to build.zig
Thank you. It worked perfectly for me. I was doing most of these but I was messing up the include path. your code samples helped me fix the issues in my build file. Have a great day!
It's a double hit of latency, and for bonus points, the commit messages won't load at all if your browser is slightly out of date