qtOps: perform operations on things with qualities
(require qtops) | package: qtops |
NOTE: qtOps is currently in the earliest stages of development, and is created as a hobby-project. Code is incomplete, buggy, likely to change, and unlikely to ever be suitable for use by others.
qtOps stands for "qualities of things operations," and is a Racket collection implementing things and performing operations on them. It also includes a collection of qualities, which extend or modify a thing’s innate qualities.
Things and qualities may be familiar if you know about entity-component system game engine architecture: things are roughly equivalent to entities, and equalities are roughly equivalent to components.
From an object-oriented programming perspective, things are essentially objects that lack attributes/fields, and qualities are bundles of methods that can be added to an object after instanciation. Instancing? Whatever.
If neither of those are familiar, a demonstration:
> (define honey (create-thing)) > honey #<procedure:t>
> (honey 'set-procedure! 'sweetness (λ () 10)) > (honey 'sweetness) 10
> (honey 'set-procedure! 'set-sweetness! (λ (n) (honey 'set-procedure! 'sweetness (λ () n)))) > (honey 'set-sweetness! 20) > (honey 'sweetness) 20
Source code for qtOps is available at https://code.cyberearth.systems/emsenn/qtmud (hosting provided as a gift by @theruran@hackers.town)
There’s an IRC channnel, #qtmud on irc.freenode.net, but I’m usually not there. If you have a question it’s probably best to email me at emsenn@emsenn.net.