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't a simple extra full-stop halted the recompilation process (because I couldn'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 <<a href="mailto:mathk.sue@gmail.com">mathk.sue@gmail.com</a>> 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>> So am I right in thinking that if I get newCompiler, blocks will<br>> work as I would expect them to (like lambdas)?<br>><br>> If so, how do I get the most recent version? I remember there being
<br>> something that has superceded squeakmap, but I can'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't make full block closure. (Preference<br>browser section compile #compileUseNewCompiler)<br><br> In this mode the block still remain the same and temp are share
<br> among the home context. That the reason why you could not invoke<br> recursively a block.<br><br>2. Enable the block closure. (Preference browser section compile<br>#compileBlocksAsClosures)<br><br> With this preference the block while be transform in full block
<br>closure. You could then recursively<br> invoke a block. Block while then create a environment to store temps<br>whenever is needed.<br><br><br>HTH<br>Cheers,<br><div class="Ih2E3d"><br><br>><br>><br>> On Jan 22, 2008 11:42 PM, Ben Goetter <
<a href="mailto:goetter@mazama.net">goetter@mazama.net</a>> wrote:<br>> >This is a maintenance nightmare waiting to happen. Use a proper<br>> method call,<br>><br>> Squeak Smalltalk blocks are just similar enough to Scheme lambdas
<br>> that I still fall into this trap, too.<br>><br>> (letrec ((carre (lambda (s1 s2 s3 s4 n)<br>> (if (> n 0)<br>> (carre (segment s1 s2)<br>> (segment s2 s3)
<br>> (segment s3 s4)<br>> (segment s1 s4)<br>> (- n 1))))))<br>> 'oops-must-remember-this-is-Squeak-not-Scheme)<br>><br>> Ben
<br>> _______________________________________________<br>> 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>><br></div>> _______________________________________________<br><div class="Ih2E3d">> 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><br></div> 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>