在win7下可安装MIT-GUN scheme, 点开后有两个界面:一个交互式命令行界面;一个Edwin界面。
    在命令行界面按Ctrl-G可以开始输入。在Edwin界面,输入完整命令后按Ctrl-x Ctrl-e可以求值。

启动mit-scheme时报“Requested allocation is too large, try again with a smaller arguement to '--heap'”,需要尝试好几次才能打开。查询用户手册得到以下信息:

(一)Scheme使用四种类型的内存:
    * 一个栈用于递归过程调用。
    * 一个堆用于动态分配对象。堆中分配给对象的存储空间在失去引用后,会被垃圾回收器回收。
    * 一个常量空间用于分配对象,类似于堆。于堆不同的是,在常量空间中,被对象使用的存储空间不会被垃圾回收。常量空间用于本质上永久存在的对象,例如运行时环境的过程。
    * 用于microcode的额外存储空间(部分用C实现的系统)。

(二)Scheme 表达式(print-gc-statistics)会显示可用的堆空间和常量空间。

(三)影响microcode的环境变量必须在启动Scheme之前确定,其他的环境变量可以在Scheme内用set-environment-variable!过程重写。

(四)MITSCHEME_HEAP_SIZE是用于microcode的环境变量(即windows下的mit-scheme可执行程序)。这个量代表堆的大小,单位是1024字的块,用--heap参数可重设。其默认值依赖于架构:在32位的机器上默认为“4096”,在64位的机器上默认是“16384”。

综上,在mit-scheme的快捷方式点右键>属性,“目标”一栏是
    D:\Tools\MIT-GNU Scheme\bin\mit-scheme.exe" --library "D:\Tools\MIT-GNU Scheme\lib" --edit
    设置一个较小的heap值即可,例如:
    D:\Tools\MIT-GNU Scheme\bin\mit-scheme.exe" --heap "2000" --library "D:\Tools\MIT-GNU Scheme\lib" --edit
    其中--edit代表打开Edwin。

Knowledge about the concept REPL in user manual.
    REPL: Read-Eval-Print Loop. Display a prompt, wait for input, evaluate the expression, print the result and give you another prompt.
    The REPL prompt has a level number. This number is incremented under certain circumstances, the most common being an error.
    The appearance of the 'error>' prompt does nt mean that Scheme is in some weird inconsistent state that you should avoid. It is merely a reminder that your program was in error: an illegal operation was attempted, but it was detected and avoided. Often the best way to find out what is in error is to do some poking around in the error REPL.

Interrupting:
    Ctrl-c: Prompt you for another character and performs some action based on that character.
    Ctrl-g: Abort whatever Scheme evaluation is currently running and return to the top level REPL.
    Ctrl-x: Abort whatever Scheme evaluation is currently running and return to the "current" REPL.
    Ctrl-u: Abort whatever Scheme evaluation is currently running and go up one level.
    Ctrl-b: Suspend whatever Scheme evaluation is running and start a breakpoint REPL. The evaluation can be resumed by evaluating (continue) in that REPL at any time.

restart [k]: This procedure selects and invokes a restart method. The list of restart methods is different for each REPL and for each error.

The Current REPL Environment
    Every REPL has a current environment, which is the place where expressions are evaluated and definitions are stored.
    When Scheme is started, the environment is user-initial-environment.
    The runtime system's bindings are stored in system-global-environment.
    Here is the procedure that changes the REPL's environment:
    (ge environment): Goto Environment, change the current REPL environment to be environment.
    (pe): Print Environment, find out which environment you are in.

