13

I have installed MIT Scheme from the instructions here on my laptop running Yosemite. I can get the scheme interpreter from Terminal, but none of my arrow keys seem to working. For any typing mistakes I make I cannot go back and correct it. I have to use backspace or re-type the whole thing.

Left arrow prints ^[[D

Right arrow prints ^[[C

Up arrow prints ^[[A

Down arrow prints ^[[B

Here's a screenshot:

screnshot showing arrow keys at work, not

3
  • As it is said in the page you linked, you should use Emacs to interact with the Scheme interpreter. For a more friendly interaction, you could also use Racket instead of Scheme, with its own IDE.
    – Renzo
    Commented Aug 2, 2015 at 5:43
  • So, there is no other way to make it work in Terminal? Thanks for the tip of Racket. I will start using that instead.
    – avi
    Commented Aug 2, 2015 at 6:06
  • As you said, in terminal you have to use backspace or re-type the whole thing.
    – Renzo
    Commented Aug 2, 2015 at 6:08

1 Answer 1

19

You could use rlwrap. Which is a wrap around the Readline. After installing in your system, just run as:

$ rlwrap mit-scheme

And it should work. There is a tutorial.

Even if it can be done, it doesn't mean you should. MIT-scheme already provides the Edwin editor, which is an emacs like editor, that works great. I use it everyday. It also comes with a graphical debugger. Your other options would be emacs+Geiser (or Greg's racket-mode), with guile or racket. Or DrRacket which is an IDE, with many aids for learning.

4
  • 1
    hey, how do I start Edwin editor? I am doing SICP, thats the reason I have installed MIT Scheme. If you can share some resources/link about MIT Scheme, editor, debugger etc then it would be great.
    – avi
    Commented Aug 4, 2015 at 7:14
  • 1
    to start it directly from the command line $ mit-scheme --edit Take a look at the documentation
    – Rptx
    Commented Aug 4, 2015 at 11:34
  • 1
    docs are here now 👍 Commented Aug 24, 2022 at 11:30
  • My scheme prompt is just scheme as I installed diff version using this, so starting the editor is scheme --edit. mit-scheme --edit returns command not found: mit-scheme which through me for a minute. In case anyone else runs into this...
    – Mote Zart
    Commented Jan 15, 2023 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.