Live data from Hacker News

Zig – io_uring and Grand Central Dispatch std.Io implementations landed

ziglang.org

101–110 of 315 posts

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#101
post #96

Earlier quoted context omitted.

> I take a 'living' language any day over of a language that's ossified because of strict backward compatibility requirements Maybe you would, but >95% of serious projects wouldn't. The typical lifetime of a codebase intended for a lasting application is over 15 or 20 years (in industrial control or aerospace, where low-level languages are commonly used, codebases typically last for over 30 years), and while such cha…

> The typical lifetime of a codebase intended for a lasting application is over 15 or 20 years (in industrial control or aerospace). Either those applications are actively maintained, or they aren't. Part of the active maintenance is to decide whether to upgrade to a new compiler toolchain version (e.g. when in doubt, "never change a running system"), old compiler toolchains won't suddenly stop working. FWIW, trying…

> Part of the active maintenance is to decide whether to upgrade to a new compiler toolchain version

Of course, but you want to make that as easy as you can. Compatibility is never binary (which is why I hate semantic versioning), but you should strive for the greatest compatibility for the greatest portion of users.

> FWIW, trying to build a 20 or 30 year old C or C++ application in a modern compiler also isn't exactly trivial

I know that well (especially for C++; in C the situation is somewhat different), and the backward compatibility of C++ compilers leaves much to be desired.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#103
post #81

Earlier quoted context omitted.

I don't think Rust is "a better C/C++". It's a new kind of beast. Interesting, but very different. Zig OTOH is clearly, to me at least (opinion alert), a "better C". It even compiles C! I expect LLMs to be really good at converting C to Zig. > There is also the issue of will people actually code by then. LLMs don't take responsibility. So even if code is generated, a human will have to assess it. I think assessing Zi…

> I don't think Rust is "a better C/C++". It's a new kind of beast. Interesting, but very different. The same can be said about Zig's comptime. It's entirely unlike anything C, C++ or Rust has to offer. > I expect LLMs to be really good at converting C to Zig. While it's possible to translate C to Zig code - and you don't need an LLM for that, it's a Zig compiler/build-system feature - the result will be quite differ…

Using the same language for compile-time and run-time programming is compelling, but doing it properly requires using the same approaches that dependently typed languages use. Comptime is a bit half baked.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#104

Earlier quoted context omitted.

> I don't think Rust is "a better C/C++". It's a new kind of beast. Interesting, but very different. The same can be said about Zig's comptime. It's entirely unlike anything C, C++ or Rust has to offer. > I expect LLMs to be really good at converting C to Zig. While it's possible to translate C to Zig code - and you don't need an LLM for that, it's a Zig compiler/build-system feature - the result will be quite differ…

Using the same language for compile-time and run-time programming is compelling, but doing it properly requires using the same approaches that dependently typed languages use. Comptime is a bit half baked.

It's not just about writing imperative code that runs at compile time, the actual interesting comptime feature in Zig is that "types are comptime values", e.g. you can inspect types and build new types with regular (comptime) code. This is very different from the template/trait systems in C++ and Rust. What Zig's comptime system is missing is the ability to build functions bodies at comptime (e.g. some sort of comptime AST builder).

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#105
post #20

Earlier quoted context omitted.

I have my doubts on Jai, besides being built towards game development, from what I read/watched about it, it has 2 or 3 meta programming capabilities, like comptime, macros, etc it feels too much of the same, also Jai is not built towards correctness or safety, John mentality is that he knows what he is doing, so he doesn’t need those guardrails and he wants instead expressiveness. Also Jai is like C++ in complexity,…

Remember that it was Jai that inspired all these new languages. When you talk about the capabilities like comptime, that's all from Jai and why John no longer does public presentations(as people keep stealing his unfinished ideas). Your comment about gamedev focus makes no sense as that it the most hardcore segment of all the programming there is. So if a language is good for gamedev, it's good for everything else -…

> Remember that it was Jai that inspired all these new languages

You’ve made this claim on here before and when I asked you to substantiate it with a source you were completely unable to.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#106
post #67

Earlier quoted context omitted.

I recently ditched zig because of this. I thought it was stable enough initially but they completely broke fuzz testing feature and didn’t fix it. Also build system API and some other APIs change and it is super annoying. Find it much better to use c23 with _BitInt integers and some macros and context passing for error handling. Also some things like stack traces were broken in small ways in zig. It would report wron…

It sounds like you expected 1.0 stability from a language that isn't 1.0. > I thought it was stable enough initially but they completely broke fuzz testing feature and didn’t fix it. From the 0.14.0 release notes: > Zig 0.14.0 ships with an integrated fuzzer. It is alpha quality status, which means that using it requires participating in the development process. How could we possibly have been more explicit? Fuzzing…

Makes sense, that is fair.

I was a bit too frustrated with all these changes and zig wasn’t the right choice for my particular use case then.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#107

Earlier quoted context omitted.

Using the same language for compile-time and run-time programming is compelling, but doing it properly requires using the same approaches that dependently typed languages use. Comptime is a bit half baked.

It's not just about writing imperative code that runs at compile time, the actual interesting comptime feature in Zig is that "types are comptime values", e.g. you can inspect types and build new types with regular (comptime) code. This is very different from the template/trait systems in C++ and Rust. What Zig's comptime system is missing is the ability to build functions bodies at comptime (e.g. some sort of compti…

"You can inspect types and build new types at compile time" is a key affordance of dependently typed languages.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#108

I feel like it's worthless to keep up with Zig until they reach 1.0. That thing, right here, is probably going to be rewritten 5 times and what not. If you are actively using Zig (for some reasons?), I guess it's a great news, but for the Grand Majority of the devs in here, it's like an announcement that it's raining in Kuldîga... So m'yeah. I was following Zig for a while, but I just don't think I am going to see a…

Pretty typical jaded HN comment there, chief. "This language's churn is more than I prefer -- why would anyone use it?" If you're not interested, just downvote and move on. Wondering out loud why anyone would actively use it ("for some reasons?") is a lame waste of bytes.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#109

I like Zig, lots of great features that work in unison. However the worry is by the time it reaches v1 Rust will have consumed the space that C/C++ used to. I think it will be a mainstream language though and gain a lot more traction after v1. There is also the issue of will people actually code by then.

I think Rust and Zig really don't overlap much when it comes to target audience. E.g. if you're attracted to Rust, you'll probably find Zig terrible (and the other way around). Rust will also never replace C or C++ in any meaningful way, at best new code gets written in new languages (and Rust being only one among many, and among languages used for new projects will also be C and C++, just maybe not that often). I th…

> I think Rust and Zig really don't overlap much when it comes to target audience. E.g. if you're attracted to Rust, you'll probably find Zig terrible (and the other way around).

This is ironic since these two crowds are mostly solving the same type of problems. It's just democrats vs republicans type of split, some of it is just for show and philosophical.

Re: Zig – io_uring and Grand Central Dispatch std.Io implementations landed

#110

I feel like it's worthless to keep up with Zig until they reach 1.0. That thing, right here, is probably going to be rewritten 5 times and what not. If you are actively using Zig (for some reasons?), I guess it's a great news, but for the Grand Majority of the devs in here, it's like an announcement that it's raining in Kuldîga... So m'yeah. I was following Zig for a while, but I just don't think I am going to see a…

An AI will be able to handle updating your code for 95% of your breaking changes
Post reply on HN