<?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'><id>tag:blogger.com,1999:blog-10770855</id><updated>2009-11-27T14:42:31.543-05:00</updated><title type='text'>The Little Calculist</title><subtitle type='html'>Dave Herman's research blog.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default?start-index=26&amp;max-results=25'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>310</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-10770855.post-8842011133021018323</id><published>2009-11-04T16:30:00.003-05:00</published><updated>2009-11-04T16:35:13.722-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tail calls'/><category scheme='http://www.blogger.com/atom/ns#' term='proper tail recursion'/><title type='text'>Ezra: Function calls are not stack frames</title><content type='html'>I don't have much to add to this but &lt;a href="http://ezrakilty.net/research/"&gt;Ezra&lt;/a&gt;'s saying &lt;a href="http://ezrakilty.net/research/2009/11/function_calls_are_not_stack_frames.html"&gt;things that are true&lt;/a&gt;:&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Tim Bray is spreading more misinformation about tail recursion. He describes it this way:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;It looks like a subroutine call, but in the case where it occurs as the last thing in the routine, it magically, silently, and automatically gets turned into, now how did I put it? “A highly controlled and structured GOTO.”&lt;/p&gt; &lt;/blockquote&gt;  A tail-call &lt;em&gt;is&lt;/em&gt; a subroutine call. The efficient implementation does not magically transformed into something else; if it doesn't create a stack frame on such a call, it's because one simply isn't relevant.&lt;/blockquote&gt;It's worth reading &lt;a href="http://ezrakilty.net/research/2009/11/function_calls_are_not_stack_frames.html"&gt;Ezra's whole post&lt;/a&gt;. I especially appreciate his point about confusing semantics with cost model.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-8842011133021018323?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/8842011133021018323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=8842011133021018323' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8842011133021018323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8842011133021018323'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/11/ezra-function-calls-are-not-stack.html' title='Ezra: Function calls are not stack frames'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-8639237185709279396</id><published>2009-09-08T10:49:00.004-04:00</published><updated>2009-09-08T14:39:48.589-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><title type='text'>Proposed json.plt change</title><content type='html'>I'm not sure how many users I have of my &lt;a href="http://planet.plt-scheme.org/display.ss?package=json.plt&amp;amp;owner=dherman"&gt;json.plt PLaneT package&lt;/a&gt;, nor how many of them read my blog. But I thought I'd see if I could take a straw poll here. I'm thinking about changing the data definition in a backwards-incompatible way. What if I said:&lt;br /&gt;&lt;blockquote&gt;A &lt;span style="font-style: italic;"&gt;jsexpr &lt;/span&gt;is one of:&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;'null&lt;/li&gt;&lt;li&gt;boolean&lt;/li&gt;&lt;li&gt;string&lt;/li&gt;&lt;li&gt;integer&lt;/li&gt;&lt;li&gt;inexact-real&lt;/li&gt;&lt;li&gt;(vectorof &lt;span style="font-style: italic;"&gt;jsexpr&lt;/span&gt;)&lt;/li&gt;&lt;li&gt;(listof (cons symbol &lt;span style="font-style: italic;"&gt;jsexpr&lt;/span&gt;))&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;The nice thing about this representation is that it's easier to quote and quasiquote. The down-sides are that array manipulation is a little less convenient, and table lookup is slower.&lt;br /&gt;&lt;br /&gt;Another alternative is:&lt;br /&gt;&lt;blockquote&gt;A &lt;span style="font-style: italic;"&gt;jsexpr &lt;/span&gt;is one of:&lt;br /&gt;&lt;ul&gt;&lt;li style="font-family: courier new;"&gt;#:null&lt;/li&gt;&lt;li&gt; boolean&lt;/li&gt;&lt;li&gt; string&lt;/li&gt;&lt;li&gt; integer&lt;/li&gt;&lt;li&gt; inexact-real&lt;/li&gt;&lt;li&gt; (listof &lt;span style="font-style: italic;"&gt;jsexpr&lt;/span&gt;)&lt;/li&gt;&lt;li&gt; (listof (cons symbol &lt;span style="font-style: italic;"&gt;jsexpr&lt;/span&gt;))&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;The nice thing about this is that both arrays and tables are conveniently represented as lists. But it's a little uglier for representing &lt;span style="font-family:courier new;"&gt;null&lt;/span&gt;, which is necessary to avoid ambiguity between the JSON strings &lt;span style="font-family:courier new;"&gt;{ "null" : [] }&lt;/span&gt; and &lt;span style="font-family:courier new;"&gt;[[null]]&lt;/span&gt;. Note that it's also a little more subtle to distinguish between arrays and tables.&lt;br /&gt;&lt;br /&gt;Other possible unambiguous representations of &lt;span style="font-family:courier new;"&gt;null&lt;/span&gt; include &lt;span style="font-family:courier new;"&gt;#\null&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;#"null"&lt;/span&gt;, or &lt;span style="font-family:courier new;"&gt;#&amp;amp;0&lt;/span&gt;. Yech.&lt;br /&gt;&lt;br /&gt;If you have any opinions, feel free to comment here or email me privately.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; Whoops, can't have them both be lists, because of the ambiguity between the empty object and empty array.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-8639237185709279396?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/8639237185709279396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=8639237185709279396' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8639237185709279396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8639237185709279396'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/09/proposed-jsonplt-change.html' title='Proposed json.plt change'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-4557403269616946743</id><published>2009-09-03T17:07:00.002-04:00</published><updated>2009-09-03T17:08:54.998-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Mitchfest'/><title type='text'>Mitchfest blog</title><content type='html'>We've created a &lt;a href="http://mitchfest.wordpress.com"&gt;Mitchfest blog&lt;/a&gt; where we'll be posting updates on new material as it becomes available, including presentation slides, videos, and publication of issues of the Festschrift.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-4557403269616946743?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/4557403269616946743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=4557403269616946743' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/4557403269616946743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/4557403269616946743'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/09/mitchfest-blog.html' title='Mitchfest blog'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-223456751683680621</id><published>2009-08-17T12:52:00.003-04:00</published><updated>2009-08-17T12:55:27.512-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rules'/><title type='text'>Quote of the day</title><content type='html'>&lt;blockquote&gt;"What's surprising to me is that this language ever managed to achieve widespread use - but I guess it's just another example of how you can break a whole bunch of precious rules and the sky doesn't necessarily fall in. Software is full of people declaiming their 'thou shalt not' lists, and right across the street there's another bunch of people breaking those very rules quite profitably."&lt;br /&gt;         -- &lt;a href="http://lambda-the-ultimate.org/node/3564#comment-50626"&gt;Daniel Earwicker&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-223456751683680621?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/223456751683680621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=223456751683680621' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/223456751683680621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/223456751683680621'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/08/quote-of-day.html' title='Quote of the day'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-3328016333347489110</id><published>2009-08-11T16:28:00.001-04:00</published><updated>2009-08-11T16:28:58.529-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='announcements'/><title type='text'>Mitchfest program</title><content type='html'>We've posted the &lt;a href="http://www.ccs.neu.edu/events/wand-symposium"&gt;Mitchfest&lt;/a&gt; &lt;a href="http://www.ccs.neu.edu/events/wand-symposium/program.html"&gt;schedule and program&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-3328016333347489110?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/3328016333347489110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=3328016333347489110' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3328016333347489110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3328016333347489110'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/08/mitchfest-program.html' title='Mitchfest program'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-1403978149452762668</id><published>2009-08-10T07:26:00.004-04:00</published><updated>2009-08-10T07:37:12.217-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='announcements'/><title type='text'>Call for Participation: Scheme Workshop 2009</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;div style="text-align: left;"&gt;[&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;only one day left to register! --Dave]&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: bold;"&gt;2009 Workshop on Scheme and Functional Programming&lt;/span&gt;&lt;br /&gt;    Co-Located with the &lt;a href="http://www.ccs.neu.edu/events/wand-symposium"&gt;Symposium in Honor of Mitchell Wand&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;                         August 22, 2009&lt;br /&gt;                  Boston, Massachusetts, USA&lt;br /&gt;               &lt;a href="http://www.schemeworkshop.org/2009"&gt;http://www.schemeworkshop.org/2009&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;                     &lt;span style="font-weight: bold;"&gt;CALL FOR PARTICIPATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To the delight of all and sundry, the 2009 Scheme and Functional Programming Workshop will be held on August 22nd at Northeastern University, and it is a signal honor for me to be able to invite YOU to the WORLD'S FOREMOST WORKSHOP on the marvelous Scheme language, and to present a program PACKED with contributions from familiar faces and new ones, certain to amaze, delight, and edify. Lend us your ears, and we will widen the space between them.&lt;br /&gt;&lt;br /&gt;- John Clements&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IMPORTANT DATES&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;August 11, 2009 - Registration deadline&lt;br /&gt;August 22, 2009 - &lt;a href="http://www.schemeworkshop.org/2009"&gt;Workshop on Scheme and Functional Programming&lt;/a&gt;&lt;br /&gt;August 23-24, 2009 - &lt;a href="http://www.ccs.neu.edu/events/wand-symposium"&gt;Symposium in Honor of Mitchell Wand&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VENUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Northeastern University&lt;br /&gt;Boston Massachusetts&lt;br /&gt;&lt;a href="http://www.northeastern.edu/campusmap/map/qad5.html"&gt;Curry Student Center&lt;/a&gt; Ballroom (Building 50)&lt;br /&gt;&lt;a href="http://maps.google.com/maps?q=346+Huntington+Ave,+Boston,+MA+02115"&gt;346 Huntington Ave&lt;/a&gt;&lt;br /&gt;Boston, MA 02115&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ACCOMMODATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A limited block of hotel rooms has been reserved for participants of the Scheme Workshop and/or the Mitchell Wand Symposium at hotels in Cambridge and Boston.  See the &lt;a href="http://www.schemeworkshop.org/2009"&gt;workshop web site&lt;/a&gt; for more information, and please note that some of these special rates have already expired.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REGISTRATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The registration fee will be $40 to help cover the operating costs and lunch accommodations. Please register by &lt;span style="font-weight: bold;"&gt;August 11, 2009&lt;/span&gt; so that we will have an accurate head count. To register, please send an email to &lt;a href="mailto:aoeuswreg@brinckerhoff.org"&gt;aoeuswreg@brinckerhoff.org&lt;/a&gt; with your name and any dietary restrictions for lunch.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PROGRAM COMMITTEE&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;John Clements (Cal Poly State University (organizer &amp;amp; chair))&lt;/li&gt;&lt;li&gt;Dominique Boucher (Nu Echo)&lt;/li&gt;&lt;li&gt;Abdulaziz Ghuloum (Indiana University)&lt;/li&gt;&lt;li&gt;David Herman (Northeastern University)&lt;/li&gt;&lt;li&gt;Shriram Krishnamurthi (Brown University)&lt;/li&gt;&lt;li&gt;Matthew Might (University of Utah)&lt;/li&gt;&lt;li&gt;David Van Horn (Northeastern University)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PRELIMINARY PROGRAM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Invited: If programming is like math, why don't math teachers teach programming?&lt;/span&gt;&lt;br /&gt;Emmanuel Schanzer&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Invited Talk on Future Directions for the Scheme Language&lt;/span&gt;&lt;br /&gt;The Newly Elected Scheme Language Steering Committee&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The Scribble Reader: An Alternative to S-expressions for Textual Content&lt;/span&gt;&lt;br /&gt;Eli Barzilay&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;World With Web: A compiler from world applications to JavaScript&lt;/span&gt;&lt;br /&gt;Remzi Emre Başar, Caner Derici, Çağdaş Şenol&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Scalable Garbage Collection with Guaranteed MMU&lt;/span&gt;&lt;br /&gt;William D Clinger, Felix S. Klock II&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Distributed Software Transactional Memory&lt;/span&gt;&lt;br /&gt;Anthony Cowley&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Sequence Traces for Object-Oriented Executions&lt;/span&gt;&lt;br /&gt;Carl Eastlund, Matthias Felleisen&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Keyword and Optional Arguments in PLT Scheme&lt;/span&gt;&lt;br /&gt;Matthew Flatt, Eli Barzilay&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fixing Letrec (reloaded)&lt;/span&gt;&lt;br /&gt;Abdulaziz Ghuloum, R. Kent Dybvig&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Descot: Distributed Code Repository Framework&lt;/span&gt;&lt;br /&gt;Aaron W. Hsu&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A pattern-matcher for miniKanren -or- How to get into trouble with CPS macros&lt;/span&gt;&lt;br /&gt;Andrew W. Keep, Michael D. Adams, Lindsey Kuper, William E. Byrd, Daniel P. Friedman&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Randomized Testing in PLT Redex&lt;/span&gt;&lt;br /&gt;Casey Klein, Robert Bruce Findler&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Screen-Replay: A Session Recording and Analysis Tool for DrScheme&lt;/span&gt;&lt;br /&gt;Mehmet Fatih Köksal, Remzi Emre Başar, Suzan Üsküdarlı&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Interprocedural Dependence Analysis of Higher-Order Programs via Stack Reachability&lt;/span&gt;&lt;br /&gt;Matthew Might, Tarun Prabhu&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Get stuffed: Tightly packed abstract protocols in Scheme&lt;/span&gt;&lt;br /&gt;John Moore&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Higher-Order Aspects in Order&lt;/span&gt;&lt;br /&gt;Eric Tanter&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Peter J Landin (1930-2009)&lt;/span&gt;&lt;br /&gt;Olivier Danvy&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-1403978149452762668?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/1403978149452762668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=1403978149452762668' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/1403978149452762668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/1403978149452762668'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/08/call-for-participation-scheme-workshop.html' title='Call for Participation: Scheme Workshop 2009'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-7546292339180325449</id><published>2009-08-06T23:41:00.006-04:00</published><updated>2009-08-07T18:21:52.586-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='diagnostics'/><category scheme='http://www.blogger.com/atom/ns#' term='proper tail recursion'/><category scheme='http://www.blogger.com/atom/ns#' term='stack traces'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='macros'/><title type='text'>Selectively disabling tail recursion</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__OULbbSCQyc/SnunDG0XyyI/AAAAAAAAADQ/XPfbHvd3-TQ/s1600-h/partial-trace.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 78px;" src="http://1.bp.blogspot.com/__OULbbSCQyc/SnunDG0XyyI/AAAAAAAAADQ/XPfbHvd3-TQ/s200/partial-trace.png" alt="" id="BLOGGER_PHOTO_ID_5367067052753799970" border="0" /&gt;&lt;/a&gt;The anti-tail-recursion crowd often complains about loss of information in stack traces. In DrScheme, if you raise an exception after a sequence of tail calls:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;(define (fact-iter n acc)&lt;br /&gt;  (if (zero? n)&lt;br /&gt;      (error 'fact "stop!")&lt;br /&gt;      (fact-iter (sub1 n) (* n acc))))&lt;br /&gt;(fact-iter 3 1)&lt;/pre&gt;&lt;/blockquote&gt;the stack trace you get back has very little information in it.&lt;br /&gt;&lt;br /&gt;One argument you'll sometimes hear from people like me is that in a properly tail calling language, you can always turn a tail position into a non-tail-position, whereas the reverse is impossible. But in practice, when you want broadly better diagnostics, manually converting lots of individual function calls throughout a program is too hard to be practical, and you then have to go and undo it afterward.&lt;br /&gt;&lt;br /&gt;So in the spirit of &lt;a href="http://calculist.blogspot.com/2009/07/linguistic-tools-for-diagnostics.html"&gt;linguistic tools for diagnostics&lt;/a&gt;, I've discovered a dirt-simple trick for improving the information in stack traces while debugging.&lt;br /&gt;&lt;br /&gt;PLT Scheme lets you hijack the normal meaning of function application by rebinding the &lt;a style="font-family: courier new; font-weight: bold;" href="http://docs.plt-scheme.org/reference/application.html"&gt;#%app&lt;/a&gt; macro. So I defined a utility called &lt;a style="font-family: courier new; font-weight: bold;" href="http://planet.plt-scheme.org/package-source/dherman/tail.plt/5/0/planet-docs/tail/index.html"&gt;trace-app&lt;/a&gt; that wraps its function application in (roughly) the identity function, forcing the given function call out of tail position. Then all you have to do is add to the top of a module:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;(require (planet dherman/tail:4))&lt;br /&gt;(define-syntax #%app trace-app)&lt;/pre&gt;&lt;/blockquote&gt;and suddenly, all function applications that occur syntactically within the current module body are non-tail calls, and &lt;span style="font-style: italic;"&gt;voilà&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__OULbbSCQyc/SnunNeeawfI/AAAAAAAAADY/aLKKtP9JDoY/s1600-h/full-trace.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 200px; height: 146px;" src="http://1.bp.blogspot.com/__OULbbSCQyc/SnunNeeawfI/AAAAAAAAADY/aLKKtP9JDoY/s200/full-trace.png" alt="" id="BLOGGER_PHOTO_ID_5367067230902862322" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; I've posted a &lt;a href="http://planet.plt-scheme.org/display.ss?package=tail.plt&amp;amp;owner=dherman"&gt;new version of the package&lt;/a&gt;, which exports &lt;a style="font-weight: bold; font-family: courier new;" href="http://planet.plt-scheme.org/package-source/dherman/tail.plt/5/0/planet-docs/tail/index.html"&gt;trace-app&lt;/a&gt; in a slightly different way. The initial version had a hazard that client modules which used&lt;blockquote&gt;&lt;pre&gt;(provide (all-defined-out))&lt;/pre&gt;&lt;/blockquote&gt;would inadvertently re-provide &lt;span style="font-family: courier new;"&gt;#%app&lt;/span&gt;, which would then disable tail recursion for its client modules.&lt;br /&gt;&lt;br /&gt;The new way to use it is&lt;blockquote&gt;&lt;pre&gt;(require (rename-in (planet dherman/tail:5) [trace-app #%app]))&lt;/pre&gt;&lt;/blockquote&gt;or&lt;blockquote&gt;&lt;pre&gt;(require (only-in (planet dherman/tail:5) [trace-app #%app]))&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-7546292339180325449?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/7546292339180325449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=7546292339180325449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7546292339180325449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7546292339180325449'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/08/selectively-disabling-tail-recursion.html' title='Selectively disabling tail recursion'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__OULbbSCQyc/SnunDG0XyyI/AAAAAAAAADQ/XPfbHvd3-TQ/s72-c/partial-trace.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-2397896808716575435</id><published>2009-07-22T23:09:00.006-04:00</published><updated>2009-07-23T07:21:58.406-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='diagnostics'/><category scheme='http://www.blogger.com/atom/ns#' term='tail calls'/><category scheme='http://www.blogger.com/atom/ns#' term='proper tail recursion'/><category scheme='http://www.blogger.com/atom/ns#' term='stack traces'/><category scheme='http://www.blogger.com/atom/ns#' term='tracing'/><title type='text'>Linguistic tools for diagnostics</title><content type='html'>I've written before about how &lt;a href="http://calculist.blogspot.com/2006/03/call-stack-is-not-history.html"&gt;the stack gets misunderstood as a history&lt;/a&gt; thanks to non-tail-recursive languages. Of course, stack traces are indispensable: they're essential for debugging, and they're also useful for reporting crash information from live applications.&lt;br /&gt;&lt;br /&gt;But this conflates two very different language requirements in one feature: the need for nested (unbounded, if your language isn't broken) function application, and the need for diagnostics of dynamic errors.&lt;br /&gt;&lt;br /&gt;The first is what continuations and stacks are all about, of course: &lt;del&gt;functions can't call each other&lt;/del&gt; function calls can't be nested in compound expressions without the language runtime keeping track of the work it has left to do. But the second is an independent need: there's all sorts of diagnostic information that's potentially useful, and the stack just happens to be one source of information that's already there.&lt;br /&gt;&lt;br /&gt;Now, as it turns out, it's a pretty useful source of information. And if you happen &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; to have proper tail recursion, it's even more useful, since it provides a path through the function call graph. But I've been finding stack traces in Scheme less informative, because with proper tail calls, there's less function-call history in the continuation.&lt;br /&gt;&lt;br /&gt;I recognize that sometimes the "complexity budget" in language design necessitates using one feature to satisfy multiple requirements. But I'd like to see more investigation of &lt;span style="font-style: italic;"&gt;linguistic diagnostics&lt;/span&gt; designed independently of existing language features. For example, it might be useful to provide configurable tracing facilities that record program history during runtime, where the tuning of how much gets recorded is completely independent of the space semantics of the evaluator. So you have a properly tail recursive semantics with a flexible tracing facility grafted on top.&lt;br /&gt;&lt;br /&gt;What classifies a language feature as "purely diagnostic" might be that it is designed not to &lt;span style="font-style: italic;"&gt;change&lt;/span&gt; the observable behavior of the program, but merely to &lt;span style="font-style: italic;"&gt;report&lt;/span&gt; some additional information. &lt;a href="http://www.ece.northwestern.edu/%7Erobby/pubs/papers/fb-tr2006-01.pdf"&gt;Contracts-as-projections&lt;/a&gt; is an example.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; rephrased my rookie characterization of continuations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-2397896808716575435?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/2397896808716575435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=2397896808716575435' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/2397896808716575435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/2397896808716575435'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/07/linguistic-tools-for-diagnostics.html' title='Linguistic tools for diagnostics'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-3086355391832421729</id><published>2009-07-13T23:03:00.004-04:00</published><updated>2009-07-13T23:07:04.712-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regular trees'/><category scheme='http://www.blogger.com/atom/ns#' term='infinite trees'/><category scheme='http://www.blogger.com/atom/ns#' term='contractive'/><title type='text'>Contractiveness not required for regularity</title><content type='html'>&lt;a href="http://calculist.blogspot.com/2009/07/regular-subtree-set-finiteness.html"&gt;Yesterday&lt;/a&gt; I wrote about ensuring termination of subtyping for equirecursive types that I thought contractiveness ensures that the (potentially) infinite tree corresponding to a recursive type is regular. That was wrong. Contractiveness just ensures that you can't represent types that don't have a corresponding tree, such as &amp;mu;&lt;span style="font-style: italic;"&gt;A&lt;/span&gt;.&lt;span style="font-style: italic;"&gt;A&lt;/span&gt;. The fact that the tree is regular comes from the fact that the syntactic representation is finite and substitution doesn't add anything new.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-3086355391832421729?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/3086355391832421729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=3086355391832421729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3086355391832421729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3086355391832421729'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/07/contractiveness-not-required-for.html' title='Contractiveness not required for regularity'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-7623564499261486112</id><published>2009-07-12T17:13:00.004-04:00</published><updated>2009-07-12T17:26:36.435-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='termination'/><category scheme='http://www.blogger.com/atom/ns#' term='equirecursive types'/><category scheme='http://www.blogger.com/atom/ns#' term='TAPL'/><category scheme='http://www.blogger.com/atom/ns#' term='recursive types'/><title type='text'>Regular =&gt; Subtree set finiteness =&gt; Termination of memoized algorithm</title><content type='html'>The termination argument behind the &lt;a href="http://www.cis.upenn.edu/%7Ebcpierce/tapl/"&gt;TAPL&lt;/a&gt; algorithm for subtyping of equirecursive types is not as scary as it sounds (or as it sounded to me, anyway). It's as simple as this: even though the subtyping rules generate bigger types when they substitute a recursive type into its own body, the fact that the types are &lt;span style="font-style: italic;"&gt;regular&lt;/span&gt; means that there are only a finite number of distinct subterms in the infinite type tree--that's the definition of regular trees. So as long as you keep a cache of types you've looked at before and never have to look at the same pair of types twice, you can't do an infinite number of checks.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.boston.com/ae/theater_arts/exhibitionist/Great%20Depression%20Unemployment%20Line.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 358px; height: 263px;" src="http://www.boston.com/ae/theater_arts/exhibitionist/Great%20Depression%20Unemployment%20Line.JPG" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;font-size:85%;" &gt;(Eventually, you run out of work.)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If I'm not mistaken, the syntactic restriction that types are &lt;span style="font-style: italic;"&gt;contractive&lt;/span&gt;, i.e., recursive type variables have to appear under constructors, is sufficient to guarantee that the corresponding type trees are regular.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-7623564499261486112?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/7623564499261486112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=7623564499261486112' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7623564499261486112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7623564499261486112'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/07/regular-subtree-set-finiteness.html' title='Regular =&gt; Subtree set finiteness =&gt; Termination of memoized algorithm'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-5833831425202675245</id><published>2009-07-09T00:04:00.005-04:00</published><updated>2009-07-09T02:15:07.149-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='announcements'/><title type='text'>Call for Participation: Symposium in Honor of Mitchell Wand</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;Symposium in Honor of Mitchell Wand&lt;/span&gt;&lt;br /&gt;In Cooperation with ACM SIGPLAN&lt;br /&gt;Coordinated with &lt;a href="http://www.schemeworkshop.org/2009"&gt;Scheme Workshop 2009&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;August 23-24, 2009&lt;br /&gt;Boston, Massachusetts, USA&lt;br /&gt;&lt;a href="http://www.ccs.neu.edu/events/wand-symposium"&gt;http://www.ccs.neu.edu/events/wand-symposium&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;"&gt;CALL FOR PARTICIPATION&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;IMPORTANT DATES&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;August 1, 2009 - Registration deadline&lt;br /&gt;August 22, 2009 - &lt;a href="http://www.schemeworkshop.org/2009"&gt;Scheme Workshop&lt;/a&gt;&lt;br /&gt;August 23-24, 2009 - &lt;a href="http://www.ccs.neu.edu/events/wand-symposium"&gt;Symposium in Honor of Mitchell Wand&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;VENUE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Northeastern University&lt;br /&gt;346 Huntington Ave&lt;br /&gt;Boston, MA 02115 USA&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ACCOMMODATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A limited block of hotel rooms will be reserved for participants of the Symposium and/or the Scheme Workshop at hotels in Boston and Cambridge. More information will be available soon; please check back on the event web site.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REGISTRATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Registration is free. Please register by &lt;span style="font-weight: bold;"&gt;August 1, 2009&lt;/span&gt; so that we will have an accurate head count. To register, please send an email to &lt;a href="mailto:mitchfest-registration@ccs.neu.edu"&gt;mitchfest-registration@ccs.neu.edu&lt;/a&gt; with your name and any dietary restrictions for lunch.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SCOPE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Northeastern University is hosting a special Symposium in celebration of Dr. Mitchell Wand's 60th birthday and honoring his pioneering work in the field of programming languages. For over 30 years Mitch has made important contributions to many areas of programming languages, including semantics, continuations, type theory, hygienic macros, compiler correctness, static analysis and formal verification.&lt;br /&gt;&lt;br /&gt;Please join us at Northeastern on August 23rd and 24th as we celebrate this personal milestone and pay tribute to a great computer scientist, researcher, teacher and colleague, Dr. Mitchell (Mitch) Wand.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;STEERING COMMITTEE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* Olivier Danvy (University of Aarhus)&lt;br /&gt;* David Herman (Northeastern University)&lt;br /&gt;* Dino Oliva (Bloomberg L.P.)&lt;br /&gt;* Olin Shivers (Northeastern University)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PRELIMINARY PROGRAM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Functional un|unparsing&lt;/span&gt;&lt;br /&gt;  Kenichi Asai and Oleg Kiselyov and Chung-chieh Shan&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A mechanized bisimulation for the nu-calculus&lt;/span&gt;&lt;br /&gt;  Nick Benton and Vasileios Koutavas&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A shallow Scheme embedding of bottom-avoiding streams&lt;/span&gt;&lt;br /&gt;  William E. Byrd and Daniel P. Friedman and Ramana Kumar and Joseph P. Near&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A model of functional traversal-based generic programming&lt;/span&gt;&lt;br /&gt;  Bryan Chadwick and Karl Lieberherr&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The MacScheme compiler: using denotational semantics to prove correctness &lt;/span&gt;&lt;br /&gt;  William D. Clinger&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Eliminating the middle man: Learning garbage collection without interpreters&lt;/span&gt;&lt;br /&gt;  Gregory H. Cooper and Arjun Guha and Shriram Krishnamurthi&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Specializing continuations&lt;/span&gt;&lt;br /&gt;  Christopher Dutchyn&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A Scheme for native threads&lt;/span&gt;&lt;br /&gt;  R. Kent Dybvig&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Trampolining architectures&lt;/span&gt;&lt;br /&gt;  Steven E. Ganz and Daniel P. Friedman&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Finding everything that can happen: Solving authentication tests by computer&lt;/span&gt;&lt;br /&gt;  Joshua D. Guttman and John D. Ramsdell&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A theory of typed hygienic macros&lt;/span&gt;&lt;br /&gt;  David Herman&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The MzScheme machine and bytecode verifier&lt;/span&gt;&lt;br /&gt;  Casey L. Klein and Matthew Flatt and Robert Bruce Findler&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Featherweight X10: A core calculus for async-finish parallelism&lt;/span&gt;&lt;br /&gt;  Jonathan K. Lee and Jens Palsberg&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Subcubic control-flow analysis algorithms&lt;/span&gt;&lt;br /&gt;  Jan Midtgaard and David Van Horn&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;A simplified multi-tier semantics for Hop&lt;/span&gt;&lt;br /&gt;  Manuel Serrano and Christian Queinnec&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DDP for CFA&lt;/span&gt;&lt;br /&gt;  Olin Shivers and Dimitrios Vardoulakis and Alexander Spoon&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;The design and implementation of Typed Scheme&lt;/span&gt;&lt;br /&gt;  Sam Tobin-Hochstadt and Matthias Felleisen&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-5833831425202675245?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/5833831425202675245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=5833831425202675245' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5833831425202675245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5833831425202675245'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/07/call-for-participation-symposium-in.html' title='Call for Participation: Symposium in Honor of Mitchell Wand'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-8122399154020718605</id><published>2009-05-15T11:20:00.004-04:00</published><updated>2009-05-15T11:26:56.973-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lexical syntax'/><category scheme='http://www.blogger.com/atom/ns#' term='mathematical notation'/><title type='text'>Lexical syntax thought</title><content type='html'>We reserve the single-quote character (&lt;span style="font-family:courier new;"&gt;#\'&lt;/span&gt;) in the Scheme lexical syntax so that it can't be used anywhere in an identifier. If you stick it in the middle of an identifier (e.g., &lt;span style="font-family:courier new;"&gt;foo'bar&lt;/span&gt;) it lexes as three tokens (&lt;span style="font-family:courier new;"&gt;"foo"&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;"'"&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;"bar"&lt;/span&gt;). But I don't recall ever seeing anyone make use of this fact; they always stick a space before the quote.&lt;br /&gt;&lt;br /&gt;I really miss my precious "prime" character in ML and Haskell identifiers (&lt;span style="font-family:courier new;"&gt;let val state' = munge state ...&lt;/span&gt;). Scheme prides itself on a permissive lexical syntax for identifiers. Why couldn't we allow quote characters in all positions of an identifier other than the first?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;P.S.&lt;/span&gt; I know I can use the &lt;a href="http://www.fileformat.info/info/unicode/char/2032/index.htm"&gt;Unicode prime character&lt;/a&gt; (U+2032). Sorry, not till I get &lt;a href="http://calculist.blogspot.com/2008/12/i-want-my-unicode-keyboard.html"&gt;my Unicode keyboard&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-8122399154020718605?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/8122399154020718605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=8122399154020718605' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8122399154020718605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8122399154020718605'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/05/lexical-syntax-thought.html' title='Lexical syntax thought'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-3559153625089435367</id><published>2009-05-15T07:42:00.003-04:00</published><updated>2009-05-15T07:50:59.725-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='semi-persistent data structures'/><category scheme='http://www.blogger.com/atom/ns#' term='backtracking'/><title type='text'>Follow-up on effect masking and backtracking</title><content type='html'>A follow-up on yesterday's post about &lt;a href="http://calculist.blogspot.com/2009/05/effect-masking-vs-purity.html"&gt;backtracking with state&lt;/a&gt;: an anonymous commenter &lt;a href="http://calculist.blogspot.com/2009/05/effect-masking-vs-purity.html?showComment=1242378540000#c2131052140250737829"&gt;reminded me&lt;/a&gt; that persistent data structures are a useful and lightweight (compared to e.g. first-class stores) approach. In fact, probably my favorite paper from &lt;a href="http://esop2008.doc.ic.ac.uk/"&gt;ESOP 2008&lt;/a&gt; was Conchon and Filli&amp;acirc;tre's &lt;a href="http://www.lri.fr/%7Efilliatr/ftp/publis/spds-esop08.pdf"&gt;Semi-Persistent Data Structures&lt;/a&gt;, which was addressing exactly this problem. Rather than introducing an entirely transactional semantics for the language, it's just a data structure with a transactional interface.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-3559153625089435367?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/3559153625089435367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=3559153625089435367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3559153625089435367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/3559153625089435367'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/05/follow-up-on-effect-masking-and.html' title='Follow-up on effect masking and backtracking'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-220758637591513836</id><published>2009-05-15T07:25:00.004-04:00</published><updated>2009-05-15T07:40:15.442-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rethrowing'/><category scheme='http://www.blogger.com/atom/ns#' term='stack traces'/><category scheme='http://www.blogger.com/atom/ns#' term='continuation marks'/><category scheme='http://www.blogger.com/atom/ns#' term='conditional exception handling'/><category scheme='http://www.blogger.com/atom/ns#' term='exceptions'/><title type='text'>Continuation marks in exceptions</title><content type='html'>Rethrowing caught exceptions is an important idiom. In particular, there are lots of cases where it's important to &lt;span style="font-style: italic;"&gt;conditionally&lt;/span&gt; handle an exception by handling it and then rethrowing it. In ML, I believe it's the actual definition of pattern matching on particular exception types: the pattern matching is syntactic sugar for inspecting the caught exception and conditionally rethrowing it. In standard JavaScript it's the &lt;span style="font-style: italic;"&gt;only&lt;/span&gt; way to catch particular exception types, because there is no standard conditional handling form.&lt;br /&gt;&lt;br /&gt;But a useful feature of some exception systems, like in Java, is the association of a stack trace with an exception. But when you rethrow an exception, this involves a choice: do you want a stack trace to be associated with the original continuation that threw the exception, or the one that rethrew it? There are genuine use cases for both. But in Java, the implementers have to choose one or the other for you.&lt;br /&gt;&lt;br /&gt;PLT Scheme gives you the flexibility to choose for yourself. Exceptions are not special values in Scheme; there's an orthogonal way of reifying the control state. The PLT runtime stores stack trace information in a special continuation mark, so if you grab the &lt;a href="http://docs.plt-scheme.org/reference/contmarks.html#%28def._%28%28quote._%7E23%7E25kernel%29._current-continuation-marks%29%29"&gt;current continuation mark set&lt;/a&gt;, you've got your hands on a value that provides DrScheme's IDE with all the information it needs to visualize the continuation.&lt;br /&gt;&lt;br /&gt;The standard exception types in PLT Scheme are records with a field for the current continuation mark set. So when you conditionally rethrow an exception, you can either keep its version of the continuation marks, or functionally update it with the current continuation marks and throw that instead.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Afterthought:&lt;/span&gt; I think Java might have chosen something like a policy where an exception value saves its stack trace at the point where it's created. This gives you the ability to do both by either rethrowing the same exception (to keep the original stack trace) or wrapping the exception with a new one (to use the new stack trace). I still prefer the PLT Scheme approach, which makes the stack trace a first-class value and consequently more explicit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-220758637591513836?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/220758637591513836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=220758637591513836' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/220758637591513836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/220758637591513836'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/05/continuation-marks-in-exceptions.html' title='Continuation marks in exceptions'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-5944780798443551725</id><published>2009-05-14T20:48:00.003-04:00</published><updated>2009-05-14T21:31:00.410-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mutation'/><category scheme='http://www.blogger.com/atom/ns#' term='monads'/><category scheme='http://www.blogger.com/atom/ns#' term='effect masking'/><category scheme='http://www.blogger.com/atom/ns#' term='effects'/><title type='text'>Effect masking vs. purity</title><content type='html'>I've been working for a while on an algorithm that involves two effects: mutation and backtracking. Implementation strategies for the two effects seem to have different economics. I'm working in the context of PLT Scheme, here, but I suspect my observations would be similar in other non-pure languages.&lt;br /&gt;&lt;br /&gt;For backtracking, I could implement the algorithm in a pure way using &lt;a href="ftp://ftp.ccs.neu.edu/pub/people/wand/papers/icfp-04.pdf"&gt;two continuations or the list monad&lt;/a&gt;. Or I could just use the built-in exceptions and exception handlers of PLT Scheme. For mutation, the choice is between store-passing or the built-in mutation of Scheme.&lt;br /&gt;&lt;br /&gt;I've tried abstracting these two effects out into a single monad for a completely pure implementation. There are downsides to this approach, though. For example, debuggers and stack traces are completely useless since most of the program control flow goes through &lt;span style="font-family:courier new;"&gt;unit&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;bind&lt;/span&gt;, and the myriad intermediate closures created by such a higher-order style of programming. Besides, an excessively higher-order style imposes real readability costs on a program. So for implementing backtracking, I find exceptions to be a more straightforward approach.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.dday.com/blog/wp-content/uploads/2009/02/man-on-wire.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 321px; height: 176px;" src="http://www.dday.com/blog/wp-content/uploads/2009/02/man-on-wire.jpg" alt="" border="0" /&gt;&lt;/a&gt;But as it turns out, the algorithm also needs to roll back mutations when it backtracks. So I simply &lt;span style="font-style: italic;"&gt;can't&lt;/span&gt; use mutation. I think this is one of the things that make mutation so unwieldy--there's typically no corresponding "masking" operation for a destructive update. Exceptions have handlers, continuations (sometimes) have delimiters-- even some I/O features come with effect masks: for example, in PLT Scheme you can override the &lt;a href="http://docs.plt-scheme.org/reference/port-ops.html#%28def._%28%28quote._%7E23%7E25kernel%29._current-output-port%29%29"&gt;&lt;span style="font-family:courier new;"&gt;current-output-port&lt;/span&gt;&lt;/a&gt; with a &lt;a href="http://docs.plt-scheme.org/reference/stringport.html"&gt;string port&lt;/a&gt; and capture a program's output. All of these allow you to bound the effects a computation can have, to put a sort of dynamic safety net around it. Not so for &lt;span style="font-family: courier new;"&gt;set!&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;vector-set!&lt;/span&gt;, &lt;span style="font-family: courier new;"&gt;set-box!&lt;/span&gt;, or &lt;span style="font-family: courier new;"&gt;set-&lt;/span&gt;&lt;span style="font-style: italic;"&gt;record&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;-&lt;/span&gt;&lt;span style="font-style: italic;"&gt;field&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;!&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;So for mutation, I'm sticking with explicit store-passing-- not in monadic style. That seems to be the reasonable middle ground for my purposes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-5944780798443551725?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/5944780798443551725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=5944780798443551725' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5944780798443551725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5944780798443551725'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/05/effect-masking-vs-purity.html' title='Effect masking vs. purity'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-7036401118033907358</id><published>2009-05-11T17:17:00.003-04:00</published><updated>2009-05-11T17:22:52.845-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='control flow'/><category scheme='http://www.blogger.com/atom/ns#' term='backtracking'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><title type='text'>Representing failure</title><content type='html'>I'm working on an algorithm that uses backtracking implemented with exceptions and handlers (rather than, say, explicit continuations). I just noticed that, for debugging, it's nice to represent the failure exceptions as records that contain not just the data about the operation that failed but also an optional list of other failure exceptions. In the disjunction cases, I can save the intermediate failures and, if they all fail, include them in the resulting failure record. This provides me with a nice data structure representing the control flow of the failed search tree. It only required modifying about 3 lines of code and the resulting data structure is easier to analyze than a manual debugging sequence. (I hate working with debuggers, even good ones.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-7036401118033907358?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/7036401118033907358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=7036401118033907358' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7036401118033907358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7036401118033907358'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/05/representing-failure.html' title='Representing failure'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-7554904258800209317</id><published>2009-04-29T23:04:00.004-04:00</published><updated>2009-04-30T14:51:49.008-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='closure conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='existential types'/><title type='text'>Typed closure conversion</title><content type='html'>&lt;a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.86"&gt;Typed closure conversion&lt;/a&gt; is a really lovely explanation of the structure of a closure-converted function. Every closure has its own particular environment structure that binds the particular set of free variables that occur in its body. But this means that if you represent a closure directly as a pair of an environment record and a closed procedure (which is explicitly parameterized over the environment record), then the representations of functions that are supposed to have the same type can end up with incompatible environment types. For example, the program&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;let val y = 1&lt;br /&gt;in&lt;br /&gt;  if true then&lt;br /&gt;      λx.x+y&lt;br /&gt;  else&lt;br /&gt;      λz.z&lt;br /&gt;end&lt;/pre&gt;&lt;/blockquote&gt;converts naively to the transparent representation&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;let val y = 1&lt;br /&gt;in&lt;br /&gt;  if true then&lt;br /&gt;      (λ(env, x).x+#y(env), {y=y})&lt;br /&gt;  else&lt;br /&gt;      (λ(env,z).z, {})&lt;br /&gt;end&lt;/pre&gt;&lt;/blockquote&gt;The problem here is the type of the environment has leaked information about the internals of the procedure into the external interface. So &lt;a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.47.86"&gt;Minamide et al&lt;/a&gt; use existential types as a nice, lightweight type abstraction for hiding the environment layout as an abstract type. So you instead get the opaque representation&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;let val y = 1&lt;br /&gt;in&lt;br /&gt;  if true then&lt;br /&gt;      pack {y:int} with (λ(env,x).x+#y(env), {y=y})&lt;br /&gt;      as ∃t.((t × int) → int) × t&lt;br /&gt;  else&lt;br /&gt;      pack {} with (λ(env,z).z, {})&lt;br /&gt;      as ∃t.((t × int) → int) × t&lt;br /&gt;end&lt;/pre&gt;&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Update:&lt;/span&gt; fixed the types in the existentials-- since I'm using an uncurried representation the argument type is a pair, not an arrow type.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-7554904258800209317?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/7554904258800209317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=7554904258800209317' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7554904258800209317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7554904258800209317'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/04/typed-closure-conversion.html' title='Typed closure conversion'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-8513542986195310812</id><published>2009-04-18T15:59:00.004-04:00</published><updated>2009-04-18T16:10:30.563-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='systems'/><category scheme='http://www.blogger.com/atom/ns#' term='module name resolver'/><category scheme='http://www.blogger.com/atom/ns#' term='plt-scheme'/><title type='text'>PLT System Facilities (Software Components): Module name resolvers</title><content type='html'>Because of &lt;a style="font-family: courier new;" href="http://docs.plt-scheme.org/reference/Evaluation_and_Compilation.html#%28def._%28%28quote._%7E23%7E25kernel%29._eval%29%29"&gt;eval&lt;/a&gt;, one program's "compile time" is another program's run-time. Even though they are not first-class, this also applies to &lt;a href="http://calculist.blogspot.com/2009/02/plt-system-facilities-software_19.html"&gt;PLT Scheme modules&lt;/a&gt;, since they too can be dynamically compiled, loaded and linked. As I've described before, &lt;a href="http://calculist.blogspot.com/2009/03/plt-system-facilities-software.html"&gt;namespaces&lt;/a&gt; are the general construct for managing multiple instances of modules and maintaining their top-level bindings. But I still haven't described how dynamic invocation of modules happens.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/__OULbbSCQyc/SeozI7VfblI/AAAAAAAAADA/--888YIXyis/s1600-h/800-yellow-pages.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 200px; height: 106px;" src="http://3.bp.blogspot.com/__OULbbSCQyc/SeozI7VfblI/AAAAAAAAADA/--888YIXyis/s200/800-yellow-pages.jpg" alt="" id="BLOGGER_PHOTO_ID_5326125737778835026" border="0" /&gt;&lt;/a&gt;Module loading is managed by the system's &lt;a href="http://docs.plt-scheme.org/reference/Module_Names_and_Loading.html#%28tech._module._name._resolver%29"&gt;&lt;span style="font-style: italic;"&gt;module name resolver&lt;/span&gt;&lt;/a&gt;. The primary responsibility of the module name resolver is to map distinct but equivalent &lt;span style="font-style: italic;"&gt;references&lt;/span&gt; to modules into canonical forms. For example, it's possible to refer to the PLT Scheme &lt;a href="http://docs.plt-scheme.org/reference/strings.html#%28mod-path._scheme/string%29"&gt;string library&lt;/a&gt; with either of the two forms:&lt;br /&gt;&lt;blockquote&gt;&lt;pre&gt;(lib "string.ss" "scheme")&lt;br /&gt;scheme/string&lt;/pre&gt;&lt;/blockquote&gt;The standard module name resolver translates these to an absolute path to the module's source file in the filesystem.&lt;br /&gt;&lt;br /&gt;The other responsibilities of the standard module name resolver are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;to ensure that a module is only loaded once,&lt;/li&gt;&lt;li&gt;to make sure each module is loaded the first time it is needed, and&lt;/li&gt;&lt;li&gt;to check for and prevent cyclic loading dependencies between modules.&lt;/li&gt;&lt;/ul&gt;The module name resolver is a pretty low-level part of the PLT system. For the most part, programmers stick to using &lt;a href="http://docs.plt-scheme.org/reference/Module_Names_and_Loading.html#%28def._%28%28quote._%7E23%7E25kernel%29._dynamic-require%29%29"&gt;dynamic-require&lt;/a&gt; to interact with modules dynamically. This dynamically ensures a module is loaded and optionally selects one of its exports by name (by querying its &lt;a href="http://calculist.blogspot.com/2009/03/plt-system-facilities-software.html"&gt;namespace&lt;/a&gt;). But the module name resolver is directly accessible and can be dynamically invoked to ensure a module is loaded and resolve its name to canonical form. The module name resolver is even &lt;a href="http://docs.plt-scheme.org/reference/Module_Names_and_Loading.html#%28def._%28%28quote._%7E23%7E25kernel%29._current-module-name-resolver%29%29"&gt;configurable&lt;/a&gt;, and can be swapped out with a custom resolver--though I have not seen this done in user code.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-8513542986195310812?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/8513542986195310812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=8513542986195310812' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8513542986195310812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8513542986195310812'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/04/plt-system-facilities-software.html' title='PLT System Facilities (Software Components): Module name resolvers'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/__OULbbSCQyc/SeozI7VfblI/AAAAAAAAADA/--888YIXyis/s72-c/800-yellow-pages.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-4409130016126504439</id><published>2009-04-15T17:03:00.001-04:00</published><updated>2009-04-15T17:05:58.923-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SIGPLAN'/><category scheme='http://www.blogger.com/atom/ns#' term='publishing'/><title type='text'>Matthew Flatt running for SIGPLAN member-at-large</title><content type='html'>I like &lt;a href="http://www.acm.org/sigs/elections/SIGPLAN/MFlatt-MemberatLarge.pdf"&gt;Matthew's statement&lt;/a&gt;, so I want to call it out here:&lt;br /&gt;&lt;blockquote&gt;As a SIGPLAN member at large, I would be a voice for those who believe that conferences have become too important relative to journals. Our conferences have taken over the prestige that other disciplines reserve for journals, so that our conferences tend toward more conservative acceptances and more complex reviewing processes (including double-blind submission and author-response periods), which work against the goal of broadcasting new research directions and ambitious new ideas. In comparison, our journal system, which offers the time and expertise needed for the careful review of enduring results, is left under-used and under-supported (especially by paper referees) despite the admirable efforts of journal editors. I have no easy fixes, nor do I think that immediate radical change is appropriate, but I think we should do all we can to nudge the balance back in favor of journals.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-4409130016126504439?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/4409130016126504439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=4409130016126504439' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/4409130016126504439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/4409130016126504439'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/04/matthew-flatt-running-for-sigplan.html' title='Matthew Flatt running for SIGPLAN member-at-large'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-2798746552429273469</id><published>2009-04-07T19:22:00.002-04:00</published><updated>2009-04-07T19:31:17.642-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Subversion'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Memo to myself: directions for `svn unfail'</title><content type='html'>Sorry for this-- I keep losing this information so I'm just sticking this note to myself up here. Who knows, if other people run into this it might be of use to them, too.&lt;br /&gt;&lt;br /&gt;If you find you're inexplicable being asked to authenticate when doing an &lt;span style="font-family: courier new;"&gt;svn up&lt;/span&gt; and it won't accept your password, (particularly after renaming or moving a file in the repository), &lt;a href="http://subversion.tigris.org/issues/show_bug.cgi?id=3242#desc20"&gt;here's the solution&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;...if "svn up" doesn't work, you can make "svn switch" to the same url, it will update all with no problems.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-2798746552429273469?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/2798746552429273469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=2798746552429273469' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/2798746552429273469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/2798746552429273469'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/04/memo-to-myself-directions-for-svn.html' title='Memo to myself: directions for `svn unfail&apos;'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-1474089686207967311</id><published>2009-04-01T20:14:00.003-04:00</published><updated>2009-04-01T20:22:23.420-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='resource contention'/><title type='text'>Dear David Herman</title><content type='html'>Dear David Herman,&lt;br /&gt;&lt;br /&gt;We have the same name. You seem to think you have my gmail address. Periodically I get email intended for you. It may be that you're giving out my address to people--or so I imagine, because every so often, I also get a message from Google saying that someone is initiating the process to reset my password. Naturally, I don't proceed. I don't want to reset my password. I'd prefer you stopped trying to.&lt;br /&gt;&lt;br /&gt;I have no particular way of contacting you, because all I know is that your name is my name too, and I think you live in San Francisco (based on your mail that I've received). Which is all the more confusing, given that I spend a lot of time in the Bay Area. But I digress.&lt;br /&gt;&lt;br /&gt;Mr. Herman, I'm afraid we can't share this gmail account. You seem to like the version without a dot, whereas I prefer the version with a dot, but either way, &lt;a href="http://mail.google.com/support/bin/answer.py?hl=en&amp;amp;answer=10313#"&gt;Google says it's mine&lt;/a&gt;. Sorry. I got there first.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;David Herman&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-1474089686207967311?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/1474089686207967311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=1474089686207967311' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/1474089686207967311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/1474089686207967311'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/04/dear-david-herman.html' title='Dear David Herman'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-8733462885121739958</id><published>2009-03-31T12:11:00.003-04:00</published><updated>2009-03-31T12:17:58.934-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='equivalence'/><category scheme='http://www.blogger.com/atom/ns#' term='research landscape'/><category scheme='http://www.blogger.com/atom/ns#' term='figures'/><title type='text'>Your lambda-cube is puny.</title><content type='html'>&lt;a href="http://www.ccs.neu.edu/home/turon/"&gt;Aaron&lt;/a&gt; just showed me this mind-blowing figure from a paper by &lt;a href="http://theory.stanford.edu/%7Ervg/"&gt;van Glabbeek&lt;/a&gt; that attempts to &lt;a href="http://theory.stanford.edu/%7Ervg/abstracts.html#26"&gt;abstract the wide variety of notions of equivalence&lt;/a&gt; in the concurrency literature:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/__OULbbSCQyc/SdJB6JXcDlI/AAAAAAAAAC4/1GsrP7WuDFE/s1600-h/map2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 240px; height: 320px;" src="http://1.bp.blogspot.com/__OULbbSCQyc/SdJB6JXcDlI/AAAAAAAAAC4/1GsrP7WuDFE/s320/map2.png" alt="" id="BLOGGER_PHOTO_ID_5319386577080421970" border="0" /&gt;&lt;/a&gt;A moment of respectful silence, please.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-8733462885121739958?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/8733462885121739958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=8733462885121739958' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8733462885121739958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/8733462885121739958'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/03/your-lambda-cube-is-puny.html' title='Your lambda-cube is puny.'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/__OULbbSCQyc/SdJB6JXcDlI/AAAAAAAAAC4/1GsrP7WuDFE/s72-c/map2.png' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-7746762400087139154</id><published>2009-03-31T10:20:00.005-04:00</published><updated>2009-03-31T10:39:25.939-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='informal notation'/><title type='text'>Hand-writing derivations</title><content type='html'>I've come to prefer one particular approach to writing out a derivation tree by hand. I used to try to draw the tree by stacking up rules with horizontal separators à la Gentzen, but I could never judge how much space I would need--I'm not accustomed to filling a page bottom to top--and one page never seemed to be enough anyway.&lt;br /&gt;&lt;br /&gt;I've found that writing judgments top to bottom, indenting to represent nesting, is much more scalable. E.g.:&lt;br /&gt;&lt;blockquote&gt;⊢ (λ f.f 1) (λ x.x) : int&lt;br /&gt;&amp;emsp;&amp;emsp;⊢ (λ f.f 1) : (int → int) → int&lt;br /&gt;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;f : int → int ⊢ f 1 : int&lt;br /&gt;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;f : int → int ⊢ f : int → int&lt;br /&gt;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;f : int → int ⊢ 1 : int&lt;br /&gt;&amp;emsp;&amp;emsp;⊢ (λ x.x) : int → int&lt;br /&gt;&amp;emsp;&amp;emsp;&amp;emsp;&amp;emsp;x : int ⊢ x : int&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-7746762400087139154?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/7746762400087139154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=7746762400087139154' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7746762400087139154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/7746762400087139154'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/03/hand-writing-derivations.html' title='Hand-writing derivations'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-980317439121248698</id><published>2009-03-31T10:15:00.005-04:00</published><updated>2009-03-31T10:19:31.187-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='research progress'/><title type='text'>Make a miniature model first</title><content type='html'>I've been taught this time and time again, I've seen &lt;a href="http://www.soe.ucsc.edu/%7Ecormac/"&gt;Cormac&lt;/a&gt; do it repeatedly in the ECMAScript design process, I've been told by &lt;a href="http://www.ccs.neu.edu/home/wand"&gt;Mitch&lt;/a&gt; repeatedly to do it, but it still hasn't become instinct for me: when you're facing a dauntingly large system, it's incredibly helpful to start by extracting coherent but manageably small subsets of the design and model them first. It's amazing how well that works to make a system less terrifying to work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-980317439121248698?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/980317439121248698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=980317439121248698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/980317439121248698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/980317439121248698'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/03/make-miniature-model-first.html' title='Make a miniature model first'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-10770855.post-5041265152359618442</id><published>2009-03-16T20:12:00.004-04:00</published><updated>2009-03-16T21:18:26.439-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='systems'/><category scheme='http://www.blogger.com/atom/ns#' term='namespace'/><category scheme='http://www.blogger.com/atom/ns#' term='plt-scheme'/><title type='text'>PLT System Facilities (Software Components): Namespaces</title><content type='html'>So far I've described PLT Scheme's &lt;a href="http://calculist.blogspot.com/2009/02/plt-system-facilities-software.html"&gt;first-class component systems&lt;/a&gt;, as well as the second-class, static &lt;a href="http://calculist.blogspot.com/2009/02/plt-system-facilities-software_19.html"&gt;module system&lt;/a&gt;.  Of course, Scheme is a reflective language. Where there's &lt;a href="http://docs.plt-scheme.org/reference/Evaluation_and_Compilation.html#%28def._%28%28quote._%7E23%7E25kernel%29._eval%29%29"&gt;&lt;span style="font-family: courier new;"&gt;eval&lt;/span&gt;&lt;/a&gt;, there's not just one "compile time." Code can be compiled and evaluated at any time during the execution of a PLT Scheme virtual environment.&lt;br /&gt;&lt;br /&gt;Moreover, considering that one of the most important applications written in PLT Scheme--&lt;a href="http://www.plt-scheme.org/software/drscheme/"&gt;DrScheme&lt;/a&gt;--is an IDE, it's clearly important to be able to load and reload a single module multiple times. Users have to be able to edit a module and re-evaluate it without restarting the Scheme image. (In fact, it's even possible to run DrScheme from DrScheme, so it must even be possible to have multiple instances of the same module running concurrently!)&lt;br /&gt;&lt;br /&gt;Every instance of a module in a running PLT Scheme environment has associated with it a &lt;a href="http://docs.plt-scheme.org/reference/syntax-model.html#%28part._namespace-model%29"&gt;&lt;span style="font-style: italic;"&gt;namespace&lt;/span&gt;&lt;/a&gt;. Namespaces serve two somewhat orthogonal purposes. The first is to store top-level bindings. A module's namespace contains the mapping of its global definitions (some of which may be made available to other modules via &lt;a href="http://docs.plt-scheme.org/guide/module-provide.html"&gt;&lt;span style="font-family: courier new;"&gt;provide&lt;/span&gt;&lt;/a&gt;). There is also a namespace associated with the REPL, which can be dynamically modified; in DrScheme, that namespace is typically just the one associated with the current running instance of the module being edited. In a sense, this role of namespaces is to mediate between the static, segmented architecture of modules and the dynamic, global nature of the Scheme top-level. This is an interesting tension that comes in whenever designing a lexically scoped language with dynamic code evaluation such as with &lt;a href="http://docs.plt-scheme.org/reference/Evaluation_and_Compilation.html#%28def._%28%28quote._%7E23%7E25kernel%29._eval%29%29"&gt;&lt;span style="font-family: courier new;"&gt;eval&lt;/span&gt;&lt;/a&gt; or a REPL.&lt;br /&gt;&lt;br /&gt;The second purpose of namespaces is to maintain an internal &lt;a href="http://docs.plt-scheme.org/reference/syntax-model.html#%28tech._module._registry%29"&gt;&lt;span style="font-style: italic;"&gt;module registry&lt;/span&gt;&lt;/a&gt;, which keeps track of running instances of modules. Every namespace has its own registry, but registries may share instances. This is how it's possible both to create multiple, isolated instances of modules and to share module instances and their associated state.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/10770855-5041265152359618442?l=calculist.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://calculist.blogspot.com/feeds/5041265152359618442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=10770855&amp;postID=5041265152359618442' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5041265152359618442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/10770855/posts/default/5041265152359618442'/><link rel='alternate' type='text/html' href='http://calculist.blogspot.com/2009/03/plt-system-facilities-software.html' title='PLT System Facilities (Software Components): Namespaces'/><author><name>Dave Herman</name><uri>http://www.blogger.com/profile/00405190527081772997</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='14768204618405631677'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>