TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Resurrecting Fortran

116 pointsby yomritoyjabout 4 years ago

8 comments

hpcjoeabout 4 years ago
I&#x27;ve been a Fortran user for (gawd help me) 35 years or so. I can say that rumors of its demise are greatly exaggerated.<p>There are many languages, and language fads. Fortran was never sexy, never faddy.<p>My research codes from 30+ years ago still compile w&#x2F;o issue to this day, and run, on my linux laptop. Even using the big endian data files (gfortran has a nice switch for that).<p>I don&#x27;t really use it actively anymore. But I know many who do. And when I hear others say &quot;X for scientific computing&quot;, I&#x27;ve got to chuckle a bit. C++ code I wrote 15 years ago won&#x27;t compile today. Python ... the language changes within minor versions (ran into this at work last week, with 3.6.8 being sufficiently different than 3.9.x that I had to rewrite a number of functions for 3.9.x).<p>I&#x27;ve not had to change my Fortran. Or my 25+ year old Perl. They just work. Which is something of a base requirement for scientific code. If you hand someone a code base, and N months&#x2F;years later, it doesn&#x27;t work ... that helps no one.
评论 #26451610 未加载
评论 #26459710 未加载
评论 #26449844 未加载
enriqutoabout 4 years ago
I don&#x27;t really like the title of this post, due to its implications... you can only resurrect something that is dead. But Fortran is alive and kicking. It is a fundamental language of our technological infrastucture. Millions of people run algorithms every day that are implemented in Fortran! It is also one of the few languages where you can reliably implement numerical algorithms and reason about their efficiency and memory usage.
评论 #26449226 未加载
yodelshadyabout 4 years ago
Fortran&#x27;s the only obstacle to purchasing M1 for me currently.<p>A while ago I compared the execution time for some simple matrix arithmetic in rust, fortran (2003 I think), and python&#x2F;numpy. (as an aside: as far as science is concerned, python without numpy doesn&#x27;t exist.) Execution times were fairly similar.<p>What I didn&#x27;t mention was the pretty-much-optimal fortran and python solutions took maybe a minute to code.<p>The optimal Rust solution took <i>over a day</i>.<p>I&#x27;ll also note intent(in), intent(out) fulfil similar uses to &#x27;&amp;&#x27; and &#x27;&amp;mut&#x27;.
评论 #26449239 未加载
评论 #26449511 未加载
评论 #26449084 未加载
GnarfGnarfabout 4 years ago
My first language, 1965, on a CDC 3100. We used Eliot Organick`s text book. Wonderful memories.
评论 #26449618 未加载
eschatonabout 4 years ago
How does LFortran compare to flang?
评论 #26450205 未加载
zoomablemindabout 4 years ago
<i>&gt; Quick Start: Variables, Example: variable assignment [1]....<p>&gt; pi = 4.141592 </i><p>Well, for the sake of a reasonable correctness in the code example. Must be a typo with the intended:<p>pi = 3.141592<p>Thanks for your efforts to help Fortran move forward.<p>[1]: <a href="https:&#x2F;&#x2F;fortran-lang.org&#x2F;learn&#x2F;quickstart&#x2F;variables#declaring-variables" rel="nofollow">https:&#x2F;&#x2F;fortran-lang.org&#x2F;learn&#x2F;quickstart&#x2F;variables#declarin...</a>
评论 #26455848 未加载
warmfuzzykittenabout 4 years ago
Several things surprised me, both in the blog post and the other comments. (Though hpcjoe&#x27;s and enriquot&#x27;s comments took care of the &quot;What? Fortran is dead?&quot; reaction.)<p>- (Comment) &quot;array operations, ... are slower than explicit loops&quot; May be related to the following:<p>- No mention of vectors.<p>- No mention of LINPACK, LAPACK, etc.<p>- No mention of GPUs.
评论 #26459657 未加载
andi999about 4 years ago
What stopped me a while ago was the availability of good free compilers. (the appeal is you could be faster than C for numerical code in Fortran, but I remember vaguely these compilers then would not be cheap)
评论 #26449247 未加载
评论 #26449443 未加载
评论 #26449993 未加载