[tex-live] Fortran and Pascal sources

George N. White III gnwiii at gmail.com
Tue Oct 5 13:16:39 CEST 2010

On Mon, Oct 4, 2010 at 12:34 PM, Nelson H. F. Beebe <beebe at math.utah.edu> wrote:

> On the subject of additional software for TeX Live in Fortran and C, I
> offer these observations:
> (1) Apple has never, to my knowledge, in 25+ years in business shipped
>    a Fortran compiler on Mac OS (1, 2, ..., 9, X).  While Fortran
>    compilers are commercially available, most Mac users are not
>    capable of building GNU gfortran from source code.
>    Apple does not even include a C compiler by default in Mac OS X;
>    the separate XCode distribution is needed to get it, and recently,
>    access to that package has been restricted to registered Apple
>    developers.
>    Binary distribution sources, like fink, may not be suitable at
>    many sites, both because of unfamiliarity, and because they may
>    interfere with locally installed software (we have had Macs since
>    their introduction in 1984, and don't use fink at all).

Despite these obstacles, there are many people using R on Mac OS X, and
in my experience, a great many R users also use MacTeX.

> (2) Pascal compilers are not available on most current Unix
>    distributions.  While GNU Pascal is in principle available in
>    source form, it is difficult to build.  I have it on SPARC
>    Solaris, GNU/Linux (AMD64 and IA-32) and MirBSD IA-32, but it is
>    absent from 20+ other platforms in my test lab.
> The poor support of Pascal on Unix was why a manual Pascal-to-C
> translation was first carried out in the mid-1980s by Pat Monardo at
> Berkeley, and later, that work was automated by the development of the
> Web(Pascal)-to-C translator used since then in the TeX world.
> However, that translator handles only the subset of Pascal that the
> Stanford TeX Project adopted for their work on TeX, Metafont, and
> related utilities.
> By contrast, C (for all of its many faults) is extremely well
> supported on all modern platforms, and has become the default
> implementation language for most of the world's free software.  In
> addition, multiple compilers are available on some of the more popular
> platforms: I have at least 8 such compilers on GNU/Linux AMD64
> systems.
> C++, Java, Fortran, and Ada, see much less application in the free
> software area, and C++ in particular introduces significant
> portability barriers (GNU groff (troff clone) and James Clark's sgmls
> SGML parser are two significant packages written in C++, but I shudder
> whenever I have to try to build and install new versions).
> Outside of important mathematical libraries (e.g., LAPACK), Fortran's
> only major use in the free software world seems to be in the R
> statistical language, which uses both Fortran and C in the
> implementation of its thousands of packages.  There too, portability
> often suffers.

And you end up with lower quality C implementations of fragments that
are available in LAPACK, etc.

> Therefore, please consider very carefully whether it is wise to
> introduce into the TeX Live distribution any software written in
> Pascal or Fortran that cannot be handled by the existing X-to-C
> translation facilities.
> I have builds running now of the latest Free Pascal compiler release
> on all of my systems to find out whether its portability has improved
> since I last tried it several years ago.

Even if Pascal can be made to work, it doesn't have the large body of
high quality code that is available in Fortran.

If you are only thinking of one TeX Live package, then the effort needed to
support Fortran probably doesn't offer enough to offset the work needed.
If, however, you think of TeX as part of a larger open source software
then Fortan can't be ignored.   Supporting Fortran for one project today
may eventually pay dividends when (lua)TeX programmers find uses for
routines available in the enormous body of Fortran code.

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the tex-live mailing list