<div dir="ltr">Hi Tobias,<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 10:52 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eliot<br>
<div><div class="h5"><br>
On 21.11.2014, at 19:06, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi Tobias,<br>
&gt;<br>
&gt; On Fri, Nov 21, 2014 at 4:51 AM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; On 21.11.2014, at 13:44, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; On 21.11.2014, at 13:29, J. Vuletich (mail lists) &lt;<br>
&gt; &gt; <a href="mailto:juanlists@jvuletich.org">juanlists@jvuletich.org</a>&gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;&gt; Quoting Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;:<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; I&#39;d suggest BoxedDouble and ImmediateDouble as names for the concrete<br>
&gt; &gt; subclasses (*). Names do mean something. (**)<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; You&#39;re right about the FloatArray confusion. However, note that the<br>
&gt; &gt; IEEE standard calls it single and double. It&#39;s only C using &quot;float&quot; to mean<br>
&gt; &gt; &quot;single precision&quot;.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; I&#39;d name the abstract superclass Float, for readability, and the<br>
&gt; &gt; isFloat test etc. Also: &quot;Float pi&quot; reads a lot nicer than anything else. I<br>
&gt; &gt; don&#39;t see the need for having a deep LimitedPrecisionReal - Float -<br>
&gt; &gt; BoxedDouble/ImmediateDouble deep hierarchy now.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; If we ever add single-precision floats, we should name them<br>
&gt; &gt; BoxedSingle and ImmediateSingle. At that point we might want a Single<br>
&gt; &gt; superclass and a LimitedPrecisionReal supersuperclass, but we can cross<br>
&gt; &gt; that bridge when we get there.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; - Bert -<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; (*) Since we&#39;re not going to see the class names often, we could even<br>
&gt; &gt; spell it out as BoxedDoublePrecisionFloat and<br>
&gt; &gt; ImmediateDoublePrecisionFloat. Only half joking. It would make the relation<br>
&gt; &gt; to the abstract Float very clear.<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; (**) We could also try to make the names googleable. I was surprised<br>
&gt; &gt; to not get a good hit for &quot;boxed immediate&quot;. Only &quot;boxed unboxed&quot; finds it.<br>
&gt; &gt; Maybe there are two better words?<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; I very much agree with Bert. But I&#39;d suggest SmallDouble instead of<br>
&gt; &gt; ImmediateDouble for consistency with SmallInteger.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Then it would have to be LargeDouble for consistency with LargeInteger,<br>
&gt; &gt; too. Which I don&#39;t find compelling.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Also, with the 64 bit format we get many more immediate objects. There<br>
&gt; &gt; already are immediate integers and characters, floats will be the third,<br>
&gt; &gt; there could be more, like immediate points. For those, the small/large<br>
&gt; &gt; distinction does not make sense.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Maybe Eliot&#39;s idea of keeping &quot;Float&quot; in the name was best, but instead<br>
&gt; &gt; of &quot;small&quot; use &quot;immediate&quot;:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;       Float - BoxedFloat - ImmediateFloat<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;       A Float is either a BoxedFloat or an ImmediateFloat, depending on<br>
&gt; &gt; the magnitude of its exponent.<br>
&gt; &gt;<br>
&gt; &gt; I don&#39;t like the idea of putting a VM/Storage detail into the Class name.<br>
&gt; &gt; The running system itself does not care about whether Floats or Integers<br>
&gt; &gt; are<br>
&gt; &gt; boxed or immediate.<br>
&gt; &gt;<br>
&gt;<br>
&gt; I disagree.  I think at least Smalltalk-80 has a philosophy of lifting as<br>
&gt; much out of the VM into the system, and hiding it from clients via<br>
&gt; encapsulation.  So unlike many other VMs the compiler is in the system, the<br>
&gt; system explicitly separates SmallInteger, LargePositiveInteger and<br>
&gt; LargeNegativeInteger and implements large integer arithmetic with Smalltalk<br>
&gt; code that uses SmallIntegers.  Note that the primitives are an optional<br>
&gt; extra optimization that the VM does not need to implement.  So for me it is<br>
&gt; in keeping with the current system to use BoxedFloat and SmallFloat or<br>
&gt; BoxedDouble and SmallDouble.<br>
&gt;<br>
&gt; This lifting things up provides us with an extremely malleable system.<br>
&gt; Pushing things down into the VM does the opposite.<br>
&gt;<br>
<br>
</div></div>I can understand. It is however a tradeoff between abstraction and malleability.<br>
I&#39;d rather see everything done in Smalltalk. Yet primitives not exposing its<br>
innards.<br>
<br>
  I think I just can&#39;t have the cake and have it, too.<br></blockquote><div><br></div><div>yes, alas it is all about tradeoffs :-).  But that&#39;s great.  The more varieties the merrier.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
&gt;<br>
&gt;   For example in RSqueakVM (aka SPy) there is no immediate<br>
&gt; &gt; Integer whatsoever. Yes, tagged ints are read during image startup but they<br>
&gt; &gt; aren&#39;t subsequently represented as immediates or tagged ints after that.<br>
&gt; &gt;<br>
&gt;<br>
&gt; Well because it&#39;s implemented above RPython I guess it is using Python&#39;s<br>
&gt; bignum code directly.  That&#39;s fine but its a bit of a cheat.<br>
<br>
</span>I was talking of SmallInts here. There is no bignum code involved.<br>
On the RPython side, SmallIntegers are just objects that have a field<br>
that is not accessible from Smalltalk but keeps a machine-word integer.<br></blockquote><div><br></div><div>Hmmm, somewhere there&#39;s got to be a discrimination between SmallIntegers and other objects, right?  </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
&gt; &gt;   Just as input, in the Racket language and other Schemes,<br>
&gt; &gt; the equivalent to our SmallInterger/LargeInteger is fixnum/bignum<br>
&gt; &gt; and for floats they have flonums and &quot;extflonums&quot; (80bit).<br>
&gt; &gt;<br>
&gt; &gt; Best<br>
&gt; &gt;         -Tobias<br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>