Storyyeller / Krakatau

Java decompiler, assembler, and disassembler
GNU General Public License v3.0
1.95k stars 219 forks source link

Community chat? #175

Closed Dmunch04 closed 4 years ago

Dmunch04 commented 4 years ago

Hi.

I'm quite new to Jasmin/Krakatau and the JVM, and was wondering if you had a Discord server/Gitter chat, or know some other similar community chat where I can get help with such things?

Storyyeller commented 4 years ago

I would recommend reading the JVM bytecode specification. Then compile a couple simple classes and disassemble them with Krakatau to see how things work in practice.

If you have any questions after that, feel free to ask on Stack Overflow. I watch the [bytecode] tag on Stack Overflow, so I should see them there as well.

Storyyeller commented 4 years ago

Here's the latest bytecode specification. https://docs.oracle.com/javase/specs/jvms/se14/jvms14.pdf

Dmunch04 commented 4 years ago

Yes. I've read the specs and I also know about SO. It would just be easier if there was some kind of direct chat (Like Gitter, Discord, Slack, etc.). Thanks anyway

Dmunch04 commented 4 years ago

Also Jasmin doesn't support SE14. It doesn't even have ldc2

Storyyeller commented 4 years ago

Sorry, I don't have any sort of Gitter/Discord/Slack community.

As for Jasmin, Jasmin is old and lacking in features, which is one of the reasons I originally wrote the Krakatau assembler in the first place. I don't think there's any reason to use Jasmin nowadays.

Dmunch04 commented 4 years ago

The reason I chose to target Jasmin over Krakatau, was because they had proper docs instead of a cluttered txt file. Might use Krakatau but those docs are so hard to read.

Storyyeller commented 4 years ago

Sorry about that. Do you have suggestions on how to improve them?

Dmunch04 commented 4 years ago

Well just making it into a markdown file would help a lot. If you wanted you could then generate those markdown files into HTML docs. And perhaps more examples in the docs? Haven't read them fully so might be wrong

Storyyeller commented 4 years ago

Do you have examples of markup to use? What format would you like to see the documentation in? Perhaps you could provide examples?

Dmunch04 commented 4 years ago

Maybe something like this (Most content is taking from the Jasmin user guide): It's just an idea for a way to lay it out.

Krakatau

Class definition

Krakatau files start by giving information on the class being defined in the file - such as the name of the class, the name of the source file that the class originated from, the name of the superclass, etc.

Typically, a Krakatau file starts with the two directives:

    .class <access-spec> <class-name>
    .super <class-name>

Which uses the following parameters:

An example of a class definition, could be:

    .class public MyClass
    .super java/lang/Object


Interfaces

After .class and .super, you can list the interfaces that are implemented by the class you are defining, using the .implements directive. The syntax of .implements is:

    .implements <class-name>

Where <class-name> has the same format as was used by .class and .super. For example:

    .class foo
    .super java/lang/Object
    .implements Edible
    .implements java/lang/Throwable
Storyyeller commented 4 years ago

That only covers two directives though, and only the most basic ones.

Perhaps you could write a rough draft for the documentation and then I can look it over, make corrections, and then merge it?

Dmunch04 commented 4 years ago

Well it would be a Lot of work. But I can take a look at it when I get home