TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: GARETH`S DOWNSTAIRS COMPU
from: THE NATURAL PHILOSOPHER
date: 2018-07-12 12:10:00
subject: Re: SIXTYFORTH?

On 12/07/18 10:21, Gareth's Downstairs Computer wrote:
> On 11/07/2018 22:17, The Natural Philosopher wrote:
>> Probably get a new generation of compilers that analyse bloatware and
>> completely rewrite it to work as intended, rather than as written...
>
> AIUI, because today's compilers apply and re-apply several layers
> of optimisation and do so regradless, that it is now well nigh
> impossible to code more effectively in assembler.

Indeed. Ceratinly the few times I have disasembled C code - or rather
compiled to assembler - I have been alarmed at how snart it is.

The last time I used assembler was to write a device driver that need to
access I/O ports. And then only a few lines of it.

>
> But that is not to say that assembler is not fun in an
> amateur environemnt, because staying close to an admirable
> complex machine is so rewarding!
>
>
There is an argument to say that all high level languahes are simply
better ways to write assembler, but there is another view, and that is
that all high level languages constrain you to write assembler in a
particular way - viz my example of a 'call table' that proved impossible
to code in C using the compilers to hand  at the time I tried.

I still dont know how to do it.

(an array of pointers to functions such that the function executed is
based on pointers whose index value is passed).

Likewise C cannot return more than one value from a function directly.
And yet typically there are a LOT of registers that can be used to
return values from functions


int, float, char gobble(char* text)
 {
 return (len(text),atof(text),text[1]);
 }


OUGHT to work

so that

  a,b,c=gobble("35.67");

is a valid statement

OTOH writing stack based temporary  data in assembler is horrendous. In
C it's trivial.

Hence my not as joky as you might think assertions that languages
designed to achieve results, not dictate how they are achieved, might be
the next step.

Neural net stuff. write code till the desired result is achieved in the
smallest footprint and the greatest speed.

There is an apocryphal story about someone who decided to use the
algorithm of 'perturb and optimise' on some CFD software that it was
hoped would replace wind tunnels. Adding in some structural strentgh and
stability calculations as well, he set the algorithm going with a cube.....

..and watched as the shape evolved into a seagull.




--
"Anyone who believes that the laws of physics are mere social
conventions is invited to try transgressing those conventions from the
windows of my apartment. (I live on the twenty-first floor.) "

Alan Sokal

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.