I hear everywhere Julia >>> Fortran >>>>> Matlab for math tasks (solving and simulating macro/finance models). Can you confirm?
The case for Fortran
-
I hear everywhere Julia >>> Fortran >>>>> Matlab for math tasks (solving and simulating macro/finance models). Can you confirm?
Matlab is the slowest among them. If you work with modern macro model at some point you will need speed, for example to calibrate your model. My personal preference is Fortran over Julia for the reasons I presented in previous posts. The key issue here is an natural way of writing parallel programs in Fortran, using coarrays, and running them on a couple of hundreds of cores without drastically rewriting a sequential code. Fortran is a natively parallel language.
-
I've never used object-oriented programming in my career. Structural IO bro here
I did not use it at the beginning. Once I invested two/three weeks in learning about OOP it dramatically increased reusability of my codes and significantly shortened development time. OOP is great for writing libraries which can be then reused in many projects.
-
PLEASE, if you do not know modern Fortran (or if you do not know the difference between FORTRAN and Fortran), do not comment on the strengths or weaknesses of Fortran. Modern Fortran is not your father's FORTRAN (66 or 77 or 90 or 95). I am a heavy daily user and teacher of MATLAB, Python, R, and C/Fortran. The horrible syntax of C/C++ for mathematics makes it an absolutely odd choice for writing scientific code. Yes, if you have spent 10 years of academic life in Computer Science, you will likely (only likely) know how to efficiently and conveniently write performant C/C++ code. But a typical scientist with already 10-15 years of day and night academic education in some domain cannot spend another 10 years to master the many variants and libraries of C/C++ for such trivial tasks as creating a multidimensional array and similar.
The other languages are outright too slow for any serious large-scale scientific programming. I frequently use Python (Gensim and other similar packages) for Natural Language Processing. But I frequently find it insufficient, to the extent that I often have to rewrite parts of the tasks in Fortran. Guess what? The NLP task that took 4 hours in Python, was accomplished in less than 4 minutes via a Fortran code that I wrote in an afternoon.
And then you see Julia fanatics jumping into every discussion here and there. But the truth is that there is so much hype around Julia, primarily driven by the "for-profit" JuliaComputing company behind it. The current state of Julia is nowhere, I repeat, nowhere near the stability and maturity of modern Fortran. Having an interactive Jupyter environment for coding is nice, but that's a cheap shot by Julia fans, given that almost every other language, including Fortran, has Jupyter binders nowadays.Please state how much experience you have in using or learning modern Fortran before commenting on its qualities here.
-
Whatever, Zhang.
Now back to work. Chop chop!
PLEASE, if you do not know modern Fortran (or if you do not know the difference between FORTRAN and Fortran), do not comment on the strengths or weaknesses of Fortran. Modern Fortran is not your father's FORTRAN (66 or 77 or 90 or 95). I am a heavy daily user and teacher of MATLAB, Python, R, and C/Fortran. The horrible syntax of C/C++ for mathematics makes it an absolutely odd choice for writing scientific code. Yes, if you have spent 10 years of academic life in Computer Science, you will likely (only likely) know how to efficiently and conveniently write performant C/C++ code. But a typical scientist with already 10-15 years of day and night academic education in some domain cannot spend another 10 years to master the many variants and libraries of C/C++ for such trivial tasks as creating a multidimensional array and similar.
The other languages are outright too slow for any serious large-scale scientific programming. I frequently use Python (Gensim and other similar packages) for Natural Language Processing. But I frequently find it insufficient, to the extent that I often have to rewrite parts of the tasks in Fortran. Guess what? The NLP task that took 4 hours in Python, was accomplished in less than 4 minutes via a Fortran code that I wrote in an afternoon.
And then you see Julia fanatics jumping into every discussion here and there. But the truth is that there is so much hype around Julia, primarily driven by the "for-profit" JuliaComputing company behind it. The current state of Julia is nowhere, I repeat, nowhere near the stability and maturity of modern Fortran. Having an interactive Jupyter environment for coding is nice, but that's a cheap shot by Julia fans, given that almost every other language, including Fortran, has Jupyter binders nowadays.
Please state how much experience you have in using or learning modern Fortran before commenting on its qualities here. -
Fortran is totally garb@ge. The implicit none keyword and default single-precision numerics are more than enough to drive any sane users away. Julia is much faster and easier than Fortran. TBH, I find it offensive to compare Julia to Fortran.
-
Python user here who probably writes faster code than most of you Fortran people.
It's really not that hard to master the subset of Python that works well for Numba. And then... you have basically Fortran speed when you want it, immersed in a vastly more modern environment. It's not perfect, but it's pretty great, and produces far better and more readable code than Fortran.
-
Python user here who probably writes faster code than most of you Fortran people.
It's really not that hard to master the subset of Python that works well for Numba. And then... you have basically Fortran speed when you want it, immersed in a vastly more modern environment. It's not perfect, but it's pretty great, and produces far better and more readable code than Fortran.You seem...ill-informed.