[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: The most stupid thing you've done with Lua?
- From: "Deneb aka Alpha Cygnus" <alpha_cygnus@...>
- Date: Fri, 18 Jul 2003 23:26:21 +0400
----- Original Message -----
From: "Luiz Henrique de Figueiredo" <lhf@tecgraf.puc-rio.br>
To: <lua@bazar2.conectiva.com.br>
Sent: Friday, July 18, 2003 12:10 AM
Subject: Re: The most stupid thing you've done with Lua?
> >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
>
Thank you much. Very inspiring links.
BTW: What about Obfuscated Lua? :D Something heavily using metatables and
coroutines in most complex way.