Swim::Design(3)
π Swim::Design π
ok so bestie, welcome to the Swim::Design page β it lives in section 3 of the User Contributed Perl Documentation, and it's basically the vibe manifesto for the Swim markup format. This is where we spill the goals and the design decisions, no cap. π«Ά
This document describes the Swim markup format, its goals and its specific design decisions. β¨
π Swim Goals π
okay so here's the whole dream, laid out:
- Beautiful input syntax and beautiful output renderings π
- (re)Use the best existing markup syntaxes
- Render to many formats
- HTML
- Plain text
- Other common text markups (Markdown, Pod, etc)
- Core info model supports most common, useful constructs
- Support everything else via pluggable extension syntax π₯
π¦ The Swim Informational Model π¦
So Swim defines an information model for text documents, and the 2 main generic components are blocks and phrases. It's giving very much the HTML concepts of divs and spans, fr fr.
The model is roughly expressed by this grammar:
# A document is a set of blocks
document: block*
# A block is /either/ a set of more blocks /or/ a set of phrases
block: block* | phrase*
# A phrase is moer or less a sentence fragement
phrase: bold | italic | link | β¦ | plain-text
And Swim is literally defined by this grammar:
# A document is a set of blocks
document: block*
# A block is /either/ a set of more blocks /or/ a set of phrases
block: block* | phrase*
# A phrase is moer or less a sentence fragement
phrase: bold | italic | link | β¦ | plain-text
π yes queen, that's the actual grammar, typos and all, and we are not touching it β it's iconic, periodt.
and that's the whole page bestie!! π§ this lil masterpiece is from perl v5.42.0, dated 2025-07-25, and it's Swim::Design(3) in the User Contributed Perl Documentation β slay, mwah, bye!! ππΈπ¦π
π¦ where this page comes from
- fedora 43: perl-Swim 0.1.48-18.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms