MIT Scheme is a complete programming environment that runs on many UNIX platforms, Microsoft Windows and IBM OS/2.
The program features a rich runtime library, a powerful source-level debugger, a native code compiler and an integrated, Emacs-like editor.
Notes
Tucows, Inc has graciously donated a copy of this software to the Internet Archive’s Tucows Software Archive for long term preservation and access. Please check the Tucows website for all current versions of the software.
- Addeddate
- 2004-11-02 08:45:20
- Identifier
- tucows_54514_MIT_Scheme
comment
Reviews
There are no reviews yet. Be the first one to
write a review.
TL;DR: Now that on previous posts I found an actual reason to legitimize my studies as prototyping new languages, it’s time to setup a Scheme developer environment on my computer! This post is about how to prepare a Scheme devbox via Dr. Racket or via MIT Scheme on a Windows machine to be coded in Visual Studio Code.
Setup — Racket
AFAIK, the easiest way for Scheme development is to use Racket. It comes with a cross-platform IDE DrRacket. Also has some picture drawing mechanisms for the drawing section from SICP too. You just put #lang sicp
at the top of a file, and it’ll be able to run most of the Scheme code from the book.
How to import definitions from other files?
- Save “library” and “application” files in the same directory. (In my case
c:\Users\veliu\Dropbox\SICP
) - Library module has to have
#lang scheme
otherwise exports won’t work. - Define names in the library module, then export them using
(provide)
. Examplecommon.scm
#lang scheme
(define (square x) (* x x))
(define (cube x) (* x x x))
(provide square cube) - Put application file in the same directory. Require the “library” file via
(#%require)
- The feature file needs to be saved, because an interpreter running on a non-saved file searches user’s home path to find the “library” file.
- Example application file that uses “common” library:
#lang sicp
(#%require «common.scm»)
(display (square 3))
(newline)
(display (cube 3)) - ref: racket — How do I include files in DrScheme? — Stack Overflow
Setup — MIT Scheme
However, if you have a more purist approach, you can use the original MIT Scheme. I installed it by following the Unix instructions given at https://www.gnu.org/software/mit-scheme/
- In order to run it on Windows, I compiled it from source code in Windows Subsystem for Linux (WSL) environment.
- Also installed NCurses library via
sudo apt-get install libncurses-dev
before./configure
- To access Windows files from WSL go mount folder
/mnt/c
- To access WSL files from Windows put
\\wsl$
in Windows Explorer address bar, or start menu search bar. - VS Code with added vscode-scheme extension can be used to edit Scheme files. Definitely not as good as Dr. Racket when it comes to indentations, but having the highlighting ability is better than nothing.
- The way to run Scheme “scripts” was not as easy as running a Python script which are run usually with a command like following:
python file.py
. (See mit-scheme — run a script and exit — Stack Overflow) - Shortest command to run a file is via piping:
scheme < file.scm
. However, this displays everything the interpreter does. - Use quiet mode to suppress them
scheme --quiet < file.scm
. - There is a nicer way via
-load
argument but that does not return back to the command line. And the trick was piping it toecho
- Here is the bash function I settled down for easy usage of above trick:
function mitscm () {
echo | mit-scheme --quiet --load $1;
echo
}
export -f mitscm
source
above file in.bashrc
and thenmitscm file.scm
will run the file in quiet mode and returns to command line.- Note that it’s possible to connect to WSL from VS Code via remote development. This way when you open a terminal in VS Code, it runs commands in WSL. (Remote VS Code requires to install extensions separately) See: Developing in the Windows Subsystem for Linux with Visual Studio Code
- One last trick to distribute code into multiple files is the
load
function. Put your common definitions incommon.scm
, and start your exercise file that is with(load "common.scm")
. - Some keyboard shortcuts
- To exit the interpreter call
(exit)
command orCtrl+d
. - To stop debugger
Ctrl+g
(not knowing this can make the development a very frustrating experience)
- To exit the interpreter call
Documentation
- User Manual at GNU page
- Reference at GNU page
- Revised(5) Scheme RSR5 standard at MIT SAIL’s (Computer Science & Artificial Intelligence Lab) Scheme page
- Note that Scheme language evolved further and has two more standard, last one being RSR7. But MIT Scheme stayed at RSR5. See R7RS versus R6RS — weinholt.se for everything you don’t need to know about comparisons of Scheme standards.
Now I’m ready to experience SICP in its full glory using its original interpreter!
published at:
2020-08-25 03:00
edited at: 2020-09-05 20:39
UTC-5
tags:
After scratching my head over the various approaches, with no luck, I finally resorted to a very simple setup. Blame it on the lack of support under Windows for otherwise a fantastic combo.
My scheme sources are managed in a sub-folder inside a OneDrive managed folder. This is just to keep them safe. My workflow is very simple. In Emacs, I find or create a scheme file. Then to execute it I run scheme through the menu option Scheme->Run Inferior Scheme. I load the same file in the MIT Scheme prompt by giving just its name and then go through as its eval-print loop. If I happen to change my Scheme source folder then I restart the Inferior Scheme so that it could find the new sources it in its current working directory.
My purpose is very limited (going through the SICP exercises), so I am not using any source control or IDE. Though Racket (formerly PLT Scheme) proved helpful at debugging.
Here is how I set it up:
- Install MIT Scheme from: http://www.gnu.org/software/mit-scheme/
- Make sure that its binary folder is your path.
Ex: Add C:\Program Files\MIT-GNU Scheme\bin to your PATH variable.
It is set via Control Panel\System and Security\System then find PATH in Environment Variables -> System Variables. - Rename or make a copy of mit-scheme.exe to just scheme.exe
This is to ensure that the Emacs by default finds it – otherwise you need to configure Scheme program name variable in the Emacs settings. I found renaming scheme exe simpler. - Add a new system variable named: MITSCHEME_BAND, containing path of all.com
Ex: MITSCHEME_BAND : C:\Program Files\MIT-GNU Scheme\lib\all.com - Add a new system variable name: MITSCHEME_LIBRARY_PATH, pointing to the scheme lib.
Ex: MITSCHEME_LIBRARY_PATH : C:\Program Files\MIT-GNU Scheme\lib
That’s it!
MIT-GNU Scheme, with its latest version 9.1.1, stands out as a robust implementation of the Scheme programming language. Developed by the Free Software Foundation, this free IDE falls under Development Tools with a specific subcategory of IDE. Users can download this IDE as either mit-scheme.exe or scheme.exe depending on their preference.
Primarily designed for Windows XP, 7, and 8, MIT-GNU Scheme offers a comprehensive suite of tools, including an interpreter, compiler, source-code debugger, an integrated Emacs-like editor, and an extensive runtime library. As a development environment, it is particularly well-suited for programming large applications requiring a rapid development cycle.
For those seeking earlier versions, 9.1, 9.0, and even 7.8 are available, catering to various user needs and system specifications. This IDE, by facilitating efficient development and debugging, enables developers to refine their code with precision.
Pros:
- Free to use, backed by the Free Software Foundation.
- Comprehensive development tools including an interpreter and compiler.
- Integrated source-code debugger and Emacs-like editor for enhanced coding efficiency.
- Specifically designed for large application development with rapid cycles.
Cons:
- Only supported on Windows XP/7/8, limiting accessibility for users on other operating systems.
- The interface may appear dated to those accustomed to more modern development environments.
Overall, MIT-GNU Scheme continues to be a valuable asset for Scheme language programmers, providing powerful tools and an efficient development cycle. Users searching phrases like «MIT-GNU Scheme download» or «free Scheme IDE» will find this tool aligns well with their needs.
It is not possible to confirm if there is a free download for this software available on the developer’s website. According to the results of the Google Safe Browsing check, the developer’s site is safe. Despite this, we recommend checking the downloaded files with any free antivirus software.
You may want to check out more software, such as PLT Scheme, dbForge Schema Compare for Oracle or dbForge Schema Compare for SQL Server, which might be related to MIT-GNU Scheme.