ShibuyaLisp4 » 履歴 » バージョン 8
Yuumi Yoshida, 2009-11-01 16:21
| 1 | 1 | Yuumi Yoshida | h1. Shibuya.lisp TT#4 「ふつうのLisp入門」 |
|---|---|---|---|
| 2 | |||
| 3 | 11月7日開催の "Shibuya.lisp TT#4":http://shibuya.lisp-users.org/ でLispの初心者向けセッションを行います。 |
||
| 4 | |||
| 5 | |||
| 6 | 7 | Yuumi Yoshida | 受講する方に準備してもらうもの |
| 7 | 1 | Yuumi Yoshida | |
| 8 | 7 | Yuumi Yoshida | h2. 1. Lisp(Scheme)の処理系 |
| 9 | 3 | Yuumi Yoshida | |
| 10 | 今回はLisp(Scheme)の処理系として "Gauche":http://practical-scheme.net/gauche/index-j.html を使いますので、PCにインストールしてきてください。 |
||
| 11 | Gaucheの最新版は 0.8.14 ですが、少し古いものでもかまいません。 |
||
| 12 | |||
| 13 | インストール手順: |
||
| 14 | h4. PC |
||
| 15 | |||
| 16 | # "コンパイル済Windows用バイナリ (実験中)":http://practical-scheme.net/vault/Gauche-mingw-0.8.14.zip をダウンロードし、 |
||
| 17 | # 適当なディレクトリー、例えば C:¥ に展開します。 |
||
| 18 | # 環境変数 PATH に上で展開したGaucheの binディレクトリーのパスを追加します、C:¥ に展開した場合は C:¥Gauche¥bin をPATHに追加 |
||
| 19 | # DOS窓で以下のように gosh (Gauche) を実行しバージョン番号が表示されれば OK |
||
| 20 | |||
| 21 | <pre> |
||
| 22 | C:¥>gosh -V |
||
| 23 | Gauche scheme interpreter, version 0.8.14 [utf-8] |
||
| 24 | C:¥> |
||
| 25 | </pre> |
||
| 26 | |||
| 27 | h4. Mac (Leapoad, Tiger) |
||
| 28 | |||
| 29 | portでインストールするのが簡単です。 |
||
| 30 | |||
| 31 | <pre> |
||
| 32 | %25 sudo port install gauche |
||
| 33 | %25 gosh -V |
||
| 34 | Gauche scheme interpreter, version 0.8.13 [utf-8,pthreads] |
||
| 35 | %25 |
||
| 36 | </pre> |
||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | h4. Mac (Snow-Leapoad) |
||
| 41 | |||
| 42 | 今のところ、port一発では入りませんが、以下の手順でインストールできます。 |
||
| 43 | <pre> |
||
| 44 | %25 sudo port install libiconv +universal |
||
| 45 | %25 sudo port install gdbm +universal |
||
| 46 | %25 sudo port install gauche build_arch=i386 |
||
| 47 | %25 gosh -V |
||
| 48 | Gauche scheme interpreter, version 0.8.13 [utf-8,pthreads] |
||
| 49 | %25 |
||
| 50 | </pre> |
||
| 51 | |||
| 52 | * 既に gaucheインストルを試みて失敗している方は最初に *sudo port clean gauche* を実行して下さい |
||
| 53 | * 上のインストルの意味は "Ehrenの日記":http://d.hatena.ne.jp/Ehren/20091003/1254587223 , "武蔵の日記":http://d.hatena.ne.jp/sirocco634/20091004/1254624559 をご覧下さい |
||
| 54 | |||
| 55 | h4. Linux等 |
||
| 56 | |||
| 57 | 5 | Yuumi Yoshida | Debian,Ubuntuは apt でインストールできます。 |
| 58 | それ以外のLinux/Unixでは "ソース":http://prdownloads.sourceforge.net/gauche/Gauche-0.8.14.tgz をダウンロドして make installして下さい。 |
||
| 59 | 4 | Yuumi Yoshida | <pre> |
| 60 | %25 gzcat Gauche-0.8.14.tgz | tar xf - |
||
| 61 | %25 cd Gauche-0.8.14 |
||
| 62 | %25 ./configure |
||
| 63 | %25 make |
||
| 64 | %25 make test |
||
| 65 | %25 sudo make install |
||
| 66 | %25 gosh -V |
||
| 67 | Gauche scheme interpreter, version 0.8.14 [utf-8,pthreads] |
||
| 68 | %25 |
||
| 69 | </pre> |
||
| 70 | 3 | Yuumi Yoshida | |
| 71 | |||
| 72 | 7 | Yuumi Yoshida | h2. 2. rlwarp (Mac,Linux のみ) |
| 73 | 3 | Yuumi Yoshida | |
| 74 | 6 | Yuumi Yoshida | gosh はGNU readline は組み込まれていませんので、gosh を便利に使う為に "rlwarp":http://freshmeat.net/projects/rlwrap/ をインストールする事をお薦めします。 |
| 75 | 3 | Yuumi Yoshida | |
| 76 | 6 | Yuumi Yoshida | インストルは |
| 77 | * Mac: sudo port install rlwarp |
||
| 78 | * Debian,Ubuntu: sudo apt-get install rlwarp |
||
| 79 | * その他: "ソースをここ":http://freshmeat.net/projects/rlwrap/ からダウンロードし make install |
||
| 80 | 3 | Yuumi Yoshida | |
| 81 | |||
| 82 | |||
| 83 | 7 | Yuumi Yoshida | h2. 3. Lispがシンタックスハイライト出来るエディター |
| 84 | 6 | Yuumi Yoshida | |
| 85 | Lispのプログラミングを支援(対応カッコのハイライト、インデント…)してくれるエディターをインストールする事をお薦めします。 |
||
| 86 | |||
| 87 | 8 | Yuumi Yoshida | * Emacs (Windowsの場合は "Meadow":http://www.meadowy.org/meadow/) |
| 88 | 1 | Yuumi Yoshida | * Vim |
| 89 | 8 | Yuumi Yoshida | * Textmate (どうしてもMac的なエディターが使いたい方むけ) |
| 90 | * "Notepad++":http://sourceforge.net/projects/notepad-plus/ (どうしてもWindows的なエディターが使いたい方むけ) |