Compiling the original Matlab

If the linalg and similar procedures like these unique functions were in an fpm(1) package I could eliminate half the code in M_matrix (hint, hint). I Actually have a version of M_matrix now that allows for decently passing data in and out of a user program that is closer to the original intent of the original LA matlab version which I will probably put on the github site this week. It is certainly not going to compete with matlab/octave/R/mathematica … but I am finding it useful when working with Fortran for everything from non-hierarchical configuration files to creating quick unit tests even though it is nowhere near done. If no one else is interested I plan on making it more “Fortran-ish” as I have no intent of turning it into a language, but simply a Fortran tool, so do not expect it to stay upward-compatible with it’s current form.

But some of the uses I have been making of the M_matrix code got me thinking about LFortran,

Is there any plan for LFortran to be callable via an API from Fortran code compiled with other compilers? It looks like it will support the opposite direction, but I was wondering if I had a main program compiled with another compiler that I could not or did not want for sundry reasons to compile with LFortran could I “call” Lfortran and pass data to and from it? Since Fortran does not expose it’s data easily even something like putting something in my program like “call pass_to_Lfortran(X,name=‘mydata’)” would be interesting, I am picturing that I could “call” Lfortran and use Lfortran interactively to examine and manipulate the data, Looking forward to using Fortran interactively again (there used to be several F77 interpreters, which I think are all gone now) especially now that Fortran is so much more powerful.

1 Like