jart/cosmopolitan
View on GitHub ↗ ★ 21,431 C
build-once run-anywhere c library
293 mentions on Hacker News by 135 people: 24 stories, 269 comments · first 2020-06-20 · latest 2026-10-11
20082026
-
…runs on M1 Macs with ARM. Daniil Kulchenko pulled off an impressive hack to make that possible. https://github.com/jart/cosmopolitan/issues/429 Redbean also works great on Windows ARM https://youtu.be/CQ7Npip88Yw As for Linux ARM, we're…
comment by jart · 2022-08-16 · in Redbean web server debugging with ZeroBrane Studio -
…because the difficulty in making graphics cross-platform [0]. Maybe Cosmopolitan circa 2032? [0]: https://github.com/jart/cosmopolitan/issues/35#issuecomment-... .
comment by actuallyalys · 2022-08-16 · in Win32 Is the Only Stable ABI on Linux? -
…seeing something I helped with on the front page of HN[1]. Thanks for the shoutout Justine! [1] https://github.com/jart/cosmopolitan/pull/490
comment by Toaster-King · 2022-08-07 · in Using Landlock to Sandbox GNU Make -
…how to approach implementing this feature. - https://news.ycombinator.com/item?id=32376870 From https://github.com/jart/cosmopolitan#support-vector , supported platforms are Windows, Linux, Mac OS X, FreeBSD, OpenBSD, and NetBSD, on AMD…
comment by yjftsjthsd-h · 2022-08-07 · in Using Landlock to Sandbox GNU Make -
Cosmopolitan Libc Makefile fixes this. And it does it with plain ordinary GNU Make. https://github.com/jart/cosmopolitan/blob/master/Makefile It even has Landlock LSM based sandboxing for strict dependency checking.…
comment by jart · 2022-08-05 · in Keeping a project bisectable -
…Windows' approach always seemed more sensible in the first place. But it's a step worth noting. [1] https://github.com/jart/cosmopolitan/issues/426 [2] https://man7.org/linux/man-pages/man7/vdso.7.html [3]…
comment by comex · 2022-07-29 · in Linux RNG RFC Patch: implement getrandom() in vDSO -
…systems unmodified. Cosmopolitan is an incredibly cool project that does more than you think. https://github.com/jart/cosmopolitan
comment by DenseComet · 2022-07-28 · in Rust is actually portable -
…to me. The library this is built on does have a bit of a weakness with respect to GUI software https://github.com/jart/cosmopolitan/issues/35 if this can be fixed this will be an amazing tool for building simple cross platform utilities…
comment by techdragon · 2022-07-28 · in Rust is actually portable -
…format headers (a genius hack nonetheless from Justine) Its a lot more then that. Look at the code. https://github.com/jart/cosmopolitan You compile an executable with flags --nostdlib and --nostdinc because it includes cross platform…
comment by ActorNightly · 2022-07-27 · in Python is Actually Portable -
…uses a polyglot to tell if the processor is running in real mode or long mode within its DOS stub. https://github.com/jart/cosmopolitan/blob/066ed2b2b229dce4d1... APE is also a legal EXE file because it has the MZ header. However... I…
comment by jart · 2022-07-27 · in Python is Actually Portable -
Here's the latest update on TLS https://github.com/jart/cosmopolitan/blob/master/libc/runtim... We need to rewrite the x86 binary code at runtime in order to support it on Mac/Windows. I managed to speed it up from 30ms down to 1ms of…
comment by jart · 2022-07-27 · in Python is Actually Portable -
…the tool to make the default virtual memory limit equal to the total amount of physical ram. https://github.com/jart/cosmopolitan/commit/7f966de48987f79a... I hope this addresses your concern. No default limit is going to be perfect. Some…
comment by jart · 2022-07-15 · in Show HN: Porting OpenBSD Pledge() to Linux -
As you wish. I've just pushed a change removing the restriction on MAP_POPULATE. https://github.com/jart/cosmopolitan/commit/ccd057a85daf0d2d... Now that we have -n (maximum niceness flag) I doubt anyone will object. If your app is public…
comment by jart · 2022-07-14 · in Show HN: Porting OpenBSD Pledge() to Linux -
…FreeBSD behavior which we polyfill on Linux using MAP_GROWSDOWN. See our docs for further details. https://github.com/jart/cosmopolitan/blob/0a589add4167c1b587...
comment by jart · 2022-07-14 · in Show HN: Porting OpenBSD Pledge() to Linux -
…person on earth who's written a libc for that many platforms. Here's what I learned. If you look at https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s... you can see that there's a point in history where consensus between systems…
comment by jart · 2022-07-14 · in Show HN: Porting OpenBSD Pledge() to Linux -
…NOPs into function calls at runtime for all locking operations as soon as clone() is called. https://github.com/jart/cosmopolitan/blob/5df3e4e7a898d223ce... The big ugly macro that makes it work is here…
comment by jart · 2022-07-06 · in Python 3.11 vs 3.10 performance -
The code is interesting: https://github.com/jart/cosmopolitan/blob/master/tool/viz/me... Feels really old school. Looks like something from people used to write DOS programs.
comment by marcodiego · 2022-07-05 · in Memzoom – view/monitor the raw memory of processes/files in your UTF-8 terminal -
I use chibicc to generate the documentation for cosmopolitan. https://github.com/jart/cosmopolitan/blob/master/third_party... I added many of the GNU extensions too, including an assembler. https://github.com/jart/cosmopolitan/blob/master/t…
comment by jart · 2022-07-01 · in OpenBSD has two new C compilers: chibicc and kefir -
Looks like people are already on this case: https://github.com/jart/cosmopolitan/issues/429
comment by zimpenfish · 2022-06-20 · in Redbean 2.0 turned into more than a hobby project -
…focus of the project. redbean runs on RHEL5+ (c. 2007) and Windows Vista+ (c. 2006) by default. See https://github.com/jart/cosmopolitan/#support-vector Lua is real nice and I offer support services too. See my email at…
comment by jart · 2022-06-19 · in Redbean 2.0 turned into more than a hobby project -
Try this: git clone https://github.com/jart/cosmopolitan cd cosmopolitan make -j8 o//third_party/python/python.com Then put Django in the zip under the .python directory. You can also use the `.args` file just like redbean to have `-m…
comment by jart · 2022-06-18 · in Redbean 2.0 turned into more than a hobby project -
…need the fifty or so lines of the log. Since that tells me which system call is likely the culprit. https://github.com/jart/cosmopolitan/issues Alternatively you could email it to me: jtunney@gmail.com Thanks!
comment by jart · 2022-06-18 · in Redbean 2.0 turned into more than a hobby project -
next step is to use https://github.com/jart/cosmopolitan to build the binary
comment by homarp · 2022-06-17 · in Bundling binary tools in Python wheels -
…intent was to only use the UNIX APIs which I believe will be stable since they're much more public. https://github.com/jart/cosmopolitan/issues/426 New 2.0.2 release available on https://redbean.dev which includes the fix.
comment by jart · 2022-06-17 · in Redbean 2.0 turned into more than a hobby project -
…issues with MacOS running 2.0? I may have just missed a step, but I started an issue nonetheless. https://github.com/jart/cosmopolitan/issues/426#issue-127445...
comment by elamje · 2022-06-17 · in Redbean 2.0 turned into more than a hobby project -
The Fifth Bell System Interface, Community Edition https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s...
comment by jart · 2022-06-17 · in Redbean 2.0 turned into more than a hobby project -
…repository, we've always had a PNG file checked-in to cope with these kinds of situations. https://github.com/jart/cosmopolitan/blob/master/libc/dns/dn...
comment by jart · 2022-06-16 · in Redbean 2.0 turned into more than a hobby project -
That's one of our goals! We recently started porting libcxx: https://github.com/jart/cosmopolitan/tree/master/third_party... This week we're working on getting the complex math functions in, thanks to Musl and one of our most productive…
comment by jart · 2022-06-16 · in Redbean 2.0 turned into more than a hobby project -
…add branches, for things like bit overflow carrying in arithmetic operations. One example is https://github.com/jart/cosmopolitan/blob/master/third_party... which I wrote to make the NSA curve much faster. I've been meaning to upstream…
comment by jart · 2022-06-16 · in Redbean 2.0 turned into more than a hobby project -
…already took care of that for you, by rewriting the GNU runtimes. Also this, from a GitHub issue ( https://github.com/jart/cosmopolitan/issues/354#issuecomment... ): > Probably related to #399. The recommended approach would be to use a…
comment by capableweb · 2022-06-16 · in Redbean 2.0 turned into more than a hobby project -
I wonder how fast it is compared to djbsort https://github.com/jart/cosmopolitan/blob/master/libc/nexgen... and longsort https://github.com/jart/cosmopolitan/blob/e011973593407f576d... djbsort is outrageously fast for 32-bit ints with avx2…
comment by jart · 2022-06-04 · in Vectorized and performance-portable Quicksort -
…expressing my opinion of your software makes you unhappy, that's not my problem, it is yours. [1]: https://github.com/jart/cosmopolitan/issues/11
comment by ghoward · 2022-05-23 · in Logging C Functions -
…tests of huge existing projects that use libc, e.g. Python. Try running this on Linux: git clone https://github.com/jart/cosmopolitan.git cd cosmopolitan make -j16 o//third_party/python That command will build Python and all its…
comment by jart · 2022-05-20 · in Logging C Functions -
The Cosmopolitan Libc _start() function starts by intercepting the --ftrace flag. https://github.com/jart/cosmopolitan/blob/master/libc/runtim... If it exists, then it opens and sorts of the symbol table from the elf binary.…
comment by jart · 2022-05-20 · in Logging C Functions -
Here's the reference I use for VT100 ANSI control sequences: https://github.com/jart/cosmopolitan/blob/c6bbca55e9f977e386... I created this reference because there wasn't one available before that could be easily copy/pasted into GNU C or…
comment by jart · 2022-05-18 · in Everything you ever wanted to know about terminals -
Hi I'm one of the people cited by the article. Fraktur is awesome. I implemented it in my terminal. https://github.com/jart/cosmopolitan/blob/c6bbca55e9f977e386... Now that unicode makes it easy, there's no excuse not to have fraktur!
comment by jart · 2022-05-18 · in Everything you ever wanted to know about terminals -
▲ 2
Build-Once Run-Anywhere C lib that runs on Linux, Windows, macOS, BSDs and morestory by capableweb · 2022-05-03 · 1 comment
-
…and uses reference counting. Have you ever seen a garbage collector that uses the NSA instruction? https://github.com/jart/cosmopolitan/tree/master/tool/plinko
comment by jart · 2022-04-09 · in The underwhelming impact of software engineering research -
…I even put the little orange flag on my blog. https://justine.lol/lambda/#binaries See also https://github.com/jart/cosmopolitan#support-vector
comment by jart · 2022-04-05 · in The cult of Amiga and SGI, or why workstations matter -
…all the VAX/OS2/DOS/Amiga code from GNU Make and it ended up being 201,049 lines of deletions. https://github.com/jart/cosmopolitan/commit/10a766ebd07b7340... A lot of what I do with Cosmopolitan Libc is because it breaks my heart how in…
comment by jart · 2022-04-05 · in The cult of Amiga and SGI, or why workstations matter -
…Kilo editor or Linenoise) on how to build your own version of the `strace` command in pure C. https://github.com/jart/cosmopolitan/blob/master/tool/build/... If you monitor the system interfaces then you don't need to read the source code.…
comment by jart · 2022-03-25 · in Ask HN: Why aren't devs making desktop apps any more? -
…is basically that. It also uses plain old GNU Make so it's not snowflake. Example build config: https://github.com/jart/cosmopolitan/blob/master/tool/decode... So far managed to port a lot of programming languages like Python including its…
comment by jart · 2022-03-15 · in I cannot write software outside of Google anymore -
Shannon entropy. https://github.com/jart/cosmopolitan/blob/master/libc/rand/m... You can even measure a program in terms of physics constants too.
comment by jart · 2022-03-14 · in Things That Turbo Pascal Is Smaller Than (2011) -
Spoiler alert git clone https://github.com/jart/cosmopolitan cd cosmopolitan make -j8 o//third_party/quickjs/qjs.com Build it on Linux but it runs anywhere. https://github.com/jart/cosmopolitan/tree/master/third_party... Here's a prebuilt…
comment by jart · 2022-03-08 · in QuickJS JavaScript Engine -
…For instance, rather than processing data at 16kbps it's able to do things like crc32 at 22gBps https://github.com/jart/cosmopolitan/blob/d6a039821f927cc81b... and memset goes 126gBps https://github.com/jart/cosmopolitan/blob/d6a039821f927c…
comment by jart · 2022-02-28 · in Lambda Calculus in 400 Bytes -
Got you covered. https://github.com/jart/cosmopolitan/blob/master/examples/ru... $ git clone https://github.com/jart/cosmopolitan && cd cosmopolitan $ make -j8 o//examples/rusage.com o//examples/hello.com $ o//examples/rusage.com…
comment by jart · 2022-02-07 · in Nim vs Rust Benchmarks -
…on a physical computer running Linux should be 25µs. That's two orders of a magnitude difference. https://github.com/jart/cosmopolitan/blob/master/test/libc/s...
comment by jart · 2022-02-07 · in Nim vs Rust Benchmarks -
…your platform after the first run, so it can be fast and efficient for subsequent executions. [1] https://github.com/jart/cosmopolitan
comment by mimimi31 · 2022-01-28 · in On self-modifying executables in Rust -
…Bazel is nice, but these days I'm running a small scrappy operation, so I just use GNU Make. https://github.com/jart/cosmopolitan/blob/7064d736e3ded15087... I like Make since it's able to build a repository with 17k .o files, 80 .a…
comment by jart · 2021-12-21 · in Show HN: Lisp with GC in 436 Bytes -
…Others: - C/C++ has linker to link all to one binary - CLI/webserver only https://github.com/jart/cosmopolitan like https://redbean.dev . Same exe works on many x64 OS like Windows/macOS/Linux/BSD, it embeds .zip file and can read/w
comment by xet7 · 2021-11-26 · in Enigma Virtual Box – Application Virtualization System for Windows