wiki/source.lisp
The path relative to the repository root, e.g. "luvcraft/mesher.lisp".
One Lisp source file of the system as read by luv-wiki.
Read the file at pathname into a source-file with its definitions.
The package named by the file's first IN-PACKAGE form, as written.
The site-relative page for file, e.g. "source/luvcraft/mesher.lisp.html".
The relative prefix that leads from page-name back to the site root.
The href of definition's line in its source page, or NIL when the site
has no page for its file.
Rendering
One line of a definitions index: kind, name (or only the method signature
when name-p is false, under its generic), with file:line as the tooltip.
Trailing T specializers say nothing; drop them.
definitions in order, but with each method attached to the generic (or
first method) of the same name: a list of (definition . methods).
Methods came first: the generic takes over the group.
The definitions of file as a scannable list linking to their lines,
methods grouped under their generic.
The systems and their files as a compact list beside a source page: one
DETAILS per system, the one holding current open and current marked.
Emit the page for file: its definitions table and every top-level form
as dexp boxes, each anchored by its starting line, with the sidebar of all
files beside it on wide screens.
A file's relative path linking to its page, the file name emphasized, and a count button that shows the definitions in a popover.
Hidden cards holding each listed file's definitions, for the popover.
The systems worth drawing: not test systems and not the aggregate root system that merely depends on everything.
name without the leading luv/ that nearly every system shares.
The id of name's row in the source index: the name itself, slashes and
all, since luv-wiki-site and luv-wiki are different systems.
edges is a list of (from . to). Return the edges not implied by a longer
path, so a layered drawing shows only the essential dependencies.
The systems and their essential dependencies as a Mermaid flowchart, fundamentals at the top.
Emit source.html: the dependency graph of the systems, then one dense table in dependency order — system, description, files — where a file's count opens its definitions in a popover.
The systems of luv and of the wiki that renders it, fundamentals first. A file's count opens its definitions; symbols in the pages link to their definitions and
Dependencies between the systems, essential edges only (test systems and the aggregate
One Lisp source file of the system as read by luv-wiki.
(text)((call tool-call) stream)(pathname &key relative-path system-name)(text &key (name "string"))Read TEXT into a list of top-level LISP-NODEs, comments included, in order. Reader errors are recovered from where Eclector offers a restart and otherwise end the read; NAME labels warnings.
Logical disjunction of tests and raw truth values.
(nodes pathname line-starts)The DEFINITIONs among the top-level NODES of a file, in order. Comments that precede a form belong to it, and IN-PACKAGE forms set the package.
Anything in a stylesheet: a declaration, rule, at-rule, or style group.
A parenthesized list; CHILDREN are nodes in order.
Logical conjunction of tests and raw truth values.
(node)(file)(page-name)(definition &optional (site *site*))One top-level defining form of a source file.
(&key (code t))(definition &optional (site *site*))The href of DEFINITION's line in its source page, or NIL when the site has no page for its file.
(definition &key href (name-p t))One line of a definitions index: kind, name (or only the method signature when NAME-P is false, under its generic), with file:line as the tooltip.
(definition)(definitions)DEFINITIONS in order, but with each method attached to the generic (or first method) of the same name: a list of (definition . methods).
(file &key (prefix ""))The definitions of FILE as a scannable list linking to their lines, methods grouped under their generic.
(path)Two values joined by a slash, as in the font shorthand 0.72rem/1 or grid-area 1/3.
(current &optional (site *site*))The systems and their files as a compact list beside a source page: one DETAILS per system, the one holding CURRENT open and CURRENT marked.
(name)(file)Emit the page for FILE: its definitions table and every top-level form as dexp boxes, each anchored by its starting line, with the sidebar of all files beside it on wide screens.
(&optional (text *page*) (name "test"))While a page renders: a hash table from DEFINITION to its card id, filled by every definition link drawn on the page.
The document whose page is being rendered; makes same-page links relative.
(title body &key body-class (kind *page-kind*)
(crumbs (list (cons title nil))) (right kind))Emit a whole HTML page with the site chrome around the output of BODY: the library band with the site's three doors, a status bar with the page's breadcrumb trail on the left and RIGHT (a string, or a function emitting markup) on the right, the main column, and a footer.
The package prefix considered current while rendering, hidden on symbols.
The layout role of the node being rendered: "operator", "body", or NIL.
(node line-starts)(element)Emit Spinneret markup for ELEMENT into SPINNERET:*HTML*. Strings are plain text; each element and inline class contributes its own method.
(ids)Emit hidden cards for the figures IDS, which the page's script shows as popovers when a mention is hovered or tapped.
(name)The id of NAME's row in the source index: the name itself, slashes and all, since luv-wiki-site and luv-wiki are different systems.
While the source index renders: files whose definitions get a card.
(file)(file)A file's relative path linking to its page, the file name emphasized, and a count button that shows the definitions in a popover.
(site)The systems worth drawing: not test systems and not the aggregate root system that merely depends on everything.
(prefix string &key (start 0))(edges)EDGES is a list of (from . to). Return the edges not implied by a longer path, so a layered drawing shows only the essential dependencies.
Logical negation of one test or raw truth value.
(site)The systems and their essential dependencies as a Mermaid flowchart, fundamentals at the top.
(site)Emit source.html: the dependency graph of the systems, then one dense table in dependency order — system, description, files — where a file's count opens its definitions in a popover.
Browsing the system's source from the wiki.
A
source-fileis one Lisp file read by the Eclector client: its text, top-level nodes, and definitions. Each becomes a page under source/ drawn entirely as dexp boxes, with every top-level form anchored by its line and a table of its definitions on top, and a sidebar of every system's files beside it; source.html lists the files by system. Symbols that name a definition anywhere in the corpus link to it, "Referenced from" summaries and lisp: links point into these pages, and #ID mentions in code point back at the wiki.