lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On May 5, 2014, at 4:16 AM, Thomas Jericke <tjericke@indel.ch> wrote:

> On 05/05/2014 10:33 AM, Paige DePol wrote:
>> On May 5, 2014, at 1:14 AM, Thomas Jericke <tjericke@indel.ch> wrote:
>> 
>>> You have to know that I don't use vanilla Lua. I can't. There are a few things that make it necessary for me to use a
>>> modified version of Lua. That said, I am very interested in ideas and other patches of Lua that will _never_ make it into vanilla Lua. If there is a good idea about a potential patch of Lua and I could use it for my own version, I like to know it, and I would search for this ideas right here in this list.
>>> 
>>> It has been said before lately, it is actually one of the big strengths of Lua that you can modify it so easily.
>> 
>> Well, you may be happy to see some of the patches I will be releasing soon, as I work towards my own Lua variant.
>> 
>> Do you have a list of the patches you have applied to your personal version of Lua?
>> 
>> ~pmd~
> 
> Actually I wrote all modifications myself. I may not remember all changes but here is a incomplete list:
> - Breakpoint op_code, needed for faster debugging (from extreemly slow to no runtime impact)
> - lua_canyield() a API function that returns whether it is possible to yield at the moment.
> - Some changes to lua_getinfo to return the correct line when called on a yielded task (It was off by one).
> - Changed all files to .cpp to allow own fixed point class to be used as lua_Number
> - Made require yieldable (you may now yield from a script which is required from another script)
> - Made tostring yieldable (you may now yield from a metamethod that is called from tostring.)
> 
> There could be some other tweaks.
> 
> I think it may be a good idea to make a patch that makes the whole standard library yieldable.

Those sound like some very useful patches, especially the enhanced yielding! Did you maintain patch files for your changes to Lua?

I am working on my own Lua variant, where each patch is created from a clean Lua codebase (5.3w2 currently). This way people can cherry-pick the features they like from my variant and apply them to vanilla Lua should they wish. Win-Win for everyone!

The patch I mentioned in my last post was rejected for being too large. Looks like there is a 40k limit on the list and my patch file was 65k, not including the tests patch file or the contents of my post itself. I am in the process of setting up a GitHub repository to hold the patches and associated comments, will post later with an update and link!

~pmd~