<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2080885971644496896</id><updated>2010-08-20T21:48:28.177-04:00</updated><title type='text'>The Racket Blog</title><subtitle type='html'>News, insights, tutorials, and more from the team behind PLT Scheme.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default?start-index=26&amp;max-results=25&amp;orderby=updated'/><author><name>Jens Axel Søgaard</name><uri>http://www.blogger.com/profile/15211030864341077735</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>67</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6909673633196173269</id><published>2010-08-03T22:36:00.000-04:00</published><updated>2010-08-03T22:36:02.472-04:00</updated><title type='text'>Racket v5.0.1</title><content type='html'>Racket version 5.0.1 is now available from&lt;pre&gt;  &lt;a href="http://racket-lang.org/"&gt;http://racket-lang.org/&lt;/a&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Datalog is a lightweight deductive database system with Racket integration.  It is now available in the &lt;tt&gt;datalog&lt;/tt&gt; collection and with &lt;tt&gt;#lang datalog&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;Racklog provides Prolog-style logic programming in Racket, adapted from Dorai Sitaram's Schelog package.  It is available in the &lt;tt&gt;racklog&lt;/tt&gt; collection and now as &lt;tt&gt;#lang racklog&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;By default &lt;tt&gt;make install&lt;/tt&gt; and &lt;tt&gt;raco setup&lt;/tt&gt; compile collections in parallel on all available processors.  (Use &lt;tt&gt;raco setup -j 1&lt;/tt&gt; to disable, if necessary.)&lt;/li&gt;&lt;li&gt;Changes (as part of 5.0) in the &lt;tt&gt;racket&lt;/tt&gt; language compared to the &lt;tt&gt;scheme&lt;/tt&gt; language: constructor-style printing, a &lt;tt&gt;struct&lt;/tt&gt; alternative to &lt;tt&gt;define-struct&lt;/tt&gt; that fits more naturally with &lt;tt&gt;match&lt;/tt&gt; and constructor-style printing, bytecode-dependency management via SHA-1 hashes instead of just timestamps (where the &lt;tt&gt;openssl/sha1&lt;/tt&gt; library provides the SHA-1 hash function), a reorganization of &lt;tt&gt;scheme/foreign&lt;/tt&gt; into &lt;tt&gt;ffi/unsafe&lt;/tt&gt; and associated libraries, and new printing functions &lt;tt&gt;eprintf&lt;/tt&gt; and &lt;tt&gt;displayln&lt;/tt&gt;.  Also, a generator from &lt;tt&gt;racket/generator&lt;/tt&gt; is required to have the form &lt;tt&gt;(generator () body ...)&lt;/tt&gt;, which supports a planned extension to let a generator accept arguments.&lt;/li&gt;&lt;li&gt;Changes to the &lt;tt&gt;racket&lt;/tt&gt; language (since 5.0): internal-definition positions allow mixing expressions with definitions, full continuations can escape past a continuation barrier, custodians can attempt to terminate subprocesses and subprocess groups (see &lt;tt&gt;current-subprocess-custodian-mode&lt;/tt&gt;, &lt;tt&gt;subprocess-group-enabled&lt;/tt&gt;), the JIT supports additional unboxing flonum operations and unsafe variants, &lt;tt&gt;ffi/unsafe&lt;/tt&gt; provides an asychronous-call mechanism to deal with foreign threads, a new "." modifier for format string directives (e.g., "~.s" and "~.a") limits the respective output to &lt;tt&gt;(error-print-width)&lt;/tt&gt; characters.&lt;/li&gt;&lt;li&gt;The core type system of Typed Racket has been substantially revised.  In particular, Typed Racket can now follow significantly more sophisticated reasoning about the relationships between predicates.  Additionally, Typed Racket now allows variable arity types in more places, allowing programmers to specify variable-arity lists.&lt;/li&gt;&lt;li&gt;We are working on an optimizing version of Typed Racket that takes advantage of type information for certain classes of programs. This project is a work in progress.  For those interested, see the documentation for &lt;tt&gt;#:optimized&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;web-server/formlets&lt;/tt&gt; library adds a &lt;tt&gt;formlet*&lt;/tt&gt; form that allows dynamic formlet construction, as opposed to &lt;tt&gt;formlet&lt;/tt&gt; which requires syntactic Xexprs and static formlets.  Several new library formlets are added.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;syntax/parse&lt;/tt&gt; library has new support for matching literals at different phases using the &lt;tt&gt;#:phase&lt;/tt&gt; argument for literals and literal sets.&lt;/li&gt;&lt;li&gt;RackUnit now includes a GUI test runner as &lt;tt&gt;rackunit/gui&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;2htdp/image&lt;/tt&gt; library now includes &lt;tt&gt;flip-vertical&lt;/tt&gt; and &lt;tt&gt;flip-horizontal&lt;/tt&gt; operations that mirror images (vertically and horizontally).&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-6909673633196173269?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.0.1'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6909673633196173269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6909673633196173269' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6909673633196173269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6909673633196173269'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/08/racket-v501.html' title='Racket v5.0.1'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8429284126611343134</id><published>2010-06-07T14:50:00.004-04:00</published><updated>2010-06-07T15:10:46.176-04:00</updated><title type='text'>Racket</title><content type='html'>PLT is happy to announce the release of Racket, available from
&lt;pre&gt;  &lt;a href="http://racket-lang.org/"&gt;&lt;tt&gt;http://racket-lang.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;To help you start quickly, Racket includes batteries in all shapes and sizes, most importantly, extensive documentation and all kinds of libraries.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8429284126611343134?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8429284126611343134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8429284126611343134' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8429284126611343134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8429284126611343134'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/06/plt-is-happy-to-announce-release-of.html' title='Racket'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2610566504959049790</id><published>2010-04-02T21:51:00.001-04:00</published><updated>2010-04-02T21:51:57.655-04:00</updated><title type='text'>PLT Scheme v4.2.5</title><content type='html'>PLT Scheme version 4.2.5 is now available from&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;&lt;tt&gt;http://plt-scheme.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;ul&gt;&lt;li&gt;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 &lt;a href="http://docs.plt-scheme.org/guide/performance.html?q=future#%28part._effective-futures%29"&gt;the guide&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Our unit testing framework, schemeunit, is now included in the distribution.  A graphical test runner is available via &lt;tt&gt;schemeunit/gui&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;New Russian and Ukranian translations, thanks to Sergey Semerikov.&lt;/li&gt;&lt;li&gt;A number of improvements to Redex's typesetting facilities.&lt;/li&gt;&lt;li&gt;Typed Scheme users can now automatically generate predicates from types with &lt;tt&gt;define-predicate&lt;/tt&gt;.  Typed code can be inserted in untyped modules by requiring &lt;tt&gt;with-type&lt;/tt&gt; from &lt;tt&gt;typed/scheme&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scheme/class&lt;/tt&gt; library now provides contract combinators for classes (&lt;tt&gt;class/c&lt;/tt&gt;) and objects (&lt;tt&gt;object/c&lt;/tt&gt;).  See the Reference and Guide for details.  Also, a backwards-compatible &lt;tt&gt;object-contract&lt;/tt&gt; version of &lt;tt&gt;object/c&lt;/tt&gt; has replaced the old &lt;tt&gt;object-contract&lt;/tt&gt; combinator.&lt;/li&gt;&lt;li&gt;Writing new kinds of contracts is now easier with keyword-based constructors (&lt;tt&gt;make-contract&lt;/tt&gt; and &lt;tt&gt;make-flat-contract&lt;/tt&gt;), a simpler set of structure properties (&lt;tt&gt;prop:contract&lt;/tt&gt; and &lt;tt&gt;prop:flat-contract&lt;/tt&gt;), and the introduction of blame objects for tracking contract metadata.&lt;/li&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;The language dialog now suggests using "#lang" more strongly as the default language.  DrScheme no longer uses the term `Module language'.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2610566504959049790?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2.5'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/2610566504959049790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2610566504959049790' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2610566504959049790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2610566504959049790'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/04/plt-scheme-v425.html' title='PLT Scheme v4.2.5'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-3811154831217235895</id><published>2010-03-08T11:35:00.006-05:00</published><updated>2010-03-08T12:22:43.990-05:00</updated><title type='text'>Talk at Flourish</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_gJUvnpacURg/S5UwRCtLiDI/AAAAAAAAAI0/9mdGDzmDD7k/s1600-h/langs.png"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 316px; height: 233px;" src="http://3.bp.blogspot.com/_gJUvnpacURg/S5UwRCtLiDI/AAAAAAAAAI0/9mdGDzmDD7k/s400/langs.png" alt="" id="BLOGGER_PHOTO_ID_5446312393716762674" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;
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.)
&lt;/p&gt;

&lt;p&gt;
Some highlights: the blues are Scheme-like languages, the reds are langauges we use to write documentation (see &lt;a href="http://docs.plt-scheme.org/scribble/"&gt;Scribble&lt;/a&gt; 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.
&lt;/p&gt;

&lt;p&gt;
Curious about how we managed to write and use so many different languages?
I'll be giving a talk at &lt;a href="http://www.flourishconf.com/flourish2010/"&gt;Flourish 2010&lt;/a&gt; next week (3/19 @11am, UIC in Chicago) explaining how. Come to learn more!
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-3811154831217235895?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/3811154831217235895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=3811154831217235895' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3811154831217235895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3811154831217235895'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/03/talk-at-flourish.html' title='Talk at Flourish'/><author><name>Robby</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09543995794678843248'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_gJUvnpacURg/S5UwRCtLiDI/AAAAAAAAAI0/9mdGDzmDD7k/s72-c/langs.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8557185805751063148</id><published>2010-02-28T20:16:00.006-05:00</published><updated>2010-02-28T20:32:34.398-05:00</updated><title type='text'>DAGs vs Trees</title><content type='html'>&lt;p&gt;
As I wondering whether or not there is a better layout algorithm for the module browser window, I looked into &lt;a href="http://www.cs.umd.edu/hcil/treemap-history/"&gt;tree maps&lt;/a&gt;. 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.
&lt;/p&gt;

&lt;p&gt;
... 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 &lt;tt&gt;#lang scheme&lt;/tt&gt; (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 &lt;tt&gt;#lang scheme&lt;/tt&gt;).
&lt;/p&gt;

&lt;p&gt;
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).
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8557185805751063148?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8557185805751063148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8557185805751063148' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8557185805751063148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8557185805751063148'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/02/dags-vs-trees.html' title='DAGs vs Trees'/><author><name>Robby</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09543995794678843248'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8793911366542740014</id><published>2010-01-29T12:57:00.005-05:00</published><updated>2010-01-29T21:18:18.443-05:00</updated><title type='text'>Benchmarks</title><content type='html'>First, the usual disclaimer:

