Earlier quoted context omitted.
And this attitude is why it's a serious issue in our industry. You clearly don't take security seriously, to the point that it's a laughing matter for you.
If you can't see why jailing people for writing JS is a comically absurd concept…
Zig 0.11
151–160 of 193 posts
Re: Zig 0.11
#152I wanted to try learning Zig, but found the resources to be incomplete and lacking in examples. Rust (or Go) in comparison has a plethora of online resources with great examples. I realize Zig is just 0.11, but wondering what resources people relied on to pick it up?
Re: Zig 0.11
#153Earlier quoted context omitted.
The point was typical, typical Rust code is using Vec , typical Zig code is using arenas. Typical Rust code is using smart pointers, typical Zig/C code prefers plain, copyable structs. It is 100% possible to use such style in Rust/C++ (and then the performance will be same or maybe even in favor of rust, it might be the case) but people usually do not do that.
It shouldn't be hard to make Zig go to top place then, which is great opportunity to shine, given that they are still missing Zig entries, https://benchmarksgame-team.pages.debian.net/benchmarksgame/... https://www.techempower.com/benchmarks/
For example in this case Zig won big time over what C/C++/Rust people submitted: https://youtu.be/pSvSXBorw4A?t=1075
Zig is in the same ballpark as the ones mentioned above, so flohofwoe is right. But nevertheless I do think that cztomsik's point also still stands: how hard it is to make something fast will end up impacting the performance characteristics of the average program and library out there, and Zig does make it easier to write performant code than some other languages.
Which is basically what happened here: https://zackoverflow.dev/writing/unsafe-rust-vs-zig/
In truth the same applies to correctness, which is also a point that the blog post above touches upon.
Re: Zig 0.11
#154Earlier quoted context omitted.
I’ve been using the language reference [0] and also just browsing the standard library source code [1] for examples. [0]: https://ziglang.org/documentation/0.11.0/ [1]: https://github.com/ziglang/zig/tree/master/lib/std
That's important: don't be afraid to look into the stdlib source code when questions arise. It's easy to read and stuff is easy to find, and it's also a great teacher.
If it's layer upon layer of unscrutable abstractions, then you know there's a high chance your codebase will end up looking the same after a few years.
Re: Zig 0.11
#155Wow, those are really nice release notes.
(although I think we still managed to write up all of the most important bits)
Re: Zig 0.11
#156Wow, those are really nice release notes.
I wrote a good chunk of these notes and can tell you that these are probably the least detailed/useful we've ever done, because they were only about 40% completed when release day came, so we spent a few hours doing quick & sloppy improvements :P you can hopefully expect them to improve a bit over the next few days (although I think we still managed to write up all of the most important bits)
Re: Zig 0.11
#157What are the use cases for zig? The website says general purpose and tool chain but people who have used it, what it excels at?
Re: Zig 0.11
#158Zig is not memory safe and therefore at risk, just like C/C++, of future government legislation that outlaws the use of memory unsafe languages for some or all projects. The risk of such legislation is not insignificant: https://www.itpro.com/development/programming-languages/3694... Personally I do not see the point of building an entirely new language and ecosystem that does not fully address this issue.
Re: Zig 0.11
#159Earlier quoted context omitted.
“Linked lists are hard” is not “none of the common knowledge around traditional data-structures and algorithms work”.
I retort that almost all of the concurrent data structures are obnoxious to represent in Rust. A lock-free ConcurrentHashMap, for example, is by no means a straightforward data structure in a non-GC language. Even if you somehow dodge Rust's pedantry, you still have to figure out who owns what, who pays for what and when they pay for it--and there are multiple valid choices! Non-GC allocation/deallocation in concurre…
I think the obnoxious part in Rust is doing intrusive and shared mutability parts of data structures. Having to go between NonNulls, Options, Pin, and Cell/UnsafeCell is not a pleasant experience.
Re: Zig 0.11
#160Earlier quoted context omitted.
I thought Go tried to be better C
Why should there only be one "better C"? Go has a very different philosophy than Zig, but both can be considered a "better C".