Over the last few months we had been working on creating a playground for Fortran, that can be offered as an extension to the offiicial fortran-lang website. The purpose of this playground is to showcase Fortran features to new users and make it easy for them to pickup the language. The playground also offers the capability of trying out new libraries(we currently only support stdlib but it can be expanded very easily as we use FPM). The playground is now LIVE, I would urge you to visit and ‘play’ around with it.
Note this is an early version of the playground and we will be constantly working to improve it even after the GSoC period. If you find any issues or have any suggestions to improve it, create an issue on the repo or drop them here.
We can definitely use your support to improve the tutorial and decide what libraries to incorporate.
I would like to thank @milancurcic@everythingfunctional@Arjen and everyone else who was involved in the process of creating it over the summer. It wouldn’t have been possible without your help. I have also created the final report for the project which you can check out here.
If one of the major goals is as you state to “to showcase Fortran features to new users” then is it possible to allow for an option to select a Fortran processor in the “playground” and perhaps even default the choice of the processor to the one that comes closest to a current Fortran standard?
The reason for my inquiry is this: I tried a few very simple cases and they worked flawlessly in the playground. Then I arbitrarily tried a case in this thread and I got the same error in the Fortran playground as with gfortran. However to the best of my knowledge, the example therein conforms to the Fortran standard and it works as expected with two other processors including Intel oneAPI IFORT. Now IFORT is a Fortran 2018 compiler (yeah I know about the outstanding bugs and some missing support like an additional character kind).
But it will be nice if the Fortran playground can use some other processors also so that it can be showcased more broadly with a current edition of the Fortran standard.
Nice. It seems that concentrating on fpm integration would be a great differentiator and support other fortran-lang projects so I like the track you are on. Comparing it to other online compiler interfaces (many of which are multi-lingual and not concentrated on Fortran, let alone fortran-lang) and looking at what can further differentiate this, and some nice features to add I was wondering if any of these additions are on the horizon?
load fpm sites
links into Fortran Discourse
draw on import of hosted code such as code examples from intrinsics, etc.
links to associated Fortran documentation on fortran-lang
Examples from other online services
various compilers (and compiler options)
upload and download files and shareable project hosting
Picturing being able to put code into a shareable project that others could run an modify as part of a discussion in Fortran Discourse or other pie-in-the-sky ideas for the future capabilities and other possibilities makes me excited to see where this goes. I strongly second the suggestion to have a link on the top of Fortran-lang for this soon if it has not already been done.
@shahmoradi I’ve already linked the Fortran learn page and the main fortran-lang.org site, I worded it as ‘Home’ as we were expecting users to visit this page from the main site. I’ll work with @henilp105 to see the possible placement for the playground link on the fortran-lang homepage.
@FortranFan Yes, adding options for multiple compilers is on our list and we will be adding IFort soon. As @urbanjost stated we can offer different editors as well but Ace itself supports keybindings for various other editors VIM, Emac etc. So implementing that would be the first step. Shareable code instances was also one of the features I had planned in the earlier proposal and I will be starting the work for it soon. File upload and download will make the experience even better.
I was also planning to create an API for clickable snippets, where the user can click on a snippet and it will launch the playground with that same code.
These all suggestions can be incorporated once we refine the current version.