Live data from Hacker News

Zig Libc

ziglang.org

181–190 of 196 posts

Re: Zig Libc

#181
post #49

Earlier quoted context omitted.

i tested sonnet 4.5 just last week on a zig codebase and it has to be instructed the std.ArrayList syntax every time.

I made a Zig agent skill yesterday if interested: https://github.com/rudedogg/zig-skills/ Claude getting the ArrayList API wrong every time was a major reason why It’s AI generated but should help. I need to test and review it more (noticed it mentions async which isn’t in 0.15.x :| )

The linked blog post about making this is an excellent read.

Re: Zig Libc

#182

Earlier quoted context omitted.

I made a Zig agent skill yesterday if interested: https://github.com/rudedogg/zig-skills/ Claude getting the ArrayList API wrong every time was a major reason why It’s AI generated but should help. I need to test and review it more (noticed it mentions async which isn’t in 0.15.x :| )

The linked blog post about making this is an excellent read.

Thanks! I think I spent as much time writing the post as I did making the skill, so I’m happy someone got some value out of it.

Re: Zig Libc

#183

Earlier quoted context omitted.

> How does that work, with syscalls being unable to be called except from the system’s libc? OpenBSD allows system calls being made from shared libraries whose names start with `libc.so.' and all static binaries, as long as they include an `openbsd.syscalls' section listing call sites.

Can't you just have one syscall(2) to rule them all? https://man7.org/linux/man-pages/man2/syscall.2.html

You can. There is a thread-unsafe implementation here https://gist.github.com/oguz-ismail/72e34550af13e3841ed58e29...>. But the listing needs to be per system call number, so this one only supports system calls 1 (_exit) and 4 (write). It should be fairly easy to automatically generate the complete list but I didn't try it.

Re: Zig Libc

#186
post #108

Earlier quoted context omitted.

[flagged]

It's kind of hilarious to call 2 single words at the end of a blogpost that you could have read over "pushing politics down your throat". As you said, you didn't even have an idea what it meant. For all you knew before you looked it up, he was complaining about the frigid winter weather.

I like ZSF and what it stands for.

I don’t like “American” only politics in it. Thats it. In fact I would like zero politics in it. (from anywhere in the world)

Bash the mediocrity in software that we have produced over the years. Slow. Electronbased. Etc.

I can have both the opinions.

Also I will support Andrew Kelley on Mastodon if he says the same.

Separation of Concerns.

Re: Zig Libc

#187

Earlier quoted context omitted.

I like how you call peaceful protests when people throw huge rocks, break city infrastructure and damage property and take 0 accountability for it. And most likely don't pay taxes to fix it up later. How convenient it must be to blame officers instead of bad actors just because you agree with their side. This is purely pushing political agenda, you just covering it up.

Since you're so eager to construe his support for peaceful protest as support for civil unrest, I therefore think it's fair if I construe your defence of ICE to mean support for their extrajudicial executions and the people who dress up as ICE (ie: masked men dragging people at gunpoint into unmarked vans) to kidnap and rape people.

You can construe what you want, but I don't put my political (or any other views) into unrelated posts and try to conceal/justify it later.

My point is not about the views - its still free internet and most of us live in free speech countries - its about putting it out there while being fully aware that many people will read the news post about a popular language and then talking how its not a political statement.

Re: Zig Libc

#188

Earlier quoted context omitted.

Since you're so eager to construe his support for peaceful protest as support for civil unrest, I therefore think it's fair if I construe your defence of ICE to mean support for their extrajudicial executions and the people who dress up as ICE (ie: masked men dragging people at gunpoint into unmarked vans) to kidnap and rape people.

You can construe what you want, but I don't put my political (or any other views) into unrelated posts and try to conceal/justify it later. My point is not about the views - its still free internet and most of us live in free speech countries - its about putting it out there while being fully aware that many people will read the news post about a popular language and then talking how its not a political statement.

You seem to have vastly misread his comment in your defensiveness: 1) his comment is not a concealment or a justification, it's an elaboration. This is more than mere semantic nitpick: he doesn't need to justify anything to you or conceal anything from you; he is not seeking your approval. Similarly 2) nor did he say it's "not a political statement", he said it "isn't some hypothetical political agenda", which to me has the extremely obvious meaning that it's not a virtue signal or other ulterior motive, that he may actually be dead by next week. If anything, he's confirming without a doubt that he included politics in his devlog, not denying it. Did his inclusion of "Abolish ICE" at the very bottom of his devlog really put you so off-kilter? Good grief, go outside.

Re: Zig Libc

#189
post #139

Earlier quoted context omitted.

D can import C files directly, and can do C-source to D-source translation. D can compile a project with a C and a D source file with: dmd foo.d bar.c ./foo

Do you have to bring up D in every Zig related post? I do like D. I've written a game in it and enjoyed it a lot. I would encourage others to check it out. But it's not a C replacement. BetterC feels like an afterthought. A nice bonus. Not a primary focus. E.g. the language is designed to use exceptions for error handling, so of course there's no feature for BetterC dedicated to error handling. Being a better C is th…

>Do you have to bring up D in every Zig related post?

I dont think that is the case here, and in all previous encounter. I see this every time Ada was mentioned in Rust as well.

He is not brining up about D in every Zig post, he is simply replying whenever people said something about only in Zig, he is replying that D could do it as well. Which is fair.

Same with Ada, when Rust people claim to be the only language doing something, or the safest programming languages, there is nothing wrong in providing a valid, often missed out counter argument.

A subset of D could have been better C, or "Das C". Unfortunately I dont see anyone craving that out as a somewhat separate project.

Re: Zig Libc

#190
post #139

Earlier quoted context omitted.

Do you have to bring up D in every Zig related post? I do like D. I've written a game in it and enjoyed it a lot. I would encourage others to check it out. But it's not a C replacement. BetterC feels like an afterthought. A nice bonus. Not a primary focus. E.g. the language is designed to use exceptions for error handling, so of course there's no feature for BetterC dedicated to error handling. Being a better C is th…

C++ is more C-like than Zig and Rust, so it's more likely to become a C replacement.

Except for all the baggage it carries along with it including hacks to address baggage resulting in a very bloated language.
Post reply on HN