&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_KNUe0zbAbNc/S2MhtPN92xI/AAAAAAAAAAM/z7_pjgGoY4I/s1600-h/benchmark.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; display: block; cursor: pointer; width: 320px; height: 226px;" src="http://3.bp.blogspot.com/_KNUe0zbAbNc/S2MhtPN92xI/AAAAAAAAAAM/z7_pjgGoY4I/s320/benchmark.jpg" alt="" id="BLOGGER_PHOTO_ID_5432222636601891602" border="0" /&gt;&lt;/a&gt;
&lt;/div&gt;That said, I've run the latest version of PLT Scheme on two sets of benchmarks:
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cs.utah.edu/%7Emflatt/benchmarks-20100126/log3/Benchmarks.html"&gt;Benchmarks in the PLT sources&lt;/a&gt; – vs. Bigloo, Chicken, Gambit, Guile, Ikarus, Larceny, MIT Scheme, and Scheme48; safe operations and generic arithmetic only
&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cs.utah.edu/%7Emflatt/benchmarks-20100126/log1/Gambit_20benchmarks.html"&gt;Benchmarks in the Gambit sources&lt;/a&gt; – vs. Bigloo and Gambit; generic vs. fixnum-/flonum-specific arithmetic, safe vs. unsafe operations&lt;/li&gt;&lt;/ul&gt;The 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...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8793911366542740014?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8793911366542740014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8793911366542740014' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8793911366542740014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8793911366542740014'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/01/benchmarks.html' title='Benchmarks'/><author><name>Matthew Flatt</name><uri>http://www.blogger.com/profile/03369511886823036667</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='17654771758910398691'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_KNUe0zbAbNc/S2MhtPN92xI/AAAAAAAAAAM/z7_pjgGoY4I/s72-c/benchmark.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8617297185333389454</id><published>2010-01-28T21:40:00.001-05:00</published><updated>2010-01-28T21:41:24.839-05:00</updated><title type='text'>PLT Scheme v4.2.4</title><content type='html'>PLT Scheme version 4.2.4 is now available from&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;&lt;tt&gt;http://plt-scheme.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;ul&gt;&lt;li&gt;The &lt;tt&gt;scheme/flonum&lt;/tt&gt; and &lt;tt&gt;scheme/fixnum&lt;/tt&gt; 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.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scheme/unsafe/ops&lt;/tt&gt; library provides arithmetic and other operations that are implemented without dynamic checks.  Avoiding checks can sometimes improve performance, but at the expense of safety.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;2htdp/universe&lt;/tt&gt;: 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 &lt;tt&gt;htdp/image&lt;/tt&gt; library explicitly.  For the full details, see the new &lt;a href="http://docs.plt-scheme.org/teachpack/2htdphtdp-port.html"&gt;Porting World Programs&lt;/a&gt; section of the documentation.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;2htdp/image&lt;/tt&gt; library continues to grow.  In this release, it is supported by &lt;tt&gt;2htdp/universe&lt;/tt&gt;, 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.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;htdp/world&lt;/tt&gt;: 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.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scheme/class&lt;/tt&gt; library now provides &lt;tt&gt;this%&lt;/tt&gt;, which refers to the class of the current object (i.e. &lt;tt&gt;this&lt;/tt&gt;).&lt;/li&gt;&lt;li&gt;&lt;tt&gt;scheme/generator&lt;/tt&gt; has convenient functions for infinite generators, and for converting a generator to a sequence for iteration.&lt;/li&gt;&lt;li&gt;PLT Scheme's add-on directory can be customized by the &lt;tt&gt;$PLTADDONDIR&lt;/tt&gt; environment variable or &lt;tt&gt;--addon&lt;/tt&gt;/&lt;tt&gt;-A&lt;/tt&gt; command-line flags.  This controls where downloaded Planet packages and their compiled Scribble documentation are installed.&lt;/li&gt;&lt;li&gt;Additional extensions include: saving &lt;tt&gt;errno&lt;/tt&gt; in foreign calls, much improved &lt;tt&gt;sort&lt;/tt&gt; speed, normalized results from &lt;tt&gt;procedure-arity&lt;/tt&gt;, and more.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8617297185333389454?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2.4'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8617297185333389454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8617297185333389454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8617297185333389454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8617297185333389454'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/01/plt-scheme-v424.html' title='PLT Scheme v4.2.4'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8205870831316099176</id><published>2010-01-02T11:40:00.005-05:00</published><updated>2010-01-08T12:39:12.751-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scheme video'/><title type='text'>Scheme Videos (Lectures and Talks)</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:arial, sans-serif;font-size:small;"&gt;&lt;p style="font-weight: bold; "&gt;Scheme Videos (Lectures and Talks)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;(thanks to Geoffrey Knauth and Hari)&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;There's the SICP course Abelson &amp;amp; Sussman gave to [HP, I think] in the mid-1980s: &lt;a x="y" href="http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;MIT OCW / 6.001 using SICP, Spring 2005: &lt;a x="y" href="http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/VideoLectures/index.htm" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/VideoLectures/index.htm&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;All the ICFP 2009 videos (man this made my day!!): &lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://&lt;/a&gt;&lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;vidiowiki&lt;/a&gt;&lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;.com/feature/list/&lt;/a&gt;&lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;fnu&lt;/a&gt;&lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;/&lt;/a&gt;&lt;a x="y" href="http://vidiowiki.com/feature/list/fnu/ICFP_2009" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;ICFP_2009&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Daniel P Friedman - A Celebration (this too!): &lt;a x="y" href="http://www.cs.indiana.edu/dfried_celebration.html" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.cs.indiana.edu/dfried_celebration.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;DrScheme v4.0 Tour: &lt;a x="y" href="http://www.youtube.com/watch?v=vgQO_kHl39g&amp;amp;fmt=18" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=vgQO_kHl39g&amp;amp;fmt=18&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Similar, if you understand Russian:&lt;/li&gt;&lt;li&gt;&lt;a x="y" href="http://www.youtube.com/watch?v=wECY7s9k-V0" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=wECY7s9k-V0&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a x="y" href="http://www.youtube.com/watch?v=2CVJjqOT6WM" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=2CVJjqOT6WM&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Matthias Felleisen - Programming at Northeastern: &lt;a x="y" href="http://www.savevid.com/video/matthias-felleisen-programming-at-northeastern-university.html" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.savevid.com/video/matthias-felleisen-programming-at-northeastern-university.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Matthew Flatt - Processes without Partitions: &lt;a x="y" href="http://www.researchchannel.org/prog/displayevent.aspx?rID=3892" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.researchchannel.org/prog/displayevent.aspx?rID=3892&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Shriram Krishnamurthi on WeScheme: &lt;a x="y" href="http://vidiowiki.com/watch/cydr9yk/" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://vidiowiki.com/watch/cydr9yk/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Robby Findler - Macros Matter: &lt;a x="y" href="http://www.mefeedia.com/video/26348171" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.mefeedia.com/video/26348171&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Using PLT Scheme in the Game Industry: &lt;a x="y" href="http://www.youtube.com/watch?v=2CVJjqOT6WM" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=2CVJjqOT6WM&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Stanford Lecture (Kawa): &lt;a x="y" href="http://www.youtube.com/watch?v=_cV8NWQCxnE" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=_cV8NWQCxnE&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Bluetooth communication using PLT Scheme: &lt;a x="y" href="http://www.youtube.com/watch?v=pmR_dIXm6sY" target="_blank" style="font-family: arial, sans-serif; color: rgb(0, 62, 168); "&gt;http://www.youtube.com/watch?v=pmR_dIXm6sY&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span x="y"  style=" ;font-family:Helvetica;"&gt;SICP at UCB: &lt;/span&gt;&lt;a x="y" href="http://webcast.berkeley.edu/course_details.php?seriesid=1906978454" target="_blank" style="font-family: Helvetica; color: rgb(0, 62, 168); "&gt;http://webcast.berkeley.edu/course_details.php?seriesid=1906978454&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"   style="  ;font-family:Helvetica;font-size:medium;"&gt;&lt;a href="http://www.aduni.org/courses/sicp/"&gt;http://www.aduni.org/courses/sicp/&lt;/a&gt; from ADUni by Holly Yanco. &lt;span class="Apple-style-span"  style=" ;font-family:Helvetica;"&gt;It comes with pretty good lecture notes and problem sets.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Helvetica; font-size: medium; "&gt;Michael Sperber's DMdA lectures (in German, natch): &lt;a href="http://timms.uni-tuebingen.de/List/List01.aspx?rpattern=UT_200[89]_____00[12]_info1_000_"&gt;http://timms.uni-tuebingen.de/List/List01.aspx?rpattern=UT_200[89]_____00[12]_info1_000_&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8205870831316099176?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8205870831316099176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8205870831316099176' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8205870831316099176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8205870831316099176'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/01/scheme-videos-lectures-and-talks-thanks.html' title='Scheme Videos (Lectures and Talks)'/><author><name>John Clements</name><uri>http://www.blogger.com/profile/15701081040575095781</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='06036037574602941205'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2650374273353885414</id><published>2009-12-07T13:18:00.002-05:00</published><updated>2009-12-07T14:10:20.655-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='futures'/><category scheme='http://www.blogger.com/atom/ns#' term='parallelism'/><title type='text'>Futures: Fine Grained Parallelism in PLT</title><content type='html'>&lt;p&gt;
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:
&lt;/p&gt;

