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!
Show HN: I wrote a Java decompiler in pure C language
51–60 of 104 posts
Re: Show HN: I wrote a Java decompiler in pure C language
#52I 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
#53Very 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
Re: Show HN: I wrote a Java decompiler in pure C language
#54I 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…
Re: Show HN: I wrote a Java decompiler in pure C language
#55I 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 :).
goto eject; ...more code we are going to ignore, it could be important but nah, ignore it, what could be happen?...
eject: up_through_the_roof();
:D
Re: Show HN: I wrote a Java decompiler in pure C language
#56I 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?
Re: Show HN: I wrote a Java decompiler in pure C language
#57I 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
#58Earlier 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
#59I 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…
Re: Show HN: I wrote a Java decompiler in pure C language
#60I 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?