On this page:
qt  Ops:   perform operations on things with qualities
7.8

qtOps: perform operations on things with qualities

emsenn

 (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:

Examples:
> (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.

    1 things

    2 qtOps qualities

      2.1 animation

      2.2 Brightness

      2.3 Client

      2.4 Contents

      2.5 Description

      2.6 Energetic

      2.7 Exits

      2.8 Fillable

      2.9 Lit

      2.10 Lookable

      2.11 Mass

      2.12 Mudsocket-Client

      2.13 Mudsocket-contents

      2.14 Mudsocket-server

      2.15 Mudsocket-sight

      2.16 Mudsocket-speech

      2.17 Mudsocket-trivia

      2.18 noise

      2.19 Notable

      2.20 noun

      2.21 npc

      2.22 object

      2.23 pronouns

      2.24 radiation

      2.25 region-area

      2.26 region-noise

      2.27 region

      2.28 rpg-mudsocket-server

      2.29 sight

      2.30 time

      2.31 trivia

      2.32 Universe

      2.33 universe-thing