6 ms·
F18 Fortran compiler and runtime project is accepted as part of LLVM project
- CaliforniaKarl 8y agoThis is awesome! Fortran is still in use in many of the "hard" sciences. It will probably take several years, but this may mean we could consider deprecating one of the compilers we have to maintain for people.
- codesushi42 8y agoAccording to TIOBE, Fortran is more popular than Google's Dart and Mozilla's Rust. Not to mention Kotlin, Lisp, and Erlang.
- GolDDranks 8y agoFortran used to be more popular. However, TIOBE is a lacking indicator, as stated here: http://pypl.github.io/PYPL.html http://pypl.github.io/PYPL.html (do a in-page-search with "Why is PYPL so different from TIOBE ?") Some other indicators such as Redmonk ( https://redmonk.com/sogrady/2019/03/20/language-rankings-1-19/ https://redmonk.com/sogrady/2019/03/20/language-rankings-1-1... ) show that both Dart and Rust are more popular than Fortran. (Although each of them have their own set of biases.)
- Nydhal 8y agoI think you mean lagging indicator.
- rbanffy 8y agoAny sufficiently lagging indicator is also a lacking indicator.
- aepiepaey 8y agoWhile the page they link to uses "lagging", "lacking" actually seems to fit better with the context it's used in there: The paragraph it's used in ("Why is PYPL so different from TIOBE ?") seems to argue that TIOBE is lacking, not lagging.
- Ericson2314 8y ago> The board also recommends that f18 evaluate (over time) whether it is reasonably possible to eliminate the dependence on C++’17 features. Alright... > Using C++’17 is not a blocker for inclusion into the project, but will be a blocker for certain other infrastructure (e.g. build bots and integration into official releases), but those may or may not be relevant now given the early state of f18. C++'17 is too new for the developers of the premier C++ compiler to use in their CI? What is this hot garbage!
- DannyBee 8y agoLLVM, like a lot of compilers, tries not to require the latest version of itself to bootstrap. See https://llvm.org/docs/GettingStarted.html#host-c-toolchain-both-compiler-and-standard-library https://llvm.org/docs/GettingStarted.html#host-c-toolchain-b... GCC is similar.
- Ericson2314 8y agoThey should still be able to CI it on the min version that does work. Eventually c++'17 will be old enough, so definitely the thing to do is just wait.
- Joky 8y agoLLVM supports old platforms: some CI bots are targeting stable Debian, or Ubuntu 14.04. LLVM is currently moving to C++14, which is a pain for some users like TensorFlow for instance which supports Ubuntu 14.04: the c++ standard library is too old. There are technical solutions for everything but for a component like LLVM, not pressuring its users into convoluted workflow is important. Of course the LLVM developpers would love to just use the latest version of the standard all the time. For the library part of the standard, it is worked around by having its own: https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/ADT/STLExtras.h https://github.com/llvm/llvm-project/blob/master/llvm/includ... (and others in the same directory)
- Ericson2314 8y ago
- beezle 8y agoGreat news! Curious - are there any selfhosting Fortran compilers?
- TimTheTinker 8y agoIf a Fortran compiler were self-hosting, I might think twice before using it... I can't imagine implementing a parser/lexer in Fortran of all languages. Considering that loops and procedures are the main supported models of indirection/abstraction, I expect the defect rate per kLoC would be rather high. Edit: Looks like OOP support arrived in Fortran 2003. Does anyone know how much of a difference it made?
- pjmlp 8y agoAs the very first high level language, plenty of compilers were implemented in FORTRAN during the 60's.
- rbanffy 8y agoI'm not sure people used HLLs to write compilers at that time.
- pjmlp 8y agoYou just need to search for papers, quite a few available. In fact, during the 60's Algol variants were already being used to write compilers and OSes.
- rbanffy 8y agoThat's true. Not only compilers, but a lot of MCP was written in Algol.
- bluGill 8y agoI'm sure they did. I'd even expect most compilers were written in a HLL. Note that most refers to quantity: I expect most compilers were written as an academic exercise with no real intent to be used in production. I would expect the compilers that were intended for people to use to write production code were written in assembler because at the time compiler optimizations where not very good; computers were slow and expensive; and programmers were cheap: as such it would be worth the extra cost to write your compiler in a low level language.
- hankhill 8y agoamazing to see the military still uses fortran to power their fleet
- mikorym 8y agoFor those that don't know: 'The LLVM compiler infrastructure project is a "collection of modular and reusable compiler and toolchain technologies" used to develop compiler front ends and back ends. LLVM is written in C++ and is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs written in arbitrary programming languages.'[1] [1] https://en.wikipedia.org/wiki/LLVM https://en.wikipedia.org/wiki/LLVM
- wycy 8y agoI write code in modern Fortran 2018, making extensive use of the new language features, so this is welcome news. I use Intel Fortran Compiler 2019 at work and gfortran-8 at home. Modern Fortran looks completely different from the old school FORTRAN77 that most people envision when thinking of Fortran. For reference, I did this past year's Advent of Code contest all in Fortran[0]. [0] https://gitlab.com/bwearley/advent-of-code-2018/tree/master https://gitlab.com/bwearley/advent-of-code-2018/tree/master
- pjmlp 8y agoYep, it even supports generics, go figure (pun intended).
- igouy 8y agoI always feel that Fortran is under-represented on the benchmarks game, so let me take the opportunity to say fyi that we are usually happy to accept better programs. If you wish to contribute a program then please follow these instructions: https://salsa.debian.org/benchmarksgame-team/benchmarksgame/blob/master/CONTRIBUTING.md https://salsa.debian.org/benchmarksgame-team/benchmarksgame/... https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/fortran.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...