Live data from Hacker News

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

github.com

21–30 of 104 posts

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

#22
post #20

Earlier 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

Sorry for giving you a bad experience. Please provide the jar file or class file. I hope I can fix it as soon as possible.

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

#23

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.

> They can, if you write down your thought process

Just write a blogpost at that point.

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

#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... )

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

#28

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.

> They can, if you write down your thought process Just write a blogpost at that point.

You do not have to be as accurate or that specific, you do not have to worry about the way you word or organize things, the LLM can figure it out, as opposed to a blog post.

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

#30
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…

In multi-threaded mode, each thread will create a separate memory pool. If in single-threaded mode, a global memory pool is used. You can refer to https://github.com/neocanable/garlic/blob/72357ddbcffdb75641.... The x_alloc and x_alloc_in in it indicate where the memory is allocated. When each task ends, the memory allocated in the memory pool is released, and the cycle repeats.
Post reply on HN