News for hackers. Stuff that matters.
Re:Potential of the Julia programming language for high ener... by jampekka on Monday December 04, 2023 @06:42PM (#38524880)
Yes, but Fortran is outright hell outside mathy stuff.

C++ has the features as a language to be almost Fortran level pain for math heavy. But the libraries tend to fall short. E.g. Eigen kind of does it, but it will just explode with a thousand line compile error when you least expect it. Also it's missing some quite elemental stuff like ND arrays. And getting code to work across even minor Eigen versions is a crapshoot.

Xtensor seems to have some potential, although it was too buggy to use back when I last tried it.

However, due to many fundamental design mistakes in C++ I'm not really expecting any code, including math heavy, to be very plesant or productive in it.

Re:Potential of the Julia programming language for high ener... by m_mueller on Monday December 04, 2023 @08:29PM (#38525853)
Why would you need Fortran for anything other than math? To put it differently, what’s the problem with just using 2 languages, e.g. Fortran plus Python with f2py?
Re:Potential of the Julia programming language for high ener... by adgjlsfhk1 on Monday December 04, 2023 @11:30PM (#38527108)
Sometimes you want to write fast code for things that aren't purely numerical (e.g. any string processing such as CSV/Arrow/JSON etc) or things that are mostly numerical but benefit from abstractions (like generic algorithms so you can run programs in arbitrary precision or autodifferentiation). Fortran is pretty good for writing 3 loops over a double precision matrix.

Aside from "why not Fortran" the "why not 2 languages" is because moving your implimentation to a language few of your users know creates a big barrier between users and developers of your code. In Python, ~90% of users don't even know the language that the packages they use are written in which makes it a lot harder for them to become contributors. Using a single language means that as users learn how to use libraries they are also learning how to contribute to them in the future.