Racket v6.1
posted by Ryan Culpepper
PLT Design Inc. announces the release of Racket version 6.1 at
The major innovation concerns local recursive variable definitions. Instead of initializing variables with an undefined
value, Racket raises an exception when such a variable is used before its definition. (Thanks to Claire Alvis for adapting Dybvig’s “Fixing Letrec” work.)
Since programs are rarely intended to produce #<undefined>
, raising an exception provides early and improved feedback. Module-level variables have always triggered such an exception when used too early, and this change finally gives local bindings — including class fields — the same meaning.
This change is backwards-incompatible with prior releases of Racket. Aside from exposing a few bugs, the change will mainly affect programs that include
(define undefined (letrec ([x x]) x))
to obtain the #<undefined>
value. In its stead, Racket provides the same value via the racket/undefined
library (which was introduced in the previous release). Programmers are encouraged to use it in place of the pattern above to obtain the “undefined” value.
The release also includes the following small changes:
-
Plumbers generalize the flush-on-exit capability of primitive output ports to enable arbitrary flushing actions and to give programmers control over the timing of flushes (i.e., a composable
atexit
). New functions includecurrent-plumber
,plumber-add-flush!
, andplumber-flush-all
. -
Contracts: the contract system’s random testing facility has been strengthened so that it can easily find simple mistakes in contracted data structure implementations (e.g. an accidental reverse of a conditional in a heap invariant check).
-
Redex: the semantics of mis-match patterns (variables followed by
_!_
) inside ellipses has changed in a backwards-incompatible way. This change simplifies the patterns’ semantics and increases the usefulness of these patterns. -
Teaching languages:
check-random
is an addition to the preferred unit testing framework in the teaching languages. It enables the testing of students’ functions that use random-number generation. (Thanks to David Van Horn (UMaryland) for proposing this idea.) -
Upgraded and normalized versions of graphics libraries and dependencies (Pango, Cairo, GLib, etc.) that are bundled with Racket on Windows and Mac OS X. For example, FreeType support is consistently enabled.
-
Typed Racket: its standard library includes contracted exports from the Racket standard library, such as the formatting combinators of
racket/format
. It also supports Racket’s asynchronous channels; see thetyped/racket/async-channel
library. -
SSL: The
openssl
library supports forward secrecy via DHE and ECDHE cipher suites (thanks to Edward Lee) and Server Name Indication (thanks to Jay Kominek). -
The
mzlib/class100
library has been removed. Useracket/class
instead.
I an running the new beta version of Mac OSX Yosemite and DrRacket will not run! please help!!!
— John Sheriff, 9 September 2014
Is there a way to order http://docs.racket-lang.org/guide/ as a printed manual or download as a PDF to print my own for reference?
— The Drifter, 10 September 2014
+John Sherriff: It looks like a bug related to Yosemite was fixed on August 27th, after the release of 6.1.
Here’s the (closed) bug report.
http://bugs.racket-lang.org/query/?cmd=view%20audit-trail&database=default&pr=14672
If you want to run a newer version, you might be interested in the nightly-build package, available at
http://www.cs.utah.edu/plt/snapshots/
— John Clements, 10 September 2014
I can’t run it on Mac OS X Yosemite
— Ege Şenkul, 18 October 2014