Live data from Hacker News

I'm too dumb for Zig's new IO interface

openmymind.net

201–210 of 329 posts

Re: I'm too dumb for Zig's new IO interface

#201
post #27

Earlier quoted context omitted.

For most of its time it is simply a single person and part time project. Even to this day the team is nowhere near Rust or Go's resources.

In 2016, nine years ago, Andrew announced he'd been working on the new language "Zig" for a couple of months. In 2018, seven years ago, Andrew announced he'd go full-time on Zig and quit his paying job to live off donations instead. In 2020, so five years ago, Zig's 501(c)3 the ZSF was announced, to create a formal structure to hire more people in addition to the few already on Zig. So, "most of its time" is just not…

yeah but i think you can count on one hand how many full time zig developers are paid by the foundation.

Re: I'm too dumb for Zig's new IO interface

#202

Earlier quoted context omitted.

My quick skim of Wikipedia may not be telling the complete story, but it says the initial release was 9 years ago (February 2016). After nearly a decade, I would hope that things would be out of "extreme beta mode," but I guess this isn't the case?

What's the benchmark for how long something can be pre-1.0? Seems like a nonsense argument.

https://github.com/ziglang/zig/milestone/2

Re: I'm too dumb for Zig's new IO interface

#203
post #149
post #138

Earlier quoted context omitted.

> we already have enough unsafe languages as it is By that logic, we definitely have enough safe languages as it is, as there are many more. But this safe/unsafe dichotomy is silly, and is coloured by languages that are unsafe in some particular ways. 1. Memory safety is important because memory-safety violations are a common cause of dangerous security vulnerabilities. But once you remove out-of-bounds access, as Zi…

We actually already have enough safe languages as well. I am a firm beliver in the vision of Xerox PARC for computing, and think the only reason we aren't yet there are politics, lack of funding from management for doing the right thing pushing them into the market, always looking to shareholders and the next quarter, and naturally programming language religion. We were already on the right direction with languages l…

> vision of Xerox PARC for computing

What is that in relation to Zig and memory safety? Am I missing some context?

Re: I'm too dumb for Zig's new IO interface

#204

Earlier quoted context omitted.

Just because and AI produced it doesn't mean it is slop.

But it is a pretty good signal of low quality.

I mean, the quality of docs before AI was pretty low quality and forums everywhere were filled with complaints about it, except in the case of a few exceptional pieces of software. If this is the case, just having docs at all seems to be a signal of low quality.

Re: I'm too dumb for Zig's new IO interface

#205

Earlier quoted context omitted.

I mean, there's no winning here. Either the language is too complex and does too many things, or it's not complex enough and relegates fundamental things to the standard library. I don't thing there is any substantial difference between `Option ` and `@Nullable Thing` or `Thing | null`, I don't think there's anything wrong with choosing `::` over `.` for namespace resolution (it means you can have local variables wit…

> I don't thing there is any substantial difference between `Option ` and `@Nullable Thing` or `Thing | null` I object to @Nullable and similar arrangements as a magic special case. If the sum types only solved this one issue then it's a wash but they do a lot more too. Either of the sum types, the concrete `Option ` or the ad hoc `Thing | null` are OK because they're not magic, less magic is better.

I’m confused. You seem to think Option is magical? It is not, and neither is Result. They are regular sum types defined in the standard library, nothing special about them.

Re: I'm too dumb for Zig's new IO interface

#206

Earlier quoted context omitted.

"No documentation" and "Core devs 'wasting' time on writing high quality documentation" aren't the only two options, that's what a false dichotomy means. Other options include but are not limited to providing minimal, low effort examples, high-level overview, linking to projects using these features, linking to relevant tests, commits, or source code, setting up an official community wiki and encouraging people to co…

"No documentation" was never presented as an option. Documentation exists. By treating "insufficient docs" as "no docs", you're the one making the false equivalency.

> Documentation exists

Where does a beginner go to learn how to use the package manager these days? It looks like they still won't find any clues in the "Learn" section of Zig's website.

