Hacker GitHub

← All repos

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

Mentions per year 293 mentions · busiest year 2021 (69)
20082026
  1. Looks like people are already on this case: https://github.com/jart/cosmopolitan/issues/429
  2. …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…
  3. 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…
  4. …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!
  5. 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
  6. …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.
  7. …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...
  8. The Fifth Bell System Interface, Community Edition https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s...
  9. …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...
  10. 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…
  11. …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…
  12. …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…
  13. 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…
  14. …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
  15. …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
  16. 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
  17. 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…
  18. 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!
  19. …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
  20. …I even put the little orange flag on my blog. https://justine.lol/lambda/#binaries See also https://github.com/jart/cosmopolitan#support-vector
  21. …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…
  22. …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.…
  23. …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…
  24. Shannon entropy. https://github.com/jart/cosmopolitan/blob/master/libc/rand/m... You can even measure a program in terms of physics constants too.
  25. 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
  26. …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
  27. 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
  28. …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
  29. …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
  30. …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
  31. …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
  32. …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?
  33. > 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
  34. …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
  35. …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
  36. …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
  37. 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…
  38. 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…
  39. …discover we're using the "wrong" one. Because political winds change, but good engineering endures. https://github.com/jart/cosmopolitan
  40. …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…
  41. …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…
  42. …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...
  43. …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)
  44. 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
  45. …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…
  46. …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/... ]
  47. …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
  48. …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
  49. 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
  50. …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