lua-users home
lua-l archive

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


On 1 June 2016 at 15:24, Martin <eden_martin_fuhrspam@gmx.de> wrote:
>
> Lua quine code at http://www.nyx.net/~gthompso/quine.htm is for Lua4 and no longer works. Why not update it?
>
> I've have 64-char variant, maybe someone have shorter? (Possibly publish it later, do not want spoil fun.)

You might find this thread relevant:
http://lua-users.org/lists/lua-l/2008-05/msg00364.html

The 2nd one mentioned there still works (71 chars).
You can remove the semicolons to make it 69 chars.

s=[[io.write('s=[','[',s,']',']',s)]];io.write('s=[','[',s,']',']',s)


>From the same thread, you have peter cawley's
http://lua-users.org/lists/lua-l/2008-05/msg00379.html
Which also still works (44 chars):

s="s=%qprint(s:format(s))"print(s:format(s))