Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis
Last active April 15, 2020 03:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cellularmitosis/5cab4bdbfcfdc18c065633df9f0b8b20 to your computer and use it in GitHub Desktop.
Save cellularmitosis/5cab4bdbfcfdc18c065633df9f0b8b20 to your computer and use it in GitHub Desktop.
"Hello, world!" in Chicken Scheme

Blog 2019/9/8

<- previous | index | next ->

"Hello, world!" in Chicken Scheme

Install Chicken Scheme

On Debian Linux:

sudo apt-get install chicken-bin

On Mac:

brew install chicken.

Create hello.scm

hello.scm:

(display "Hello, world!")
(newline)

Write a Makefile

On Linux:

Makefile:

hello: hello.c
        gcc -I/usr/include/chicken -lchicken -o hello hello.c

hello.c: hello.scm
        chicken hello.scm

clean:
        rm -f hello hello.c

.PHONY: clean

On Mac, you'll need to use -I/usr/local/include/chicken instead.

Run make

$ make
chicken hello.scm
gcc -I/usr/include/chicken -lchicken -o hello hello.c
$ ./hello 
Hello, world!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment