Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Btw, working on Java 7 support. At this moment I sorta have working Java 7 compiler targeting Java 6 bytecode (Java 7 has StackMapTable which is sort of annoying).

Also, I've tried to replace parser with a modern one. Claude succeeds in generating Java 8 parsers with various parser generators/parser combinators but fails to resolve extremely tight coupling.



what is the feasibility/crazyness level of "llm porting" the javac source code to c++ ?

setting copyright issues aside, javac is a pretty clean textual-input-output program, and It can probably be reduced to a single thread variant


Claude won't handle a project of that scale. Even with Java 7 modernization project, which is much simpler than full javac translation, I constantly hit context limits and Claude throws things like "API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.76: `thinking` or `redacted_thinking` blocks in the latest assistant message cannot be modified. These blocks must remain as they were in the original response."},"request_id":"req_011CVWwBJpf3ZrmYGkYZLQVf"}" at me.


Could you please share the costs? I wonder how much money does it cost to Claude-out such a codebase?


I'm using the subscription, not API. Claude ate 55% of the weekly limit on the €200 plan to deliver this. Don't know about Codex, no issues (and reporting) there.


looking at the "att" branches (excuse my unhealthy curiosity) I can only say - "jesus fucking christ".

from the old parser ast -> to json -> to new ast representation (that is basically again copy of the old one) -> to some new incomplete bytecode generation

im sure there is some good explanation, but....why?! :)


I've been looking for a way to decouple legacy parser from the rest of the compiler, plus create a way to dump parser output in a readable form. Unfortunately, the coupling is too tight there. In my own compilers all the outputs of all the phases are serializable.

In the end I've just reanimated the original parser generator and progressed to full Java 7 syntactically (-att5 branch), but there are some major obstacles with bytecode.


i thought it might be something like this (still a weird overkill), but if you are effectively replacing the parser with new peg and replacing the backend with something new - then there is nothing left - just start from scratch :)


Well, I tried to do that in phases but we (me + Claude + Codex) failed. But I managed to start from scratch: https://github.com/7mind/pyjopa - this thing works, it's insane but it works. The test suite is much smaller and there are still major limitations, but it damn passes some real tests.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: