Computer Old Farts Forum
 help / color / mirror / Atom feed
* [COFF] Happy birthday, John Backus!
@ 2019-12-03  7:55 dave
  2019-12-03 13:44 ` clemc
  2019-12-03 19:20 ` cym224
  0 siblings, 2 replies; 16+ messages in thread
From: dave @ 2019-12-03  7:55 UTC (permalink / raw)


As every computer programmer should know, John Backus was emitted in 1924; he 
gave us the BNF syntax, but the sod also gave us that FORTRAN obscenity... 
Trivia: there is no way that FORTRAN can be described in any syntax; it is 
completely ad-hoc.

-- Dave


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03  7:55 [COFF] Happy birthday, John Backus! dave
@ 2019-12-03 13:44 ` clemc
  2019-12-03 15:57   ` toby
                     ` (2 more replies)
  2019-12-03 19:20 ` cym224
  1 sibling, 3 replies; 16+ messages in thread
From: clemc @ 2019-12-03 13:44 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5257 bytes --]

On Tue, Dec 3, 2019 at 2:56 AM Dave Horsfall <dave at horsfall.org> wrote:

> As every computer programmer should know, John Backus was emitted in 1924;
> he
> gave us the BNF syntax, but the sod also gave us that FORTRAN obscenity...
>
Be careful, Fortran still pays a lot of bills (I like to say that it has
paid my salary for nearly 45 years and I don't program in it - I'm an OS
guy). But Fortran >>is<< the #1 language for anything scientific and I
don't think that is going away in the future or really change its position
in popularity for a number of reasons (my analog is the QWERTY keyboard -
that ship has sailed and it's not economically interesting). There are a
number of places to check this out, but try looking at Archer AC Code Status
<http://www.archer.ac.uk/status/codes/>, which is an interesting HPC usage
site in the UK. Note that Fortran is by far the leading programming
language used for ‘production’ (there are other sites that offer similar
data, I'll leave it to the reader to find them).

Trivia: there is no way that FORTRAN can be described in any syntax; it is
> completely ad-hoc.

Again, be careful with such observations.  First off, I'm fairly sure that
the Intel Compiler teams (ifort
<https://software.intel.com/en-us/fortran-compilers>) use a parser
generator for parts of the ifort front-end. (Paul W might know more details
as he once worked in that technology).  As I understand it, the front-end
does have a number of special cases in it, so your observation is partially
true, but the language definition is not 'completely ad-hoc'.

The facts are that the language my father learned in the early 1960s
(FORTRAN-II) and the language I learned in the late 60's/early 1970s
(FORTRAN-IV) are not the same language as today's Fortran-2018, i.e. the
language definition has hardly been static. Said in another way, about a
year ago, a new standard for Fortran 2018 standard was released – see Fortran
2018 (Formerly Fortran 2015)  <https://wg5-fortran.org/f2018.html> and
it actually
offers support for ‘modern’ ideas such as object-oriented programming:
Object-oriented
programming in Fortran Wiki
<http://fortranwiki.org/fortran/show/Object-oriented+programming>
.

FWIW: I tried to explain some of these ideas pictorially in my Quora
answer: Clem Cole's answer to Is Fortran obsolete?
<https://www.quora.com/Is-Fortran-obsolete/answer/Clem-Cole> This is not to
denigrate other languages like Julia, Tensorflow etc. But the fact is that
the hammer has been improved and the *ways the nails are delivered has
changed*, but the *fundamental action provided* (fastening for nails and
scientific computation in the case of Fortran) has been unchanged because
it has proven to be the one of the best, if not the best to do the job it
is designed to do.

That said, I offer the following code snippet, which my Intel 2018
compatible compiler accepts without any switches.  Which is really a
remarkable comment about the women and men in the front-end team:

C    This FORTRAN program may be compiled and run on a Norsk Data
C    computer running SINTRAN and the FTN compiler.  It uses only
C    FORTRAN reserved words, and contains just one numerical
C    constant, in a character string (a format specifier).  When
C    you run it, it prints a well known mathematical construct...
C
C    Even FORTRAN is a block structured programming language:
C
      PROGRAM
     ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
     AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
     R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
     *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
     XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
     LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
      END
      SUBROUTINEFUNCTIO
     ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
     A,CALL,ASSIGN,CHARACTER);RETURN
      END
      SUBROUTINESUBROUTINE(IMPLICIT,L
     LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
     IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
     ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
     ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
     XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
     IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
     =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
      END
Running the program should yield:
                           1
                         1   1
                       1   2   1
                     1   3   3   1
                   1   4   6   4   1
                 1   5  10  10   5   1
               1   6  15  20  15   6   1
             1   7  21  35  35  21   7   1
           1   8  28  56  70  56  28   8   1
         1   9  36  84 126 126  84  36   9   1
       1  10  45 120 210 252 210 120  45  10   1
     1  11  55 165 330 462 462 330 165  55  11   1
   1  12  66 220 495 792 924 792 495 220  66  12   1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191203/a6743ea2/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03 13:44 ` clemc
@ 2019-12-03 15:57   ` toby
  2019-12-03 16:05     ` lars
  2019-12-04  5:41   ` wobblygong
  2019-12-05 17:03   ` tih
  2 siblings, 1 reply; 16+ messages in thread
From: toby @ 2019-12-03 15:57 UTC (permalink / raw)


On 2019-12-03 8:44 a.m., Clem Cole wrote:
> 
> 
> On Tue, Dec 3, 2019 at 2:56 AM Dave Horsfall <dave at horsfall.org
> <mailto:dave at horsfall.org>> wrote:
> 
>     As every computer programmer should know, John Backus was emitted in
>     1924; he
>     gave us the BNF syntax, but the sod also gave us that FORTRAN
>     obscenity...
> 
> Be careful, Fortran still pays a lot of bills 


We do this back and forth EVERY YEAR, guys.

--Toby



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03 15:57   ` toby
@ 2019-12-03 16:05     ` lars
  0 siblings, 0 replies; 16+ messages in thread
From: lars @ 2019-12-03 16:05 UTC (permalink / raw)


Toby Thain wrote:
> We do this back and forth EVERY YEAR, guys.

Better uphold that time-honored tradition!


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03  7:55 [COFF] Happy birthday, John Backus! dave
  2019-12-03 13:44 ` clemc
@ 2019-12-03 19:20 ` cym224
  1 sibling, 0 replies; 16+ messages in thread
From: cym224 @ 2019-12-03 19:20 UTC (permalink / raw)


On 12/03/19 02:55, Dave Horsfall wrote:
> As every computer programmer should know, John Backus was emitted in 
> 1924; he gave us the BNF syntax, but the sod also gave us that FORTRAN 
> obscenity... 

A few decades ago, I applied for a job in a place that used VAX FORTRAN 
and I knew only a bit FORTRAN II.  Knowing several imperative languages, 
I told them that I knew it, bought the book "FORTRAN Tools for VAX/VMS 
and MS-DOS", and read it in a week, blown away about how far VAX FORTRAN 
was from FORTRAN II.  It was actually quite reasonable.

N.



^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03 13:44 ` clemc
  2019-12-03 15:57   ` toby
@ 2019-12-04  5:41   ` wobblygong
  2019-12-04 14:54     ` clemc
  2019-12-04 15:14     ` clemc
  2019-12-05 17:03   ` tih
  2 siblings, 2 replies; 16+ messages in thread
From: wobblygong @ 2019-12-04  5:41 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7226 bytes --]

I've just run that little program through gfortran without switches
(naming it pyramid.for) and it comes up with:

pyramid.for:25:6:

      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
      1
Error: Bad continuation line at (1)
pyramid.for:12:9:

      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
         1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:23:56:

      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
                                                        1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:25:52:

      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
                                                    1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:26:43:

      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
                                           1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:27:62:

      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
                                                              1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:23:34:

      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
                                  1
Warning: Deleted feature: Loop variable at (1) must be integer
pyramid.for:15:17:

      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
                 1
Warning: Rank mismatch in argument ‘implicit’ at (1) (rank-1 and
scalar) [-Wargument-mismatch]

I think gfortran must have '--strict' on by default. I might try it
with the OpenWatcom Fortran compiler next - if it'll install on my
current Linux box.

Just out of interest, what is your current Fortran 2018 compiler?

Wesley Parish

On 12/4/19, Clem Cole <clemc at ccc.com> wrote:
> On Tue, Dec 3, 2019 at 2:56 AM Dave Horsfall <dave at horsfall.org> wrote:
>
>> As every computer programmer should know, John Backus was emitted in
>> 1924;
>> he
>> gave us the BNF syntax, but the sod also gave us that FORTRAN
>> obscenity...
>>
> Be careful, Fortran still pays a lot of bills (I like to say that it has
> paid my salary for nearly 45 years and I don't program in it - I'm an OS
> guy). But Fortran >>is<< the #1 language for anything scientific and I
> don't think that is going away in the future or really change its position
> in popularity for a number of reasons (my analog is the QWERTY keyboard -
> that ship has sailed and it's not economically interesting). There are a
> number of places to check this out, but try looking at Archer AC Code
> Status
> <http://www.archer.ac.uk/status/codes/>, which is an interesting HPC usage
> site in the UK. Note that Fortran is by far the leading programming
> language used for ‘production’ (there are other sites that offer similar
> data, I'll leave it to the reader to find them).
>
> Trivia: there is no way that FORTRAN can be described in any syntax; it is
>> completely ad-hoc.
>
> Again, be careful with such observations.  First off, I'm fairly sure that
> the Intel Compiler teams (ifort
> <https://software.intel.com/en-us/fortran-compilers>) use a parser
> generator for parts of the ifort front-end. (Paul W might know more details
> as he once worked in that technology).  As I understand it, the front-end
> does have a number of special cases in it, so your observation is partially
> true, but the language definition is not 'completely ad-hoc'.
>
> The facts are that the language my father learned in the early 1960s
> (FORTRAN-II) and the language I learned in the late 60's/early 1970s
> (FORTRAN-IV) are not the same language as today's Fortran-2018, i.e. the
> language definition has hardly been static. Said in another way, about a
> year ago, a new standard for Fortran 2018 standard was released – see
> Fortran
> 2018 (Formerly Fortran 2015)  <https://wg5-fortran.org/f2018.html> and
> it actually
> offers support for ‘modern’ ideas such as object-oriented programming:
> Object-oriented
> programming in Fortran Wiki
> <http://fortranwiki.org/fortran/show/Object-oriented+programming>
> .
>
> FWIW: I tried to explain some of these ideas pictorially in my Quora
> answer: Clem Cole's answer to Is Fortran obsolete?
> <https://www.quora.com/Is-Fortran-obsolete/answer/Clem-Cole> This is not to
> denigrate other languages like Julia, Tensorflow etc. But the fact is that
> the hammer has been improved and the *ways the nails are delivered has
> changed*, but the *fundamental action provided* (fastening for nails and
> scientific computation in the case of Fortran) has been unchanged because
> it has proven to be the one of the best, if not the best to do the job it
> is designed to do.
>
> That said, I offer the following code snippet, which my Intel 2018
> compatible compiler accepts without any switches.  Which is really a
> remarkable comment about the women and men in the front-end team:
>
> C    This FORTRAN program may be compiled and run on a Norsk Data
> C    computer running SINTRAN and the FTN compiler.  It uses only
> C    FORTRAN reserved words, and contains just one numerical
> C    constant, in a character string (a format specifier).  When
> C    you run it, it prints a well known mathematical construct...
> C
> C    Even FORTRAN is a block structured programming language:
> C
>       PROGRAM
>      ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
>      AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
>      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>      *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
>      XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
>      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
>       END
>       SUBROUTINEFUNCTIO
>      ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
>      A,CALL,ASSIGN,CHARACTER);RETURN
>       END
>       SUBROUTINESUBROUTINE(IMPLICIT,L
>      LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
>      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>      ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
>      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
>       END
> Running the program should yield:
>                            1
>                          1   1
>                        1   2   1
>                      1   3   3   1
>                    1   4   6   4   1
>                  1   5  10  10   5   1
>                1   6  15  20  15   6   1
>              1   7  21  35  35  21   7   1
>            1   8  28  56  70  56  28   8   1
>          1   9  36  84 126 126  84  36   9   1
>        1  10  45 120 210 252 210 120  45  10   1
>      1  11  55 165 330 462 462 330 165  55  11   1
>    1  12  66 220 495 792 924 792 495 220  66  12   1
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-04  5:41   ` wobblygong
@ 2019-12-04 14:54     ` clemc
  2019-12-04 15:08       ` clemc
  2019-12-04 15:14     ` clemc
  1 sibling, 1 reply; 16+ messages in thread
From: clemc @ 2019-12-04 14:54 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7967 bytes --]

Intel ifort <https://software.intel.com/en-us/fortran-compilers> which as
one of my friends like to say "has the DEC Fortran compiler DNA ground up
and reinserted" ;-)

On Wed, Dec 4, 2019 at 12:41 AM Wesley Parish <wobblygong at gmail.com> wrote:

> I've just run that little program through gfortran without switches
> (naming it pyramid.for) and it comes up with:
>
> pyramid.for:25:6:
>
>       ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>       1
> Error: Bad continuation line at (1)
> pyramid.for:12:9:
>
>       R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>          1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:23:56:
>
>       IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>                                                         1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:25:52:
>
>       ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>                                                     1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:26:43:
>
>       XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>                                            1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:27:62:
>
>       IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>                                                               1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:23:34:
>
>       IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>                                   1
> Warning: Deleted feature: Loop variable at (1) must be integer
> pyramid.for:15:17:
>
>       LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
>                  1
> Warning: Rank mismatch in argument ‘implicit’ at (1) (rank-1 and
> scalar) [-Wargument-mismatch]
>
> I think gfortran must have '--strict' on by default. I might try it
> with the OpenWatcom Fortran compiler next - if it'll install on my
> current Linux box.
>
> Just out of interest, what is your current Fortran 2018 compiler?
>
> Wesley Parish
>
> On 12/4/19, Clem Cole <clemc at ccc.com> wrote:
> > On Tue, Dec 3, 2019 at 2:56 AM Dave Horsfall <dave at horsfall.org> wrote:
> >
> >> As every computer programmer should know, John Backus was emitted in
> >> 1924;
> >> he
> >> gave us the BNF syntax, but the sod also gave us that FORTRAN
> >> obscenity...
> >>
> > Be careful, Fortran still pays a lot of bills (I like to say that it has
> > paid my salary for nearly 45 years and I don't program in it - I'm an OS
> > guy). But Fortran >>is<< the #1 language for anything scientific and I
> > don't think that is going away in the future or really change its
> position
> > in popularity for a number of reasons (my analog is the QWERTY keyboard -
> > that ship has sailed and it's not economically interesting). There are a
> > number of places to check this out, but try looking at Archer AC Code
> > Status
> > <http://www.archer.ac.uk/status/codes/>, which is an interesting HPC
> usage
> > site in the UK. Note that Fortran is by far the leading programming
> > language used for ‘production’ (there are other sites that offer similar
> > data, I'll leave it to the reader to find them).
> >
> > Trivia: there is no way that FORTRAN can be described in any syntax; it
> is
> >> completely ad-hoc.
> >
> > Again, be careful with such observations.  First off, I'm fairly sure
> that
> > the Intel Compiler teams (ifort
> > <https://software.intel.com/en-us/fortran-compilers>) use a parser
> > generator for parts of the ifort front-end. (Paul W might know more
> details
> > as he once worked in that technology).  As I understand it, the front-end
> > does have a number of special cases in it, so your observation is
> partially
> > true, but the language definition is not 'completely ad-hoc'.
> >
> > The facts are that the language my father learned in the early 1960s
> > (FORTRAN-II) and the language I learned in the late 60's/early 1970s
> > (FORTRAN-IV) are not the same language as today's Fortran-2018, i.e. the
> > language definition has hardly been static. Said in another way, about a
> > year ago, a new standard for Fortran 2018 standard was released – see
> > Fortran
> > 2018 (Formerly Fortran 2015)  <https://wg5-fortran.org/f2018.html> and
> > it actually
> > offers support for ‘modern’ ideas such as object-oriented programming:
> > Object-oriented
> > programming in Fortran Wiki
> > <http://fortranwiki.org/fortran/show/Object-oriented+programming>
> > .
> >
> > FWIW: I tried to explain some of these ideas pictorially in my Quora
> > answer: Clem Cole's answer to Is Fortran obsolete?
> > <https://www.quora.com/Is-Fortran-obsolete/answer/Clem-Cole> This is
> not to
> > denigrate other languages like Julia, Tensorflow etc. But the fact is
> that
> > the hammer has been improved and the *ways the nails are delivered has
> > changed*, but the *fundamental action provided* (fastening for nails and
> > scientific computation in the case of Fortran) has been unchanged because
> > it has proven to be the one of the best, if not the best to do the job it
> > is designed to do.
> >
> > That said, I offer the following code snippet, which my Intel 2018
> > compatible compiler accepts without any switches.  Which is really a
> > remarkable comment about the women and men in the front-end team:
> >
> > C    This FORTRAN program may be compiled and run on a Norsk Data
> > C    computer running SINTRAN and the FTN compiler.  It uses only
> > C    FORTRAN reserved words, and contains just one numerical
> > C    constant, in a character string (a format specifier).  When
> > C    you run it, it prints a well known mathematical construct...
> > C
> > C    Even FORTRAN is a block structured programming language:
> > C
> >       PROGRAM
> >      ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
> >      AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
> >      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
> >      *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
> >      XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
> >      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
> >       END
> >       SUBROUTINEFUNCTIO
> >      ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
> >      A,CALL,ASSIGN,CHARACTER);RETURN
> >       END
> >       SUBROUTINESUBROUTINE(IMPLICIT,L
> >      LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
> >      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
> >      ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
> >      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
> >      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
> >      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
> >      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
> >       END
> > Running the program should yield:
> >                            1
> >                          1   1
> >                        1   2   1
> >                      1   3   3   1
> >                    1   4   6   4   1
> >                  1   5  10  10   5   1
> >                1   6  15  20  15   6   1
> >              1   7  21  35  35  21   7   1
> >            1   8  28  56  70  56  28   8   1
> >          1   9  36  84 126 126  84  36   9   1
> >        1  10  45 120 210 252 210 120  45  10   1
> >      1  11  55 165 330 462 462 330 165  55  11   1
> >    1  12  66 220 495 792 924 792 495 220  66  12   1
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191204/998e59a2/attachment-0001.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-04 14:54     ` clemc
@ 2019-12-04 15:08       ` clemc
  0 siblings, 0 replies; 16+ messages in thread
From: clemc @ 2019-12-04 15:08 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 9752 bytes --]

BTW: we called that test snippet "Eklund.f" in honor of Dave Eklund who was
the 'main man' behind DEC and Intel's Fortran compilers for many, many
years (he finally retired a few years back).  Among other things, Dave was
always looking for interesting fixed format test cases.   To be fair, when
I first tripped over the code snippet around the time Dave was retiring, I
sent it to him (and the rest of the Fortran compiler team).  The "HP"
Alpha/Itanium compilers (*ie.* the DEC GEM based ones) were fine with it.
 At the time, the Intel compiler accepted the deck without error but tossed
cookies in the runtime.  Lori Menard and I filled a bug report and she
added it to the Intel Fortran regression test suite.

Here is a version of the same deck that is a tad more intelligible and more
likely to be accepted by lessor compiler front-ends:
      PROGRAM BLOCK
      INTEGER I1,I2,I3,I4,I5
      DIMENSION I1(13),I2(13)
      I4=1
      I5=2
      I3=13
      CALL PASCAL(I1,I2,I3,I4,I5)
      END

      SUBROUTINE PASCAL(IP1,IP2,IP3,IP4,IP5)
      INTEGER IP3,IP1(IP3),IP2(IP3),IP4,IP5
      INTEGER IP6,IP7
      DO IP6=IP4,IP3
         DO IP7=IP5,IP6-IP4
            IP1(IP7)=IP2(IP7)+IP2(IP7-IP4)
         ENDDO
         IP1(IP4)=IP4
         IP1(IP6)=IP4
         DO IP7=IP4,IP3-IP6
            WRITE(*,'("  "$)')
         ENDDO
         DO IP7=IP4,IP6
            WRITE(*,'(I4$)') IP1(IP7)
         ENDDO
         WRITE(*,*)
         DO IP7=IP4,IP3
            IP2(IP7)=IP1(IP7)
         ENDDO
      ENDDO
      END

On Wed, Dec 4, 2019 at 9:54 AM Clem Cole <clemc at ccc.com> wrote:

> Intel ifort <https://software.intel.com/en-us/fortran-compilers> which as
> one of my friends like to say "has the DEC Fortran compiler DNA ground up
> and reinserted" ;-)
>
> On Wed, Dec 4, 2019 at 12:41 AM Wesley Parish <wobblygong at gmail.com>
> wrote:
>
>> I've just run that little program through gfortran without switches
>> (naming it pyramid.for) and it comes up with:
>>
>> pyramid.for:25:6:
>>
>>       ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>>       1
>> Error: Bad continuation line at (1)
>> pyramid.for:12:9:
>>
>>       R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>>          1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:23:56:
>>
>>       IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>>                                                         1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:25:52:
>>
>>       ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>>                                                     1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:26:43:
>>
>>       XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>>                                            1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:27:62:
>>
>>       IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>>                                                               1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:23:34:
>>
>>       IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>>                                   1
>> Warning: Deleted feature: Loop variable at (1) must be integer
>> pyramid.for:15:17:
>>
>>       LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
>>                  1
>> Warning: Rank mismatch in argument ‘implicit’ at (1) (rank-1 and
>> scalar) [-Wargument-mismatch]
>>
>> I think gfortran must have '--strict' on by default. I might try it
>> with the OpenWatcom Fortran compiler next - if it'll install on my
>> current Linux box.
>>
>> Just out of interest, what is your current Fortran 2018 compiler?
>>
>> Wesley Parish
>>
>> On 12/4/19, Clem Cole <clemc at ccc.com> wrote:
>> > On Tue, Dec 3, 2019 at 2:56 AM Dave Horsfall <dave at horsfall.org> wrote:
>> >
>> >> As every computer programmer should know, John Backus was emitted in
>> >> 1924;
>> >> he
>> >> gave us the BNF syntax, but the sod also gave us that FORTRAN
>> >> obscenity...
>> >>
>> > Be careful, Fortran still pays a lot of bills (I like to say that it has
>> > paid my salary for nearly 45 years and I don't program in it - I'm an OS
>> > guy). But Fortran >>is<< the #1 language for anything scientific and I
>> > don't think that is going away in the future or really change its
>> position
>> > in popularity for a number of reasons (my analog is the QWERTY keyboard
>> -
>> > that ship has sailed and it's not economically interesting). There are a
>> > number of places to check this out, but try looking at Archer AC Code
>> > Status
>> > <http://www.archer.ac.uk/status/codes/>, which is an interesting HPC
>> usage
>> > site in the UK. Note that Fortran is by far the leading programming
>> > language used for ‘production’ (there are other sites that offer similar
>> > data, I'll leave it to the reader to find them).
>> >
>> > Trivia: there is no way that FORTRAN can be described in any syntax; it
>> is
>> >> completely ad-hoc.
>> >
>> > Again, be careful with such observations.  First off, I'm fairly sure
>> that
>> > the Intel Compiler teams (ifort
>> > <https://software.intel.com/en-us/fortran-compilers>) use a parser
>> > generator for parts of the ifort front-end. (Paul W might know more
>> details
>> > as he once worked in that technology).  As I understand it, the
>> front-end
>> > does have a number of special cases in it, so your observation is
>> partially
>> > true, but the language definition is not 'completely ad-hoc'.
>> >
>> > The facts are that the language my father learned in the early 1960s
>> > (FORTRAN-II) and the language I learned in the late 60's/early 1970s
>> > (FORTRAN-IV) are not the same language as today's Fortran-2018, i.e. the
>> > language definition has hardly been static. Said in another way, about a
>> > year ago, a new standard for Fortran 2018 standard was released – see
>> > Fortran
>> > 2018 (Formerly Fortran 2015)  <https://wg5-fortran.org/f2018.html> and
>> > it actually
>> > offers support for ‘modern’ ideas such as object-oriented programming:
>> > Object-oriented
>> > programming in Fortran Wiki
>> > <http://fortranwiki.org/fortran/show/Object-oriented+programming>
>> > .
>> >
>> > FWIW: I tried to explain some of these ideas pictorially in my Quora
>> > answer: Clem Cole's answer to Is Fortran obsolete?
>> > <https://www.quora.com/Is-Fortran-obsolete/answer/Clem-Cole> This is
>> not to
>> > denigrate other languages like Julia, Tensorflow etc. But the fact is
>> that
>> > the hammer has been improved and the *ways the nails are delivered has
>> > changed*, but the *fundamental action provided* (fastening for nails and
>> > scientific computation in the case of Fortran) has been unchanged
>> because
>> > it has proven to be the one of the best, if not the best to do the job
>> it
>> > is designed to do.
>> >
>> > That said, I offer the following code snippet, which my Intel 2018
>> > compatible compiler accepts without any switches.  Which is really a
>> > remarkable comment about the women and men in the front-end team:
>> >
>> > C    This FORTRAN program may be compiled and run on a Norsk Data
>> > C    computer running SINTRAN and the FTN compiler.  It uses only
>> > C    FORTRAN reserved words, and contains just one numerical
>> > C    constant, in a character string (a format specifier).  When
>> > C    you run it, it prints a well known mathematical construct...
>> > C
>> > C    Even FORTRAN is a block structured programming language:
>> > C
>> >       PROGRAM
>> >      ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
>> >      AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
>> >      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>> >      *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
>> >      XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
>> >      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
>> >       END
>> >       SUBROUTINEFUNCTIO
>> >      ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
>> >      A,CALL,ASSIGN,CHARACTER);RETURN
>> >       END
>> >       SUBROUTINESUBROUTINE(IMPLICIT,L
>> >      LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
>> >      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>> >      ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
>> >      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>> >      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>> >      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>> >      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
>> >       END
>> > Running the program should yield:
>> >                            1
>> >                          1   1
>> >                        1   2   1
>> >                      1   3   3   1
>> >                    1   4   6   4   1
>> >                  1   5  10  10   5   1
>> >                1   6  15  20  15   6   1
>> >              1   7  21  35  35  21   7   1
>> >            1   8  28  56  70  56  28   8   1
>> >          1   9  36  84 126 126  84  36   9   1
>> >        1  10  45 120 210 252 210 120  45  10   1
>> >      1  11  55 165 330 462 462 330 165  55  11   1
>> >    1  12  66 220 495 792 924 792 495 220  66  12   1
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191204/daa8571c/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-04  5:41   ` wobblygong
  2019-12-04 14:54     ` clemc
@ 2019-12-04 15:14     ` clemc
  2019-12-05  6:11       ` wobblygong
  1 sibling, 1 reply; 16+ messages in thread
From: clemc @ 2019-12-04 15:14 UTC (permalink / raw)


Wesley - one more thing.  When you copy the original card deck, please
remember that because it's fixed format so make sure you have the proper
number of leading spaces after your cut/paste it (it did when I inserted
into the email).   If you drop any leading spaces or try to use a tab, it's
likely that the fixed format parser for continuation lines will get
confused.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191204/c0754923/attachment-0001.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-04 15:14     ` clemc
@ 2019-12-05  6:11       ` wobblygong
  2019-12-05 12:38         ` clemc
  0 siblings, 1 reply; 16+ messages in thread
From: wobblygong @ 2019-12-05  6:11 UTC (permalink / raw)


Well, gfortran swallowed eklund.f without a complain and threw me out
an a.out, which ran as expected.

I've got a Fortran IV manual lying around somewhere: I suppose life
not too short for a bit of gratuitous masochism? (I also had an old
Cobol manual of the same vintage, but I gave it to a friend who
believe it or not, wanted to learn it. Gratuitous masochism indeed.
Cobol! ;/ )

Thanks

Wesley

On 12/5/19, Clem Cole <clemc at ccc.com> wrote:
> Wesley - one more thing.  When you copy the original card deck, please
> remember that because it's fixed format so make sure you have the proper
> number of leading spaces after your cut/paste it (it did when I inserted
> into the email).   If you drop any leading spaces or try to use a tab, it's
> likely that the fixed format parser for continuation lines will get
> confused.
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-05  6:11       ` wobblygong
@ 2019-12-05 12:38         ` clemc
  0 siblings, 0 replies; 16+ messages in thread
From: clemc @ 2019-12-05 12:38 UTC (permalink / raw)


Cool

On Thu, Dec 5, 2019 at 1:11 AM Wesley Parish <wobblygong at gmail.com> wrote:

> Well, gfortran swallowed eklund.f without a complain and threw me out
> an a.out, which ran as expected.
>
> I've got a Fortran IV manual lying around somewhere: I suppose life
> not too short for a bit of gratuitous masochism? (I also had an old
> Cobol manual of the same vintage, but I gave it to a friend who
> believe it or not, wanted to learn it. Gratuitous masochism indeed.
> Cobol! ;/ )
>
> Thanks
>
> Wesley
>
> On 12/5/19, Clem Cole <clemc at ccc.com> wrote:
> > Wesley - one more thing.  When you copy the original card deck, please
> > remember that because it's fixed format so make sure you have the proper
> > number of leading spaces after your cut/paste it (it did when I inserted
> > into the email).   If you drop any leading spaces or try to use a tab,
> it's
> > likely that the fixed format parser for continuation lines will get
> > confused.
> >
>
-- 
Sent from a handheld expect more typos than usual
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191205/a59b1a81/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-03 13:44 ` clemc
  2019-12-03 15:57   ` toby
  2019-12-04  5:41   ` wobblygong
@ 2019-12-05 17:03   ` tih
  2019-12-05 18:44     ` clemc
  2 siblings, 1 reply; 16+ messages in thread
From: tih @ 2019-12-05 17:03 UTC (permalink / raw)


Clem Cole <clemc at ccc.com> writes:

> C    This FORTRAN program may be compiled and run on a Norsk Data
> C    computer running SINTRAN and the FTN compiler.  [...]

...and just to uphold the pride of our old friends at Norsk Data, I'd
like to point out that the original version of that program looks even
nicer.  It compiles properly using FTN (which is the older FORTRAN 77
compiler for the SINTRAN operating system), in this form (which should
explain the quip in the comment about a "block structured" language):

      PROGRAM
     ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
     AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
     R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
     *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
     XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
     LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
     ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
     A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
     LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
     IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
     ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
     ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
     XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
     IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
     =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END

Clem had to break some lines to placate his more modern compiler.  :)

-tih
-- 
Most people who graduate with CS degrees don't understand the significance
of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-05 17:03   ` tih
@ 2019-12-05 18:44     ` clemc
  2019-12-05 19:03       ` clemc
  0 siblings, 1 reply; 16+ messages in thread
From: clemc @ 2019-12-05 18:44 UTC (permalink / raw)


Actually, I never saw this version before today.   Thanks!!!
Clem

On Thu, Dec 5, 2019 at 12:11 PM Tom Ivar Helbekkmo via COFF <
coff at minnie.tuhs.org> wrote:

> Clem Cole <clemc at ccc.com> writes:
>
> > C    This FORTRAN program may be compiled and run on a Norsk Data
> > C    computer running SINTRAN and the FTN compiler.  [...]
>
> ...and just to uphold the pride of our old friends at Norsk Data, I'd
> like to point out that the original version of that program looks even
> nicer.  It compiles properly using FTN (which is the older FORTRAN 77
> compiler for the SINTRAN operating system), in this form (which should
> explain the quip in the comment about a "block structured" language):
>
>       PROGRAM
>      ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
>      AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
>      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>      *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
>      XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
>      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
>      ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
>      A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
>      LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
>      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>      ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
>      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END
>
> Clem had to break some lines to placate his more modern compiler.  :)
>
> -tih
> --
> Most people who graduate with CS degrees don't understand the significance
> of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay
> _______________________________________________
> COFF mailing list
> COFF at minnie.tuhs.org
> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191205/5febd9bb/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-05 18:44     ` clemc
@ 2019-12-05 19:03       ` clemc
  2019-12-05 19:50         ` tih
  0 siblings, 1 reply; 16+ messages in thread
From: clemc @ 2019-12-05 19:03 UTC (permalink / raw)


Tom,

Thanks again.   Now, I'm going to hazard a guess as to why the version in
the wild (which I had posted) had removed an F4 extension from your updated
version.   The END statements were intermixed with other text.  The
original Norsk Data compiler clearly did not care.
I just tried with ifort (201 version) and I get:

% ifort xxx.f
xxx.f(7): error #5141: END statement must be only statement on line
     LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
-------------------------------------------------------^
xxx.f(9): error #5141: END statement must be only statement on line
     A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
-----------------------------------------^
compilation aborted for xxx.f (code 1)
% diff eklund.f xxx.f
1,8d0
< C    This FORTRAN program may be compiled and run on a Norsk Data
< C    computer running SINTRAN and the FTN compiler.  It uses only
< C    FORTRAN reserved words, and contains just one numerical
< C    constant, in a character string (a format specifier).  When
< C    you run it, it prints a well known mathematical construct...
< C
< C    Even FORTRAN is a block structured programming language:
< C
15,17c7
<      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER)
<       END
<       SUBROUTINEFUNCTIO
---
>      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
19,21c9
<      A,CALL,ASSIGN,CHARACTER);RETURN
<       END
<       SUBROUTINESUBROUTINE(IMPLICIT,L
---
>      A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
28,29c16
<      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO
<       END
---
>      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END

I just checked with Dave (and I'd also ask Dr. Fortran, Stan Witlock; but
we lost him last year sadly).   Dave's comment was that even in the old F4
standard (which he has of course), PROGRAM, END and STOP cards all need to
be on separate cards (lines) and can not be intermixed with continuation.
 I suspect when this was sent out to wherever I picked it up a few years
ago, the code had been changed to be 'pure F4'  ;-)

On Thu, Dec 5, 2019 at 1:44 PM Clem Cole <clemc at ccc.com> wrote:

> Actually, I never saw this version before today.   Thanks!!!
> Clem
>
> On Thu, Dec 5, 2019 at 12:11 PM Tom Ivar Helbekkmo via COFF <
> coff at minnie.tuhs.org> wrote:
>
>> Clem Cole <clemc at ccc.com> writes:
>>
>> > C    This FORTRAN program may be compiled and run on a Norsk Data
>> > C    computer running SINTRAN and the FTN compiler.  [...]
>>
>> ...and just to uphold the pride of our old friends at Norsk Data, I'd
>> like to point out that the original version of that program looks even
>> nicer.  It compiles properly using FTN (which is the older FORTRAN 77
>> compiler for the SINTRAN operating system), in this form (which should
>> explain the quip in the comment about a "block structured" language):
>>
>>       PROGRAM
>>      ;PROGRAM;INTEGERIF,INTEGER,GOTO,IMPLICIT;REALREAL,DIMENSION,EXTERNA
>>      AL,FORMAT,END;INTEGERLOGICAL;REALCOMPLEX,DATA,CALL,ASSIGN,CHARACTER
>>      R;DOFORIF=INTEGER,INTEGER;ENDDO;INTEGER=IF+IF;GOTO=INTEGER*INTEGER*
>>      *INTEGER*INTEGER-INTEGER-IF;CALLFUNCTION(IMPLICIT,REAL,DIMENSION,EX
>>      XTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA,CALL,ASSIGN,CHARACTER);CALL
>>      LSUBROUTINE(IMPLICIT,LOGICAL,GOTO,IF,INTEGER);END;SUBROUTINEFUNCTIO
>>      ON(IMPLICIT,REAL,DIMENSION,EXTERNAL,FORMAT,END,LOGICAL,COMPLEX,DATA
>>      A,CALL,ASSIGN,CHARACTER);RETURN;END;SUBROUTINESUBROUTINE(IMPLICIT,L
>>      LOGICAL,GOTO,IF,INTEGER);INTEGERGOTO,IMPLICIT(GOTO),LOGICAL(GOTO),I
>>      IF,INTEGER,EXTERNAL,RETURN;DOFOREXTERNAL=IF,GOTO;DOFORRETURN=INTEGE
>>      ER,EXTERNAL-IF;IMPLICIT(RETURN)=LOGICAL(RETURN)+LOGICAL(RETURN-IF);
>>      ;ENDDO;IMPLICIT(IF)=IF;IMPLICIT(EXTERNAL)=IF;DOFORRETURN=IF,GOTO-EX
>>      XTERNAL;WRITE(IF,'(''$  '')');ENDDO;DOFORRETURN=IF,EXTERNAL;WRITE(I
>>      IF,'(''$''I4)')IMPLICIT(RETURN);ENDDO;WRITE(IF,'( /)');DOFORRETURN=
>>      =IF,GOTO;LOGICAL(RETURN)=IMPLICIT(RETURN);ENDDO;ENDDO;END
>>
>> Clem had to break some lines to placate his more modern compiler.  :)
>>
>> -tih
>> --
>> Most people who graduate with CS degrees don't understand the significance
>> of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay
>> _______________________________________________
>> COFF mailing list
>> COFF at minnie.tuhs.org
>> https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191205/4386cb16/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-05 19:03       ` clemc
@ 2019-12-05 19:50         ` tih
  2019-12-05 20:56           ` clemc
  0 siblings, 1 reply; 16+ messages in thread
From: tih @ 2019-12-05 19:50 UTC (permalink / raw)


Clem Cole <clemc at ccc.com> writes:

> I suspect when this was sent out to wherever I picked it up a few
> years ago, the code had been changed to be 'pure F4' ;-)

The version I have is the one that was floating around the SINTRAN
environment at the Norwegian Institute of Technology when I was there
back in the eighties.  I don't know where it originally came from, but
it was printed in the in-house information publication RUN-NYTT in 1982.

It's on page 9 of this issue:

https://folk.ntnu.no/klv/IT-historie-ntnu/Run-nytt-1977-93/run-nytt-1-1982.pdf

The comment at the top of the version you posted is actually my own
translation of the text introducing the printed program text.

-tih
-- 
Most people who graduate with CS degrees don't understand the significance
of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [COFF] Happy birthday, John Backus!
  2019-12-05 19:50         ` tih
@ 2019-12-05 20:56           ` clemc
  0 siblings, 0 replies; 16+ messages in thread
From: clemc @ 2019-12-05 20:56 UTC (permalink / raw)


Tom - this all makes perfect sense.  Very cool.  You are undoubtedly the
source!!!   I'm sure I must have gotten it from you, but I admit that I
>>had<< thought I had seen it elsewhere, earlier before Dave had retired
(which was a few years back before Intel moved the team from NH to MA).
That's why I asked had you posted to somewhere else earlier maybe?

FWIW: Google translates the intro para to be:  which is similar to your
translation.  You rewrote ND-10... to Norsk Data which makes complete sense
by making the code more understandable out of the context of the document.

The FORTRAN program below can be compiled and executed on an ND-10/100 FTN
compiler. It consists only of FORTRAN reserved words and 'contains only one
numeric constant (it is in a text string). The program produces a known
mathematical "figure".

The program is an example that even FORTRAN is a block structured language.

I note the original as the PROGRAM card is by itself, but not indented.
Which is somewhat consistent with the Dave's observation of F4 requiring
PROGRAM, END and STOP to be on seperate card.

BTW:  given today's exchange, I sent the compiler team a note to state, we
got it from you and I've asked them to add a pointer to this document your
provided also.

Thanks again,
Clem



On Thu, Dec 5, 2019 at 2:50 PM Tom Ivar Helbekkmo <tih at hamartun.priv.no>
wrote:

> Clem Cole <clemc at ccc.com> writes:
>
> > I suspect when this was sent out to wherever I picked it up a few
> > years ago, the code had been changed to be 'pure F4' ;-)
>
> The version I have is the one that was floating around the SINTRAN
> environment at the Norwegian Institute of Technology when I was there
> back in the eighties.  I don't know where it originally came from, but
> it was printed in the in-house information publication RUN-NYTT in 1982.
>
> It's on page 9 of this issue:
>
>
> https://folk.ntnu.no/klv/IT-historie-ntnu/Run-nytt-1977-93/run-nytt-1-1982.pdf
>
> The comment at the top of the version you posted is actually my own
> translation of the text introducing the printed program text.
>
> -tih
> --
> Most people who graduate with CS degrees don't understand the significance
> of Lisp.  Lisp is the most important idea in computer science.  --Alan Kay
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/coff/attachments/20191205/84c303aa/attachment.html>


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-12-05 20:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03  7:55 [COFF] Happy birthday, John Backus! dave
2019-12-03 13:44 ` clemc
2019-12-03 15:57   ` toby
2019-12-03 16:05     ` lars
2019-12-04  5:41   ` wobblygong
2019-12-04 14:54     ` clemc
2019-12-04 15:08       ` clemc
2019-12-04 15:14     ` clemc
2019-12-05  6:11       ` wobblygong
2019-12-05 12:38         ` clemc
2019-12-05 17:03   ` tih
2019-12-05 18:44     ` clemc
2019-12-05 19:03       ` clemc
2019-12-05 19:50         ` tih
2019-12-05 20:56           ` clemc
2019-12-03 19:20 ` cym224

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).