Live data from Hacker News

Why physicists still use Fortran (2015)

moreisdifferent.com

231–240 of 300 posts

Re: Why physicists still use Fortran (2015)

#231

Earlier quoted context omitted.

> which made him a pile of money May I ask how? I don't see ads or any other obvious monetization channels.

Rosetta is a protein folding bit of software: https://els.comotion.uw.edu/express_license_technologies/ros... GP is not talking about http://rosettacode.org/wiki/Rosetta_Code

Its a product of the UW, so no surprise the quality is crap. IMO their Cybersecurity course (which is mandatory for CS students) is the biggest load of shit I've ever seen in a class.

The head of information security at the UW calls the PSTN bulletproof secure, but VOIP insecure, then babbles on about how he shares classified info with his buddies casually (happens to be a felony to share said info).

Needless to say, UW's Avaya phone system barebacks the internet, with no regard for using silly security things like TLS or SRTP.

Re: Why physicists still use Fortran (2015)

#233
post #150

"Professors usually have this legacy code on hand (often code they wrote themselves decades ago) and pass this code on to their students. This saves their students time, and also takes uncertainty out of the debugging process." This is so true. I'm a PhD student in physics using Fortran for pretty much that reason. At the start of my PhD, in response to my supervisor telling me I should learn Fortran to modify our cu…

Yes, C++ does not buy you that much. Sure, it is a more modern language, but when used by scientists (not software engineers) the advantages are hardly earth shattering. Much of complexity is hidden (as it should be) into libraries. IMO, Python stands a better chance of breaking the Fortran's lock on physics related computing. Give it a few more years and enough numpy-based libraries might make Python a real competit…

>Give it a few more years and enough numpy-based libraries might make Python a real competitor.

A lot of Numpy is written in FORTRAN.

Re: Why physicists still use Fortran (2015)

#235

"Professors usually have this legacy code on hand (often code they wrote themselves decades ago) and pass this code on to their students. This saves their students time, and also takes uncertainty out of the debugging process." This is so true. I'm a PhD student in physics using Fortran for pretty much that reason. At the start of my PhD, in response to my supervisor telling me I should learn Fortran to modify our cu…

"Within a month of his arrival, Randy solved some trivial computer problems for one of the other grad students. A week later, the chairman of the astronomy department called him over and said, “So, you’re the UNIX guru.” "At the time, Randy was still stupid enough to be flattered by this attention, when he should have recognized them as bone-chilling words. Three years later, he left the Astronomy Department without…

Not useful if he wanted to be an astronomer, but a much more marketable set of skills if his goal was to find a job in industry. Probably also made a more positive (albeit uncredited/unrewarded) contribution to astronomy than most of the grad students.

Re: Why physicists still use Fortran (2015)

#236

Earlier quoted context omitted.

"Within a month of his arrival, Randy solved some trivial computer problems for one of the other grad students. A week later, the chairman of the astronomy department called him over and said, “So, you’re the UNIX guru.” "At the time, Randy was still stupid enough to be flattered by this attention, when he should have recognized them as bone-chilling words. Three years later, he left the Astronomy Department without…

I am unfamiliar with the passage. But it describes two options: 1. "A staggeringly comprehensive knowledge of UNIX", three years of domain-specific education, and a network of people who trust you to--no, who depend on you to be able to get things done with that knowledge 2. A piece of paper just like everyone else in the department. And while the former might be more difficult to make use of, I think it could be muc…

In context, he was underpaid tech support who was taken advantage of and got no grad school education while he paid for grad school. A bunch of scientists who know you as "that guy who fixes my email and doesn't publish or know anything" is not a great network.

Re: Why physicists still use Fortran (2015)

#237

Modern fortran is quite awesome for matrix manipulation. The ease of using it for math makes me wonder why we don't use it more often. The main downside to modern fortran is its I/O capabilities are quite stunted. I honestly think we need an open source fortran95 to gpu compiler.

Gcc does have a nvptx backend, and libgfortran supports it. Never tried it myself though.

Re: Why physicists still use Fortran (2015)

#238
In the late 90’s, I helped port a nuclear reactor simulator to Win32. It was around 20 million lines of Fortran and was actively developed by physicists and engineers (none were really software engineers). And, at that time the codebase was around 40 years old. Apart from disabling virtual memory, it worked on winDOwS nearly flawlessly on an COTS PC and ran about 50% faster than the fastest *nix test lab box.

It’s done mostly for historical tradition reasons, and it costs nontrivial time and money to switch.

Re: Why physicists still use Fortran (2015)

#239

Earlier quoted context omitted.

Fortran is easier to optimize compared to c/++ if you don’t use restrict for the c end. If you do use restrict (iirc) the compilers are competitive.

What I don't get is why someone doesn't make a superb template library with C++ that hides the restricts; it would make writing performant codes in C++ easier and you'd get the host of what C++ has to offer

[deleted]

Re: Why physicists still use Fortran (2015)

#240
post #70

I have a somewhat amusing FORTRAN story from my undergrad days at the Florida Institute of Technology... So my first programming class ever was a Numerical Analysis class taught at FIT, and to be honest, this was my first exposure to a "real" editor (vi on a PDP11 in this case)..up to then it was all MS-BASIC with that wonky line editor and, of course, goto-s and line numbers. At the end of the first class (8am ugh),…

I knocked out a bunch of lower division CS classes at a JC (taking 5 at a time). I think I went to the first class and a few before midterms and finals. Just got the labs and handed them in the next day.

Hurray for attendance-optional JCs! :D

Most of it transferred to an UC and then the fun began:

- caching http/1.0 forking select() proxy server as the third project in a networking class, circa 2002

- Java subset to MIPS assembly compiler

- Reimplement most of the OpenGL pipeline in C++, quaternions and write a trapezoid (scanline to scanline) engine (on which a triangle engine could be built). Oh and then model the interior of the building.

- Pipelined, microcoded, simple branch-predicting processor. Bonus points for smallest microcode and fewest microcycles. (I Huffman mapped the histogram of the sample assembly programs’ executed instructions to the user-defined binary macro ISA (students had to write the assembler too), and then used progressive decoding in the microcode (43 micro ops long microprogram IIRC). Blew the doors off the extra credit in that class.)

Post reply on HN