News for hackers. Stuff that matters.
Re:Dis This: Disassemble Python code online by shpx on Tuesday February 14, 2023 @07:13PM (#34798179)
The user experience could be improved but this already exists:

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

Re:Dis This: Disassemble Python code online by pamelafox on Tuesday February 14, 2023 @07:48PM (#34798504)
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).
Re:Dis This: Disassemble Python code online by shpx on Wednesday February 15, 2023 @11:21AM (#34805975)
I don't think so.
Re:Dis This: Disassemble Python code online by blondin on Tuesday February 14, 2023 @07:13PM (#34798192)
by the way, compiler explorer[0] has python support.

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

Re:Dis This: Disassemble Python code online by hackan on Tuesday February 14, 2023 @08:25PM (#34798836)
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 ```
Re:Dis This: Disassemble Python code online by pamelafox on Tuesday February 14, 2023 @08:34PM (#34798912)
Ah yes, good point, I’ll add exception handling. Thanks!
Re:Dis This: Disassemble Python code online by pamelafox on Sunday February 19, 2023 @10:18AM (#34858273)
Re:Dis This: Disassemble Python code online by xvilka on Wednesday February 15, 2023 @02:39AM (#34801108)
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/...

Re:Dis This: Disassemble Python code online by 36933 on Wednesday February 15, 2023 @03:21AM (#34801341)
You could have added that you’re part of this project, for transparency reasons.
Re:Dis This: Disassemble Python code online by mtlmtlmtlmtl on Wednesday February 15, 2023 @03:56AM (#34801545)
Common Lisp has had this for decades, no libraries needed.