[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Yieldable require
- From: Daurnimator <quae@...>
- Date: Fri, 19 May 2017 11:20:35 +1000
On 19 May 2017 at 02:47, Pierre-Yves Gérardy <pygy79@gmail.com> wrote:
> For Lua 5.1 and 5.2, https://github.com/pygy/require.lua does the same
> in plain Lua, no patch required.
>
> require = require'require'.require
>
> and you're ready to go
>
> I haven't kept up with Lua 5.3 though, and I don't know if the
> `require()` differs from v5.2.
>
> if it doesn't replace the line above with (in Lua 5.3)
>
> require = require('require').require52
>
>
> —Pierre-Yves
Thanks for the link. Good to see someone has made it available for 5.1 and 5.2.
I wrote mine in C to echo the same thing I wrote in JS. See
https://github.com/fengari-lua/fengari/pull/51/files
But I'm also hoping that Roberto may consider adding something similar
in the next major lua release.