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
-
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 -
…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 -
…can see our latest progress at https://github.com/jacereda/cosmogfx and the screenshots are here https://github.com/jart/cosmopolitan/issues/35#issuecomment-... which we're working hard to polish and get merged into the mainline. If you…
comment by jart · 2021-11-08 · in Why is Excalidraw so good? -
> You of course have to choose your target platform for this (...) https://github.com/jart/cosmopolitan (but, yeah, you probably want one version per target, even if hacks are cool)
comment by e12e · 2021-11-08 · in .NET 6 Released -
…https://justine.lol/printansi.png Program: https://justine.lol/printansi.com Source code: https://github.com/jart/cosmopolitan/blob/master/tool/viz/pr...
comment by jart · 2021-11-07 · in ASCII Paint -
…bloated either since the binary footprint starts at 12kb. See https://justine.lol/ape.html and https://github.com/jart/cosmopolitan Best part is you can still use the compiler that comes with your Linux. All it does is reconfigures the…
comment by jart · 2021-11-07 · in Never update anything -
…all its library dependencies (aka static linking). the super example of this is justine's project https://github.com/jart/cosmopolitan it's pr fucking cool > Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except…
comment by grimgrin · 2021-09-27 · in Designing Low Upkeep Software -
Check out Cosmopolitan which vendors all its dependencies. https://github.com/jart/cosmopolitan You can't use Node with it, yet, but you can use QuickJS if you `make o//third_party/quickjs/qjs.com` and `o/third_party/quickjs/qjs.com -m…
comment by jart · 2021-09-03 · in The Persistent Gravity of Cross Platform -
This is one of the reasons why I've been building Cosmopolitan Libc. https://github.com/jart/cosmopolitan Alpine and Musl aren't radical enough on the bloat-free angle (since they don't fix root problem which is dynamic shared objects) and…
comment by jart · 2021-08-26 · in There is no such thing as a “glibc based alpine image” -
…discover we're using the "wrong" one. Because political winds change, but good engineering endures. https://github.com/jart/cosmopolitan
comment by jart · 2021-08-24 · in IMF working paper suggests using browsing history in credit score calculations -
…a walk in the park. It only takes about a hundred lines of code to create a proper O(n) parser. https://github.com/jart/cosmopolitan/blob/0b317523a0875d83d6... The Joyent HTTP parser used by Node is very good but it's implemented in a way…
comment by jart · 2021-07-31 · in Show HN: Micro HTTP server in 22 lines of C -
…since it's the web server that reads/writes to its own executable zip file as a native process. https://github.com/jart/cosmopolitan/blob/f3e28aa192d433c379... Some ZIP APIs are designed in such a way that you can even use the POPCNT…
comment by jart · 2021-07-23 · in Zip – How not to design a file format -
…iterations running at a couple of order of magnitudes slower before JIT speeds fully kicks in. [0] https://github.com/jart/cosmopolitan/blob/master/libc/nexgen...
comment by lhorie · 2021-06-24 · in Maybe you don't need Rust and WASM to speed up your JS (2018) -
…loss when building for -march=k8. If you build for -march=native then they get DCE'd entirely. See https://github.com/jart/cosmopolitan/blob/master/libc/bits/p...
comment by jart · 2021-06-12 · in The NSA Instruction (2019) -
Already happened; https://github.com/jart/cosmopolitan/pull/185 (Add sqlite3 support to Lua scripts in Redbean) has been merged.
comment by paulclinger · 2021-06-08 · in Althttpd: Simple webserver in a single C file -
…You can help us fix that, because we're working on chibicc, which is like TCC but 10x better. https://github.com/jart/cosmopolitan/blob/master/third_party... It's not there yet. It can be built as an actually portable executable. I already…
comment by jart · 2021-05-26 · in Redbean: Actually Portable Executable Web Server [video] -
…the two lockstep style. It's harder than you'd think. [don't click here if you intend to try that: https://github.com/jart/cosmopolitan/blob/master/tool/build/... ]
comment by jart · 2021-05-20 · in Undefined behavior in C is a reading error -
…binary. There's also an example of how to build TUI panel applications in the examples/ folder. https://github.com/jart/cosmopolitan/blob/master/examples/pa... The canonical example of a Cosmopolitan TUI would be…
comment by jart · 2021-05-17 · in Cosmopolitan Libc 1.0 -
…have on each (yes, they are not the same) and what constants are even available on each of them https://github.com/jart/cosmopolitan/blob/7cbc2bc0838a88ff46...
comment by jart · 2021-05-17 · in Dark Side of Posix APIs -
It looks like the runtime has networking support. https://github.com/jart/cosmopolitan/tree/master/libc/sock
comment by GranPC · 2021-05-17 · in Cosmopolitan Libc 1.0 -
…this, but this will cause problems when /tmp is mounted noexec, which is fairly common for servers: https://github.com/jart/cosmopolitan/blob/da8a08fd58324a87f6... I suppose this level of portability is more a feature if you're shipping to…
comment by nonameiguess · 2021-05-17 · in Cosmopolitan Libc 1.0