Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

From Sharp minds come... pointed heads. -- Bryan Sparrowhawk


devel / comp.compilers / Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.

SubjectAuthor
* Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.Ian Lance Taylor
`- Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.Lydia Marie Williamson

1
Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.

<22-05-035@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=391&group=comp.compilers#391

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: ianlancetaylor@gmail.com (Ian Lance Taylor)
Newsgroups: comp.compilers
Subject: Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.
Date: Mon, 16 May 2022 15:38:29 -0700
Organization: Compilers Central
Lines: 23
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-05-035@comp.compilers>
References: <m3ilq59m3r.fsf@pepe.airs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="39331"; mail-complaints-to="abuse@iecc.com"
Keywords: translator, history
Posted-Date: 16 May 2022 19:08:03 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <m3ilq59m3r.fsf@pepe.airs.com>
 by: Ian Lance Taylor - Mon, 16 May 2022 22:38 UTC

> From: Rock Brentwood <rockbrentwood@gmail.com>
> The classic text-based computer game Zork / dungeon was originally devised on
> MIT computers in a LISP-offshoot (MDL), and translated to Fortran 77 by an
> "Anonymous" author. Some time later an enterprising soul converted a version
> of the Fortran edition of Zork into C ... pre-ANSI C ... with the aid of an
> earlier version of "f2c", but left no detailed paper trail behind on the
> actual translation process and stages.

Just FYI I was the enterprising soul who translated the code from Fortran
to C. I still have at least some of the intermediate files. Happy to
answer any questions.

That said, most of the work was manually rewriting the f2c output into
something more C like. For me this wasn't an exercise in translation
between languages, it was an exercise in making a version of Zork more
available. So I probably don't have anything useful to add that is
relevant to the compilers list.

In particular I changed the format of the data file. I wrote a translation
program between the old format, a new format, and a text format. The text
format let me make minor changes to things like the leaflet text.

Ian

Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.

<22-05-039@comp.compilers>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=395&group=comp.compilers#395

  copy link   Newsgroups: comp.compilers
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end
From: lydiamariewilliamson@gmail.com (Lydia Marie Williamson)
Newsgroups: comp.compilers
Subject: Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.
Date: Fri, 20 May 2022 16:44:18 -0700 (PDT)
Organization: Compilers Central
Lines: 24
Sender: news@iecc.com
Approved: comp.compilers@iecc.com
Message-ID: <22-05-039@comp.compilers>
References: <m3ilq59m3r.fsf@pepe.airs.com> <22-05-035@comp.compilers>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="48132"; mail-complaints-to="abuse@iecc.com"
Keywords: Fortran, history
Posted-Date: 21 May 2022 11:55:14 EDT
X-submission-address: compilers@iecc.com
X-moderator-address: compilers-request@iecc.com
X-FAQ-and-archives: http://compilers.iecc.com
In-Reply-To: <22-05-035@comp.compilers>
 by: Lydia Marie Williams - Fri, 20 May 2022 23:44 UTC

On Monday, May 16, 2022 at 6:08:05 PM UTC-5, Ian Lance Taylor wrote:
> Just FYI I was the enterprising soul who translated the code from Fortran
> to C. I still have at least some of the intermediate files. Happy to
> answer any questions.

I can interleave your in-between states into my GitHub sequence as a parallel
side-branch, if you wish. That will significantly help close out another loose
end that I hadn't yet fully resolved.

> In particular I changed the format of the data file. I wrote a translation
> program between the old format, a new format, and a text format. The text
> format let me make minor changes to things like the leaflet text.

I reverted back from character-based to a compromise between streaming and
records - something that's also friendly to Fortran 2018.

It just so happened, that later Fortran versions also included made a story
and index file compiler - one that's similar to what I have. That will be
integrated into the GitHub sequence, as well.

Most of the issues with translation (as you'll see in the history log I kept,
in the repository) were dealing with the I/O functions - with quite a few
changes made on the Fortran side, even before translating to C. Fortran has
streaming I/O now, which helps tremendously.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor