HNHacker News
TopNewBestAskShowJobs

Cloudef

2,012 karma · joined October 5, 2020

submissionscomments
Cloudef··on Error payloads in Zig
Note that this "diagnostics" pattern is only meant for handling a error locally with potential extra information, or showing a more useful error to a end user of the software. For software bugs, crashes, or developer facing errors, you often don't have to do anything as zig has pretty good error traces by default.
Cloudef··on Zig – io_uring and Grand Central Dispatch std.Io implementations landed
I dont think the core team accepts LLM generated code in the std.
Cloudef··on Zig – io_uring and Grand Central Dispatch std.Io implementations landed
I like that zig takes freestanding target seriously. And seems like 0.16 becomes even better for freestanding code reusability.
Cloudef··on D Programming Language
Its not the GC, its that D has no direction. Its kitchen sink of features and the optionality just fragments the ecosystem (betterC, gc) etc, making reusing code hard.
Cloudef··on The Problem with LLMs
So do you believe seahorse emoji exists?
Cloudef··on The Problem with LLMs
What's wrong about the statement? The black box algorithm might have been generated by machine learning, but it's still a computer program in the end.
Cloudef··on Lessons from Zig
That's from 2018. I think it's unlikely. Also zig's package manager needs a HTTP client.
Cloudef··on Lessons from Zig
> The Zig programming language maintains an intentionally small standard library.

Zig's standard library is not that small to be honest. It has lots of useful tools that do not exist in other languages. The compiler uses the std.

> HTTP clients, for example, are considered inappropriate for a general-purpose systems language’s standard library.

The std has both HTTP client, server, TLS and in development branch even a DNS resolver.

> C++ cannot replicate Zig’s approach exactly—ABI stability and decades of deployed code make removal far more complex.

Wild to hear C++ and ABI stability in same sentence.

Though the article seems LLM generated and even website title is "My Very Best AI Slop", I'm not sure what to expect or why this is even on HN front page.

Cloudef··on Simplifying Vulkan one subsystem at a time
WebGPU is kinda meh. It's when you need to do do something on browser that you can't with WebGL. GLES is the compatibility king and runs pretty much everywhere, if not natively then through a compatibility layer like ANGLE. I'm sad that WebGPU killed WebGL 3 which was supposed to add compute shaders. Maybe WebGPU would've been more interesting if it wasn't made to replace WebGL but instead be a non-compatibility API targetting modern rendering and actually supporting Spir-V.
Cloudef··on OpenCiv3: Open-source, cross-platform reimagining of Civilization III
Emulating mac or using mac SDKs on non apple devices is against apple's bullshit license though.
Cloudef··on Zig Libc
The only thing C compilers do for printf, is static analyze the format string for API usage errors. Afaik such isn't possible in zig currently. But idk why'd you downgrade yourself to using the printf interface, when std.Io.Writer has a `print` interface where fmt is comptime and args can be reflected so it catches errors without special compiler shenigans.
Cloudef··on Zig Libc
It's completely possible to implement printf. here is my impl (not 100% correct yet) of snprintf for my custom libc implemented on top of a platform I'm working on <https://zigbin.io/ab1e79> The va_arg stuff are extern because zig's va arg stuff is pretty broken at the moment. Here's a C++ game ported to web using said libc running on top of the custom platform and web frontend that implements the platform ABI <https://cloudef.pw/sorvi/#supertux.sorvi> (you might need javascript.options.wasm_js_promise_integration enabled if using firefox based browser)
Cloudef··on Super Monkey Ball ported to a website
I know HN is riding the LLM hype, but this codebase has no LLM in it.
Cloudef··on Show HN: Simple random access archive format with no compression
JS reader impl without validation <https://zigbin.io/eb27cb>
Cloudef··on Memory layout in Zig with formulas
You are still playing with fire as the data inside those pointers may be different even if they are the same type. Zig is free to optimize them in anyway it likes depending on the code that touches them (aka its free to assume they never leave the program).
Cloudef··on Memory layout in Zig with formulas
Yeah the new translate-c package already kind of does that.
Cloudef··on Memory layout in Zig with formulas
I doubt zig will have stable abi any time soon. It may have some sort of "zig extern" when it gets mature. But stable abi isnt very usful if no-one else can talk it. I have project that uses codegen to effectively implement zig like ABI on top of the C abi.

Heres the kind of code it generates https://zigbin.io/6dba68

It can also generate javascript, heres doom running on browser: https://cloudef.pw/sorvi/#doom.wasm

Cloudef··on Total monthly number of StackOverflow questions over time
LLMs are just statistics, eventually they kill themselves with feedback loop by consuming their own farts (literally)
Cloudef··on Show HN: BusterMQ, Thread-per-core NATS server in Zig with io_uring
Zig build system can do all that just fine though
Cloudef··on Japanese game devs face font dilemma as license increases from $380 to $20k
Apparently they are planning to create their own machine learning model with all the font data they have gathered.
Cloudef··on A programmer-friendly I/O abstraction over io_uring and kqueue (2022)
kqueue is similar to epoll, it's readiness based and not completion like IOCP and io_uring. IOCP is nice in theory, but the api and the different ways everything has to be fed for it leaves a lot to be desired... Windows also has own version of iouring, but it's bit abandoned and only works for disk io which is shame, because it could have been nice new clean io api for windows.
Cloudef··on Migrating the main Zig repository from GitHub to Codeberg
CI's job for me is to just run a nix flake
Cloudef··on I just want working RCS messaging
I remember installing WhatsApp and it proceeded to delete all contacts from my phone. Haven't ever installed WhatsApp ever since. Have told people to either contact me through e-mail, google chat, LINE, discord or irc after that incident.
Cloudef··on Steam Machine
Target apple and in 5 years your binary wont work anymore anyways
Cloudef··on Steam Machine
You are only safe if you run Tim's rootkit :)
Cloudef··on Fil-C: A memory-safe C implementation
Yes filc as abi makes most sense. Do note that while fil-c seems to have pretty good source compatibility some stuff still require patches (like python!)
Cloudef··on Fil-C: A memory-safe C implementation
Yeah, I was thinking nix will be probably one of the first things that can easily adapt Fil-C as it already packages in a way that allows different packages to be completely independent of each other, thus Fil-C's ABI compatibility does not matter. I assume other targets will be mostly enterprise distros where the perf hit and source compatibility issues are less of a concern, and memory safety is absolutely critical.

Fil-C compiled flatpaks might be a interesting target as well for normal desktop users. (e.g. running a browser)

I wonder if GPU graphics are possible in Fil-C land? Perhaps only if whole mesa stack is compiled using Fil-C as well, limiting GPU use to open drivers?

Cloudef··on Apple will phase out Rosetta 2 in macOS 28
mac for gaming is just not a good idea
Cloudef··on Google Pixel's most dangerous bug: failing to call 911
Yes i got burned by this "feature" as well. Disabled immediately after having to explain emergency center that the phone prank called itself.
Cloudef··on Apple M5 chip
> Metal is the best designed Graphics API

API that has dependency on objective-c runtime doesn't sound very good

← PreviousPage 2 of 30Next →