Hacker News new | ask | show | jobs
by bryanlarsen 29 days ago
It's an odd stance for a C library. In my experience, odd platforms are the main place that C is used in 2026. If you're writing a new Windows or Linux or MacOS or WASM program, it's not likely to be in C. But lots of new microcontroller software is still being written in C.

And he's already hit the hard targets. Many obscure OS's are generally UNIX like and should be easy ports. Many obscure arch's usually are running Linux and should be easy ports.

2 comments

I have no philosophical complaints with supporting odd architectures in general. I agree that most obscure targets are probably not that much code, since the library is factored with this in mind (e.g. basic WASM support took an afternoon).

It's stated as a non-goal simply because it's not the most valuable thing I can do with my time. My fundamental stance is that writing new Windows or Linux or macOS or WASM programs in C is a good idea, and those are the programs that I write, so that's where my focus is. But if someone would like to come along and write the ~30 syscalls needed to port the library to a new platform, or even register any interest in such, I'd be happy to look into it at that point.

That's fine. Just don't call it "ultra portable" while treating it as a non-goal.
He's already hit the hard targets. I think ultra portable is an accurate description. Portable means able to be ported, not "has been ported".
Like. He's done the first 90%, leaving only the other 90%. And I mean that a little as a joke but also very sincerely. The supported platforms are a decent starting point, but mainstream OSs on little-endian 64-bit processors doesn't strike me as "the hard targets". NetBSD ( https://wiki.netbsd.org/ports/ ) is ultra portable. This is just portable.
I'm seeing that people have a big issue with the language, but "ultra" doesn't even necessarily mean "total"
Ultra might be a step below total, but the 3 most common OSs on the 2 most common ISAs is ... several steps below ultra.
Aren't these MCUs predominantly ARM-based, with some RISC-V thrown in?

I see no contradiction in the desire to support x64 (because it would be ridiculous not to), ARM, and likely RISC-V, but not the venerable but now-fringe architectures like MIPS or Sparc or 68040 or even x86.

The author can do whatever they want. But if all you want to support is x86-64, ARM64 and maybe some version of RISC-V, don't crow about how 'extremely' portable you are. At best, you don't know.
portable is a different word from ported.
Yes, my grasp of english is adequate to understand these words. I just think it's a huge stretch of hubris to claim something is 'portable', especially to claim it's "ultra" portable, if you've not done the actual work to port it or only ported it once. For example, people have learned an awful lot about real world memory alignment issues by actually porting something to SPARC. The author is guessing at best.

But yeah...for some people "meh, close enough" is good enough.

>now-fringe architectures like MIPS

For those not in the know, Microchip still produces MIPS microcontrollers:

https://www.microchip.com/en-us/products/microcontrollers/32...

AfAIK lots of 8051-based microcontrollers that are quite modern, such as Silicon Labs EFM8 line[1] or STC which in addition to 8-bit 8051's also has 32-bit 8051 variants[2].

[1]: https://www.silabs.com/mcu/8-bit-microcontrollers

[2]: https://www.stcmicro.com/stc/stc32g.html