FMCS 2.4


Demonic Metaprogramming Framework for Common Lisp.

View the Project on GitHub thephoeron/fmcs

FMCS User Manual > Basic Usage


FMCS uses ASDF3. To install FMCS, clone the repository into an ASDF local projects directory, such as ~/common-lisp/ or ~/quicklisp/local-projects/.

Then FMCS may be loaded directly by ASDF with (asdf:load-system :fmcs) or using a package manager such as Quicklisp with (ql:quickload :fmcs), and used as a dependency for other ASDF3 systems.

Planned Feature: FMCS Named Readtable

In all your source-files where you use FMCS, switch to the :FMCS named readtable:

(in-package :<my-project>)

(named-readtables:in-readtable :fmcs)

Defining Flavor Classes

(def$flavor ...)

Defining Flavor Metaclasses

(def$flavor ...)

Defining Flavor Mixins

(def$flavor ...)

Defining Demon Methods

(def$method (<flavor> :<method-name>) ...)

Defining Frames

(def$frame ...)

Defining Behaviors

(def$behavior ...)

Traceing Demon Methods

(trace$method ...)

Untraceing Demon Methods

(untrace$method ...)

Defining Whoppers

(defwhopper ...)

SBCL Users

:warning: Note:
This will be deprecated in favor of an :FMCS named readtable in a future release.

For SBCL, FMCS relies on FARE-QUASIQUOTE to macroexpand backquote syntax in keeping with idiomatic conventions followed by all other Common Lisp implementations.

When using FMCS for your own projects, you will need to conditionally depend on FARE-QUASIQUOTE-EXTRAS for SBCL in your ASDF systems, and use its named-readtable in every source-file where FMCS forms are used to ensure correct macroexpansion at every level.

For example, in your ASDF system definition:

(defsystem my-project
  :depends-on ((:feature :sbcl fare-quasiquote-extras)
  :components ((:file "package")
               (:file "my-project")))

And in your source-files:

(in-package :my-project)

(named-readtables:in-readtable :fare-quasiquote)


(named-readtables:in-readtable :standard)

;; eof

Alternatively, as the documentation for FARE-QUASIQUOTE suggests, you can use ASDF’s :around-compile hook to automatically wrap all source-files in the appropriate NAMED-READTABLES:IN-READTABLE forms.