Speeding up Leo's beautifier involves transliterating leoTokens.py into Nim. I had also planned to transliterate Python's tokenize module into Nim.
But today I discovered that tokenize.py is a thin wrapper around C code! Transliterating and testing this C code would be a nightmare. This discovery caused me a few minutes of consternation. My agony turned to ecstasy when I discovered nimpy <https://scinim.github.io/getting-started/external_language_integration/nim_with_py.html>, the Nim-Python bridge. *Summary* Three lines of Nim code should give Leo's fast beautifier access to Python's *fast *tokenizer module. There is no need to transliterate (and test!) a Nim version of tokenize.py!! Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/99fb8e97-5aab-4ef9-9961-44dc8ea71bddn%40googlegroups.com.
