Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> dofile "eoo.lua"   -- this file
> Vector = Class {
>>   type       = "Vector",
>>   __add      = function (V, W) return Vector {V[1]+W[1], V[2]+W[2]} end,
>>   __tostring = function (V) return "("..V[1]..","..V[2]..")" end,
>>   __index    = {
>>     norm = function (V) return math.sqrt(V[1]^2 + V[2]^2) end,
>>   },
>> }
> v = Vector  {3,  4}  --  v = { 3,  4, __mt = Vector}
> w = Vector {20, 30}  --  w = {20, 30, __mt = Vector}
> print(v)             --> (3,4)
(3,4)
> print(v + w)         --> (23,34)
(23,34)
> print(v:norm())      --> 5
5
> print( type(v))      --> table
table
> print(otype(v))      --> Vector
Vector
> print( type(""))     --> string
string
> print(otype(""))     --> string
string
>