Live data from Hacker News

Show HN: I wrote a Java decompiler in pure C language

github.com

31–40 of 104 posts

Re: Show HN: I wrote a Java decompiler in pure C language

#31

Earlier quoted context omitted.

LLMs can explain the process, and you can build projects with LLMs explaining the process.

LLM output is simply not interesting

I did not say that you should copy paste its output verbatim. I thought this was obvious.

Additionally, "interesting" is highly subjective. It could be technically correct, yet uninteresting.

Re: Show HN: I wrote a Java decompiler in pure C language

#32

Nice job! I don't know whether you know https://github.com/java-decompiler/jd-gui or not, but in case you haven't seen it before, maybe you could use it as a reference, since it's written in Java, for extra fun with your adventure?

Things may have changed, but my impression as of several years ago was that JD-GUI was far, far behind the state of the art (Fernflower, aka the built-in IntelliJ decompiler) in terms of correctness, re-sugaring, support for modern Java features, and so on. Fernflower is open source as part of IntelliJ: https://github.com/fesh0r/fernflower

Re: Show HN: I wrote a Java decompiler in pure C language

#33
post #32

Nice job! I don't know whether you know https://github.com/java-decompiler/jd-gui or not, but in case you haven't seen it before, maybe you could use it as a reference, since it's written in Java, for extra fun with your adventure?

Things may have changed, but my impression as of several years ago was that JD-GUI was far, far behind the state of the art (Fernflower, aka the built-in IntelliJ decompiler) in terms of correctness, re-sugaring, support for modern Java features, and so on. Fernflower is open source as part of IntelliJ: https://github.com/fesh0r/fernflower

[dead]

Re: Show HN: I wrote a Java decompiler in pure C language

#34
post #32

Nice job! I don't know whether you know https://github.com/java-decompiler/jd-gui or not, but in case you haven't seen it before, maybe you could use it as a reference, since it's written in Java, for extra fun with your adventure?

Things may have changed, but my impression as of several years ago was that JD-GUI was far, far behind the state of the art (Fernflower, aka the built-in IntelliJ decompiler) in terms of correctness, re-sugaring, support for modern Java features, and so on. Fernflower is open source as part of IntelliJ: https://github.com/fesh0r/fernflower

Is there a good GUI for this a la jadx-gui that isn't an entire IDE?

Re: Show HN: I wrote a Java decompiler in pure C language

#35

Earlier quoted context omitted.

LLMs can attempt to explain the code, but it can't explain people's thought process and that's the interesting part. I want to hear about the reverse engineering, how you thought the code through. LLMs are boring.

They can, if you write down your thought process, which is probably what you should do when you are using an LLM to create a product, but what do I know.

That is not true

Re: Show HN: I wrote a Java decompiler in pure C language

#36
post #27

I am always curious how different C programs decide how to manage memory. In this case there are is a custom string library. Functions returned owned heap-allocated strings. However, I think there's a problem where static strings are used interchangably with heap-allocated strings, such as in the function `string class_simple_name(string full)` ( https://github.com/neocanable/garlic/blob/72357ddbcffdb75641... ) Somet…

Interesting. Someone should come up with a language that prevents these sorts of mistakes!

Re: Show HN: I wrote a Java decompiler in pure C language

#37
post #27

I am always curious how different C programs decide how to manage memory. In this case there are is a custom string library. Functions returned owned heap-allocated strings. However, I think there's a problem where static strings are used interchangably with heap-allocated strings, such as in the function `string class_simple_name(string full)` ( https://github.com/neocanable/garlic/blob/72357ddbcffdb75641... ) Somet…

Interesting. Someone should come up with a language that prevents these sorts of mistakes!

That’s impossible. Just be more careful and everything should work, the author’s C was just a bit rusty!

Re: Show HN: I wrote a Java decompiler in pure C language

#38
post #27

I am always curious how different C programs decide how to manage memory. In this case there are is a custom string library. Functions returned owned heap-allocated strings. However, I think there's a problem where static strings are used interchangably with heap-allocated strings, such as in the function `string class_simple_name(string full)` ( https://github.com/neocanable/garlic/blob/72357ddbcffdb75641... ) Somet…

Interesting. Someone should come up with a language that prevents these sorts of mistakes!

Yes, perhaps it could have a marketing slogan like "Write once, crash everywhere!"

Re: Show HN: I wrote a Java decompiler in pure C language

#39
post #35

Earlier quoted context omitted.

They can, if you write down your thought process, which is probably what you should do when you are using an LLM to create a product, but what do I know.

That is not true

How come? You had different experiences? Which LLMs, what prompts? Give me all the details that supports your claim that it is not true. My experiences completely differ from yours, so the way I use it, it is very much true.

That said, it is probably pointless to argue with full-blown AI-skeptics.

People had lots of great and productive-enhancing experiences with LLMs, you did not, great, that does not reflect the tool, it reflects your way of using the tool.

I will just throw it out here: https://news.ycombinator.com/item?id=44163063 (My AI skeptic friends are all nuts)

Re: Show HN: I wrote a Java decompiler in pure C language

#40
post #12

Very cool project! Love the idea of a Java decompiler written in C — the speed must be great. Any plan to support `.dex` in the future? Also curious how you handle inner classes inside JARs.

The "jikes" compiler from IBM https://github.com/daveshields/jikespg > was written in C++ and was for the longest time screaming fast. It also had its own parser generator lpg which was fun to play with, if you're into those things https://github.com/daveshields/jikespg > It seems someone liked it and made a "v2" along with LSP support https://github.com/A-LPG/LPG2#lpg2

Jikes also gave massively better error messages than the official Java compiler, from what I remember, and it certainly ran a lot faster on the Amiga (https://aminet.net/package/dev/lang/jikes) than trying to run javac via Kaffe (https://en.wikipedia.org/wiki/Kaffe) did.
Post reply on HN