Greetings,
I exchanged a couple posts with Kenny Tilton on c.l.l about my project a while back, but I was distracted by immediate practical concerns and didn't really get into any details. I've since read a couple of the bits of documentation that accompany cells (as acquired through asdf-install)- specifically the
01-cell-basics.lisp document, some of hello world and maybe bits of something else I'm not recalling. At any rate, while I've been able to work the examples and more or less understand things on the surface, my initial attempt at using Cells for a very simple chunk of my own app was frustrating. Rather than showing you the feeble start I made, I'd like to describe the desired functionality, and get some feedback as to the idiom(s) to use.
The primary classes are cargo items, cargo holds and maybe cargo sets.
--Cargo items:
slots that wouldnt change in the object's lifetime:
item-id
type-id
volume-units (1-3 currently)
changable slots (c-in for now I imagine, but if Cells invades the rest of the program, maybe not):
holder-id
authorized-holder-ids
recipient-id
calculated states I want efficient repeated access to and/or side effects on change:
stolen (holder isnt a member of auth-h-ids)
delivered (holder is recip)
spaced (holder is not a char but a sector)
--Cargo holds:
static:
ship-owner-id
capacity
dynamic:
volume-used
cargo-type-to-quantity hash
--Cargo sets:
Basically I'd like to be able to create a cargo set that is bigger than any cargo hold, and allow it to be distributed among the holds by both npc agents and players, but retain a handle on the set and certain dynamic subsets like the cargo in a particular ship, all the ships in a sector, all spaced cargo, all
stolen cargo of a particular type in a sector, etc. If the set mechanism were flexible and fast enough, I imagine that Holds could just be a type of set (the set of cargo held by character X), but there is a question of where to enforce hold capacity. These sets would be used by npc agents (eg pirates) to drive potential actions (both at the level of posting a mission to collect specific cargo, and a single agent picking the best cargo close by that will fit in its hold).
So, I hope that made sense. I don't expect anyone to go out of their way on this; I think I really just need a push in the right direction.
~Michael Warnock
Guild Software Inc.