Earlier quoted context omitted.
He talks about it a bit as the "magic numbers". You can see the big table: https://github.com/jart/cosmopolitan/blob/c91b3c50068224929c... I guess there's also syscall emulation stubs for Windows but since he only supports "stdio and sockets" maybe not.
The author is a "she": https://en.wikipedia.org/wiki/Justine_Tunney
αcτµαlly pδrταblε εxεcµταblε
41–50 of 309 posts
Re: αcτµαlly pδrταblε εxεcµταblε
#42Why does the title font look pseudo Greek?
I hate it when people do that. It looks tacky and it's super annoying when they (mis)use a script you can read.
Re: αcτµαlly pδrταblε εxεcµταblε
#43I believe that scripts without a shebang line cannot be executed by execve. They will only run if the shell sees them before the kernel does. It's an annoying limitation of this approach and it wasn't clear to me whether this technique includes a workaround for this. Also the push for code signing everywhere is going to make this harder in the future as well. (I heard a rumor that the workaround to run unsigned execu…
This was once true on old systems, but current ones (including Linux) have native support for scripts starting with #!. See fs/binfmt_script.c in Linux, which has existed for several decades.
Re: αcτµαlly pδrταblε εxεcµταblε
#44"Actually Portable Executable" Incase anyone searches on hn.aloglia in future!
Re: αcτµαlly pδrταblε εxεcµταblε
#45Finally, you can produce a single cross-platform executable in C. > we've basically reconfigured the stock compiler on Linux so it outputs binaries that'll run on MacOS, Windows, FreeBSD, OpenBSD too. They also boot on bare metal
But it doesn't work on Linux?
Re: αcτµαlly pδrταblε εxεcµταblε
#46I believe that scripts without a shebang line cannot be executed by execve. They will only run if the shell sees them before the kernel does. It's an annoying limitation of this approach and it wasn't clear to me whether this technique includes a workaround for this. Also the push for code signing everywhere is going to make this harder in the future as well. (I heard a rumor that the workaround to run unsigned execu…
> I believe that scripts without a shebang line cannot be executed by execve. This was once true on old systems, but current ones (including Linux) have native support for scripts starting with #!. See fs/binfmt_script.c in Linux, which has existed for several decades.
Re: αcτµαlly pδrταblε εxεcµταblε
#47I believe that scripts without a shebang line cannot be executed by execve. They will only run if the shell sees them before the kernel does. It's an annoying limitation of this approach and it wasn't clear to me whether this technique includes a workaround for this. Also the push for code signing everywhere is going to make this harder in the future as well. (I heard a rumor that the workaround to run unsigned execu…
> I believe that scripts without a shebang line cannot be executed by execve. This was once true on old systems, but current ones (including Linux) have native support for scripts starting with #!. See fs/binfmt_script.c in Linux, which has existed for several decades.
Re: αcτµαlly pδrταblε εxεcµταblε
#48I believe that scripts without a shebang line cannot be executed by execve. They will only run if the shell sees them before the kernel does. It's an annoying limitation of this approach and it wasn't clear to me whether this technique includes a workaround for this. Also the push for code signing everywhere is going to make this harder in the future as well. (I heard a rumor that the workaround to run unsigned execu…
> C compiler is installed It's a great idea but that part is a big ask for any Windows user who doesn't develop desktop applications.
Re: αcτµαlly pδrταblε εxεcµταblε
#49> I believe the best chance we have of doing that, is by gluing together the binary interfaces that've already achieved a decades-long consensus, and ignoring the APIs. Yeah, this isn't going to fly for OpenBSD, which doesn't have ABI stability, programs are expected to use libc. Program for the API, not the ABI. The author is clever, but misguided.
I believe the claim is that there exists a stable subset: > Bell System Five is the umbrella term we use to describe Linux, FreeBSD, OpenBSD, and Mac OS X which all have nearly-identical application binary interfaces that stood the test of time, having definitions nearly the same as those of AT&T back in the 1980's. However, only Linux guarantees stability at this level so I too am very sceptical that this will "stan…
Re: αcτµαlly pδrταblε εxεcµταblε
#50The source code equivalent of this is a polyglot program: https://en.wikipedia.org/wiki/Polyglot_(computing) Apparently people on Stack Exchange have been working together on a single polyglot program for four years and have gotten a single codebase up to validity in nearly 300 languages. https://codegolf.stackexchange.com/questions/102370/add-a-la... Edit: also, Yusuke Endoh is a master at this art form https://gith…
Wow, what a link. I submitted it just now as a separate HN post using your phrasing: