Racket
A relatively popular Scheme implementation, among other things. Built, in part, as a programming language design playground/sandbox. Intended in no small part to be useful in education. Racket also includes a number of other Lisp implementations and a few other programming languages besides.
(www.racket-lang.org) Racket website
ROAM_REFS: https://www.racket-lang.org/
(docs.racket-lang.org) Racket Documentation documentation
ROAM_REFS: https://docs.racket-lang.org/
(docs.racket-lang.org) The Racket Reference
ROAM_REFS: https://docs.racket-lang.org/reference/
** The Racket Reference
Matthew Flatt
and PLTThis manual defines the core Racket language and describes its most prominent libraries. The companion manual The Racket Guide provides a friendlier (though less precise and less complete) overview of the language.
The source of this manual is available on [[https://github.com/racket/racket/tree/master/pkgs/racket-doc/scribblings/reference][GitHub]].#lang racket/base #lang racket
Unless otherwise noted, the bindings defined in this manual are exported by the racket/base and racket languages.
- (docs.racket-lang.org) 3.2 Importing and Exporting: require and provide
ROAM_REFS: https://docs.racket-lang.org/reference/require.html
- (docs.racket-lang.org) 6.2 Module Syntax
ROAM_REFS: https://docs.racket-lang.org/guide/Module_Syntax.html
** Module Syntax
The
#lang
at the start of a module file begins a shorthand for a module form, much like'
is a shorthand for a quote form. Unlike'
, the#lang
shorthand does not work well in a REPL, in part because it must be terminated by an end-of-file, but also because the longhand expansion of#lang
depends on the name of the enclosing file.- (docs.racket-lang.org) 6.2.2 The #lang Shorthand
ROAM_REFS: https://docs.racket-lang.org/guide/Module_Syntax.html#(part._hash-lang)
* The #lang Shorthand
The body of a
#lang
shorthand has no specific syntax, because the syntax is determined by the language name that follows#lang
.In the case of
#lang racket
, the syntax is[[https://docs.racket-lang.org/guide/Module_Syntax.html#(part._hash-lang)][#lang]] [[https://docs.racket-lang.org/reference/index.html][racket]]
decl [[https://docs.racket-lang.org/reference/stx-patterns.html#(form._((lib._racket/private/stxcase-scheme..rkt)._......))][...]]
which reads the same as
(module name racket
decl ...)
where name is derived from the name of the file that contains the
#lang
form.The
#lang racket/base
form has the same syntax as#lang racket
, except that the longhand expansion usesracket/base
instead ofracket
. The#lang scribble/manual
form, in contrast, has a completely different syntax that doesn't even look like Racket, and which we do not attempt to describe in this guide.Unless otherwise specified, a module that is documented as a “language” using the
#lang
notation will expand tomodule
in the same way as#lang racket
. The documented language name can be used directly withmodule
orrequire
, too.
- (docs.racket-lang.org) 6.2.2 The #lang Shorthand
(docs.racket-lang.org) raco: Racket Command-Line Tools
ROAM_REFS: https://docs.racket-lang.org/raco/
** raco: Racket Command-Line Tools
The raco program supports various Racket tasks from a command line. The first argument to raco is always a specific command name. For example, raco make starts a command to compile a Racket source module to bytecode format.
The set of commands available through raco is extensible. Use raco help to get a complete list of available commands for your installation. This manual covers the commands that are available in a typical Racket installation.
(docs.racket-lang.org) The Racket Graphical Interface Toolkit
ROAM_REFS: https://docs.racket-lang.org/gui/index.html
** The Racket Graphical Interface Toolkit
Matthew Flatt,
Robert Bruce Findler,
and John Clements(require racket/gui/base)
package: gui-lib
The racket/gui/base library provides all of the class, interface, and procedure bindings defined in this manual, in addition to the bindings of racket/draw and file/resource.
#lang racket/gui
package: gui-lib
The racket/gui language combines all bindings of the racket language and the racket/gui/base and racket/draw modules.
The racket/gui toolbox is roughly organized into two parts:
- The windowing toolbox, for implementing windows, buttons, menus, text fields, and other controls.
- The editor toolbox, for developing traditional text editors, editors that mix text and graphics, or free-form layout editors (such as a word processor, HTML editor, or icon-based file browser).
Both parts of the toolbox rely extensively on the racket/draw drawing library.
(docs.racket-lang.org) The Racket Drawing Toolkit
ROAM_REFS: https://docs.racket-lang.org/draw/index.html
** The Racket Drawing Toolkit
Matthew Flatt,
Robert Bruce Findler,
and John Clements(require racket/draw)
package: draw-lib
The racket/draw library provides all of the class, interface, and procedure bindings defined in this manual.
(docs.racket-lang.org) Datalog: Deductive Database Programming logic
ROAM_REFS: https://docs.racket-lang.org/datalog/
Datalog is
- a declarative logic language in which each formula is a function-free Horn clause, and every variable in the head of a clause must appear in the body of the clause.
- a lightweight deductive database system where queries and database updates are expressed in the logic language.
The use of Datalog syntax and an implementation based on tabling intermediate results ensures that all queries terminate.
(docs.racket-lang.org) SICP Collections
ROAM_REFS: https://docs.racket-lang.org/sicp-manual/index.html
** SICP Collections
This package contains two collections.
The sicp collection contains a #lang sicp language ideal for studying the book "Structure and Interpretation of Computer Programs" by Gerald Jay Sussman and Hal Abelson. The book is usually referred to simply as SICP.
The second sicp-pict collection contains the picture language used in SICP.
- (docs.racket-lang.org) SICP Picture Language
ROAM_REFS: https://docs.racket-lang.org/sicp-manual/SICP_Picture_Language.html
* SICP Picture Language
(require sicp-pict)
package: sicp
** Introduction
The SICP Picture Language is a small language for drawing pictures. It shows the power of data abstraction and closure. The picture language stems from Peter Henderson's 1982 paper "Functional Geometry" and was included by Hal Abelson in "Structure and Interpretation of Computer Programs".
The basic concept of the picture language is a painter, which draws its image (shifted and scaled) within a frame given by a parallelogram. Painters can be combined to construct new painters.
Before using this package, read section 2.2.4 of SICP, which is an excellent introduction to the ideas of the picture language. This manual is meant as a reference guide.
Peter Henderson has written an updated version of Functional Geometry, which explains how to construct the Escher fish image.
(github.com) Racket website
ROAM_REFS: https://github.com/racket
(github.com) racket/racket: The Racket repository
ROAM_REFS: https://github.com/racket/racket
Racket is a general-purpose programming language and an ecosystem for language-oriented programming.
This repository holds the source code for the core of Racket plus some related packages. The rest of the Racket distribution source code is in other repositories, mostly under the Racket GitHub organization.
(github.com) racket/drracket: DrRacket, IDE for Racket
ROAM_REFS: https://github.com/racket/drracket
- drracket
This is the source for the Racket packages: "drracket", "drracket-plugin-lib", "drracket-test", "drracket-tool", "drracket-tool-doc", "drracket-tool-lib", "drracket-tool-test".