<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>semi-extrinsic</author><text>&amp;gt; These optimizations will only ever be made if Fortran has wide adoption.&lt;p&gt;I think you completely fail to realize that Fortran does have wide adoption, and that there is a big market for commercial and open-source Fortran compilers, and that these optimizations have already been made.&lt;p&gt;I also don&amp;#x27;t think you realize how much more productive a scientist is with a language that explicitly lacks all the bells and whistles of e.g. C++. Just like how many fiction authors prefer to use old and simple text editing software, hell even mechanical typewriters, while you would argue an iPad with keyboard cover has so much more functionality.&lt;p&gt;If you want some examples, go have a dig through the OpenFOAM C++ source code [1], and compare it to e.g. the Pencil Fortran code [2]. They&amp;#x27;re both CFD codes, though the specializations are different. The former can best be characterized as &amp;quot;templates all the way down&amp;quot;, throwing you 800-line error messages when you miss a semicolon, while the latter is downright pleasant to install, use, understand and debug in comparison.&lt;p&gt;[1] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;OpenFOAM&amp;#x2F;OpenFOAM-dev&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;OpenFOAM&amp;#x2F;OpenFOAM-dev&lt;/a&gt;&lt;p&gt;[2] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;pencil-code&amp;#x2F;pencil-code&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;pencil-code&amp;#x2F;pencil-code&lt;/a&gt;</text><parent_chain><item><author>gravypod</author><text>&amp;gt; Compared to C or C++ it has the advantages of better complex floating point number support and better control of reproducible math results&lt;p&gt;No it does not have better complex types. C++11 added std::complex which is a standardized implementation of complex types for all data sizes.&lt;p&gt;&amp;gt; And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.&lt;p&gt;These optimizations will only ever be made if Fortran has wide adoption.&lt;p&gt;These optimizations are probably already done in GCC&amp;#x2F;Clang. Fortran also misses out on a HUGE optimization that can be provided by the existence of explicit inlining from C&amp;#x2F;C++ and implicit optimizations from things like C++&amp;#x2F;Rust. There&amp;#x27;s also constexpr from C++ which, in C++17, will offer huge benefits to non-trivial code.&lt;p&gt;Most formulas can be expressed as an inline function or constexpr and as a result can, in some cases, see huge performance improvements from compiler optimizations.&lt;p&gt;&amp;gt; Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.&lt;p&gt;You can do this with Python. Or you could juse use Julia which is built for clustered environments, performance, IPC &amp;amp; machine-to-machine communication.&lt;p&gt;&amp;gt; And all of the well-tested high performance computing libraties are written in or support Fortran. The ecosystem is there.&lt;p&gt;So is with most of these languages. C++ is just as developed in this aspect, Julia is getting there but it&amp;#x27;s already ready for most applications.&lt;p&gt;&amp;gt; Don&amp;#x27;t assume things are done purely by inertia -- for big projects there are real reasons for the choices made!&lt;p&gt;I&amp;#x27;m not. I&amp;#x27;m assuming these decisions are made because people in physics&amp;#x2F;ME&amp;#x2F;chemistry are not programmers and don&amp;#x27;t know about the latest and greatest our field has to offer. It&amp;#x27;s our fault for not advertising our successes to these people.</text></item><item><author>dzdt</author><text>Fortran often IS the best language for the job, when the job is scientific number crunching.&lt;p&gt;Compared to C or C++ it has the advantages of better complex floating point number support and better control of reproducible math results.  And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.&lt;p&gt;Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.&lt;p&gt;And all of the well-tested high performance computing libraries are written in or support Fortran.  The ecosystem is there.&lt;p&gt;Don&amp;#x27;t assume things are done purely by inertia -- for big projects there are real reasons for the choices made!</text></item><item><author>gravypod</author><text>There is sadly a huge amount of Fortran code bases in science. Not old. Not left over libraries. Not software written for a bygone age.&lt;p&gt;No... New software. Huge, mission critical, core project, software.&lt;p&gt;The best part: No documentation, no maintainer, and no migration plan.&lt;p&gt;Scientists think in terms of how Units of Science per Units of Work. Translating code, learning new languages, testing, checking correctness, software validation, bug testing, or even just using external (non-science) libraries yield a very low science&amp;#x2F;work ratio.&lt;p&gt;Just opening a text editor, writing a language you already know, and calling it &amp;quot;good enough&amp;quot; is high science&amp;#x2F;work.&lt;p&gt;Their method of software validation usually boils down to &amp;quot;spit out your data, graph it, and see if it looks like what you expect&amp;quot;.&lt;p&gt;There&amp;#x27;s also this notion that &amp;quot;Fortran is fast&amp;quot; that MANY people hold for some reason. They don&amp;#x27;t know about what kinds of modern compiler optimizations they&amp;#x27;re missing out on and what new IPC frameworks are available. They know Fortran is fast, MPI is parallel, and that&amp;#x27;s what they use.&lt;p&gt;Right now I&amp;#x27;m looking at a codebase that is actively being developed and is written in Fortran. It&amp;#x27;s about 48,466 lines in total. The source is about 2.3M in size. No one seems to have formula listings for it. I want to rewrite it but pulling apart fortran is very difficult.&lt;p&gt;It&amp;#x27;s very scary that if I were to write the software in C that it would be seen as modern! This software is tax-payer funded and included in real time systems and production software.&lt;p&gt;(On that note if anyone is good at Fortran and can document the formulas in this software so I can rewrite them I&amp;#x27;d be happy! Please email me)</text></item><item><author>mynegation</author><text>Putting up two TL;DR filters right away:
US citizens only, Fortran codebase :-&amp;#x2F;</text></item></parent_chain></comment><story><title>NASA: High Performance Fast Computing Challenge</title><url>https://herox.com/HPFCC</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>stonogo</author><text>&amp;gt; I&amp;#x27;m assuming these decisions are made because&lt;p&gt;You&amp;#x27;re assuming wrong.  Feel free to join us in scientific computing and make your case.  Many have, and yet we still use fortran alongside the newer stuff.&lt;p&gt;Perhaps people who disagree with you do so out of something other than ignorance.  Just a thought.</text><parent_chain><item><author>gravypod</author><text>&amp;gt; Compared to C or C++ it has the advantages of better complex floating point number support and better control of reproducible math results&lt;p&gt;No it does not have better complex types. C++11 added std::complex which is a standardized implementation of complex types for all data sizes.&lt;p&gt;&amp;gt; And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.&lt;p&gt;These optimizations will only ever be made if Fortran has wide adoption.&lt;p&gt;These optimizations are probably already done in GCC&amp;#x2F;Clang. Fortran also misses out on a HUGE optimization that can be provided by the existence of explicit inlining from C&amp;#x2F;C++ and implicit optimizations from things like C++&amp;#x2F;Rust. There&amp;#x27;s also constexpr from C++ which, in C++17, will offer huge benefits to non-trivial code.&lt;p&gt;Most formulas can be expressed as an inline function or constexpr and as a result can, in some cases, see huge performance improvements from compiler optimizations.&lt;p&gt;&amp;gt; Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.&lt;p&gt;You can do this with Python. Or you could juse use Julia which is built for clustered environments, performance, IPC &amp;amp; machine-to-machine communication.&lt;p&gt;&amp;gt; And all of the well-tested high performance computing libraties are written in or support Fortran. The ecosystem is there.&lt;p&gt;So is with most of these languages. C++ is just as developed in this aspect, Julia is getting there but it&amp;#x27;s already ready for most applications.&lt;p&gt;&amp;gt; Don&amp;#x27;t assume things are done purely by inertia -- for big projects there are real reasons for the choices made!&lt;p&gt;I&amp;#x27;m not. I&amp;#x27;m assuming these decisions are made because people in physics&amp;#x2F;ME&amp;#x2F;chemistry are not programmers and don&amp;#x27;t know about the latest and greatest our field has to offer. It&amp;#x27;s our fault for not advertising our successes to these people.</text></item><item><author>dzdt</author><text>Fortran often IS the best language for the job, when the job is scientific number crunching.&lt;p&gt;Compared to C or C++ it has the advantages of better complex floating point number support and better control of reproducible math results.  And there is better possibility for compiler optimisation because the langauge semantics let the compiler know one array will not alias another.&lt;p&gt;Compared to Java, C#, or Python, or any other JVM language, it has the advantage of compiling to machine code for every relevant supercomputer and cluster architecture.&lt;p&gt;And all of the well-tested high performance computing libraries are written in or support Fortran.  The ecosystem is there.&lt;p&gt;Don&amp;#x27;t assume things are done purely by inertia -- for big projects there are real reasons for the choices made!</text></item><item><author>gravypod</author><text>There is sadly a huge amount of Fortran code bases in science. Not old. Not left over libraries. Not software written for a bygone age.&lt;p&gt;No... New software. Huge, mission critical, core project, software.&lt;p&gt;The best part: No documentation, no maintainer, and no migration plan.&lt;p&gt;Scientists think in terms of how Units of Science per Units of Work. Translating code, learning new languages, testing, checking correctness, software validation, bug testing, or even just using external (non-science) libraries yield a very low science&amp;#x2F;work ratio.&lt;p&gt;Just opening a text editor, writing a language you already know, and calling it &amp;quot;good enough&amp;quot; is high science&amp;#x2F;work.&lt;p&gt;Their method of software validation usually boils down to &amp;quot;spit out your data, graph it, and see if it looks like what you expect&amp;quot;.&lt;p&gt;There&amp;#x27;s also this notion that &amp;quot;Fortran is fast&amp;quot; that MANY people hold for some reason. They don&amp;#x27;t know about what kinds of modern compiler optimizations they&amp;#x27;re missing out on and what new IPC frameworks are available. They know Fortran is fast, MPI is parallel, and that&amp;#x27;s what they use.&lt;p&gt;Right now I&amp;#x27;m looking at a codebase that is actively being developed and is written in Fortran. It&amp;#x27;s about 48,466 lines in total. The source is about 2.3M in size. No one seems to have formula listings for it. I want to rewrite it but pulling apart fortran is very difficult.&lt;p&gt;It&amp;#x27;s very scary that if I were to write the software in C that it would be seen as modern! This software is tax-payer funded and included in real time systems and production software.&lt;p&gt;(On that note if anyone is good at Fortran and can document the formulas in this software so I can rewrite them I&amp;#x27;d be happy! Please email me)</text></item><item><author>mynegation</author><text>Putting up two TL;DR filters right away:
US citizens only, Fortran codebase :-&amp;#x2F;</text></item></parent_chain></comment><story><title>NASA: High Performance Fast Computing Challenge</title><url>https://herox.com/HPFCC</url></story>