Hacker Newsnew | past | comments | ask | show | jobs | submit | dboon's commentslogin

A comment from a legend. Thanks for reading and thanks for the response! I agree; the dynamic array is typed as a T* for ergonomics sake but is similarly a pointer and a length (and an allocator).

Could I pick your brain a little more on the design? I'm spader at spader.zone; if you have time, drop me an email. I promise not to take too much of your time and I'd love to hear from you.


Thanks for the kind words!

This can get you started:

https://dlang.org/spec/arrays.html

Strings (and arrays) being length/ptr is a freaking enormous win, in simplicity, performance, and overflow bug elimination.

One of D's secret features is that string literals still have a 0 appended to them, even though the length of the string does not include the 0. This makes it super slick to call C functions, like printf, using a string literal for the format string.

I'm baffled why C spends its energy doing things like normalized Unicode identifiers (an abomination) instead of something incredibly useful like length/ptr arrays.


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.

People are very silly and very entitled. I'd bend over backward to help anyone contribute to or use the library in any way. In response, all I ask is for some common courtesy and friendliness. Spending more than exactly zero seconds on people who won't give you that is a waste of time.

In other words, you hit the nail on the head. Anyone who acts this way can get fucked! We'll be having a good time and making friends without them


Haha jk…but really? Lol just kidding…unless?

Yeah, AI has done a number to this place

Thanks! I didn’t know this.

Thanks for reading and thanks for the link. I'll read anything DJB wrote.

It...is not a libc implementation. That's an impressive level of misunderstanding!

The title says 'standard library'. Are you saying that, in the context of C, that it is an error to take that to mean an implementation of libc?

Yes, I know the author's writeup then goes on to say that it is not a libc with a pile of questionable justfication. This is a custom runtime, in a single header no less, which is admittedly impressive, especially considering it provides runtime and thread safety primitives. This does not rise to the level of claiming the idea of a 'standard libarary' though, IMO. In that, I think the author misses the point.


It looks like I need to update my macOS machine! Thanks for the sanity, and thanks for reading.

Only if you want to move from MacOS Sequoia to Tahoe. Tahoe has the Liquid Glass stuff that people don't like as well as other UX changes that have been controversial.

Apple still do security updates on Sequoia.


Man, this place has become strange. This person has no idea who I am. But thanks for commenting on my 'library' nonetheless!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: