Live data from Hacker News

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

github.com

41–50 of 104 posts

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

#41
post #37

Earlier quoted context omitted.

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!

This project is my first project written in C language. Before this, my C language level was only at printf("hello world"). I am very happy because this project made me dare to use secondary pointers.

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

#42
post #34
post #32

Earlier quoted context omitted.

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?

Not that I know of. The features I'd want in order to consider a decompiler GUI "good" (e.g. a good text editing control, go-to-definition, find usages, manual renaming of obfuscated symbol names) quickly approach the scope of an entire IDE, though.

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

#43
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!

Thank god Lisp is older than C, don't have to deal with such nonsense :-)

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

#44
post #6

Earlier quoted context omitted.

To some people the process leading to a finished project is the most interesting thing about posts like these.

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

It's not about explaining the process but experiencing it.

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

#46
post #42
post #34

Earlier quoted context omitted.

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

Not that I know of. The features I'd want in order to consider a decompiler GUI "good" (e.g. a good text editing control, go-to-definition, find usages, manual renaming of obfuscated symbol names) quickly approach the scope of an entire IDE, though.

The most feature advanced decompiler I know of is Recaf. It supports a mix of decompilers and even bytecode editing.

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

#47

I cannot help but wonder why starting a new project in C in 2025. It’s like driving a car with no seat belts. You sure you want to do that?

In my experience, although many of the other programming languages do improve some things compared with C, they also make many things worse and avoid some of the benefits of C programming.

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

#49
post #37

Earlier quoted context omitted.

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

This project is my first project written in C language. Before this, my C language level was only at printf("hello world"). I am very happy because this project made me dare to use secondary pointers.

u did really well ppl like to pick on C. :) thanks for making it in C, fun to read ur code and see how others go about this language!

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

#50

I cannot help but wonder why starting a new project in C in 2025. It’s like driving a car with no seat belts. You sure you want to do that?

i only write in C. if id build a car it wouldnt have seatbelts. boring, put in ejector seats! not safe? no problem for C :).
Post reply on HN