From: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky)
Subject: Re: Matematical notation (was Goals, Cost, and Flexibility) 
Reply-To: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky)
Organization: Snake Island Research Inc, Toronto
Date: Tue, 6 Oct 92 17:29:29 GMT

In article <1992Oct5.105741.26289@bnr.co.uk> pgh@bnr.co.uk (Peter Hamer) writes:
>In the referenced article izahi@bsc.no (Raul Izahi Lopez Hernandez) writes:
>>In article <1992Sep29.232852.22456@CS.ORST.EDU> crowl@jade.CS.ORST.EDU (Lawrence Crowl) writes:
>>>>This is one of the problems with the current HLLs, the inability to use
>>>>"mathematical" type notation.
>>>
>
>I desperately want to be able to code at a suitable level of abstraction,
>and maths has traditionally done this. However transcribing formulae from
>books can be difficult ...

Have a look at J. You can ftp it from watserv1.waterloo.edu, from
/languages/apl. Books and references are available from Iverson Software
Inc, 33 Major St., Toronto, Canada for cheap ($24 or so).


>
>1) Maths, and physics, has tended to use single-letter names for variables.
>   [Often using multiple fonts and alphabets as they run out of names.] It
>   is difficult to see how the current layout rules generalise to longer
>   variable names.

That old "user-convenience feature" of eliding the multiply sign comes
back to haunt...

>
>3) Often excessively subtle clues are given to indicate important facts.
>   The thickness of the blanks indicates if `cos abcd' means (cos(a*b))*c*d
>   or any of the other potential parsings. Deciding where summations,
>   integrals, etc end can be similarly difficult.

Very hard on blackboards as well as in books. This is why there is a big
advantage in abandoning de facto rules on evaluation precedences. The 
other big win on abandoning those rules is that you don't have MEMORIZE
Big Tables of them, only to screw them up in your most critical application.
J, like APL, says a function is a function is a function. 

>   *Many* times I have had to re-derive a published formula to understand
>   how it should be parsed.
>
>4) The notation used in any particular book is often, at least in part,
>   unique to that book. This is probably also true of the type-setting rules.

And, sometimes, they even document what it is..

>So. I would like to be able to code in the most appropriate notation.
>Often this will be maths-like. To do so properly would require at least
>the layout facilities of something like [La]TeX; and [La]TeX source is
>hardly the model of clarity [I use it, its the best game in town]. Even
>then traditional maths type-setting rules probably do not always make the
>meaning of the formula sufficiently clear (this may not be true if you are
>a professional typesetter), and the current type-setting rules almost
>certainly break-down for `long' names.

I have not tried this, but it might be interesting to generate LaTeX
from J scripts. 
Bob



Robert Bernecky      rbe@yrloc.ipsa.reuter.com  bernecky@itrchq.itrc.on.ca 
Snake Island Research Inc  (416) 368-6944   FAX: (416) 360-4694 
18 Fifth Street, Ward's Island
Toronto, Ontario M5J 2B9 
Canada
Xref: sparky comp.lang.misc:3211 comp.sources.d:1317 comp.archives.admin:431 news.answers:3293