3 ms·
Is fingerprint reading within the scope of what OpenGroup is trying to do? POSIX doesn't specify whether you should make a web page with CSS2 or CSS3 either.
by tedunangst 11y ago
Is fingerprint reading within the scope of what OpenGroup is trying to do? POSIX doesn't specify whether you should make a web page with CSS2 or CSS3 either.
- pjmlp 11y agoIf the scope of POSIX is a portable UNIX API, it should cover some kind of portable hardware access API across UNIX like systems, no? Currently it mostly covers hardware from PDP-11 systems still, anything else via /dev, ioctl, whatever, is vendor specific. Last time I checked that weren't any portable API for USB for example.
- tedunangst 11y agoLast I checked there wasn't even a portable way to make a new filesystem. POSIX standard is a lot like the C standard, far above and almost completely hardware agnostic.
- pjmlp 11y agoActually UNIX kind of plays the role of C runtime, but when the time for standardizing C came, they could only make into ANSI C features that were common across multiple hardware and OSes back in the late 80's. So what was left out of ANSI C, is what became POSIX. Making any OS with ANSI C + POSIX compliant compatible with the original UNIX systems. But unlike other programming languages, on C's case the evolution in terms of standard libraries stopped there.
- uxcn 11y agoHigher level languages (and libraries) seem to be defining the portable interfaces for a lot of what software needs to do now, which helps but essentially seems to punt the problem at the operating system level. I guess portable interfaces may just end up needing to be defined over non-portable interfaces, and C may end up not being practical for anything that needs to be portable. Higher level languages aren't bad, and it would probably be a good thing if a language like Rust became the de-facto for low-level. My feeling is that C is still the simplest to compile though, which I think is an advantage.
- pjmlp 11y agoSimplest to compile, but very hard to optimize, hence why register and restrict are needed, among many other tricks. But that is a talk for other day.
- caf 11y agoFar from being needed, "register" has been completely ignored by compilers for many years now.
- pjmlp 11y agoNowadays, but back when C was barely used outside UNIX it was essential.
- uxcn 11y agoMost compilers I know of do register allocation better than nearly all humans where optimization is important. Aliasing is a problem, but I don't think it's strictly inherent to C.
- pjmlp 11y ago> Most compilers I know of do register allocation better than nearly all humans where optimization is important. Nowadays yes, you are forgetting C has 40 years of research into compiler optimization. We could easily beat the register allocator in the 90's with Assembly coding, specially in x86. There is a quote from a famous woman in compiler research from the mid-80's, where she claims C semantics have thrown the optimization research back to the dinosaur age. Sadly I cannot find it, as I don't remember the exact words. > Aliasing is a problem, but I don't think it's strictly inherent to C. Most languages have stricter semantics for aliasing and do not decay arrays into pointers. Also they tend to have better type information, which can help the optimizer.