L
LFortran Blog
lfortran.org · Company blog · on HN since 2019
The LFortran team writes about their LLVM-based interactive Fortran compiler and its progress compiling codebases such as LAPACK, SciPy, and minpack.
What HN saysHN commenters call the work absurdly impressive, and praise Fortran with a notebook-style workflow as Python-like use with high performance.
22HN people shared it
17linked it in comments
9stories submitted
346story points
8 months agolast shared
2019people per year2026
Most-shared posts
- 1LFortran: Modern interactive LLVM-based Fortran compiler18 people · 156 points · first shared 2019 · 68 comments on HN
- 2Creating LFortran, an interactive Fortran compiler built on top of LLVM3 people · 98 points · first shared 2019 · 51 comments on HN
- 3LFortran compiles PRIMA1 people · 77 points · first shared 2025 · 26 comments on HN
- 4LFortran Minimum Viable Product (MVP)1 people · 10 points · first shared 2021 · 2 comments on HN
- 5LFortran Compiles Lapack1 people · 2 points · first shared 2026 · 1 comments on HN
- 6LFortran Compiles 60% of SciPy1 people · 2 points · first shared 2024 · discussion on HN
- 7LFortran Compiles Fpm1 people · 1 points · first shared 2026 · discussion on HN
- 8Why to use fortran for new projects1 people · first shared 2023
- 9Lfortran breakthrough now building legacy and modern minpack1 people · first shared 2023
- 10Lfortran compiles fastgpt1 people · first shared 2023
What HN people wrote when they linked it
certik · 2021-03-13
Indeed. Intel Fortran is generally considered one of the best. It was not cheap, but it is now available for free. In general I think there is a huge opportunity for new compilers, and I have started one such effort myself: https://lfortran.org.
cbkeller · 2021-03-14
High performance scientific computing is very much still a FORTRAN, C, and C++ game. And of those, FORTRAN has some compelling advantages in terms of first-class built-in support for multidimensional arrays, and quite excellent compilers. And, as others have noted, until the `restrict` keyword in C99, there were optimizations in FORTRAN that were not even possible in C.
I mostly used C for my (small-scale) HPC work in grad school because it’s what I knew best, but at several points I wished I had learned Fortran instead.
Probably one of the only “higher level” languages that’s ever been used for serious petascale scientific computing is Julia (first with Celeste on the astro side, possibly soon with CliMA for climate modeling), which not coincidentally follows similar array indexing conventions as FORTRAN. And while that’s what I mostly use now, I don’t see Fortran going away any time soon.
If anything, with cool new projects like LFortran [1] making it possible to use Fortran more interactively, it’s probably quite a good time to learn modern Fortran!
[1] https://lfortran.org/
sundarurfriend · 2025-05-15
The amount of work that's been put into Fortran by the LFortran [1] folks and others in recent years [2] is nothing short of absurdly impressive!
[1] https://lfortran.org/
[2] "in recent years" because that's when I became aware of this stuff, not to say there wasn't effort before then
pjmlp · 2024-05-07
Modern Fortran is quite quite different from those punched cards back in the day, the latest revision being from 2023.
Coupled with a notebook like experience, one gets Python like experience, coupled with one of the HPC performance kings, and that is what LFortran is trying to achieve.
https://lfortran.org/
dawnofdusk · 2023-07-25
Personally a lot of the points in this article are pretty decent, but I think the solution is not Rust but something like LFortran (https://lfortran.org) which has an interactive REPL, can be AOT compiled, no performance footguns, and is Fortran (a big plus for adoption by scientists).
domcoltd · 2023-05-18
Hopefully, the SciPy community can stay open-minded about modern Fortran libraries.
Modern Fortran is quite different from Fortran 77, while being as powerful, if not more.
In addition, there has been a significant community effort on improving and modernising the legacy packages, the ecosystem, and the language itself.
With projects like LFortran (https://lfortran.org/), fpm (https://github.com/fortran-lang/fpm), and stdlib (https://github.com/fortran-lang/stdlib), I believe that Fortran will enjoy prosperity again.
eternalban · 2023-05-18
"Ondřej [Certik] is the original author of SymPy, SymEngine and LFortran".
https://www.sympy.org/en/index.html
https://symengine.org/
https://lfortran.org/ << "Modern interactive LLVM-based Fortran compiler"
~
Raise your hand if you first encountered Fortran in (eng) school and wrote your first Fortain programs on punch cards. (MTS for bonus).
ar_imani · 2023-04-30
as a mechanical engineer i wrote lots of FEM codes in FORTRAN, i still do and honestly enjoy programming in it. the lack of graduates who know Fortran is a correct estimate. As far as I know, it is usually replaced by MATLAB and Python in our departments. Unfortunately, C++ is taught less.
i don't know much about future CPU technology or why it is likely that Fortran codes don't perform properly on GPU. but i know that NVIDIA takes too much time to provide CUDA-FORTRAN for windows. nothing happened after 4 years.
But it seems to me that the isolated Fortran programmers have recently become well connected. Look at the website [1], Package Manager or LFortran [2].
[1] https://fortran-lang.org/en/
[2] https://lfortran.org/
hpcjoe · 2022-02-12
Fortran used to get lots of hate from the C-like crowd. Maybe it still does.
This said, it is a modern, very high performance computing language. It is easy to, as the article notes, adapt the language to fit the algorithm, rather than doing the reverse which C/C++/etc. demand. The only other language that I am aware of like that is Julia.
Julia has a REPL built in, and you need to use PackageCompiler.jl to compile AOT code. Then again fortran has a nascent REPL[1].
[1] https://lfortran.org/
leephillips · 2021-09-13
It also allows the existence of a Fortran REPL, something I never thought I would see: https://lfortran.org/
Bostonian · 2021-09-03
Some projects of the Fortran-lang community are Fortran Discourse,
https://fortran-lang.discourse.group/, a web site,
https://fortran-lang.org/, stdlib, https://github.com/fortran-lang/stdlib, a standard library for Fortran, and LFortran https://lfortran.org/, an interactive LLVM-based Fortran compiler under development.
omrjml · 2021-04-29
That's true, I keep forgetting about https://lfortran.org/ Unfortunately in my experience the people I know who almost exclusively code in fortran are not really interested in jupyter notebooks.
bluejekyll · 2020-07-14
Won’t this work? https://lfortran.org/
I just did a quick google search for it. I know nothing more than that it is FORTRAN compiler for LLVM. (It claims to be an alpha release)
zaikunzhang · 2026-02-06
See also https://lfortran.org/
targafarian · 2023-10-02
A couple big things: Fortran natively performs operations on arrays directly like Matlab or Numpy in Python (Matlab was originally a REPL-style front-end to Fortan), and Fortran compilers tend to yield quite fast code (though specific cases will have another language outperform Fortran).
You can read more about the language and its high-level features here: https://fortran-lang.org
That website/community was created in part by the original author of the Python Sympy library, Ondřej Čertík. He is also working on his own Fortran compiler that you can use via webassembly to play around with Fortran; find links if you want to play here: https://lfortran.org
I've only dabbled a little, but I like the general idea, and I appreciate a F/OSS Fortran compiler being developed like this alongside actively seeking to grow the Fortran community & push the language & its libraries forward.
I expect more widespread adoption of Fortran to be quite a ways out, but what Ondřej is doing for Fortran is necessary (not sufficient) for such adoption to be the case.
cycomanic · 2021-01-31
In development, but there is lfortran:
https://lfortran.org/
genphy1976 · 2025-03-09
For more information about LFortran, see
- Wikipedia: https://en.wikipedia.org/wiki/LFortran
- Homepage: https://lfortran.org
- GitHub: https://github.com/lfortran/lfortran
If you like to play with it, see
- LFortran in web browsers using WebAssembly: https://dev.lfortran.org
- LFortran in Compiler Explorer: https://godbolt.org/z/EfWvsY6Kh