c-repl
read-eval-print loop for C
Install
- All systems
-
curl cmd.cat/c-repl.sh
- Debian
-
apt-get install c-repl
- Ubuntu
-
apt-get install c-repl
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install c-repl
- Raspbian
-
apt-get install c-repl
- Dockerfile
- dockerfile.run/c-repl
c-repl
read-eval-print loop for C
Many programming languages come with a REPL (read-eval-print loop), which allows you to type in code line by line and see what it does. This is quite useful for prototyping, experimentation, and debugging code. Other programming languages, and especially C, use a "compile-run" model, and don't provide a REPL. Let's fix that. This approach is actually more of a read-eval loop, as c-repl doesn't know anything about the types and parse trees of the code it's running. But unlike other approaches to solving the "C interpreter" problem, c-repl works directly with unmodified libraries and system headers. This means you can experiment with a new library without writing a test program or any bindings. Or just use it as a simple calculator, content in knowing it is much faster than your neighbors using irb, like driving a Ferarri on city streets.