&lt;center&gt;
&lt;a href="http://pre.plt-scheme.org/docs/html/futures/"&gt;http://pre.plt-scheme.org/docs/html/futures/&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;
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:

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

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).
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2650374273353885414?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/2650374273353885414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2650374273353885414' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2650374273353885414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2650374273353885414'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/12/futures-fine-grained-parallelism-in-plt.html' title='Futures: Fine Grained Parallelism in PLT'/><author><name>Robby</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09543995794678843248'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-5329605548581881880</id><published>2009-12-01T06:03:00.001-05:00</published><updated>2009-12-01T06:04:47.314-05:00</updated><title type='text'>PLT Scheme v4.2.3</title><content type='html'>PLT Scheme version 4.2.3 is now available from&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;&lt;tt&gt;http://plt-scheme.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;The unit test framework for the teaching languages provides &lt;tt&gt;check-member-of&lt;/tt&gt; and &lt;tt&gt;check-range&lt;/tt&gt; for checking "random functions", i.e., "functions" that may produce several different results for one and the same argument.&lt;/li&gt;&lt;li&gt;Added a new image library, &lt;tt&gt;2htdp/image&lt;/tt&gt;.  Significant changes from &lt;tt&gt;htdp/image&lt;/tt&gt;:&lt;ul&gt;&lt;li&gt;copying and pasting does not introduce jaggies&lt;/li&gt;&lt;li&gt;&lt;tt&gt;equal?&lt;/tt&gt; comparisons are more efficient&lt;/li&gt;&lt;li&gt;added rotation &amp;amp; scaling&lt;/li&gt;&lt;li&gt;got rid of pinholes (new overlay, beside, above functions based on bounding boxes)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scheme/vector&lt;/tt&gt; library provides common vector operations (also reprovided by &lt;tt&gt;scheme&lt;/tt&gt;).&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scheme/promise&lt;/tt&gt; library provides several new kinds of promises with alternatives execution strategies.&lt;/li&gt;&lt;li&gt;New port-reading utilities: &lt;tt&gt;in-port&lt;/tt&gt;, &lt;tt&gt;port-&amp;gt;list&lt;/tt&gt;, &lt;tt&gt;file-&amp;gt;list&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;A new require-macro, &lt;tt&gt;path-up&lt;/tt&gt;, for requiring a file that is higher in the directory tree.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-5329605548581881880?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2.3'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/5329605548581881880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=5329605548581881880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5329605548581881880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5329605548581881880'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/12/plt-scheme-v423.html' title='PLT Scheme v4.2.3'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-5667444686131365854</id><published>2009-10-04T16:29:00.001-04:00</published><updated>2009-10-04T16:31:02.801-04:00</updated><title type='text'>PLT Scheme v4.2.2</title><content type='html'>PLT Scheme version 4.2.2 is now available from&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;&lt;tt&gt;http://plt-scheme.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;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.&lt;/li&gt;&lt;li&gt;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).&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;syntax/keyword&lt;/tt&gt; library provides support for macros with keyword options.  A new quick start guide has been added to the documentation for the &lt;tt&gt;syntax/parse&lt;/tt&gt; library.&lt;/li&gt;&lt;li&gt;Added support for abstract contracts via the #:exists keywords.  This is an experiment to add support for data hiding to the contract system.&lt;/li&gt;&lt;li&gt;Added &lt;tt&gt;in-producer&lt;/tt&gt;: a sequence expression makes it easy to iterate over producer functions (e.g., &lt;tt&gt;read&lt;/tt&gt;).  A new &lt;tt&gt;scheme/generator&lt;/tt&gt; library creates generators that can use a (parameterized) yield function.&lt;/li&gt;&lt;li&gt;HtDP langs: several primitives now consume 0 and 1 arguments in ISL (and up), including &lt;tt&gt;append&lt;/tt&gt;, &lt;tt&gt;+&lt;/tt&gt; and &lt;tt&gt;*&lt;/tt&gt;.  In addition, &lt;tt&gt;make-list&lt;/tt&gt; was added to the primitives.&lt;/li&gt;&lt;li&gt;The API to Universe has a number of new constructs.  All Universe programs should run unchanged.  The most important change is the addition of &lt;tt&gt;animate&lt;/tt&gt; as an alternative name for &lt;tt&gt;run-simulation&lt;/tt&gt;.  In addition, adding the clause &lt;tt&gt;(state true)&lt;/tt&gt; to a world description now pretty-prints the state of the world into a separate canvas.&lt;/li&gt;&lt;li&gt;A number of changes were made to the DeinProgramm / DMdA language levels: The &lt;tt&gt;check-property&lt;/tt&gt; and &lt;tt&gt;contract&lt;/tt&gt; forms were added, &lt;tt&gt;define-record-procedures-parametric&lt;/tt&gt; has changed.  See the documentation for details.&lt;/li&gt;&lt;li&gt;The test engine in the HtDP languages no longer warns programmers when the Definitions window has no tests.&lt;/li&gt;&lt;li&gt;ProfessorJ (and related code) is no longer included in the PLT distributions.  It may re-appear in the future as a PLaneT package.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-5667444686131365854?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2.2'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/5667444686131365854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=5667444686131365854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5667444686131365854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5667444686131365854'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/10/plt-scheme-v422.html' title='PLT Scheme v4.2.2'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6017258707048735589</id><published>2009-09-21T07:23:00.007-04:00</published><updated>2009-09-21T07:33:08.691-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='set'/><category scheme='http://www.blogger.com/atom/ns#' term='check syntax'/><title type='text'>set! vs set-box! and unbox</title><content type='html'>&lt;p&gt;
A few weeks ago I was chatting with some PLT folks and was surprised to hear them say that they avoided &lt;tt&gt;set!&lt;/tt&gt; because using &lt;tt&gt;set-box!&lt;/tt&gt; and &lt;tt&gt;unbox&lt;/tt&gt; was easier to see what was going on.
&lt;/p&gt;

&lt;p&gt;
This struck me as wrong since one might pass boxes around and then you can't be sure which box you're mutating, but you cannot pass variable references around and thus which variable you're using is always lexically apparent. (Of course, when you add &lt;tt&gt;lambda&lt;/tt&gt; into the mix that isn't really true, since you can capture a variable in a closure and pass that around.)
&lt;/p&gt;

&lt;p&gt;
Their point seemed to be that you had to write something special at each use of the box, unlike with &lt;tt&gt;set!&lt;/tt&gt; where you simply write a variable reference and it might be getting a changing quantity and it might not be. This made me realize I could do something to help, at least, and so I changed Check Syntax so that it colored &lt;tt&gt;set!&lt;/tt&gt;'d variables in red, like this:
&lt;/p&gt;


&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.ece.northwestern.edu/%7Erobby/tmp/cs-set.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: left; cursor: pointer; width: 725px; height: 348px;" src="http://www.ece.northwestern.edu/%7Erobby/tmp/cs-set.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-6017258707048735589?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6017258707048735589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6017258707048735589' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6017258707048735589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6017258707048735589'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/09/set-vs-set-box-and-unbox.html' title='set! vs set-box! and unbox'/><author><name>Robby</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09543995794678843248'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_gJUvnpacURg/SrdjWDrHBiI/AAAAAAAAAHs/Bd_igcmnUiE/s72-c/Picture+2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-3859338948523565949</id><published>2009-07-30T08:24:00.001-04:00</published><updated>2009-07-30T08:25:17.306-04:00</updated><title type='text'>PLT Scheme v4.2.1</title><content type='html'>PLT Scheme version 4.2.1 is now available from
&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;&lt;tt&gt;http://plt-scheme.org/&lt;/tt&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;ul&gt;&lt;li&gt;This is the last release that includes ProfessorJ. As of the next release, Kathy Gray who created and maintained the Professor will move the code to planet and maintain only at a minimal level.&lt;/li&gt; &lt;li&gt;Typed Scheme 2.0 extends the type system significantly, making it more expressive.  For example, predicates applied to selectors, such as (number? (car x)), are meaningful to the type system.&lt;/li&gt; &lt;li&gt;Faster installation of Planet packages that trigger install of other Planet packages, because the documentation index is updated only once after a group of packages is installed.&lt;/li&gt; &lt;li&gt;The &lt;tt&gt;syntax/parse&lt;/tt&gt; library provides macro writers with an enhanced syntax pattern matcher that reports errors based on the patterns' declared classes of syntax.&lt;/li&gt; &lt;li&gt;Identifier mappings following the v4 dictionary interface and naming conventions are available from the &lt;tt&gt;syntax/id-table&lt;/tt&gt; library.&lt;/li&gt; &lt;li&gt;Redex: added &lt;tt&gt;define-relation&lt;/tt&gt; and generalized patterns that appear in &amp;quot;where&amp;quot; clauses to use the full Redex pattern matcher. (This is a backwards incompatible change, but one often requested; see the Redex release notes for details.)&lt;/li&gt; &lt;li&gt;The Web Server's serializable closures are now available for other purposes through the web-server/lang/serial-lambda library.&lt;/li&gt; &lt;li&gt;Teachpacks: small changes to universe portion of the &amp;quot;universe.ss&amp;quot; API, plus the addition of a form for launching many (communicating) worlds simultaneously.  Bug fixes concerning conversion to strings.&lt;/li&gt; &lt;li&gt;It is now possible to create custom scribble readers with a command characters different than &lt;tt&gt;@&lt;/tt&gt;, see &lt;tt&gt;make-at-reader/inside&lt;/tt&gt; and &lt;tt&gt;make-at-reader&lt;/tt&gt;&lt;/li&gt; &lt;li&gt;Note: this is likely to be the last release that includes a solaris distribution.  If you need these builds, or if you have access to a (Sparc) Solaris machine than can be used in PLT builds, then please let me know.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-3859338948523565949?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2.1'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/3859338948523565949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=3859338948523565949' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3859338948523565949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3859338948523565949'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/07/plt-scheme-v421.html' title='PLT Scheme v4.2.1'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6441102098879154048</id><published>2009-06-23T12:02:00.003-04:00</published><updated>2009-06-23T12:39:37.301-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><category scheme='http://www.blogger.com/atom/ns#' term='structure properties'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Serializable Closures in PLT Scheme</title><content type='html'>&lt;p&gt;PLT Scheme supports an extensible &lt;a href="http://docs.plt-scheme.org/reference/serialization.html"&gt;serialization&lt;/a&gt; system for structures. A structure is serializable if it has a &lt;code&gt;prop:serializable&lt;/code&gt; property. There are many &lt;a href="http://docs.plt-scheme.org/search/index.html?q=prop%3A"&gt;properties&lt;/a&gt; in PLT Scheme for other extensions, such as &lt;a href="http://docs.plt-scheme.org/reference/procedures.html#(def._((lib._scheme/base..ss)._prop~3aprocedure))"&gt;applicable structures&lt;/a&gt; and &lt;a href="http://docs.plt-scheme.org/reference/booleans.html#(def._((quote._~23~25kernel)._prop~3aequal+hash))"&gt;custom equality predicates&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://docs.plt-scheme.org/web-server/index.html"&gt;PLT Web&lt;/a&gt; application development framework uses these features to provide &lt;a href="http://docs.plt-scheme.org/web-server/stateless.html#(part._.Serializable_.Continuations)"&gt;serializable continuations&lt;/a&gt; through a number of source transformations and a serializable closure structure.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Warning: This remainder post refers to features only available in the latest SVN revision of PLT Scheme.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I've recently made these closures more accessible to non-Web programs through &lt;code&gt;web-server/lang/serial-lambda&lt;/code&gt;. Here's a demo:&lt;/p&gt;
&lt;pre&gt;
#lang scheme
(require web-server/lang/serial-lambda
         scheme/serialize)

