Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis cellularmitosis/README.md
Last active Oct 15, 2019

Embed
What would you like to do?
"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
You can’t perform that action at this time.