29 Jul 2011

RacketCon Recap

posted by Sam Tobin-Hochstadt

We held RacketCon here at Northeastern over the past weekend, and it was a great time! Matthew Flatt consulted his magic 8-ball about the future of Racket (it involves Hawaiian shirts); Matthias Felleisen announced the upcoming Realm of Racket book; Robby Findler demoed DrRacket with online syntax checking; Ryan Culpepper taught us how to make Rackety libraries; Prabhakar Ragde explained how the University of Waterloo teaches Racket and Program by Design to 1500 students a year (and how to embed math into Scribble documents).

Danny Yoo has already blogged about his talk about his Whalesong Racket->JavaScript compiler. Hopefully other people will write more about some of the individual talks; I’ll update this post to link to any that I see.

As promised, the talks were videotaped by Jeff Dlouhy of the NUACM; the videos are in post-production and should be up within a few weeks. We’ll announce their availability on this blog. Slides from the individual talks will be up on the RacketCon webpage soon.

more →

29 Jun 2011

Come to RacketCon!

posted by Sam Tobin-Hochstadt

Calling All Racketeers!

Join us at RacketCon, 23 & 24 July 2011. http://con.racket-lang.org/

The schedule for RacketCon is now available, and includes presentations by key members of the Racket team, including Matthew Flatt on the future of Racket and Matthias Felleisen on the Program By Design curriculum, as well as tutorials on building web applications and accessing low-level libraries.

The meeting will take place at Northeastern University in Boston, MA. It will be an opportunity for developers, researchers, and educators using Racket, DrRacket, Program By Design, and related technologies to come together to share plans, ideas, and enthusiasm. To make it accessible, we will not charge any registration fees; we’ll also serve you breakfast and lunch.

We’re excited about RacketCon, and hope you’ll join us there. To register for RacketCon, please send an email with your name and affiliation to [email protected].

Additional information, including registration, transportation and hotel information, can be found on the web page: http://con.racket-lang.org

more →

26 May 2011

Multi-file code coverage viewing tool

posted by John Clements

I’m very pleased to announce the availability of a multi-file code coverage viewer, written by Jonathan Walsh.

