Hacker News new | past | comments | ask | show | jobs | submit login

Which is true for a lot of useful tools that run in a terminal (for many coders this is pretty much everything except an IDE and a browser).



If their world is ISO C and nothing else, quite a boring one actually.

Not even a bit of colour, as terminal escape sequences assume a POSIX host environment, and will throw up gibberish if not.


Nah, terminal colors via escape sequences work fine on Windows, even on the "traditional" cmd.exe. I use that all the time in cross-platform Python and Typescript cmdline tools (cmd.exe is probably limited to 16 colors though, but that's just how it is).


Windows isn't the only non POSIX one out there...

And it was only one example, another one would be any kind of networking, as it isn't part of ISO C.


There seems to be a standard socket API in the Cosmopolitan clib though:

https://github.com/jart/cosmopolitan/tree/master/libc/sock

..and that also seems to have WinSock support:

https://github.com/jart/cosmopolitan/blob/master/libc/sock/c...

(also Windows is probably the only non-POSIX OS that matters - and APE is obviously only portable to systems it specifically supports, it can't support systems it doesn't even know about, no matter if it is a "POSIX system" or not).


Yeah, but that is going beyond ISO C, and diving int POSIX C LIB, which is the point I was making already.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: