Skip to content

History

vmagnin edited this page May 27, 2023 · 13 revisions

The origin of gtk-fortran

The project was born from the frustration I felt while migrating to Linux in the mid 2000's after having enjoyed Visual Fortran for years. I needed a visual interface to display results in real time and the requirements were: cross-platform, using only standard Fortran, and under a free license. In December 2010, I was inspired by Tobias Burnus' post on comp.lang.fortran newsgroup (2nd May 2007 13:10) where he gave an example of a Fortran 2003 program creating a minimalist GUI (an empty GTK+ 2 window) using the iso_c_binding module. I posted a message on the 27th December 2010 and got into contact with Jerry DeLisle, a GFortran developer, on the 29th. We launched together the project on GitHub in January 2011. Other contributors then joined, especially James Tappin and Jens Hunger.

The first example, gtkhello2.f90, was posted on the 24th January 2011. We started the project with GTK+ 2 but this screenshot was taken with GTK+ 3, which was released on the 10th February 2011:

The first interfaces were written by hand, one by one, then I soon realized it could be automatized as I had just learned Python and regular expressions. The first version of the cfwrapper.py script is dated from the 28th January 2011. It was then developed to parse all GTK libraries, until around 10000 interfaces could be automatically generated.

In March 2011, J. Tappin began working on the High Level library. And in April-May, J. Hunger explored the GtkBuilder API and began working on the gtkf-sketcher application. The same year, J. Tappin also brought the CMake building system and the PLplot interface.

gtk-fortran was soon cited in a footnote in the following book (page 100) as a platform-independent solution in development:

The maintenance years

2014 and 2015 were very calm. In 2016, the Python wrapper was refactored to ease maintenance. The CMake files were cleaned and unified in GTK 2 and GTK 3 branches. In the following years, gtk-fortran releases tried to follow the Ubuntu releases rhythm when our workload made it possible.

In 2019, the CMake system was parallelized by Chinoune Mehdi, an appreciable feature because developing the library implies numerous builds! Work was necessary to adapt gtk-fortran to major changes in the Fortran bindings of PLplot. And an attempt to replace CMake by Meson was abandoned.

A new impetus

Preparing for the future GTK 4 was a motivation to improve the whole library. A software paper was published in the Journal of Open Source Software in 2019.

gtk-fortran was cited in Milan Curcic's book in a list of examples of libraries using the modern Fortran interoperability with C:

Milan was then a co-founder of the Fortran-lang community which aims to gather Fortran programmers to develop the Fortran ecosystem. Following that encounter, gtk-fortran was presented in July at FortranCon 2020, "the first International Conference targeting the development for and with the Fortran programming language":

GTK 4.0 was released in December 2020 and gtk-fortran 4.0.0 was released in April 2021, after one year of hard work, especially migrating the examples and the HL library.

In June 2021, a new repository gtk-fortran-extra was created under MIT license. One objective was to keep the size of the gtk-fortran repository reasonable, and another one was to offer more examples but with a non-GPL license.

In May 2022, the work on improving the wiki documentation with tutorials was pushed one step beyond by refactoring the whole documentation following the Diátaxis framework (Tutorials, How-to, Reference, Explanation).

Another stepping stone, was the demonstration in gtk-fortran-extra/parallel_app/ of modern Fortran parallel features (coarrays, events, teams, collective routines) used with gtk-fortran.

At Spring 2023, the cfwrapper began becoming a more general tool to generate Fortran interfaces for other C libraries.

Clone this wiki locally