Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is amazing! Can a program call across versions? Like could we take a Lua 5.1 codebase and upgrade only a portion of it at a time to a new Lua version?


Hmm I think in general I would not recommend doing this just because Lua does change pretty significant things from 5.1-5.5 so you could have some really hard to understand behavior if some portions are 5.1 vs 5.4 for example.

I think where it would be most helpful is converting a codebase and being able to easily run tests to ensure behavior is the same.

I created a github gist https://gist.github.com/ianm199/5ba0366376eca673142e1f0c79b4... that explains what is practical (I used AI for this to be clear feel free to skim).

Do you have a use case in mind? Would love to chat or take a look at an github issue if you create one.


Thanks for the follow up. It is nice to know that Claude is as horrible a writer for everyone else as it is for me. God it even slipped in load-bearing, hell have mercy on us. I did read (skim) the whole thing.

> Do you have a use case in mind?

Two, 1) upgrading Lua code on a module by module basis 2) Using a newer library on an older codebase. I know those are really two takes on the same problem. I understand why your system doesn't, but at least yours is more flexible than mlua.

I understand why this hard and why it just doesn't work like this out of the box. Lua minor versions are really major and the semantics really does change.

I also don't think what I am asking for is all that necessary, more of a cute language and runtime flex. If the Lua total addressable market was 100x what it is with lots of code on older versions that needed to run side by side then maybe.


Very cool! Well let me know if you get a chance to use it would love to hear if it ends up being the right tool.




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

Search: