<html><body bgcolor="#FFFFFF"><div>Ooh, I'm liking 4! I didn't know there were C compilers with built-in support for closures. I'm going to have to google on that.&nbsp;<br><br>On Oct 5, 2010, at 10:43 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div>Hi Casey,<br><br><div class="gmail_quote">On Tue, Oct 5, 2010 at 9:04 AM, Casey Ransberger <span dir="ltr">&lt;<a href="mailto:casey.obrien.r@gmail.com"><a href="mailto:casey.obrien.r@gmail.com">casey.obrien.r@gmail.com</a></a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
&nbsp;<br><div bgcolor="#FFFFFF"><div>If you could make Slang suck less, what would you change?<br></div></div></blockquote><div><br></div><div>Four ideas:</div><div><br></div><div>1. a ground-up rewrite to clean up the code, and remove all the hacks, using method tags for metadata and eliminating class side things like mustBeGlobal:. &nbsp;The inlining code is particularly difficult to understand and modify. &nbsp;Inlining doesn't unify variables elegantly, introducing way too many copies. &nbsp;Lots of this could be cleaned up. &nbsp;Some type analysis (see below) would help.</div>
<div><br></div><div>2. generate code from an initialized instance (of Interpreter, StackInterpreter, CoInterpreter etc) which I expect will significantly simplify things like declareCVarsIn:, and would provide type analysis with a lot to go on.</div>
<div><br></div><div>3. replace the default object type sqInt with both an immediate type for SmallInteger (&amp; eventually Character &amp; SmallFloat) and a proper oop struct type that accesses header fields via message sends to the oop, not via bit masks applied by the Interpreter (see e.g. CogMethod CogBlockMethod and their simulators&nbsp;CogBlockMethodSurrogate32 et al).</div>
<div><br></div><div>4. start migrating to C compilers that have support for closures so the VM can be rewritten using Smalltalk control structures.</div><div><br></div><div>best,</div><div>Eliot</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div bgcolor="#FFFFFF"><div><br>On Oct 4, 2010, at 8:47 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank"><a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a></a>&gt; wrote:<br><br></div><div></div><blockquote type="cite">
<div><span></span></div></blockquote><blockquote type="cite"><div><br><br><div class="gmail_quote">On Mon, Oct 4, 2010 at 1:04 PM, Colin Putney <span dir="ltr">&lt;<a href="mailto:colin@wiresong.com" target="_blank"></a><a href="mailto:colin@wiresong.com" target="_blank"><a href="mailto:colin@wiresong.com">colin@wiresong.com</a></a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
On Mon, Oct 4, 2010 at 11:56 AM, Andreas Raab &lt;<a href="mailto:andreas.raab@gmx.de" target="_blank"></a><a href="mailto:andreas.raab@gmx.de" target="_blank"><a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a></a>&gt; wrote:<br>
<br>
&gt; In practice, there is a *huge* advantage for porting if all you need is a C<br>
&gt; compiler and a bit of knowledge about the underlying OS support.<br>
<br>
</div>This brings up a question that I've been wondering about for a while.<br>
How useful is Slang these days?<br>
<br>
I can totally see how it would have been faster to get the new VM up<br>
and running in Apple Smalltalk in the first place, but I'm wondering<br>
if these days it's more trouble than it's worth. Most dynamic<br>
languages (eg, Ruby, Python, Perl, Javascript) are implemented in<br>
straight, idiomatic C and benefit a lot from the fact that many, many<br>
people already have the skills needed to work with the language and<br>
toolchain.<br>
<br>
In contrast, the Squeak VM is written in a language that almost nobody<br>
knows, using tools that almost nobody understands. Outside of the<br>
current maintainers it's a very short list, and many of the people on<br>
it aren't active in the community anymore. "Implemented in its self"<br>
is kind of neat, but as a practical matter, Slang is not Smalltalk,<br>
and a developer skilled in both C and Smalltalk still has a lot to<br>
learn before he can contribute to the VM.<br>
<br>
So here's a question to the folks that are actively hacking on the VM:<br>
is Slang still beneficial in your day-to-day work? Do you write and<br>
debug using the simulator? Is it worth the high barriers to entry for<br>
the uninitiated?<br></blockquote><div><br></div><div>Slang sucks. Developing in Smalltalk is great. &nbsp;I like using Slang to being continually hit over the head by an ungiving guru; plenty of pain but no enlightenment. &nbsp;The problem is you write Smalltalk that works, push it out and when it doesn't work due to some internal Slang issue you're in a lot of pain. &nbsp;Do you try and fix Slang, do you mangle your Smalltalk to function within its limitations (and forget to comment why, e.g. :: &nbsp;</div>

<div><br></div><div><div>loadNewPlugin: pluginString</div><div><span style="white-space:pre-wrap">        </span>| plugin plugins simulatorClasses |</div><div><span style="white-space:pre-wrap">        </span>transcript cr; show: 'Looking for module ', pluginString.</div>

<div><span style="white-space:pre-wrap">        </span>"but *why*??"</div><div><span style="white-space:pre-wrap">        </span>(#('FloatArrayPlugin' 'Matrix2x3Plugin') includes: pluginString) ifTrue:</div>
<div><span style="white-space:pre-wrap">                </span>[transcript show: ' ... defeated'. ^nil].</div></div><div><br></div><div>Seriously, if anyone knows why these two are disabled *please* let me know.</div>
<div><br></div><div>Yes I write and debug using the simulator. &nbsp;Yes it is worth the high barriers. &nbsp;But Slang is still a massive, fragile hack.</div><div><br></div><div>HTH</div><div>Eliot</div><div><br></div><div><br></div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888"><br>
Colin<br>
</font></blockquote></div><br>
</div></blockquote></div><br></blockquote></div><br>
</div></blockquote></body></html>