Hacker News new | past | comments | ask | show | jobs | submit login
Dis This: Disassemble Python code online (pamelafox.org)
59 points by ingve on Feb 14, 2023 | hide | past | favorite | 10 comments



The user experience could be improved but this already exists:

https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...


Oh nice! I like the table output. I hadn't discovered that when I built dis-this. Does it have an option to enable the specializing adaptive interpreter? That's what I added this week (only available in 3.11).


I don't think so.


Rizin[1] (and therefore Cutter[2]) supports interactive disassembly and analysis (but not decompilation) of the Python bytecode[3][4]. Apart from that it also supports Java and Lua bytecode for different versions.

[1] https://rizin.re

[2] https://cutter.re

[3] https://github.com/rizinorg/rizin/tree/dev/librz/asm/arch/py...

[4] https://github.com/rizinorg/rizin/blob/dev/librz/analysis/p/...


You could have added that you’re part of this project, for transparency reasons.


It's really neat, I like it! It would be nice to catch exceptions, they are currently blowing up, i.e.: ``` ncaught PythonError: Traceback (most recent call last): File "/lib/python3.11/_pyodide/_base.py", line 460, in eval_code .run(globals, locals) ^^^^^^^^^^^^^^^^^^^^ File "/lib/python3.11/_pyodide/_base.py", line 306, in run coroutine = eval(self.code, globals, locals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<exec>", line 7, in <module> File "<exec>", line 5, in feet_to_meters ZeroDivisionError: division by zero ```



Ah yes, good point, I’ll add exception handling. Thanks!


by the way, compiler explorer[0] has python support.

[0]: https://godbolt.org/


Common Lisp has had this for decades, no libraries needed.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: