Cosmopolitan v3.5
Cosmopolitan Libc transforms C into a universal language by modifying GCC and Clang to create a POSIX-compliant polyglot format. Users can compile programs using the `cosmocc` compiler and access debugging techniques. The project provides platform notes, a Discord chatroom, and funding acknowledgments.
Read original articleCosmopolitan Libc is a tool that enables C to be a universal language without requiring an interpreter or virtual machine. It modifies GCC and Clang to produce a POSIX-compliant polyglot format that can run on various platforms. Users can access the `cosmocc` compiler and compile simple programs by following provided instructions. The project offers details on compiling Cosmopolitan from source, debugging techniques using system call logs, function call logs, and GDB, as well as platform notes for Linux, WSL, and other platforms. Additionally, there is a Discord chatroom available for communication with the development team. The project specifies minimum versions and supported platforms, and acknowledges funding sources and supporters. For further details or assistance, users are encouraged to inquire directly.
Related
Trealla Prolog: Compact and efficient Prolog interpreter
Trealla Prolog is a compact interpreter written in C, compliant with ISO Prolog. It supports unbounded integers, UTF-8 atoms, efficient strings, and runs on Linux, Android, and WebAssembly. It offers C integration, SQLite access, concurrency features, and experimental functionalities. The project is open source under the MIT license.
Wc2: Investigates optimizing 'wc', the Unix word count program
The GitHub project "wc2" presents an innovative algorithm for the `wc` program, focusing on asynchronous state-machine parsing in C and JavaScript. It enhances efficiency, scalability, and speed compared to traditional `wc` implementations.
How to run an LLM on your PC, not in the cloud, in less than 10 minutes
You can easily set up and run large language models (LLMs) on your PC using tools like Ollama, LM Suite, and Llama.cpp. Ollama supports AMD GPUs and AVX2-compatible CPUs, with straightforward installation across different systems. It offers commands for managing models and now supports select AMD Radeon cards.
A portable lightweight C FFI for Lua, based on libffi
A GitHub repository offers a portable lightweight C FFI for Lua, based on libffi. It aims for LuaJIT FFI compatibility, developed in C. Includes features, examples, basic types, build instructions, testing, and acknowledgements.
Why are module implementation and signatures separated in OCaml? (2018)
Separation of module implementation and signatures in OCaml enables scalable builds, creation of cmi files, and streamlined interface modifications. Emphasizing abstraction and implementation separation enhances modular programming and system reasoning.
I enjoy doing this too sometimes and don't find it too difficult, but damn...
It's a cool hack but I somehow feel like it should not work.
0 - https://news.ycombinator.com/item?id=40040342
1 - https://docs.pex-tool.org/
2 - https://shiv.readthedocs.io/en/latest/
For now it seems to be more like a framework+toolchain than a standalone library.
Justine wrote:
> We've made a lot of progress reinventing the C++ STL.
What is the motivation behind this? Try to reduce (compiled) binary size? Naively, I am surprised that the C++ STL from Clang isn't OK to use, including the license. Or is this a clean room impl thing?EDIT
To be clear: I mean no disrespect with this question. This is an amazing project.
EDIT 2
Ok, I just spotted this commit message:
https://github.com/jart/cosmopolitan/commit/c4c812c15445f5c3...
> We now have a C++ red-black tree implementation that implements standard
template library compatible APIs while compiling 10x faster than libcxx.Can someone explain to an average C++ programmer like me how they make it compile 10x faster !?
1. Linux 2.x on little-endian MIPS.
> ... , it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format ...
Did POSIX really _approve_ this? if yes, when?
I guess not.
There's way too many readme's that just jump in and assume the reader already is familiar with the project. it's a pet peeve of mine
Related
Trealla Prolog: Compact and efficient Prolog interpreter
Trealla Prolog is a compact interpreter written in C, compliant with ISO Prolog. It supports unbounded integers, UTF-8 atoms, efficient strings, and runs on Linux, Android, and WebAssembly. It offers C integration, SQLite access, concurrency features, and experimental functionalities. The project is open source under the MIT license.
Wc2: Investigates optimizing 'wc', the Unix word count program
The GitHub project "wc2" presents an innovative algorithm for the `wc` program, focusing on asynchronous state-machine parsing in C and JavaScript. It enhances efficiency, scalability, and speed compared to traditional `wc` implementations.
How to run an LLM on your PC, not in the cloud, in less than 10 minutes
You can easily set up and run large language models (LLMs) on your PC using tools like Ollama, LM Suite, and Llama.cpp. Ollama supports AMD GPUs and AVX2-compatible CPUs, with straightforward installation across different systems. It offers commands for managing models and now supports select AMD Radeon cards.
A portable lightweight C FFI for Lua, based on libffi
A GitHub repository offers a portable lightweight C FFI for Lua, based on libffi. It aims for LuaJIT FFI compatibility, developed in C. Includes features, examples, basic types, build instructions, testing, and acknowledgements.
Why are module implementation and signatures separated in OCaml? (2018)
Separation of module implementation and signatures in OCaml enables scalable builds, creation of cmi files, and streamlined interface modifications. Emphasizing abstraction and implementation separation enhances modular programming and system reasoning.