Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Bader's draft about OOP in Fortran to the learning section #477

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nbehrnd
Copy link
Contributor

@nbehrnd nbehrnd commented Oct 4, 2024

The late Reinhard Bader (1966-2024) left a draft about object oriented programming in Fortran on Wikipedia saved on a GitHub repository which I would receive more (permanent) attention if available in the learning section of fortran-lang.org. Eventually, this still incomplete PR shall provide it.

I seek assistance by someone more familiar with the web site to reorganize the material to meet the requirements of a booklet of the learning section.

  1. Currently added to Fortran Documentation -- similar to the Fortran Intrinsics -- would this position fit well, or do you consider OOP more suitable in the section of Getting Started? With booklets Best Practices and the Python-Fortran Rosetta Stone in the later section, it could.

  2. The booklet contains two illustrations. While editing their definitions (Pandoc flavored markdown to MyST dialect), I opted for block level images I understood could provide a figure caption, when deemed suitable. However, running python3 pybuild.py en to update my local fork does not provide a visible figure caption for below the second illustration about the dependency inversion (section titled "Diagramming the dependencies between program units") though "the simple paragraph" is only one short line of text, followed by an explicit blank line prior to closing fence of three back ticks. Which to me appears to be like the reference pattern in MyST's manual. Is it a matter of my local setup (I cloned the repository into a folder with a virtual environment for Python to fetch all requirements with pip independently from the installation outside the this sandbox)?

  3. The new booklet is handled differently by the local build with python3 pybuild.py en, than the booklets already provided. For this as well as internal linking, I have to re-read your documentation again. If the booklet were split across multiple pages, would there be a possibility to export the booklet in one piece (e.g. as a pdf) -- similar as currently on the original GitHub repository?

Local build, accessing an already established booklet (incl. side navigation):

established_booklet

Local build, accessing the new booklet under construction (side navigation to return to the learning section is missing, etc):

new_booklet

The draft by the late Reinhold Bader (1966-2024) about OOP features
in Fortran is added to the learning section.  Except the addition to
the `learning.yml` file and a boiler plate header in the mandatory
`index.md` file, it is a copy-paste of the illustrations and the
text provided by `pandoc_md.md`, commit a77670d by 2024-09-03 of
the rescuing GitHub repository.[1]

[1] https://github.com/nbehrnd/bader_article

Signed-off-by: Norwid Behrnd <[email protected]>
The contribution page[1] describes optional admonition environments
which could help to retrieve hints.  It is tested on one case.

[1] https://fortran-lang.org/en/community/contributing/

Signed-off-by: Norwid Behrnd <[email protected]>
Now each instance of string `_Hint:_` is substituted by an
admonition environment.

Signed-off-by: Norwid Behrnd <[email protected]>
Snippets of code in the learning section indent with 2 spaces per
level eachl.  This pattern now is used, mostly with help of findent.

Signed-off-by: Norwid Behrnd <[email protected]>
Following the requested Code style,[1] snippets of code which show
a principe but as such can not be successfully compiled no longer
carry the `f90` label.  The presence of at least one colon `:`,
or one elipsis `...` is considered as an indicator.

[1] https://fortran-lang.org/en/community/contributing/

Signed-off-by: Norwid Behrnd <[email protected]>
The usage of the two illustrations were edited; they now are block
level images.[1]

[1] https://myst-parser.readthedocs.io/en/latest/syntax/images_and_figures.html

Signed-off-by: Norwid Behrnd <[email protected]>
@henilp105
Copy link
Member

#build_preview

Copy link

github-actions bot commented Oct 4, 2024

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/477

@rouson
Copy link

rouson commented Oct 4, 2024

It would be great if the all-caps keywords could be converted to lower case. The all-caps was most useful before the advent of syntax-aware coloring, but now all-caps is often redundant. As compared to most modern languages, the use of all-caps makes Fortran appear to be archaic.

Following a recommendation,[1] keywords of Fortran in the snippets
of code, running text, and section headers now are set in lower-
case characters only.  Beside syntax highlighlighting the web site
offers, this then is more consistent in style with the other booklets
already present.  There however are exceptions to this change in the
table about value statements, section Performing I/O with objects of
container-like type).

[1] fortran-lang#477

Signed-off-by: Norwid Behrnd <[email protected]>
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 7, 2024

#build_preview

Copy link

github-actions bot commented Oct 7, 2024

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/477

@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 7, 2024

@rouson I agree with you; for consistency of presentation with booklets already compiled and thanks to syntax highlighting provided by the web page by fortran-lang.org the lower-case format is the better way here. Which equally is the style both in Curcic's book and in Modern Fortran Explained (6th edition), too. The purpose of the other GitHub repository (outside fortran-lang.org) was to secure a copy of Bader's draft should Wikipedia/Wikimedia be reorganized, which is different from the one here.

Based on commit c92c71a, a new preview was just built.

Bader's draft about the support of OOP by Fortran now equally is
accessible from the centre (section Fortran documentation) as well
as from the lateral menu of the booklets.  The entry in the later
is new by this commit.

Signed-off-by: Norwid Behrnd <[email protected]>
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 7, 2024

#build_preview

1 similar comment
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 7, 2024

#build_preview

Copy link

github-actions bot commented Oct 7, 2024

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/477

The booklet's content now is organized in three pages.  This deviates
from the state of commit a77670d (2024-09-03) of the rescuing GitHub
respository,[1] however likely reflects better the original intent by
Bader.

[1] https://github.com/nbehrnd/bader_article

Signed-off-by: Norwid Behrnd <[email protected]>
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 9, 2024

#build_preview

Copy link

github-actions bot commented Oct 9, 2024

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/477

A light edit to improve the aesthetics of the eventual rendering
as html file.  The cross-links within the booklet are removed because
I don't understand the working of internal site links as explained by
the guidelines,[1] nor successfully identified a working example among
the other booklets by others.

[1] https://fortran-lang.org/en/community/contributing/

Signed-off-by: Norwid Behrnd <[email protected]>
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 10, 2024

#build_preview

Copy link

This PR has been built with Sphinx and can be previewed at: https://fortran-lang.github.io/webpage/pr/477

@nbehrnd
Copy link
Contributor Author

nbehrnd commented Oct 10, 2024

I invite the maintainers for a review of the new booklet "Putting Fortran’s object-related features to practical use" by the late Reinhard Bader, proposed as additional learning material.

The original draft prepared by Reinhard Bader on Wikipedia was secured in a separate public repository on GitHub for light edit of the format. To ease the review, I recommend the pdf obtained by compilation with pdfLaTeX (link, as provided by commit 13811a6, by 2024-10-10) as the authoritative version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants