LLM as translators for Cobol code to Java or Go should be attempted. And Shut down the IBM mainframe rent seek business for good permanently.
The soon to be GCC 15 release will contain a COBOL frontend. Also other non mainframe compilers have existed for a long time, both proprietary and FOSS. Thus, availability of a compiler is but a small piece of the puzzle. The real problem is the spider web of dependencies on the mainframe environment, as the enterprises business processes have been intertwined into the mainframe system over decades.
Translate Fortran to C++ with AI and RAG
31–40 of 49 posts
Re: Translate Fortran to C++ with AI and RAG
#32What is the point of this? Fortran is both faster than cpp and easier to write than cpp. It's also by no means a dead or dying or whatever language. Smells like literally "your scientists were so busy they forgot to ask why".
I wonder if they feel that the toolchains are just rotting.
Re: Translate Fortran to C++ with AI and RAG
#33Microsoft demoed a version of their GraphRAG that translated C code to (I believe) mostly idiomatic Rust, and it ran without errors. I tried to find reference to how they did it, does anyone know? It sounds like this approach of translating old code could help speed up teams that are looking at rewrites. I also have some old code that's in Kotlin that I'd like to move to something else. I had a bad NullPointerExcepti…
Re: Translate Fortran to C++ with AI and RAG
#34I'm trying to think of a reason this couldn't be done more directly with a pretty run-of-the-mill transpiler. Like I understand if this is a technical demo and there is a LOT of Fortran code, but...? I've actually had to do this with a couple of different Fortran projects when I was in college, I translated them to C for various reasons. Maybe it's because it was specifically code written by scientists (i.e somewhat…
I don’t know what the transpiled code would look like vs that rendered by an LLM, but maybe the hope is that latter will be more readable?
Re: Translate Fortran to C++ with AI and RAG
#35I'm trying to think of a reason this couldn't be done more directly with a pretty run-of-the-mill transpiler. Like I understand if this is a technical demo and there is a LOT of Fortran code, but...? I've actually had to do this with a couple of different Fortran projects when I was in college, I translated them to C for various reasons. Maybe it's because it was specifically code written by scientists (i.e somewhat…
In theory AI could do a more idiomatic translation, but I think I would still prefer the janky but correct translation over the looks nice but probably subtly buggy AI one.
Re: Translate Fortran to C++ with AI and RAG
#36LLM as translators for Cobol code to Java or Go should be attempted. And Shut down the IBM mainframe rent seek business for good permanently.
You can run cobol on x86, there are at least two compilers.
Re: Translate Fortran to C++ with AI and RAG
#37Earlier quoted context omitted.
I wonder if they feel that the toolchains are just rotting.
Unlike C++, they even got their standard package manager - fpm[1]. [1] https://fpm.fortran-lang.org/
ISO Fortran does not acknowledge the existences of FPM, just like any programming language ISO standard, the ecosystem is not part of the standard.
Re: Translate Fortran to C++ with AI and RAG
#38LLM as translators for Cobol code to Java or Go should be attempted. And Shut down the IBM mainframe rent seek business for good permanently.
Apart from cobol is only part of the reason for running on a mainframe. The other part is the orchestration and "resilience" of the mainframe platform You can run cobol on x86, there are at least two compilers.
Re: Translate Fortran to C++ with AI and RAG
#39Using automatic tools - whether AI-based or transpilers - leaves that opportunity unused, and both approaches are likely to create some additional technical debt (errors in translation, odd, non-idiomatic ways of doing things introduced by the automatism etc.).