Way back in Fortran goals for 2022 I said I’d love to see LFortran usable for simple interactive tasks. It’s come a long way since then. Thanks to @certik’s hard work it seems like it is pretty much there!
I recently made a little tool to share REPLs between agents and humans (via Claude Code, Pi, Codex etc), and added an LFortran demo. This one is still in progress a little as LFortran develops but pretty cool to see IMO
You have used the LFortran’s REPL more than I did — it looks like you can use non-trivial projects like fplotlib just fine from it?
Everything you are doing I want to be the user of it too, those ideas I had in my head when I started LFortran, but it took exactly 9 years to get to this point, I believe I did the first (exploratory) commit in November 2017. Back then it was quite novel to think that Fortran could be interactive. Hopefully now it’s obvious that’s the way to do it.
And I wasn’t sure exactly what AI will do with the importance of REPL, but your idea to simply have an agent control a client and you (human) control another client and collaborate, that makes perfect sense. This will be amazing for exploratory work. The agent does all the hard work and you do the fun part of just playing with things.
I remember implementing Chebyshev filtering as an eigensolver right around 2017 or so, I did it in Python in a Jupyter notebook, did lots of plots, ensured that it works, then translated to Fortran, made some mistakes in the translation, had to fix those, etc. Now we can use LFortran’s REPL, fplotlib, jupyter and your agent as another client. The agent implements it and sets up some convergence plots, and I play with it, run it by hand, ensure the API is good and pleasant to use, and do different plots and iterate with the agent until I am happy. And then just copy & paste it to my production code.
Amazing, thank you! And yes it seems like you can… tho I have to admit I just asked my agent — it seems like this is a cool plotting library for fortran can we try using this? And it worked (The embedded visualisation is from my agent-markdown-preview lib tho). Excited to keep working on this!