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