News for hackers. Stuff that matters.
Re:Flang – A Fortran compiler targeting LLVM by nonsince on Thursday May 18, 2017 @11:40AM (#14368153)
I'm really interested in Fortran because I love super down-to-the-metal optimisation stuff, but I have no meaningful use-case for it. Where would you recommend someone start if they wanted to get into modern Fortran?
Re:Flang – A Fortran compiler targeting LLVM by Athas on Thursday May 18, 2017 @01:32PM (#14369230)
Fortran isn't really used much for down-to-the-metal optimisation. It's not at all built for the low-level tricks common in C, but rather expects you to program at a higher level (notably with first-class arrays), after which the compiler will (hopefully) do its magic. Although in practice, most Fortran code is not particularly optimised (or optimised for long-dead machines), and could be much much faster.

So, if you want to do down-to-the-metal optimisation for Fortran, you want to write a Fortran compiler, not a Fortran program.

Re:Flang – A Fortran compiler targeting LLVM by jabl on Thursday May 18, 2017 @11:50AM (#14368259)
Most Fortran programmers are scientists or engineers. So you could become a computational scientist. Materials science (density-functional theory, computational chemistry), climate/weather modeling, computational mechanics, fluid dynamics, etc. are all fields where Fortran usage is strong.

If you're not interested in science, I guess you could contribute to GCC or LLVM and try to make Fortran benchmarks run faster.

Re:Flang – A Fortran compiler targeting LLVM by alfalfasprout on Thursday May 18, 2017 @01:41PM (#14369314)
To add to some of the answers, Fortran's strength is that a scientist can write an algorithm for some numerical routine fairly easily and the output code will be highly optimized.

This is possible because you don't have to deal with all the weird edge cases you have in C/C++ like aliasing. The language is fairly simple so it can be optimized to death and it's easy to add things like automatic vectorization, etc.

Re:Flang – A Fortran compiler targeting LLVM by prestonbriggs on Thursday May 18, 2017 @01:57PM (#14369464)
I'm sure you meant to include scare quotes, as in "easy" :-)
Re:Flang – A Fortran compiler targeting LLVM by orbifold on Thursday May 18, 2017 @09:30PM (#14372421)
Compared to C++ / C even old fortran is suprisingly pleasant to use, when you want to implement simple numerical algorithms, it feels a bit like a barebones matlab
Re:Flang – A Fortran compiler targeting LLVM by leephillips on Thursday May 18, 2017 @12:59PM (#14368895)
Any time you want to do a big numerical computation fast. I suggest that, instead of looking at old fortran code, you make sure you are learning to use array fortran, which is supported by gfortran. You can do operations on arrays directly (makes the code concise), and get multi-processor parallelism with very little effort.
Re:Flang – A Fortran compiler targeting LLVM by sampo on Thursday May 18, 2017 @02:59PM (#14370032)
> array fortran

You mean Coarray Fortran, which can be a substitute for OpenMP, but simpler.

https://en.wikipedia.org/wiki/Coarray_Fortran

Re:Flang – A Fortran compiler targeting LLVM by federchen13 on Thursday May 18, 2017 @05:16PM (#14371166)
Due to it's simplicity, due to it's support for atomics, and due to some traditional Fortran features (modules, F9x object-based, build-in array support), Coarray Fortran does already allow to break it's own limits for development of more sophisticated parallel logic codes: https://github.com/MichaelSiehl/Atomic_Subroutines--How_the_...
Re:Flang – A Fortran compiler targeting LLVM by leephillips on Thursday May 18, 2017 @03:01PM (#14370061)
Yes, that's the term I should have used. Thank you.
Re:Flang – A Fortran compiler targeting LLVM by j_s on Thursday May 18, 2017 @03:06PM (#14370102)
Tie in machine learning somehow and Fortran can come back in style.
Re:Flang – A Fortran compiler targeting LLVM by atemerev on Thursday May 18, 2017 @04:45PM (#14370946)
Unfortunately, the single existing Fortran GPU compiler/library is very expensive.
Re:Flang – A Fortran compiler targeting LLVM by cwyers on Thursday May 18, 2017 @05:34PM (#14371294)
Which may be exactly why Nvidia is creating a Fortran compiler for LLVM, which can target CUDA.