<?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:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2080885971644496896</id><updated>2012-05-21T02:05:38.249-04:00</updated><category term='units'/><category term='xml'/><category term='structure properties'/><category term='futures'/><category term='web-server'/><category term='threads'/><category term='racketcon'/><category term='planet'/><category term='documentation'/><category term='contracts'/><category term='matthew'/><category term='keybindings'/><category term='macros'/><category term='continuations'/><category term='serialization'/><category term='drscheme'/><category term='typed-scheme'/><category term='scribble'/><category term='channels'/><category term='delimited continuations'/><category term='check syntax'/><category term='set'/><category term='interview'/><category term='tutorials'/><category term='self-reference'/><category term='script'/><category term='parallelism'/><category term='experience-reports'/><category term='scheme video'/><category term='oopsla'/><category term='release'/><category term='academic'/><category term='papers'/><category term='soft state'/><category term='industrial'/><title type='text'>The Racket Blog</title><subtitle type='html'>News, insights, tutorials, and more from the PLT team behind the Racket language.</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'/><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'/><author><name>Jens Axel Søgaard</name><uri>http://www.blogger.com/profile/15211030864341077735</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>87</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6027746791514492154</id><published>2012-04-02T18:46:00.000-04:00</published><updated>2012-04-02T18:46:58.578-04:00</updated><title type='text'>Scribble Your Blogs</title><content type='html'>&lt;p&gt;&lt;a href="http://doc.racket-lang.org/scribble/index.html" pltdoc="x"&gt;Scribble&lt;/a&gt; is a great language for writing documentation. Now it&amp;rsquo;s a great language for writing blog posts, too. I&amp;rsquo;ve just released a tool called Scriblogify that compiles Scribble documents and posts them as blog entries. Scriblogify is a more polished and automated version of the scripts I&amp;rsquo;ve been using for several months to prepare posts for &lt;a href="http://macrologist.blogspot.com"&gt;my own blog&lt;/a&gt;.&lt;/p&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;p&gt;To get Scriblogify, just download it from &lt;a href="http://planet.racket-lang.org/"&gt;PLaneT&lt;/a&gt;:&lt;/p&gt;&lt;p&gt;&lt;div class="SIntrapara"&gt;&lt;blockquote class="SCodeFlow"&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/require.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._require))" class="RktStxLink" pltdoc="x"&gt;require&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/require.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._planet))" class="RktStxLink" pltdoc="x"&gt;planet&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;ryanc/scriblogify:1&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="SIntrapara"&gt;or &lt;/div&gt;&lt;div class="SIntrapara"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="stt"&gt;raco planet install ryanc scriblogify.plt 1 0&lt;/span&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;The package automatically installs a &lt;span class="stt"&gt;raco&lt;/span&gt; subcommand (&lt;span class="stt"&gt;raco scriblogify&lt;/span&gt;) that can be used to configure Scriblogify and process and upload blog posts.&lt;/p&gt;&lt;p&gt;Configure Scriblogify by running&lt;/p&gt;&lt;p&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="stt"&gt;raco scriblogify --setup&lt;/span&gt;&lt;/p&gt;&lt;p&gt;That will open a browser window with the Scriblogify configuration servlet. The servlet will prompt you to authorize Scriblogify to access your Blogger and Picasa Web Albums accounts (only the Blogger/Picasa combination is currently supported) and then create one or more &lt;span style="font-style: italic"&gt;profiles&lt;/span&gt;&amp;#8212;&lt;wbr /&gt;named combinations of blogs and web albums to upload to.&lt;/p&gt;&lt;p&gt;Scriblogify automatically handles images computed in your Scribble documents by uploading them to a web album. For example, here are some images computed with the &lt;a href="http://doc.racket-lang.org/slideshow/Making_Pictures.html" class="RktModLink" pltdoc="x"&gt;&lt;span class="RktSym"&gt;slideshow/pict&lt;/span&gt;&lt;/a&gt; library:&lt;/p&gt;&lt;blockquote class="SCodeFlow"&gt;&lt;table cellspacing="0" class="RktBlk"&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="stt"&gt;&amp;gt; &lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/require.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._require))" class="RktStxLink" pltdoc="x"&gt;require&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;slideshow/pict&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0" class="RktBlk"&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="stt"&gt;&amp;gt; &lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/define.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._define))" class="RktStxLink" pltdoc="x"&gt;define&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;rainbow-colors&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;'&lt;/span&gt;&lt;span class="RktVal"&gt;(&lt;/span&gt;&lt;span class="RktVal"&gt;"red"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"orange"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"yellow"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"green"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"blue"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"purple"&lt;/span&gt;&lt;span class="RktVal"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0" class="RktBlk"&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="stt"&gt;&amp;gt; &lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/for.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._for%2Flist))" class="RktStxLink" pltdoc="x"&gt;for/list&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktPn"&gt;[&lt;/span&gt;&lt;span class="RktSym"&gt;c&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;rainbow-colors&lt;/span&gt;&lt;span class="RktPn"&gt;]&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/Pict_Drawing_Adjusters.html#(def._((lib._slideshow%2Fpict..rkt)._colorize))" class="RktValLink" pltdoc="x"&gt;colorize&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/Basic_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._filled-rounded-rectangle))" class="RktValLink" pltdoc="x"&gt;filled-rounded-rectangle&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;20&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;20&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;c&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;span class="RktRes"&gt;'(&lt;/span&gt;&lt;img src="http://lh3.googleusercontent.com/-Nw2qGT_Gqf0/T3ooFbzLYfI/AAAAAAAAAM0/RH0sF_LIFv4/6224749dcbedde288fbe.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh3.googleusercontent.com/-8-7SmENh9k0/T3ooFdQbY3I/AAAAAAAAAM8/ZICyhocb6Rc/c4913728963093e38751.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh4.googleusercontent.com/-PSOcb7stZr8/T3ooFt_7-rI/AAAAAAAAANE/mWLrEDwXZds/444bca14470831e7d6ff.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh5.googleusercontent.com/-TsD6Vcl-sxg/T3ooF6QHwSI/AAAAAAAAANM/z62Ez6h6LHc/89476984cb9eb9240fc3.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh4.googleusercontent.com/-89QNBJBWeGM/T3ooGLS9rmI/AAAAAAAAANU/sppnlqzKAvo/28cec16b31d4c76075b9.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh4.googleusercontent.com/-onBFW733Vbk/T3ooGMaJQtI/AAAAAAAAANc/iDWI9-vDc0c/c5b6cc6caacf7236552c.png" alt="image" width="20" height="20" /&gt;&lt;span class="RktRes"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0" class="RktBlk"&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="stt"&gt;&amp;gt; &lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/for.html#(form._((lib._racket%2Fprivate%2Fbase..rkt)._for%2Flist))" class="RktStxLink" pltdoc="x"&gt;for/list&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktPn"&gt;[&lt;/span&gt;&lt;span class="RktSym"&gt;c&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;rainbow-colors&lt;/span&gt;&lt;span class="RktPn"&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;[&lt;/span&gt;&lt;span class="RktSym"&gt;dir&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/reference/sequences.html#(def._((lib._racket%2Fprivate%2Fbase..rkt)._in-cycle))" class="RktValLink" pltdoc="x"&gt;in-cycle&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;'&lt;/span&gt;&lt;span class="RktVal"&gt;(&lt;/span&gt;&lt;span class="RktVal"&gt;right&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;left&lt;/span&gt;&lt;span class="RktVal"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;]&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/More_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._standard-fish))" class="RktValLink" pltdoc="x"&gt;standard-fish&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;25&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;25&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:color&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;c&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:direction&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktSym"&gt;dir&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;span class="RktRes"&gt;'(&lt;/span&gt;&lt;img src="http://lh5.googleusercontent.com/-4Q5VuSIxAqM/T3ooGc4R_cI/AAAAAAAAANk/uCrs5__CBcw/3d1b37788f87402ac5b4.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh3.googleusercontent.com/-nvrVBDBOJKM/T3ooGkB6yxI/AAAAAAAAANs/wiXUMZ1TqhU/c76c2fd9ee8dd17478a9.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh4.googleusercontent.com/-gJNYPaUVH6M/T3ooGqonXgI/AAAAAAAAAN0/MZZFHgrh4Bw/26ad2820ad55cd949830.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh4.googleusercontent.com/-8twqYanpVm8/T3ooG8BmwhI/AAAAAAAAAN8/Nh8nO9f2IzU/29f3c6b6309db3f073fe.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh3.googleusercontent.com/-I_IExb2OzW4/T3ooHMMUlLI/AAAAAAAAAOE/cV_laHY790o/2d20a4ca5d5ba1526683.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktRes"&gt;&lt;/span&gt;&lt;img src="http://lh5.googleusercontent.com/-cu-91yF88j8/T3ooHHJGP2I/AAAAAAAAAOM/jdsgqusxKJQ/d9054d26c7c079238f6d.png" alt="image" width="25" height="25" /&gt;&lt;span class="RktRes"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;table cellspacing="0" class="RktBlk"&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="stt"&gt;&amp;gt; &lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/Pict_Combiners.html#(def._((lib._slideshow%2Fpict..rkt)._cc-superimpose))" class="RktValLink" pltdoc="x"&gt;cc-superimpose&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/Pict_Combiners.html#(def._((lib._slideshow%2Fpict..rkt)._cc-superimpose))" class="RktValLink" pltdoc="x"&gt;cc-superimpose&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/More_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._cloud))" class="RktValLink" pltdoc="x"&gt;cloud&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;100&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;80&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"lightblue"&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/More_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._cloud))" class="RktValLink" pltdoc="x"&gt;cloud&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;90&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;70&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"white"&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/Pict_Combiners.html#(def._((lib._slideshow%2Fpict..rkt)._hc-append))" class="RktValLink" pltdoc="x"&gt;hc-append&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;10&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/More_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._standard-fish))" class="RktValLink" pltdoc="x"&gt;standard-fish&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;30&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;30&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:color&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"red"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:direction&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;'&lt;/span&gt;&lt;span class="RktVal"&gt;right&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;span class="RktPlain"&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;(&lt;/span&gt;&lt;span class="RktSym"&gt;&lt;a href="http://doc.racket-lang.org/slideshow/More_Pict_Constructors.html#(def._((lib._slideshow%2Fpict..rkt)._standard-fish))" class="RktValLink" pltdoc="x"&gt;standard-fish&lt;/a&gt;&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;25&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;20&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:color&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;"blue"&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktPn"&gt;#:direction&lt;/span&gt;&lt;span class="hspace"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="RktVal"&gt;'&lt;/span&gt;&lt;span class="RktVal"&gt;left&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;span class="RktPn"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;img src="http://lh5.googleusercontent.com/-9FYRayoPWv0/T3ooHWol4qI/AAAAAAAAAOU/CGsNLHmEVzw/eadf7a1de2b35289ef67.png" alt="image" width="100" height="80" /&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/blockquote&gt;&lt;p&gt;By Scribbling your blog entries, you get Scribble&amp;rsquo;s nice code formatting, colorizing, and documentation links for free&amp;#8212;&lt;wbr /&gt;well, once you&amp;rsquo;ve updated your blog&amp;rsquo;s CSS (see below). If you&amp;rsquo;re blogging about bleeding-edge work, there&amp;rsquo;s an option to make Scriblogify link to the &lt;a href="http://pre.racket-lang.org/docs/html/"&gt;nightly build docs&lt;/a&gt; (updated daily) instead of the &lt;a href="http://docs.racket-lang.org/"&gt;release docs&lt;/a&gt; (updated every 3 months).&lt;/p&gt;&lt;p&gt;&lt;a href="http://planet.racket-lang.org/package-source/ryanc/scriblogify.plt/1/0/planet-docs/scriblogify/index.html"&gt;Scriblogify&amp;rsquo;s documentation&lt;/a&gt; has more details, including how to update your blog&amp;rsquo;s CSS for Scribbled content and what bloggable Scribble documents look like.&lt;/p&gt;&lt;p&gt;You can see the source for this blog post &lt;a href="https://github.com/rmculpepper/scriblogify/blob/v1.0/samples/scribble-your-blogs.scrbl"&gt;here&lt;/a&gt;. This blog entry was created with the following command:&lt;/p&gt;&lt;p&gt;&lt;span class="hspace"&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class="stt"&gt;raco scriblogify -p the-racket-blog scribble-your-blogs.scrbl&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Now go forth and Scribble your blogs.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-6027746791514492154?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/6027746791514492154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6027746791514492154' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6027746791514492154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6027746791514492154'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2012/04/scribble-your-blogs.html' title='Scribble Your Blogs'/><author><name>Ryan Culpepper</name><uri>http://www.blogger.com/profile/04275692281825651783</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.googleusercontent.com/-Nw2qGT_Gqf0/T3ooFbzLYfI/AAAAAAAAAM0/RH0sF_LIFv4/s72-c/6224749dcbedde288fbe.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-7140437319852267080</id><published>2012-03-26T19:55:00.001-04:00</published><updated>2012-03-26T19:56:37.609-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Fixed Racket v5.2.1 Installers</title><content type='html'>&lt;br /&gt;
Dear Racketeers,&lt;br /&gt;
&lt;br /&gt;
We have just released a &lt;a href="http://racket-lang.org/download/"&gt;DrRacket version 5.2.1&lt;/a&gt; that starts fine today. &amp;nbsp;The fixed version has replaced the 5.2.1 installers. &amp;nbsp;This version and&amp;nbsp;the original 5.2.1 differ only in this one fix.&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-7140437319852267080?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/7140437319852267080/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=7140437319852267080' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7140437319852267080'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7140437319852267080'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2012/03/fixed-racket-v521-installers.html' title='Fixed Racket v5.2.1 Installers'/><author><name>Eli Barzilay</name><uri>https://profiles.google.com/115730576737402335315</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-eR9w2qhxsD0/AAAAAAAAAAI/AAAAAAAAAHk/-lcs3Nw2_es/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2390508687802287055</id><published>2012-02-02T15:30:00.001-05:00</published><updated>2012-03-26T19:53:54.869-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.2.1</title><content type='html'>Racket version 5.2.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;h2&gt;Release Highlights:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Performance improvements include the use of &lt;tt&gt;epoll()&lt;/tt&gt;/&lt;tt&gt;kqueue()&lt;/tt&gt; instead of &lt;tt&gt;select()&lt;/tt&gt; for the Racket thread scheduler, cross-module inlining of small functions, and the use of SSE instead of x87 for JIT-compiled floating-point operations on platforms where SSE is always available (including x86_64 platforms).  A related change is the interning of literal numbers, strings, byte strings, characters, and regexps that appear in code and syntax objects.&lt;/li&gt;
&lt;li&gt;DrRacket uses a set of composable ray-traced icons available from the new &lt;tt&gt;images&lt;/tt&gt; library collection.&lt;/li&gt;
&lt;li&gt;Typed Racket's &lt;tt&gt;typecheck-fail&lt;/tt&gt; form allows macro creators to customize the error messages that Typed Racket produces.  This is especially useful when creating pattern matching macros.&lt;/li&gt;
&lt;li&gt;The performance of Redex's matcher has been substantially improved; depending on the model you should see improvements between 2x and 50x in the time it takes to reduce terms.&lt;/li&gt;
&lt;li&gt;Plots look nicer and are more correct at very small and very large scales.  New features include customizable dual axis ticks and transforms (e.g., log axes, date and currency ticks, axis interval collapse and stretch), stacked histograms, and 3D vector fields.  The legacy &lt;tt&gt;fit&lt;/tt&gt; function and libfit have been removed.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;2htdp/universe&lt;/tt&gt; library's &lt;tt&gt;big-bang&lt;/tt&gt; form supports an experimental game pad key handler.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;db&lt;/tt&gt; library now supports nested transactions and PostgreSQL arrays.  Bugs involving MySQL authentication and memory corruption in the SQLite bindings have been fixed.&lt;/li&gt;
&lt;li&gt;The Macro Stepper tool in DrRacket no longer executes a program after expanding it.&lt;/li&gt;
&lt;li&gt;In the DMdA teaching languages, infinite recursive signatures ("streams", for example) with no intervening &lt;tt&gt;mixed&lt;/tt&gt; are now supported, and the signatures of record definitions without fields now have generators for use with &lt;tt&gt;property&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;MysterX's ActiveX support is deprecated and will be removed in the next release.  MysterX's core COM functionality will become deprecated in the next release, but COM functionality will be supported for the foreseeable future as a compatibility layer over a forthcoming &lt;tt&gt;ffi/com&lt;/tt&gt; library.&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-2390508687802287055?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/2390508687802287055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2390508687802287055' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2390508687802287055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2390508687802287055'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2012/02/racket-v521.html' title='&lt;a href=&quot;http://racket-lang.org&quot;&gt;Racket v5.2.1&lt;/a&gt;'/><author><name>Eli Barzilay</name><uri>https://profiles.google.com/115730576737402335315</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-eR9w2qhxsD0/AAAAAAAAAAI/AAAAAAAAAHk/-lcs3Nw2_es/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2611538924601880099</id><published>2012-02-01T19:25:00.000-05:00</published><updated>2012-02-01T21:46:59.560-05: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='continuations'/><category scheme='http://www.blogger.com/atom/ns#' term='experience-reports'/><title type='text'>Zack Galler's Experience with Stateful vs Stateless Web Apps</title><content type='html'>&lt;p&gt;Communication using HTTP between client and server is a simple problem of halted computation.&lt;/p&gt;
&lt;p&gt;A client computes a request, transmits and halts, waiting for a server response.  On receipt, the server computes a response, transmits and halts, waiting for the next client request.&lt;/p&gt;
&lt;p&gt;This much is well known.&lt;/p&gt;
&lt;p&gt;Racket's magnificent &lt;em&gt;stateful&lt;/em&gt; Web server does three things on the server side:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;it &lt;b&gt;reifies&lt;/b&gt; a Racket continuation, capturing where the server computation has halted.&lt;/li&gt;
&lt;li&gt;it &lt;b&gt;externalizes&lt;/b&gt; the continuation, creating  a URL-representation that uniquely maps to the Racket continuation&lt;/li&gt;
&lt;li&gt;it &lt;b&gt;disseminates&lt;/b&gt; the externalized continuation to interested clients, typically via HTTP response, but alternately via SMTP or any other protocol.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Then, it waits.&lt;/p&gt;
&lt;p&gt;Later, when &lt;b&gt;presented&lt;/b&gt; with an externalized continuation, a quick inverse mapping occurs, the underlying Racket continuation is &lt;b&gt;invoked,&lt;/b&gt; and the server processes the new client request.&lt;/p&gt;
&lt;p&gt;Rinse and repeat.&lt;/p&gt;
&lt;p&gt;The problem with this approach is twofold&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;the reified Racket continuations live in server memory.  And there's no safe way to garbage collect, as the continuations could be invoked at any time.  There are strategies to reclaim memory, but &lt;em&gt;some&lt;/em&gt; load level will noticeably decrease the performance of your application.  And its not possible to figure out what that load level is prior to finishing your application.  This is a problem.&lt;/li&gt;
&lt;li&gt;Again, the reified Racket continuations live in server memory and cannot be moved.  So there's no way to scale an application to more than one server.  It's a necessarily one machine system.  This makes problem #1 worse.&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Racket's yet more magnificent &lt;em&gt;stateless&lt;/em&gt; Web server does exactly the same three things:&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;to &lt;b&gt;reify&lt;/b&gt;, it rewrites the entire call stack into a format known as &lt;a href="https://en.wikipedia.org/wiki/Administrative_normal_form"&gt;A-Normal Form&lt;/a&gt; (ANF).&lt;/li&gt;
&lt;li&gt;to &lt;b&gt;externalize&lt;/b&gt;, the ANF'd stack is encoded for transmission over HTTP.&lt;/li&gt;
&lt;li&gt;and then it's sent over to the client (&lt;b&gt;dissemination&lt;/b&gt;).&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Later, when &lt;b&gt;presented&lt;/b&gt; with encoded stack, the stateless server performs an inverse transform to &lt;b&gt;reconstruct&lt;/b&gt; the call stack, at which point the server keeps going.&lt;/p&gt;
&lt;p&gt;So we've lost the &lt;b&gt;invocation&lt;/b&gt; step and substituted a &lt;b&gt;reconstruction&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;But in exchange, we've eliminated continuations from server memory, and solved both enumerated problems above.  Neat trick.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;I provide a few lessons learned for the archives for the next person to attempt porting &lt;tt&gt;#lang racket&lt;/tt&gt; to &lt;tt&gt;#lang web-server&lt;/tt&gt; code.&lt;/p&gt;
&lt;p&gt;First, the predicate &lt;tt&gt;serializable?&lt;/tt&gt; from &lt;tt&gt;racket/serialize&lt;/tt&gt; is invaluable.  The &lt;tt&gt;#lang web-server&lt;/tt&gt; code will not transform if there are non-serializable constructs in the dynamic extent of the invocation of &lt;tt&gt;send/suspend&lt;/tt&gt;, such as a local binding or argument.&lt;/p&gt;
&lt;p&gt;Second, invocations of native continuations reified with &lt;tt&gt;call/cc&lt;/tt&gt; frequently throw errors related to continuation prompts, such as “attempt to cross a continuation barrier” or “no corresponding prompt tag in continuation”.  In all cases, I was able to remedy the situation by enclosing the invocation in &lt;tt&gt;call-with-continuation-prompt&lt;/tt&gt;.  This may be an error in the system, but it is unclear at this time.&lt;/p&gt;
&lt;p&gt;Third, the transformation does not allow parameters or &lt;tt&gt;dynamic-wind&lt;/tt&gt;, because the internal data-structures representing them are not serializable, but continuation-marks can be used to reimplement the piece of the functionality you need.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;Finally, thank you to the Racket team.  I think the stateless Web language is important technology and must have required an enormous amount of work to implement.&lt;/p&gt;
&lt;p&gt;Anecdotally, application speed seems at or better than the stateful code.&lt;/p&gt;
&lt;p&gt;To learn more about the stateless Web application infrastructure, &lt;a href="http://docs.racket-lang.org/web-server/stateless.html"&gt;consult the manual&lt;/a&gt; or post to the &lt;a href="http://lists.racket-lang.org/"&gt;mailing list&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;i&gt;(This post was written by Zack Galler with minor edits before posting by Jay McCarthy.)&lt;/i&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2611538924601880099?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/2611538924601880099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2611538924601880099' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2611538924601880099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2611538924601880099'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2012/02/zack-gallers-experience-with-stateful.html' title='Zack Galler&apos;s Experience with Stateful vs Stateless Web Apps'/><author><name>Jay McCarthy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-13KUDv8LhZw/AAAAAAAAAAI/AAAAAAAAAAA/7MdiB5POU5k/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-453161652899215709</id><published>2011-11-09T22:49:00.000-05:00</published><updated>2011-11-09T22:49:08.917-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.2</title><content type='html'>Racket version 5.2 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;h2&gt;Release Highlights:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;DrRacket comes with an experimental, on-line check syntax tool, although this new tool is disabled default.  See below for more information.&lt;/li&gt;
&lt;li&gt;The new &lt;tt&gt;db&lt;/tt&gt; library offers a high-level, functional interface to popular relational database systems, including PostgreSQL, MySQL, and SQLite, as well as other systems via ODBC.&lt;/li&gt;
&lt;li&gt;A new XREPL collection provides convenient commands for a plain racket REPL.  It is particularly convenient for people who prefer console-based work and alternative editors.  See also the new chapter on command-line tools and other editors at the end of the Racket Guide.&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;plot&lt;/tt&gt; collection has been reimplemented in Racket.  It now offers PDF output, log axes, histograms, and more.  Some code that uses &lt;tt&gt;plot&lt;/tt&gt; will still work, and some will need light porting.  The &lt;tt&gt;plot/compat&lt;/tt&gt; module offers expedient backward compatibility.&lt;/li&gt;
&lt;li&gt;DrRacket uses more conventional key bindings: &lt;tt&gt;C-t&lt;/tt&gt; creates a new tab, &lt;tt&gt;C-w&lt;/tt&gt; closes the current one, and &lt;tt&gt;C-r&lt;/tt&gt; runs the definitions.  On Mac OS X, the Command key is used.  See “Defining Custom Shortcuts” in the DrRacket manual for an example that uses the old key bindings.&lt;/li&gt;
&lt;li&gt;The new &lt;tt&gt;raco link&lt;/tt&gt; command registers a directory as a collection, which allows the collection directory to reside outside the “&lt;tt&gt;collects&lt;/tt&gt;” tree and without changing the PLTCOLLECTS environment variable.&lt;/li&gt;
&lt;li&gt;Typed Racket:&lt;ul&gt;
&lt;li&gt;Typed Racket provides static performance debugging support to show which code gets optimized and point out code that does not.  Use the “Performance Report” button in DrRacket.&lt;/li&gt;
&lt;li&gt;More intuitive types in printouts in the REPL and in error messages.  Use &lt;tt&gt;:query-result-type&lt;/tt&gt; to explore types, or &lt;tt&gt;:print-type&lt;/tt&gt; for a full printout.&lt;/li&gt;
&lt;li&gt;Typed Racket now supports defining function with optional arguments using the same syntax as Racket.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Redex now supports specifying (and testing and automatically typesetting) judgment forms including type systems and SOS-style operational semantics.&lt;/li&gt;
&lt;li&gt;Fixed several GUI problems, including problems on Ubuntu 11.10 (GTK+ 3) and 64-bit Mac OS X.&lt;/li&gt;
&lt;li&gt;Internal-definition expansion has changed to use &lt;tt&gt;let*&lt;/tt&gt; semantics for sequences that contain no back references.  This change removes a performance penalty for using internal definitions instead of &lt;tt&gt;let&lt;/tt&gt; in common cases, and it only changes the meaning of programs that capture continuations in internal definitions. Internal definitions are now considered preferable in style to &lt;tt&gt;let&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Support for &lt;tt&gt;begin-for-syntax&lt;/tt&gt; has been generalized; modules may now define and export both value bindings and syntax bindings (macros) at phase 1 and higher.
&lt;p&gt;&lt;small&gt;Due to a bug, phase 1 syntax (or higher) is not available in DrRacket's &lt;tt&gt;#lang&lt;/tt&gt;-based REPL.  A simple workaround is to disable debugging in DrRacket (see “no debugging” radio button in detailed language dialog).&lt;/small&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Additional Items:&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;tt&gt;racket/gui&lt;/tt&gt; library (and Slideshow) provides more support for multiple-screen displays.&lt;/li&gt;
&lt;li&gt;DrRacket remembers whether an opened file used LF or CRLF line endings, and will continue using the same.  When creating a new file, a preference determines how it is saved.&lt;/li&gt;
&lt;li&gt;&lt;tt&gt;net/url&lt;/tt&gt; can now follow HTTP redirections.&lt;/li&gt;
&lt;li&gt;The LNCS and JFP class files are no longer distributed with Racket.  Instead, they are downloaded on demand.&lt;/li&gt;
&lt;li&gt;The Algol language implementation is now available as a plain language using &lt;tt&gt;#lang algol60&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;The Racket-to-C compiler (as accessed via &lt;tt&gt;raco ctool&lt;/tt&gt; or &lt;tt&gt;mzc&lt;/tt&gt;) has been removed; Racket's JIT has long provided better performance, and the FFI provides better access to C libraries.&lt;/li&gt;
&lt;li&gt;Contracts can be applied to exports with the new &lt;tt&gt;contract-out&lt;/tt&gt; form within &lt;tt&gt;provide&lt;/tt&gt;, instead of a separate &lt;tt&gt;provide/contract&lt;/tt&gt; form.  (The new &lt;tt&gt;contract-out&lt;/tt&gt; form is implemented as a new kind of “provide pre-transformer”.)&lt;/li&gt;
&lt;li&gt;The &lt;tt&gt;date*&lt;/tt&gt; structure type is an extension of &lt;tt&gt;date&lt;/tt&gt; with &lt;tt&gt;nanosecond&lt;/tt&gt; and &lt;tt&gt;time-zone-name&lt;/tt&gt; fields.&lt;/li&gt;
&lt;li&gt;New looping constructs: &lt;tt&gt;for/sum&lt;/tt&gt; and &lt;tt&gt;for/product&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Direct calls to keyword-accepting functions are now optimized to eliminate the overhead of keywords.  In addition, the compiler detects and logs warnings for keyword-argument mismatches.&lt;/li&gt;
&lt;li&gt;The libfit interface is available from &lt;tt&gt;plot/deprecated/fit&lt;/tt&gt;, and will be removed in the near future.&lt;/li&gt;
&lt;li&gt;The Unix installer has been re-done, and it is now more robust.&lt;/li&gt;
&lt;li&gt;The built-in reader and printer support for Honu is removed.  (This functionality is re-implemented in Racket.)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;On-line Check Syntax:&lt;/h3&gt;
&lt;p&gt;DrRacket now provides an on-line version of the syntax check tool, which means that syntax checking runs automatically while you continue to edit a program.  With this tool enabled, its annotations (e.g., binding arrows) and actions (e.g., the renaming refactoring and direct documentation links) are almost always available.&lt;/p&gt;
&lt;p&gt;We have noticed that on-line syntax checking renders DrRacket unstable on occasion, perhaps because it relies on relatively new support for parallelism.  Occurrences of the problem are rare, but they are not rare enough, which is why we have disabled the tool by default.  At the same time, current users of the tool find it so valuable that we felt it should be included in the release.  We expect to track down the remaining problems and enable the tool by default in near-future release.&lt;/p&gt;
&lt;p&gt;To enable on-line syntax checking (for &lt;tt&gt;#lang&lt;/tt&gt;-based programs only), click on the red dot in the bottom right of DrRacket's window.  To turn it off, click there again.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-453161652899215709?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/453161652899215709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=453161652899215709' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/453161652899215709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/453161652899215709'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/11/racket-v52.html' title='&lt;a href=&quot;http://racket-lang.org/&quot;&gt;Racket v5.2&lt;/a&gt;'/><author><name>Eli Barzilay</name><uri>https://profiles.google.com/115730576737402335315</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-eR9w2qhxsD0/AAAAAAAAAAI/AAAAAAAAAHk/-lcs3Nw2_es/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-176509377051155662</id><published>2011-10-18T14:28:00.004-04:00</published><updated>2011-10-18T15:07:12.023-04:00</updated><title type='text'>On eval in dynamic languages generally and in Racket specifically</title><content type='html'>&lt;p&gt;The &lt;tt&gt;eval&lt;/tt&gt; function is at the heart of a dynamic language,
and it strikes many newcomers as an amazingly powerful tool. At the
same time, experienced programmers avoid &lt;tt&gt;eval&lt;/tt&gt;, because
unnecessary use creates trouble. It&amp;rsquo;s not easy to explain
why &lt;tt&gt;eval&lt;/tt&gt; should be avoided or when it&amp;rdquo;s appropriate to
use &lt;tt&gt;eval&lt;/tt&gt;, but I&amp;rsquo;ll take another stab at it here.


&lt;h3&gt;What is &lt;tt&gt;eval&lt;/tt&gt;?&lt;/h3&gt;

&lt;p&gt;Consider the following &amp;ldquo;program&amp;rdquo; in English prose:&lt;/p&gt;

&lt;blockquote&gt;
 Assume that your favorite color is red. Now imagine a balloon that is
 your favorite color. Paint a canvas the same color as the balloon.
&lt;/blockquote&gt;

&lt;p&gt;As English goes, that&amp;rsquo;s a fairly clear program with a fairly
well-defined result. When I follow those instructions, at least, I
will always produce a red canvas (assuming that I have a canvas and
some red paint, but a potential lack of art supplies is not the point
here).&lt;/p&gt;

&lt;p&gt;I would come up with a red canvas even if I read the instructions when
surrounded by people who speak only Chinese, obviously, since I&amp;rsquo;m the
one reading the instructions. Furthermore, it would be straightforward
to translate the program to Chinese, and then a person who reads
Chinese would produce a red canvas.&lt;/p&gt;

&lt;p&gt;A translator might even take the liberty of simplifying the program to
just&lt;/p&gt;

&lt;blockquote&gt;
  Paint a canvas red.
&lt;/blockquote&gt;

&lt;p&gt;The translation loses some of the poetry of the original, but the
result is the same.&lt;/p&gt;

&lt;p&gt;In Racket terms, the paragraph corresponds to a module. It can be
compiled (i.e., translated) and optimized (i.e., simplified). A
program can be made up of multiple modules that are written in
different languages, but since each module can be reliably translated,
they can all be compiled into some common language to run the
program.&lt;/p&gt;


&lt;p&gt;Here&amp;rsquo;s a different program:&lt;/p&gt;

&lt;blockquote&gt;
 Tell the person next to you &amp;ldquo;Assume that your favorite color is red.&amp;rdquo;
 Tell the person &amp;ldquo;Now, imagine a balloon that is your favorite color.&amp;rdquo;
 Tell the person &amp;ldquo;Paint canvas the same color as the balloon.&amp;rdquo;
&lt;/blockquote&gt;

&lt;p&gt;Getting a red canvas back may be a little trickier in this case. If the
person next to me speaks only Chinese, then my program may fail with a
message-not-understood error.&lt;/p&gt;

&lt;p&gt;If I want to translate the program to Chinese, then it&amp;rsquo;s not clear
whether the parts in quotes should be translated. Maybe I mean for a
person who can read Chinese but only sound out English to run the
program when surrounded by English speakers, or maybe I mean for a
Chinese person to run the program when surrounded by Chinese people.
Either way, I have to be a lot more specific to a translator. For more
complex programs, the instructions to the translator can become
complex and fragile.&lt;/p&gt;

&lt;p&gt;Finally, a translator probably won&amp;rsquo;t feel comfortable simplifying the
program to&lt;/p&gt;

&lt;blockquote&gt;
 Tell the person next to you &amp;ldquo;Paint a canvas red.&amp;rdquo;
&lt;/blockquote&gt;

&lt;p&gt;
because there could be all sorts of environmental conditions that make
the result different&amp;mdash;such as people who are willing to paint
but unwilling to accept assumptions about their favorite colors.&lt;/p&gt;

&lt;p&gt;The paragraph with &amp;ldquo;tell the person...&amp;rdquo; is a program that uses &lt;tt&gt;eval&lt;/tt&gt;.
It can&amp;rsquo;t be compiled and optimized as well as the earlier paragraph, and the language context
in which it is run may change the result. The quotes around sentences
correspond to the quote in front of an expression passed to &lt;tt&gt;eval&lt;/tt&gt; in
Racket; there&amp;rsquo;s no particular reason that the language for &lt;tt&gt;eval&lt;/tt&gt; will
match the language of the program that has the quoted text. The
issues become even more complex if you try to implement different
parts of the program in different languages.&lt;/p&gt;

&lt;p&gt;If the analogy to multiple spoken languages seems strange&amp;mdash;maybe
your language is Javascript, period&amp;mdash;the problem of translation to
another language is really a proxy for program understanding. There&amp;rsquo;s
a direct connection to performance and optimization (i.e., translation
to efficient machine code), but using &lt;tt&gt;eval&lt;/tt&gt; also makes a program more
difficult to understand for the same reasons that it makes the program
more difficult to translate. For example, a reader of your program may
not be able to tell whether &amp;ldquo;assume your favorite color is red&amp;rdquo; is
just a rhetorical device to get to a red canvas or whether some new
instructions will arrive that will ask for your favorite color.&lt;/p&gt;


&lt;h3&gt;When is &lt;tt&gt;eval&lt;/tt&gt; Good?&lt;/h3&gt;

&lt;p&gt;The program with &amp;ldquo;tell the person next to you&amp;rdquo; above uses &lt;tt&gt;eval&lt;/tt&gt; in a
bad way. The task could just as well be performed by the person reading
the instructions, instead of getting another nearby person involved.&lt;/p&gt;

&lt;p&gt;Some other uses &lt;tt&gt;eval&lt;/tt&gt; are both good and necessary. For example,
consider the following program:&lt;/p&gt;

&lt;blockquote&gt;
 Ask the construction manager for instructions. Walk to the building
 site and convey those instructions to the construction crew.
&lt;/blockquote&gt;

&lt;p&gt;This program uses &lt;tt&gt;eval&lt;/tt&gt; when it conveys instructions to the
construction crew, but no quoted forms appear in the program. The
absence of quoted code is one sign that &lt;tt&gt;eval&lt;/tt&gt; may be
appropriate. Note that the program could work no matter what language
the manager and crew speak, although there is an implicit (and
sometimes non-trivial) assumption that the manager and crew speak the
same language.&lt;p&gt;

&lt;p&gt;Here&amp;rsquo;s another example:&lt;/p&gt;

&lt;blockquote&gt;
 Go outside, and tell each member of the construction crew &amp;ldquo;take a
 lunch break, now.&amp;rdquo;
&lt;/blockquote&gt;

&lt;p&gt;There&amp;rsquo;s a quoted program in this case, but it&amp;rsquo;s crucial to ask other
people to run the quoted program, instead of just taking the lunch
break yourself. That is, &lt;tt&gt;eval&lt;/tt&gt; is really necessary. The implementor
of this program takes on the burden of making sure that the
instructions are in a suitable language, however, and may need to
parameterize the quoted program by an explicit action to translate it
to a language understood by the construction crew.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s one more reasonable example:&lt;/p&gt;

&lt;blockquote&gt;
 Ask the construction manager for instructions. Follow them.
&lt;/blockquote&gt;

&lt;p&gt;In this case, it&amp;rsquo;s the construction manager&amp;rsquo;s problem to give you
instructions in a language that you understand.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s a questionable example:&lt;/p&gt;

&lt;blockquote&gt;
 Decide how long to work before lunch, say N hours, and write a note
 to yourself to work N hours. Add to the note by telling yourself to
 take a lunch break afterward.
&lt;/blockquote&gt;

&lt;p&gt;If you could really write that program without quotes, then it&amp;rsquo;s
probably ok. The example is misleading, though, because languages
don&amp;rsquo;t usually support&lt;/p&gt;

&lt;blockquote&gt;
 write a note to yourself to work N hours
&lt;/blockquote&gt;

&lt;p&gt;You&amp;rsquo;d have to write instead&lt;/p&gt;

&lt;blockquote&gt;
 write a note to yourself that says &amp;ldquo;work&amp;rdquo; followed by the number N
 and then &amp;ldquo;hours&amp;rdquo;
&lt;/blockquote&gt;

&lt;p&gt;and the quote marks are where the problem comes in. If you translate
the program to Chinese, then you have to be careful to somehow
translate &amp;ldquo;work&amp;rdquo; and &amp;ldquo;hours&amp;rdquo; to Chinese, too.&lt;/p&gt;

&lt;p&gt;The point here is not that programs without quoted text are clearly
good or that programs with quoted text are clearly bad. The real point
is that a programmer has to be especially careful about passing around
instructions and using quoted instructions. Using &lt;tt&gt;eval&lt;/tt&gt; means
accepting the burden of using instructions will make sense by the time
they are delivered. That burdened is best avoided, which is why
experienced programmers avoid &lt;tt&gt;eval&lt;/tt&gt;, but some of the examples
illustrate cases where the burden is not avoidable or where the
actions enabled by &lt;tt&gt;eval&lt;/tt&gt; make the burden worthwhile.&lt;/p&gt;


&lt;h3&gt;Using &lt;tt&gt;eval&lt;/tt&gt; in Racket&lt;/h3&gt;

&lt;p&gt;In the context of Racket, the multiple-language analogy is relatively
accurate, because Racket is about having many programming languages
work together and allowing programmers to define ever better languages
and language constructs. In Racket, it&amp;rsquo;s especially likely that a
library written in one language is used in a context where another
language is the default.&lt;/p&gt;

&lt;p&gt;Newcomers to Racket sometimes stumble over the fact that&lt;/p&gt;

&lt;pre&gt;
 #lang racket
 (define my-x 1)
 (eval '(+ my-x 2))
&lt;/pre&gt;

&lt;p&gt;or even&lt;/p&gt;

&lt;pre&gt;
 #lang racket
 (eval '(+ 1 2))
&lt;/pre&gt;

&lt;p&gt;does not work at all, and yet if the program&lt;/p&gt;

&lt;pre&gt;
 #lang racket
 (define my-x 1)
&lt;/pre&gt;

&lt;/p&gt;is loaded into a read-eval-print loop&amp;mdash;for example, by clicking the
&amp;ldquo;Run&amp;rdquo; button in DrRacket and then typing into the lower interactions
panel&amp;mdash;then&lt;/p&gt;

&lt;pre&gt;
 (eval '(+ my-x 2))
&lt;/pre&gt;

&lt;p&gt;works as expected.&lt;/p&gt;

&lt;p&gt;DrRacket&amp;rsquo;s interactions window has to use &lt;tt&gt;eval&lt;/tt&gt; in the sense that it
reads an expression to evaluate and then passes it on to the
interpreter for an answer. More generally, to make various pieces of
the environment fit together, DrRacket sets &lt;tt&gt;eval&lt;/tt&gt; globally to use the
module&amp;rsquo;s language while evaluating expressions in the interactions
window. In Racket terminology, DrRacket sets the &lt;tt&gt;current-namespace&lt;/tt&gt;
parameter to the module&amp;rsquo;s namespace when it initializes the
interactions window. In contrast, while the module body is being
evaluated, &lt;tt&gt;eval&lt;/tt&gt; treats expressions as being in the language that is
empty by default, which is why &lt;tt&gt;eval&lt;/tt&gt; during the module evaluation
produces a different result from &lt;tt&gt;eval&lt;/tt&gt; during the interactions
windows.&lt;/p&gt;

&lt;p&gt;You may wonder why DrRacket doesn&amp;rsquo;t initialize the namespace of &lt;tt&gt;eval&lt;/tt&gt;
to be the module&amp;rsquo;s namespace from the start, so that in-module uses of
&lt;tt&gt;eval&lt;/tt&gt; and the interactions window behave the same. In a program that
is implemented by multiple modules, which module&amp;rsquo;s language should be
used? In particular, if the language it&amp;rsquo;s always the main module&amp;rsquo;s
language, then a module may behave differently on its own than as part
of a larger program. In the process of developing Racket and DrRacket,
we&amp;rsquo;ve seen many such problems, and so Racket now arranges for the
default language to be empty (which is different from any useful
language) to help programmers remember that there&amp;rsquo;s a language issue
to consider whenever &lt;tt&gt;eval&lt;/tt&gt; is used.&lt;/p&gt;

&lt;p&gt;The Racket Guide&amp;rsquo;s chapter 15 covers in more depth the issues and
namespace tools of Racket for harnessing the power of &lt;tt&gt;eval&lt;/tt&gt;:&lt;/p&gt;

&lt;blockquote&gt;
 &lt;a href="http://docs.racket-lang.org/guide/reflection.html"&gt;http://docs.racket-lang.org/guide/reflection.html&lt;/a&gt;
&lt;/blockquote&gt;

&lt;p&gt;Think of &lt;tt&gt;eval&lt;/tt&gt; as a power tool. For some tasks,
there&amp;rsquo;s no real substitute, and so we want &lt;tt&gt;eval&lt;/tt&gt;
around. At the same time, &lt;tt&gt;eval&lt;/tt&gt; should be used with care. In
dynamic languages generally, that means a reluctant and targeted use
&lt;tt&gt;eval&lt;/tt&gt;. In Racket specifically, it means knowing the namespace toolbox
and being as explicit as possible about the intended context for
dynamic evaluation.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-176509377051155662?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/176509377051155662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=176509377051155662' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/176509377051155662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/176509377051155662'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html' title='On eval in dynamic languages generally and in Racket specifically'/><author><name>Matthew Flatt</name><uri>http://www.blogger.com/profile/03369511886823036667</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-5257012253577974725</id><published>2011-08-16T04:15:00.000-04:00</published><updated>2011-11-09T22:50:37.950-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.1.3</title><content type='html'>Racket version 5.1.3 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;p&gt;This is a bugfix release, resolving the DrRacket issue with the contour view.  In addition, two tex files with problematic licensing were removed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-5257012253577974725?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.1.3'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/5257012253577974725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=5257012253577974725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5257012253577974725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5257012253577974725'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/08/racket-v513.html' title='Racket v5.1.3'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-7519203787706361878</id><published>2011-08-03T15:47:00.004-04:00</published><updated>2011-11-09T22:50:37.967-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.1.2</title><content type='html'>Racket version 5.1.2 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;The download page includes 64-bit installers for Mac OS X, Windows, and two Debian flavors.  Racket now supports OS X Lion.&lt;/li&gt;&lt;li&gt;Racket now includes a new &lt;tt&gt;racket/place&lt;/tt&gt; library to support parallelism, complementing &lt;tt&gt;racket/future&lt;/tt&gt;.  Racket's parallel build process is now based on places instead of multiple OS processes.&lt;br&gt;Places support share-nothing parallelism and message-passing communication.  Compared to futures, places are heavyweight, but they have a simpler performance model.&lt;/li&gt;&lt;li&gt;The syntax-certificate system has been replaced by a syntax-taint system.  Both certificates and taints were designed to protect otherwise inaccessible bindings from abuse when they appear in macro expansions.  Taints are simpler and lighter, and the switch closes known holes in the certificate system.  Macros that are not implemented with &lt;tt&gt;syntax-rules&lt;/tt&gt; or &lt;tt&gt;define-syntax-rule&lt;/tt&gt;, however, must explicitly use &lt;tt&gt;syntax-protect&lt;/tt&gt; to protect their expansions from abuse.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;net/url&lt;/tt&gt; library supports HTTPS connections, but beware that by default all sites are accepted (equivalent to ignoring a browser's warnings about untrusted certificates).&lt;/li&gt;&lt;li&gt;Error messages in the student languages use a simplified vocabulary and consistent phrasings.  If you maintain curriculum material or teachpacks then please consider updating.  See the “Error Message Composition Guidelines” section in the documentation for details.&lt;/li&gt;&lt;li&gt;Typed Racket: almost all core Racket data structures and operations are now accessible in Typed Racket (most of this work is due to prolific contributor Eric Dobson).  The performance of the typechecker has been significantly improved.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;scriblib/bibtex&lt;/tt&gt; library supports BibTeX-formatted citation databases in Scribble documents.  BibTeX can be tricky to parse, so please report failed entries as bug reports.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;for&lt;/tt&gt; forms now support an &lt;tt&gt;#:unless&lt;/tt&gt; clause, and a nonnegative integer can be used as a sequence.  The new &lt;tt&gt;compose1&lt;/tt&gt; function creates single-valued composition functions.  The &lt;tt&gt;racket/function&lt;/tt&gt; library now provides &lt;tt&gt;identity&lt;/tt&gt;, &lt;tt&gt;thunk&lt;/tt&gt;, and &lt;tt&gt;thunk*&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The license has been clarified: we now use LGPLv2.1 uniformly.  (The license file used to specify LGPLv2, contrary to the download pages.)&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-7519203787706361878?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.1.2'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/7519203787706361878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=7519203787706361878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7519203787706361878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7519203787706361878'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/08/racket-v512.html' title='Racket v5.1.2'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-4765317171885687427</id><published>2011-07-29T02:36:00.002-04:00</published><updated>2011-08-03T19:25:14.556-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='racketcon'/><title type='text'>RacketCon Recap</title><content type='html'>We held &lt;a href="http://con.racket-lang.org/"&gt;RacketCon&lt;/a&gt; here at &lt;a href="http://www.ccis.neu.edu/2011/"&gt;Northeastern&lt;/a&gt; over the past weekend, and it was a great time!&amp;nbsp; Matthew Flatt consulted his magic 8-ball about the future of Racket (it involves Hawaiian shirts); Matthias Felleisen announced the upcoming Realm of Racket book; Robby Findler demoed DrRacket with online syntax checking; Ryan Culpepper taught us how to make Rackety libraries; Prabhakar Ragde explained how the University of Waterloo teaches Racket and Program by Design to 1500 students a year (and how to embed math into Scribble documents).&lt;br /&gt;
&lt;br /&gt;
Danny Yoo has already &lt;a href="http://blog.hashcollision.org/?p=162"&gt;blogged&lt;/a&gt; about his talk about his &lt;a href="http://hashcollision.org/whalesong/"&gt;Whalesong&lt;/a&gt; Racket-&amp;gt;JavaScript compiler. Hopefully other people will write more about some of the individual talks; I'll update this post to link to any that I see.&lt;br /&gt;
&lt;br /&gt;
As promised, the talks were videotaped by Jeff Dlouhy of the &lt;a href="http://acm.ccs.neu.edu/"&gt;NUACM&lt;/a&gt;; the videos are in post-production and should be up within a few weeks. We'll announce their availability on this blog.&amp;nbsp; Slides from the individual talks will be up on the &lt;a href="http://con.racket-lang.org/2011/"&gt;RacketCon webpage&lt;/a&gt; soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-4765317171885687427?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/4765317171885687427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=4765317171885687427' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4765317171885687427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/4765317171885687427'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/07/racketcon-recap.html' title='RacketCon Recap'/><author><name>Sam Tobin-Hochstadt</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-546301615685805019</id><published>2011-06-29T17:25:00.003-04:00</published><updated>2011-07-29T17:53:47.051-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='racketcon'/><title type='text'>Come to RacketCon!</title><content type='html'>&lt;center&gt;&lt;b&gt;Calling All Racketeers!&lt;/b&gt;&lt;/center&gt;

&lt;p&gt;Join us at RacketCon, 23 &amp;amp; 24 July 2011.&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;a href="http://con.racket-lang.org/"&gt;http://con.racket-lang.org/&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;

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

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

&lt;p&gt;We're excited about RacketCon, and hope you'll join us there. To
register for RacketCon, please send an email with your name and
affiliation to &lt;a href="mailto:racketcon@racket-lang.org"&gt;racketcon@racket-lang.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;
Additional information, including registration, transportation and
hotel information, can be found on the web page:
&lt;a href="http://con.racket-lang.org"&gt;http://con.racket-lang.org&lt;/a&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-546301615685805019?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://con.racket-lang.org/' title='Come to RacketCon!'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/546301615685805019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=546301615685805019' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/546301615685805019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/546301615685805019'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/06/come-to-racketcon.html' title='Come to RacketCon!'/><author><name>Sam Tobin-Hochstadt</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-5086396725121935681</id><published>2011-05-26T13:46:00.008-04:00</published><updated>2011-05-26T15:18:31.480-04:00</updated><title type='text'>Multi-file code coverage viewing tool</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-bqUHiG2gf6M/Td6l76u3kMI/AAAAAAAAAGE/HEpOctSVSIc/s1600/covered-files-dialog.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 131px;" src="http://3.bp.blogspot.com/-bqUHiG2gf6M/Td6l76u3kMI/AAAAAAAAAGE/HEpOctSVSIc/s320/covered-files-dialog.png" alt="" id="BLOGGER_PHOTO_ID_5611104634546917570" border="0" /&gt;&lt;/a&gt;
&lt;p&gt;I'm very pleased to announce the availability of a multi-file code coverage viewer, written by Jonathan Walsh.&lt;/p&gt;


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



&lt;a href="http://3.bp.blogspot.com/-d4j23yei4rc/Td6l0wv3UCI/AAAAAAAAAF8/ptD2u9KwevE/s1600/coverage-button.png"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 117px;" src="http://3.bp.blogspot.com/-d4j23yei4rc/Td6l0wv3UCI/AAAAAAAAAF8/ptD2u9KwevE/s320/coverage-button.png" alt="" id="BLOGGER_PHOTO_ID_5611104511607656482" border="0" /&gt;&lt;/a&gt;
&lt;span style="font-weight: bold;"&gt;Back End:&lt;/span&gt;


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


&lt;p&gt;URL for docs:&lt;/p&gt;


&lt;p&gt;&lt;a href="http://planet.racket-lang.org/package-source/jowalsh/code-coverage.plt/1/3/planet-docs/code-coverage/index.html"&gt;http://planet.racket-lang.org/package-source/jowalsh/code-coverage.plt/1/3/planet-docs/code-coverage/index.html&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;As you might expect, it's a one-line install:&lt;/p&gt;


&lt;blockquote style="font-family: courier new;"&gt;#lang racket&lt;br&gt;
(require (planet jowalsh/code-coverage))
&lt;/blockquote&gt;


&lt;p&gt;Please let us know about bugs you discover!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-5086396725121935681?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://planet.racket-lang.org/display.ss?package=code-coverage.plt&amp;owner=jowalsh' title='Multi-file code coverage viewing tool'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/5086396725121935681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=5086396725121935681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5086396725121935681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/5086396725121935681'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/05/multi-file-code-coverage-viewing-tool.html' title='Multi-file code coverage viewing tool'/><author><name>John Clements</name><uri>http://www.blogger.com/profile/15701081040575095781</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-bqUHiG2gf6M/Td6l76u3kMI/AAAAAAAAAGE/HEpOctSVSIc/s72-c/covered-files-dialog.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-7456665387737613746</id><published>2011-05-26T08:21:00.004-04:00</published><updated>2011-05-26T11:40:46.799-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='interview'/><category scheme='http://www.blogger.com/atom/ns#' term='matthew'/><title type='text'>Racket on FLOSS Weekly</title><content type='html'>&lt;p&gt;Our own &lt;a href="http://www.cs.utah.edu/~mflatt/"&gt;Matthew Flatt&lt;/a&gt; was interviewed about Racket &lt;a href="http://twit.tv/floss167"&gt;on FLOSS Weekly&lt;/a&gt;.  Also available on &lt;a href="http://www.youtube.com/watch?v=vJGV7HaTdbg"&gt;YouTube&lt;/a&gt;.&lt;/p&gt;

&lt;iframe width="425" height="349" src="http://www.youtube.com/embed/vJGV7HaTdbg" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-7456665387737613746?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/7456665387737613746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=7456665387737613746' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7456665387737613746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/7456665387737613746'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/05/racket-on-floss-weekly.html' title='Racket on FLOSS Weekly'/><author><name>Robby Findler</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/vJGV7HaTdbg/default.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6203425329791139673</id><published>2011-04-30T04:19:00.002-04:00</published><updated>2011-11-09T22:50:37.954-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.1.1</title><content type='html'>Racket version 5.1.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;The new &lt;tt&gt;racket/stream&lt;/tt&gt; library provides &lt;tt&gt;stream-first&lt;/tt&gt;, &lt;tt&gt;stream-rest&lt;/tt&gt;, a lazy &lt;tt&gt;stream-cons&lt;/tt&gt;, and so on.  Streams are a subtype of sequences, so they work in &lt;tt&gt;for&lt;/tt&gt; forms.  Some sequence generators, such as &lt;tt&gt;in-range&lt;/tt&gt;, now produce streams.  A &lt;tt&gt;racket/sequence&lt;/tt&gt; library replaces the old &lt;tt&gt;racket/stream&lt;/tt&gt; library.&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;racket/syntax&lt;/tt&gt; library contains facilities useful for writing macros.  The new &lt;tt&gt;syntax/srcloc&lt;/tt&gt; and &lt;tt&gt;syntax/location&lt;/tt&gt; libraries provide support for manipulating source locations.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;racket/gui&lt;/tt&gt; library now supports multi-column list boxes and scrolling panels.&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;ffi/file&lt;/tt&gt; library is useful for writing foreign library bindings that cooperate with Racket's security guard mechanism.&lt;/li&gt;&lt;li&gt;Generators from the &lt;tt&gt;racket/generator&lt;/tt&gt; library can now have formal arguments that are used when the generator is fired up.&lt;/li&gt;&lt;li&gt;Single-precision floating-point support is now enabled by default.  Single-precision floats print differently from their default double-precision counterparts, new primitives convert between the two precisions, and new reader syntax supports single-precision literals.&lt;/li&gt;&lt;li&gt;JIT improvements include a small change to aid x86 branch prediction on function-call returns, which can speed up some programs significantly.&lt;/li&gt;&lt;li&gt;Typed Racket:&lt;ul&gt;&lt;li&gt;The numeric tower has been entirely overhauled.  TR programs can now use more precise types than before, and check more numeric properties, such as sign or range properties.&lt;/li&gt;&lt;li&gt;Fixnum optimizations have been improved and should apply more broadly.&lt;/li&gt;&lt;li&gt;The performance of the typechecker has been improved.  In particular, dispatch on large union types should typecheck much faster than before.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;The Stepper can now step through Lazy Racket programs.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;racket/future&lt;/tt&gt; library includes &lt;tt&gt;fsemaphore&lt;/tt&gt; values, the &lt;tt&gt;future&lt;/tt&gt; primitive no longer freezes futures (so a future can spawn new futures), and &lt;tt&gt;future&lt;/tt&gt; log messages are more informative.&lt;/li&gt;&lt;li&gt;PLaneT development links are now version-specific.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;2htdp/image&lt;/tt&gt; library now includes &lt;tt&gt;overlay/align&lt;/tt&gt;, &lt;tt&gt;underlay/align&lt;/tt&gt;, &lt;tt&gt;overlay/align/offset&lt;/tt&gt; and &lt;tt&gt;underlay/align/offset&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The network protocol for universes in &lt;tt&gt;2htdp/universe&lt;/tt&gt; has changed, so that v5.1.1 is incompatible with earlier versions.&lt;/li&gt;&lt;li&gt;The "DrScheme" application (which simply ran DrRacket in the last few releases) has been removed.  The "MrEd" GUI executables for Windows and Mac OS X have also been removed, although the "mred" console executable remains for Unix and Mac OS X to support old scripts.&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-6203425329791139673?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.1.1'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6203425329791139673/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6203425329791139673' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6203425329791139673'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6203425329791139673'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/04/racket-v511.html' title='Racket v5.1.1'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-1248551246168499369</id><published>2011-04-04T14:00:00.001-04:00</published><updated>2011-04-08T22:20:30.687-04:00</updated><title type='text'>Writing ‘syntax-case’ Macros</title><content type='html'>&lt;p&gt;Disclaimer: This is not really a tutorial on macros, it's more of a quick introduction to using Racket's &lt;code&gt;syntax-case&lt;/code&gt;-based macros for people who are familiar with symbolic macros and miss their “simplicity”.  It's also not comprehensive or thorough or complete, it's just intended to provide a rough quick overview of how to write macros.  It was originally posted on comp.lang.scheme in a thread called “Idiot's guide to Scheme macros”, but I avoided that title here, since it's not a general purpose guide.  (Also, it's yet another attempt to dispel the irrational “macrophobia” some people have when it gets to hygienic macros, leading them back to using &lt;code&gt;defmacro&lt;/code&gt; with all its problems.)&lt;/p&gt;&lt;p&gt;The main idea with Racket's macro system (and with other &lt;code&gt;syntax-case&lt;/code&gt; systems) is that macros are syntax to syntax functions, just like the case of &lt;code&gt;defmacro&lt;/code&gt;, except that instead of raw s-expressions you're dealing with syntax objects.  This becomes very noticeable when identifiers are handled: instead of dealing with plain symbols, you're dealing with these syntax values (called “identifiers” in this case) that are essentially a symbol and &lt;em&gt;some opaque information&lt;/em&gt; that represents the lexical scope for its source.  In several &lt;code&gt;syntax-case&lt;/code&gt; systems this is the only difference from &lt;code&gt;defmacro&lt;/code&gt; macros, but in the Racket case this applies to everything — identifiers, numbers, other immediate constants, and even function applications, etc — they are all the same s-expression values that you're used to, except wrapped with additional information.  Another thing that is unique to Racket is the extra information: in addition to the opaque lexical context, there is also source information and arbitrary properties (there are also certificates, but that's ignorable for this text).&lt;/p&gt;&lt;p&gt;With this in mind, explaining the rest is not too difficult:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;(syntax-source stx)&lt;/code&gt;, &lt;code&gt;(syntax-position stx)&lt;/code&gt;, &lt;code&gt;(syntax-line stx)&lt;/code&gt;, &lt;code&gt;(syntax-column stx)&lt;/code&gt; — retrieve parts of the source location information.&lt;/li&gt;&lt;li&gt;&lt;code&gt;(syntax-e stx)&lt;/code&gt; — takes a syntax value and returns the value it “wraps”.  For example, if &lt;code&gt;stx&lt;/code&gt; is an identifier you'd get a symbol, and if it's a number you'd get the number.  If it's a simple parenthesized form, you'd get a list of syntax values for the subforms.  Note that the list can be improper, with the last element being a syntax object that contains a proper list.  (But the list will actually be improper if the original syntax was a dotted list.)&lt;/li&gt;&lt;li&gt;&lt;code&gt;(syntax-&amp;gt;datum stx)&lt;/code&gt; — takes a syntax value and returns the plain s-expression that it holds.  This is done by recursive uses of &lt;code&gt;syntax-e&lt;/code&gt;.  (It would be a simple definition that does what you'd think it should do.)&lt;/li&gt;&lt;li&gt;&lt;code&gt;(syntax-&amp;gt;list stx)&lt;/code&gt; — sometimes you want to pull out the list of syntax values from a given parenthesized syntax, but &lt;code&gt;syntax-e&lt;/code&gt; does too little (can still return an improper list) and &lt;code&gt;syntax-&amp;gt;datum&lt;/code&gt; does too much (gives you back raw s-expressions).  &lt;code&gt;syntax-&amp;gt;list&lt;/code&gt; is a utility function that uses &lt;code&gt;syntax-e&lt;/code&gt; as many times as needed to get back a proper list of syntax values.  If that's not possible (if the input syntax was not a proper list), it returns &lt;code&gt;#f&lt;/code&gt;, so it serves as a predicate too.&lt;/li&gt;&lt;li&gt;&lt;code&gt;(syntax-property stx prop)&lt;/code&gt; — returns the given property value from stx, if any, and &lt;code&gt;#f&lt;/code&gt; if none.  For example, try&lt;blockquote&gt;&lt;pre&gt;(syntax-property #'[foo] 'paren-shape)&lt;/pre&gt;&lt;/blockquote&gt;(The &lt;code&gt;#'&lt;/code&gt; is similar to a quote, but for syntax values — I'll get to that later on.)&lt;/li&gt;&lt;li&gt;Note that there is &lt;em&gt;no&lt;/em&gt; accessor for the opaque lexical scope, and as you'll see next, you don't need one.&lt;/li&gt;&lt;li&gt;To create a piece of syntax you use &lt;code&gt;datum-&amp;gt;syntax&lt;/code&gt;, and you give it an s-expression which will be the “contents” of the resulting syntax object.  (The input can contain syntax values, which are left as is.)  But when you do that you need to give it the other bits — including the lexical context thing, which you have no access to.  The way that's done is:&lt;blockquote&gt;&lt;pre&gt;(datum-&amp;gt;syntax context-stx input-sexpr)&lt;/pre&gt;&lt;/blockquote&gt; This returns a syntax value that wraps the &lt;code&gt;input-sexpr&lt;/code&gt; value, using the lexical scope from &lt;code&gt;context-stx&lt;/code&gt;.  A common way to “break hygiene” and create a binding that is visible to the macro user's code is:&lt;blockquote&gt;&lt;pre&gt;(datum-&amp;gt;syntax stx 'foo)&lt;/pre&gt;&lt;/blockquote&gt;where &lt;code&gt;stx&lt;/code&gt; is some syntax value that you get from the user input to the macro.  It returns a &lt;code&gt;foo&lt;/code&gt; identifier that has the same lexical context information as &lt;code&gt;stx&lt;/code&gt;, so it's as if it came from there.&lt;br /&gt;Note that there is actually another optional argument that specifies the source (either using another syntax object, or as an explicit list), and another for copying the properties from — so an alternative to the above would be:&lt;blockquote&gt;&lt;pre&gt;(datum-&amp;gt;syntax stx 'foo stx stx)&lt;/pre&gt;&lt;/blockquote&gt;which also makes the source information and the properties be the same as those of &lt;code&gt;stx&lt;/code&gt; (for example, this can matter in case of syntax errors ).&lt;/li&gt;&lt;li&gt;There is also &lt;code&gt;(quote-syntax blah)&lt;/code&gt; which creates a quoted syntax, with its lexical source from the place it appears.&lt;/li&gt;&lt;li&gt;Finally, &lt;code&gt;define-syntax&lt;/code&gt; does the magic of tying a name with a transformer function.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;And that's almost everything that you need in order to write hygienic (and non-hygienic) macros.  Very inconveniently.&lt;/p&gt;&lt;p&gt;For example, here's a simple &lt;code&gt;while&lt;/code&gt; macro (use this in a file that starts with “&lt;code&gt;#lang racket&lt;/code&gt;”):&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (define subs (syntax-&amp;gt;list stx))
  (datum-&amp;gt;syntax
   stx
   `(let loop ()
      (when ,(cadr subs)
        ,@(cddr subs)
        (loop)))
   stx))&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;which breaks like this:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;(define x 2)
(let ([let 5])
  (while (&amp;lt; x 10)
    (printf &amp;quot;x = ~s\n&amp;quot; x)
    (set! x (add1 x))))&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;The problem is that all of those quoted names are getting the context of the user input, which is not the right thing (it's close to a &lt;code&gt;defmacro&lt;/code&gt;).  To fix this, you need to &lt;code&gt;quote-syntax&lt;/code&gt; all of these identifiers, so they'll have the macro source instead of the input source:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (define subs (syntax-&amp;gt;list stx))
  (datum-&amp;gt;syntax
   stx
   `(,(quote-syntax let) ,(quote-syntax loop) ()
     (,(quote-syntax when) ,(cadr subs)
      ,@(cddr subs)
      (,(quote-syntax loop))))
   stx))&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;But that's clearly insane...  More than being tedious, it's still incorrect since all of those function application parens will have the user's lexical context (Racket has a special implicit &lt;code&gt;#%app&lt;/code&gt; macro that gets used in all function applications, and in this case the context of this application will make it unhygienic).  Instead of doing this, a better approach would be to create the resulting syntax with the lexical context of the macro source by changing just that argument:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (define subs (syntax-&amp;gt;list stx))
  (datum-&amp;gt;syntax
   (quote-syntax here)
   `(let loop ()
      (when ,(cadr subs)
        ,@(cddr subs)
        (loop)))
   stx))&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;And that's simple again, and works fine now.&lt;/p&gt;&lt;p&gt;The problem is that it's tedious wrt to deconstructing the input (which happens to be trivial in this case), and wrt slapping together an output value — and that's where &lt;code&gt;syntax-case&lt;/code&gt; comes in.  It addresses the both by using pattern matching, where identifiers in patterns are bound as “syntax patterns”.  A new form is added — &lt;code&gt;syntax&lt;/code&gt; — which is similar to a &lt;code&gt;quote&lt;/code&gt;, except that (a) it actually quotes things similarly to &lt;code&gt;quote-syntax&lt;/code&gt;, with the lexical context of the &lt;code&gt;syntax&lt;/code&gt; form; and (b) pattern variables are substituted with what they matched.  With this, the above macro becomes much easier:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax (let loop ()
               (when test
                 body ...
                 (loop))))]))&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;The first line specifies that you want to match the &lt;code&gt;stx&lt;/code&gt; input syntax, and that you have no “keywords” (in the same sense as in &lt;code&gt;syntax-rules&lt;/code&gt;).  The second line is the pattern that is matched against this input — with two pattern variables that match the second subexpression and the sequence of expressions from the third and on.  (The first subexpression is matched against &lt;code&gt;_&lt;/code&gt; which is a wild-card that matches anything without binding a pattern variable — the head part is often not needed, since it's just the macro name.)  The last line is the output, specified using &lt;code&gt;syntax&lt;/code&gt;, which means that it's very similar to the previous version where everything is given the lexical context of the macro and the two pattern variables are replaced with the two matches (so &lt;code&gt;body&lt;/code&gt; gets spliced into the resulting syntax).&lt;/p&gt;&lt;p&gt;Now, say that you want an unhygienic user-visible piece of syntax.  For example, bind the always entertaining &lt;code&gt;it&lt;/code&gt; thing to the test result.  This:&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax (let loop ()
               (let ([it test])
                 (when it
                   body ...
                   (loop)))))]))&lt;/pre&gt;&lt;/blockquote&gt;won't work because &lt;code&gt;it&lt;/code&gt; has the macro source — it's hygienic and therefore not visible.  Instead, you need to use &lt;code&gt;datum-&amp;gt;syntax&lt;/code&gt; with the user syntax:&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (let ([it (datum-&amp;gt;syntax stx 'it)])
       (syntax (let loop ()
                 (let ([it test])
                   (when it
                     body ...
                     (loop))))))]))&lt;/pre&gt;&lt;/blockquote&gt;But this doesn't really work since &lt;code&gt;it&lt;/code&gt; needs to be bound as a pattern variable rather than a plain binding.  &lt;code&gt;syntax-case&lt;/code&gt; can be used here again: &lt;code&gt;(syntax-case &amp;lt;name&amp;gt; () [foo &amp;lt;body&amp;gt;])&lt;/code&gt; will match &lt;code&gt;foo&lt;/code&gt; against the &lt;code&gt;&amp;lt;name&amp;gt;&lt;/code&gt; syntax, and if it's a name then it will be bound as a pattern variable in the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;.&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (syntax-case (datum-&amp;gt;syntax stx 'it) ()
       [it (syntax (let loop ()
                     (let ([it test])
                       (when it
                         body ...
                         (loop)))))])]))&lt;/pre&gt;&lt;/blockquote&gt;Note that since &lt;code&gt;it&lt;/code&gt; is a pattern variable, it doesn't need to be unquoted — &lt;code&gt;syntax&lt;/code&gt; will do that.&lt;/p&gt;&lt;p&gt;Finally, there are some more conveniences.  First, &lt;code&gt;with-syntax&lt;/code&gt; is a macro that binds pattern variables (by a similar translation to &lt;code&gt;syntax-case&lt;/code&gt;):&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (with-syntax ([it (datum-&amp;gt;syntax stx 'it)])
       (syntax (let loop ()
                 (let ([it test])
                   (when it
                     body ...
                     (loop))))))]))&lt;/pre&gt;&lt;/blockquote&gt;and there's the &lt;code&gt;#'&lt;/code&gt; reader macro for &lt;code&gt;syntax&lt;/code&gt;:&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(_ test body ...)
     (with-syntax ([it (datum-&amp;gt;syntax stx 'it)])
       #'(let loop ()
           (let ([it test])
             (when it
               body ...
               (loop)))))]))&lt;/pre&gt;&lt;/blockquote&gt;and there are also &lt;code&gt;#`&lt;/code&gt; and &lt;code&gt;#,&lt;/code&gt; and &lt;code&gt;#,@&lt;/code&gt; which are implemented by translating them to uses of &lt;code&gt;with-syntax&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Note that the last example uses the lexical context of the whole form for the new identifier, but that's not only the option.  You could use any other part of the macro input — for example, you could use the macro keyword:&lt;blockquote&gt;&lt;pre&gt;(define-syntax (while stx)
  (syntax-case stx ()
    [(hd test body ...) ; need the head now
     (with-syntax ([it (datum-&amp;gt;syntax #'hd 'it)])
       ... same ...)]))&lt;/pre&gt;&lt;/blockquote&gt;or the test expression (use &lt;code&gt;#'test&lt;/code&gt;).  Each of these choices has subtle differences that are especially important when you're composing macros (for example, using a second macro that &lt;em&gt;expands&lt;/em&gt; to a &lt;code&gt;while&lt;/code&gt;, where the test expression comes from that macro rather than the user code).  Demonstrating these things is a popular way to pass the time in some circles, but I'll avoid it here.  In fact, a great way to avoid this whole thing altogether is not create unhygienic bindings in the first place.  It sounds like doing so excludes cases where you &lt;em&gt;really&lt;/em&gt; want to have a new binding visible in user code, but racket provides “syntax parameters” that can be used more conveniently (and less confusingly) — see &lt;a href="http://blog.racket-lang.org/2008/02/dirty-looking-hygiene.html"&gt;an earlier post&lt;/a&gt; for a description of that.  As a side note, these options are a good hint that a hygienic macro system is more expressive than a symbolic &lt;code&gt;defmacro&lt;/code&gt; system, where no such choices exist.  Creating such macros using &lt;code&gt;defmacro&lt;/code&gt; can appear easier simply because of this lack of choice — in the same way that CPP-style string-based macros are “simpler” than &lt;code&gt;defmacro&lt;/code&gt; since they're less expressive (just appending lexical tokens, no structural information).&lt;/p&gt;&lt;p&gt;There are other important aspects of the Racket macro system that are not covered here.  The most obvious of them is worth mentioning here: Racket separates the “runtime phase” from the “syntax phase”.  For example, if you want to try these examples with “&lt;code&gt;#lang racket/base&lt;/code&gt;”, you'll need to add &lt;code&gt;(require (for-syntax racket/base))&lt;/code&gt; since the &lt;code&gt;racket/base&lt;/code&gt; language doesn't have a full language in its syntax phase.&lt;/p&gt;&lt;p&gt;Roughly speaking, this makes sure that source code is deterministically compilable by having each level live in its own world, limiting macros to deal only with the input syntax only and not runtime values.  (For example, a CLOS implementation in this system cannot check the value of an identifier bound to a class to determine how some macro should expand.)  This results in reliable compilations that do not depend on how things were loaded, or whatever happened on the REPL.&lt;/p&gt;&lt;p&gt;The important bottom line here is that you get to write macros with the full language available — and phase separation means that Racket is explicitly designed to make running code at the macro level and using it by the compiler as robust as possible, so you don't have to worry about using any complex system as part of your macro.  You just need to keep in mind that the macro world is completely separate from the runtime, and the direct benefit of not worrying about weird interactions with compilation and file loading orders.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-1248551246168499369?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/1248551246168499369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=1248551246168499369' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1248551246168499369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1248551246168499369'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html' title='Writing ‘syntax-case’ Macros'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2251597477702098360</id><published>2011-03-19T10:58:00.001-04:00</published><updated>2011-03-22T22:02:06.912-04:00</updated><title type='text'>Languages as Libraries, PLDI 2011</title><content type='html'>&lt;p&gt;We've just finished up the &lt;a href="http://bit.ly/langlib"&gt;final version&lt;/a&gt; of our &lt;a href="http://pldi11.cs.utah.edu/"&gt;PLDI 2011&lt;/a&gt; paper on language extension in Racket.  The paper describes how the module system and the syntax system work together to support new languages with new static semantics, such as Typed Racket.  Here's the abstract:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Programming language design benefits from constructs for extending the syntax and semantics of a host language.  While C's string-based macros empower programmers to introduce notational shorthands, the parser-level macros of Lisp encourage experimentation with domain-specific languages.  The Scheme programming language improves on Lisp with macros that respect lexical scope.&lt;/p&gt;&lt;p&gt;The design of Racket—a descendant of Scheme—goes even further with the introduction of a full-fledged interface to the static semantics of the language.  A Racket extension programmer can thus add constructs that are indistinguishable from “native” notation, large and complex embedded domain-specific languages, and even optimizing transformations for the compiler backend.  This power to experiment with language design has been used to create a series of sub-languages for programming with first-class classes and modules, numerous languages for implementing the Racket system, and the creation of a complete and fully integrated typed sister language to Racket's untyped base language.&lt;/p&gt;&lt;p&gt;This paper explains Racket's language extension API via an implementation of a small typed sister language.  The new language provides a rich type system that accommodates the idioms of untyped Racket. Furthermore, modules in this typed language can safely exchange values with untyped modules.  Last but not least, the implementation includes a type-based optimizer that achieves promising speedups.  Although these extensions are complex, their Racket implementation is just a library, like any other library, requiring no changes to the Racket implementation.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;To learn how to implement your own new language in Racket, start with &lt;a href="http://docs.racket-lang.org/guide/languages.html"&gt;this documentation&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-2251597477702098360?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/2251597477702098360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2251597477702098360' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2251597477702098360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2251597477702098360'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/03/languages-as-libraries-pldi-2011.html' title='Languages as Libraries, PLDI 2011'/><author><name>Sam Tobin-Hochstadt</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-2611063075276519104</id><published>2011-02-14T22:52:00.000-05:00</published><updated>2011-11-09T22:50:37.942-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.1</title><content type='html'>Racket version 5.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;p&gt;The most significant change in version 5.1 is a &lt;a href="http://blog.racket-lang.org/2010/12/racket-version-5.html"&gt;rewrite of the GUI library&lt;/a&gt;.  Unix/X users will see the biggest difference with this change, because DrRacket and all Racket GUI programs now take on the desktop theme for menus, buttons, and other GUI widgets.&lt;/p&gt;&lt;p&gt;In the long run, Racket GUI programs on all platforms will improve as a result of the library rewrite.  In the short run, beware that this first release of a new library will inevitably include a new set of bugs.&lt;/p&gt;&lt;p&gt;Version 5.1 changes in more detail:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The &lt;tt&gt;racket/draw&lt;/tt&gt; library&amp;mdash;which implements the drawing half the GUI toolkit&amp;mdash;can be used independent of the &lt;tt&gt;racket/gui/base&lt;/tt&gt; library and without a graphics display (e.g., without an X11 connection).&lt;br&gt;The new library has one small incompatibility with the old GUI toolbox: 'xor drawing is no longer supported.  The new library has many additional features: rotation and general affine transformations, PDF and SVG drawing contexts, gradients, and alpha-channel bitmaps.&lt;/li&gt;&lt;li&gt;The GRacket executable is no longer strictly necessary for running GUI programs, because the &lt;tt&gt;racket/gui/base&lt;/tt&gt; library can be used from Racket.  To the degree that a platform distinguishes GUI and console applications, however, the GRacket executable still offers some additional GUI-specific functionality (e.g., single-instance support).&lt;br&gt;The new &lt;tt&gt;racket/gui/base&lt;/tt&gt; library includes small incompatibilities with the old GUI toolbox: the &lt;tt&gt;send-event&lt;/tt&gt;, &lt;tt&gt;current-ps-afm-file-paths&lt;/tt&gt;, and &lt;tt&gt;current-ps-cmap-file-paths&lt;/tt&gt; functions have been removed.  The &lt;tt&gt;racket/gui/base&lt;/tt&gt; library re-exports &lt;tt&gt;racket/draw&lt;/tt&gt;, so it includes the same drawing functionality as before (except for 'xor drawing).&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;racket/snip&lt;/tt&gt; library can be used independently of &lt;tt&gt;racket/gui/base&lt;/tt&gt; to work with graphical editor content (e.g., images in student programs).  Like &lt;tt&gt;racket/draw&lt;/tt&gt;, the &lt;tt&gt;racket/snip&lt;/tt&gt; library is re-exported by &lt;tt&gt;racket/gui/base&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;The Web Server includes a backwards incompatible change that prevents X-expressions and lists of bytes from being directly returned from servlets.  This change will increase performance for those types of responses and allow easier experimentation with response types.  Please see "&lt;tt&gt;collects/web-server/compat/0/README&lt;/tt&gt;" in the installation to learn about porting your servlets forward. Don't worry.  It's easy.&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;raco demodularize&lt;/tt&gt; tool collapses a module's dependencies into a single module comprising the whole program.  This transformation currently provides no performance improvement, but is the basis for cross-module optimization and dead-code elimination tools to come.  The transformation is currently useful for static analysis of whole Racket programs.&lt;/li&gt;&lt;li&gt;The picturing-programs teachpack, formerly installed via PLaneT, is now bundled with the standard distribution.  Use the teachpack with &lt;tt&gt;(require picturing-programs)&lt;/tt&gt; instead of &lt;tt&gt;(require installed-teachpacks/picturing-programs)&lt;/tt&gt;.  The old PLaneT-based installation procedure still works, but it now merely installs a stub that invokes the bundled version.&lt;/li&gt;&lt;li&gt;Slideshow picts, &lt;tt&gt;racket/draw&lt;/tt&gt; bitmaps, and images created with &lt;tt&gt;2htdp/image&lt;/tt&gt; can now be used directly in Scribble documents.  More generally, the new &lt;tt&gt;file/convertible&lt;/tt&gt; protocol enables any value that is convertible to a PNG and/or PDF stream to be used as an image in a Scribble document.&lt;/li&gt;&lt;li&gt;The Same game sports a new look and an improved scoring system.  (The current known high score is 12,429; can you beat that?)&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-2611063075276519104?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.1'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/2611063075276519104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=2611063075276519104' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2611063075276519104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/2611063075276519104'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2011/02/racket-v51.html' title='Racket v5.1'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-149573500831144101</id><published>2010-12-08T10:59:00.005-05:00</published><updated>2010-12-08T11:15:38.590-05:00</updated><title type='text'>Rebuilding Racket’s Graphics Layer</title><content type='html'>&lt;p&gt;Racket version 5.1, which is scheduled for release in early February, will look a little different on the outside. Unix/X users will see the biggest difference: DrRacket and all Racket GUI programs will take on the desktop theme for menus, buttons, and other GUI widgets. Text handling is also better than before on Unix/X, especially when printing. Windows and Mac OS X users will see smaller changes, such as better printing, better handling of mouse-wheel events, and support for 64-bit Windows and Mac OS X.&lt;/p&gt;


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


&lt;p&gt;
In the space between the GUI implementation and the surface, there are many API improvements:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt; You can run GUI programs with just &lt;tt&gt;racket&lt;/tt&gt;, instead of having to use &lt;tt&gt;gracket&lt;/tt&gt;. Depending on how much your platform distinguishes between GUI and console applications, there may still be an advantage to using &lt;tt&gt;gracket&lt;/tt&gt; (i.e., to tell the OS that you mean to start a GUI application or that you want a single instance of the application), but the difference is minor.&lt;/li&gt;
&lt;li&gt;  Most of the drawing library has moved to &lt;tt&gt;racket/draw&lt;/tt&gt;, which you can use without the rest of the GUI library – and, in the case of Unix platforms, without an X-server connection. After detangling the graphics and GUIs libraries, the graphics library is now integrated in more places, such as adding pict support for Scribble documents. &lt;/li&gt;
&lt;li&gt; The drawing library includes some new capabilities, such as rotation, affine transformations, and bitmaps with alpha channels.&lt;/li&gt;&lt;/ul&gt;

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

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


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


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


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


&lt;p&gt;
To try out the current development version, visit&lt;/p&gt;

&lt;div style="text-align: center;"&gt;&lt;a href="http://pre.racket-lang.org/installers"&gt;http://pre.racket-lang.org/installers
&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-149573500831144101?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/149573500831144101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=149573500831144101' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/149573500831144101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/149573500831144101'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/12/racket-version-5.html' title='Rebuilding Racket’s Graphics Layer'/><author><name>Matthew Flatt</name><uri>http://www.blogger.com/profile/03369511886823036667</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6894296804689956913</id><published>2010-11-07T01:33:00.000-04:00</published><updated>2011-11-09T22:50:37.959-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><title type='text'>Racket v5.0.2</title><content type='html'>Racket version 5.0.2 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;Typed Racket's optimizer is now turned on by default; error messages have been simplified and clarified.&lt;/li&gt;&lt;li&gt;Contracts: contracts on mutable containers allow functions or other higher order values, and contracts are checked when updating or dereferencing the containers.  The new contracts are slower than the old ones, so the old check-once functionality is still available.&lt;br&gt;A new dependent function contract combinator, &lt;tt&gt;-&gt;i&lt;/tt&gt;, properly assigns blame for contracts that violate themselves and the generated wrappers are more efficient than &lt;tt&gt;-&gt;d&lt;/tt&gt;.  (Although it does more checking so your contracts may be faster or slower).&lt;br&gt;See the docs for &lt;tt&gt;box/c&lt;/tt&gt;, &lt;tt&gt;hash/c&lt;/tt&gt;, &lt;tt&gt;vector/c&lt;/tt&gt;, &lt;tt&gt;vectorof&lt;/tt&gt; and &lt;tt&gt;-&gt;i&lt;/tt&gt; for more details.&lt;/li&gt;&lt;li&gt;The &lt;tt&gt;when&lt;/tt&gt;, &lt;tt&gt;unless&lt;/tt&gt;, &lt;tt&gt;cond&lt;/tt&gt;, &lt;tt&gt;case&lt;/tt&gt;, and &lt;tt&gt;match&lt;/tt&gt; forms (in &lt;tt&gt;racket/base&lt;/tt&gt; and derived languages) now allow immediate internal definitions.&lt;/li&gt;&lt;li&gt;Web server: the formlets library provides more HTML form elements; &lt;tt&gt;make-xexpr-response&lt;/tt&gt; supports a preamble for DTD declarations; &lt;tt&gt;serve/servlet&lt;/tt&gt; supports stateless servlets.&lt;/li&gt;&lt;li&gt;New WebSocket implementation, see &lt;tt&gt;net/websocket&lt;/tt&gt; for details.&lt;/li&gt;&lt;li&gt;The new &lt;tt&gt;data&lt;/tt&gt; collection contains implementations of several data structures, including growable vectors and order-based dictionaries.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;racket/match&lt;/tt&gt; is now significantly faster.&lt;/li&gt;&lt;li&gt;The Racket documentations are built in parallel by default.&lt;/li&gt;&lt;li&gt;The stepper is now compatible with programs using the Universe teachpack.&lt;/li&gt;&lt;li&gt;&lt;tt&gt;2htdp/image&lt;/tt&gt;: pinholes are now supported in the library (if you don't use pinhole primitives you will not see them); a number of new triangle functions added; supports conversion of images to color lists and back.  Also, cropping has been improved for scenes; see the documentation section on the nitty-gritty of pixels for details.&lt;/li&gt;&lt;li&gt;Signatures have been moved to ASL, BSL, BSL+, ISL, and ISL+ (HtDP teaching languages) no longer support checked signatures.&lt;/li&gt;&lt;li&gt;Student languages: one-armed &lt;tt&gt;check-error&lt;/tt&gt; in all levels; ASL is extended with hash operations, and &lt;tt&gt;define-datatype&lt;/tt&gt;.&lt;/li&gt;&lt;li&gt;DMdA languages: Checking for parametric signatures is now eager.  This catches errors earlier, but retains the asymptotic complexity properties; signatures for record types now have generators; &lt;tt&gt;list-of&lt;/tt&gt; and &lt;tt&gt;any&lt;/tt&gt; signatures are now provided.&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-6894296804689956913?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://racket-lang.org/' title='Racket v5.0.2'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/6894296804689956913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=6894296804689956913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6894296804689956913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/6894296804689956913'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/11/racket-v502.html' title='Racket v5.0.2'/><author><name>Eli Barzilay</name><uri>http://www.blogger.com/profile/08165322672792335619</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-1382320702984482359</id><published>2010-10-03T00:57:00.000-04:00</published><updated>2010-10-03T00:57:36.308-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='oopsla'/><category scheme='http://www.blogger.com/atom/ns#' term='papers'/><category scheme='http://www.blogger.com/atom/ns#' term='web-server'/><title type='text'>The Two-State Solution: Native and Serializable Continuations Accord</title><content type='html'>&lt;p&gt;The Racket Web Server allows an expressive way of writing Web applications using first-class continuations to capture the control-flow of the server while it is waiting for the client to respond. For example:&lt;/p&gt;
&lt;pre&gt;
#lang web-server/insta
(define (get-number p)
  (string-&gt;number
   (extract-binding/single
    'num
    (request-bindings
     (send/suspend
      (λ (k-url)
        `(html 
          (body
           (form ([action ,k-url])
                 ,p nbsp (input ([name "num"]))
                 (input ([type "submit"])))))))))))
(define (start req)
  (define how-many
    (get-number "How many numbers to add?"))
  (number-&gt;string
   (foldr 
    + 0
    (build-list 
     how-many
     (λ (i)
       (get-number 
        (format "Provide number: ~a" 
                (add1 i))))))))
&lt;/pre&gt;

&lt;p&gt;This application creates a re-usable &lt;code&gt;get-number&lt;/code&gt; interaction abstraction and uses it in a number of different contexts. In particular, it uses it in the higher-order context of &lt;code&gt;build-list&lt;/code&gt;. This application also reuses useful third-party library functions like &lt;code&gt;foldr&lt;/code&gt;, etc.&lt;/p&gt;

&lt;p&gt;Such an application would be complicated to write in a traditional Web programming environment because the continuation of each &lt;code&gt;get-number&lt;/code&gt; invocation is considerably more complex than is typical. Yet, the first-class continuations in Racket ensure that this continuation is captured exactly, correctly, every time.&lt;/p&gt;

&lt;p&gt;Unfortunately, the native first-class continuations of Racket are not serializable, so they impose a per-session resource expenditure on the server. This can be alleviated through &lt;a href="http://docs.racket-lang.org/web-server/servlet.html#(part._managers)"&gt;expiration policies&lt;/a&gt;, but such policies are inherently unsound because continuations URLs are global roots.&lt;/p&gt;

&lt;p&gt;In the past, PLT has &lt;a href="http://cs.brown.edu/~sk/Publications/Papers/Published/mfgkf-web-restructuring-cps-journal/"&gt;provided tools&lt;/a&gt; that automatically restructure this kind of program into one that uses serializable continuations through an acronym soup of source transformations: CPS, lambda-lifting, defunctionalization, SPS, and so on. These tools effectively create automatically what most Web programmers write manually, except the tools don't mistakes.  But the tools also don't take into consideration what functions actually contribute to the interaction context and transform library functions like &lt;code&gt;foldr&lt;/code&gt; (which is unnecessary in the continuation) the same as functions like &lt;code&gt;build-list&lt;/code&gt; (which &lt;em&gt;are&lt;/em&gt; necessary.)&lt;/p&gt;

&lt;p&gt;Our &lt;a href="http://faculty.cs.byu.edu/~jay/static/icfp065-mccarthy.pdf"&gt;past work&lt;/a&gt; (based on &lt;a href="http://cs.brown.edu/~sk/Publications/Papers/Published/pcmkf-cont-from-gen-stack-insp/"&gt;another PLT paper&lt;/a&gt;) alleviates this problem by only requiring functions like &lt;code&gt;build-list&lt;/code&gt; to be transformed. From the perspective of a programmer, "transformed" is tantamount to "rewritten" because the source code for a third-party library may not be readily available. Programmers would have to program &lt;code&gt;add-many-numbers.com&lt;/code&gt; as:&lt;/p&gt;
&lt;pre&gt;
#lang web-server
(require web-server/servlet-env)
(define (get-number p)
  (string-&gt;number
   (extract-binding/single
    'num
    (request-bindings
     (send/suspend
      (λ (k-url)
        `(html 
          (body
           (form ([action ,k-url])
                 ,p nbsp (input ([name "num"]))
                 (input ([type "submit"])))))))))))
(define (build-list n f)
  (for/list ([i (in-range n)])
    (f i)))
(define (start req)
  (define how-many
    (get-number "How many numbers to add?"))
  (number-&gt;string
   (foldr 
    + 0
    (build-list
     how-many
     (λ (i)
       (get-number 
        (format "Provide number: ~a"
                (add1 i))))))))
; This requires a pre-release version
; to run in an un-named DrRacket buffer
(serve/servlet start #:stateless? #t)
&lt;/pre&gt;
&lt;p&gt;where &lt;code&gt;build-list&lt;/code&gt; has been re-implemented, but functions like &lt;code&gt;foldr&lt;/code&gt; have not. This application, despite its striking similarity to the first, requires absolutely no per-session server state, so it is considerably more scalable.&lt;/p&gt;

&lt;p&gt;Do we need to re-implement &lt;code&gt;build-list&lt;/code&gt;? What if the third-party, higher-order function (&lt;code&gt;build-list&lt;/code&gt;) that we use with a higher-order argument that causes Web interaction (&lt;code&gt;get-number&lt;/code&gt;) is too complicated to re-implement?&lt;/p&gt;
 
&lt;p&gt;Naturally this blog post would not exist if we didn't solve this problem.&lt;/p&gt;

&lt;p&gt;Our new approach, dubbed &lt;cite&gt;The Two-State Solution&lt;/cite&gt;, allows the programmer to transparently use a very small amount of per-session server state to store &lt;em&gt;just&lt;/em&gt; the part of the continuation inside functions like &lt;code&gt;build-list&lt;/code&gt; while serializing everything else to the client.&lt;/p&gt;

&lt;p&gt;The key is to use &lt;a href="http://docs.racket-lang.org/reference/eval-model.html#(part._prompt-model)"&gt;delimited, composable continuations&lt;/a&gt; to isolate the appropriate part of the continuation. The programmer designates this piece of the continuation through the &lt;code&gt;serial-&gt;native&lt;/code&gt; and &lt;code&gt;native-&gt;serial&lt;/code&gt; annotations. The programmer can write the application as:&lt;/p&gt;
&lt;pre&gt;
#lang web-server
(require web-server/servlet-env)
(define (get-number p)
  (string-&gt;number
   (extract-binding/single
    'num
    (request-bindings
     (send/suspend
      (λ (k-url)
        `(html 
          (body
           (form ([action ,k-url])
                 ,p nbsp (input ([name "num"]))
                 (input ([type "submit"])))))))))))
(define (start req)
  (define how-many
    (get-number "How many numbers to add?"))
  (number-&gt;string
   (foldr 
    + 0
    (serial-&gt;native
     (build-list
      how-many
      (λ (i)
        (native-&gt;serial
         (get-number 
          (format "Provide number: ~a"
                  (add1 i))))))))))
; This requires a pre-release version
; to run in an un-named DrRacket buffer
(serve/servlet start #:stateless? #t)
&lt;/pre&gt;
&lt;p&gt;The important distinction here is that both the &lt;code&gt;build-list&lt;/code&gt; and the &lt;code&gt;get-number&lt;/code&gt; abstractions do not need to change. We simply mark the context as being a "serial" or "native" context through the annotation forms. This re-written version will be more scalable than a purely native version, but represents an easier to achieve step in the evolution of a program, because third-party, higher-order functions can be used as is.&lt;/p&gt;

&lt;p&gt;This work will be presented at &lt;a href="http://splashcon.org/index.php?option=com_content&amp;amp;view=article&amp;amp;id=122&amp;amp;Itemid=91"&gt;OOPSLA 2010&lt;/a&gt;. It is also described in a paper with same name this blog post:&amp;nbsp;&lt;a href="http://faculty.cs.byu.edu/~jay/static/oopsla026-mccarthy.pdf"&gt;The Two-State Solution: Native and Serializable Continuations Accord&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-1382320702984482359?l=blog.racket-lang.org' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://faculty.cs.byu.edu/~jay/static/oopsla026-mccarthy.pdf' title='The Two-State Solution: Native and Serializable Continuations Accord'/><link rel='replies' type='application/atom+xml' href='http://blog.racket-lang.org/feeds/1382320702984482359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=1382320702984482359' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1382320702984482359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/1382320702984482359'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/10/two-state-solution-native-and.html' title='The Two-State Solution: Native and Serializable Continuations Accord'/><author><name>Jay McCarthy</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh3.googleusercontent.com/-13KUDv8LhZw/AAAAAAAAAAI/AAAAAAAAAAA/7MdiB5POU5k/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-3502770032653104859</id><published>2010-09-15T15:34:00.001-04:00</published><updated>2010-09-16T09:01:31.376-04:00</updated><title type='text'>Extending Typed Racket, Part 1</title><content type='html'>The Typed Racket team is pleased to announce a number of new additions
to our system.   We'll be writing a few blog posts about them, all of
which you can read here.
&lt;br /&gt;
This post begins with the core of the Typed Racket type system.
The fundamental idea at the heart of Typed Racket is called &lt;i&gt;occurrence
typing&lt;/i&gt;.  This is the technique that allows us to typecheck
existing Racket programs without requiring rewrites.  Here's a simple
example:
&lt;br /&gt;
&lt;pre&gt;(if (number? x) (add1 x) 0)
&lt;/pre&gt;

The typechecker can figure out from the use of &lt;code&gt;number?&lt;/code&gt;
that the second &lt;i&gt;occurrence&lt;/i&gt; of &lt;code&gt;x&lt;/code&gt; is always going to be a
number.  This simple form of occurrence typing is enough to take Typed
Racket a long way.  But because we want to be able to handle all the
sophisticated reasoning that programmers are already using to write
their Racket programs, we have been working on extending the system
further.&lt;br /&gt; 
The new design of our system is described in a paper, &lt;a href="http://www.ccs.neu.edu/scheme/pubs/#icfp10-thf"&gt;Logical Types for Untyped Languages&lt;/a&gt;, in
the upcoming International Conference on Functional Programming.  The
introduction provides an overview that's acessible to any Racket
programmer, but here's the key example:
&lt;br /&gt;
&lt;pre&gt;(cond
  [(and (number? x) (string? y)) — 1 —]
  [(number? x)                   — 2 —]
  [else                          — 3 —])
&lt;/pre&gt;

In expression 1, we know that &lt;code&gt;x&lt;/code&gt; is a number and
&lt;code&gt;y&lt;/code&gt; is a string.  In 2, we know that &lt;code&gt;x&lt;/code&gt; is a
number and &lt;code&gt;y&lt;/code&gt; is &lt;emph&gt;not&lt;/emph&gt; a string, by the logical
properties of &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;cond&lt;/code&gt;.  This form of
logical reasoning is enabled by the new foundation of the system, and
makes the entire system significantly more expressive.  
&lt;br /&gt;
All of these improvements are available in the current version of
Racket.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2080885971644496896-3502770032653104859?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/3502770032653104859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2080885971644496896&amp;postID=3502770032653104859' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3502770032653104859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2080885971644496896/posts/default/3502770032653104859'/><link rel='alternate' type='text/html' href='http://blog.racket-lang.org/2010/09/extending-typed-racket-part-1.html' title='Extending Typed Racket, Part 1'/><author><name>Sam Tobin-Hochstadt</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2080885971644496896.post-6909673633196173269</id><published>2010-08-03T22:36:00.000-04:00</published><updated>2011-11-09T22:50:37.963-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><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='http://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:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></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>2011-11-09T22:50:37.970-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><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='http://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:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></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>2011-11-09T22:50:37.937-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='release'/><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='http://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:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/_lx1aK_XwT-o/SxSPoMzJgLI/AAAAAAAAAA8/v5ASXddGsSc/s1600-R/eli-small.jpg'/></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='http://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 Findler</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></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='http://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 Findler</name><uri>http://www.blogger.com/profile/08402308775580442837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
