Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
Racket


1. Racket
RacketRacket is a functional language that is a dialect of LISP and a descendant of the Scheme. The logo is taken from the Greek "lamba" character «λ» that is used for the name of an anonymous function in functional programming languages.

Racket is a general-purpose programming language as well as the world’s first ecosystem for language-oriented programming. From the Racket web site at https://racket-lang.org/ .

2. CentOS installation
The following Linux command(s) install Racket.
sudo yum -y install epel-release sudo yum -y --enablerepo=epel-testing install racket


3. Verify the version
The following Linux command(s) verify the installed version of Racket.
racket -v

On 2019-08-04 the output was as follows.
Welcome to Racket v7.0.


4. Interactive mode
The following Linux command(s) enter interactive mode.
racket

Then type the following commands interactively, pressing Enter after each command. Press Ctrl-D to exit interactive mode.
(4+3)

On the output was as follows.
7


5. Hello world in Racket
The file type of a Racket program file is rkt.

The following Linux command(s) create/edit a hello program in the your home directory using the nano text editor.
nano ~/hello.rkt

Create the following program text in the editor that will output the text "Hello world"
#lang racket (printf "Hello world\n")

To exit with save, remember to press Ctrl-X, then "y" (for yes) and Enter to exit.

The following Linux command(s) run the program.
racket ~/hello.rkt

The output should be as follows.
Hello world


6. End of page