A Friendly Introduction to Racket – geometridae
A Friendly Introduction to Racket
11 Aug, 2026
"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it." — Eric S. Raymond
Welcome. Today you'll learn a language from one of programming's oldest and most unusual families. A language where code is data, where parentheses are pure structure, and where programs can write programs. By the end of this tutorial, you'll have written your own syntax.
A bit of history<br>Lisp was born in 1958 , invented by John McCarthy at MIT. For context: it's the second-oldest high-level language still in use (only Fortran, from 1957, beats it by a year). Python arrived in 1991. JavaScript in 1995. Lisp predates them by more than 30 years and several ideas we now consider "modern" were born there:
Garbage collection — invented for Lisp.
First-class functions — passing functions as arguments, now standard everywhere.
The REPL — the interactive read-eval-print loop that Python, Node, and Julia all have today started in Lisp.
Conditionals as expressions — the if that returns a value.
Homoiconicity — code is a data structure of the language itself. This is the big one. We'll come back to it at the end.
For decades, Lisp was the language of artificial intelligence. In the 70s and 80s there were physical computers designed to run Lisp directly: the Lisp Machines built by Symbolics and LMI. Then came the "AI winter," funding dried up, and Lisp went from star to cult language.
But interesting ideas don't die they mutate, that's part of the beauty of the lisps.
From Lisp to Scheme to Racket<br>In 1975, Gerald Sussman and Guy Steele created Scheme : a minimalist, elegant, almost mathematical Lisp. Scheme became academia's favorite language for teaching programming (the legendary book SICP Structure and Interpretation of Computer Programs is written in Scheme).
In 1995, Matthias Felleisen's group created PLT Scheme , a Scheme designed for education and programming language research. In 2010 it was renamed Racket , and today it's much more than a Scheme: it's a language for building languages. Its unofficial motto is language-oriented programming: if your problem needs its own language, Racket lets you build one in an afternoon.
Year<br>Event
1958<br>McCarthy invents Lisp at MIT
1975<br>Sussman and Steele create Scheme
1984<br>Common Lisp is standardized
1995<br>PLT Scheme (now Racket) is born
2007<br>Clojure is born (Lisp on the JVM)
2010<br>PLT Scheme is renamed Racket
Today<br>You, reading this, about to write parentheses UwU
Who uses Lisp today?<br>More people than you might think:
Clojure runs in production at banks, airlines, and startups (Nubank, the largest digital bank in Latin America, runs on Clojure).
Common Lisp (with the SBCL compiler) is still alive in expert systems, flight planning (ITA Software, acquired by Google, powered Google Flights), and scientific computing.
Emacs Lisp — millions of people run Lisp every day without knowing it, because their editor is a Lisp interpreter.
Guile/Guix — an entire Linux distribution configured 100% in Scheme.
Racket has its own annual conference (RacketCon), an active academic and artistic community, and is used for language research, formal verification (Rosette), typography and publishing (Pollen), and education around the world.
And new Lisps keep appearing: Fennel (a Lisp that compiles to Lua, popular for games), Janet , Hy (a Lisp on top of Python)...
Easter egg for TADC fans:
In The Amazing Digital Circus (episode 8, "hjsakldfhl"), when Kinger opens the terminal to try to reset Caine, you can see that Caine (a creative AI built in 1996) is programmed in Lisp. The file is literally named Caine-core.lisp.
Installation (5 minutes)
Go to https://racket-lang.org
Download the installer for your system (Linux, macOS, Windows).
Open DrRacket , the environment that comes included.
DrRacket has two areas: at the top you write your definitions (your program), and at the bottom you have the REPL for live experimentation. On the first line of the definitions area, write:
#lang racket
That line tells Racket which language you're using (remember: Racket is a language factory, so you have to pick one).
If you prefer the terminal: the racket command gives you a REPL, and raco is the package manager and tooling command.
First contact: everything is an expression<br>In the REPL, try:
> (+ 1 2)<br>> (* 3 (+ 2 2))<br>12<br>> (string-append "hello " "world")<br>"hello world"
The rule of Lisp fits in one line:
Everything is (operator argument1 argument2 ...). Always. No exceptions.
There's no operator precedence to memorize, no special syntax for anything. (+ 1 2) adds. (if ...) decides. (define ...) names. The parentheses that look intimidating at first are actually the complete absence of arbitrary rules. After a week, you stop seeing them.
Definitions and functions<br>#lang racket
(define pi-approx 3.14159)
(define (circle-area r)<br>(* pi-approx r...