2008-06-12

PLT Scheme version 4.0 is now available from

http://plt-scheme.org/
This major new release offers many improvements over version 372, and we encourage everyone to upgrade.
  • The PLT Scheme language now provides better syntax for modules, better support for optional and keyword arguments to functions, a more complete syntax for structure types, new syntax for list comprehensions and iterations, a more complete and consistent set of list operations, a more complete set of string operations, and streamlined hash-table operations.
  • The documentation has been re-organized and re-written. New tutorials and overviews offer a clearer introduction to Scheme and PLT Scheme.
  • New documentation tools help programmers create and install documentation for libraries and Planet packages. All installed documentation can be read though the user's web browser, and even searching within the browser works on local files.
    The language for writing documentation is an extension of Scheme, and document sources are linked to implementations through the module system. The module connection allows, for example, reliable automatic hyperlinking of identifiers mentioned in documentation to their specifications in other documentation.
  • R6RS programs are supported in two ways: though the plt-r6rs executable and through the #!r6rs prefix. The latter allows an R6RS library or program to serve as a PLT Scheme module.
  • Legacy R5RS support is improved, partly through a separate plt-r5rs executable.
  • Pairs are immutable within the PLT Scheme language; mutable pairs (which are the same as R6RS and R5RS pairs) are provided as a separate datatype. For more information, see “Getting rid of set-car! and set-cdr!
  • ProfessorJ uses a new and improved parser, it evaluates programs faster, and it includes a Java-specific indenter.
  • Testing frameworks for the HtDP and HtDC (ProfessorJ) teaching languages have been unified. Both support systematic unit testing in a comprehensive fashion. When programs lack tests, students are asked to add test cases. When all tests succeed, a simple message says so; otherwise, a pop-up window (dockable) displays URLs to the failed test cases and explains why the cases failed.
  • Typed Scheme, a statically typed dialect of Scheme, is now included with PLT Scheme. While Typed Scheme is still in its early stages of development, it supports modular programming with types and full interaction with existing untyped code. Safe interactions between typed and untyped modules are enforced via contracts. Typed Scheme also features a novel type system designed to accommodate Scheme programming idioms. For more information, see the Typed Scheme page.
Feedback Welcome.

16 comments:

Eric said...

I just downloaded PLT Scheme 4.0, and I haven't used Scheme in a long time. Was a long time CL user. How do I set the language to be the complete scheme language with R6RS? I tried the documentation online and asking in IRC, but no dice. Any suggestions?

Robby said...

Use the module language and put

#!r6rs

as the first line in your file.

(Or, with that line, you can use mzscheme from the commandline too, ie "mzscheme file.ss")

Eric said...

I chose Module, clicked Run and then put #!r6rs at the REPL, didn't like it. So I put #!r6rs in the definitions area (above the repl). Then followed it by a factorial function. It doesn't complain about the #!r6rs anymore, but now it complains about "expected an import declaration". If I choose Pretty Big or R5RS, everything is hunky doory. Why can't there just be a R6RS mode?

I guess I better read up on this 'module' language. I really just wanted to try this out. I must be missing something.

matthias said...

Isn't your question about r6rs rather than module?

Eric said...

All I want is to start up PLT Scheme and be able to write code which conforms to R6RS. Nothing else.

Matthew Flatt said...

Code that conforms to R6RS starts with `(import ...)' at a minimum. Your other alternative is to start with `(library ... (export ...) (import ...) ...)'.

To run R6RS programs/libraries in DrScheme, you also have to start with `#!r6rs', even though R6RS itself doesn't require that. Yes, in the Module language. Experience so far has convinced us that it's better to declare a program's language in the source, instead of having a zillion language choices in a GUI dialog; that's why we've avoided adding an "R6RS" option in DrScheme's langauge dialog (and why we've removed several PLT-specific options at the same time).

Meanwhile, maybe you can help us improve the documentation. Using the online docs, I would have guessed that you'd go to http://docs.plt-scheme.org/, follow the "R6RS" link, and then read the first chapter on running R6RS programs. Can you tell us more about the path you took and how it failed you?

Thanks!

Eric said...

RE: "Meanwhile, maybe you can help us improve the documentation. Using the online docs, I would have guessed that you'd go to http://docs.plt-scheme.org/, follow the "R6RS" link, and then read the first chapter on running R6RS programs. Can you tell us more about the path you took and how it failed you?"

-----------------------------

There was no real method to my madness. I fired up PLT Scheme. I saw no language was selected. I haven't used scheme in a long time, but when I did I would usually just select R5RS or Pretty Big and then just start coding. So, I thought I would go and do the same thing, except now that R6RS is implemented, I might was well switch to that by default. So I went to select a language. I didn't see R6RS. So I read all the descriptions of the others, none of which really means anything to me. The small blurb at the bottom doesn't really say enough to convey the differences. All I knew is that I wanted R6RS. I couldn't find it or make heads or tails of any of it, so I decided to go to plt-scheme website and look at docs. On the docs page I did a search for 'language'. As I was looking for documentation on the differences of the particular languages. I saw the R6RS link but I thought that was a spec, or description of the language itself. I was just interested in how to get the language setup so I could work in PLT Scheme. (ie. I was viewing that as the first step before I would read in detail about R6RS). So failing to find anything there, my next step was to google it, which of course comes up with overwhelming results which I scanned a few and then stopped and asked on this blog. And so here we stand.

Basically I was just looking for a quick canvas to 'go'. I just wanted to try it, I didn't really want to think about it. (never had to before, so maybe thats why)

Eric said...

What about having an R6RS option and just dumping the "#!r6rs (import (rnrs)) ;put code here" directly into the definition pane when its selected. You could even follow it with a modal window explaining that with r6rs, you must precede all files with this syntax blah blah and have a "do not show again" checkbox. Even have a link to the online documentation for more details. I would have figured that out pretty quick :).

Matthew Flatt said...

That's an interesting idea. It sounds similar to the way that Visual Studio or XCode will create a project based on a template --- except that instead of a pile of project settings, DrScheme would just give you a few starting lines of text.

David Vanderson said...

Horay! Thanks so much to everyone working on PLT Scheme. I'm really enjoying it.

I especially enjoy the amazing support and patience from PLT members.

I like the new plt-scheme.org look as well. I think it's much simpler to navigate.

Again, thank you!

Jon Philpott said...

i love it so far, but..

and you've probably heard this a lot before...


... when are we going to see a plt sql database abstraction for recent plt-schemes?

bolognese said...

man, this is great. plt definitely rocks!

hyperlogic said...
This comment has been removed by the author.
Maverick said...

hi, i am working with dr scheme 3.72. can someone please tell me how to read and write data to a file in scheme code??? i need this quick as i am stuck in a project because of the same problem.....help!!!!!

John Clements said...

1) google for "PLT scheme read from file"
2) use DrScheme's built-in Help Desk.
3) write to the PLT Mailing list.

terry said...

you really need r6rs option OR simplify docs.
its counter-intuitive with having r5rs.
nobody would think to put language to module.
even though called r6rs module language.

for documentation recommend something like this ditto-
point zero : demo on r6rs
START DRSCHEME
PUT LANGUAGE TO MODULE
PUT THIS INTO DEFINITION WINDOW
#!r6rs
(library (examples hello)
(export greet)
(import (rnrs))

(define (greet)
(display "hello\n")))
CLICK RUN