racket
Run Racket programs
TLDR
Start a REPL (interactive shell)
Execute a Racket script
Execute a Racket expression
Run module as a script (terminates option list)
Start a REPL (interactive shell) for the typed/racket hashlang
SYNOPSIS
racket [ options ] [ file ]
PARAMETERS
-v, --version
Display version information and exit.
-h, --help
Display this help message and exit.
file
The Racket source file to execute. If omitted, starts the REPL.
DESCRIPTION
The racket command typically isn't a standard Linux command itself, but rather it refers to using the Racket programming language environment in a Linux environment. Racket is a dialect of Lisp that supports a variety of programming paradigms, including functional, object-oriented, and procedural styles. It features a powerful macro system, supports creating domain-specific languages, and offers a rich set of libraries. When 'racket' is mentioned, it generally implies invoking the Racket interpreter to execute Racket programs or using the Racket interactive environment (REPL).
To "run" a Racket program from the command line, you'd use the `racket` executable followed by the Racket source file. The Racket interpreter will then execute the code in that file. You can also invoke the Racket REPL by simply typing `racket` in the terminal without any arguments. This allows you to interactively execute Racket code line by line. Racket programs usually have a `.rkt` extension.
REPL USAGE
Typing `racket` without arguments will launch the Racket REPL. This is an interactive environment where you can enter Racket expressions and see their results immediately.
FILE EXECUTION
To execute a Racket program stored in a file (e.g., `myprogram.rkt`), use the command `racket myprogram.rkt`.