ships[#ships + 1] = ship1
This is adding an element (in this case, the ship1 table) into the ships table.
Specifically this bit #ships + 1 is saying to place it at the index of whatever the current count of items in the table is (at the beginning this is 0) plus 1. It would be the same as doing this:
ships[1] = ship1
ships[2] = ship2
Then this second line: ship1.name = "Ship" .. #ships is setting an element in the ship1 table (called “name”) to the value of “Ship” and whatever the count of items in the ships array, again this is the same as saying this:
ship1.name = "Ship1"
ship1.name = "Ship2"
Finally, this line module(..., package.seeall) is placed at the top of external modules ( so in this case, “ship.lua”) and I believe that it is setting the metadata of the module so that it inherits stuff from global, however I am not entirely sure on this (will need to ask someone more in the know). I know it is needed though 
Hopefully that clears some stuff up, if not just ask again.
[import]uid: 5833 topic_id: 1873 reply_id: 5534[/import]