Thanks; I managed to get a lot farther in loading book's painter files [1]
using those instructions for loading the 6001 package (also, I noticed that
when building from the x86_64 binary tarball, there's a --with-6001 option
that can be passed to ./configure, but that option seems to have no effect
besides generating a seemingly useless src/6001/Makefile). I had to copy
the 6001 dir to the mit-scheme lib dir (and also use the binary
installation from the GNU site rather than the Debian package) in order to
get it to work.

Anyway, to get a bit further, I made some other minor obvious changes
(mostly just filename path fixes, no actual logic changes) to the ".scm"
files at [1]. Then, I tried loading "psgo.scm" managed to get past a few
other choke points, but ran into some kind of UTF error [2] while loading
the "fovnder.pgm" picture. I'm pretty sure this error was not caused by any
of the minor changes I made. Any idea how I can get past this? I would be
happy to provide more detailed repro instructions if necessary.

[1]
https://mitpress.mit.edu/sites/default/files/sicp/psets/ps4hnd/readme.html

[2]
  Illegal UTF-8 initial byte: 254

 S0  (initial-byte->utf8-char-length (peek-byte ib))
 S1  ((input-buffer-normalizer ib) ib)
 S2  (defer port)
 S3  (input-port/read-char port)
 S4  (read-char port)
 S5  (proc count)
 S6  (proc count)
 S7  (side-effecting-iter width (lambda (n) (let ((nth-row (vector-ref data
...
 S8  (receiver port)
    R0  (pgm-file->picture file-name)
 S9  (pgm-file->picture file-name)
    R0  (picture->painter (pgm-file->picture file-name))
    R1  (load-painter "~/Downloads/temp/fovnder.pgm")
 S10 (load-painter "~/Downloads/temp/fovnder.pgm")
    R0  (define fovnder (load-painter "~/Downloads/temp/fovnder.pgm"))

On Wed, Dec 25, 2019 at 11:39 PM Taylor R Campbell <[email protected]>
wrote:

> > Date: Wed, 25 Dec 2019 14:28:35 -0500
> > From: David Liu <[email protected]>
> >
> > Thanks Taylor for the tip. I made the flo:vector replacements and the
> next
> > complaint it gives me is that make-picture is not defined. I'm currently
> > using the Debian 10 package version of MIT-scheme so src/6001 is not
> > included. I downloaded the src tarball and noticed that make-picture is
> > indeed defined in pic-reco.scm. There's a 6001.pkg file which I tried to
> > load, but ran into the undefined "global-definitions" and
> "define-package"
> > functions. What is the intended way to load the definitions in src/6001?
>
> This is a legacy `package' description.  What you do with it is more
> or less as follows:
>
> (cd "/path/to/6001")
> (load "6001.sf")
> (load "6001.cbf")
> (load "make")
>
> The 6001.sf script processes the 6001.pkg file and macro-expands the
> source files into .bin files.  The 6001.cbf script compiles the
> macro-expanded files into machine code .com files.  The make.scm
> script loads it all up.  Then you can interactively enter the student
> environment with:
>
> (ge '(student))
>
> Subsequent input at the REPL will be done in the (student) package
> with all the bindings described in 6001.pkg.
>
> (Probably all of this package business will go away in the near future
> when we finish transitioning to R7RS libraries, but I don't know when
> that might happen.)
>

Reply via email to