[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The border crossing - integers in a ghetto
- From: Gavin Wraith <gavin@...>
- Date: Sat, 28 Jul 2018 12:14:13 +0100
In message <CABcj=tniVP-0vhACzCv7XtinecPkPPkj2w6rpMx=qYwRq2hkTg@mail.gmail.com>
Dirk Laurie <dirk.laurie@gmail.com> wrote:
>If you only intend to use those builds for programs you wrote
>completely by yourself, it may well be a good thing.
Myself, and just possibly a handful of other users of RISC OS.
>No more 2*math.pi, it's got to be 2.0*math.pi. Not even C demands that.
By way of mitigation, I have to say that I am a mathematician, a
category theorist. So the idea of testing the equality of things of
different type goes against my faith. Categorification is much
in vogue nowadays. Please take cum grano salis :)-.
>> I understand the reasons given for conflating integers with
>> numbers in the early days of Lua,
>
>They are still valid. Lua is a language used by 10-year old kids who
>play World of Warcraft.
Yes but we are not all 10-year old kids. It would cater for this 79-year
old kid too if there was a nice compilation flag to allow stricter typing of
numbers.
>> but I think they have the flavour of an expensive deception -- which is in fact
>> unnecessary.
>
>The phrase "expensive deception" has the flavour of political posturing.
You are quite right. Sorry about that. By expensive I meant that a lot
of hard work had gone into Lua. "Deception" is too strong. We all like
fairy tales, after all.
>The Lua 5.3 idea is: if you wish to exploit the special properties of
>the hardware representation of integers (such as bit operations) you
>can. If you don't, it is not necessary that you even know about
>integers.
Two related bees in my bonnet:
#1
RISC OS, with which there is no reason why you should be acquainted,
was developed by Acorn, specifically for the ARM (Acorn Risc Machines)
chip. They were joint projects. Acorn no longer exists, but RISC OS
lives on as a legacy OS for a group of aging enthusiasts.
The early ARM chips, to which RISC OS was tied until relatively
recently, were not well endowed in the hardware arithmetic department.
Floating point played no part in the implentation of RISC OS. That
was something Intel did, wasn't it ;)
#2
I grant you that floating point formats are convenient for engineers.
The dominance of IEEE floating point formats makes the general public
forget that there are other possible formats, which might be useful
for specific purposes. Interval arithmetic, lazy streams of integral
unimodular 2x2 matrices, finite fields, ... . But if I was into
number crunching I would not be using Lua and a Raspberry Pi.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/