Prototype (Forth)
Clone souls directly through memory transposition.
β§ GANG OF FOUR LINEAGE & ARCANUM β§
GOF DESIGN PATTERN: Prototype
ARCANUM SCHOOL: Illusion // Soulcloning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// FORTH PATTERN //
\ Soulcloning: The Prototype Pattern
\ To clone, we simply CMOVE the memory bytes of an entity.
CREATE BASE-SOUL 4 ALLOT
HEX DE AD BE EF BASE-SOUL ! DECIMAL
: CLONE-SOUL ( src dst -- )
OVER OVER 4 CMOVE
." Soul cloned across the void." CR ;
CREATE NEW-SOUL 4 ALLOT
\ Usage:
\ BASE-SOUL NEW-SOUL CLONE-SOUL
True necromancers donβt build from scratch when they can copy. The Prototype pattern is realized in Forth through raw memory manipulation (CMOVE). You capture the essence (data) of a construct and duplicate it byte-for-byte.
Runic Tags:
#creational
#prototype
#forth
#memory