[racket] error while loading simply.scm

357 views
Skip to first unread message

Piscium

unread,
Oct 16, 2013, 6:02:24 PM10/16/13
to us...@racket-lang.org
I am reading the book Simply Scheme that makes use of some Scheme source files.

One such source file is "simply.scm":
ftp://ftp.cs.berkeley.edu/pub/scheme/functions.scm

I put this in the DrRacket definitions area:
#lang racket
(load "/home/myself/develt/scheme/simply.scm")

When I clicked the Run button I got this:
develt/scheme/simply.scm:8:0: #%top-interaction: unbound identifier;
also, no #%app syntax transformer is bound in: #%top-interaction

However I am able to load the same file in Gambit without an error.

I tried different languages settings in DrRacket without success.

Any ideas?

Thanks
____________________
Racket Users list:
http://lists.racket-lang.org/users

Matthias Felleisen

unread,
Oct 16, 2013, 6:11:39 PM10/16/13
to Piscium, us...@racket-lang.org

0. Racket is not Scheme and this an example where the difference shows up.

1. Use the legacy language Pretty Big:

Welcome to DrRacket, version 5.90.0.9--2013-10-15(efaa5bd1/d) [3m].
Language: Pretty Big.
> (load "functions.scm")
>

2. Even then, some functions are simply not defined in "Scheme".

Some of the functions have slightly different names in Racket.
Some need definitions from what I can tell. All straightforwar
but I am out of time.

I have commented them out in the global definition *the-functions*
and got a loadable file. Attached

3. Since the file seems to come w/o a test suite, I am not sure
whether it works.




functions.scm

Sam Tobin-Hochstadt

unread,
Oct 16, 2013, 6:30:06 PM10/16/13
to Piscium, users
You may find this library:
http://planet.racket-lang.org/display.ss?package=simply-scheme.plt&owner=dyoo
useful for working with Simply Scheme in DrRacket.

Sam

Piscium

unread,
Oct 16, 2013, 6:38:13 PM10/16/13
to Matthias Felleisen, us...@racket-lang.org
On 16 October 2013 23:11, Matthias Felleisen <matt...@ccs.neu.edu> wrote:
>
> 0. Racket is not Scheme and this an example where the difference shows up.
>
> 1. Use the legacy language Pretty Big:
>
> Welcome to DrRacket, version 5.90.0.9--2013-10-15(efaa5bd1/d) [3m].
> Language: Pretty Big.
>> (load "functions.scm")

Thanks Matthias.

I am sorry I provided the wrong URL for the Scheme file. It should be:
ftp://ftp.cs.berkeley.edu/pub/scheme/simply.scm

I tried the language setting you suggested. I got a different error
message this time:

Welcome to DrRacket, version 5.3.6 [3m].
Language: Pretty Big; memory limit: 2048 MB.
. develt/scheme/simply.scm:20:
12: set!: cannot mutate module-required
identifier in: number->string

Piscium

unread,
Oct 16, 2013, 6:50:30 PM10/16/13
to Sam Tobin-Hochstadt, users
On 16 October 2013 23:30, Sam Tobin-Hochstadt <sa...@cs.indiana.edu> wrote:
> You may find this library:
> http://planet.racket-lang.org/display.ss?package=simply-scheme.plt&owner=dyoo
> useful for working with Simply Scheme in DrRacket.
>
> Sam

Sam, thanks.

I put this in the DrRacket definitions area:
(require (planet dyoo/simply-scheme:2:2))

And it loaded without issues:
Welcome to DrRacket, version 5.3.6 [3m].
Language: Pretty Big; memory limit: 2048 MB.
>

I tested with one Simple Scheme function and it worked.

Problem solved.

Thanks again for your quick reply.

P. S. I have to say that I am very impressed with Racket and DrRacket.
It is very polished. And I can imagine all the effort that went into
it.
Reply all
Reply to author
Forward
0 new messages