There's a promising page titled "Zig Build System" in there which references a "Package Management" section, but when you click on it, it doesn't exist!

Re: I'm too dumb for Zig's new IO interface

#207
post #29

Author here. I finally got it working. I had to flush both the encrypted writer and then the stream writer. There was also some issues with reading. Streaming works, but it'll always return 0 on the first read because Writer.Fixed doesn't implement sendFile, and thus after the first call, it internally switches from streaming mode to reading mode (1) and then things magically work. Currently trying to get compression…

Going from the previous interface to what ever this is, is certainly something. Yeesh.

Re: I'm too dumb for Zig's new IO interface

#208
post #204

Earlier quoted context omitted.

But it is a pretty good signal of low quality.

I mean, the quality of docs before AI was pretty low quality and forums everywhere were filled with complaints about it, except in the case of a few exceptional pieces of software. If this is the case, just having docs at all seems to be a signal of low quality.

No! Well written docs are a sign of quality. Obviously AI generated docs make me question whether they are actually correct which makes them useless.

Re: I'm too dumb for Zig's new IO interface

#209

Earlier quoted context omitted.

There is no benchmark. As a species, we don't even know know what a good programming language is , let alone how to reliably develop one. This stuff takes time, and we're all learning it together. I like to compare this to real world cathedral building. There are some cathedrals that are literally taking centuries to build! It's OK if the important, but difficult thing takes a long time to build.

Cathedrals are the opposite of extreme beta mode with lots of breaking changes.

Yes. I guess what I meant is that cathedrals are a complex system that we know how to do, and still they take ages to build properly.

Re: I'm too dumb for Zig's new IO interface

#210
post #5

The Zig's language is really good, but the standard library is really a big work in progress, constantly shifting, missing a lot of bits, overly abstracted at some places and too low level at other places. I would say just stay away from the standard library for now and use your OS API, unless you're willing to be a beta tester.

From my perspective, Zig is trying to do far too many things to ever reach a baseline of goodness that I consider acceptable. They are in my view quite disrespectful to their users who they force to endure churn at the whims of their dictator. Now that enough people have bought in and accepted that a broken tool is ok so long as it hasn't been blessed with a 1.0 all of its clear flaws can be overlooked in the hope of the coming utopia (spoiler alert: that day will never arrive).

Personally, I think it is wrong to inflict your experiments on other people and when you pull the rug out from underneath say, well, we told you it was unstable, you should't have depended on us in the first place.

I don't even understand what zig is supposed to be. Matklad seems to think it is a machine level language: https://lobste.rs/s/ntruuu/lobsters_interview_with_matklad. This contrasts with the official language landing page: Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software. These two definitions are mutually incompatible. Moreover, zig is clearly not a general purpose language because there are plenty of programming problems where manual memory management is neither needed nor desirable.

All of this confusion is manifest in zig's instability and bloated standard library. Indeed a huge standard library is incompatible with the claims of simplicity and generality they frequently make. Async is not a feature that can be implemented universally without adding overhead and indirection because of the fundamental differences in capabilities exposed by the various platforms. Again, they are promising a silver bullet even though their prior attempt, in which they publicly proclaimed function coloring to be solved, has been abandoned. Why would we trust them to get it right a second time?

There are a very small number of assembly primitives that every platform provides that are necessary to implement a compiler. Load/store/mov/inc/jeq/jump and perhaps a few others. Luajit implements its parser in pure assembly and I am not aware of an important platform that luajit runs on that zig goes. I do the vast majority of my programming in lua and _never_ run into bugs in the interpreter. I truly cannot think of a single problem that I think zig would solve better than luajit. Even if that did exist, I could embed the zig code in my lua file and use lua to drive the zig compiler and then call into the specialized code using the lua ffi. But the vast majority of code does not need to be optimized to the level of machine code where it is worth putting up with all of the other headaches that adopting zig will create.

The hype around zig is truly reaching llm levels of disconnection from reality. Again, to believe in zig, one has to believe it will magically develop capacities that it does not presently have and for which there is no plan to actually execute besides vague plans of just wait.

Post reply on HN