5 ms·
What kind of editor support does Fortran have? I think a language is more than just a language as such, and the surrounding environment is at least as important
by ogogmad 5y ago
What kind of editor support does Fortran have? I think a language is more than just a language as such, and the surrounding environment is at least as important if not more. I've used things like Mathematica, RStudio and Matlab, as well as Java IDEs, and these make all the difference.
- wiremoons 5y agoGood timing for your question as there is a poll going on at the moment about editors used with Fortran, on the Fortran Lang community Discourse here: https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139 https://fortran-lang.discourse.group/t/code-editors-ides-use... But the quick answer is that people programming in Fortran use the usual editors - Visual Studio Code, Emacs, Vim, CLion, etc.
- semi-extrinsic 5y agoThe tooling around Fortran is very similar to C. The debuggers are the same, you can typically use ctags of some sort for navigating between subroutines etc. across all files, and then you can add in a compiler-editor integration that checks for syntax errors at every save. There are also a couple of Fortran REPLs out there, the most promising is probably LFortran which is only in alpha stage of development but has Jupyter integration and will be the next cool thing I think.
- kergonath 5y agoI tend to use TextMate on Mac or SublimeText on other platforms. Fortran also is usually very close to C, and most standard debuggers like ten or lldb (even when LLVM had no Fortran front-end) can be used without problems. It’s a bit barebones compared to recent IDEs, sure. What I would like in particular is better refactoring and static analysis tools (though the lack of the latter is mitigated by the strong type system and some very good compilers like NAG). There is no real equivalent to RStudio or Matlab.
- ratboy666 5y agoBut... Matlab was originally written in FORTRAN ("easy access to... LINPACK and EISPACK..."). Written by Cleve Moler, distributed by Jim Kweeder. May 25, 1982. 7852 lines of FORTRAN 66 (for the version I have). "With proper use of overlays, it is possible run the system on a minicomputer with only 32K bytes of memory." -- Cleve Moler Fred Weigel
- kergonath 5y agoSure, a lot of Matlab is in Fortran (and a lot of other software as well, though you would not know from the outside), but you don’t write in Fortran when using Matlab.
- ratboy666 5y agoBut, back in the day, if you wanted to add functions to MATLAB, you would add them in FORTRAN 66, and rebuild the MATLAB interpreter. Microsoft BASIC-80 (around the same time) was written in assembler. You also don't write in assembler when using BASIC-80. But, BASIC-80 would be extended by assembler, in the same way that MATLAB would be extended by FORTRAN.
- zozbot234 5y agoLast I checked, you had to write out your program on paper, using the special Fortran coding forms. Then you just gave the written out forms to someone who would type out your codes at a keypunch and give you a deck of freshly punched cards, or you could take care of it yourself.
- cbozeman 5y agoSo... this is what Hell looks like...
- cube00 5y agoThese two training videos from the Bell Labs Computing Centre are a very interesting insight into what it was like. Part 1 https://www.youtube.com/watch?v=HMYiktO0D64 https://www.youtube.com/watch?v=HMYiktO0D64 Part 2 https://www.youtube.com/watch?v=V9aVOIuKVUc https://www.youtube.com/watch?v=V9aVOIuKVUc
- colechristensen 5y agoIt is entirely possible this person is telling the truth that this was the state of things the last time they checked. :) Fortran was absolutely run on punch cards, which also informs some of the strangeness of its formatting, especially pre-fortran-90.
- ratsmack 5y agoI programmed FORTRAN on punch cards and on paper tape using a teletype, over an acoustically coupled modem, timesharing to a Univac 1103. Those were the days.
- Stratoscope 5y agoFor anyone who wants to experience the first part of this process, here is a FORTRAN Coding Form (in caps because that's how it was spelled back then): https://upload.wikimedia.org/wikipedia/commons/1/18/FortranCodingForm.png https://upload.wikimedia.org/wikipedia/commons/1/18/FortranC... Print that in color on 8½x14" (legal size) paper and get to work! Of course there were a few other steps in the programming process back then. 1. A Systems Analyst took business requirements and turned them into an overview diagram of the system structure. 2. A Programmer took those diagrams and drew detailed flowcharts. These included every "if" statement, every loop, every detail. They were in effect code, but in a diagram form. Don't forget your IBM Flowcharting Template! https://ids.si.edu/ids/deliveryService?id=NMAH-AHB2012q05389 https://ids.si.edu/ids/deliveryService?id=NMAH-AHB2012q05389 3. A Coder read the programmer's flowcharts and wrote out the equivalent FORTRAN code on multiple pages of Coding Forms. 4. A Keypunch Operator read the Coder's forms and punched them onto cards, one card for each line of a Coding Form. 5. Finally we get to the High Priest of this operation. A Computer Operator - the only person allowed to touch the Computer! - ran your deck of cards through the machine and blessed you with a printout. Which was usually a core dump.
- pjmlp 5y agoThere have been Visual Studio plugins for commercial compilers since ages.
- PrintStar 5y agoWe maintain a commercial, Fortran-specific IDE, Simply Fortran, that ships with the GNU Fortran compiler (at least on Windows and macOS): https://simplyfortran.com https://simplyfortran.com It has many of the usual IDE expectations built in like autocomplete, project management, debugging, Git integration, etc. Our Windows distribution adds a few niceties like a Fortran-oriented (though basic) GUI library, a Windows-native coarray implementation (that doesn't use MPI), Windows-native OpenMP and threading, and a binary package manager for pre-built libraries. We're decidedly a small player in a niche market, but I like to think Simply Fortran makes life easier for Fortran developers. Sorry for the self-promotion!
- hoofedear 5y agoThis looks awesome! Am.. am I about to teach myself Fortran?
- gh02t 5y agoCLion supports Fortran via a plugin. I've used it a bit and it's fine. https://www.jetbrains.com/help/clion/fortran-support.html https://www.jetbrains.com/help/clion/fortran-support.html
- eyegor 5y agoThe Intel oneapi hpc toolkit (now free for commercial use too) has plugins for Visual Studio that are updated regularly. Full support in vs2019, about 90% works in vs2022. Of course you miss out on some of the most modern features like predictions that you get with copilot or the variant that Microsoft ships for C#, but it still has autocomplete, type hints, etc and a full featured debugger. There are also language server plugins available for vscode.