best downloading architecture - vote 1, 2, 3 or 4

Tereza Snyder tereza at
Wed Dec 6 19:42:07 EST 2006

On Dec 6, 2006, at 12:45 PM, chris bohnert wrote:

> Those interested in taking Josh up on his quest of producing a  
> bittorrent
> external might check out the conspicuously named "libtorrent" from  
> the guys
> at Rasterbar.  I use their luabind library for all my lua external  
> needs and
> it works great.

Lua seems a very attractive language. What do you use it for? Any  
relation to your Rev work?

I particularly appreciated the following (from <http://>):

Table as structure

Tables are often used as structures (or objects) by using strings as  
keys. Because such use is very common, Lua features a special syntax  
for accessing such fields.

point = { x = 10, y = 20 }   -- Create new table
print( point["x"] )            -- Prints 10
print( point.x )             -- Has exactly the same meaning as line  

Table as array

By using a numerical key, the table resembles an array data type.

A simple array of the strings:

array = { "a", "b", "c", "d" }   -- Indexes are assigned automatically
print( array[2] )            -- Prints "b"

An array of objects:

  function Point(x,y)         -- "Point" object constructor
    return {x = x, y = y}  -- Creates and returns a new object (table)
  array = { Point(10,20), Point(30,40), Point(50,60) } -- Creates  
array of points
  print( array[2].y )        -- Prints 40


Tereza Snyder

    Califex Software, Inc.

More information about the Use-livecode mailing list