(define f
  (let ([z 5])
    (serial-lambda
     (x y)
     (+ x y z))))

(define (test-it)
  (printf "~S~n" (f 1 2))
  (let ([fs (serialize f)])
    (printf "~S~n" fs)
    (let ([df (deserialize fs)])
      (printf "~S~n" df)
      (printf "~S~n" (df 1 2)))))

&amp;gt; (test-it)
8
((2) 1 ((#"/Users/jay/Dev/svn/plt/collects/web-server/exp/test-serial.ss" . "lifted.6")) 0 () () (0 5))
#(struct:7a410aca70b31e88b4c2f0fe77fa7ffe:0 #&lt;procedure&gt;)
8
&lt;/pre&gt;

&lt;p&gt;Now, let's see how it is implemented. &lt;a href="http://svn.plt-scheme.org/plt/trunk/collects/web-server/lang/serial-lambda.ss"&gt;&lt;code&gt;web-server/lang/serial-lambda&lt;/code&gt;&lt;/a&gt; is thin wrapper around &lt;a href="http://svn.plt-scheme.org/plt/trunk/collects/web-server/lang/closure.ss"&gt;&lt;code&gt;web-server/lang/closure&lt;/code&gt;&lt;/a&gt;, which has two syntax transformer functions: &lt;code&gt;define-closure!&lt;/code&gt; which defines the closure structure and &lt;code&gt;make-closure&lt;/code&gt; which instantiates the closure. (The two tasks are separated to easily provide a user top-level definition syntax for named closures with different free identifires, rather than simply anonymous lambdas with fixed free identifiers.)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;make-closure&lt;/code&gt; does the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Expands the procedure syntax using &lt;a href="http://docs.plt-scheme.org/reference/stxtrans.html#(def._((quote._~23~25kernel)._local-expand))"&gt;&lt;code&gt;local-expand&lt;/code&gt;&lt;/a&gt;, so it can use &lt;a href="http://docs.plt-scheme.org/syntax/syntax-helpers.html#(def._((lib._syntax/free-vars..ss)._free-vars))"&gt;&lt;code&gt;free-vars&lt;/code&gt;&lt;/a&gt; to compute the free identifires.&lt;/li&gt;
&lt;li&gt;Uses &lt;code&gt;define-closure!&lt;/code&gt; to define the structure and get the name for the constructor.&lt;/li&gt;
&lt;li&gt;Instantiates the closure with the current values of the free identifiers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The more interesting work is done by &lt;code&gt;define-closure!&lt;/code&gt;. At a high-level, it needs to do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a deserialization function.&lt;/li&gt;
&lt;li&gt;Create a serialization function that references the deserializer.&lt;/li&gt;
&lt;li&gt;Define the closure structure type that references the serializer.&lt;/li&gt;
&lt;li&gt;Provide the deserializer from the current module so that arbitrary code can deserialize instances of this closure type.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These tasks are complicated in a few ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The deserializer needs the closure structure type definition to create instances and the serializer needs the closure structure type to access their fields.&lt;/li&gt;
&lt;li&gt;The serializer needs the syntactic identifier of the deserializer so that &lt;code&gt;scheme/serialize&lt;/code&gt; can &lt;a href="http://docs.plt-scheme.org/reference/Module_Names_and_Loading.html#(def._((quote._~23~25kernel)._dynamic-require))"&gt;&lt;code&gt;dynamic-require&lt;/code&gt;&lt;/a&gt; it during deserialization.&lt;/li&gt;
&lt;li&gt;The deserializer must be defined at the top-level, so it may be provided.&lt;/li&gt;
&lt;li&gt;All this may occur in a syntactic expression context.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thankfully, the PLT Scheme &lt;a href="http://docs.plt-scheme.org/reference/Macros.html"&gt;macro system&lt;/a&gt; is powerful to support all this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://docs.plt-scheme.org/reference/stxtrans.html#(def._((quote._~23~25kernel)._syntax-local-lift-expression))"&gt;&lt;code&gt;syntax-local-lift-expression&lt;/code&gt;&lt;/a&gt; allows a syntax transformer to lift an expression to the top-level of a module and returns the identifier it is bound to.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://docs.plt-scheme.org/search/index.html?q=syntax-local-lift-values-expression"&gt;&lt;code&gt;syntax-local-lift-values-expression&lt;/code&gt;&lt;/a&gt; (added in 4.2.0.3) provides the same for expressions that return multiple values, such as &lt;a href="http://docs.plt-scheme.org/reference/creatingmorestructs.html#(def._((quote._~23~25kernel)._make-struct-type))"&gt;&lt;code&gt;make-struct-type&lt;/code&gt;&lt;/a&gt;, which is used to define structures.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://docs.plt-scheme.org/search/index.html?q=syntax-local-lift-provide"&gt;&lt;code&gt;syntax-local-lift-provide&lt;/code&gt;&lt;/a&gt; (added in 4.2.0.4) allows a syntax transformer to lift a provide to the top-level.&lt;/li&gt;
 &lt;/ul&gt;

&lt;p&gt;The only complicated piece is allowing the deserializer and serializer to refer to the closure structure constructor and accessors. This is easily accomplished by first defining lifting boxes that will hold these values and initializing them when the structure type is defined. This is safe because all accesses to the boxes are under lambdas that are guaranteed not to be run before the structure type is defined.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An aside on the closure representation.&lt;/strong&gt; The closure is represented as a structure with one field: the environment. The environment is represented as a thunk that returns &lt;em&gt;n&lt;/em&gt; values, one for each of the free identifiers. This ensures that references that were under lambdas in the original syntax, remain under lambdas in the closure construction, so the serializable closures work correctly inside &lt;code&gt;letrec&lt;/code&gt;. This thunk is applied by the serializer and the free values are stored in a vector. The closure also uses the &lt;code&gt;prop:procedure&lt;/code&gt; structure property to provide an application function that simply invokes the environment thunk and binds its names, then &lt;code&gt;apply&lt;/code&gt;s the original procedure syntax to the arguments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An aside on the serializer.&lt;/strong&gt; The deserializer is bound to lifted identifier which is represented in PLT Scheme as an unreadable symbol. Version 4.2.0.5 added support for (de)serializing these.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-6441102098879154048?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6441102098879154048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6441102098879154048' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6441102098879154048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6441102098879154048'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/06/serializable-closures-in-plt-scheme.html' title='Serializable Closures in PLT Scheme'/><author><name>Jay McCarthy</name><uri>http://www.blogger.com/profile/07912023932333508057</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01254935550651991393'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-655377273386641529</id><published>2009-06-01T14:41:00.001-04:00</published><updated>2009-06-01T14:46:59.239-04:00</updated><title type='text'>PLT Scheme v4.2</title><content type='html'>PLT Scheme version 4.2 is now available from&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;http://plt-scheme.org/&lt;/a&gt;&lt;/pre&gt;
Internally, this version includes a conversion from C++ to Scheme for part of the GUI toolbox --- specifically, 25k lines of code that implement the general text and pasteboard editor.  This conversion is a start on a larger reimplementation of the GUI toolbox.  Although we believe that this change will help make PLT Scheme better in the long run, we must expect bugs in the short term due to porting errors.  Users should therefore be aware of the change, even though the new implementation is meant to behave the same as previous versions.
&lt;ul&gt;
&lt;li&gt;A new statistical profiler is now available; see the "profiler" manual for more information.  Currently, the profiler supports only textual output, but future plans include a GUI interface and DrScheme integration.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;world&lt;/tt&gt; teachpack is now deprecated.  Its replacement &lt;tt&gt;universe&lt;/tt&gt; has a new interface that uses strings instead of symbols and characters.&lt;/li&gt;
&lt;li&gt;Web-server: Native continuations in the stateless servlet language support capturing continuations from untransformed contexts; soft state library for stateless servlets.&lt;/li&gt;
&lt;li&gt;DrScheme's Stepper can now jump to a selected program expression.&lt;/li&gt;
&lt;li&gt;New in &lt;tt&gt;scheme/base&lt;/tt&gt;: &lt;tt&gt;hash-has-key?&lt;/tt&gt;, &lt;tt&gt;hash-ref!&lt;/tt&gt;, &lt;tt&gt;in-sequences&lt;/tt&gt;, &lt;tt&gt;in-cycle&lt;/tt&gt;.  New in &lt;tt&gt;scheme&lt;/tt&gt;: &lt;tt&gt;count&lt;/tt&gt;, &lt;tt&gt;make-list&lt;/tt&gt; (from &lt;tt&gt;scheme/list&lt;/tt&gt;), &lt;tt&gt;const&lt;/tt&gt; (from &lt;tt&gt;scheme/function&lt;/tt&gt;).&lt;/li&gt;
&lt;li&gt;Some performance improvements, including faster start-up for small programs. The latter is a result of delaying module invocations at higher phases (compile time, meta-compile time, etc.) until compilation is demanded at the next lower phase; this on-demand instantiation is per-phase, as opposed to per-module within a phase.&lt;/li&gt;
&lt;/ul&gt;

[Note that mirror sites can take a while to catch up with the new downloads.]

Feedback Welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-655377273386641529?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.2'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/655377273386641529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=655377273386641529' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/655377273386641529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/655377273386641529'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/06/plt-scheme-v42.html' title='PLT Scheme v4.2'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-4636049989832884950</id><published>2009-05-25T13:47:00.003-04:00</published><updated>2009-05-25T13:53:43.299-04:00</updated><title type='text'>Typed Scheme 2.0</title><content type='html'>&lt;p&gt;Typed Scheme version 2.0 is now available from SVN.&lt;/p&gt;

&lt;p&gt;One persistent limitation of Typed Scheme has been that while this expression works as expected:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(if (number? x) (add1 x) 7)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The simple transformation of making &lt;code&gt;x&lt;/code&gt; a part of a structure breaks Typed Scheme's ability to reason about the code. So this expression doesn't typecheck:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;(if (number? (car x)) (add1 (car x)) 7)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;With the newest version of Typed Scheme, now available in SVN, both of these will now work.  In general, Typed Scheme can now follow paths into arbitrary immutable structures, including pairs.&lt;/p&gt;

&lt;p&gt;This is part of a more general reworking of underlying mechanisms of the Typed Scheme typechecker, which makes it both simpler and more flexible.  I hope that it will be possible,  sing this new foundation to add additional features that make more programs easy to express in
Typed Scheme.&lt;/p&gt;

&lt;p&gt;Of course, these changes mean that Typed Scheme may be more unstable, so if you notice any new bugs, please let us know.&lt;/p&gt;

&lt;p&gt;Unfortunately, this won't be available in the upcoming 4.2 release, but it will be in the release after that.&lt;/p&gt;

&lt;p&gt;If you have any questions or comments or feature requests for Typed Scheme, please let us know.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-4636049989832884950?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/4636049989832884950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=4636049989832884950' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4636049989832884950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4636049989832884950'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/typed-scheme-20.html' title='Typed Scheme 2.0'/><author><name>Sam TH</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10409877614575606513'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-1513383412261723218</id><published>2009-05-24T03:17:00.004-04:00</published><updated>2009-05-24T06:32:04.858-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Explicit Renaming Macros; Implicitly</title><content type='html'>It's been one too many times that I hear respectable Schemers talk about how they like explicit renaming macros &amp;#8212; not because they're more powerful, but because using them is close to using simple &lt;tt&gt;defmacro&lt;/tt&gt;s.  In this post I'll show how you can easily write ER-like macros in PLT, just so I won't need to explain the same thing once again.

Disclaimers:&lt;ul&gt;&lt;li&gt;If you're not interested in ER-macros, then you shouldn't read this.&lt;/li&gt;&lt;li&gt;I'm not claiming that ER macros are not respectable, I'm just surprised at the knee jerk reaction to &lt;tt&gt;syntax-case&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;This is not an attempt at providing some portable library or even a PLT library. The intention is to show that &lt;tt&gt;syntax-case&lt;/tt&gt;-style macros are "as convenient" as ER macros, if you really want to get down to that level.&lt;/li&gt;&lt;li&gt;This is also not an attempt at any kind of formal claim of equivalence in any direction, only a demonstration that you can get the same kind of convenience.&lt;/li&gt;&lt;li&gt;The bottom line here should be just the convenience point, addressed at people who like ER macros for that, and who think that &lt;tt&gt;syntax-case&lt;/tt&gt; macros are somehow magical or that you lose the ability to play with S-expressions.&lt;/li&gt;&lt;/ul&gt;

The important fact here is that while PLT's &lt;tt&gt;syntax-case&lt;/tt&gt; macro system does not give you raw S-expressions, what you get is a simple wrapper holding them.  A macro is a syntax transformer: a function that consumes a syntax value and returns one.  For example:&lt;pre&gt;  (define-syntax (foo stx)
    #'123)&lt;/pre&gt;is a macro that always expands to 123 (with &lt;tt&gt;#'123&lt;/tt&gt; being the usual shorthand for &lt;tt&gt;(syntax 123)&lt;/tt&gt;).

A syntax object in PLT Scheme (the input to macro functions) is an S-expression, with some lexical information added &amp;#8212; this includes the lexical context (in an opaque form), source location, and a few more things.  To be more precise, a syntax value is a nested structure of wrappers holding lists and pairs, holding more wrappers, with identifiers at the leaves, where an identifier is a wrapper holding a symbol.  It's easy to strip off all wrappers using &lt;tt&gt;syntax-&amp;gt;datum&lt;/tt&gt; if you like to work with S-expressions, but you &lt;em&gt;don't&lt;/em&gt; want to strip it off of identifiers, since that will lose the important gravy.  (In fact, the &lt;tt&gt;defmacro&lt;/tt&gt; library works by stripping off all information, even from identifiers, then reconstructing it by trying to match names in the output form with the original input.)

Instead of throwing away all information, what we want to do is preserve identifiers.  We can use &lt;tt&gt;syntax-&amp;gt;list&lt;/tt&gt; for this: this is a function that takes a syntax value that contains a list, and strips off the top-level extra information leaving you with a list of syntaxes for the sub-expressions (returning &lt;tt&gt;#f&lt;/tt&gt; if the input syntax does not hold a list).  Once we have such a list, we can do the usual kind of processing with it, and when we're done turn the result back into a syntax using &lt;tt&gt;datum-&amp;gt;syntax&lt;/tt&gt; (which "borrows" the original input expression's information).  For example,&lt;pre&gt;  (define-syntax (add1 stx)
    (let ([+ #'+])
      (datum-&amp;gt;syntax stx `(,+ 1 ,@(cdr (syntax-&amp;gt;list stx))) stx)))&lt;/pre&gt;That's a very simple example though; if you try something a little more complicated, you quickly find out that all this unwrapping is inconvenient:&lt;pre&gt;  (define-syntax (mylet stx)
    (let ([*lambda #'lambda])
      (datum-&amp;gt;syntax
       stx
       `((,*lambda ,(map (lambda (x) (car (syntax-&amp;gt;list x)))
                         (syntax-&amp;gt;list (cadr (syntax-&amp;gt;list stx))))
                   ,@(cddr (syntax-&amp;gt;list stx)))
         ,@(map (lambda (x) (cadr (syntax-&amp;gt;list x)))
                (syntax-&amp;gt;list (cadr (syntax-&amp;gt;list stx)))))
       stx)))&lt;/pre&gt;(Note also the &lt;tt&gt;*lambda&lt;/tt&gt; that is used to avoid the &lt;tt&gt;lambda&lt;/tt&gt; expressions used in the meta-code.)

What can help here is some helper function that receive a syntax value as its input, and turn all wrapped lists into real lists recursively, but will leave identifiers intact:&lt;pre&gt;  (begin-for-syntax
    (define (strip stx)
      (let ([maybe-list (syntax-&amp;gt;list stx)])
        ;; syntax-&amp;gt;list returns #f if the syntax is not a list
        (if maybe-list (map strip maybe-list) stx))))&lt;/pre&gt;But as long as we're writing a syntax utility, we can make it do a litte more work: feed the resulting tree to &lt;em&gt;your&lt;/em&gt; transformer, grab its result, and do the necessary &lt;tt&gt;datum-&amp;gt;syntax&lt;/tt&gt; voodoo on it:&lt;pre&gt;  (begin-for-syntax
    (define (er-like-transformer transformer)
      (define (strip stx)
        (let ([maybe-list (syntax-&amp;gt;list stx)])
          ;; syntax-&amp;gt;list returns #f if the syntax is not a list
          (if maybe-list (map strip maybe-list) stx)))
      (lambda (stx)
        (datum-&amp;gt;syntax stx (transformer (strip stx)) stx))))&lt;/pre&gt;

With this utility defined, the above macro becomes much easier to deal with:&lt;pre&gt;  (define-syntax mylet
    (er-like-transformer
     (lambda (exp)
       (let ((vars  (map car (cadr exp)))
             (inits (map cadr (cadr exp)))
             (body  (cddr exp)))
         `((,(syntax lambda) ,vars ,@body)
           ,@inits)))))&lt;/pre&gt;...and this is almost identical to the explicit renaming version of the macro; for example, compare it with the sample code in the &lt;a href="http://groups.csail.mit.edu/mac/projects/scheme/documentation/scheme_3.html#SEC49"&gt;MIT-Scheme manual&lt;/a&gt;.  The only change is that &lt;tt&gt;(rename 'lambda)&lt;/tt&gt; is replaced with &lt;tt&gt;(syntax lambda)&lt;/tt&gt;.

Obviously, this is very close, but doesn't show intentional captures.  So I just grabbed the &lt;tt&gt;loop&lt;/tt&gt; example from the same page, and did the same change &amp;#8212; only this time I used &lt;tt&gt;#'foo&lt;/tt&gt; instead of &lt;tt&gt;(syntax foo)&lt;/tt&gt; (and I also changed the one-sided &lt;tt&gt;if&lt;/tt&gt; to a &lt;tt&gt;when&lt;/tt&gt;).  The resulting macro works fine:&lt;pre&gt;  (define-syntax loop
    (er-like-transformer
     (lambda (x)
       (let ((body (cdr x)))
         `(,#'call-with-current-continuation
           (,#'lambda (exit)
            (,#'let ,#'f () ,@body (,#'f))))))))
  
  (define-syntax while
    (syntax-rules ()
      ((while test body ...)
       (loop (when (not test) (exit #f))
             body ...))))
  
  (let ((x 10))
    (while (&amp;gt; x 0)
      (printf "~s\n" x)
      (set! x (- x 1))))&lt;/pre&gt;

This is pretty close to a library, and indeed, as I was writing this text I found &lt;a href="http://www.mail-archive.com/larceny-users@lists.ccs.neu.edu/msg00097.html"&gt;a post by Andre van Tonder&lt;/a&gt; on the Larceny mailing list that uses a very similar approach and &lt;em&gt;does&lt;/em&gt; make a library out of it.  This is done by adding two arguments to the expected ER-transformation function &amp;#8212; one is a &lt;tt&gt;rename&lt;/tt&gt; function (since the above method uses &lt;tt&gt;syntax&lt;/tt&gt; it is limited to immediate identifiers), and the other is always passed as &lt;tt&gt;free-identifier=?&lt;/tt&gt;.  Such a compatibility library is, however, not the purpose of this post.

Finally, there is still a minor issue with this &amp;#8212; PLT has an implicit &lt;tt&gt;#%app&lt;/tt&gt; which is used wherever there are parentheses that stand for a function application &amp;#8212; and in this code they are used unhygienically.  This is usually not a noticeable problem, and if it is, you can add explicit &lt;tt&gt;#%app&lt;/tt&gt;s.  It might also be possible to find a more proper solution (e.g., use a hash table to keep track of lists that were disassembled by the client transformer), but at this point it might be better to just use the more natural &lt;tt&gt;syntax-case&lt;/tt&gt; anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-1513383412261723218?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/1513383412261723218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=1513383412261723218' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1513383412261723218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1513383412261723218'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/explicit-renaming-macros-implicitly.html' title='Explicit Renaming Macros; Implicitly'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6629705111318307010</id><published>2009-05-18T16:48:00.000-04:00</published><updated>2009-05-18T16:50:22.523-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='delimited continuations'/><category scheme='http://www.blogger.com/atom/ns#' term='serialization'/><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><category scheme='http://www.blogger.com/atom/ns#' term='continuations'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>The Two State Solution: Native and Serializable Continuations in the PLT Web Server</title><content type='html'>&lt;p&gt;One of the annoyance of the &lt;a href="http://docs.plt-scheme.org/web-server/stateless.html"&gt;stateless Web application&lt;/a&gt; language that comes with the PLT Web Server is that you can't call &lt;em&gt;third-party higher-order library procedures with arguments that try to capture serializable continuations&lt;/em&gt;. (I know, you try to do that all the time.) For example:&lt;/p&gt;

&lt;pre&gt;
(build-list
 3
 (lambda (i)
   (call-with-serializable-current-continuation
    (lambda (k) (serialize k)))))
&lt;/pre&gt;

&lt;p&gt;The problem is that the stateless language performs a transformation on your program to extract the continuations into a serializable representation. If you really need to do this, we've developed a compromise called "The Two State Solution": one state on the client and the other on the server. Only the third-party parts of the continuation (in this case, the code inside &lt;code&gt;build-list&lt;/code&gt;) are stored on the server; everything else is shipped to the client. You just need to annotate your code slightly to indicate where the transition is:&lt;/p&gt;

&lt;pre&gt;
(serial-&gt;native
 (build-list
  3
  (lambda (i)
    (native-&gt;serial
     (call-with-serializable-current-continuation
      (lambda (k) (serialize k)))))))
&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;serial-&gt;native&lt;/code&gt; signals the transition to the third-party and &lt;code&gt;native-&gt;serial&lt;/code&gt; signals the transition back.&lt;/p&gt;

&lt;p&gt;It is still a little annoying to find when you've called these &lt;em&gt;third-party higher-order library procedures with arguments that try to capture serializable continuations&lt;/em&gt;, so there's a simple macro that provides a transitioning wrapper for you:&lt;/p&gt;

&lt;pre&gt;(define-native (build-list/native _ ho) build-list)&lt;/pre&gt;

&lt;p&gt;expands to:&lt;/p&gt;

&lt;pre&gt;
(define (build-list/native fst snd)
  (serial-&gt;native
   (build-list
    fst
    (lambda args
      (native-&gt;serial
       (apply snd args))))))
&lt;/pre&gt;

&lt;p&gt;This new feature is documented in the &lt;a href="http://faculty.cs.byu.edu/~jay/plt-doc/web-server/stateless.html#(part._.Serializable_.Continuations)"&gt;online manual&lt;/a&gt;, of course.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-6629705111318307010?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6629705111318307010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6629705111318307010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6629705111318307010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6629705111318307010'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/two-state-solution-native-and.html' title='The Two State Solution: Native and Serializable Continuations in the PLT Web Server'/><author><name>Jay McCarthy</name><uri>http://www.blogger.com/profile/07912023932333508057</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01254935550651991393'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-4752160555167530543</id><published>2009-05-18T16:47:00.000-04:00</published><updated>2009-05-18T16:48:23.767-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><category scheme='http://www.blogger.com/atom/ns#' term='soft state'/><title type='text'>Soft State in the PLT Web Server</title><content type='html'>&lt;p&gt;Many Web applications and network protocols have values in the continuation that are necessary to complete the computation, but that may be recomputed if they are not available. This is "soft state".&lt;/p&gt;

&lt;p&gt;For example, a Web application may cache a user's preferences from a database and deliver it to a Web browser as a hidden value; when the value is returned to the application in subsequent steps, it is used to customize the display. However, if the preferences were not available (or were corrupted in some way), the application could retrieve them from the database.&lt;/p&gt;

&lt;p&gt;When using the PLT Web Server's native continuations, this roughly corresponds to the use of a &lt;em&gt;weak box&lt;/em&gt;: a box that the GC is allowed to erase the contents of. When using the PLT Web Server's serializable continuations it roughly corresponds to a weak box and a &lt;em&gt;weak hash table&lt;/em&gt; (that holds its keys weakly) to give the box a serializable value as an identifier.&lt;/p&gt;

&lt;p&gt;This programming pattern is a bit difficult to get right. So, a library that implements it is now provided with PLT Scheme: &lt;a href="http://faculty.cs.byu.edu/~jay/plt-doc/web-server/stateless.html#(part._.Soft_.State)"&gt;&lt;code&gt;web-server/lang/soft&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here's a trivial example:&lt;/p&gt;
&lt;pre&gt;
#lang web-server

(provide interface-version start)
(define interface-version 'stateless)

(define softie
  (soft-state
   (printf "Doing a long computation...~n")
   (sleep 1)))

(define (start req)
  (soft-state-ref softie)
  (printf "Done~n")
  (start
   (send/suspend
    (lambda (k-url)
      `(html (body (a ([href ,k-url]) "Done")))))))
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-4752160555167530543?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/4752160555167530543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=4752160555167530543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4752160555167530543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4752160555167530543'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/soft-state-in-plt-web-server.html' title='Soft State in the PLT Web Server'/><author><name>Jay McCarthy</name><uri>http://www.blogger.com/profile/07912023932333508057</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01254935550651991393'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-1921164854547299677</id><published>2009-05-18T13:10:00.002-04:00</published><updated>2009-05-18T13:14:54.154-04:00</updated><title type='text'>Scheme Workshop: deadline NOT extended!</title><content type='html'>&lt;p&gt;We're holding the line on our submission deadline; it's still June 5, so that gives you about three weeks to write something awesome.&lt;/p&gt;

&lt;p&gt;Re-posting the entire CfP on a blog seems a bit tacky, so instead I'll just post the link:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blog.plt-scheme.org/2009/01/cfp-scheme-workshop-2009.html"&gt;
http://blog.plt-scheme.org/2009/01/cfp-scheme-workshop-2009.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We look forward to your submissions!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-1921164854547299677?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.plt-scheme.org/2009/01/cfp-scheme-workshop-2009.html' title='Scheme Workshop: deadline NOT extended!'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/1921164854547299677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=1921164854547299677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1921164854547299677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1921164854547299677'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/scheme-workshop-deadline-not-extended.html' title='Scheme Workshop: deadline NOT extended!'/><author><name>John Clements</name><uri>http://www.blogger.com/profile/10401643794201938443</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='05655423331955166532'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2334413198277409498</id><published>2009-05-06T08:58:00.001-04:00</published><updated>2009-05-06T09:00:14.107-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='channels'/><category scheme='http://www.blogger.com/atom/ns#' term='threads'/><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><category scheme='http://www.blogger.com/atom/ns#' term='continuations'/><title type='text'>What is send/suspend?</title><content type='html'>&lt;p&gt;I often ponder what &lt;a href="http://docs.plt-scheme.org/web-server/servlet.html#(def._((lib._web-server/servlet/web..ss)._send/suspend))"&gt;&lt;code&gt;send/suspend&lt;/code&gt;&lt;/a&gt; really is. It is a lot like &lt;code&gt;call/cc&lt;/code&gt;, but has the curious property that the continuation escapes in a single way and is only called in a particular context. I often wonder if there is something weaker than &lt;code&gt;call/cc&lt;/code&gt; that implements &lt;code&gt;send/suspend&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Today I wrote a little dispatcher that uses threads to implement &lt;code&gt;send/suspend&lt;/code&gt;. In this implementation, &lt;em&gt;send&lt;/em&gt;ing truly &lt;em&gt;suspend&lt;/em&gt;s the computation.&lt;/p&gt;

&lt;p&gt;Here's the code: &lt;a href="http://www.copypastecode.com/codes/view/5003"&gt;http://www.copypastecode.com/codes/view/5003&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The trick is to have channels for communicating responses and requests. When you run this example, you should be able to add two numbers. But, in contrast to the normal &lt;code&gt;send/suspend&lt;/code&gt;, all the URLs are one-shots, because once the computation is resumed, it moves forward... it is never saved.&lt;/p&gt;

&lt;p&gt;This implementation technique also precludes clever implementations of &lt;code&gt;send/suspend/dispatch&lt;/code&gt;, like:&lt;/p&gt;
&lt;pre&gt;
(define (send/suspend/dispatch mk-page)
  (let/cc k0
    (send/back
     (mk-page
      (lambda (handler)
        (let/ec k1 
          (k0 (handler (send/suspend k1)))))))))
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2334413198277409498?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/2334413198277409498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2334413198277409498' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2334413198277409498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2334413198277409498'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/05/what-is-sendsuspend.html' title='What is send/suspend?'/><author><name>Jay McCarthy</name><uri>http://www.blogger.com/profile/07912023932333508057</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01254935550651991393'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-8595329905636585805</id><published>2009-03-29T13:03:00.004-04:00</published><updated>2009-03-29T20:17:34.367-04:00</updated><title type='text'>the DrScheme repl isn't the one in Emacs</title><content type='html'>Dear old Lisper,

&lt;div&gt;&lt;p&gt;You have found drscheme and it is almost like your old Lisp machine.
It is easy to program in it, it has things that nobody else has, and
we all love parentheses. But after some initial enthusiasm you
are wondering why in the world, we decided not to provide
commands for sending individual definitions and expressions
from the Definitions window to the Interactions window, aka,
REPL.&lt;/p&gt;

&lt;div&gt;&lt;p&gt;It wasn't an accident. It was by design after some difficult
experiences. I am personally a product of the Emacs world that you are describing below,
and my advisor Dan Friedman was called the "Lispman" on his door
sign at Indiana.&lt;/p&gt;

&lt;p&gt;When I first discovered the idea of sending individual expressions
and definitions from a buffer to a repl, it was a near-religious
revelation to me. I wanted everyone to know this trick and use it.
When I started teaching the freshman course at Rice, I told our
chairman so and he asked "why". I was shocked, awed, and I failed
to explain to him how it mattered. He was a mathematician and I
wrote it off. They don't know.&lt;/p&gt;

&lt;p&gt;Then I started watching my sophomores and juniors at Rice in lab.
Now that was a true disappointment. Few if any used this trick and
when they did, they more often tripped up and got the repl into a
state where they didn't know what was going on.&lt;/p&gt;

&lt;p&gt;In the mid 90s, I wrote some more Little books with Dan, and boy,
time and again, I watched him stumble across the state of the repl.
I even watched him re-start the repl and load the whole buffer more
often than not.&lt;/p&gt;

&lt;p&gt;Why? In the presence of macros and higher-order functions and
other beasts, it is difficult for masters of the universe with 30
years of experience to keep track of things. What do you think
students with 10 or 20 days worth of experience will do? Is it
really such a deep principle of computing to create the objects
incrementally in the repl as opposed to thinking systematically
through the design of a program?&lt;/p&gt;

&lt;p&gt;I decided not and asked Robby to make DrScheme's repl transparent.
That is, it re-starts the repl and re-loads the buffer every time.
I consider this behavior a suitable compromise: have a repl but
don't confuse yourself with send-defs and send-exprs. This is
especially true in an age when sending an entire buffer takes as
much time as sending an individual expression or definition.
Soon we'll get "compilation behind your back" so that only the
current buffer is re-interpreted. It'll start things even faster.&lt;/p&gt;

&lt;p&gt;Even though I had used the incremental mode for more than a decade
when I switched from Emacs to DrScheme in 1998, I have hardly ever
looked back. I miss a few other things but the incremental repl
is one of those rituals old Lispers acquired and never questioned
... but it isn't fundamental and critical to anything. (Note
there is no qualifying clauses, no when no if no but. I really mean
this last sentence the way I spelled it.)&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-8595329905636585805?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/8595329905636585805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=8595329905636585805' title='29 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8595329905636585805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/8595329905636585805'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/03/drscheme-repl-isnt-lisp.html' title='the DrScheme repl isn&apos;t the one in Emacs'/><author><name>matthias</name><uri>http://www.blogger.com/profile/00000181081270224360</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09599810714735144723'/></author><thr:total>29</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-109123988427683012</id><published>2009-03-22T01:29:00.001-04:00</published><updated>2009-03-22T01:39:19.878-04:00</updated><title type='text'>PLT Scheme v4.1.5</title><content type='html'>PLT Scheme version 4.1.5 is now available from
&lt;pre&gt;  &lt;a href="http://plt-scheme.org/"&gt;http://plt-scheme.org/&lt;/a&gt;&lt;/pre&gt;
&lt;ul&gt;&lt;li&gt;Web Server:&lt;ul&gt;&lt;li&gt;new URL-based dispatching library &lt;tt&gt;web-server/dispatch&lt;/tt&gt;,&lt;/li&gt;&lt;li&gt;customizable continuation serialization policies for the stateless web language &lt;tt&gt;web-server/stuffers&lt;/tt&gt;,&lt;/li&gt;&lt;li&gt;abstraction of serve/servlet to build simpler dispatchers &lt;tt&gt;web-server/servlet-env&lt;/tt&gt;,&lt;/li&gt;&lt;li&gt;HTTP Digest authentication support &lt;tt&gt;web-server/http/digest-auth&lt;/tt&gt;,&lt;/li&gt;&lt;li&gt;built-in cookie support in &lt;tt&gt;web-server/http/cookie&lt;/tt&gt; and &lt;tt&gt;web-server/http/cookie-parse&lt;/tt&gt;,&lt;/li&gt;&lt;li&gt;highlighting and pretty-printing of errors in Xexpr constructions,&lt;/li&gt;&lt;li&gt;load control dispatcher for limit concurrent sessions &lt;tt&gt;web-server/dispatchers/limit&lt;/tt&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Scribble:&lt;ul&gt;&lt;li&gt;Literate programming is now available using the new &lt;tt&gt;scribble/lp&lt;/tt&gt; language.&lt;/li&gt;&lt;li&gt;A new &lt;tt&gt;at-exp&lt;/tt&gt; language makes it convenient to use the scribble reader's @-expressions for general code.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scribble/text&lt;/tt&gt; preprocessor language has been extended to deal with indentation and other formatting issues.&lt;/li&gt;&lt;li&gt;The "scribble" command-line tool accepts a &lt;tt&gt;--pdf&lt;/tt&gt; flag to render PDFs (via pdflatex).&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;DrScheme now provides feedback when PLaneT downloads and installs new packages.&lt;/li&gt;
&lt;li&gt;Units &amp; Contracts:&lt;ul&gt;&lt;li&gt;Elements of unit signatures can now be associated with contracts via the &lt;tt&gt;contracted&lt;/tt&gt; signature form.&lt;/li&gt;&lt;li&gt;A contract combinator for units, &lt;tt&gt;unit/c&lt;/tt&gt;, has been added.&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;with-contract&lt;/tt&gt; form provides a nestable submodule contract boundary, protecting a group of definitions from the surrounding code with contracts.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;define/contract&lt;/tt&gt; form has been reworked and new define forms have been added: &lt;tt&gt;define-struct/contract&lt;/tt&gt; and &lt;tt&gt;define-unit/contract&lt;/tt&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Language levels and teachpacks from the DeinProgramm project for the German textbook "Die Macht der Abstraktion" by Herbert Klaeren and Michael Sperber have been added.&lt;/li&gt;
&lt;li&gt;Misc:&lt;ul&gt;&lt;li&gt;Typed Scheme now comes with several more pre-wrapped libraries, found in the &lt;tt&gt;typed&lt;/tt&gt; collection.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;xml&lt;/tt&gt; and &lt;tt&gt;html&lt;/tt&gt; collections are now contracted.&lt;/li&gt;&lt;li&gt;Binding parsing in net/cgi now interacts with &lt;tt&gt;net/uri-codec&lt;/tt&gt;'s configuration parameters.&lt;/li&gt;&lt;li&gt;DrScheme captures logging output.&lt;/li&gt;&lt;li&gt;Check syntax: it is now possible to tack arrows crossing the currently selected text.&lt;/li&gt;&lt;li&gt;New &lt;tt&gt;bitwise-bit-field&lt;/tt&gt; function.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;The usual pile of bugfixes.  (Notable: &lt;tt&gt;scheme/package&lt;/tt&gt; works, &lt;tt&gt;deflate&lt;/tt&gt; compression fixed, DrScheme language dialog issue resolved, &lt;tt&gt;match&lt;/tt&gt; fixes, Windows networking, and much more.)&lt;/li&gt;
&lt;/ul&gt;

[Note that mirror sites can take a while to catch up with the new downloads.]

Feedback Welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-109123988427683012?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://plt-scheme.org/' title='PLT Scheme v4.1.5'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/109123988427683012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=109123988427683012' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/109123988427683012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/109123988427683012'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/03/plt-scheme-v415.html' title='PLT Scheme v4.1.5'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='16595198595879573886'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-7043792165582137178</id><published>2009-03-12T16:35:00.030-04:00</published><updated>2009-03-13T17:22:06.108-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='planet'/><category scheme='http://www.blogger.com/atom/ns#' term='scribble'/><category scheme='http://www.blogger.com/atom/ns#' term='self-reference'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><title type='text'>Maintaining self-references in Planet packages</title><content type='html'>&lt;p&gt;
&lt;a href="http://docs.plt-scheme.org/planet/index.html"&gt;PLaneT packages&lt;/a&gt; may refer to themselves (i.e. include &lt;a href="http://docs.plt-scheme.org/guide/module-paths.html"&gt;module paths&lt;/a&gt; referring to some part of the same package) for a number of reasons. One module may &lt;a href="http://docs.plt-scheme.org/reference/require.html#%28form._%28%28lib._scheme/base..ss%29._require%29%29"&gt;&lt;span style="font-family:courier new;"&gt;require&lt;/span&gt;&lt;/a&gt; another. &lt;a href="http://docs.plt-scheme.org/scribble/index.html"&gt;Scribble&lt;/a&gt; documentation traces &lt;a href="http://docs.plt-scheme.org/reference/require.html#%28form._%28%28lib._scheme/base..ss%29._for-label%29%29"&gt;&lt;span style="font-family:courier new;"&gt;for-label&lt;/span&gt;&lt;/a&gt; imports to construct hypertext links. DrScheme &lt;a href="http://docs.plt-scheme.org/tools/adding-languages.html"&gt;language levels&lt;/a&gt; may &lt;a href="http://docs.plt-scheme.org/tools/drscheme_language.html#%28meth._%28%28%28lib._drscheme/tool-lib..ss%29._drscheme%7E3alanguage%7E3asimple-module-based-language%7E3c%7E25%7E3e%29._get-module%29%29"&gt;provide a module path&lt;/a&gt; for an initial &lt;a href="http://docs.plt-scheme.org/guide/eval.html#%28part._namespaces%29"&gt;namespace&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
In each of these cases, we want the module path to refer to the &lt;a href="http://docs.plt-scheme.org/planet/Using_PLaneT.html#%28part._.Fine-.Grained_.Control_.Over_.Package_.Imports%29"&gt;same version&lt;/a&gt; of the same package that it occurs in. On the other hand, we do not want to have to manually search and replace the version number every time we update. Before I solved this problem I would often release some new version x.0 of a package, only to find some lingering dependency on y.0 that my search/replace had not caught. Of course, then I had to go back and replace all occurrences of both x.0 &lt;i&gt;and&lt;/i&gt; y.0 with x.1 and release again. To avoid this headache, we need a way to express self-referential module paths with precise, implicit version numbers.
&lt;/p&gt;&lt;p&gt;
The built-in module paths don't quite support this. The relevant forms are PLaneT paths with version numbers, PLaneT paths without version numbers, and relative paths:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(planet my/package:1:0/dir/file)
(planet my/package/dir/file)
"../dir/file.ss"
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
PLaneT paths with version numbers suffer from the search and replace problem: they become obsolete, and must be changed with every new release.
&lt;/p&gt;&lt;p&gt;
PLaneT paths &lt;i&gt;without&lt;/i&gt; version numbers "upgrade" with a new release: they automatically refer to the latest version of a package.  Unfortunately, this means they aren't really "self"-references.  As soon as version 2.0 is released, every version-free reference to the package refers to 2.0.  Even the references in version 1.0 get implicitly updated, and become forward references rather than self-references.
&lt;/p&gt;&lt;p&gt;
Relative paths are precise, in that they always refer to the same version of the same package. However, because they implicitly refer to the directory containing the source code, they are only valid within a single file.  They cannot be reliably passed to DrScheme for a language level namespace, traced for documentation links by Scribble, or used by other such external tools.
&lt;/p&gt;&lt;p&gt;
None of these options provides precise, stable, externally comprehensible, self-referential module paths.
&lt;/p&gt;&lt;p&gt;
To fill this need, I have released &lt;span style="font-family:courier new;"&gt;(planet &lt;a href="http://planet.plt-scheme.org/package-source/cce/scheme.plt/4/1/planet-docs/main/planet.html"&gt;cce/scheme:4:1/planet&lt;/a&gt;)&lt;/span&gt;. This module provides PLaneT package authors with several macros that construct references to the current package in require imports, Scribble documentation, and dynamic values.  The self-referential modules paths are constructed automatically at compile time based on the &lt;a href="http://docs.plt-scheme.org/reference/stxops.html"&gt;source location&lt;/a&gt; of the macro use and the &lt;a href="http://docs.plt-scheme.org/planet/search-order.html#%28part._.Acceptable_.Local_.Package%29"&gt;local PLaneT package database&lt;/a&gt;.  Their expanded form always includes an explicit package name and version number (both major and minor).  Here I will summarize their use, with &lt;span style="font-family:courier new;"&gt;(planet my/package:1:0/dir/file)&lt;/span&gt; as a running example.  For full details, see the &lt;a href="http://planet.plt-scheme.org/package-source/cce/scheme.plt/4/1/planet-docs/main/index.html"&gt;online documentation&lt;/a&gt; or install the &lt;a href="http://planet.plt-scheme.org/display.ss?package=scheme.plt&amp;amp;owner=cce"&gt;package&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt;
To import a module from within a PLaneT package, use the &lt;span style="font-family:courier new;"&gt;this-package-in&lt;/span&gt; require transformer.  To re-export bindings from a module imported this way, use the &lt;span style="font-family:courier new;"&gt;this-package-out&lt;/span&gt; provide transformer, or use &lt;span style="font-family:courier new;"&gt;require/provide/this-package&lt;/span&gt; in place of both.
&lt;/p&gt;&lt;p&gt;
For example, you might want to import and re-export bindings from &lt;span style="font-family:courier new;"&gt;dir/file&lt;/span&gt;:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(require (planet my/package:1:0/dir/file))
(provide (all-from-out (planet my/package:1:0/dir/file)))
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
You can leave out the package name and version number, thus making the code invariant across upgrades, by writing:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(require (this-package-in dir/file))
(provide (this-package-out dir/file))
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
Or, you can further simplify it:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(require/provide/this-package dir/file)
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
All three of the above are equivalent (in version 1.0).
&lt;/p&gt;&lt;p&gt;
In Scribble documentation, a module often refers to itself via &lt;a href="http://docs.plt-scheme.org/scribble/doc-modules.html#%28form._%28%28lib._scribble/manual..ss%29._defmodule%29%29"&gt;&lt;span style="font-family:courier new;"&gt;defmodule&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://docs.plt-scheme.org/scribble/doc-modules.html#%28form._%28%28lib._scribble/manual..ss%29._declare-exporting%29%29"&gt;&lt;span style="font-family:courier new;"&gt;declare-exporting&lt;/span&gt;&lt;/a&gt;, or &lt;a href="http://docs.plt-scheme.org/scribble/scribble_manual_code.html#%28form._%28%28lib._scribble/manual..ss%29._schememodname%29%29"&gt;&lt;span style="font-family:courier new;"&gt;schememodname&lt;/span&gt;&lt;/a&gt;. I provide the extensions &lt;span style="font-family:courier new;"&gt;defmodule/this-package&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;declare-exporting/this-package&lt;/span&gt;, and &lt;span style="font-family:courier new;"&gt;schememodname/this-package&lt;/span&gt;, respectively. These macros allow the user to supply a path such as &lt;span style="font-family:courier new;"&gt;dir/file&lt;/span&gt;, or to omit one to refer to the package as a whole (or its main module). In positions where the original macros allow a sequence of module paths, these forms allow two sequences, one for self-referential module paths and one for other paths.
&lt;/p&gt;&lt;p&gt;
To document an entire module, one might first write:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(defmodule (planet my/package:1:0))
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
The automatic self-reference version is simply:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(defmodule/this-package)
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
In more complicated cases, one might document a sub-part of a package or present bindings from multiple sources:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(defmodule (planet my/package:1:0/dir/file)
  #:use-sources
  [(planet my/package:1:0/private/impl) somewhere/else])
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
These self-references can still be automated:
&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;
(defmodule/this-package dir/file
  #:use-sources
  [private/impl]
  [somewhere/else])
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;
Finally, I provide &lt;span style="font-family:courier new;"&gt;this-package-version-symbol&lt;/span&gt; for constructing PLaneT package symbols as runtime values. This macro is analogous to &lt;a href="http://docs.plt-scheme.org/planet/Utility_Libraries.html#%28form._%28%28lib._planet/util..ss%29._this-package-version%29%29"&gt;&lt;span style="font-family:courier new;"&gt;this-package-version&lt;/span&gt;&lt;/a&gt; from the &lt;a href="http://docs.plt-scheme.org/planet/Utility_Libraries.html#%28mod-path._planet/util%29"&gt;&lt;span style="font-family:courier new;"&gt;planet/util&lt;/span&gt;&lt;/a&gt; collection, but it constructs a symbol rather than an s-expression. You can use this symbol to construct a module path for a DrScheme language level, or escape it with &lt;span style="font-family:courier new;"&gt;unsyntax&lt;/span&gt; in Scribble's &lt;a href="http://docs.plt-scheme.org/scribble/scribble_manual_code.html#%28form._%28%28lib._scribble/manual..ss%29._schemeblock%29%29"&gt;&lt;span style="font-family:courier new;"&gt;schemeblock&lt;/span&gt;&lt;/a&gt; typesetting to create self-referential example code.
&lt;/p&gt;&lt;p&gt;
This list of utilities may not be complete. Users may need to write new macros for self-referential PLaneT packages. To that end, &lt;span style="font-family:courier new;"&gt;(planet &lt;a href="http://planet.plt-scheme.org/package-source/cce/scheme.plt/4/1/planet-docs/main/syntax.html"&gt;cce/scheme:4:1/syntax&lt;/a&gt;)&lt;/span&gt; provides &lt;span style="font-family:courier new;"&gt;syntax-source-planet-package&lt;/span&gt;. This function is analogous to &lt;a href="http://docs.plt-scheme.org/planet/Utility_Libraries.html#%28form._%28%28lib._planet/util..ss%29._this-package-version%29%29"&gt;&lt;span style="font-family:courier new;"&gt;this-package-version&lt;/span&gt;&lt;/a&gt;, but operates on &lt;a href="http://docs.plt-scheme.org/guide/stx-obj.html"&gt;syntax objects&lt;/a&gt; and is designed to be used in &lt;a href="http://docs.plt-scheme.org/guide/proc-macros.html"&gt;macro transformers&lt;/a&gt;. There are also &lt;span style="font-family:courier new;"&gt;-owner&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;-name&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;-major&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;-minor&lt;/span&gt;, and &lt;span style="font-family:courier new;"&gt;-symbol&lt;/span&gt; versions following the same analogy.
&lt;/p&gt;&lt;p&gt;
I find these tools useful for maintaining my PLaneT packages, and I hope other authors will too.  If you do give them a try, please send &lt;a href="http://planet.plt-scheme.org/trac/newticket"&gt;feedback&lt;/a&gt; on what does or doesn't work, or what might be improved.  I would eventually like to add a refined version to the PLT Scheme collections once we get enough experience to know that these tools are fairly complete and usable.
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-7043792165582137178?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://planet.plt-scheme.org/package-source/cce/scheme.plt/4/1/planet-docs/main/planet.html' title='Maintaining self-references in Planet packages'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/7043792165582137178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=7043792165582137178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7043792165582137178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7043792165582137178'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2009/03/maintaining-self-references-in-planet.html' title='Maintaining self-references in Planet packages'/><author><name>Carl Eastlund</name><uri>http://www.blogger.com/profile/00965085482378134816</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01027078363251861309'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2747116959164987330</id><published>2008-10-06T15:33:00.006-04:00</published><updated>2009-03-12T11:54:55.912-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tutorials'/><category scheme='http://www.blogger.com/atom/ns#' term='drscheme'/><category scheme='http://www.blogger.com/atom/ns#' term='documentation'/><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><category scheme='http://www.blogger.com/atom/ns#' term='continuations'/><title type='text'>Web Application Development in PLT Scheme</title><content type='html'>&lt;p&gt;Many users often post to the &lt;code&gt;plt-scheme&lt;/code&gt; mailing list asking for introductions to Web application development in PLT Scheme. They've heard of the continuation-based PLT Web Server and want a gentle introduction. Unfortunately, there has been a distinct lack of good documentation and tutorials for the server. Taking the cue from two users: &lt;a href="http://www.scheme.dk/blog/2007/01/introduction-to-web-development-with.html"&gt;Jens Axel Soegaard&lt;/a&gt; and &lt;a href="http://alwaysmovefast.com/category/plt-scheme/"&gt;David Reynolds&lt;/a&gt;, we've written a tutorial with Danny Yoo.&lt;/p&gt;

&lt;p&gt;The tutorial is available at &lt;a href="http://docs.plt-scheme.org/continue/index.html"&gt;http://docs.plt-scheme.org/continue/index.html&lt;/a&gt;. It walks through the creation of a blog application, introducing features slowly and culminates in an SQL-backed database for the posts. Of particular interest, is the &lt;a href="http://docs.plt-scheme.org/web-server/insta.html"&gt;fast start servlet setup&lt;/a&gt; based on the Instaservlet package from &lt;a href="http://www.untyped.com/"&gt;Untyped&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Please take a look and pass along this as a pointer to those who may be interested in PLT Scheme.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2747116959164987330?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://docs.plt-scheme.org/continue/index.html' title='Web Application Development in PLT Scheme'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/2747116959164987330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2747116959164987330' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2747116959164987330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2747116959164987330'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2008/10/web-application-development-in-plt.html' title='Web Application Development in PLT Scheme'/><author><name>Jay McCarthy</name><uri>http://www.blogger.com/profile/07912023932333508057</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='01254935550651991393'/></author><thr:total>2</thr:total></entry></feed>