---
title: "#SICM #설치 #활용 #이맥스"
url: "https://notes.junghanacs.com/notes/20241111T152346"
author: "Junghan Kim"
date: "2024-11-11T15:23:00+09:00"
lastmod: "2024-12-01T06:30:00+09:00"
tags: ["bib","emacs","scheme","sicm"]
description: "SICM과 MIT Scheme을 설치하고 이맥스에서 활용하려는 경로를 정리한 노트이다."
---

> [!abstract] 이 노트에 대하여
> 
> MIT Scheme과 SICP/SICM 도구를 설치해 Emacs에서 활용하는 절차를 실용적으로 적어 둔다. 고전 역학과 수학 실험을 텍스트 환경 안으로 가져오려는 흐름이 잘 보인다.

## "junghan0611/sicm-scheme-exercises: Exercises and notes on Structure and Interpretation of Classical Mechanics."

(NO_ITEM_DATA:web-junghan0611sicmschemeexercisesexercises)

[2024-10-31 Thu 13:54]

기본으로 가자

### Install 요약

```shell

sudo apt-get install mit-scheme mit-scheme-doc

wget
https://groups.csail.mit.edu/mac/users/gjs/6946/mechanics-system-installation/native-code/scmutils-20230902.tar.gz

tar xzf scmutils-20230902.tar.gz
cd scmutils-20230902

sudo ./install.sh

cp mechanics.sh ~/.local/bin/mechanics
# sudo cp mechanics.sh /usr/loca/bin/mechanics

cd ~
```

#### Scheme Mechanics Installation for GNU/Linux or Mac OS X

[Scheme Mechanics Installation](https://groups.csail.mit.edu/mac/users/gjs/6946/mechanics-system-installation/native-code/installation.html)

보관. 이 링크가 없어진다고해서

Installation (requires root access)

The mechanics system has several parts:

-   One part is the MIT/GNU Scheme system.

-   The other part is Scmutils, the numerical and algebraic packages, written in Scheme, that we will use for the mechanics work. The installation will install a script named `mechanics.sh` in `/usr/local/bin` that invokes the Scheme system that runs the mechanics system.

Installation instructions:

1.  Be sure you are logged in with root privileges. If your system does not have a directory `/usr/local`, you will need to create one.

2.  Download the current stable relase (currently 12.1) of MIT/GNU Scheme from [here](http://ftp.gnu.org/gnu/mit-scheme/stable.pkg/12.1/mit-scheme-12.1-x86-64.tar.gz).

3.  Follow the instructions [here](https://www.gnu.org/software/mit-scheme/documentation/stable/mit-scheme-user/Unix-Installation.html). You may need to use root privileges (sudo) to do this installation.

4.  Download the current Scmutils installation from scmutils-20230902.tar.gz. The `20230902` part of the name is the date this installation was created. This is a gzipped tar archive file.

5.  Expand this gzipped tar archive by executing `tar xzf scmutils-20230902.tar.gz`. This will make a directory named `scmutils-20230902`.

6.  Enter the directory with `cd scmutils-20230902`. In the directory you will find installation instructions in the file `INSTALL`. It will tell you to execute the installation script `install.sh`. Do it. This installs Scmutils into your MIT/GNU Scheme system's library.

7.  The directory `scmutils-20230902` has all of the source files for your scmutils distribution. It also has the script `mechanics.sh`, which is used to start the system. That script should be put in a directory on your search path. Traditionally that script goes into `/usr/local/bin`. You may give that script any name you please, but if you keep it as `mechanics.sh` in `/usr/local/bin` the command line to start the Scheme mechanics system is<br /> `/usr/local/bin/mechanics`<br /> (If `/usr/local/bin` is on your search path you need not specify the whole path.)

8.  The system starts with the MIT/GNU Scheme prompt. One way to use it is from the `Edwin` editor, an `EMACS18` which is implemented in Scheme, and which is integrated with the Scheme debugger. This is how I (GJS) tend to use the system. To start `Edwin` type `(edit)` at the Scheme read-eval-print loop. It is also possible to run our system under the standard GNU EMACS.

9.  If everything seems to work you can now remove the tarball.

Full information about MIT/GNU Scheme is available [here.](https://www.gnu.org/software/mit-scheme/)

**Note:** We have tested this Scheme system under Ubuntu GNU/Linux and Mac OS. If these will not work for you, you can ask for help, but note that we know nothing about MS Windows.

Useful documents are included in the _usr/local/scmutils/manual_ subdirectory that will be unpacked with the tar file. Scheme sources for the entire system are included in the _usr/local/scmutils/src_ subdirectory.

The main interface to the system is `edwin`, an Emacs18 implemented in Scheme. If you are not familiar with Emacs you SHOULD run the tutorial, which can be accessed in `edwin` by holding down the control key and typing `h`, then, releasing the control key, type `t`. ( `C-h t`)

Note that this is all free software, as defined by the GNU General Public License. Also, this is all software developed for education and research at MIT. This code is not carefully tested so it may have errors. We hope that it can help you, but we make no warranty.

### Emacs 빌트인 스킴을 사용한다. -&gt; geiser 쓴다.

[2024-10-31 Thu 14:11]

[junghan0611/sicm-scheme-exercises - github.com](https://github.com/junghan0611/sicm-scheme-exercises?tab=readme-ov-file#emacs-integration)

```elisp
;;;; built-in scheme

(use-package! scheme
  :interpreter ("scsh" . scheme-mode)
  :hook (scheme-mode . rainbow-delimiters-mode)
  :config
  (set-formatter! 'lisp-indent #'apheleia-indent-lisp-buffer :modes '(scheme-mode))
  (advice-add #'scheme-indent-function :override #'+scheme-indent-function-a))

(require 'scheme)
(after! scheme
  (add-hook 'scheme-mode-hook #'aggressive-indent-mode)

  ;; /home/junghan/sync/man/dotsamples/spacemacs/sritchie-spacemacs-scheme/init.el
  ;; required to get org-mode exporting the goodies.
  (require 'ob-mit-scheme) ; site-lisp

  ;; ;; this is used by xscheme now.
  (setq scheme-program-name "mechanics")

  (add-to-list 'auto-mode-alist '("\\.vlad\\'" . scheme-mode))
  (add-to-list 'auto-mode-alist '("\\.dvl\\'" . scheme-mode))
  (add-to-list 'auto-mode-alist '("\\.sc\\'" . scheme-mode))

  (defun mechanics-local ()
    (interactive)
    (run-scheme "mechanics"))

  (defun mechanics ()
    (interactive)
    (let ((default-directory (or (projectile-project-root)
                                 default-directory)))
      (call-interactively #'mechanics-local)))
  )

```

## 관련노트

-   [#SICP video-notes]
-   [#제럴드제이서스먼: #고전역학 #전산물리 #리스프](https://notes.junghanacs.com/bib/20241030T121628)

## BIBLIOGRAPHY

- NO_ITEM_DATA:web-junghan0611sicmschemeexercisesexercises
