Racket is a general-purpose programming language designed for language-oriented programming, that is, the ability to implement other programming languages and DSLs. Racket is a descendant of Scheme which is itself a dialect of Lisp that began development in 1995 and continues to this day.
Racket is considered to be an excellent language for learning computer science, specifically the discipline of compiler design. The language has both a runtime and a JIT (just in time) compiler. It has a very expressive macro engine that goes well beyond the typical text-replacement macros common to the C preprocessor. Rather, racket macros are baked into Racket parser itself and can be used to extend the language and add new features on the fly.
Racket has its own package manager, raco.
USE flags for dev-scheme/racket General purpose, multi-paradigm Lisp-Scheme programming language
||Build Racket on Chez (Racket CS)|
||Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally|
||Enable racket/future library for fine-grained hardware parallelism|
||Enable support for the iconv character set conversion library|
||Enable just-in-time compilation for improved performance. May prevent use of some PaX memory protection features in Gentoo Hardened.|
||Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)|
||Add ncurses support for expeditor (REPL expression editor)|
||Enable racket/place library for share-nothing parallelism and message-passing communication. Compared to futures, places are heavyweight, but they have a simpler performance model.|
||Enable support for green threads|
emerge --ask dev-scheme/racket
emerge --ask --depclean --verbose dev-scheme/racket
If manually installing any Racket packages in the installation scope, then they might have created some files inside /usr/share/racket/pkgs.
Those files can be cleaned up by removing them with rm as follows:
rm -r /usr/share/racket/pkgs
Installing Racket packages
Natively via Portage
To install Racket packages in the installation scope in a more controlled way, users may wish to use Portage for this task. Currently this is one of the aims of the "Gentoo-Racket" project.
Gentoo-Racket is maintaining the "Gentoo-Racket overlay" on the official GitLab instance.
The overlay can be installed by using the "Eselect/Repository eselect-repository" tool:
eselect repository enable racket-overlay
Via Racket's Package Manager, Raco
Raco is the built-in package manager of Racket, it can install packages via the following:
raco pkg install --user
Please use the switch --user to install packages in the user scope. Installation in user scope should be the default but it can be also configured to install packages globally, in the installation scope.
- Raku — a high-level, general-purpose, and gradually typed programming language with low boilerplate objects, optionally immutable data structures, and an advanced macro system.
- The Racket Subreddit