Readit News logoReadit News
100ideas · 10 months ago
Very interesting comments and moderation discussion on this article.
h4ch1 · 10 months ago
Decent article, why the need for someone to pick up the pitchfork and emphasize their moral compass publicly like this? The comment and ensuing discussion is so pointless.
no_wizard · 10 months ago
Why do we pretend that these things don’t matter? Why should we?

Why in the norm to ignore these issues - there by perpetuating them because they face no consequences - rather than pointing them out?

Justine did write openly on the web about their prejudices and never even apologized let alone showed in anyway evolution away from fascist leaning and prejudiced politics

Brian_K_White · 10 months ago
I think this point was valid: "she doesn't "stick to the technology""

The tech is cool. But the person who made it kicks puppies. You don't care? Well I do.

p0w3n3d · 10 months ago
I have learned there is no true portability. Example: named pipes:

I started my professional career as a C++/Qt developer. There was this code to disallow multiple application instances using named pipes. It used named pipes under both Linux and Windows - just create a named pipe "my-program-pipe" and it was a signal for other starting up instances to communicate to it "please put the main app on top" and close.

On linux it worked like a charm. On Windows it worked like a charm...

...only first time. The code was written to "try create a named pipe and if failed - then it means it exists, so write to it instead and exit". This "try create" operation on windows failed but also removed the original existing pipe, thus allowing the third instance to coexist with the first one.

What I mean - Operating Systems are more than this, you cannot write a truly portable application without knowing them all. And especially those quirks that differ...

sjsdaiuasgdia · 10 months ago
Hence the Cosmopolitan Libc layer that's kinda essential to the APEs described in the article. That's where all the magic is to make the same code work on a variety of operating systems.

There's even a handy table to express syscall compatibility across all of Cosmopolitan's targets - https://justine.lol/cosmopolitan/functions.html

casey2 · 10 months ago
You could always just write your own OS that only cares about running your app. Of course you are always going to run into problems if your program uses functions that you didn't design around. I think any Linux user could tell you that Windows programs don't run on Linux, so I don't know how you could have thought that there was some sort of portability guarantee between these two operating systems or even subsets of them.

If this is some OOP propaganda then I'm sorry but you got duped and the c++/qt community should act more professionally.

p0w3n3d · 9 months ago
I don't really get what is this OOP propaganda you're referring to. What I mean is that "build-anywhere run-anywhere" sounds really misleading, almost like Java's write-once run-anywhere.

Of course you can always say "real programmers do not write ... blablabla" (in other words No True Programmer fallacy) but this is not solving anything, isn't it? I mean, let's make a sufficient abstraction that will allow real cross-system development?

Brian_K_White · 10 months ago
portability in a language is sort of like the right to persue happiness vs a garantee to be happy.

A language can't direct the rest of the universe to ensure that something always works regardless of the environment or context.

But it can avoid adding it's own limitations and be agnostic itself. So c is very portable, even though c on machine A has acces to machine A features and not machine B features.

Libraries and frameworks and standards just help a little for a few common cases but they are just travel power plug adapters, not pprtability.

pjmlp · 10 months ago
Of course, all these "portable C" stuff only works as long as it is pure C standard library.

One might extend the goals a bit, and include POSIX, and even then, only works if the set of target systems support POSIX, and finally if the implementation defined semantics happen to agree, and not cause random surprises.

actionfromafar · 10 months ago
Your general point stands, of course. One can only code against a tiny subset of features. Windows has now finally gotten "real" named pipes, though. (Since Windows 8 or whenever, can't remember exactly when.)
Alifatisk · 10 months ago
So am I getting this right? Cosmopolitian allows me to compile my code once, and run the same binary on every machine it supports? Is this a dream?
yjftsjthsd-h · 10 months ago
Yes, and yes:) It is exactly as amazing as it sounds. I'm still blown away that that includes both x86 and ARM.
hiccuphippo · 10 months ago
As I understand, you have to compile your code for every machine you support, then it combines them into a single executable.
pjmlp · 10 months ago
As long as you don't use nothing else besides C standard library.
ngcc_hk · 9 months ago
Old schooler oils not find itself accept self modifying program. Yes it said it just change so to run in multiple environment so script, win binary … etc. or lie to the os what you really are.

Is that another name for virus / worm.

More gently, is it I just fat binary in a compact form. If so why not use label the source to cross compile so when Apple dump Intel, we do not need to carry that program.

RestartKernel · 9 months ago
This is neat, but I'd rather just pick my platform from a list of binaries. Those who don't know what they're running probably aren't spoofing their user agent either, so you can just* serve them the correct option with a big button first.

* It doesn't seem that you can reliably get the CPU architecture from the user agent yet.

IYasha · 9 months ago
I assume this technique will work on read-only media like CDs or ROMs (patches itself in RAM)?