7 ms·
Always interesting to me to see how much "IT-first" educated people think that Fortran is a dead language. While when learning physics first you will quickly se
by Flocular 5y ago
Always interesting to me to see how much "IT-first" educated people think that Fortran is a dead language. While when learning physics first you will quickly see how very much alive it still is (newest standard is "Fortran 2018" btw)
Every weather forcast you are seeing was computed using Fortran for example :P
- II2II 5y agoGranted this was about 20 years ago, yet when Fortran was still labelled as dead. Part of my undergraduate Physics degree involved programming in BASIC, the reason for this was that they felt it was both a readily available language and that it would make for a smoother transition to Fortran provided that we followed their stylistic guidelines. Sure enough, I was dealing with Fortran code a couple of years later. (In that case, it was legacy code but it didn't take much poking around to discover that modern versions were used for HPC.)
- _fat_santa 5y agoBack in college I had an internship at an aerospace company. I remember having the exact same thought that "Fortran is dead". I could not have been more wrong, Fortran at least at engineering shops is alive and well.
- satronaut 5y agoi love how fortran and matlab are in their own industrial bubbles
- aitchnyu 5y agoWhat is Matlab's moat? Did free software not catch up?
- blacktriangle 5y agoThe third party domain specific apps built on top of MATLAB is their moat.
- zozbot234 5y agoIt did - there's a free implementation known as Octave.
- Jtsummers 5y agoOctave does exist, but it’s not covering the full set of things Matlab does. If your work is focused on the computational math side it’s fine, but if you have any interest in the simulation stuffs Octave hadn’t caught up and wasn’t even trying to, at least when I last looked a few years ago.
- satronaut 5y agoit's good to know that it did; i switched over to general software engineering a few years ago (worked in aerospace before). My college taught matlab as a class, and required you to buy the student version.
- joeberon 5y agoIt's the toolboxes and also SIMULINK. SIMULINK + Signal Processing Toolbox + Control Systems Toolbox is incredibly powerful for Physics and I don't think free implementations really touch that
- snicker7 5y agoNASA switched from SIMULINK to ModelingToolkit (Julia) for modeling spacecraft dynamics [0]. They found that the latter was much easier and gave a 15,000x (!!!) performance improvement. [0]: https://www.youtube.com/watch?v=tQpqsmwlfY0 https://www.youtube.com/watch?v=tQpqsmwlfY0
- __alexs 5y agoThousands of professors that can't be bothered to learn Julia.
- adiM 5y agoI teach an undergraduate control course that uses Matlab. I'd love to use Julia (I use Julia for all my research) but last time I checked, it was not straight forward to interface to hardware using Julia (our labs use Matlab to control motors). There is a control systems package for Julia but it is no where as complete or polished as the Matlab control systems tookbox (or even the control systems package in octave).
- tobmlt 5y agoNo clue. Octave is here for us… so at least we can run their code and ask any pertinent questions to expedite the port. ;) (Yes I know it’s simulink for many, but I’ve met some pure computational folk who swear by matlab as their prototyping tool and python is a bug ridden rat nest of footguns to them.) C’est la vie
- progre 5y agoI have seen quite a lot of industrial machinery that are programmed in... LabView!
- ravenstine 5y agoWhy is that, though? Is it merely because it's been institutionalized, or is there an inherent advantage that Fortran has (over say C or Rust) for things like weather forecasting? By no means am I suggesting that it wouldn't have an advantage; I'm just a young whippersnapper who has never had the chance to write any Fortran.
- peawee 5y agoIt's designed first and foremost to be a language to help compilers turn large matrix math operations into automagically vectorized and parallelized operations. If Rust is the language for close-to-metal memory-safe systems programming instead of C, modern (F90 and later) Fortran is the language for close-to-metal high-performance computational programming instead of C. Thinking about it, I'd say the comparison to Rust for mastery of its particular domain is actually quite apt.
- tomrod 5y agoIt's a beautiful language! I cut my teeth on Matlab, and flipped a coin for Python or Fortran as my language to focus on after Matlab tried to charge our HPC center per core. Python won the toss, but I've always had a love for Fortran.
- zozbot234 5y agoRust is actually the first serious contender in this domain, given that it has native support for parallel, concurrent and distributed programming and also deals elegantly with the aliasing issue that hampers optimization in C/C++. It's nice to see that LLVM is getting an official Fortran frontend, it will ease interop (including with Rust) and make it easier to compare code generation across projects and languages.
- chaxor 5y agoIt's been my understanding that Fortran is loved by physicists due to it's procedural approach, and doesn't require learning objects and inheritance, etc. There's a lot to learn in higher level physics, so having the simplest language, without tons of features to fiddle with, while also being very, very performant is preferable. I have a feeling that much of this work end end up in Julia however.
- deleted 5y ago[deleted]
- hedberg10 5y ago> Does it still work > If yes, it's not dead Another point: This thinking cheapens learning. If you only learn, "what isn't dead", you stifle your curiosity and don't learn the whole picture of a thing.
- dahfizz 5y agoNobody is suggesting you only learn "what isn't dead". Experimenting with new tech is good. But you should also know _something_ about real, relevant tech and not just the bleeding edge, which will all disappear in a year.
- blippage 5y agoI was talking to a maths prof a year ago or so. It seemed that there was some Fortran stuff, although C++ seems the favourite. Personally, back in the days, I never really got into the NAG libraries. I found it easy enough to roll my own. Maybe some of the stuff can save you time, but I ended up preferring hand-coding my algorithms. The greatest thing to happen to Fortran was Fortran 90. None of that column malarky. Modules was kinda OK, but if I wanted to use well-structured code I probably wouldn't be starting with Fortran anyway. I don't think ANYONE I knew at the time used to new features other than format-free. I tried poking around with allocatable arrays at one point, but didn't like it. I guess it was Fortran's way of trying to be like C. One thing that is rarely discussed is that a programming language isn't just specification, but it is a culture and philosophy shaped by the programmers themselves. One guy made a reference to Cobol, and how object-orientation was an unused feature. He said that what the designers failed to consider is that Cobol programmers just don't "do" object-orientation. Fortran - even Fortran 77 (IIRC) has some nice little features, like being able to specify parameters in a separate file, and read them in one line. I doubt most of the other guys in the faculty were aware of that feature at the time. And my standard anecdote ... when I went to a new job, they actually had a little bit of programming in Fortran. We had Visual Fortran. I had to set up the environment to fiddle with something for a client. Set-up was straight-forward. I opened the project file, and the things opened and compiled without a single hitch. I was shocked - shocked I tell you - at how simple the set-up was. Normally one would expect endless futzing around to get the programming environment and libraries in place. But that's not the real anecdote. One day I was passing by a meeting room. I overheard an outside consultant in discussion with some of our guys about a replacement for Fortran. He was going on about how flexible the system would be, and hey, it you needed to set up extra parameters you could always add them to an XML configuration file he was proposing. And I thought to myself ... my God, that's complicated. In Fortran, you can read an array into a file in one statement. Bam! His method would have involved external libraries and some serious effort to get going. I always joke that people should be forced to write Fortran for at least a year. For those that want to be JavaScript developers, two years. That should make people think much more simply about what it is you're trying to do. A year ago I added programming microcontrollers to my list of things programmers should be forced to do. A resource-constrained environment should focus their minds a little more.
- krylon 5y agoWell, Fortran was intended for use in scientific computation. In the 1950s and 1960s, the percentage of computing time spent on scientific computation was much larger than it is today. So, naturally, Fortran had a much more prominent position back then. These days, scientific computing is a relatively minor niche, because people have found so many other things to do with computers that science is just one of many use cases. Fortran was aimed at a specific audience, scientists and engineers, and that audience seems - AFAICT - happy to keep using it. One may consider it an impressive success story. Personally, I have never used Fortran for anything beyond the hello-world-level, so I have no strong opinion on the language as such; I do know it has evolved a lot, probably more so than C.
- necheffa 5y agoFortran _is_ dead. I work with it professionally. The tooling is next to non-existent, the compilers are trash, the standards committee is in some weird backwards compatible with FORTRAN 66 circle jerk to the point where you can't have a sane modern revision (think the complete opposite problem as Python 2 -> Python 3). The only reason Fortran is still around is institutional inertia.