User talk:Arseniiv

From Esolang
Jump to navigation Jump to search

Punctree interpreter

Your Punctree interpreter uses value = ord(prev) - ord('α') for converting Greek letters to numbers. However, Unicode has the final sigma ς between ρ and σ, which causes an offset after 16. The interpreter should either correct for this or use a lookup table for the 24 letters. Also, if you want to output a bytes object, you need to use sys.stdout.buffer.write. LegionMammal978 (talk) 15:36, 19 May 2020 (UTC)

Thank you LegionMammal978! Shame I forgot about ς, as I did seem to know this once. Thank you for the buffer too. Strange I used it for reading, but not for writing. Maybe that’s all because I wrote this code in a Jupyter notebook initially, and only now I edit it in VS Code using mypy for guidance. The new version will be up shortly. arseniiv (talk) 08:29, 23 May 2020 (UTC)