[M3devel] LongrealType missed, was: Re: "FreeBSD4" false advertising

Olaf Wagner wagner at elegosoft.com
Wed Jul 14 12:55:16 CEST 2010


Quoting Mika Nystrom <mika at async.async.caltech.edu>:

> Argh is it really necessary to break source compatibility here?
>
> I also don't like that I as a client have to import IEEE things when all
> I want is "LONGREAL" (and let Modula-3 do whatever it wants with that).
>
> I would propose at least having an interface LongrealType with
>
> CONST Hash = Longreal.Hash
>
> etc. so as not to force clients to import all the nitty-gritty about
> various floating point representations.  And so as not to break source
> compatibility!  If I change this by removing Type, my code will no longer
> compile with the old compilers....

Hm, I'm a little bit out of context here...
What was the reason for this change? It seems nobody else has bothered
so far.

This was the commit in question:

2009-12-23 21:43  hosking

   * m3-libs/: m3core/src/m3makefile, libm3/src/types/ASCII.i3,
     libm3/src/types/ASCII.m3, libm3/src/types/Boolean.i3,
     libm3/src/types/Boolean.m3, libm3/src/types/COPYRIGHT-CMASS,
     libm3/src/types/Char.i3, libm3/src/types/Char.m3,
     libm3/src/types/Int32.i3, libm3/src/types/Int32.m3,
     libm3/src/types/Int64.i3, libm3/src/types/Int64.m3,
     libm3/src/types/Integer.i3, libm3/src/types/Integer.m3,
     libm3/src/types/Longint.i3, libm3/src/types/Longint.m3,
     libm3/src/types/LongrealType.i3, libm3/src/types/LongrealType.m3,
     libm3/src/types/RealType.i3, libm3/src/types/RealType.m3,
     libm3/src/types/Refany.i3, libm3/src/types/Refany.m3,
     libm3/src/types/Unicode.i3, libm3/src/types/Unicode.m3,
     libm3/src/types/WideChar.i3, libm3/src/types/WideChar.m3,
     libm3/src/types/m3makefile, m3core/src/float/Common/Extended.m3,
     m3core/src/float/Common/LongReal.m3, m3core/src/float/Common/Real.m3,
     m3core/src/float/IEEE/Extended.i3, m3core/src/float/IEEE/LongReal.i3,
     m3core/src/float/IEEE/Real.i3, m3core/src/float/VAX/Extended.i3,
     m3core/src/float/VAX/LongReal.i3, m3core/src/float/VAX/Real.i3:

   Move libm3/src/types into m3core.
   Note that LongrealType and RealType have been folded into m3core/src/float.
   Clients will need adjustment.

Any comments?

Olaf

>    Mika
>
> Jay K writes:
>>
>> Remove "Type" it appears.
>>
>>
>> http://modula3.elegosoft.com/cm3/ChangeLog-2009
>>
>> search for "clients will need".
>>
>> e.g.
>>
>> +++ cm3/m3-demo/mentor/src/binpack/m3makefile	2009/12/23 22:05:06	1.2
>> @@ -10=2C7 +10=2C7 @@
>> =20
>> import    ("zeus")
>> =20
>> -list      ("Real"=2C "RealType")
>> +list      ("Real"=2C "Real")
>> =20
>> zume      ("Binpack")
>> oblume    ("Binpack"=2C "myview")
>>
>> --- cm3/m3-demo/mentor/src/binpack/RealList.i3	2001/01/13 14:18:20	1.1
>> +++ cm3/m3-demo/mentor/src/binpack/RealList.i3	2009/12/23 22:05:05	1.2
>> @@ -2=2C4 +2=2C4 @@
>> (* Distributed only by permission. *)
>> (* Last modified on Fri Jul  9 16:36:47 PDT 1993 by mhb *)
>> =20
>> -INTERFACE RealList =3D List(RealType) END RealList.
>> +INTERFACE RealList =3D List(Real) END RealList.
>>
>> --- cm3/m3-demo/mentor/src/binpack/RealList.m3	2001/01/13 14:18:20	1.1
>> +++ cm3/m3-demo/mentor/src/binpack/RealList.m3	2009/12/23 22:05:06	1.2
>> @@ -2=2C4 +2=2C4 @@
>> (* All rights reserved.                                        *)
>> (* See the file COPYRIGHT for a full description.              *)
>> =20
>> -MODULE RealList =3D List(RealType) END RealList.
>> +MODULE RealList =3D List(Real) END RealList.
>>
>> =A0- Jay
>>
>> ----------------------------------------
>>> To: wagner at elegosoft.com
>>> CC: jay.krell at cornell.edu=3B mika at async.caltech.edu
>>> Subject: Re: [M3devel] "FreeBSD4" false advertising
>>> Date: Wed=2C 14 Jul 2010 03:05:25 -0700
>>> From: mika at async.async.caltech.edu
>>>
>>> I'm not actually sure I understand the intent of the changes in this area=
>> .
>>>
>>> My old m3makefile has:
>>>
>>> Table("TextLongReal"=2C "Text"=2C "LongrealType")
>>>
>>> What am I supposed to use now?
>>>
>>> Mika
>>>
>>> Mika Nystrom writes:
>>> >Olaf Wagner writes:
>>> >>Quoting Mika Nystrom :
>>> >>
>>> >>> Hi Jay=2C Olaf=2C
>>> >>>
>>> >>> I actually built everything! After backing out some of my changes
>>> >>> that I had tried to get 5.8.6-REL to build with=2C it worked=2C and m=
>> entor
>>> >>> ran=2C even.
>>> >>
>>> >>Great! So it's still possible to build cm3 on FreeBSD 4=2C though
>>> >>not our release code.
>>> >
>>> >The differences relative to the current CVS head are very minor.
>>> >
>>> >1. Added FreeBSD4 to thread.quake as a non-pthread platform
>>> >
>>> >2. got rid of the -m32 flags in FreeBSD4.conf
>>> >
>>> >Everything else that needed to change I think Jay has managed to put in
>>> >the CVS head.
>>> >
>>> >>
>>> >>> But... what happened to libm3/src/types? Building my own code I get
>>> >>> the following errors:
>>> >>>
>>> >>> new source -> compiling LRInterval.i3
>>> >>> "../FreeBSD4/LRInterval.i3 =3D3D> ../src/Interval.ig"=2C line 5: unab=
>> le to =3D20
>>> >>> find interface (LongrealType)
>>> >>> 1 error encountered
>>> >>>
>>> >>> I can't find LongrealType anywhere=2C do I have a broken checkout? We=
>> ll=2C it
>>> >>> is in one place=2C in "doc". (Same for RealType=2C maybe others?)
>>> >>
>>> >>See =3D20
>>> >>http://modula3.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/libm3/src/t=
>> ypes/=3D
>>> >>Attic/LongrealType.i3
>>> >
>>> >Surely this is wrong?? I am looking for an interface that has T =3D
>>> >LONGREAL=2C not something that lets me muck around with the representati=
>> on
>>> >of IEEE=2C VAX=2C etc.=2C floating-point formats.
>>> >
>>> >Why is it even in m3core? This seems clearly like libm3 stuff.. I notice=
>> d
>>> >Boolean.i3 also moved.
>>> >
>>> >Also if there is no importable interface called LongrealType that is goi=
>> ng
>>> >to cause endless problems with source that is supposed to compile under
>>> >different versions of Modula-3. Even relatively recent CM3s required
>>> >you to use LongrealType to instantiate generics.
>>> >
>>> > Mika
>> 		 	   		  =
>



-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list