[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The most stupid thing you've done with Lua?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 17 Jul 2003 17:10:56 -0300
>Speaking of useless scripts, the following Lu5 code prints out itself.
>s=[[s=[[x]]s=string.gsub(s,"x",s,1)print(s)]]s=string.gsub(s,"x",s,1)print(s
>)
See also http://www.nyx.net/~gthompso/self_lua.txt .
>This is a well known task to write a program that prints out its code. I
>think Lua has to pass the stage of writing such a program in it ;-)
See also http://www.nyx.net/~gthompso/quine.htm .
--lhf