3 ms·
The problem is, the landing page says it's "similar to Java" right in the first sentence and in the second sentence "same portability benefits as high-level lan
by roca 5y ago
The problem is, the landing page says it's "similar to Java" right in the first sentence and in the second sentence "same portability benefits as high-level languages like Go and Rust", and later on "excellent performance on modern desktops and servers" and "compared with glibc, you should expect Cosmopolitan to be almost as fast".
The tricky part is, those claims are all true, they're just not all true at the same time. The portability claims are true (only if you ignore performance), the performance claims are true (only if you're on x86-64).
- jart 5y agoWe learned yesterday on HN that Java 1.0 was only able to run on two systems: Windows and Solaris. https://github.com/ufuu/Java-JDK10 https://github.com/ufuu/Java-JDK10 Cosmopolitan 1.0 runs on Windows, Linux, Mac, FreeBSD, OpenBSD, NetBSD, and boots from BIOS on bare metal all in a single 12kb file. https://justine.lol/cosmopolitan/howfat.html https://justine.lol/cosmopolitan/howfat.html If we consider that Java today is on version 17, then I'd ask you to imagine where Cosmopolitan v17 will be in the future.
- robertlagrant 5y agoThe possibilities are of course endless; I think the discussion is about what is claimed today.
- sigjuice 5y agoWhat's with all the nitpicking? I just don't get it. What is claimed today is entirely reasonable. The landing page says SIMILAR to Java. It doesn't say runs identically on exactly all versions of every system that Java programs will run on. Also, this is a C binary we are talking about. Fundamentally, a C binary will not run on multiple architectures (at least not without some sort of special translation mechanism like Rosetta or qemu user-mode emulation). "Modern desktops and servers" is still pretty much x86-64 for most of the world. Yes, I know there are ARM servers and I'm typing this on an M1 Mac and I own nearly all kinds of Raspberry Pi's (even the minor revs of some models).
- KMag 5y ago> Fundamentally, a C binary will not run on multiple architectures (at least not without some sort of special translation mechanism like Rosetta or qemu user-mode emulation). The C machine model doesn't dictate native compilation. You could (and in fact IBM OS/400 does[0]) compile C to a binary format that does run on multiple architectures. Maybe instead of "C binary" you meant "C compiled to native binary", but that linguistic shortcut also encourages a mental shortcut that excludes several interesting design tradeoffs. In the IBM TIMI case, the equivalent of setting the execute bit on the binary triggers OS/400 to perform the native code generation and save that native code to disk, similar to some versions of Android Runtime, but without mandatory garbage collection. [0] https://en.wikipedia.org/wiki/IBM_i#TIMI https://en.wikipedia.org/wiki/IBM_i#TIMI
- robertlagrant 5y agoI wasn't making a point about the claimed error. I was saying "think of what can be done in the future" is not relevant.
- tomcam 5y agoHang on. Didn’t the parent post do exactly that?