this post was submitted on 08 Dec 2023
149 points (98.1% liked)

Ask Lemmy

26707 readers
1413 users here now

A Fediverse community for open-ended, thought provoking questions

Please don't post about US Politics.


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either [email protected] or [email protected]. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email [email protected]. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 28 points 11 months ago* (last edited 11 months ago) (1 children)

For software engineers; you can make an executable that runs ANYWHERE. Same file, executes on windows and on Linux and on mac, x86, arm doesn't matter.

https://github.com/jart/cosmopolitan

[–] [email protected] 4 points 11 months ago (1 children)

this sounds awesome! is anyone able to oversimplify how this is possible?

[–] [email protected] 4 points 11 months ago

Different platforms have different layouts for executable files. Most platforms support multiple formats, some older and some newer. Luckily it happens that pretty much all platforms have formats that don't overlap each other (or if they do, they do so in a compatible manner), which means that the executables can be "jump-started" on every platform.

Now, the libraries developers usually rely on aren't cross-platform at runtime, but at build time (i.e. I can use the same library to create separate executables for separate platforms), so the developer and contributors of cosmopolitan re-implemented all the low-level stuff to work on all separate platforms with one codebase. And since they have the jump-starting routines, the whole application works anywhere!

It's a massive effort, but it's starting to work really well. And the best part is that you can even build applications with emulators included that translate code for different architectures. And, to top it off, you can run the applications without an OS, since they are basically mini-OSs themselves!