By hand or with AI? Fascinating. So much work! What was your motivation for this?
90% by hand, 10% AI. I do this for fun and to learn about jvm.
Show HN: I wrote a Java decompiler in pure C language
21–30 of 104 posts
Re: Show HN: I wrote a Java decompiler in pure C language
#22Earlier quoted context omitted.
I am writing the part of decompiling dex and apk. The current speed is about 10 times faster than that of Java, and it takes up less resources than Java. And the compiled binary is smaller, only about 300k. Thank you for your attention.
This has been my life experience with things written in C/C++, so speed doesn't matter. Or, I guess from an alternative perspective, it ran very fast, but exited very fast, too :-D $ ./objdir/garlic $the_jar_file -o out-dir -t $(nproc) Progress : 85 (1024)Segmentation fault: 11
Re: Show HN: I wrote a Java decompiler in pure C language
#23Earlier 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.
Just write a blogpost at that point.
Re: Show HN: I wrote a Java decompiler in pure C language
#24By hand or with AI? Fascinating. So much work! What was your motivation for this?
Re: Show HN: I wrote a Java decompiler in pure C language
#25Re: Show HN: I wrote a Java decompiler in pure C language
#26Re: Show HN: I wrote a Java decompiler in pure C language
#27In 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... )
Sometimes it returns a static string like `g_str_int` and sometimes a newly heap-allocated string, such as returned by `class_type_array_name(g_str_int, depth)`.
Callers have no way to properly release the memory allocated by this function.
Re: Show HN: I wrote a Java decompiler in pure C language
#28Earlier 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.
> They can, if you write down your thought process Just write a blogpost at that point.
So "To some people the process leading to a finished project is the most interesting thing about posts like these." is bullshit, that is said by someone who has never used LLM properly. You can achieve it with LLMs. You definitely can, I know, I did, accurately (I double checked).
I will throw it out here, too: 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
#29Re: Show HN: I wrote a Java decompiler in pure C language
#30I 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…