Thanks. The approach that worked best by far was to load just NewCompilerLoader, then do:<br>NewCompilerLoader new loadPackages.<br>Then to correct syntax errors as they came up. The first error that wasn&#39;t a simple extra full-stop halted the recompilation process (because I couldn&#39;t fix it), but enabling the options mentioned meant that blocks are now fully reentrant. Excellent!
<br><br><div class="gmail_quote">On Jan 23, 2008 12:26 AM, Mathieu Suen &lt;<a href="mailto:mathk.sue@gmail.com">mathk.sue@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Jan 23, 2008, at 1:00 AM, Marcin Tustin wrote:<br><br>&gt; So am I right in thinking that if I get newCompiler, blocks will<br>&gt; work as I would expect them to (like lambdas)?<br>&gt;<br>&gt; If so, how do I get the most recent version? I remember there being
<br>&gt; something that has superceded squeakmap, but I can&#39;t seem to find it.<br><br></div>You can find it on squeaksource.<br><a href="http://www.squeaksource.com/NewCompiler.html" target="_blank">http://www.squeaksource.com/NewCompiler.html
</a><br><br>You first need to load AST NewParser RefactoringEgine and SmaccRuntime.<br>In other to load them all you could use the NewCompilerLoader<br>availible one the NewCompiler squeaksource repository.<br>Simply invoke:
<br>NewCompilerLoader new loadPackage.<br><br>This will recompile the complete image using the NewCompiler.<br><br>To avoid the recompilation you can look at the loadPackage method.<br>You could also load the NewCompiler throw the Universe browser.
<br><br>After loading the compiler you have 2 way to compile code.<br><br>1. Use the NewCompiler but don&#39;t make full block closure. (Preference<br>browser section compile #compileUseNewCompiler)<br><br> &nbsp; &nbsp; &nbsp; &nbsp;In this mode the block still remain the same and temp are share
<br> &nbsp; &nbsp; &nbsp; &nbsp;among the home context. That the reason why you could not invoke<br> &nbsp; &nbsp; &nbsp; &nbsp;recursively a block.<br><br>2. Enable the block closure. (Preference browser section compile<br>#compileBlocksAsClosures)<br><br> &nbsp; &nbsp; &nbsp; &nbsp;With this preference the block while be transform in full block
<br>closure. You could then recursively<br> &nbsp; &nbsp; &nbsp; &nbsp;invoke a block. Block while then create a environment &nbsp;to store temps<br>whenever is needed.<br><br><br>HTH<br>Cheers,<br><div class="Ih2E3d"><br><br>&gt;<br>&gt;<br>&gt; On Jan 22, 2008 11:42 PM, Ben Goetter &lt;
<a href="mailto:goetter@mazama.net">goetter@mazama.net</a>&gt; wrote:<br>&gt; &gt;This is a maintenance nightmare waiting to happen. &nbsp;Use a proper<br>&gt; method call,<br>&gt;<br>&gt; Squeak Smalltalk blocks are just similar enough to Scheme lambdas
<br>&gt; that I still fall into this trap, too.<br>&gt;<br>&gt; (letrec ((carre (lambda (s1 s2 s3 s4 n)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (if (&gt; n 0)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(carre (segment s1 s2)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (segment s2 s3)
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (segment s3 s4)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (segment s1 s4)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (- n 1))))))<br>&gt; &nbsp;&#39;oops-must-remember-this-is-Squeak-not-Scheme)<br>&gt;<br>&gt; Ben
<br>&gt; _______________________________________________<br>&gt; Beginners mailing list<br>&gt; <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">
http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>&gt;<br></div>&gt; _______________________________________________<br><div class="Ih2E3d">&gt; Beginners mailing list<br>&gt; <a href="mailto:Beginners@lists.squeakfoundation.org">
Beginners@lists.squeakfoundation.org</a><br>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br><br></div> &nbsp; &nbsp; &nbsp; &nbsp;Mth
<br><br><br><br>_______________________________________________<br><div><div></div><div class="Wj3C7c">Beginners mailing list<br><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a>
<br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></div></div></blockquote></div><br>