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 "newrect.lua"
> ap = AsciiPicture.new("  ")
> ap = AsciiPicture.new("     ")
> for l=0,2 do
>>   for r=0,3 do
>>     local pos=lr(l, r)
>>     ap:put(pos, "..")
>>     ap:put(pos, pos:lr())
>>     ap:put(pos, pos:xy())
>>   end
>> end
> = ap
               (1,5)          
          (0,4)     (2,4)     
     (-1,3     (1,3)     (3,3)
(-2,2     (0,2)     (2,2)     
     (-1,1     (1,1)          
          (0,0)               
> 
>