Earlier quoted context omitted.
Numpy actually explicitly doesn't need fortran. It will use some fortran lapack libraries for optimizations if they're present, but it doesn't depend on fortran at all. Scipy is a different story. The need for a fortran compiler was a big part of the original rationale for the divide of numpy and scipy when they replaced numeric. Numpy was meant to be the lighweight/core version of things, and scipy was the full-fled…
I'd like to write some Fortran, but there are a few libraries I need like database access and I'd be set.
Fortran.io – a Fortran Web Framework
201–210 of 255 posts
Re: Fortran.io – a Fortran Web Framework
#202Re: Fortran.io – a Fortran Web Framework
#203Earlier quoted context omitted.
Well, things like... you have 2, 2 dimensional arrays of the same size, A and B. You want to make a new array, where each cell in A is added to the same cell in B. So you are going to do a loop over 2 variables, right? in FORTRAN the code is... C = A + B in Julia the code is C = A .+ B
Interesting. Does it result in a compile error if you try arrays of different sizes? (If it's just a run time error, I don't see how it's different to implementing this with operator overloading in any language that supports it).
Different shape for array assignment at (1) on dimension 1
Note that a scalar is conformable to any array, so that A = 2 for example would work for any shape of A, and would fill A with 2's.Re: Fortran.io – a Fortran Web Framework
#204Earlier quoted context omitted.
Numpy actually explicitly doesn't need fortran. It will use some fortran lapack libraries for optimizations if they're present, but it doesn't depend on fortran at all. Scipy is a different story. The need for a fortran compiler was a big part of the original rationale for the divide of numpy and scipy when they replaced numeric. Numpy was meant to be the lighweight/core version of things, and scipy was the full-fled…
Yep! Seconding what you said: A key aspect is that it’s very easy to write fast matrix math in Fortran. Vectorized operations are downright pythonic! I was amazed how much more complex things were when moving to C++ (as opposed to C or C written in cpp files which you’ll find in academia and some books). Of course, that ease is a hazard when all the modern (i.e. fun) sci-eng software development is in C++. Do not gro…
Could you elaborate a bit on this? I think I know what you mean, but I'd like to hear more if you don't mind.
Re: Fortran.io – a Fortran Web Framework
#205Earlier quoted context omitted.
I think that's pretty disingenuous. The fact that my cousins and myself are around doesn't mean that my grandparents aren't dead. Latin is certainly a dead language, even though it has living descendants.
Is 1900-AD English "a dead language" because nobody who spoke it natively is still alive? What about 1800, 1700, or 1000? What year did English die and if it did indeed die, what are we speaking now? The reasons for considering English circa 1000 and English circa 2020 to be "different stages of the same language" but Latin and French to be "different languages" are an arbitrary cultural distinction not rooted in sci…
Re: Fortran.io – a Fortran Web Framework
#206Earlier quoted context omitted.
I think that's pretty disingenuous. The fact that my cousins and myself are around doesn't mean that my grandparents aren't dead. Latin is certainly a dead language, even though it has living descendants.
Is 1900-AD English "a dead language" because nobody who spoke it natively is still alive? What about 1800, 1700, or 1000? What year did English die and if it did indeed die, what are we speaking now? The reasons for considering English circa 1000 and English circa 2020 to be "different stages of the same language" but Latin and French to be "different languages" are an arbitrary cultural distinction not rooted in sci…
Re: Fortran.io – a Fortran Web Framework
#207Earlier quoted context omitted.
Lots of number crunching code relies on Fortran libraries even today. Install numpy, it will pull in Fortran stuff.
Numpy actually explicitly doesn't need fortran. It will use some fortran lapack libraries for optimizations if they're present, but it doesn't depend on fortran at all. Scipy is a different story. The need for a fortran compiler was a big part of the original rationale for the divide of numpy and scipy when they replaced numeric. Numpy was meant to be the lighweight/core version of things, and scipy was the full-fled…
Re: Fortran.io – a Fortran Web Framework
#208Google has this thing called “Testing on the Toilet” where they post factoids about Google’s codebase and best practices. I read one and it said FORTRAN is a highly secure language (or there haven’t been any security vulnerabilities found in the language in a while). Devil’s advocate for not writing FORTRAN off completely at first sight.
Or is it just because no one uses it? Apple used to run ad campaigns about how Macs were immune to viruses and therefore highly secure. Turns out enough people just weren't using Mac, and viruses started popping up once it went mainstream.
Re: Fortran.io – a Fortran Web Framework
#209Let’s all get good at Fortran in 3 Months get those cushy six figure salary jobs those Fortran devs make building web apps, sounds easy enough.
Re: Fortran.io – a Fortran Web Framework
#210Earlier quoted context omitted.
What are the highlights of Fortran's array manipulation capabilities?
Well, things like... you have 2, 2 dimensional arrays of the same size, A and B. You want to make a new array, where each cell in A is added to the same cell in B. So you are going to do a loop over 2 variables, right? in FORTRAN the code is... C = A + B in Julia the code is C = A .+ B
Fortran gets its performance from prohibition of aliasing, which is something that C++ admits as per the standard. One could enable the same performance boosts with a non standard compiler flag, but this breaks a lot of codebases, including the Linux kernel AFAIK.
Aliasing is a pox upon the world. There's a lot of work gone into stuff like UBSan for C++. I think aliasing should be added to stuff that it checks for. Dunno how much overhead that would be though.