Hi,
I'm trying to load a scheme library [
1] called hlsim in order to follow the tutorial in
examples.zip on the same web page.
Code:
cristi@cristi-AX370-Gaming-5 ~/Downloads/examples $ cat Tutorial
;; -*- Scheme -*-
You can use M-z on the following expressions to run the new high level
simulator.
________________________________________________________________________
Load the simulator:
(load-option 'hlsim)
Copy the example files:
The gunk program:
(copy-file "/gunk/hlsim/examples/club5.scm" "club5.scm")
The display utilities:
(copy-file "/gunk/hlsim/examples/club5d.scm" "club5d.scm")
Transform the gunk program:
(cps "club5")
Compile the transformed program:
(cbf "club5")
Compile the display utilities:
(cf "club5d")
Load the display utilities:
(load "club5d")
Make up a simulation:
(define sim (make-sim/1 1000 .05))
Tell the simulation to use a display:
(simulation.display! sim #T)
Load the gunk program:
(simulation.load sim 'init "club5")
Run the simulation:
(simulation.run sim)
Gather some statistics
(simulation.eval sim 'collisions)
(simulation.eval sim '(length clubs-i-belong-to))
There are two other zip files on this page:
linux.zip - Contains 32-bit binaries and libraries to execute scheme.
Code:
cristi@cristi-AX370-Gaming-5 ~/Downloads/linux/bin $ file *
bchscheme: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.1, not stripped
edwin: POSIX shell script, ASCII text executable
scheme: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.1, not stripped
update-scheme: Bourne-Again shell script, ASCII text executable
I'm currently using 64-bit Linux Mint 18.3 so I cannot use them therefore, I installed the
mit-scheme package with the package manager.
hlsim.zip - This contains the scheme library/package I'm trying to use.
[1]
https://groups.csail.mit.edu/mac/pro...s/6.966/hlsim/
==============
I created the
/gunk/hlsim/stable folder and extracted the
hlsim.zip content according to hlsim instalaltion steps provided.
Then I added the lines that are supposed to load the library in
~/.scheme.init
Code:
cristi@cristi-AX370-Gaming-5 /gunk/hlsim/stable/STABLE $ cat ~/.scheme.init
(define-load-option 'hlsim
(lambda ()
(load "/gunk/hlsim/stable/loader")))
The only problem is, when I open scheme and I try to load hlsim, I get this "file missing" error:
Code:
cristi@cristi-AX370-Gaming-5 ~/Downloads $ scheme
MIT/GNU Scheme running under GNU/Linux
Type `^C' (control-C) followed by `H' to obtain information about interrupts.
Copyright (C) 2011 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Image saved on Sunday February 7, 2016 at 10:35:34 AM
Release 9.1.1 || Microcode 15.3 || Runtime 15.7 || SF 4.41
LIAR/x86-64 4.118 || Edwin 3.116
;Loading "/home/cristi/.scheme.init"... done
1 ]=> (load-option 'hlsim)
;Loading "/gunk/hlsim/stable/loader.scm"...
;Unable to find file "sim" because: File does not exist.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
2 error>
The folder structure looks like this:
Code:
cristi@cristi-AX370-Gaming-5 /gunk/hlsim/stable $ ls -la
total 636
drwxr-xr-x 3 root root 4096 Feb 18 17:50 .
drwxr-xr-x 4 root root 4096 Feb 18 17:42 ..
-rw-rw-r-- 1 root root 7200 Sep 25 1997 agenda-skip.bci
-rw-rw-r-- 1 root root 3952 Sep 25 1997 agenda-skip.com
-rw-rw-r-- 1 root root 1720 Jul 22 1997 agenda-skip.ext
-rw-rw-r-- 1 root root 4943 Sep 8 1997 comms1.bci
-rw-rw-r-- 1 root root 3812 Sep 8 1997 comms1.com
-rw-rw-r-- 1 root root 5847 Sep 25 1997 comms3.bci
-rw-rw-r-- 1 root root 4444 Sep 25 1997 comms3.com
-rw-rw-r-- 1 root root 52090 Sep 8 1997 cps3.bci
-rw-rw-r-- 1 root root 31536 Sep 8 1997 cps3.com
-rw-rw-r-- 1 root root 8745 Sep 25 1997 cps3-runtime.bci
-rw-rw-r-- 1 root root 5780 Sep 25 1997 cps3-runtime.com
-rw-rw-r-- 1 root root 8667 Sep 25 1997 devices.bci
-rw-rw-r-- 1 root root 5828 Sep 25 1997 devices.com
-rw-rw-r-- 1 root root 2696 Sep 25 1997 devices.ext
-rw-rw-r-- 1 root root 12905 Sep 25 1997 init.bci
-rw-rw-r-- 1 root root 7656 Sep 25 1997 init.com
-r--r--r-- 1 root root 362 Sep 18 1997 loader.scm
-rw-rw-r-- 1 root root 7894 Sep 8 1997 macros.bci
-rw-rw-r-- 1 root root 5940 Sep 8 1997 macros.com
-rw-rw-r-- 1 root root 38025 Sep 25 1997 neighbours.bci
-rw-rw-r-- 1 root root 24224 Sep 25 1997 neighbours.com
-rw-rw-r-- 1 root root 42353 Sep 25 1997 pnm.bci
-rw-rw-r-- 1 root root 25916 Sep 25 1997 pnm.com
-rw-rw-r-- 1 root root 9180 Sep 25 1997 pnm.ext
-rw-rw-r-- 1 root root 105343 Sep 25 1997 sim.bci
-rw-rw-r-- 1 root root 70160 Sep 25 1997 sim.com
-rw-rw-r-- 1 root root 49356 Sep 25 1997 sim.ext
-rw-rw-r-- 1 root root 5359 Sep 8 1997 simrun0.bci
-rw-rw-r-- 1 root root 3360 Sep 8 1997 simrun0.com
-rw-rw-r-- 1 root root 8551 Sep 8 1997 simrun2.bci
-rw-rw-r-- 1 root root 4268 Sep 8 1997 simrun2.com
drwxr-xr-x 3 root root 4096 Feb 18 15:51 STABLE
Code:
cristi@cristi-AX370-Gaming-5 /gunk/hlsim/stable/STABLE $ ls -la
total 12
drwxr-xr-x 3 root root 4096 Feb 18 15:51 .
drwxr-xr-x 3 root root 4096 Feb 18 17:50 ..
drwxr-xr-x 2 root root 4096 Sep 25 1997 SRC-SNAPSHOT
Code:
cristi@cristi-AX370-Gaming-5 /gunk/hlsim/stable/STABLE/SRC-SNAPSHOT $ ls -la
total 176
drwxr-xr-x 2 root root 4096 Sep 25 1997 .
drwxr-xr-x 3 root root 4096 Feb 18 15:51 ..
-r--r--r-- 1 root root 3844 Jun 21 1997 agenda-skip.scm
-r--r--r-- 1 root root 1746 Aug 16 1996 comms1.scm
-r--r--r-- 1 root root 4963 Sep 25 1997 comms3.scm
-r--r--r-- 1 root root 7765 Aug 25 1997 cps3-runtime.scm
-r--r--r-- 1 root root 18074 Sep 3 1997 cps3.scm
-r--r--r-- 1 root root 20250 Jun 20 1997 cps4.scm
-r--r--r-- 1 root root 4175 Sep 23 1997 devices.scm
-r--r--r-- 1 root root 275 Sep 8 1997 hlsim.cbf
-r--r--r-- 1 root root 372 Sep 18 1997 hlsim.sf
-r--r--r-- 1 root root 8074 Sep 25 1997 init.scm
-r--r--r-- 1 root root 362 Sep 18 1997 loader.scm
-r--r--r-- 1 root root 2312 Jun 17 1997 macros.scm
-r--r--r-- 1 root root 12426 Sep 22 1997 neighbours.scm
-r--r--r-- 1 root root 14095 Sep 21 1997 pnm.scm
-r--r--r-- 1 root root 1344 Aug 14 1996 simrun0.scm
-r--r--r-- 1 root root 2229 Jun 21 1997 simrun2.scm
-r--r--r-- 1 root root 32631 Sep 25 1997 sim.scm
Could you please point me in the right direction?
There are 3 files called
sim.bci,
sim.com and
sim.ext in
/gunk/hlsim/stable but I'm not sure why it cannot find them. Maybe it tries loading a file called
sim.scm?
I'm not sure because I never used scheme before.
Kind regards,
Cristian