Arc Forumnew | comments | leaders | submitlogin
2 points by elibarzilay 3089 days ago | link | parent

Note that Racket has readline support: http://docs.racket-lang.org/readline/


1 point by waterhouse 3089 days ago | link

Unfortunately, it doesn't do paren- or quote-matching, and it doesn't interact well with the current arc> prompt.

  $ racket -il readline -f as.scm
  Welcome to Racket v5.0.2.
  Use (quit) to quit, (tl) to return here after an interrupt.
  arc> 
  (+ 1 2)
  3
  arc> 
  "bad"
  "bad"
  arc> 
  (quit)
With access to the underlying Racket, one can (require readline/readline) and do (readline "arc> ") to get the proper prompt, but a) this requires redoing the Arc REPL, either by hacking (tl) in ac.scm or by writing something like (while t (prn:eval:read ($.readline "arc> "))), and b) it still doesn't do the matching, which I find an important feature.

-----

3 points by elibarzilay 3089 days ago | link

Not much to do about the prompt -- racket needs to know how wide the prompt which is why that argument is there.

But the paren matching is definitely possible -- I have "set blink-matching-paren on" in my ~/.inputrc file, and never had any problems with it.

BTW, another advantage of using the racket readline facility is that it's possible to do completion for the toplevel namespace.

-----