◊(Local Yarn Code "Update of "Ideas Scratchpad"")

Overview

Artifact ID: b9fb74bee193fe0a1d757106947e234f9efa90db19b53bf5a09a2a44bcc1b119
Page Name:Ideas Scratchpad
Date: 2021-11-28 16:01:13
Original User: joel
Mimetype:text/x-markdown
Parent: 5f22f4e65c8dff9dff60a59cd883687aa5d051105c6cbd45387ea1b4ba42f33f (diff)
Next b5c47676a828f74dd37b770d81e5ec8c82b3b07d0c2e8dff707ab087316fcc29
Content

Ideas for rebooting the project

I’m a little better at this than I was when I started the project, and I have some ideas that will make the site simpler, quicker, and more elegant.

The SQLite cache would be removed.

Articles would keep all the values needed to render themselves and their notes in their metas, rather than reparsing the doc at render time.

Articles and notes would compile to an AST rather than directly to HTML or LaTeX or MP3 or whatever (no “poly tags” required).

At compile time, an article would serialize each of its notes, in the form of a listing prefab struct, to a separate .rktd file in a subfolder. The filename would be formatted as YYYYMMDDHHMMSS_id to allow for easy sorting by datetime.

After all updated articles are compiled, an indexer (yarn/system below) would collect these sort tables and serialize them to .rktd files:

  • Dictionary of main index entries → subentry + list of link targets
  • Hash table of series → articles
  • Ordered lists of all articles and notes by date

Cross-references

There would be a clear cross-referencing model:

  • A pin is an index entry. In a body of text, it links to the index entry.
  • A def is also a pin that can be cross-referenced directly in another text.
    • In a body of text, it is italicized, prefixed with a manicule, and links to the index entry.
    • Every title of an article becomes its own def.
  • A ref simply links directly to a def (not to the index).
    • Ref links get resolved at template render time.

Rendered articles will be able to include previous/next links for other articles in their series

Organization

  • thelocalyarn
    • articles
    • series
    • templates
    • img
    • web (CSS, JS, fonts, etc)
    • yarn-lib
      • markup (anything needed by articles at compile time)
      • struct (AST)
      • system (for gathering info from/referring to other files)
      • render
        • base
        • html
        • latex
        • mp3
    • yarn-doc
    • pollen.rkt
    • blog.rkt
    • feed.rkt
    • index.rkt
    • crossref.rkt
    • makefile

Templates will (require yarn/html) or whichever module is needed for the output format.