3 ms·
Java/Closure/Kotlin programmers. .Net programmers. JS, Python, Ruby, Erlang, every VM-based language programmers. Statically-compiled programs are under the hoo
by corysama 3y ago
Java/Closure/Kotlin programmers. .Net programmers. JS, Python, Ruby, Erlang, every VM-based language programmers. Statically-compiled programs are under the hood of everything, but at the application level in the minority.
APE is a big “Who needs a VM if an AOT compiled language as low level as C can compile once and run universally?”
- up2isomorphism 3y agoPortability is not the reason you see VMs everywhere.
- londons_explore 3y agoI think it is a big part of it.
- pjmlp 3y agoIf libc is the only leaf dependency.
- flohofwoe 3y agoWhich 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).
- pjmlp 3y agoIf 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.
- flohofwoe 3y agoNah, 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).
- pjmlp 3y agoWindows 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.
- flohofwoe 3y agoThere seems to be a standard socket API in the Cosmopolitan clib though: https://github.com/jart/cosmopolitan/tree/master/libc/sock 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/connect-nt.c 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).
- pjmlp 3y agoYeah, but that is going beyond ISO C, and diving int POSIX C LIB, which is the point I was making already.