Torn between separating your test cases into another file and actually seeing the coverage? Well, go ahead and pull them apart, because the multi-file coverage tool displays coverage information for the files required by the present one, including both percentage covered (on a line-by-line basis) and optionally a list of uncovered lines (no more inching through your code, looking for the red highlighting.

Back End:

One reason I expect this tool to be long-term robust is that it makes absolutely no changes to the back-end; that is, it just uses the existing code coverage framework. The only thing going on here is that the tool provides a way to store, load, and display this information. This means that the tool displays coverage for un-compiled files only. We thought about fiddling with this, but finally decided that the existing behavior was probably about as useful as anything else we’d come up with, and a lot more robust.

URL for docs:

http://planet.racket-lang.org/package-source/jowalsh/code-coverage.plt/1/3/planet-docs/code-coverage/index.html

As you might expect, it’s a one-line install:

#lang racket

(require (planet jowalsh/code-coverage))

Please let us know about bugs you discover!

more →

26 May 2011

Racket on FLOSS Weekly

posted by Robby Findler

Our own Matthew Flatt was interviewed about Racket on FLOSS Weekly. Also available on YouTube.

more →

30 Apr 2011

Racket v5.1.1

posted by Eli Barzilay

Racket version 5.1.1 is now available from http://racket-lang.org/

  • The new racket/stream library provides stream-first, stream-rest, a lazy stream-cons, and so on. Streams are a subtype of sequences, so they work in for forms. Some sequence generators, such as in-range, now produce streams. A racket/sequence library replaces the old racket/stream library.

  • The new racket/syntax library contains facilities useful for writing macros. The new syntax/srcloc and syntax/location libraries provide support for manipulating source locations.

  • The racket/gui library now supports multi-column list boxes and scrolling panels.

  • The new ffi/file library is useful for writing foreign library bindings that cooperate with Racket’s security guard mechanism.

  • Generators from the racket/generator library can now have formal arguments that are used when the generator is fired up.

  • Single-precision floating-point support is now enabled by default. Single-precision floats print differently from their default double-precision counterparts, new primitives convert between the two precisions, and new reader syntax supports single-precision literals.

  • JIT improvements include a small change to aid x86 branch prediction on function-call returns, which can speed up some programs significantly.

  • Typed Racket:

  • The numeric tower has been entirely overhauled. TR programs can now use more precise types than before, and check more numeric properties, such as sign or range properties.

  • Fixnum optimizations have been improved and should apply more broadly.

  • The performance of the typechecker has been improved. In particular, dispatch on large union types should typecheck much faster than before.

  • The Stepper can now step through Lazy Racket programs.

  • The racket/future library includes fsemaphore values, the future primitive no longer freezes futures (so a future can spawn new futures), and future log messages are more informative.

  • PLaneT development links are now version-specific.

  • The 2htdp/image library now includes overlay/align, underlay/align, overlay/align/offset and underlay/align/offset.

  • The network protocol for universes in 2htdp/universe has changed, so that v5.1.1 is incompatible with earlier versions.

  • The “DrScheme” application (which simply ran DrRacket in the last few releases) has been removed. The “MrEd” GUI executables for Windows and Mac OS X have also been removed, although the “mred” console executable remains for Unix and Mac OS X to support old scripts.

more →

04 Apr 2011

Writing syntax-case Macros

posted by Eli Barzilay

Disclaimer: This is not really a tutorial on macros, it’s more of a quick introduction to using Racket’s syntax-case-based macros for people who are familiar with symbolic macros and miss their “simplicity”. It’s also not comprehensive or thorough or complete, it’s just intended to provide a rough quick overview of how to write macros. It was originally posted on comp.lang.scheme in a thread called “Idiot’s guide to Scheme macros”, but I avoided that title here, since it’s not a general purpose guide. (Also, it’s yet another attempt to dispel the irrational “macrophobia” some people have when it gets to hygienic macros, leading them back to using defmacro with all its problems.)

The main idea with Racket’s macro system (and with other syntax-case systems) is that macros are syntax-to-syntax functions, just like the case of defmacro, except that instead of raw S-expressions you’re dealing with syntax objects. This becomes very noticeable when identifiers are handled: instead of dealing with plain symbols, you’re dealing with these syntax values (called “identifiers” in this case) that are essentially a symbol and some opaque information that represents the lexical scope for its source. In several syntax-case systems this is the only difference from defmacro macros, but in the Racket case this applies to everything — identifiers, numbers, other immediate constants, and even function applications, etc — they are all the same S-expression values that you’re used to, except wrapped with additional information. Another thing that is unique to Racket is the extra information: in addition to the opaque lexical context, there is also source information and arbitrary properties (there are also certificates, but that’s ignorable for this text).

With this in mind, explaining the rest is not too difficult:

  • (syntax-source stx), (syntax-position stx), (syntax-line stx), (syntax-column stx) — retrieve parts of the source location information.

  • (syntax-e stx) — takes a syntax value and returns the value it “wraps”. For example, if stx is an identifier you’d get a symbol, and if it’s a number you’d get the number. If it’s a simple parenthesized form, you’d get a list of syntax values for the subforms. Note that the list can be improper, with the last element being a syntax object that contains a proper list. (But the list will actually be improper if the original syntax was a dotted list.)

  • (syntax->datum stx) — takes a syntax value and returns the plain S-expression that it holds. This is done by recursive uses of syntax-e. (It would be a simple definition that does what you’d think it should do.)

  • (syntax->list stx) — sometimes you want to pull out the list of syntax values from a given parenthesized syntax, but syntax-e does too little (can still return an improper list) and syntax->datum does too much (gives you back raw S-expressions). syntax->list is a utility function that uses syntax-e as many times as needed to get back a proper list of syntax values. If that’s not possible (if the input syntax was not a proper list), it returns #f, so it serves as a predicate too.

  • (syntax-property stx prop) — returns the given property value from stx, if any, and #f if none. For example, try

(syntax-property #'[foo] 'paren-shape)

(The #' is similar to a quote, but for syntax values — I’ll get to that later on.)

  • Note that there is no accessor for the opaque lexical scope, and as you’ll see next, you don’t need one.

  • To create a piece of syntax you use datum->syntax, and you give it an S-expression which will be the “contents” of the resulting syntax object. (The input can contain syntax values, which are left as is.) But when you do that you need to give it the other bits — including the lexical context thing, which you have no access to. The way that’s done is:

(datum->syntax context-stx input-sexpr) 

This returns a syntax value that wraps the input-sexpr value, using the lexical scope from context-stx. A common way to “break hygiene” and create a binding that is visible to the macro user’s code is:

(datum->syntax stx 'foo)

where stx is some syntax value that you get from the user input to the macro. It returns a foo identifier that has the same lexical context information as stx, so it’s as if it came from there.

Note that there is actually another optional argument that specifies the source (either using another syntax object, or as an explicit list), and another for copying the properties from — so an alternative to the above would be:

(datum->syntax stx 'foo stx stx)

which also makes the source information and the properties be the same as those of stx (for example, this can matter in case of syntax errors).

  • There is also (quote-syntax blah) which creates a quoted syntax, with its lexical source from the place it appears.

  • Finally, define-syntax does the magic of tying a name with a transformer function.

And that’s almost everything that you need in order to write hygienic (and non-hygienic) macros. Very inconveniently.

For example, here’s a simple while macro (use this in a file that starts with #lang racket):

(define-syntax (while stx)
  (define subs (syntax->list stx))
  (datum->syntax
   stx
   `(let loop ()
      (when ,(cadr subs)
        ,@(cddr subs)
        (loop)))
   stx))

which breaks like this:

(define x 2)
(let ([let 5])
  (while (< x 10)
    (printf "x = ~s\n" x)
    (set! x (add1 x))))

The problem is that all of those quoted names are getting the context of the user input, which is not the right thing (it’s close to a defmacro). To fix this, you need to quote-syntax all of these identifiers, so they’ll have the macro source instead of the input source:

(define-syntax (while stx)
  (define subs (syntax->list stx))
  (datum->syntax
   stx
   `(,(quote-syntax let) ,(quote-syntax loop) ()
     (,(quote-syntax when) ,(cadr subs)
      ,@(cddr subs)
      (,(quote-syntax loop))))
   stx))

But that’s clearly insane… More than being tedious, it’s still incorrect since all of those function application parens will have the user’s lexical context (Racket has a special implicit #%app macro that gets used in all function applications, and in this case the context of this application will make it unhygienic). Instead of doing this, a better approach would be to create the resulting syntax with the lexical context of the macro source by changing just that argument:

(define-syntax (while stx)
  (define subs (syntax->list stx))
  (datum->syntax
   (quote-syntax here)
   `(let loop ()
      (when ,(cadr subs)
        ,@(cddr subs)
        (loop)))
   stx))

And that’s simple again, and works fine now.

The problem is that it’s tedious wrt to deconstructing the input (which happens to be trivial in this case), and wrt slapping together an output value — and that’s where syntax-case comes in. It addresses the both by using pattern matching, where identifiers in patterns are bound as “syntax patterns”. A new form is added — syntax — which is similar to a quote, except that (a) it actually quotes things similarly to quote-syntax, with the lexical context of the syntax form; and (b) pattern variables are substituted with what they matched. With this, the above macro becomes much easier:

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax (let loop ()
               (when test
                 body ...
                 (loop))))]))

The first line specifies that you want to match the stx input syntax, and that you have no “keywords” (in the same sense as in syntax-rules). The second line is the pattern that is matched against this input — with two pattern variables that match the second subexpression and the sequence of expressions from the third and on. (The first subexpression is matched against _ which is a wild-card that matches anything without binding a pattern variable — the head part is often not needed, since it’s just the macro name.) The last line is the output, specified using syntax, which means that it’s very similar to the previous version where everything is given the lexical context of the macro and the two pattern variables are replaced with the two matches (so body gets spliced into the resulting syntax).

Now, say that you want an unhygienic user-visible piece of syntax. For example, bind the always entertaining it thing to the test result. This:

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax (let loop ()
               (let ([it test])
                 (when it
                   body ...
                   (loop)))))]))

won’t work because it has the macro source — it’s hygienic and therefore not visible. Instead, you need to use datum->syntax with the user syntax:

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (let ([it (datum->syntax stx 'it)])
       (syntax (let loop ()
                 (let ([it test])
                   (when it
                     body ...
                     (loop))))))]))

But this doesn’t really work since it needs to be bound as a pattern variable rather than a plain binding. syntax-case can be used here again: (syntax-case <name> () [foo <body>]) will match foo against the <name> syntax, and if it’s a name then it will be bound as a pattern variable in the <body>.

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax-case (datum->syntax stx 'it) ()
       [it (syntax (let loop ()
                     (let ([it test])
                       (when it
                         body ...
                         (loop)))))])]))

Note that since it is a pattern variable, it doesn’t need to be unquoted — syntax will do that.

Finally, there are some more conveniences. First, with-syntax is a macro that binds pattern variables (by a similar translation to syntax-case):

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (with-syntax ([it (datum->syntax stx 'it)])
       (syntax (let loop ()
                 (let ([it test])
                   (when it
                     body ...
                     (loop))))))]))

and there’s the #' reader macro for syntax:

(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (with-syntax ([it (datum->syntax stx 'it)])
       #'(let loop ()
           (let ([it test])
             (when it
               body ...
               (loop)))))]))

and there are also #` and #, and #,@ which are implemented by translating them to uses of with-syntax.

Note that the last example uses the lexical context of the whole form for the new identifier, but that’s not only the option. You could use any other part of the macro input — for example, you could use the macro keyword:

(define-syntax (while stx)
(syntax-case stx ()
  [(hd test body ...) ; need the head now
   (with-syntax ([it (datum->syntax #'hd 'it)])
     ... same ...)]))

or the test expression (use #'test). Each of these choices has subtle differences that are especially important when you’re composing macros (for example, using a second macro that expands to a while, where the test expression comes from that macro rather than the user code). Demonstrating these things is a popular way to pass the time in some circles, but I’ll avoid it here. In fact, a great way to avoid this whole thing altogether is not create unhygienic bindings in the first place. It sounds like doing so excludes cases where you really want to have a new binding visible in user code, but Racket provides “syntax parameters” that can be used more conveniently (and less confusingly) — see an earlier post for a description of that. As a side note, these options are a good hint that a hygienic macro system is more expressive than a symbolic defmacro system, where no such choices exist. Creating such macros using defmacro can appear easier simply because of this lack of choice — in the same way that CPP-style string-based macros are “simpler” than defmacro since they’re less expressive (just appending lexical tokens, no structural information).

There are other important aspects of the Racket macro system that are not covered here. The most obvious of them is worth mentioning here: Racket separates the “runtime phase” from the “syntax phase”. For example, if you want to try these examples with “#lang racket/base”, you’ll need to add (require (for-syntax racket/base)) since the racket/base language doesn’t have a full language in its syntax phase.

Roughly speaking, this makes sure that source code is deterministically compilable by having each level live in its own world, limiting macros to deal only with the input syntax only and not runtime values. (For example, a CLOS implementation in this system cannot check the value of an identifier bound to a class to determine how some macro should expand.) This results in reliable compilations that do not depend on how things were loaded, or whatever happened on the REPL.

The important bottom line here is that you get to write macros with the full language available — and phase separation means that Racket is explicitly designed to make running code at the macro level and using it by the compiler as robust as possible, so you don’t have to worry about using any complex system as part of your macro. You just need to keep in mind that the macro world is completely separate from the runtime, and the direct benefit of not worrying about weird interactions with compilation and file loading orders.

more →

19 Mar 2011

Languages as Libraries, PLDI 2011

posted by Sam Tobin-Hochstadt

We’ve just finished up the final version of our PLDI 2011 paper on language extension in Racket. The paper describes how the module system and the syntax system work together to support new languages with new static semantics, such as Typed Racket. Here’s the abstract:

Programming language design benefits from constructs for extending the syntax and semantics of a host language. While C’s string-based macros empower programmers to introduce notational shorthands, the parser-level macros of Lisp encourage experimentation with domain-specific languages. The Scheme programming language improves on Lisp with macros that respect lexical scope.

The design of Racket—a descendant of Scheme—goes even further with the introduction of a full-fledged interface to the static semantics of the language. A Racket extension programmer can thus add constructs that are indistinguishable from “native” notation, large and complex embedded domain-specific languages, and even optimizing transformations for the compiler backend. This power to experiment with language design has been used to create a series of sub-languages for programming with first-class classes and modules, numerous languages for implementing the Racket system, and the creation of a complete and fully integrated typed sister language to Racket’s untyped base language.

This paper explains Racket’s language extension API via an implementation of a small typed sister language. The new language provides a rich type system that accommodates the idioms of untyped Racket. Furthermore, modules in this typed language can safely exchange values with untyped modules. Last but not least, the implementation includes a type-based optimizer that achieves promising speedups. Although these extensions are complex, their Racket implementation is just a library, like any other library, requiring no changes to the Racket implementation.

To learn how to implement your own new language in Racket, start with this documentation.

more →

14 Feb 2011

Racket v5.1

posted by Eli Barzilay

Racket version 5.1 is now available from http://racket-lang.org/The most significant change in version 5.1 is a rewrite of the GUI library. Unix/X users will see the biggest difference with this change, because DrRacket and all Racket GUI programs now take on the desktop theme for menus, buttons, and other GUI widgets.

In the long run, Racket GUI programs on all platforms will improve as a result of the library rewrite. In the short run, beware that this first release of a new library will inevitably include a new set of bugs.

Version 5.1 changes in more detail:

  • The racket/draw library—which implements the drawing half the GUI toolkit—can be used independent of the racket/gui/base library and without a graphics display (e.g., without an X11 connection).The new library has one small incompatibility with the old GUI toolbox: ’xor drawing is no longer supported. The new library has many additional features: rotation and general affine transformations, PDF and SVG drawing contexts, gradients, and alpha-channel bitmaps.

  • The GRacket executable is no longer strictly necessary for running GUI programs, because the racket/gui/base library can be used from Racket. To the degree that a platform distinguishes GUI and console applications, however, the GRacket executable still offers some additional GUI-specific functionality (e.g., single-instance support).The new racket/gui/base library includes small incompatibilities with the old GUI toolbox: the send-event, current-ps-afm-file-paths, and current-ps-cmap-file-paths functions have been removed. The racket/gui/base library re-exports racket/draw, so it includes the same drawing functionality as before (except for ’xor drawing).

  • The new racket/snip library can be used independently of racket/gui/base to work with graphical editor content (e.g., images in student programs). Like racket/draw, the racket/snip library is re-exported by racket/gui/base.

  • The Web Server includes a backwards incompatible change that prevents X-expressions and lists of bytes from being directly returned from servlets. This change will increase performance for those types of responses and allow easier experimentation with response types. Please see "collects/web-server/compat/0/README" in the installation to learn about porting your servlets forward. Don’t worry. It’s easy.

  • The new raco demodularize tool collapses a module’s dependencies into a single module comprising the whole program. This transformation currently provides no performance improvement, but is the basis for cross-module optimization and dead-code elimination tools to come. The transformation is currently useful for static analysis of whole Racket programs.

  • The picturing-programs teachpack, formerly installed via PLaneT, is now bundled with the standard distribution. Use the teachpack with (require picturing-programs) instead of (require installed-teachpacks/picturing-programs). The old PLaneT-based installation procedure still works, but it now merely installs a stub that invokes the bundled version.

  • Slideshow picts, racket/draw bitmaps, and images created with 2htdp/image can now be used directly in Scribble documents. More generally, the new file/convertible protocol enables any value that is convertible to a PNG and/or PDF stream to be used as an image in a Scribble document.

  • The Same game sports a new look and an improved scoring system. (The current known high score is 12,429; can you beat that?)

more →

08 Dec 2010

Rebuilding Racket’s Graphics Layer

posted by Matthew Flatt

Racket version 5.1, which is scheduled for release in early February, will look a little different on the outside. Unix/X users will see the biggest difference: DrRacket and all Racket GUI programs will take on the desktop theme for menus, buttons, and other GUI widgets. Text handling is also better than before on Unix/X, especially when printing. Windows and Mac OS X users will see smaller changes, such as better printing, better handling of mouse-wheel events, and support for 64-bit Windows and Mac OS X.

On the inside, version 5.1 is the biggest single change in Racket (or PLT Scheme) history. We’ve reimplemented the GUI layer, which meant throwing out about 200,000 lines of C++ code that built on Xt, Win32, and Carbon. We’ve replaced that C++ code with about 30,000 lines of Racket code that builds on Gtk, Win32, Cocoa, Cairo, and Pango. This change modernizes Racket’s graphics support while significantly reducing the cost of maintaining the GUI and drawing libraries.

In the space between the GUI implementation and the surface, there are many API improvements:

  • You can run GUI programs with just racket, instead of having to use gracket. Depending on how much your platform distinguishes between GUI and console applications, there may still be an advantage to using gracket (i.e., to tell the OS that you mean to start a GUI application or that you want a single instance of the application), but the difference is minor.

  • Most of the drawing library has moved to racket/draw, which you can use without the rest of the GUI library – and, in the case of Unix platforms, without an X-server connection. After detangling the graphics and GUIs libraries, the graphics library is now integrated in more places, such as adding pict support for Scribble documents.

  • The drawing library includes some new capabilities, such as rotation, affine transformations, and bitmaps with alpha channels.

Replacing hundreds of thousands of lines of C++ code with tens of thousands of lines of Racket code sounds like a no-brainer. The old library was implemented in C++ because we started in 1995 by gluing together a Scheme interpreter with a portable GUI library. Then the GUI code stayed in C++, because the interpreter wasn’t fast enough and the foreign interface was too clumsy. Racket is now plenty fast and its foreign interface has improved a lot since then.

Still, the reimplementation took about 18 months. Smoothly integrating cross-platform GUI support with a programming language can be more difficult than it sounds, and mating new libraries with a legacy API creates additional challenges. Finally, many Racket tools depend Racket’s “eventspaces,” which are multiple process-like entities in the same virtual machine, each with its own GUI event loop. Implementing eventspaces on top of modern GUI toolkits turns out to be tricky, because the toolkits insist on a single event-loop per process and they cannot tolerate event-loop actions during certain callbacks. Fortunately, delimited continuations can help work around those limitations.

Cairo and Pango are the two big enablers of the Racket graphics rewrite. The old Racket graphics library depended on many toolkits (X11, Win32, QuickDraw, Quartz, PostScript, and more), and it had poor font handling. Again, the problem was that we chose the previous technology in 1995. Cairo and Pango have since solved the portable-graphics problem, and we were able to trade in 80,000 lines of C++ glue for about 8,000 lines of Racket glue. The code could be much less if we didn’t have to match most of the old drawing API, but we’re still very happy with the result.

On the GUI side, the remaining 22,000 lines of Racket code replace similar C++ code that binds to three different toolkits. The set of underlying toolkits has changed, and a few eventspace tricks are new, but the approach is essentially the same as before. The code is nevertheless much more compact, because (no surprise) Racket is better than C++. Interestingly, the amount of toolkit-specific code is right around 6,500 lines for each toolkit, even though the way that a C programmer uses the different toolkits seems very different: Objective-C classes (Cocoa) versus signal callbacks with explicit wiring (Gtk) versus a single callback function for message handling (Win32). Maybe they’re the same because we built a Racket mini-language for each toolkit that makes them all about equally convenient.

The rewrite is not perfectly compatible with old code, and no doubt we have many bugs to find before the release. The process is well on track, though, and the new library implementations give a us a solid foundation to keep making Racket better.

To try out the current development version, visit

http://pre.racket-lang.org/installers

more →

07 Nov 2010

Racket v5.0.2

posted by Eli Barzilay

Racket version 5.0.2 is now available from http://racket-lang.org/

  • Typed Racket’s optimizer is now turned on by default; error messages have been simplified and clarified.

  • Contracts: contracts on mutable containers allow functions or other higher order values, and contracts are checked when updating or dereferencing the containers. The new contracts are slower than the old ones, so the old check-once functionality is still available.A new dependent function contract combinator, ->i, properly assigns blame for contracts that violate themselves and the generated wrappers are more efficient than ->d. (Although it does more checking so your contracts may be faster or slower).See the docs for box/c, hash/c, vector/c, vectorof and ->i for more details.

  • The when, unless, cond, case, and match forms (in racket/base and derived languages) now allow immediate internal definitions.

  • Web server: the formlets library provides more HTML form elements; make-xexpr-response supports a preamble for DTD declarations; serve/servlet supports stateless servlets.

  • New WebSocket implementation, see net/websocket for details.

  • The new data collection contains implementations of several data structures, including growable vectors and order-based dictionaries.

  • racket/match is now significantly faster.

  • The Racket documentations are built in parallel by default.

  • The stepper is now compatible with programs using the Universe teachpack.

  • 2htdp/image: pinholes are now supported in the library (if you don’t use pinhole primitives you will not see them); a number of new triangle functions added; supports conversion of images to color lists and back. Also, cropping has been improved for scenes; see the documentation section on the nitty-gritty of pixels for details.

  • Signatures have been moved to ASL, BSL, BSL+, ISL, and ISL+ (HtDP teaching languages) no longer support checked signatures.

  • Student languages: one-armed check-error in all levels; ASL is extended with hash operations, and define-datatype.

  • DMdA languages: Checking for parametric signatures is now eager. This catches errors earlier, but retains the asymptotic complexity properties; signatures for record types now have generators; list-of and any signatures are now provided.

more →

Made with Frog, a static-blog generator written in Racket.
Source code for this blog.