<div dir="ltr">Thanks!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 9, 2014 at 11:33 AM, David Van Horn <span dir="ltr"><<a href="mailto:dvanhorn@cs.umd.edu" target="_blank">dvanhorn@cs.umd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 5/9/14, 11:29 AM, Alexander McLin wrote:<br>
> Do you mind expanding on what MTWT stands for? I'm not familiar with this<br>
> paper and am curious.<br>
<br>
</div>Macros that Work Together<br>
<a href="http://www.eecs.northwestern.edu/~robby/pubs/papers/jfp2012-fcdf.pdf" target="_blank">http://www.eecs.northwestern.edu/~robby/pubs/papers/jfp2012-fcdf.pdf</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> On Thu, May 8, 2014 at 6:20 PM, John Clements <<a href="mailto:clements@brinckerhoff.org">clements@brinckerhoff.org</a>>wrote:<br>
><br>
>><br>
>> On May 8, 2014, at 3:00 PM, Ryan Culpepper <<a href="mailto:ryanc@ccs.neu.edu">ryanc@ccs.neu.edu</a>> wrote:<br>
>><br>
>>> IIRC, the typesetting of environment extension might suggest replacement<br>
>> in a mapping, but I believe it actually means 'cons' in an association<br>
>> list, and 'nostops' is one thing that relies on the latter implementation<br>
>> of the environment rather than the former.<br>
>><br>
>> Ah… so the model does in fact have the “uncovering” behavior I expected it<br>
>> to. In this case, I think that the text of the paper is mistaken; it says<br>
>><br>
>> nostops[xi] = {var -> transform | xi(var) = transform and transform !=<br>
>> STOP }<br>
>><br>
>> which certainly suggests to me that these mappings simply wouldn’t appear<br>
>> in the updated mapping.<br>
>><br>
>> Amazing how ambiguous formal syntax can be.<br>
>><br>
>> It seems like the right way to fix this would be to explicitly separate<br>
>> the environment xi into a mapping and a stop list—the ‘nostops’ definition<br>
>> would be trivial, but lookup in xi would get slightly uglier. Perhaps a<br>
>> footnote somewhere in the paper?<br>
>><br>
>> Anyway, thanks for clarifying.<br>
>><br>
>><br>
>><br>
>> John<br>
>><br>
>>><br>
>>> So an environment with 'lambda' in the stop list actually looks like<br>
>>><br>
>>> ((lambda STOP) (lambda FUN))<br>
>>><br>
>>> so when 'nostops' filters it, it produces<br>
>>><br>
>>> ((lambda FUN))<br>
>>><br>
>>> and the previous meaning of 'lambda' is restored.<br>
>>><br>
>>> Ryan<br>
>>><br>
>>><br>
>>> On 05/08/2014 04:58 PM, John Clements wrote:<br>
>>>> I’m reading through MTWT for the nth time, and this time I have a<br>
>> question about the ‘nostops’ metafunction, part of local expansion.<br>
>>>><br>
>>>> Specifically: ‘nostops’ takes an environment xi, and strips out<br>
>> everything bound to 'STOP’. This prevents the ’STOP’s from an enclosing<br>
>> local expand from being in force in this one. However, it seems to me that<br>
>> the ’nostops’ metafunction should restore the bindings that were in place<br>
>> before they were mapped to STOP. More specifically; suppose a local-expand<br>
>> specifies, say, ‘lambda’ as a STOP. This replaces the mapping from ‘lambda’<br>
>> to FUN with a mapping from ‘lambda’ to ’STOP’. Then, a nested local-expand<br>
>> uses a different stop-list, that doesn’t include ‘lambda’. If I’m reading<br>
>> the paper correctly, this local expansion would then take place in a ‘xi’<br>
>> where there was no binding for lambda at *all*, which would presumably lead<br>
>> to an error during that expansion.<br>
>>>><br>
>>>> I checked out the model, to see if this was a typesetting issue, but it<br>
>> seems pretty clear to me that the model linked to by the paper has exactly<br>
>> this property; it’s simply filtering the ‘xi’ environment to throw out<br>
>> things that were bound to STOP.<br>
>>>><br>
>>>> I tried to construct a racket program to illustrate my question, and<br>
>> here’s what I came up with:<br>
>>>><br>
>>>> #lang racket<br>
>>>><br>
>>>> (let-syntax ([boring (lambda (stx) (cadr (syntax->list stx)))])<br>
>>>><br>
>>>> (let-syntax ([a (lambda (stx)<br>
>>>> (local-expand (cadr (syntax->list stx))<br>
>>>> 'expression<br>
>>>> (list #'boring)))])<br>
>>>> (let-syntax ([b (lambda (stx)<br>
>>>> (local-expand (cadr (syntax->list stx))<br>
>>>> 'expression<br>
>>>> (list)))])<br>
>>>> (a (b (boring 34))))))<br>
>>>><br>
>>>> Unsurprisingly, this evaluated to the “correct” value, 34. This means<br>
>> that either the model doesn’t match Racket, or (more likely) I’m<br>
>> misunderstanding the model. Or possibl<br>
>>>><br>
>>>> Ah, what the heck; I’ll cc: the whole racket list. I’ll take help<br>
>> wherever I can get it :).<br>
>>>><br>
>>>> John<br>
>>>><br>
>>><br>
>><br>
>><br>
>> ____________________<br>
>> Racket Users list:<br>
>> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
>><br>
><br>
><br>
><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
><br>
<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br></div>