DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

MIT Scheme Development on Ubuntu


  1. sudo apt-get mit-scheme;

  2. run "scheme" then you enter the command line scheme repl;

  3. sudo apt-get emacs;

  4. modify "(setq scheme-program-name "scm")" in .emacs to "(setq scheme-program-name "scheme")", because our scheme command is "scheme";

  5. install quack with apt-get install emacs-goodies-el;

  6. open emacs and create a new buffer with "C-x C-f myfile.scm";

  7. input following code:

    (define (mydouble x) 
        (+ (* x 2) 10))
    
  8. save file: C-x C-s;

  9. split window: C-x 2;

  10. switch to bottom window: C-x o;

  11. start scheme repl at bottom window: M-x run-scheme

  12. switch back to top window: C-x o;

  13. parse code: C-x C-e;

  14. switch back to bottom window(C-x o) and run "(mydouble 3)", you got 16;

  15. modify source file in upper window and parse it again (C-x C-e);

  16. run "(mydouble 3)" again, now you get another value;

Ref: A tutorial for using Emacs with Scheme



Published

Sep 22, 2013

Last Updated

Sep 22, 2013

Category

Tech

Tags

  • scheme 1
  • ubuntu 61

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor