A Friendly Introduction to Racket
Article URL: https://geometridae.bearblog.dev/a-friendly-introduction-to-racket/ Comments URL: https://news.ycombinator.com/item?id=49399898 Points: 185 # Comments: 92
Lisp is a programming language that's worth learning for the profound enlightenment experience it offers. It was invented by John McCarthy at MIT in 1958, making it the second-oldest high-level language still in use today. Lisp was the language of artificial intelligence for decades, and it has given rise to modern ideas. In 1975, Gerald Sussman and Guy Steele created Scheme, a minimalist and elegant Lisp dialect.
Scheme became a favorite for teaching programming in academia, with the SICP book being written in Scheme. In 1995, Matthias Felleisen's group created PLT Scheme, later renamed Racket in 2010. Racket is more than just a Scheme; it's a language for building languages.
Racket has two main areas: the definitions area at the top for writing your program and the interactive REPL at the bottom for experimenting live. To specify the language, write the desired language name on the first line of the definitions area. To use the terminal, the racket command provides a REPL, while raco manages packages and tools. Lisp's syntax is simple: every expression is an operator followed by arguments in parentheses, with no precedence rules or special syntax.
Functions are anonymous using lambda, and lists are the fundamental structure in Lisp. Quotes tell Racket not to evaluate something, treating it as data instead. Racket's graphics libraries allow you to create visualizations easily. In Lisp, you don't think in terms of repeating operations but rather focus on base cases and how to progress toward them. Racket's built-in homoiconicity allows you to build programs with programs, making macros a natural part of the language.
Alan Kay called Lisp the Maxwell's equations of software, stating that it's a tiny core from which everything else can be derived.
Written by urgent.news from Hacker News Best's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.
- A Friendly Introduction to Racket geometridae.bearblog.dev