lua-users home
lua-l archive

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


Philippe Lhoste wrote:
Just a quick word to say I have updated the Language Comparisons section of the LuaLinks page on the Wiki.
http://lua-users.org/wiki/LuaLinks

I used the various links found on the pages cross-referencing themselves...
If you know any other similar page, including those *not* listing Lua, please update this section. There is two sites to contribute to, as they have no Lua entry. If the authors still maintain them, that is...

Note that Roberto and Luis contributed to a number of such sites. This is good to spread the knowledge of Lua...

On the Quine page <http://www.nyx.net/~gthompso/quine.htm>, Roberto contributed the entry for Lua:

y = [[ print("y = [[" .. y .. "]]\ndostring(y)") ]]
dostring(y)

Very nice and clean, compared to most C quines for example...
But obviously, it is for an old version of Lua (4.0, perhaps even 3.2) since "dostring" isn't defined in Lua 5.0.

So I did a quick update for Lua 5.0, which I will submit:

y = [[ print("y = [[" .. y .. "]]\nloadstring(y)()") ]]
loadstring(y)()

Some languages like C or Java have dozens of entries, so I thought: why not users of the Lua communauty doesn't contribute more quines?

I suggest you send them here, I will collect them and send them at once (but of course you can send them separately if you want).

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --