Cosmopolitan Libc: build-once run-anywhere C library
1–10 of 171 posts
Re: Cosmopolitan Libc: build-once run-anywhere C library
#2Re: Cosmopolitan Libc: build-once run-anywhere C library
#3Interesting approach for a universal binary.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#4Re: Cosmopolitan Libc: build-once run-anywhere C library
#5I think most modern C and C++ compilers know that memcpy is special and optimize accordingly. I believe some C++ compilers recognize when you are using memcpy just to do bit casting to different representations and avoid doing a memory copy at all.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#6Sorry for being naive, but how can it be possible that nobody had thought of this approach and this approach would have actually worked? What have been preventing people from coming up with something like this?
Re: Cosmopolitan Libc: build-once run-anywhere C library
#7Sorry for being naive, but how can it be possible that nobody had thought of this approach and this approach would have actually worked? What have been preventing people from coming up with something like this?
While this is awesome, it can easily break (zsh already seems to do so) and, as the author states, it is not meant for GUI apps or programs relying deeply on OS APIs, which includes a lot of apps.
Additionaly, it does not solve an important problem. Doing a build for each supported OS is not that hard and easily automated. The actual problem is to be able to reuse code and this is solved for the most part.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#8Re: Cosmopolitan Libc: build-once run-anywhere C library
#9> For an example of how that works, consider the following common fact about C which that's often overlooked. External function calls such as the following: memcpy(foo, bar, n); Are roughly equivalent to the following assembly, which leads compilers to assume that most cpu state is clobbered: I think most modern C and C++ compilers know that memcpy is special and optimize accordingly. I believe some C++ compilers rec…
Re: Cosmopolitan Libc: build-once run-anywhere C library
#10Sorry for being naive, but how can it be possible that nobody had thought of this approach and this approach would have actually worked? What have been preventing people from coming up with something like this?
So while there's probably some interesting historical reasons that explain why there's no "JVM for C++", Splunk is a good example of a modern technical / business model where conquering platform fragmentation was feasible.