Skip to content

Conversation

@0kk28
Copy link

@0kk28 0kk28 commented May 1, 2025

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


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

Pid = namedtuple("Pid", ["node", "id", "serial", "creation"])
Copy link
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.

def __eq__(self, other):
return self._value == other.value
def __repr__(self):
return "<<%s>>" % self._value
Copy link
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
Copy link
Owner

matwey commented Jul 28, 2025

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

@matwey
Copy link
Owner

matwey commented Nov 24, 2025

@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?

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

3 participants