[plt-scheme] can't run SICP "generic operations" code in PLT Scheme 4.1

From: Matt Jadud (jadudm at gmail.com)
Date: Wed Oct 15 08:23:12 EDT 2008

On Wed, Oct 15, 2008 at 7:23 AM, Robby Findler <robby at cs.uchicago.edu> wrote:
> Did you consider make-hash, hash-get, and hash-set! and friends?

Having just recently spent a day (finally) updating a library from
v372 to v4.1.1, I can understand Fred's frustration. It isn't so much
a question of "considering" as sitting there asking "now what?" I have
the benefit of having followed the list closely through the
transition, and being able to harass the Untyped crew by AIM. But if
you come in now, from another Scheme, the little edges of PLT Scheme
that are different can derail you.

For Fred (and others coming to the PLT 4.x game late), the things that
took me by surprise yesterday:

1. Hash table operations have all had name changes.
A. Mutators are gone from structures. (define-struct foo (a b)) no
longer yields "set-foo-a!". Yes, they can be introduced at
definition-time, but not if they're being provided by a library.
"struct-copy", I think, was the functional way to update a structure.
(Apologies if I just got that wrong.)
2. 'require' and 'provide' specifications have changed.
3. Scribble failures in PLaneT installations can be noisy, making me
wonder if things are OK.
4. Because the language is changing fairly rapidly, syntax errors can
creep into libraries where they probably didn't exist when the library
was contributed. (Eg. Under 4.1.1, WebIt has a syntax error in
private/excess.ss regarding the invocation of a unit. I'll
double-check that, and submit a ticket. I have no idea if my hack-fix
was correct, but "it runs.")
5. When developing a library for distribution on PLaneT, make sure it
is in a directory named for what you want the .plt file to be called.
"trunk" is probably a bad directory name. (In short, I now understand
the Untyped SVN repository layout.)
6. Creating local development links while working with PLaneT
libraries is critical.

My previous question on the list (locking PLaneT library versions) was
inspired by my own question of whether I would just run old code
against old versions of libraries, or update. It turned out to be more
difficult to figure out what libraries were current when the code was
written (2006) than to update to the latest-and-greatest.

In short, lots of great lessons were learned recently... even though I
was mostly in a hurry, and not interested in lessons. Noel will be
happy to know that my unit tests made the update process easier. That,
and SchemeUnit 3 was a painless transition from version 1 dot
something. :)

I guess my point was: "Fred, just keep asking questions." Most of the
differences I encountered were approaching "edge cases," but you can
get lost in those if you're not careful.


Posted on the users mailing list.