07 Jun 2010

Racket

posted by Eli Barzilay

PLT is happy to announce the release of Racket, available from http://racket-lang.org/

With Racket, you can script command shells and web servers; you can quickly prototype animations and complex GUIs; regexps and threads are here to serve you. To organize your systems, you can mix and match classes, modules or components. Best of all, you start without writing down types. If you later wish to turn your script into a program, equip your Racket modules with explicit type declarations as you wish. And Racket doesn’t just come as a typed variant; you can also write your modules in a purely functional and lazy dialect.

Racket comes in so many flavors because Racket is much more than a standard scripting language or a plain programming language. Racket supports language extensibility to an unequaled degree. A Racket programmer knows that making up a new language is as easy as writing a new library.

To help you start quickly, Racket includes batteries in all shapes and sizes, most importantly, extensive documentation and all kinds of libraries.

Racket occupies a unique position between research and practice. It inherits many major ideas from language research, among them type safety (when the type system says that x is a number, then at runtime it always is a number) and memory safety (when some memory is reclaimed by the garbage collector it is impossible to still have a reference to it). At the same time, user demand governs rigid adherence to purely theoretical principles.

Racket, formerly PLT Scheme, is a product of over 15 years of development. Although Racket starts with a mature software base and an established user community, its new name reflects our view that this is just the beginning of Racket’s evolution.

more →

02 Apr 2010

PLT Scheme v4.2.5

posted by Eli Barzilay

