Earlier quoted context omitted.
Author here. That's not an inherent limitation. See https://justine.lol/apelife/index.html for an example of a GUI + TUI that's built using Cosmopolitan. The reason why I said what you quoted, is I'm simply trying to calibrate expectations. I don't view desktop GUIs as a productive area of focus, because there's such a lack of consensus surrounding the APIs that requires, and web browsers do a great job. As for sizeo…
Regarding consensus desktop APIs, maybe it's time to re-invent/-introduce Win32s ;) (Although adding that to the library would add considerable bloat, and cross-platform runtime dynamic linking or a "dynamic polyfill" might be a bit beyond the scope of this) Or raw X11 protocol, of course (WSL made X11 servers on Win10 quite common, and . If that wouldn't be so horrible, it would be interesting how small one could ge…
Cosmopolitan Libc: build-once run-anywhere C library
161–170 of 171 posts
Re: Cosmopolitan Libc: build-once run-anywhere C library
#162Btw maybe the project description needs to state explicitly that it works only on x86 ? "C" for me is first and foremost portability :D Got more ARM64 and PowerPC machines around than I got x86.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#163Earlier quoted context omitted.
Author here. WebAssembly has played an important role protecting CI on the Internet and it's cool that it enables us to run LLVM in the browser. I was very surprised when I learned that some people were using it offline outside of browsers, since doing so requires a JVM-like runtime such as wasmtime. Cosmopolitan proves that it's possible to just fix C instead, which might fix all the stuff that's built on top of C t…
excuse my ignorance on this, but this sounds amazing. game changing. yet it's being "served" here on ice. casually. what am I missing?
When software was deployed on floppy disks and there were 10k architectures going around, portability was critical to expand the market reach of any distributed software.
But in the modern age when the software runs "in the cloud" and there are dominant platforms out there, turns out that portability doesn't matter - nobody is changing platforms when they don't need to.
So this makes this achievement a pretty cool demo without any industry impact, since people don't distribute C binaries anymore.
The idea behind it and the technology developed is pretty cool :)
Re: Cosmopolitan Libc: build-once run-anywhere C library
#164Earlier quoted context omitted.
What is a way to fix this? Is this some part of an endless long-cycle of adoption for social networks over some kind of crossing-the-chasm style adoption curve? Or is there a structural way to fix it? Stackoverflow is better than its predecessors, but clearly is much less valuable now than for its first few 5 years or so.
It's not just that social networks go bad the way cheese goes bad, but also that any "social network" business becomes opposed to the interests of its user base at the moment it becomes a "sustainable" business (e.g. the users would want 100% of the surplus to go to improving the system, but management, employees, investors and such won't agree) Once you are #1 in the Google Economy there are many reasons to say "why…
I had the notion their membership was limited, like a country club or fraternity or something, to a fixed number. To join, someone else had to first leave. I can't now confirm this, so I probably misremembered. Regardless, I've always liked this idea.
Wiki claims a distinction between virtual communities and social medias. The Well, MetaFilter, Ravelry and others have membership fees. Some have verified identities. Those frictions would certainly deter most dysfunction, antisocial behaviors now plaguing social medias.
I think curated social media is mostly fruitless. Having done a lot of online moderation, I honestly don't know how u/dang and others pull it off.
Culture and civility is much easier with preventative measures, like verified identity.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#165By not marking all memory as clobbered for a call to memcpy, couldn't the memcpy overwrite a local variable, in which case reads post memcpy could miss the updated value?
> The above two compiles used the same gcc flags
Why does the before have frame pointers and post does not?
Re: Cosmopolitan Libc: build-once run-anywhere C library
#166Earlier quoted context omitted.
Speaking as someone who would love to see WebAssembly succeed as a cross-platform, cross-language way for me to write sandboxed plugins and CLI utilities, I do have to point out that, for out-of-browser use, WASM's MVP does regress various things: * https://00f.net/2018/11/25/webassembly-doesnt-make-unsafe-la... * https://www.usenix.org/system/files/sec20-lehmann.pdf (eg. Under WebAssembly's memory model, dereferenci…
> Under WebAssembly's memory model, dereferencing NULL=0 won't lead to a segfault. Thanks that's a curious one. It won't always lead to a segfault with a conventional compiler either, undefined behaviour being what it is. [0][1] Fortunately GCC can be asked to add such checks at runtime, [2] this approach could also be taken with WebAssembly. [0] https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63... [1] htt…
Re: Cosmopolitan Libc: build-once run-anywhere C library
#167Re: Cosmopolitan Libc: build-once run-anywhere C library
#168Re: Cosmopolitan Libc: build-once run-anywhere C library
#169Any chance this could be made to work with tcc instead of gcc on Windows? I don't understand enough of how it is tied into gcc and linux to even take a shot at it.
Author here. tcc is tired and chibicc is wired. Check out https://github.com/jart/cosmopolitan/blob/master/third_party... where I've been working on building a 300kb actually portable executable c11 compiler + assembler + linker that supports all the best gnu extensions.
Re: Cosmopolitan Libc: build-once run-anywhere C library
#170Impressive and well written article. But unfortunately I get an error message when attempting to run from a cmd line in Windows 10. C:\Users\Foo>emulator.com -t life.com "This app can't run on your PC" Maybe I missed something?