[racket] No shortcuts on linux REPL
A few minutes ago, Neil Van Dyke wrote:
> Were this a high priority, there are other line-editing libraries now
> (nobody likes the "readline" license). Or we could make our own (it's
> not hard; just time-consuming to do for all the platforms).
Both were tried. IIRC, the popular alternative is editline, which is
far less popular than readline (in terms of systems that have it
installed by default). There was also a project here for implementing
a readline-like library in scheme, but IIRC it didn't get much farther
than the terminfo functionality.
> But don't know that it's high priority. I'm sure a few people
> (including me) occasionally wish the command-line REPL had "readline" by
> default, but I just made a shell script and moved on. Most of the time
> I need a REPL, I use DrRacket or Quack, anyway, and I think most people
> do that.
>
> #!/bin/sh
> if [ $# = 0 ] ; then
> exec racket -Uilq readline
> else
> exec racket -Ueq "$*"
> fi
xrepl is intentionally making it easy to set up things without such
wrapper scripts... Just add (require xrepl) to your ~/.racketrc (or
whatever it is on Windows/Macs) and you're done. But of course your
script is intentionally avoiding the .racketrc customizations.
But that's just one
feature it has in addition to a friendly repl -- including a
convenient hook to start drracket on the current file.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!