MIT scheme入门使用的更多相关文章

  1. MIT Scheme 使用 Edwin

    MIT Scheme 的基本使用:http://www.math.pku.edu.cn/teachers/qiuzy/progtech/scheme/mit_scheme.htm 安装过程 安装bre ...

  2. MIT Scheme 的基本使用

    MIT Scheme 的基本使用 安装和启动 启动 在 Windows 下正确安装 MIT Scheme 系统后,程序菜单里将有一个 MIT Scheme 目录,其中包含: Documentation ...

  3. Scheme入门

    目前选择的是DrRacket作为IDE,可以去网上搜索下载. 打开软件后,输入如下代码进行 helloworld #lang scheme ;The first program (begin (dis ...

  4. MIT Scheme Development on Ubuntu

    sudo apt-get mit-scheme; run "scheme" then you enter the command line scheme repl; sudo ap ...

  5. Scheme Implementations对比

    MIT Scheme http://www.gnu.org/software/mit-scheme/ GNU Guile http://www.gnu.org/software/guile/ Rack ...

  6. Java门派的风险

    Java门派的风险 正在看周思博(www.joelonsoftware.com)的新文章.这次是疯狂攻击Java.主要论点是:Java不够难,作为工业语言不错,但作为学校的教学语言,就忒差了.学校应该 ...

  7. sicp第1章

    牛顿迭代法求平方: (define (sqrt-iter guess x) (if (good-enough? guess x) guess (sqrt-iter (improve guess x) ...

  8. SICP 解题集 — SICP 解题集

    SICP 解题集 — SICP 解题集 SICP 解题集¶ 这个文档的目标是成为中文化的.完整的<计算机程序的构造和解释>一书的解题集. 这个解题集的特色是: 对于每道习题,除了习题答案之 ...

  9. 免费的编程中文书籍索引 from github

    免费的编程中文书籍索引 免费的编程中文书籍索引,欢迎投稿. 国外程序员在 stackoverflow 推荐的程序员必读书籍,中文版. stackoverflow 上的程序员应该阅读的非编程类书籍有哪些 ...

随机推荐

  1. 《第一行代码》学习笔记13-UI(2)

    1.EditText:程序和用户进行交互的重要控件,允许用户在控件里输入和编辑内容,并可以在程序中对这些内容进行处理. 2.Android控件使用的一般规律:给控件定义一个id->指定下控件的宽 ...

  2. Oracle start with connect by prior 用法

    Oracle start with connect by prior 用法    语法: select * from 表名 where 条件1 start with 条件2 connect by pr ...

  3. UVA 10791 Minimum Sum LCM

    唯一分解定理 把n分解为 n=a1^p1*a2^p2*...的形式,易得每个ai^pi作为一个单独的整数最优. 坑: n==1     ans=2: n因子种数只有一个     ans++: 注意溢出 ...

  4. python中的函数存入list中的实例

    最近由于接触了python这个强大的东西,在写代码时考虑到代码的扩展性,就想到了将python的函数名存入list中.有点像习惯的c/c++中的函数指针的意思. 下面上代码: # coding=utf ...

  5. Hibernate整合Struts2时报错

    今天在整合Hibernate和Struts2的时候遇到一个问题 总是出现各种异常,经过仔细检查,代码本身并没有问题, ----------------------------------------- ...

  6. Win8/Win8.1都有哪些版本?我该选择哪个?(二)

    Windows版本分类比较复杂,下文主要为大家理清Win8/Win8.1的版本种类.如果想了解更多,可以结合<Win7/Win8/Win8.1众多版本,我该选择哪个?>一文来了解. 细数W ...

  7. kibana 统计每天注册数

  8. js深入研究之类定义与使用

    js可以定义自己的类 很有意思 <script type="text/javascript"> var Anim = function() { alert('nihao ...

  9. android的原理--为什么我们不需要手动关闭程序

    内容搜集自网络,有所删改       不用在意剩余内存的大小,其实很多人都是把使用其他系统的习惯带过来来了.android大多应用没有退出的设计其实是有道理的,这和系统对进程的调度机制有关系.如果你知 ...

  10. 《Java程序员面试笔试宝典》之Java程序初始化的顺序是怎样的

    在Java语言中,当实例化对象时,对象所在类的所有成员变量首先要进行初始化,只有当所有类成员完成初始化后,才会调用对象所在类的构造函数创建对象. Java程序的初始化一般遵循以下三个原则(以下三原则优 ...