Hacker News
points by grep_it 2 days ago | 0 comments
I've had good success with just using mypyc (https://mypyc.readthedocs.io/en/latest/introduction.html) on typed python code.
[–] nomel 2 days ago
> on typed python code.

A fairly massive undertaking for existing code, which jit was supposed to be useful for.

[–] EdwardDiego 2 days ago
You can use static type analysers and runtime type profilers to add type annotations to a legacy codebase, but the interesting bit would be if you're built on top of a large untyped codebase you don't control like, say, Django, how far it can go.
[–] zahlman 2 days ago
I would imagine that the LLM has a much easier time adding correct type annotations to old Python code than it does translating it to C.
[–] EdwardDiego 2 days ago
In my experiments with this, maybe, sorta, it'll do some AST stuff then it'll go "dang this shit is dynamic AF" then suggest a static type inference tool, then a runtime type profiler.

Which honestly, is the right approach.