I take it that you are fully aware of the challenges and the problems. So ... that would actually entail that you go the extra mile and don't use C. If you have good ideas, look into the future, not the past.
Why do you insist D, Rust, and Go are "the future", and C is "the past"? No, I am not interested in how convinced you are, or who else says so; I am interested in logical arguments for or against, or personal experiences.
Like I said, I don't want more abstractions. D++ is object-oriented, and I don't need that abstraction. I don't want a runtime like Go has, either; if you have ever dealt with C++ runtime from other languages, you know why. Perhaps Go avoids that particular trap, but that is yet to be seen. I want an efficient low-level systems programming language, and that is what C is. No, C is not particularly good. A big part of not-particularly-good is the standard library, easily shown by comparing programs written with POSIX C to those doing the same thing in standard C, so I want to find out how much better we could do. Rust is the closest, but I'm not convinced it is better than C yet, and I don't see how I could contribute anything meaningful there.
As to "better", I intend to have real-world compilable code that everyone can look at and compare to, and tell me how and why I'm wrong. That will be useful.
I know that actually a different programming language would be the real painkiller.
Yes, that I do agree with. Perhaps, one day, I will take that step, too.
But for now, freestanding C provides an easy starting point. I intend to create the library, then implement a few typical service daemons, so that one can compare them to similar daemons written in C and other languages. Instead of abstract examples or handwaving, I want tangible, real-world code to examine and compare to. (And not just compare the human-readable parts, but also the binaries generated, and definitely the run-time resource use.)
I think I've missed something. What is a hosted or freestanding C environment, or, rather, the difference?
In a hosted environment, the standard C library provides you a number of functions, from malloc() to exit(). In a freestanding environment, you do not; you only have some macros (from specific header files you can still include) and variadic parameter support (from <stdarg.h>).
I'd like to see standard hash tables/dictionaries.
Environment variables are an example of a dictionary every process has access to, and I have an idea on those.
Do you have any examples of interfaces you've found useful? Function prototypes would give a good idea, with example real-world use cases.
Compare to e.g. qsort_r() instead of qsort() for sorting: the comparison operation often needs external information, like offset or column within the string to start the comparison at, and passing an untyped user pointer to the comparison function makes that easy in a thread-safe manner, as one does not need to use global variables.
And everyone else, if you have found a particularly useful function you have used when writing low-level code – a service daemon, a command-line utility, etc. – please let me know; the most interesting bit is
how/
why you found it useful.