functional.cafe is one of the many independent Mastodon servers you can use to participate in the fediverse.
functional.cafe is an instance for people interested in functional programming and languages.

Server stats:

212
active users

@technomancy @akkartik Also worth noting for those metamethods, if you're already working from C, is the native patch approach as seen in the Lua wiki lua-users.org/wiki/Generalized

Though in the case of __ipairs you get the extra confusion of the fact that Lua 5.3 went on to deprecate it and 5.4 to remove it in favor of making ipairs respect __index and __len :(

lua-users.orglua-users wiki: Generalized Pairs And Ipairs

@technomancy @akkartik Correction: ipairs respects __index and stops when it hits a nil, it doesn't check __len.

Not sure what I conflated it to throw __len in when I misremembered but figured I should correct myself after @technomancy asked me about it!