Re: Several Perl Questions - Nov. 5, 2013

Discussion in 'Perl Misc' started by Ben Bacarisse, Nov 14, 2013.

  1. "E.D.G." <> writes:

    > "E.D.G." <> wrote in message
    > news:...
    >> "E.D.G." <> wrote in message
    >> news:...

    >
    > The program that I mentioned that my colleague could not
    > translate was apparently written using FORTRAN 77 with the LAHEY-F77
    > compiler. And this appears to be the present Web site for download
    > versions of the program.
    >
    > http://www.bfo.geophys.uni-stuttgart.de/etgtab.html


    There does not seem to be anything odd about that program. It goes
    through gfortran fine. -Wall -Wextra give a few warnings, but none look
    to be serious.

    > Since he could not determine how to translate the code I am
    > assuming that FORTRAN 77 is no longer in general use.


    It is considered old, but Fortran is good at backwards compatibility. I
    really don't see any reason why the program can't be used as-is. (There
    is a system dependency in the timer code, but that's trivial.)

    <snip>
    --
    Ben.
     
    Ben Bacarisse, Nov 14, 2013
    #1
    1. Advertising

  2. Ben Bacarisse <> writes:
    > "E.D.G." <> writes:
    >> "E.D.G." <> wrote in message
    >> news:...
    >>> "E.D.G." <> wrote in message
    >>> news:...

    >>
    >> The program that I mentioned that my colleague could not
    >> translate was apparently written using FORTRAN 77 with the LAHEY-F77
    >> compiler. And this appears to be the present Web site for download
    >> versions of the program.
    >>
    >> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

    >
    > There does not seem to be anything odd about that program. It goes
    > through gfortran fine. -Wall -Wextra give a few warnings, but none look
    > to be serious.
    >
    >> Since he could not determine how to translate the code I am
    >> assuming that FORTRAN 77 is no longer in general use.

    >
    > It is considered old, but Fortran is good at backwards compatibility. I
    > really don't see any reason why the program can't be used as-is.


    In the sense that the high priest prepares the fruits and vegetables and
    chicken and lambs and first born children for the sacrifice while
    wearing the white, ornamental robes, then kills everything alive, making
    sure to mix and spread the blood exactly as the ancient ritual
    prescribes and then takes a deep breath and waits ... until a thunderous
    voice booms "The answer is 42!" from the skies, surely.
     
    Rainer Weikusat, Nov 14, 2013
    #2
    1. Advertising

  3. Rainer Weikusat <> writes:

    > Ben Bacarisse <> writes:
    >> "E.D.G." <> writes:
    >>> "E.D.G." <> wrote in message
    >>> news:...
    >>>> "E.D.G." <> wrote in message
    >>>> news:...
    >>>
    >>> The program that I mentioned that my colleague could not
    >>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
    >>> compiler. And this appears to be the present Web site for download
    >>> versions of the program.
    >>>
    >>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

    >>
    >> There does not seem to be anything odd about that program. It goes
    >> through gfortran fine. -Wall -Wextra give a few warnings, but none look
    >> to be serious.
    >>
    >>> Since he could not determine how to translate the code I am
    >>> assuming that FORTRAN 77 is no longer in general use.

    >>
    >> It is considered old, but Fortran is good at backwards compatibility. I
    >> really don't see any reason why the program can't be used as-is.

    >
    > In the sense that the high priest prepares the fruits and vegetables and
    > chicken and lambs and first born children for the sacrifice while
    > wearing the white, ornamental robes, then kills everything alive, making
    > sure to mix and spread the blood exactly as the ancient ritual
    > prescribes and then takes a deep breath and waits ... until a thunderous
    > voice booms "The answer is 42!" from the skies, surely.


    That's too obscure for me (I get the reference, just not the point).

    --
    Ben.
     
    Ben Bacarisse, Nov 14, 2013
    #3
  4. Ben Bacarisse <> writes:
    > Rainer Weikusat <> writes:
    >
    >> Ben Bacarisse <> writes:
    >>> "E.D.G." <> writes:


    [...]

    >>>> The program that I mentioned that my colleague could not
    >>>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
    >>>> compiler. And this appears to be the present Web site for download
    >>>> versions of the program.
    >>>>
    >>>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html


    [...]

    >>> I really don't see any reason why the program can't be used as-is.

    >>
    >> In the sense that the high priest prepares the fruits and vegetables and
    >> chicken and lambs and first born children for the sacrifice while
    >> wearing the white, ornamental robes, then kills everything alive, making
    >> sure to mix and spread the blood exactly as the ancient ritual
    >> prescribes and then takes a deep breath and waits ... until a thunderous
    >> voice booms "The answer is 42!" from the skies, surely.

    >
    > That's too obscure for me (I get the reference, just not the point).


    Considering that there's certainly no living being who understands this
    code (and I very much doubt that there ever was), all one can do with this
    program is humbly feed it with some input and gratefully accept whatever
    output it produces, with the result being defined as correct because
    "The computer said so!", despite nobody understands how it arrived there
    and why this result and not some other one was produced.

    That's closer to asking an oracle than what I would consider 'science'
    ....
     
    Rainer Weikusat, Nov 14, 2013
    #4
  5. Rainer Weikusat <> writes:

    > Ben Bacarisse <> writes:
    >> Rainer Weikusat <> writes:
    >>
    >>> Ben Bacarisse <> writes:
    >>>> "E.D.G." <> writes:

    >
    > [...]
    >
    >>>>> The program that I mentioned that my colleague could not
    >>>>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
    >>>>> compiler. And this appears to be the present Web site for download
    >>>>> versions of the program.
    >>>>>
    >>>>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

    >
    > [...]
    >
    >>>> I really don't see any reason why the program can't be used as-is.
    >>>
    >>> In the sense that the high priest prepares the fruits and vegetables and
    >>> chicken and lambs and first born children for the sacrifice while
    >>> wearing the white, ornamental robes, then kills everything alive, making
    >>> sure to mix and spread the blood exactly as the ancient ritual
    >>> prescribes and then takes a deep breath and waits ... until a thunderous
    >>> voice booms "The answer is 42!" from the skies, surely.

    >>
    >> That's too obscure for me (I get the reference, just not the point).

    >
    > Considering that there's certainly no living being who understands this
    > code (and I very much doubt that there ever was), all one can do with this
    > program is humbly feed it with some input and gratefully accept whatever
    > output it produces, with the result being defined as correct because
    > "The computer said so!", despite nobody understands how it arrived there
    > and why this result and not some other one was produced.


    I get the point. However the question is surely whether there might be
    someone who understands this code in the future? It might then be
    possible understand the output. I don't think this is an unreasonable
    hope.

    It's 2318 lines long, but more than half are comment lines, and a
    further 120 or so are house-keeping lines like FORMAT and CONTINUE (used
    here like } in C, not as a jump). There are only 50 GOTOs and all seem
    to forward jumps. At less than 1000 lines of code it doesn't seem
    impossible to me that someone could understand it. I've worked with
    much less structured Fortran in the past.

    Not easy, sure, and it may turn out to be a doomed project, but my first
    job was unravelling exactly this sort of program (well, worse, to be
    frank) and when I looked at it I thought, "not too bad". I was,
    however, glad that this was no longer my job!

    --
    Ben.
     
    Ben Bacarisse, Nov 14, 2013
    #5
  6. Ben Bacarisse <> writes:
    > Rainer Weikusat <> writes:
    >> Ben Bacarisse <> writes:
    >>> Rainer Weikusat <> writes:
    >>>
    >>>> Ben Bacarisse <> writes:
    >>>>> "E.D.G." <> writes:

    >>
    >> [...]
    >>
    >>>>>> The program that I mentioned that my colleague could not
    >>>>>> translate was apparently written using FORTRAN 77 with the LAHEY-F77
    >>>>>> compiler. And this appears to be the present Web site for download
    >>>>>> versions of the program.
    >>>>>>
    >>>>>> http://www.bfo.geophys.uni-stuttgart.de/etgtab.html

    >>
    >> [...]
    >>
    >>>>> I really don't see any reason why the program can't be used as-is.
    >>>>
    >>>> In the sense that the high priest prepares the fruits and vegetables and
    >>>> chicken and lambs and first born children for the sacrifice while
    >>>> wearing the white, ornamental robes, then kills everything alive, making
    >>>> sure to mix and spread the blood exactly as the ancient ritual
    >>>> prescribes and then takes a deep breath and waits ... until a thunderous
    >>>> voice booms "The answer is 42!" from the skies, surely.
    >>>
    >>> That's too obscure for me (I get the reference, just not the point).

    >>
    >> Considering that there's certainly no living being who understands this
    >> code (and I very much doubt that there ever was), all one can do with this
    >> program is humbly feed it with some input and gratefully accept whatever
    >> output it produces, with the result being defined as correct because
    >> "The computer said so!", despite nobody understands how it arrived there
    >> and why this result and not some other one was produced.

    >
    > I get the point. However the question is surely whether there might be
    > someone who understands this code in the future? It might then be
    > possible understand the output. I don't think this is an unreasonable
    > hope.
    >
    > It's 2318 lines long, but more than half are comment lines, and a
    > further 120 or so are house-keeping lines like FORMAT and CONTINUE (used
    > here like } in C, not as a jump).


    There are two of them, the older one being a little larger. And the code
    looks like this:

    DGX(1)=(DHLAT(1)-(6.D0*DLLAT(1)*DC2T)/(3.D0*DCT2-1.D0))*DCAZ**2
    1 +(DHLAT(1)-(6.D0*DLLAT(1)*DCT2)/(3.D0*DCT2-1.D0))*DSAZ**2
    DGY(1)=0.D0
    DGX(2)=(DHLAT(2)-4.D0*DLLAT(2))*DCAZ**2+(DHLAT(2)-DLLAT(2)/DST2
    1 +2.D0*DLLAT(2)*DCOTT*DCOTT2)*DSAZ**2
    DGY(2)=2.D0*DLLAT(2)*(2.D0*DCOTT2-DCOTT)*DCSTS/DST
    DGX(3)=(DHLAT(3)+2.D0*DLLAT(3)*(DCOTT*DCOTT-1.D0))*DCAZ**2
    1 +(DHLAT(3)-4.D0*DLLAT(3)/DST2+2.D0*DLLAT(3)*DCOTT*DCOTT)*DSAZ**2
    DGY(3)=4.D0*DLLAT(3)*DCOTT*DCSTS/DST
    DGX(4)=(DHLAT(4)+DLLAT(4)*(33.D0-45.D0*DCT2)/(5.D0*DCT2-3.D0))*
    1 DCAZ**2+(DHLAT(4)-DLLAT(4)*(1.D0+10.D0*DCT2/(5.D0*DCT2-3.D0)))*
    2 DSAZ**2
    DGY(4)=0.D0
    DGX(5)=(DHLAT(5)-DLLAT(5)*(1.D0+10.D0*(1.D0-4.D0*DCT2)/
    1 (1.D0-5.D0*DCT2)))*DCAZ**2+(DHLAT(5)+DLLAT(5)*
    2 (DCOTT*DCOTT-1.D0/DST2-10.D0*DCT2/(5.D0*DCT2-1.D0)))*DSAZ**2
    DGY(5)=-20.D0*DLLAT(5)*DCT*DCSTS/(5.D0*DCT2-1.D0)
    DGX(6)=(DHLAT(6)+DLLAT(6)*(2.D0*DCOTT*DCOTT-7.D0))*DCAZ**2
    1 +(DHLAT(6)+DLLAT(6)*(2.D0*DCOTT*DCOTT-1.D0-4.D0/DST2))*DSAZ**2
    DGY(6)=-4.D0*DLLAT(6)*(DCOTT-1.D0/DCOTT)*DCSTS/DST
    DGX(7)=(DHLAT(7)+DLLAT(7)*(6.D0*DCOTT*DCOTT-3.D0))*DCAZ**2

    > There are only 50 GOTOs and all seem
    > to forward jumps. At less than 1000 lines of code it doesn't seem
    > impossible to me that someone could understand it.


    It is surely not impossible that someone checks this code
    character-by-character, considering the context of all characters
    checked so far and still to be checked, to determine what this actually
    does and to verify that what it does happens to be correct, however, the
    effort necessary to rewrite this shirt cuff doodling gone out of hand from
    scratch is almost certainly going to be a lot lower.
     
    Rainer Weikusat, Nov 14, 2013
    #6
  7. >>>>> "BB" == Ben Bacarisse <> writes:

    BB> I get the point. However the question is surely whether there
    BB> might be someone who understands this code in the future? It
    BB> might then be possible understand the output. I don't think
    BB> this is an unreasonable hope.

    I think the question is whether there is any overlap among the set of
    people who understand this code, the set of people who are willing to
    work with EDG, and the set of people who are willing to do the work for
    the rates EDG is willing to pay.

    My sense is that the intersection of those three sets is the null set.

    Charlton


    --
    Charlton Wilbur
     
    Charlton Wilbur, Nov 18, 2013
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charlton Wilbur

    Re: Several Perl Questions - Nov. 5, 2013

    Charlton Wilbur, Nov 5, 2013, in forum: Perl Misc
    Replies:
    3
    Views:
    133
    Charlton Wilbur
    Nov 11, 2013
  2. John Black

    Re: Several Perl Questions - Nov. 5, 2013

    John Black, Nov 5, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    118
    John Black
    Nov 5, 2013
  3. Peter J. Holzer

    Re: Several Perl Questions - Nov. 5, 2013

    Peter J. Holzer, Nov 5, 2013, in forum: Perl Misc
    Replies:
    3
    Views:
    133
    Peter J. Holzer
    Nov 7, 2013
  4. Peter J. Holzer

    Re: Several Perl Questions - Nov. 5, 2013

    Peter J. Holzer, Nov 5, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    119
    Peter J. Holzer
    Nov 5, 2013
  5. Tim McDaniel

    Re: Several Perl Questions - Nov. 5, 2013

    Tim McDaniel, Nov 5, 2013, in forum: Perl Misc
    Replies:
    0
    Views:
    153
    Tim McDaniel
    Nov 5, 2013
Loading...

Share This Page