Taken with Prof. Brian Harvey.
Works with UCB Scheme.
Course is about LISt Processing and survey of many ideas in computer science regularized to use one syntactic-structure-less language, taking advantage of the language's bias towards transparency and modularity. Course is said to be about structure (nested and enlarged lists) and interpretation (reacting to nested and enlarged lists).
-
If you don't mind not building from source, prepare the STk binary.
-
Get the RPM from UC Berkeley or from the folder "setup".
wget http://inst.eecs.berkeley.edu/~scheme/precompiled/Linux/STk-4.0.1-ucb1.3.6.i386.rpm
-
Get alien, which will help with turning a .rpm into a .deb.
sudo apt-get install alien
-
Install 32-bit-related libraries.
sudo apt-get install libsm6:i386 sudo apt-get install libx11-6:i386 sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
-
Change the .rpm into a .deb, specifying that we wish to have the .deb addable for a 64-bit machine.
fakeroot alien --target=amd64 STk-4.0.1-ucb1.3.6.i386.rpm
-
Install the package.
sudo dpkg -i --force-architecture stk_4.0.1-1_amd64.deb
-
If you want to build STk as a 32-bit program using a 64-bit machine, create the binary.
-
Get the source from UC Berkeley or from the folder "setup".
wget http://inst.eecs.berkeley.edu/~scheme/source/stk-1.3.6.tgz
-
Unpack the source.
tar zxvf stk-1.3.6.tgz -C stk-1.3.6
-
Change into the folder "stk-1.3.6".
-
Fix a typo in stk/Tcl/configure at line 3222; instead of:
system=MP-RAS-`awk '{print $3}' /etc/.relid'`
We have:
system=MP-RAS-`awk '{print $3}' /etc/.relid`
-
Run "cd stk", then "make clean".
-
Make sure you are using gcc version less than 5 - say, 4.8.
sudo apt-get install g++-4.8
-
Make sure you are ready to build 32-bit on a 64-bit machine using compile and link flag "-m32".
sudo apt-get install g++-4.8-multilib
-
Install 32-bit-related libraries.
sudo apt-get install libsm6:i386 sudo apt-get install libx11-6:i386 sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
-
Change two settings in stk/Lib/STk.init; change at line 34:
/usr/local/lib/slib/
To:
/usr/local/lib/stk/slib/
And change at line 29:
(define (implementation-vicinity) "/3.99.3/")
To:
(define (implementation-vicinity) "/usr/local/lib/stk/1.3.6/")
-
In stk/configure, change references to "gcc"; change at line 1388:
ac_cv_prog_ac_ct_CC="gcc"
To:
ac_cv_prog_ac_ct_CC="gcc -m32"
And change at line 6265:
if test "$CC" = "gcc" -a "$SH_CCFLAGS" != "" ; then
To:
if test "$CC" = "gcc -m32" -a "$SH_CCFLAGS" != "" ; then
-
Run "/bash/sh configure --prefix=/usr/local".
-
In stk/Makefile, change at line 57 "gcc" to "gcc -m32".
-
Use "make" and "sudo make install".
-
Follow the following steps for UCB Scheme extensions.
-
Get the source from UC Berkeley or from the folder "setup" and unpack the source, if you haven't already.
wget http://inst.eecs.berkeley.edu/~scheme/source/stk-1.3.6.tgz tar zxvf stk-1.3.6.tgz -C stk-1.3.6
-
Change into the folder "stk-1.3.6".
-
Make sure you have gcc version less than 5 - say, 4.8.
sudo apt-get install gcc-4.8
-
Run "cd ucb".
-
Run "/bash/sh configure --prefix=/usr/local".
-
In ucb/stkdb/Makefile, change at line 12:
MKDIR = @MKDIR@
To:
MKDIR = /bin/mkdir
-
To deal with documentation tex files, we need to downgrade texinfo to version 4.13. We will build it from source, which requires libncurses5-dev. Get the source and extract it in a suitable directory:
sudo apt-get install libncurses5-dev wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz gzip -dc < texinfo-4.13.tar.gz | tar -xf - cd texinfo-4.13 /bash/sh configure
-
Modify texinfo-4.13 Makefile to change at line 307:
LDFLAGS = @LDFLAGS@
To:
LDFLAGS = "-L${PREFIX}/lib -lncurses"
-
Run the following in texinfo-4.13/ to finish installing texinfo 4.13:
make sudo make install
-
Run the following in ucb/stkdb/ to install stkdb:
make sudo make install
-
Run "sudo mkdir /usr/local/lib/stk/slib/stkdb".
-
Run "sudo cp stkdb/*.scm stkdb/stkdb.el /usr/local/lib/stk/slib/stkdb".
-
Run the following in ucb/slib/ to install a Scheme library slib:
sudo make install
-
Run the following once (using sudo) to build slib catalog once:
sudo stk-simply
-
Prepare proper Emacs integration.
-
Add to .emacs in home directory:
(add-to-list 'load-path "/usr/local/lib/stk/slib/stkdb") (autoload 'scheme-mode "stkdb" "Debugger for STk." t) (autoload 'scheme-mode "cmuscheme" "Major mode for Scheme." t) (autoload 'run-scheme "cmuscheme" "Switch to interactive Scheme buffer." t) (setq auto-mode-alist (cons '("\\.scm" . scheme-mode) auto-mode-alist))
-
In Emacs, set scheme-program-name to stk by adding line to .emacs:
(custom-set-variables '(scheme-program-name "stk-simply"))
-
For /usr/local/lib/stk/slib/stkdb/stkdb.el, replace at line 275:
(mapc '(lambda (x)
With:
(mapc #'(lambda (x)
Note: STk Scheme must be used with 32-bit source on a 64-bit Linux; 64-bit STk does not work.