PLT Scheme version 4.2.5 is now available from http://plt-scheme.org/

  • PLT now supports multi-core parallelism via futures. Futures create tasks that run in parallel, as long as the tasks stay in the “fast path” of the runtime system. For more information, see the guide.
  • Our unit testing framework, schemeunit, is now included in the distribution. A graphical test runner is available via schemeunit/gui.
  • The support languages for the “Programming Languages: Application and Interpretation” textbook by Shriram Krishnamurthi are now part of PLT Scheme. In addition the PLAI GC language comes with a random mutator generator (to help test collectors) and an improved heap visualizer.
  • New Russian and Ukranian translations, thanks to Sergey Semerikov.
  • A number of improvements to Redex’s typesetting facilities.
  • Typed Scheme users can now automatically generate predicates from types with define-predicate. Typed code can be inserted in untyped modules by requiring with-type from typed/scheme.
  • The scheme/class library now provides contract combinators for classes (class/c) and objects (object/c). See the Reference and Guide for details. Also, a backwards-compatible object-contract version of object/c has replaced the old object-contract combinator.
  • Writing new kinds of contracts is now easier with keyword-based constructors (make-contract and make-flat-contract), a simpler set of structure properties (prop:contract and prop:flat-contract), and the introduction of blame objects for tracking contract metadata.
  • The Scheme-implemented bytecode reader fails less often. This is used by “mzc —decompile”. The Scheme-implemented bytecode writer uses the compact bytecode format and fails less often. This may be used in the future for Scheme-implement bytecode processors.
  • The language dialog now suggests using "#lang" more strongly as the default language. DrScheme no longer uses the term `Module language’.
more →

08 Mar 2010

Talk at Flourish

posted by Robby Findler

The image in this post shows a tree where the interior nodes represent directories and the leaf nodes represent files in the PLT source code. The leaves are colored based on the programming language used. (To avoid clutter, if there is more than one file in a given directory written in a particular language, that language only gets a single dot.)

Some highlights: the blues are Scheme-like languages, the reds are langauges we use to write documentation (see Scribble for more about them), the greens are teaching languages, orange is the language we use to bootstrap new languages, and yellow is a language for metadata about nearby files.

Curious about how we managed to write and use so many different languages? I’ll be giving a talk at Flourish 2010 next week (3/19 @11am, UIC in Chicago) explaining how. Come to learn more!

more →

28 Feb 2010

DAGs vs Trees

posted by Robby Findler

As I wondering whether or not there is a better layout algorithm for the module browser window, I looked into tree maps. Of course, the modules in a program form a DAG, not a tree, so I wondered just how big the tree would get if all of the shared structure in the DAG were replicated. Hey, I figured, if a tree map can handle showing me my entire filesystem, maybe that could work.

… yeah, no. Turns out to be hopeless. In the spirit of a geeky take off on a jelly bean counting contest, lets see if you can guess just how big these things get. Consider the module graph from the program #lang scheme (ie, the graph that just contains an empty program). This program loads 170 modules with 917 connections between modules (counting the main file that just contains the #lang scheme).

So, the question: how many nodes are there in the unsharified tree? First one to come within 1 billion of the right answer gets all of the fame and glory that this blog brings to bear (har har). I’ll post the answer in the comments in a few days (and no fair cheating, those of you that know enough to be able to get your hands on the DAG).

more →

29 Jan 2010

Benchmarks

posted by Matthew Flatt

First, the usual disclaimer:

That said, I’ve run the latest version of PLT Scheme on two sets of benchmarks:

  • Benchmarks in the PLT sources – vs. Bigloo, Chicken, Gambit, Guile, Ikarus, Larceny, MIT Scheme, and Scheme48; safe operations and generic arithmetic only

  • Benchmarks in the Gambit sources – vs. Bigloo and Gambit; generic vs. fixnum-/flonum-specific arithmetic, safe vs. unsafe operationsThe second set is why I started running benchmarks. Fixnum-/flonum-specific arithmetic and unsafe operations are new in PLT Scheme 4.2.4. The benchmark results suggest that the new operations in PLT Scheme offer roughly the same performance benefits as in Bigloo and Gambit. There’s room for improvement, but it’s a good first cut.

For the other results: PLT Scheme is rarely the fastest implementation on a given benchmark. For most purposes, though, it’s in the same ballpark – except for programs that spend all their time capturing and invoking continuations.

It’s fun to run benchmarks occasionally. Now, back to working on language design, libraries, documentation, usability…

more →

28 Jan 2010

PLT Scheme v4.2.4

posted by Eli Barzilay

PLT Scheme version 4.2.4 is now available from http://plt-scheme.org/

  • The scheme/flonum and scheme/fixnum libraries provide flonum- and fixnum-specific operations. In the case of flonum-specific operations, the JIT compiler can recognize combinations of operations (including local bindings) and improve performance by “unboxing” intermediate results.
  • The scheme/unsafe/ops library provides arithmetic and other operations that are implemented without dynamic checks. Avoiding checks can sometimes improve performance, but at the expense of safety.
  • 2htdp/universe: We have severed the connection between universe and an image library and made a few other, minor changes. Most programs will now have to change to require the htdp/image library explicitly. For the full details, see the new Porting World Programs section of the documentation.
  • The 2htdp/image library continues to grow. In this release, it is supported by 2htdp/universe, equality changed to be based on how the images are drawn, cropping and curves were added, and support for more kinds of pens were added.
  • htdp/world: The old world teachpack remains deprecated. HtDP/2e exclusively uses the new 2htdp/universe library. For backwards compatibility, the world teachpack will remain in the distribution until the coming summer.
  • The scheme/class library now provides this%, which refers to the class of the current object (i.e. this).
  • scheme/generator has convenient functions for infinite generators, and for converting a generator to a sequence for iteration.
  • PLT Scheme’s add-on directory can be customized by the $PLTADDONDIR environment variable or --addon/-A command-line flags. This controls where downloaded Planet packages and their compiled Scribble documentation are installed.
  • Additional extensions include: saving errno in foreign calls, much improved sort speed, normalized results from procedure-arity, and more.
more →

02 Jan 2010

Scheme Videos (Lectures and Talks)

posted by John Clements

Scheme Videos (Lectures and Talks)(thanks to Geoffrey Knauth and Hari)Following a mailing-list request, it turns out that there are quite a lot of Scheme-related lectures and talks floating around out there in video format. The following list was compiled by Geoffrey Knauth, with contributions from Hari and Michael Sperber, and at least one insertion from me, right at the front.

  • My sequence of introductory videos on YouTube, recorded long after this post was made.

  • There’s the SICP course Abelson & Sussman gave to [HP, I think] in the mid–1980s: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/

  • MIT OCW / 6.001 using SICP, Spring 2005: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6–001Spring–2005/VideoLectures/index.htm

  • All the ICFP 2009 videos (man this made my day!!): http://vidiowiki.com/feature/list/fnu/ICFP_2009

  • Daniel P Friedman - A Celebration (this too!): http://www.cs.indiana.edu/dfried_celebration.html

  • DrScheme v4.0 Tour: http://www.youtube.com/watch?v=vgQO_kHl39g&fmt=18

  • Similar, if you understand Russian:

  • http://www.youtube.com/watch?v=wECY7s9k-V0

  • http://www.youtube.com/watch?v=2CVJjqOT6WM

  • Matthias Felleisen - Programming at Northeastern: http://www.savevid.com/video/matthias-felleisen-programming-at-northeastern-university.html

  • Matthew Flatt - Processes without Partitions: http://www.researchchannel.org/prog/displayevent.aspx?rID=3892

  • Shriram Krishnamurthi on WeScheme: http://vidiowiki.com/watch/cydr9yk/

  • Robby Findler - Macros Matter: http://www.mefeedia.com/video/26348171

  • Using PLT Scheme in the Game Industry: http://www.youtube.com/watch?v=2CVJjqOT6WM

  • Stanford Lecture (Kawa): http://www.youtube.com/watch?v=_cV8NWQCxnE

  • Bluetooth communication using PLT Scheme: http://www.youtube.com/watch?v=pmR_dIXm6sY

  • SICP at UCB: http://webcast.berkeley.edu/course_details.php?seriesid=1906978454
  • http://www.aduni.org/courses/sicp/ from ADUni by Holly Yanco. It comes with pretty good lecture notes and problem sets.

  • Michael Sperber’s DMdA lectures (in German, natch): http://timms.uni-tuebingen.de/List/List01.aspx?rpattern=UT_200[89]_____00[12]info1_000

more →

07 Dec 2009

Futures: Fine Grained Parallelism in PLT

posted by Robby Findler

We’re pleased to announce the initial release of parallel futures, a construct for fine-grained parallelism in PLT. Roughly speaking, a programmer passes a thunk to ‘future’ and it gets run in parallel. That “roughly” holds a few gotchas, partly because we’re just getting started and partly due to the technique we’re using. See the documentation for more details:

http://pre.plt-scheme.org/docs/html/futures/

If you’ve got a multicore machine where you can’t keep the cores busy or your office/machine room is a bit cold, try this program:

#lang scheme
(require scheme/future)
(define (loop) (loop))
(for-each
 touch
 (for/list ([i (in-range 0 (processor-count))])
  (future loop)))

Note that you have to build mzscheme with futures; it isn’t enabled by default, but see the docs above for how to do that. Beyond the above, we’ve also gotten a few parallel kernels going and are seeing good scalability up to 8 cores (the biggest machine we have around for the time being).

more →

01 Dec 2009

PLT Scheme v4.2.3

posted by Eli Barzilay

PLT Scheme version 4.2.3 is now available from http://plt-scheme.org/

  • The unit test framework for the teaching languages provides check-member-of and check-range for checking “random functions”, i.e., “functions” that may produce several different results for one and the same argument.

  • Added a new image library, 2htdp/image. Significant changes from htdp/image:

  • copying and pasting does not introduce jaggies

  • equal? comparisons are more efficient

  • added rotation & scaling

  • got rid of pinholes (new overlay, beside, above functions based on bounding boxes)

  • The scheme/vector library provides common vector operations (also reprovided by scheme).

  • The scheme/promise library provides several new kinds of promises with alternatives execution strategies.

  • New port-reading utilities: in-port, port->list, file->list.

  • A new require-macro, path-up, for requiring a file that is higher in the directory tree.

more →

04 Oct 2009

PLT Scheme v4.2.2

posted by Eli Barzilay

PLT Scheme version 4.2.2 is now available from http://plt-scheme.org/

  • DrScheme now, by default, compiles all of the files that are loaded when it runs a program and saves the compiled files in the filesystem. This should lead to faster load times (not faster runtimes) since it avoids re-compiling files whose dependencies have not changed.

  • New Scribble libraries and documentation make it easier to get started with Scribble, especially for uses other than PLT documentation. DrScheme now has better indentation and syntax coloring support for Scribble languages (and generally all @-exp based languages).

  • The new syntax/keyword library provides support for macros with keyword options. A new quick start guide has been added to the documentation for the syntax/parse library.

  • Added support for abstract contracts via the #:exists keywords. This is an experiment to add support for data hiding to the contract system.

  • Added in-producer: a sequence expression makes it easy to iterate over producer functions (e.g., read). A new scheme/generator library creates generators that can use a (parameterized) yield function.

  • HtDP langs: several primitives now consume 0 and 1 arguments in ISL (and up), including append, + and *. In addition, make-list was added to the primitives.

  • The API to Universe has a number of new constructs. All Universe programs should run unchanged. The most important change is the addition of animate as an alternative name for run-simulation. In addition, adding the clause (state true) to a world description now pretty-prints the state of the world into a separate canvas.

  • A number of changes were made to the DeinProgramm / DMdA language levels: The check-property and contract forms were added, define-record-procedures-parametric has changed. See the documentation for details.

  • The test engine in the HtDP languages no longer warns programmers when the Definitions window has no tests.

  • ProfessorJ (and related code) is no longer included in the PLT distributions. It may re-appear in the future as a PLaneT package.

more →

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