News for hackers. Stuff that matters.
Re:The Skills Gap for Fortran Looms Large in HPC by dagss on Wednesday May 03, 2023 @05:02PM (#35807758)
10 years ago or so I really wanted to NOT use Fortran for my PhD.

In my effort to try to use Python instead in my field, I fell down countless rabbit holes along the way (like being for a year or so one of the core contributors to Cython, in an effort to make "a better Fortran").

In the end though -- I decided it was time to just Get It Done, and just did what my supervisor had patiently and subtly hinted for years. Enough rabbit holes, just get it done in Fortran, and hand in the thesis...

I think what I learned most about (having an interest in compilers and programming languages) is the ignorance the rest of the programming language community, and computer science, has about the kind of things you are actually interested in when doing HPC. What kind of language features you care about and what idioms make sense.

Learning Fortran is super simple.. that is perhaps part of the problem that also people who are barely programmers can write (bad) programs in it. So what this must mean is simply a lack of programmers, full stop, being attracted to the field.

And...C++ is truly the most wrong language for this space there could be.

Re:The Skills Gap for Fortran Looms Large in HPC by shihab on Wednesday May 03, 2023 @05:37PM (#35808120)
I'm in a similar position as you were right now: a PhD student in HPC domain who really wants to/ needs to use C++ for everything ( I love Python but has now come to terms with its limitations). Your last sentence is scary for me to hear- can you please elaborate a bit?
Re:The Skills Gap for Fortran Looms Large in HPC by dan-robertson on Wednesday May 03, 2023 @05:57PM (#35808326)
Not sure what the parent meant but I always think of https://travisdowns.github.io/blog/2019/08/26/vector-inc.htm...
Re:The Skills Gap for Fortran Looms Large in HPC by jabl on Wednesday May 03, 2023 @06:35PM (#35808721)
Of all the commonly used languages, C++ is the most complex, baroque, and filled with subtle and not-so-subtle footguns. Of course with all that downside comes the upside that C and C++ are the lingua franca for low level programming where performance matters, not only HPC (yes, I hope Rust will be there one day, but I digress..). Fortran is pretty much limited to numerical computing, you're not going to find much Fortran libraries outside that domain.

So if you envision doing programming like that outside HPC after your PhD, C++ might be worth the investment.

But of course a lot comes down to what language other people in your group and your particular subfield, and what your supervisors are using. Doing a PhD is hard enough without being the odd guy out who's using a language nobody else in your community is using.

Re:The Skills Gap for Fortran Looms Large in HPC by cultureswitch on Thursday May 04, 2023 @03:01AM (#35812173)
Ever heard of Perl, PHP, JavaScript, sh or Fortran itself for that matter? Plenty of languages are far more "baroque" than C++.
Re:The Skills Gap for Fortran Looms Large in HPC by mathisfun123 on Wednesday May 03, 2023 @08:09PM (#35809595)
Ignoring all the cliche comments about C++ complexity I'm gonna say something that is a controversial opinion of sorts: if you're a PhD student in CS and you're doing systems research and you can't write/read passable C/C++ then you shouldn't be allowed to graduate.
Re:The Skills Gap for Fortran Looms Large in HPC by noobermin on Wednesday May 03, 2023 @09:53PM (#35810336)
CS is NOT computational science or HPC (generally).
Re:The Skills Gap for Fortran Looms Large in HPC by mathisfun123 on Thursday May 04, 2023 @12:25AM (#35811179)
>you're doing systems research
Re:The Skills Gap for Fortran Looms Large in HPC by KerrAvon on Wednesday May 03, 2023 @05:48PM (#35808238)
My god, though, why Python 10 years ago? There were better languages available then, like Ruby or Perl. Was NumPy just too big a thing even then?
Re:The Skills Gap for Fortran Looms Large in HPC by jabl on Wednesday May 03, 2023 @06:10PM (#35808486)
The scientific Python stack (numpy, scipy, matplotlib + a plethora of more specialized things) were definitely a very big thing 10 years ago. Deep learning was just on the cusp of taking off in a major way, but in traditional numerical computing python was very big before that.
Re:The Skills Gap for Fortran Looms Large in HPC by opportune on Wednesday May 03, 2023 @05:58PM (#35808328)
Ruby and Perl in HPC? I mean this in the nicest way possible if you’re being sincere, but I can’t tell if you are trolling or not
Re:The Skills Gap for Fortran Looms Large in HPC by rcoveson on Wednesday May 03, 2023 @06:18PM (#35808562)
I worked in an HPC lab at a medium-sized university around 10 years ago. Python was definitely the most popular interpreted language among the students. I remember it was years(?) earlier that MIT had switched much of its curriculum to Python.

Some older folks used Perl in places where others would've just written bash; mostly scripting invocations of actual number-crunching programs. Ruby would've raised some eyebrows for sure!

Re:The Skills Gap for Fortran Looms Large in HPC by LeonardoTolstoy on Wednesday May 03, 2023 @07:11PM (#35809086)
Yeah the switch was like '08 that MIT went to Python.
Re:The Skills Gap for Fortran Looms Large in HPC by whatshisface on Wednesday May 03, 2023 @05:58PM (#35808334)
I think it is far from a foregone conclusion that Perl and Ruby are better than Python, or were ten years ago.
Re:The Skills Gap for Fortran Looms Large in HPC by mylons on Wednesday May 03, 2023 @06:07PM (#35808447)
how are ruby and perl better solutions to how appalled you must be given your first sentence? if anything, they're just _different_ solutions that are based on personal preference and nothing more
Re:The Skills Gap for Fortran Looms Large in HPC by toddm on Wednesday May 03, 2023 @05:51PM (#35808265)
You're not going to get traction using Ruby or Perl for a Ph.D. in astrophysics :)
Re:The Skills Gap for Fortran Looms Large in HPC by ethbr0 on Wednesday May 03, 2023 @07:38PM (#35809325)
The only ones judgy-er about using the "wrong" language than computer scientists are engineers and other scientists.
Re:The Skills Gap for Fortran Looms Large in HPC by hilbert42 on Friday May 05, 2023 @09:18AM (#35828861)
I reckon that's very true but it's important in one's closed work environment. If one bypasses accepted practice then one must be very good or have very good reason or both.
Re:The Skills Gap for Fortran Looms Large in HPC by dekhn on Wednesday May 03, 2023 @06:44PM (#35808827)
perl had some history in bioinformatics but ruby and php never made any inroads into science or HPC to the level Python has. Python has almost entirely replaced perl in this context.

I chose Python over perl about 25 years ago and never would have considered ruby or php (both seemed squarely aimed at web developers not scientists). I believe Numeric Python was released around that time, and it was a revelation- especially to matlab users, who recognized the syntax and behavior.

Re:The Skills Gap for Fortran Looms Large in HPC by jamesfinlayson on Wednesday May 03, 2023 @09:38PM (#35810241)
Yeah I did some bioinformatics work years ago and there were still a few Perl things, but not many.
Re:The Skills Gap for Fortran Looms Large in HPC by darth_avocado on Wednesday May 03, 2023 @07:02PM (#35809000)
Python was definitely around and common 10 years ago. I did my Master’s 8 years ago and we had a python bootcamp for people not familiar with it and numpy was part of it.
Re:The Skills Gap for Fortran Looms Large in HPC by HybridCurve on Wednesday May 03, 2023 @07:31PM (#35809258)
I love perl but it is awful at signal handling. The threading and shared memory interface are not as good as other languages either.

Python has a low barrier for entry and can be useful immediately to newer programmers. It is also fairly well rounded.

That being said, I am not partial to python as OP was with fortran, and steer around it regularly.

Re:The Skills Gap for Fortran Looms Large in HPC by optimalsolver on Wednesday May 03, 2023 @06:12PM (#35808505)
>C++ is truly the most wrong language for this space there could be

What? Why???

I switched from Python to C++ because Cython, Numba, etc. just weren't cutting it for my CPU-intensive research needs (program synthesis), and I've never looked back.

Re:The Skills Gap for Fortran Looms Large in HPC by Aeolos on Wednesday May 03, 2023 @07:01PM (#35808995)
It's bloated beyond recognition and full of subtle and not so subtle footguns that you simply don't have to worry about in Fortran.
Re:The Skills Gap for Fortran Looms Large in HPC by vpastore on Friday May 05, 2023 @03:40AM (#35826378)
Gitgud
Re:The Skills Gap for Fortran Looms Large in HPC by bvoq on Thursday May 04, 2023 @02:18AM (#35811809)
C++ and Python. Ypu picked the two worst programming languages to learn.
Re:The Skills Gap for Fortran Looms Large in HPC by tpoacher on Wednesday May 03, 2023 @07:07PM (#35809046)
I can't remember the exact quote right now, but what you say echoes that quote that goes something like: If you make a tool that has such a low barrier to entry that it makes it easy enough for unskilled people to use it and inevitably write low-quality code with it, then that is the definition of a good tool.
Re:The Skills Gap for Fortran Looms Large in HPC by jandrewrogers on Thursday May 04, 2023 @01:35AM (#35811598)
I've both worked in HPC and written Fortran. C++ is almost always preferable because Fortran is too limited as a language outside of numerical code. Most HPC stopped being limited by the performance of numerical code 20 years ago. Instead, HPC codes were and are commonly limited by memory bandwidth and locality, two things C++ is almost uniquely suited for.

The kind of C++ written for HPC tends to be much simpler than the kind of C++ used to write e.g. database engines. The complexity of C++ is not that onerous in context and Fortran isn't exactly an exemplar of ease of use.