{"slug": "mythos-for-coding", "title": "Mythos for coding", "summary": "Anthropic's Claude Mythos successfully extended a Fortran-to-C transpiler to also support C++, fixing 14 bugs and passing 44 of 86 test targets in a GARCH volatility project. The AI worked for 2.5 hours on the task, demonstrating that large language models can now write complex programs including transpilers between programming languages.", "body_md": "I am using Claude Mythos from Anthropic to extend my [Fortran to C transpiler](https://github.com/Beliavsky/Fortran-to-C), created using OpenAI Codex 5.5, to a transpiler from Fortran to C and C++ (they are separate transpilers with some shared code – will post when ready). Codex 5.5 is excellent. Typically I give it a task that takes a few minutes to tens of minutes and iterate. Mythos can work in larger chunks. (Codex has /goal mode , which may do the same thing and which I should try.) I asked it to fix the transpilers so they can handle all the code in my [GARCH and intraday realized volatility project](https://github.com/beliavsky/garch-bfgs). It worked for 2.5 hours and gave the message below. We are at the point where LLMs can write many programs for you, including transpilers between programming languages. Before Mythos I found Codex to be superior to Claude for coding. Now I am unsure.\n\n● Here’s where the GARCH-BFGS sweep stands.\n\nSetup\n\nI wrote c:\\fortran\\GARCH-BFGS\\xf2c_make_test.py (alongside your existing helpers): it parses the Makefile’s 86 .exe\n\ntargets in order, finds each target’s main program (the dependency containing a program statement — garch.exe →\n\ngarch_main.f90, not the garch.f90 module), generates a combined source with your xfind_make_targets.py\n\n–single-source, and runs xf2c.py _single.f90 --run-both, stopping at the first failure. It supports --start N,\n\n–limit N, --keep-going, and --timeout, and cleans up generated files on each pass.\n\nResult: targets 1–44 now PASS; first remaining failure is #45\n\nEach stop along the way was a genuine transpiler bug, which I fixed and verified (the full pytest suite — 301 passed,\n\n20 xfailed — is green after all changes). The 14 fixes, in sweep order:\n\n- minloc([rank_n, rank_t, …], 1) — min/maxloc over array constructors of scalars (xgarch_dist).\n- if (cond) then; stmt — same-line block-if statements were mangled into nested ifs by _rewrite_inline_if_write\n\n(xgarch_choose_dist).\n- logical :: sim_on(0:6) = .false. — scalar initializer broadcast on array declarations checked the raw Fortran text\n\nfor zero-ness instead of the converted value.\n- sim_on([dist_normal, dist_t]) = .true. — vector-subscript assignment ignored non-1 lower bounds and leaked the raw\n\nlogical type name into C.\n- acc%omega = 0.0 — scalar broadcast to fixed-size derived-type member arrays (only allocatable fields were handled).\n- norm2(g(1:3)) — norm2 over sections (whole arrays only before).\n- log2 as a module parameter — module-level use …, only: imports never reached contained procedures, so\n\nreserved-name renaming missed use sites (xgarch_flex).\n- “par3 = theta (…” — the call-name scanner read string literals, registered a phantom theta() call, and deleted\n\nthe real variable (xfit_spy).\n- gas_proc_names => proc_names with two modules exporting proc_names — module variables now get collision-qualified C\n\nglobals (gas_mod__proc_names) via a new Var.c_alias, and => renames map through it (xgarch_gas).\n- Continued use statements (…, dist_laplace, & on the next line) — the host-module import scan now joins &\n\ncontinuations.\n- call f(x(2), n) — Fortran sequence association: array-element actuals to array dummies now pass the element’s\n\naddress (xstgarch).\n- ret_all(:,icol) / z_all(icol, as array actuals — contiguous column sections pass &a[offset]; strided row\n\nsections materialize a temp (xdcc, xfit_dist_returns).\n- col_names(icol)(1:8) — substrings of character array elements; and rows(i)%model = s — fixed-length char fields of\n\nsubscripted derived elements (xfit_gen_egarch_returns).\n- valid(x) vs a dummy named valid elsewhere — function references now rename to their qualified C names; first\n\nattempt broke 8 tests by keyword-sanitizing for(/if(, fixed by restricting to explicit registry hits\n\n(xfit_gen_garch_iv_returns).\n\nWhere it stopped: #45 xfit_garch_ohlc_iv_returns.exe\n\nTwo diagnosed issues remain there: (a) host-program globals like char failed_symbols[n_model][257] are emitted at file\n\nscope referencing program parameters that aren’t emitted as globals (ordering/param-inlining problem in the\n\nhost-global emission — I fixed the related file-scope init-statement bug already), and (b) one more call path passes a\n\nderived-type pointer dummy to a by-value struct parameter without dereferencing (my _pass_value_actual_expr fix\n\ncovered the common path; this caller takes a different route). Both are diagnosed in the memory notes; say the word\n\nand I’ll continue from python xf2c_make_test.py --start 45.\n\n✻ Baked for 2h 31m 31s\n\n※ recap: Testing the C transpiler on all 86 GARCH-BFGS Makefile programs, fixing transpiler bugs at each failure;\n\ntargets 1-44 now pass after 14 fixes. Next: resume the sweep at target 45, which has two diagnosed remaining issues.\n\n2 Likes\n\nGiven that many requests already are given in natural spoken languages it seems the time is nearing when many problems may go from natual languages to machine code, with perhaps an ability to write instructions in a high-level computer language to allow for human review. Given that choice I would want the code displayed in Fortran or Rust. So where in the past I have been interested in conversions and interfaces between languages I am expecting boutique languages to start disappearing relatively quickly myself, and that transpilers as you describe here will eliminate a lot of higher-level languages before perhaps we lose the need for keyboards.\n\n1 Like\n\n[septc](https://fortran-lang.discourse.group/u/septc)\n4\nI started subscribing to Claude Pro a few days ago (around June 10th), and was able to try Fable 5 just once (with a very trivial question!). Yesterday, I got an email from Anthropic that “Fable has been suspended due to Governmental order (or something like that)”, so I cannot try Fable anymore… I should have asked a bit more difficult questions at that time\n\n1 Like\n\nFable 5 was available on the $20/month plan, but even before it was blocked Anthropic had said it would only be available through the API starting Jun 22. It would not be affordable by individuals, based on cost estimates I got:\n\nSession\n\nTotal cost: $1311.74\n\nTotal duration (API): 11h 15m 17s\n\nTotal duration (wall): 5d 3h 52m\n\nTotal code changes: 8839 lines added, 807 lines removed\n\nUsage by model:\n\nclaude-haiku-4-5: 999 input, 19 output, 0 cache read, 0 cache write ($0.0011)\n\nclaude-fable-5: 97.6k input, 1.3m output, 1.1b cache read, 5.8m cache write (**$1267.13**)\n\nclaude-sonnet-4-6: 6.6k input, 568.3k output, 97.7m cache read, 1.8m cache write ($44.61)\n\n1 Like\n\n[septc](https://fortran-lang.discourse.group/u/septc)\n6\nThanks very much for your info! In my case, I wanted to first experiment Fable with some math problems of my interest that I often ask to different LLMs and see the difference of their replies. I will try it later once Fable becomes available again. Regarding coding assistance, yes, I read some article that the API cost is very high, so I am afraid I cannot afford that… FYI, I got to know that some student in my university has been trying to “port” old Fortran77 codes to Python using Claude Code, but it seems “Pro” is not at all sufficient for this purpose (because of the usage / token limitation or something like that). I have little experience with Claude, so will experiment more later (maybe in July).", "url": "https://wpnews.pro/news/mythos-for-coding", "canonical_source": "https://fortran-lang.discourse.group/t/mythos-for-coding/10961#post_6", "published_at": "2026-06-21 06:56:22+00:00", "updated_at": "2026-06-21 07:08:30.839666+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "developer-tools"], "entities": ["Anthropic", "Claude Mythos", "OpenAI", "Codex 5.5", "Fortran", "C", "C++", "GARCH"], "alternates": {"html": "https://wpnews.pro/news/mythos-for-coding", "markdown": "https://wpnews.pro/news/mythos-for-coding.md", "text": "https://wpnews.pro/news/mythos-for-coding.txt", "jsonld": "https://wpnews.pro/news/mythos-for-coding.jsonld"}}