<commit_before>#lang scribble/doc
@(require scribble/manual
          "guide-utils.ss"
          (for-syntax racket/pretty))

@title[#:tag "running" #:style 'toc]{Running and Creating Executables}

While developing programs, many Racket programmers use the
@seclink[#:doc '(lib "scribblings/drracket/drracket.scrbl")
"top"]{DrRacket} programming environment. To run a program without the
development environment, use @exec{racket} (for console-based
programs) or @exec{gracket} (for GUI programs). This chapter mainly
explains how to run @exec{racket} and @exec{gracket}.

@local-table-of-contents[]

@; ----------------------------------------------------------------------

@section[#:tag "racket"]{Running @exec{racket} and @exec{gracket}}

Depending on command-line arguments, @exec{racket} or @exec{gracket}
runs in @seclink["start-interactive-mode"]{interactive mode},
@seclink["start-module-mode"]{module mode}, or
@seclink["start-load-mode"]{load mode}.

@subsection[#:tag "start-interactive-mode"]{Interactive Mode}

When @exec{racket} is run with no command-line arguments (other than
confguration options, like @Flag{j}), then it starts a @tech{REPL}
with a @litchar{> } prompt:

@verbatim[#:indent 2]{
  Welcome to Racket
  > 
}

@margin-note{For information on GNU Readline support, see
@racketmodname[readline].}

To initialize the @tech{REPL}'s environment, @exec{racket} first
requires the @racketmodname[racket/init] module, which provides all of
@racket[racket], and also installs @racket[pretty-print] for display
results. Finally, @exec{racket} loads the file reported by
@racket[(find-system-path 'init-file)], if it exists, before starting<commit_msg>explain gracket a bit better in the Guide<commit_after>#lang scribble/doc
@(require scribble/manual
          "guide-utils.ss"
          (for-syntax racket/pretty))

@title[#:tag "running" #:style 'toc]{Running and Creating Executables}

While developing programs, many Racket programmers use the
@seclink[#:doc '(lib "scribblings/drracket/drracket.scrbl")
"top"]{DrRacket} programming environment. To run a program without the
development environment, use @exec{racket} (for console-based
programs) or @exec{gracket} (for GUI programs). This chapter mainly
explains how to run @exec{racket} and @exec{gracket}.

@local-table-of-contents[]

@; ----------------------------------------------------------------------

@section[#:tag "racket"]{Running @exec{racket} and @exec{gracket}}

The @exec{gracket} executable is the same as @exec{racket}, but with
small adjustments to behave as a GUI application rather than a console
application. For example, @exec{gracket} by default runs in
interactive mode with a GUI window instead of a console prompt. GUI
applications can be run with plain @exec{racket}, however.

Depending on command-line arguments, @exec{racket} or @exec{gracket}
runs in @seclink["start-interactive-mode"]{interactive mode},
@seclink["start-module-mode"]{module mode}, or
@seclink["start-load-mode"]{load mode}.

@subsection[#:tag "start-interactive-mode"]{Interactive Mode}

When @exec{racket} is run with no command-line arguments (other than
confguration options, like @Flag{j}), then it starts a @tech{REPL}
with a @litchar{> } prompt:

@verbatim[#:indent 2]{
  Welcome to Racket
  > 
}

@margin-note{For information on GNU Readline support, see
@racketmodname[readline].}

To initialize the @tech{REPL}'s environment, @exec{racket} first
requires the @racketmodname[racket/init] module, which provides all of
@racket[racket], and also installs @racket[pretty-print] for display
results. Finally, @exec{racket} loads the file reported by
@racket[(find-system-path 'init-file)], if it exists, before starting
{'fraction_non_alphanumeric': 0.157752566180443, 'fraction_numerical': 0.0005402485143165856, 'mean_word_length': 4.61060606060606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3299385', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1127, 'n_words': 364}