lua-users home
lua-l archive

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


Already late.
assert(_VERSION:find("5.3"))
28 characters. (Unescaped dot is intentional,  someone suggested :match(3), didn't test it might work at Lua 3.x)

assert(#("1"+1 .."")>1)
23 characters.
On 13 Dec 2020, 21:15 +0300, bel <bel2125@gmail.com>, wrote:
dofile("1"+"2")

15 characters
provided you do have a file named "3.0" but no file named "3"

Follows the same idea as
assert(#("1"+"2".."r")>2)
but that's too long ;-)


On Sun, Dec 13, 2020 at 6:26 PM Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
>>>>> "bel" == bel  <bel2125@gmail.com> writes:

 bel> assert(_VERSION:match("3"))
 bel> = 27 characters

a=1<<1::a::do::a::end

21 characters

--
Andrew.