Install scheme and run helloworld on mac

Scheme programming language was developed by Guy L. Steel and Gerald Jay Sussman at MIT AL Lab in 1975. It is a functional programming language which is a dialect of the programming language Lisp. Scheme follows a minimalist design philosophy specifing a small standard core with powerful tools for language extension. Its source code files are often with the extension “.scm”.

Installing scheme on mac
1. Download and Install the correct binary file (i386 or x86-64) for your computer from this site: http://www.gnu.org/software/mit-scheme/

2. Open the Terminal window, Type the following one at a time. Note: if you downloaded i386, replace the x86-64 with i386 in the below commands.

sudo mkdir /usr/local
sudo mkdir /usr/local/lib
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64
sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme

3. Type scheme in the Terminal window to launch scheme.

Hello world scheme program helloworld.scm

;This is a comment, Hello World Program
(display "Hello World, this is my first Scheme program!!!")

Run the hello world scheme program
First launch the scheme console from Terminal by

sheme

Then type the following to run the program:

(load "helloworld.scm")

To run the above code directly in the scheme console, just type the code in the console.

To quite scheme console window.

(quit)

Search within Codexpedia

Custom Search

Search the entire web

Custom Search