Slackware

SigScheme

ページ作成日

概要

SigSchemeは、組み込み用途向けに設計されたR5RS Schemeインタプリタです。
uimの内部で使用されるSchemeインタプリタとして開発されました。

R5RS Schemeとは

R5RS(Revised⁵ Report on the Algorithmic Language Scheme)は、1998年に策定されたScheme言語の仕様です。
Schemeは、LISPの方言の一つで、シンプルな構文と強力なマクロシステムを特徴とします。
R5RSは約50ページの簡潔な仕様であり、教育目的や組み込み用途で広く使われています。

SigSchemeの特徴

R5RS準拠
R5RSに基本的に準拠しています(完全準拠ではありません)。
SRFI対応
SRFI(Scheme Requests for Implementation)は、Scheme言語の標準ライブラリ仕様です。
SigSchemeは以下のSRFIをサポートしています: SRFI-0(条件展開)、SRFI-1(リストライブラリ)、SRFI-6(文字列ポート)、SRFI-23(エラー報告)、SRFI-34(例外処理)、SRFI-43(ベクタライブラリ)、SRFI-69(ハッシュテーブル)、SRFI-95(ソート)など。
マルチバイト文字対応
UTF-8、EUC-JP、Shift_JIS、EUC-CN、EUC-KRなどの文字エンコーディングをサポートしています。
小さなフットプリント
組み込み用途向けに、メモリ使用量を抑えた設計になっています。

公式サイト

SigScheme

依存関係

このパッケージをビルドするには、以下のパッケージが必要です。

Make it by yourself!

まずは、自分のホームディレクトリにソースをダウンロードします。


cd ~/Downloads
wget https://github.com/uim/sigscheme/releases/download/0.9.4/sigscheme-0.9.4.tar.gz

アーカイブを展開します。


tar xvf sigscheme-0.9.4.tar.gz

configureを走らせます。
--with-libgcroots=installedを指定して、システムにインストールされたlibgcrootsを使用します。
--enable-conf=uimを指定して、uim向けの設定でビルドします。


cd sigscheme-0.9.4
./configure \
  --prefix=/usr \
  --libdir=/usr/lib64 \
  --mandir=/usr/man \
  --docdir=/usr/doc/sigscheme-0.9.4 \
  --with-libgcroots=installed \
  --enable-conf=uim

[画面出力を省略]

SigScheme has been configured as follows:

base config:  uim

[Storage configuration]
Storage impl: compact
Fixnum size:  long
getcontext:   yes
libgcroots:   installed one

[Multibyte character handlings]
Multibyte chars:  yes
Default encoding: singlebyte
UTF-8 codec:      yes
EUC-CN codec:     no
EUC-JP codec:     yes
EUC-KR codec:     no
Shift_JIS codec:  no

[R5RS behaviors]
Strict R5RS:           no
Const list literal:    no
Const vector literal:  yes
Strict null form:      no
Strict vector form:    yes
Strict argcheck:       yes
Strict top-level defs: yes
Internal definitions:  yes

[R5RS features]
Continuation:       yes
Quasiquote:         yes
Hygienic macros:    no
Promise:            yes
Integer:            yes
Numeric I/O:        yes
Charcters:          yes
Strings:            yes
String procedures:  yes
Deep c[ad]+r procs: yes
Vectors:            yes
Ports:              yes
Reader:             yes
Writer:             yes
Load:               yes

[SRFIs]
SRFI-0:  yes
SRFI-1:  yes
SRFI-2:  yes
SRFI-6:  yes
SRFI-8:  yes
SRFI-9:  yes
SRFI-22: yes
SRFI-23: yes
SRFI-28: yes
SRFI-34: yes
SRFI-38: yes
SRFI-43: yes
SRFI-48: yes
SRFI-55: yes
SRFI-60: yes
SRFI-69: yes
SRFI-95: yes

[R6RS features (preliminary)]
R6RS characters:  yes
R6RS named chars: yes

[SigScheme-specific extensions]
define-macro:         yes
SigScheme extensions: yes
format+ procedure:    yes
SIOD compatibilities: yes
SIOD bugs emulation:  no
eval_c_string():      yes
Backtrace:            no
Library:              yes
Interactive shell:    yes

[Developer-only debugging features]
Debug:              no

[Build information (provide this on bug reports)]
Package:                SigScheme 0.9.4
build (compile on):     x86_64-pc-linux-gnu
host (compile for):     x86_64-pc-linux-gnu
host data model:        LP64
host align (C/S/I/L/P): 1/2/4/8/8
host endian:            little
host char unsigned:     no
host arithmetic rshift: yes
host safe va_list ref:  no
Compiler:               gcc
Compiler version:       gcc (GCC) 15.2.0
CFLAGS='-g -O2 -DNDEBUG'

makeします。


/usr/bin/time -v make -j$(nproc)

[画面出力を省略]

        Command being timed: "make -j12"
        User time (seconds): 12.98
        System time (seconds): 2.09
        Percent of CPU this job got: 668%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:02.25
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 227052
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 13
        Minor (reclaiming a frame) page faults: 1148065
        Voluntary context switches: 7349
        Involuntary context switches: 5299
        Swaps: 0
        File system inputs: 2152
        File system outputs: 39904
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

仮インストールディレクトリにインストールします。


make install DESTDIR=/tmp/sigscheme-0.9.4

パッケージを作成します。


cd /tmp/sigscheme-0.9.4
sudo makepkg --linkadd y --chown y ../sigscheme-0.9.4-x86_64-1.txz

[画面出力を省略]

Slackware package ../sigscheme-0.9.4-x86_64-1.txz created.

あとは、インストールすれば完了です。


cd ..
sudo installpkg sigscheme-0.9.4-x86_64-1.txz

configureオプション

SigSchemeのconfigureには、用途に応じた設定セットを選択する--enable-confオプションがあります。

full
実験的機能を含む全機能を有効にします。
regular(デフォルト)
一般的に必要な機能を有効にします。
small
基本機能のみを有効にします。
r5rs
R5RSに厳密に準拠した設定です。
siod
SIOD(Scheme In One Defun)との互換性を重視した設定です。
dev
開発者向けの設定です。
uim
uim向けの設定です。uimのビルドにはこの設定を使用します。