stdlib
Fortran-code-on-GitHub
Our great sponsors
stdlib | Fortran-code-on-GitHub | |
---|---|---|
14 | 9 | |
975 | 259 | |
3.8% | - | |
9.6 | 9.8 | |
3 days ago | 3 days ago | |
Fortran | ||
MIT License | The Unlicense |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
stdlib
-
SciPy: Interested in adopting PRIMA, but little appetite for more Fortran code
Hopefully, the SciPy community can stay open-minded about modern Fortran libraries.
Modern Fortran is quite different from Fortran 77, while being as powerful, if not more.
In addition, there has been a significant community effort on improving and modernising the legacy packages, the ecosystem, and the language itself.
With projects like LFortran (https://lfortran.org/), fpm (https://github.com/fortran-lang/fpm), and stdlib (https://github.com/fortran-lang/stdlib), I believe that Fortran will enjoy prosperity again.
-
Have you used Fortran for anything other than scientific programming? How is it, and how does it compare to other languages?
They're currently working on a Fortran standard library and it's pretty far along: https://github.com/fortran-lang/stdlib
-
Why Fortran?
I also like FPM and the ecosystem. In case anyone is just getting started with Fortran, definitely checkout the Fortran Standard Library project:
https://github.com/fortran-lang/stdlib
-
return value of get_command_argument() and allocatable 1D array
In general, it is necessary to know the length of a string in Fortran before using it. There is no general string with unspecified strength. Some libraries do provide such an object (e.g. Fortran Standard Library, but it is not available in the standard language. To obtain the length of the string in your example, you could use the length option in get_command_argument as integer :: clen character(len=:), allocatable :: string_b call get_command_argument(2, length=clen) allocate(string_b(clen)) string_b = '' call get_command_argument(2, string_b) write(*,*) string_b deallocate(string_b)
- Boost:Boost
-
A Modern Fortran Scientific Programming Ecosystem
If you need to clear memory in the local scope, you need to deallocate a variable explicitly. Otherwise, all Fortran variables are cleared automatically when they go out of scope. One exception are Fortran pointers (different from C pointers) which are discouraged unless really necessary. We have a discussion for a high-level wrapper for files here: https://github.com/fortran-lang/stdlib/issues/14. So, it's in scope we just haven't gotten far with the design and implementation.
-
"The State of Fortran" -- accepted for publication in Computing in Science and Engineering
FYPP syntax is ugly, but is the best tool available for now to build the Fortran stdlib. People do not have to use the FYPP version of stdlib. There is also a clean post-processed version of the stdlib completely free of FYPP or any other FPP, which looks great: https://github.com/fortran-lang/stdlib/tree/stdlib-fpm
-
Cube-root and my dissent into madness
What if we try to evaluate this using standard-compliant Fortran? Interestingly, this is an open issue in the fortran-lang/stdlib project. f90 real(8) function f(x) real(8) :: x f = x**(1d0/3d0) endfunction I know real(8) isn't standard compliant but fixing that for this tiny example would be a headache. Then, compiling with -O3 gets us f_: movsd xmm1, QWORD PTR .LC0[rip] movsd xmm0, QWORD PTR [rdi] jmp pow .LC0: .long 1431655765 .long 1070945621
-
Learning Functional programming. Which languages to learn.
learn Fortran (supports both FP and OO, but when we say Fortran we think FP mostly). And the best way to learn is contributing. You can checkout their GitHub org (Fortran-lang) and you might be astonished to see that you too can make contributions there. But you should be ready to learn and search things on your own as well. They have a discourse group too, if you get stuck somewhere. Good luck. At the moment of writing this post they have a good first issue (Greatest Common Divisor) on their stdlib repo.
-
Fortran Web Framework
I recently started learning Fortran for a lark. It reminds me a lot of R, in some respects. It's clearly a very, very good language for doing the parts of one's job that are very math-centric. But it's equally underwhelming as a general purpose programming language.
Largely, I think, due to gaps in the library ecosystem. But there are other challenges. You can see from the install instructions on the linked page, for example, that Fortran still lacks a package manager.
What's interesting, though, is that that's changing. There are currently serious efforts to give it a "standard" library (https://github.com/fortran-lang/stdlib) and package manager (https://github.com/fortran-lang/fpm).
And I've been watching the new LFortran compiler (https://lfortran.org) with extreme interest.
Fortran-code-on-GitHub
- Fortran 2023 has been published
-
Any help or tips for Neural Networks on Computer Clusters
The hints in place ("there is more infrastructure already available outside Fortran, consider using them instead"). Beliavsky's compilation Fortran code on GitHub with its section about neural networks and machine learning still may be worth a visit e.g. how let Fortran reach out for the implementations in other languages.
-
Is Fortran good to program IA ?
There is an interesting directories compiled about projects around Fortran, Fortran code on GitHub. Though artificial intelligence does not appear by name, section Neural networks and Machine Learning may provide an entry.
- Directory of Fortran codes on GitHub, arranged by topic
-
how do you deal with not having common useful functions and data-structures that languages like c++ have?
My list of Fortran codes on GitHub has a section Containers and Generic Programming with some of the data structures you mention.
-
Why Fortran is easy to learn
There's modern stuff being written in astro(nomy/physics) (I can attest to some of the codebases listed in https://github.com/Beliavsky/Fortran-code-on-GitHub#astrophy... being modern, at least in terms of development), but I'd say C++ likely does have the upper hand for newer codebases (unless things have changed dramatically last time I looked, algorithms that don't nicely align with nd-arrays are still painful in Fortran).
I've also heard rumours of Julia and even Rust being used (the latter because of the ability to reuse libraries in the browser e.g. for visualisation), but the writers of these codebases (and the Fortran/C/C++/Java) are unusual—Python and R (and for some holdouts, IDL) are what are most people write in (even if those languages call something else).
-
Ask HN: What tools do people use for Computational Economics?
"QuantEcon:Open source code for economic modeling" https://quantecon.org/ has Python and Julia versions. The Federal Reserve uses Julia in its macroeconomic models: https://frbny-dsge.github.io/DSGE.jl/latest/ . Some economists use Fortran (which is much modernized since FORTRAN 77), and there is a 2018 book Introduction to Computational Economics using Fortran https://www.ce-fortran.com/ . Some Fortran codes in economics, statistics, and time series analysis are listed at https://github.com/Beliavsky/Fortran-code-on-GitHub .
-
Climate Change Open Source Projects on GitHub
At the "Fortran Code on GitHub" repo https://github.com/Beliavsky/Fortran-code-on-GitHub there are many codes listed in the "Climate and Weather" and "Earth Science" sections.
-
A simple string handling library for Microsoft Fortran-80
Fortran 77 and later versions (most recently Fortran 2018) have strings. There is the limitation that the elements of an array of strings must have equal length, so that ["boy","girl"] is invalid but ["boy ","girl"] is. Libraries for manipulating strings in Fortran are listed at https://github.com/Beliavsky/Fortran-code-on-GitHub#strings .
What are some alternatives?
fpm - Fortran Package Manager (fpm)
cmake-cookbook - CMake Cookbook recipes.
MYSTRAN - MYSTRAN is a general purpose finite element analysis solver
dockcross - Cross compiling toolchains in Docker images
fortran-lang.org - (deprecated) Fortran website
neural-fortran - A parallel framework for deep learning
pyplot-fortran - For generating plots from Fortran using Python's matplotlib.pyplot 📈
string - Microsoft FORTRAN-80 (F80) string handling library. Simple, fast, mostly FORTRAN.
prima - PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
ftl - The Fortran Template Library