Skip to content

Rebased disasm feature from themadinventor/my - #20

Open
0kk28 wants to merge 9 commits into
matwey:masterfrom
0kk28:disasm
Open

Rebased disasm feature from themadinventor/my#20
0kk28 wants to merge 9 commits into
matwey:masterfrom
0kk28:disasm

Conversation

@0kk28

@0kk28 0kk28 commented May 1, 2025

Copy link
Copy Markdown

This PR rebases the disasm functionality from the outdated themadinventor/my branch onto the latest matwey/master.

Comment thread pybeam/erlang_types.py

Port = namedtuple("Port", ["node", "id", "creation"])

Pid = namedtuple("Pid", ["node", "id", "serial", "creation"])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pid type is removed forever. This is not what we want.

Comment thread pybeam/erlang_types.py Outdated
def __eq__(self, other):
return self._value == other.value
def __repr__(self):
return "<<%s>>" % self._value

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you revert obsoleted implementation. I think it is better leave erlang_types as is, or you may prepare separate PR implementing __str__ and __repr__ for String and Binary types.

@matwey

matwey commented Jul 28, 2025

Copy link
Copy Markdown
Owner

I am really sorry for being silent on this. I'll return to reviewing this PR as soon as I will have time.

@matwey

matwey commented Nov 24, 2025

Copy link
Copy Markdown
Owner

@0kk28 I know that my silence might be disappointing a bit. But frankly speaking, I don't know where to start with to fit this code into the package. Lets just rewrite opcodes.py which currently seems to be just blind C->Python syntax translation. What I would like to see is a single array/dictionary of named tuples to group all information by the operation. Do we also need to declare all this constants which are not used anywhere else?

Comment thread example/dbeam.py
fname = sys.argv[1] if len(sys.argv) > 1 else '/usr/lib/erlang/lib/compiler-4.8.1/ebin/beam_dict.beam'
b = pybeam.BeamFile(fname)

print '# Module: %s' % b.modulename

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really use Python 2 syntax here in 2025?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants