sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.62k stars 97 forks source link

Look into running SILE under Ravi / Luau / Pluto #725

Open alerque opened 4 years ago

alerque commented 4 years ago

Ravi is a derivative of Lua 5.3 with optional static typing and JIT support. Given how long in the tooth LuaJIT has become (see #536) this is something to keep an eye on for future work. If we were to have an optional build system that bundled a Lua engine into SILE builds, this might be a good one to do that with.

OlivierNicole commented 1 year ago

Ravi is an interesting effort, but the optional types seem pretty basic and would not allow the kind of things that of checks that you describe in https://github.com/sile-typesetter/sile/issues/871.

The situation is frustrating because there are many beautiful projects out there, but none gathers all the characteristics that we would like. I have recently spotted Luau, which is a dialect with an impressive gradual type system that seems to match the academic state of the art (and since it's gradual, type annotations remain optional).

Luau is compatible with Lua 5.1, but alas cannot be used as a drop-in replacement because Roblox created it to be sandboxed, and therefore some critical libraries like os or io are not implemented. If I understand correctly, there are also slight differences in the C API. As a consequence, before using Luau as a Lua replacement, someone would need to put in the work of implementing the missing modules and ironing out the API differences somehow, in order to be able to use the Lua libraries that we depend on. Someone has done part of this work so it seems entirely in the realm of the possible, but just Another Thing That Takes Time To Do™.

OlivierNicole commented 1 year ago

P.S. another interesting characteristics of Luau is its performance, too: it advertises performance nearly as good as LuaJIT's, even though not using JIT compilation.

Omikhleia commented 4 months ago

Close (Rejected): This issue has not seen any activity in several years (4+) = Closed by inactivity.

alerque commented 4 months ago

I really do appreciate the issue cleanup, but I've referenced this issue as recently as this month. Ravi isn't particularly interesting at this point, but Luau is. I still plan to look into this after the dust settles on embedding the current supported suite of Luas.