Skip to content

Instantly share code, notes, and snippets.

@greghendershott
Created September 1, 2018 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghendershott/20b0011372d95813130da2dc6c507f53 to your computer and use it in GitHub Desktop.
Save greghendershott/20b0011372d95813130da2dc6c507f53 to your computer and use it in GitHub Desktop.
Say that /tmp/ex.rkt is
#lang racket
(define x 42)
x
Now:
$ racket
Welcome to Racket v6.10.
> ,h
,h
; Available commands:
; help (h ?): display available commands
; exit (quit ex): exit racket
; cd: change the current directory
; pwd: display the current directory
; shell (sh ls cp mv rm md rd git svn): run a shell command
; edit (e): edit files in your $EDITOR
; drracket (dr drr): edit files in DrRacket
; apropos (ap): look for a binding
; describe (desc id): describe a (bound) identifier
; doc: browse the racket documentation
; require (req r): require a module
; require-reloadable (reqr rr): require a module, make it reloadable
; enter (en): require a module and go into its namespace
; toplevel (top): go back to the toplevel
; load (ld): load a file
; backtrace (bt): see a backtrace of the last exception
; time: time an expression
; trace (tr): trace a function
; untrace (untr): untrace a function
; errortrace (errt inst): errortrace instrumentation control
; profile (prof): profiler control
; execution-counts: execution counts
; coverage (cover): coverage information via a sandbox
; switch-namespace (switch): switch to a different repl namespace
; syntax (stx st): set syntax object to inspect, and control it
; check-requires (ckreq): check the `require's of a module
; log: control log output
; install!: install xrepl in your Racket init file
> ,en /tmp/ex.rkt
,en /tmp/ex.rkt
42
"/tmp/ex.rkt"> x
x
42
Now edit ex.rkt to change x to 999 and save the file. Then:
"/tmp/ex.rkt"> ,en /tmp/ex.rkt
,en /tmp/ex.rkt
[re-loading /tmp/ex.rkt]
999
"/tmp/ex.rkt"> x
x
999
"/tmp/ex.rkt">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment