• Re: converting a 700,000+ line Fortran 77 plus 50,000+ line C++ program to C++, part 2

    From Steven G. Kargl@sgk@REMOVEtroutmask.apl.washington.edu to comp.lang.fortran,comp.lang.c++ on Thu Apr 17 15:06:12 2025
    From Newsgroup: comp.lang.fortran

    On Thu, 17 Apr 2025 12:24:22 +0200, R Daneel Olivaw wrote:

    Steven G. Kargl wrote:
    On Wed, 16 Apr 2025 07:44:08 +0000, Lawrence D'Oliveiro wrote:

    On Tue, 15 Apr 2025 18:28:31 -0500, Lynn McGuire wrote:

    On 4/15/2025 6:14 PM, Lawrence D'Oliveiro wrote:

    On Mon, 14 Apr 2025 23:50:32 -0500, Lynn McGuire wrote:

    Got rid of a few nasty bugs like:

    iword = 6Habcdef

    Surely whether thatrCOs a bug or not would depend on the type of rCLiwordrCY
    ...

    iword is a implicit 4 byte integer capable of storing 4 characters.

    I thought you got rid of all the implicit typing.

    Implicit typing has nothing do with numeric storage size.

    program foo
    use iso_fortran_env, only : numeric_storage_size
    integer :: j = 0
    i = 6Habcdef ! i has an implicit type of default integer kind
    j = 6Habcdef ! j has an explicit type of default integer kind
    print *, i, j
    print *, numeric_storage_size
    end program foo


    (snip)

    I believe you'll find that some of that syntax did not exist under
    Fortran 77, in particular the "use" line.
    Did Lynn convert to F90 first?

    Of course, the USE statement was not part of FORTRAN 77.
    (It was added in Fortran 90). The intrinsic module
    iso_fortran_env was not part of FORTRAN 77. (It was
    added in Fortran 2003). I included that line to easily
    get to the number of bits in a numeric storage unit.
    From ANSI X3.9-1978 (i.e., FORTRAN 77):

    An integer, real, or logical datum has one numeric
    storage unit in a storage sequence.
    ...
    This standard does not specify a relationship between
    the storage sequence concept and the physical properties
    or implementation of storage.

    The size of the unit was not specified in FORTRAN 77, and
    this concept is still alive in Fortran 2023.
    --
    steve
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From davidd0002@davidd0002@proton.me (David Duffy) to comp.lang.fortran on Tue Apr 22 04:53:44 2025
    From Newsgroup: comp.lang.fortran

    In comp.lang.fortran Lynn McGuire <lynnmcguire5@gmail.com> wrote:
    On 11/23/2022 5:36 PM, Tran Quoc Viet wrote:
    On Saturday, November 19, 2022 at 1:01:25 PM UTC+7, Lynn McGuire wrote:
    We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++
    lines of code engineering software product to C++. With all that code,

    Mentioned recently on Hacker News:

    https://www.lanl.gov/media/publications/1663/0125-llm-translation

    "...O???Malley is taking open-source LLMs, running them on Lab computers, and plying the models with a technique called retrieval-augmented generation
    (RAG), where generative models are enhanced with data from external
    sources. The idea is to train the models to translate from Fortran to C++
    using what???s known as few-shot learning..."
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lynn McGuire@lynnmcguire5@gmail.com to comp.lang.fortran,comp.lang.c++ on Tue Apr 22 00:14:30 2025
    From Newsgroup: comp.lang.fortran

    On 4/21/2025 11:53 PM, David Duffy wrote:
    In comp.lang.fortran Lynn McGuire <lynnmcguire5@gmail.com> wrote:
    On 11/23/2022 5:36 PM, Tran Quoc Viet wrote:
    On Saturday, November 19, 2022 at 1:01:25 PM UTC+7, Lynn McGuire wrote: >>>> We are converting a 700,000+ Fortran 77 lines of code plus 50,000+ C++ >>>> lines of code engineering software product to C++. With all that code,

    Mentioned recently on Hacker News:

    https://www.lanl.gov/media/publications/1663/0125-llm-translation

    "...O???Malley is taking open-source LLMs, running them on Lab computers, and plying the models with a technique called retrieval-augmented generation (RAG), where generative models are enhanced with data from external
    sources. The idea is to train the models to translate from Fortran to C++ using what???s known as few-shot learning..."

    Cool, I am not the only one !

    Lynn


    --- Synchronet 3.21a-Linux NewsLink 1.2