CHICKEN is a Scheme interpreter and compiler with its own extension module system called "eggs". It is capable of compiling Scheme to native code by first compiling Scheme to C.
sudo apt-get install chicken-bin
sudo yum install chicken-bin
sudo pacman -S chicken
sudo emerge -av dev-scheme/chicken
brew install chicken
doas pkg_add -vi chicken
Install MSYS2
Run the MSYS2 MinGW-w64 Shell
Install some prerequesites by running:
pacman -S mingw-w64-cross-toolchain base-devel mingw-w64-x86_64-gcc winpty wget
Download the latest release tarball by typing:
wget https://code.call-cc.org/releases/current/chicken.tar.gz
Extract the tarball by running tar xvf chicken.tar.gz
Enter the extracted directory, for example by typing cd chicken-4.11.0
Run make PLATFORM=mingw-msys install
If you have trouble running csi
, try instead running winpty csi
To use the CHICKEN Scheme REPL, type csi
at the command line.
To compile a Scheme program using CHICKEN, run csc program.scm
, which will create an executable named program
in the current directory.
Chicken Scheme has a lot of modules that can be browsed in the egg index. Eggs are scheme modules that will be downloaded and then compiled by chicken-scheme. In some cases, it might be necessary to install external dependencies using your usual package manager.
You install the chosen eggs with this command:
sudo chicken-install [name of egg]
You may wish to add readline
support to your REPL to make line editing in csi
behave more like you might expect.
To do this, run sudo chicken-install readline
, and then create a file named ~/.csirc
with the following contents:
(use readline)
(current-input-port (make-readline-port))
(install-history-file #f "/.csi.history")