[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Yieldable require
- From: "Soni L." <fakedme@...>
- Date: Thu, 18 May 2017 22:33:00 -0300
On 2017-05-18 10:20 PM, Daurnimator wrote:
On 19 May 2017 at 02:47, Pierre-Yves Gérardy <email@example.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
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
But I'm also hoping that Roberto may consider adding something similar
in the next major lua release.
I'd rather have yieldable string.gsub personally.
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.