Installing Chicken Scheme on Debian 12¶
Chicken Scheme is a practical and portable implementation of the Scheme programming language. This guide walks you through installing Chicken Scheme on Debian 12, creating a Scheme file, and running it.
Prerequisites¶
Before installing Chicken Scheme, update your system:
Installing Chicken Scheme¶
Chicken Scheme is available in the Debian repositories and can be installed using apt
:
Once installed, verify the installation:
If the installation is successful, you should see output similar to:
Creating and Running a Scheme File¶
- Create a Scheme file:
Use a text editor to create a file, e.g.,hello.scm
:
- Write Scheme code:
Add the following simple Scheme program to print "Hello, World!":
Save the file (CTRL + X
, then Y
, then ENTER
).
- Run the Scheme script:
Usecsi
(Chicken Scheme Interpreter) to execute the file:
This should output:
Running Chicken Scheme in Interactive Mode¶
To start an interactive Chicken Scheme REPL, simply run:
This opens an interactive prompt where you can enter Scheme expressions:
To exit, type:
Uninstalling Chicken Scheme¶
If you want to remove Chicken Scheme, run: