In DrRacket I can simply set #lang basic-demo-3, then in REPL say
> let x = 5
> print x
5
In command line I tried
racket -I basic-demo-3
but it doesn't work.
$ racket -I basic-demo-3
Welcome to Racket v8.7 [cs].
> let x = 5
; let: undefined;
; cannot reference an identifier before its definition
; in module: top-level
; [,bt for context]
> ; x: undefined;
; cannot reference an identifier before its definition
; in module: top-level
; [,bt for context]
> ; =: undefined;
; cannot reference an identifier before its definition
; in module: top-level
; [,bt for context]
> 5
>
If you want to use the "basic" language from Beautiful Racket in the command-line REPL, you need to require "setup.rkt" and "elements.rkt" and provide the bindings of "elements.rkt" as well as #%top-interaction #%app #%top #%datum to the expander macro "b-module-begin" in "expander.rkt". If you change the xrepl to use readline, you can enter basic expressions in the REPL, have them be evaluated and use REPL-history. Coloring doesn't work.
Nice catch! I was wrong about this. I see now that current-interaction-info is really about “syntax coloring and indentation support” in the REPL, but the REPL functionality doesn’t require it. Using configure-runtime suffices.