20 ms·
Is Fortran “A Dead Language”? (2022)
- pjmlp 3y agoNot only it is doing quite alright, latest versions 2003 onwards (latest is 2023), are quite confortable to use, offering almost a Python like experience, with a performance experience of 60+ years in compiler optmizations.
- mapreduce 3y ago"offering almost a Python like experience" Do you mean Python like easy syntax or do you mean Python like extensive std library? Never used Fortran but really curious to understand whether Fortran has good standard library support to try my hand at it. I've been doing Go and Python mostly and willing to learn one more language now and I'm trying to decide if it should be Fortran!
- medo-bear 3y agoIf you do anything related to numerical computations (which is a pretty huge field) learning Fortran wont be a waste of time. If you are doing anything else your time might be better spent elsewhere
- mapreduce 3y agoCan I request some more insights about it? If I want to be doing something else, why isn't Fortran a good fit? Lack of extensive stdlib like Python and Go?
- medo-bear 3y agoMine was not a statement about its stdlib or if Fortran can do something else well. Great majority of people in Fortran community are focused on numerical methods.
- rnhmjoj 3y agoBasically the only "stdlib" that Fortran gives you are some mathematical functions, super basic string and file operations and that's it. There are no APIs for networking, sockets, IPC, threads, etc. that pretty much al modern languages come with. Can you write a parser in it? Sure, but it's going to be painful dealing with strings. Can you write a web server? Yes, but you'd have to link to a C library that exposes the kernel TCP/IP interface to Fortran. And so, on. So, essentially it would be like using C without a libc: it's doable, but it doesn't really make sense.
- ivanpribec 3y agoA few of these things exist already: - http: https://github.com/fortran-lang/http-client https://github.com/fortran-lang/http-client - sockets: https://github.com/modern-fortran/tcp-client-server https://github.com/modern-fortran/tcp-client-server - threads: https://github.com/interkosmos/fortran-unix https://github.com/interkosmos/fortran-unix
- omgmajk 3y agoIt's a use the right tool for the job thing. Fortran is very fast, used primarily for scientific computing in various fields - not a lot of people are writing general purpose code in Fortran. Of course you can do it, but it's not a great experience and you'd spend a lot more time doing work you'd rather already have tools for.
- rnhmjoj 3y agoUnfortunately it's pretty much the opposite: Fortran doesn't have standard library, just a small set of "intrinsic" functions that a compiler must implement. Nonetheless, Fortran has built-in support for N-dimensional arrays, with vectorised operations (including custom functions), so the experience is pretty similar to Numpy.
- medo-bear 3y agoExcept that Numpy makes calls to foreign functions which are written in C, Cpp, or Fortran. It is also not in Python's stdlib. From the numpy website: NumPy brings the computational power of languages like C and Fortran to Python, a language much easier to learn and use.
- AnimalMuppet 3y agoDepends on your definition of "standard library". There are libraries that may not be "standard" (that is, included in the standard) but are standardly available on Fortran. You need a matrix solver that will efficiently handle large, sparse matrices of complex variables, that will not degrade when faced with a stiff problem? Fortran has one of those. You can get it on pretty much any Fortran installation. It's solid, stable, and there's decades of experience with using it. So, from that perspective, Fortran has a huge library. For numeric algorithms, virtually anything you want, it has.
- matrss 3y agoI think they mean "python like easy syntax", fortran certainly does not have a std library that contains e.g. a HTTP client or SMTP server (to my knowledge). Although I would say the "easy syntax" mostly applies to numerical code only, i.e. numpy code and the same computations in fortran would look very similar since fortran has similar syntax for vector-based computations, something that e.g. C does not have at all.
- labster 3y agoDo people actually use modern versions of Fortran though? I learned it in university in 2004, and we used Fortran 90 because F95 was considered “too new”, and one still encountered a lot of Fortran 77.
- ivanpribec 3y agoThey do. Some national HPC centers offer Fortran courses including elements of Fortran 2018 [1,2], including the latest features. (Disclaimer: I work at one.) The Intel Fortran compiler already includes some Fortran 2023 features [3]. [1] https://doku.lrz.de/programming-with-fortran-10746212.html https://doku.lrz.de/programming-with-fortran-10746212.html [2] https://doku.lrz.de/prace-course-advanced-fortran-topics-10746213.html https://doku.lrz.de/prace-course-advanced-fortran-topics-107... [3] https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-fortran-compiler-release-notes.html https://www.intel.com/content/www/us/en/developer/articles/r...
- kergonath 3y agoI’d evolved since then. Support for Fortran 2018 is reasonable in gfortran and you can count on almost all of Fortran 2008 and before.
- enriquto 3y ago> offering almost a Python like experience If you do scientific computing, the fortran experience is much better than python's. You never feel out of place. Multi-dimensional arrays of floats are a native type, loops are fast, and the system is extremely stable. What does python offer you? Lists, dictionaries, strings (none of which is of any use to scientific computing) and a plethora of slightly incompatible external libraries for dealing with matrices. Worse, there's no hope [0] that your algorithms based in numpy/scipy/numba/tensorflow/torch/jax will run unchanged in a decade, not to say in 50 years. [0] https://pythonspeed.com/articles/numpy-2/ https://pythonspeed.com/articles/numpy-2/
- Galanwe 3y agoYet reality contradicts you. > What does python offer you? Lists, dictionaries, strings (none of which is of any use to scientific computing) pandas/numpy/scipy/etc, so basically you get a blas/la pack equivalent, with a R/matlab feel. > there's no hope that your algorithms [...] will run unchanged in a decade, not to say in 50 years. Very few people care about that.
- deleted 3y ago[deleted]
- bitcharmer 3y agoI have no idea why you're getting down-voted. I've worked in finance/algo-trading for 15+ years. Went through shops like Goldman Sachs, Morgan Stanley, UBS, HSBC. Quants everywhere use CPP and Python, sometimes R. I've never seen Fortran used anywhere.
- medo-bear 3y agoIf they use Numpy in Python they surely use Fortran under the hood. Did you work in HFT? I would be very surprised if they used Python for that, and almost equally surprised if they all dismissed Fortran as an option. Besides the things you named, quants also use Excell (of course) but probably less known is K, which is an APL type language
- goku12 3y agoWhen you say 'python like' experience, does it support slicing and broadcasting like in Numpy or MATLAB? I'm preparing to learn Fortran as a complete beginner. I'm curious about the ergonomics of the language.
- sampo 3y ago> does it support slicing and broadcasting Slicing: yes. Broadcasting: I think only so, that you can operate on arrays by scalars, the scalar gets broadcasted.
- v9v 3y agonot sure if it's different from what you are saying, but the elemental specifier[0] makes functions broadcastable, such functions operate on each element of its input separately. [0] https://fortranwiki.org/fortran/show/elemental https://fortranwiki.org/fortran/show/elemental
- medo-bear 3y agoI think broadcasting in numpy is over rated. Its rules are complicated and ironically non-mathematical. Why should this be obvious? a = 5 b = np.array([1, 2, 3]) a + b >>> array([6, 7, 8]) Looking through the documentation you get the feeling you are learning a whole new language whose syntax could change under your feet. They would have done better to use something like APL :)
- enriquto 3y ago> Why should this be obvious? This is very natural, and consistent with standard mathematical notation. It's an abuse of notation so common that is barely ever mentioned in elementary mathematics. For example, when you work with functions f:R→R, like f:x↦3x², it is common to denote constants by their value. Thus you write 7 instead of x↦7. Then you can write simply f+7, where f is a function and 7 is a value, and everybody understands what you mean. No need to write ridiculously correct stuff like f+(x↦7) . Broadcasting with arrays is very natural if you interpret an array as a function of its indices. It is exactly the same thing as above! I second that we should be using APL anyways.
- inkyoto 3y agoIndeed, just like the rumours about the premature death of INTERCAL have been grossly overstated. For the INTERCAL freemasons have been tirelessly working in the midst of countless nights in the Lodge to complete the proposal to add support for Mayan numerals to INTERCAL. --------- Proposal for integrating Mayan numerals into INTERCAL Title: «The Mesoamerican rejuvenation of compiler language (MAYA-INTERCAL enhancement)» Objective: To intricately weave the ancient Mayan numeral system into the rich tapestry of INTERCAL, further enriching its already delightful amalgamation of Daedalian syntax and tangled operations. 1. Background and rationale As INTERCAL stands as a paragon of bleeding edge programming practices, it is only fitting that it embraces the Mayan numeral system, known for its base-20 vigesimal structure. This proposal promises to add another layer of intricate sophistication and enigmatic charm to INTERCAL, further challenging the brave souls daring enough to penetrate its nebulousness. 2. Mayan numeral representation Symbolic encoding: – Furry dot (*), representing the value of 1. – Prostrated bar (_), representing the value of 5. – Shell (O), representing zero. Example: The Mayan number for 19 (3 prostrated bars and 4 furry dots) would be represented as ___** in MAYA-INTERCAL. 3. MAYA-INTERCAL – syntax extensions New keywords: – MAYANIFY to declare a Mayan numeral. – TRANSMOGRIFY to convert between Mayan and standard INTERCAL numerals. – CALCULON for performing calculations with Mayan numerals. Syntax example: PLEASE MAYANIFY .#1 AS ___** – declares a Mayan variable. DO CALCULON .#1 WITH .#2 GIVING .#3 – performs an operational ritual with Mayan numerals. PLEASE DO NOT GIVE UP 4. Numeric operations Operations in MAYA-INTERCAL will follow an intentionally intricate system: – Addition involves a ritualistic dance around the base-20 system, where carrying over is not merely a matter of arithmetic, but a rite of passage. – Subtraction will be termed as the 'Reverse Ritual', involving comparable, yet not exceeding, complexities. 5. Entering Mayan numerals Mayan numerals, being sacred, can only be entered and accepted under very certain celestial conditions and divinations, otherwise the program will sacrifice itself. Syntax example: PLEASE ABSTAIN FROM READING MAYAN INTO .#1 UNLESS MERCURY IS IN RETROGRADE AND JUPITER ALIGNS WITH MARS IN VIRGO 6. Printing Mayan numerals Printing is not just a linear process; it is a multi-dimensional ceremony of revelation where the numeral eventuates in a complex Mojibake art form, respecting the vertical stacking and also adding a horizontal narrative and exquisite ASCII art. If a programmer has recently been penalised with a sacrifice, the output might be partially obscured or altered, representing the displeasure of the MAYA-INTERCAL dieties. 6. Error messages Error messages will be enigmatic, inspired by Mayan mythology and history. Example: «The gods are displeased with your sacrifice at Line 10. Consult the oracle (compiler log) for penance.» 7. Documentation: the Codex of MAYA-INTERCAL The documentation will be an epic saga, resembling ancient codices, filled with: – Detailed explanations professed to be chimeric tales. – Hieroglyphs and illustrations demonstrating concepts. 8. Community engagement: The Convocation of Coders Ventilate the proposal at the Grand Convocation, where devotees of INTERCAL foregather, preferably in thematic attire, to deliberate over the addition of these ancient numerals. 9. Implementation and compiler augmentation This involves: – Solidifying the proposal by way of embossing it into clay tablets and baking them in an oven until medium rare. – Consummating the compiler extensions to support Mayan numerals. – Ensuring that the new features introduce delightful mannerisms and whimsical behaviours.
- xioxox 3y agoAs someone who has to use Fortran for their job fairly frequently, I say Fortran is a pretty awful experience compared to Python. Although Fortran is good at arrays, it is terrible at any other kind of data structure. You don't get a standard set of useful data structures (e.g. associative map, k-D tree). Unless you like implementing such stuff, you have to look through a bunch of possibly-working half-implemented codes found using google. For something focused on numerics, it's lacking in standard IEEE numerical things such as a function to check for nan (GNU extension?!). There aren't an easy ways to do SIMD, excepting hoping the compiler does it for you. There aren't even standard numerical constants, so you get the joy of defining your own PI and hoping it doesn't clash with someone else's. Strings in Fortran are beyond awful, even with the new ability to reallocate string length. Then we come to the compilers. The commercial ones may be ok. I know the free ones are very buggy.
- Koshkin 3y ago> You don't get a standard set of useful data structures (e.g. associative map, k-D tree) Well, C does not have those, either... (I would not call using C "pretty awful experience" though.)
- d3w4s9 3y agoSo it does not provide good development experience as with Python, as said in that comment. Seems consistent to me? Nobody's comparing Fortran with C here.
- jabl 3y ago> For something focused on numerics, it's lacking in standard IEEE numerical things such as a function to check for nan (GNU extension?!) The IEEE_ARITHMETIC module has been part of the Fortran standard since Fortran 2003, and includes, among others, the IEEE_IS_NAN() function. (Supported in GFortran since version 5: https://gcc.gnu.org/gcc-5/changes.html https://gcc.gnu.org/gcc-5/changes.html)
- ivanpribec 3y agoThe "!omp simd" works very well IMO. In general however, the auto-vectorizer tends to do a pretty good job.
- gumby 3y agoI think the meaningful definition of “dead language” is “nobody will begin a new code base in it any more, except as a hobby or research project”. Pretty likely that’s the case with COBOL, definitely Algol, PL/1, Pascal, and Prolog. Though uncommon or domain specific, not the case with APL (well J), Common Lisp, Forth, or Haskell. I think there’s more new code being written in FORTRAN these days than in those last four combined.
- sspiff 3y agoThere's still a small-ish community working on and building new things with FreePascal.
- gumby 3y agoI may not be a Pascal fan but still I’m delighted to learn this.
- DeathArrow 3y agoSame for me. After using Basic on ZX Spectrum, Pascal was the first evolved programming language I've learned. And, at it's time, it was quite good.
- LeFantome 3y agoAlive, kicking, and actually supported by some decent cooling. https://www.lazarus-ide.org/ https://www.lazarus-ide.org/
- anta40 3y agoPascal is certainly not dead, at least some friends who are Delphi folks use it both for work and side projects. On the other side... not sure how many newbies learn Pascal these days, though.
- ahoka 3y agoSome people learn Latin and it’s used for naming organisms. Still a dead language.
- emadb 3y agoThe TIOBE Index [1] ranks Fortran at 12th place! Consider that Ruby is at 18th. In my opinion, this says a lot about the value of the index. [1] https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/
- sspiff 3y agoTIOBE index is sometimes very strange, but it takes into account available jobs as well. That said, their methodology has been challenged forever. Still interesting to see that languages like Fortran (12th) and Pascal (13th) are ranked higher than the most popular languages for mobile app development (Swift for iOS, ranked 16th, and Kotlin for Android, ranked 17th) or a highly praised and adopted language for new projects like Rust (only 19th!).
- AnimalMuppet 3y agoPretty sure that Kotlin is not the most popular language for Android development. That would still be Java.
- nairboon 3y agoOne day, dlang might even overtake cobol in the TIOBE index...
- daniel-s 3y agoSorry to be negative on the web, but the TIOBE index has no value whatsoever and is complete gibberish. Nobody should be paying attention to it. https://youtube.com/shorts/m76vWNr83wo https://youtube.com/shorts/m76vWNr83wo
- fasterik 3y agoI don't care one way or another about the TIOBE index, but that video is obnoxious and isn't making an argument or presenting data. Not sure why anyone would be convinced by this.
- 3y ago
- bartlettD 3y agoJim's article pretty much confirms my assumption that Fortran isnt "dead" but is instead more of a de-facto domain-specific language. If you're a meterologist, you'll probably be using Fortran just because all of the existing libraries are built for it. Unless you're doing scientific computing, Fortran is effectively dead.
- medo-bear 3y ago> Unless you're doing scientific computing, Fortran is effectively dead. Thats kind of like saying, unless you are doing systems programming C is effectively dead
- bartlettD 3y agoGood point, from a certain perspective all programming languages are dead and we're actually historical computer-lingusts.
- tovej 3y agoC is very much also alive in games programming, binary security research, embedded systems, HPC, and as a target language for simple compilers. Oh, and as the lingua franca of all foreign function interfaces. And there's still a thriving vommunity of people writing C purely for fun (e.g. see obfuscated c programming competition). I think it's completely fair to say that Fortran is dead because only physicists use it. And there is no way to justify any similar statement for C.
- medo-bear 3y agoI understand that C is far more used than Fortran. Of course I also dont think C is dead. I was trying to make a statement about saying Fortran is just alive in scientific computing. While this is mainly true, scientific computing is so huge that it is quite a big thing to be alive in it. And no, I don't think only physicists use Fortran. If you really think this then you probably dont quite understand the ecosystem of numerical computing. Besides if only Physicists use Fortran and is otherwise dead, I hardly think, for example, that AMD, Intel, and Nvidia would bother releasing optimizing compilers just for Fortran.
- Wwhisperer 3y agoJim's observation seems to be generally similar on other HPC clusters in other countries. A lot of scientific software, as I can confirm especially in numerical fluid dynamics, is written in FORTRAN or at least uses some libraries written in FORTRAN. The basis of numerical computing in form of the BLAS/LAPACK libraries is written in FORTRAN and has had a huge impact on everything in this part of computing. If I am not mistaken even the python libraries depend on BLAS/LAPACK, although they might be using implementations written in C or the like. Nevertheless, FORTRAN is still the work horse in a lot of computational scientific disciplines and should not be disregarded as being dead.
- physicsguy 3y ago"ECMWF’s Integrated Forecast System" I had to get this compiling and running this for a University HPC cluster a few years ago, and good lord, it was hell. Manually patching things all over the place to get it running.
- btbuildem 3y agoIt's one of my go-to models (for checking the weather, not for computing the results myself!), I didn't know that most meteo stuff runs on FORTRAN. In my experience with data-science and engineering code.. well, the fiery gauntlet of getting a large old project to run in a new place might not be the language's fault, but be related to the goals of the folks who first set it up.
- sampo 3y ago> I didn't know that most meteo stuff runs on FORTRAN. Not just most, but all. All weather models, all climate models. And I venture to guess: All ocean circulation models.
- dvh 3y agoI went to local job website and searched new jobs in last month: 365 java 324 javascript 299 python 69 c# 59 c++ 59 php 5 delphi 0 fortran So yes, I would say fortran is dead language
- sjducb 3y agoWas that all of the languages? Where are Go and Scala
- jokteur 3y agoIt's because all these jobs using Fortran are scientific research projects. It is not explicitly asked, but if you are doing high performance computing, chances are you will be using Fortran. Scientific codes live for decades. For example, I'm using a code that has been started in 1981. It is still very relevant and performant. Of course I wish I could use C++ or even Rust, but the fact is that (high performance) numerical computing is first class citizen in Fortran, which is not the case in C++ or Rust. I wish however that the tooling around Fortran wasn't stuck in the nineties.
- ivanpribec 3y agoBjarne Stroustrup on Fortran users [1]: > Fortran is harder to compete with. It has a dedicated following who [...] care little for programming languages or the finer points of computer science. They simply want to get their work done. [1] https://ieeexplore.ieee.org/document/4263269 https://ieeexplore.ieee.org/document/4263269
- Scarblac 3y ago3 of our 15 devs write Fortran, but we don't find them through dev job sites. They have PhDs related to hydrodynamic simulations and many of the people in the field know each other through conferences.
- _s_a_m_ 3y agoWho care who thinks what, a tweet, really? As if we have to agree on some pointless statements. In certain areas it is used, in others not. Now what? I really don't know what the point of such posts are. It is only relevant for people who want to go into scientific computing, and even there you have some GPU rewrites going on. So not everyone is using it but physicist etc. do. Also the legacy code is huge, like with C++.
- stabbles 3y agoI don't know what the state of things is right now, but if Fortran is the language of choice for HPC, then explain to me why it's so hard to write portable code that targets accelerators. Some folks have attempted to port Fortran projects to CUDA fortran, but that only targets Nvidia GPUs. Then there was openmp 5, but barely any compiler to target AMD gpus. New HPC projects are written in C++ exactly because it's much easier to target various GPUs in the same code base. Happy to be convinced otherwise, but this is what I've observed
- ivanpribec 3y agoHistorically, it has been easier for vendors to work in their own walled gardens, and get customers locked in, than it is to collaborate on open standards and APIs.
- jokteur 3y agoI agree with you. The thing is, compared to some of the scientific codes out there, GPU are quite recent. Sometimes, slapping OpenMP pragma on the code is not sufficient to take advantage of accelerators, and thus you would need a significant rewrite. But rewriting a scientific code is a daunting task. Often you have a code where there have been two decades of PhD and Postdocs fine tuning the scientific code, and the numerical schemes in the code do not correspond to the original article anymore. Nobody knows anymore exactly how the code works, and rewriting the code would require that the rewrite matches all the features of the original code (and reproduces the same results). It is basically an impossible task, especially when the labs don't have the resources to hire software engineers. In practice, nobody wants to rewrite scientific codes for GPU (and sometimes, the problem is fundamentally incompatible with GPU architecture). So as a compensation, they slap some OpenMP pragmas on some parts of the code, hope for the best, and anyways Nvidia clusters are more common than AMD (at least in the scientific world), so OpenMP barely compiling for AMD is not a problem. This means that legacy scientific codes are pretty much stuck with the CPUs. And in the scientific world, Fortran for HPC CPUs is still the language of choice.
- ivanpribec 3y agoOpenMP support in Fortran will improve as flang matures. In OpenMP 5.0 "#pragma omp requires unified_shared_memory" was introduced. At LLNL, they are are currently building El Capitan (https://www.datacenterknowledge.com/supercomputers/lawrence-livermore-national-lab-begins-building-el-capitan-supercomputer https://www.datacenterknowledge.com/supercomputers/lawrence-...), a supercomputer using AMD MI300A accelerators which support this concept. LLNL is also one of the OpenMP ARB members (https://www.openmp.org/about/members/ https://www.openmp.org/about/members/).
- ivanpribec 3y agoFor fun, I wrote a CHIP8 interpreter in Fortran recently [1]. Fortran is still heavily used in computational chemistry, computational fluid dynamics, marine engineering, nuclear engineering, reservoir engineering, and numerous other engineering fields. Volcanologists use it to predict ash dispersal [2]. Biomedical companies use it for cardiac electrophysiology. Econometrists use it to do tax research [4]. Plasma physicists use it to design magnetic confinement fusion devices [5]. Astrophysicists use it for relativistic magnetohydrodynamics [6]. NASA uses it for all kinds of fluid dynamics-related purposes [7] (read jet engines and rockets), and so do they at CERFACS [8]. For all I know, some integrated circuit manufacturers probably use it use it [9]. It's also used in ham radio and probably some military agencies [10]. It's used in vehicle crash testing [11]. It's used in combustion simulation software [12], fire dynamics [13], hydrometallurgy (ore leaching) [14]. US Geological Survey uses it for ground-water flow modelling [15]. We could go on and on. [1] https://news.ycombinator.com/item?id=38920486 https://news.ycombinator.com/item?id=38920486 [2] https://doi.org/10.1016/j.cageo.2008.08.008 https://doi.org/10.1016/j.cageo.2008.08.008 [3] https://www.elem.bio/index.html https://www.elem.bio/index.html [4] https://taxsim.nber.org/ https://taxsim.nber.org/ [5] https://doi.org/10.1016/j.cpc.2021.107986 https://doi.org/10.1016/j.cpc.2021.107986 [6] https://doi.org/10.3390/fluids9010016 https://doi.org/10.3390/fluids9010016 [7] https://fun3d.larc.nasa.gov/ https://fun3d.larc.nasa.gov/ [8] https://www.cerfacs.fr/avbp7x/ https://www.cerfacs.fr/avbp7x/ [9] https://en.wikipedia.org/wiki/SPICE https://en.wikipedia.org/wiki/SPICE [10] https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Code https://en.wikipedia.org/wiki/Numerical_Electromagnetics_Cod... [11] https://www.openradioss.org/ https://www.openradioss.org/ [12] https://en.wikipedia.org/wiki/CHEMKIN https://en.wikipedia.org/wiki/CHEMKIN [13] https://en.wikipedia.org/wiki/Fire_Dynamics_Simulator https://en.wikipedia.org/wiki/Fire_Dynamics_Simulator [14] https://youtu.be/-dvG270QttE?si=AO-ky0fGwkIEmXDx https://youtu.be/-dvG270QttE?si=AO-ky0fGwkIEmXDx [15] https://www.usgs.gov/mission-areas/water-resources/science/modflow-and-related-programs https://www.usgs.gov/mission-areas/water-resources/science/m...
- wiz21c 3y ago> For fun, I wrote a CHIP8 interpreter in Fortran recently What was the fun part ? CHIP8 or Fortran ? :-)
- dudeinjapan 3y agoWait... you guys don't program using punch cards? How are you supposed to do it then?
- Vaslo 3y agoThis comment is dead on. People here are somehow trying to sell a bunch of dead languages that only a small niche of people care about. Anything that can be done with these languages can be done with Python, Rust, etc just as easily if not easier. There’s a reason why they teach Python and not Fortran.
- fortran77 3y agoWhile I love and and still make a big chunk of money from Fortran consulting (mostly translating old Fortran to Python or Matlab) it’s not dead...but there’s little reason to start a new project in today. I hit a wall recently getting SciPy to work on a Windows Arm machine — because of lack of a Fortran compiler needed to build SciPy.
- osigurdson 3y agoI didn't read the article, but I'll bet $5 that the conclusion is it is not dead.
- Rayhem 3y agoPerfect example of Betteridge's law of headlines[1]. [1]: https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...
- Eddy_Viscosity2 3y agoSee [1] [1] https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...
- coliveira 3y agoFortran is more alive today than it was 10 years ago. If you didn't notice, a lot of numpy libraries is Fortran code, and they are improving this all the time. It is more used for scientific and machine learning programming nowadays than it ever was.
- ivanpribec 3y agoThe NumPy part is a misconception. Fortran is used in SciPy however.
- kergonath 3y agoIsn’t a chunk of Numpy’s C code just f2c’d Fortran code, though?
- osigurdson 3y agoThe same is being asked about Python: https://news.ycombinator.com/item?id=38969390 https://news.ycombinator.com/item?id=38969390
- mrhashem 3y agoYES. (if not, please kill it)
- pklausler 3y agoFortran is hardly dead, but neither is it is well. On the plus side, Fortran has more actively developed implementations than any other language. It is critical to some of the most important applications that exist. One can write code in the portable subset of Fortran and extract very high performance from very expensive HPC systems over many generations of processor and systems architecture. On the down side, advancement of the language has become moribund -- the last major standard was in 2008 and the two revisions since then have been minor. The standards committee creates new features from whole cloth without prototyping them, and without fixing the bugs in the spec when bugs are discovered eventually by implementors. There has been no standard public test suite since F'77, so implementations vary. There are highly portable features that are not standard and there are standard features now that are not portable. I'm working hard to try to improve this situation on the compiler side.
- dr-detroit 3y ago[dead]
- 616c 3y agoSounds like you're doing Gods work for mere mortals. How can we support that work?
- pklausler 3y agoFortran needs multiple healthy independent open-source implementations for production use. If you have the skill and inclination, please contribute fixes and features and bug reports and tests to GNU Fortran and LLVM Flang. Secondarily, Fortran could benefit from modern educational materials, public test suites, effective responses to misinformation, and better discussion sites.
- MaxBarraclough 3y ago> Fortran has more actively developed implementations than any other language Respectfully, I'm pretty sceptical of this. Do you have a source? I'd expect C to easily beat Fortran here. There's a C compiler (or several) for essentially every platform, as C is king for embedded work.
- buescher 3y agoFortran would have been a great programming language for embedded if the real-time extensions of the seventies had caught on. https://en.wikipedia.org/wiki/Industrial_Real-Time_Fortran https://en.wikipedia.org/wiki/Industrial_Real-Time_Fortran
- aworks 3y agoInteresting that I had never heard of this. I graduated in computer science from Purdue in 1981, my first job was working on a FORTRAN compiler and other development tools for commercial avionics embedded systems and then as an early adopter of Ada for same. But I don't know how much that domain overlaps with process control.
- redandblack 3y agoFor HPC, are there missing language features that Fortan coders need? Helpful to understand any HPC requirements
- deleted 3y ago[deleted]
- PeterStuer 3y agoIn case like me you wondered about 'VASP', it is a reference to the Vienna Ab initio Simulation Package, a computer program for atomic scale materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, from first principles. https://www.vasp.at https://www.vasp.at
- codexb 3y agoThis looks more like a case study of program language use for a specific set of scientists. Can someone explain why Fortran remains popular within the scientific community and not elsewhere?
- speedgoose 3y agoLegacy scientific code is my guess. Fortran isn’t that efficient[0] and many programming languages are preferred[1]. 0: https://states.github.io/files/j2.pdf https://states.github.io/files/j2.pdf 1: https://survey.stackoverflow.co/2023/#section-admired-and-desired-programming-scripting-and-markup-languages https://survey.stackoverflow.co/2023/#section-admired-and-de...
- kergonath 3y agoBecause it’s simple to grasp, easy to write, well-suited to the fields in which it is used (things like first-class multidimensional arrays, native complex numbers, good auto-vectorisers, things like OpenMP…), and quite efficient. It is quite interoperable (it’s easy to use anything that is callable from C). It’s easy to archive some code and be sure that it’ll run in the foreseeable future. Overall, it is a nice language to work with if you’re doing scientific computing. The rest of the world does not care much about its strengths.
- flobosg 3y agoList of projects using Fortran: https://github.com/Beliavsky/Fortran-code-on-GitHub https://github.com/Beliavsky/Fortran-code-on-GitHub
- ReleaseCandidat 3y agoWhat certainly died during the last years has been some of the last Fortran compiler companies: Absoft: https://fortran-lang.discourse.group/t/absoft-ceases-operation-on-sept-30-2022/4274 https://fortran-lang.discourse.group/t/absoft-ceases-operati... Lahey: https://fortran-lang.discourse.group/t/lahey-computer-systems-will-permanently-close-on-december-31-2022/4864 https://fortran-lang.discourse.group/t/lahey-computer-system... Looking at the licenses that I have had, which are SGI († 2009), Pathscale († 2011), Absoft († 2022) and Intel - Intel is to shut down in 2042.
- google234123 3y agoIt’s unfortunate c++ hasn’t added the few features needed to completely replace Fortran.
- fastneutron 3y agostd::mdspan can't come soon enough...
- pklausler 3y agoWhat are those few features?
- google234123 3y agoDestructive move, restrict, better array/matrix handling (at least nice syntax), maybe ability to make functions as pure
- Koshkin 3y agoIMHO Fortran 66 was the best Fortran ever. Simple, efficient, true to its nature. Fortunately, some of the modern compilers (like e.g. Intel's) still support it.
- seanhunter 3y agoFortran will never die because a sufficiently determined real programmer[1] can write fortran code in any language. I have had the misfortune to encounter plenty of fortran code written in perl, C, C++, Java, SQL and even Python. [1] https://sac.edu/AcademicProgs/Business/ComputerScience/Pages/Hester_James/Real%20Programmer.htm https://sac.edu/AcademicProgs/Business/ComputerScience/Pages...
- Koshkin 3y agoIn all seriousness, some of those could be actual translations from Fortran!
- seanhunter 3y agoYes, or from code snippets from “Numerical Recipes” or just from people with limited programming skills basically TRANslating FORmulas directly from maths by brute force of will into code. There’s only so many ways you can write df_dx = (f(x+delta) - f(x))/delta …or whatever after all- it just isn’t that different no matter what programming language you use. I’ve just looked at way too much quant code over my career. My dad, for example used to write chemical models and started to program on mainframes in fortran. Every now and again he would ask for help porting his models (now in basic or whatever) to a new platform and it was always the same : tens of global variables all with names which were one letter and one digit and no logic to them[1]. [1] Typical conversation: “What’s this formula supposed to actually calculate dad?” “It’s the concentration. You could just use d2 instead.” “Dad you’ve got d0, d1, d3, d4 and d5 but no d2.” “Oh I must have removed that”. “Well how am I supposed to calculate it?” “Just use Newton Raphson” (It was always Newton Raphson.)
- RagnarD 3y agoFortran is still a heavily used language in engineering applications, in my experience. I have the sense that quite a few programmers think that only systems geared for web development actually exist. This is a very narrow and false view.
- NikkiA 3y agoProgramming languages don't 'die', they merely sleep until someone gets interested in them again. For example, in certain hipster areas of the programming web, there's plenty of interest in all of the flavours of Algol.
- animeepisode 3y agoYes, you can say
- rideontime 3y agoyou forgot to shill your website