HTMS is OSS

PACKAGE 2.4
SLIDES 3.1

HTMS is OSS

© 2022 Siemens AG. Licensed Creative Commons Zero v1.0 Universal

Contents

HTMS Background

HTMS debuted at EuroTcl 2019 as part of SPMC: SISLIDY Presentation Markup Compiler.

HTMS is OSS debuted at Sqlite2021.

HTMS is the basis of the SPMC presentation markup compiler.

SPMC compiled this slide show into a single HTML document.

HTMS-2.4.0.tm

Syntax Review

Quick Review

HyperText Markup Shorthand

a quick review

Void Tags

Void tags cannot contain content.

HTMS

br

HTML

<br/>

Empty Elements

Empty elements do not have contents.

HTMS

figcaption

HTML

<figcaption>
</figcaption>

Elements with Content

HTML is meant to markup content.

HTMS

p CONTENT

HTML

<p>
    CONTENT
</p>

Tags w/ Key-only Attributes

Key-only attributes have implied values.

HTMS

p.hidden CONTENT

HTML

<p hidden=hidden>
    CONTENT
</p>

Tags w/ Key-Value Attributes

Key-value attributes have explicit values.

HTMS

a.rel=next CONTENT

HTML

<a rel=next>
    CONTENT
</a>

Tags w/ Multiple Attributes

Tags can have multiple attributes.

HTMS

a.rel=next.rev=prev CONTENT

HTML

<a rel=next rev=prev>
    CONTENT
</a>

Superfluous Attributes

Special case of superfluous attributes.

HTMS

a.rel=next.rel=prev CONTENT

HTML

<a rel=next>
    CONTENT
</a>

Superfluous attributes are omitted.

Micro-optimizations

A lot of tiny changes can sum up to a noticeable improvement.

A billion here, a billion there, and pretty soon you're talking real money.
  — attributed to U.S. Senator Everett Dirksen

See Improving ... performance using micro-optimizations. EuroTcl, Eindhoven, 2016.

Tags with a Class Attribute

The class attribute is the element's type.

HTMS

a=C1 CONTENT

HTML

<a class=C1>
    CONTENT
</a>

Tags with an ID Attribute

IDs name elements in HTML, CSS, etc.

HTMS

p#1a CONTENT

HTML

<p id=1a>
    CONTENT
</p>

Tags with Style Properties

Style attributes contain CSS properties.

HTMS

a.color:red CONTENT

HTML

<a style=color: red;>
    CONTENT
</a>

Multiple Style Properties ...

... are put in a single attribute.

HTMS

a.color:#800.color:red.hyphens:none CONTENT

HTML

<a style=color: red; hyphens: none;>
    CONTENT
</a>

Superfluous properties are omitted.

Compound Shorthand

The shorthand forms can be combined.

HTMS

figcaption=quote#dirksen.hidden.color:blue

HTML

<figcaption class=quote id=dirksen
   hidden style=color: blue;>
</figcaption>

Sample Savings

Summary of Savings

www.tcl.tk/tcl/TclCmd/*.htm

htms size          raw size
1_245_614  93% of 1_346_630     111 files
    6_487  94% of     7_077        median
   11_222  94% of    12_135          mean
htms size         full size
1_245_614  91% of 1_382_875     111 files
    6_487  92% of     7_375        median
   11_222  92% of    12_458          mean

An Anchor with an Href

Use a second # (and BTW, .. is .)

HTMS

a##tcl..tk/#globalnav CONTENT

HTML

<a href=tcl.tk/#globalnav>
    CONTENT
</a>

Saves and additional 2%-points.

Extra Savings

Summary of Extra Savings

www.tcl.tk/tcl/TclCmd/*.htm

htms size  -vs-  raw size, -vs-  full size
1_239_233   91% 1_346_630  89%  1_382_875    111 files
    6_340   92%     7_077  90%      7_375       median
   11_164   92%    12_132  90%     12_458         mean

Anchor with everything

HTMS

a=C1#1a#tcl..tk.rel=next.fg:#FFF.bg:blue 
    HTML content 

HTML

<a class=C1 id=1a href=tcl.tk rel=next
   style=fg: #FFF; bg: blue;>
    HTML content
</a>

Open Source Licensing

OSS Licensing

granting copying rights

Open Source Software

open..., free/libre..., shared...

Not merely available source

With many, many license choices ...

The CC0-1.0 License

Creative Commons Zero v1.0 Universal

Free for any usage EXCEPT patents or trademarks!

The CC-BY-3.0 License

CC Attribution 3.0 Unported

Free for any copyright usage, but ...

Neither FSF- nor OSI-approved for software.

The MIT License

(Mass. Inst. of Tech.) License

Free for any usage, but ...

Both FSF- and OSI-approved for software.

The MIT-0 License

MIT No Attribution

Free for any usage.

OSI approved for software.

The TCL License

TCL/TK License

Free for any usage, but ...

Neither FSF- nor OSI-approved for software.

The Knuth License

(Donald E.) Knuth License

Neither FSF- nor OSI-approved for software.

Other Licenses

Honorable mentions:

Summary

Summary

HTMS is OSS

Public Fossil Repository

Public Repository

chiselapp.com/user/k8/repository/htms

Tcl Modules

​                             lines LOC
cmd/htms                       11    6
lib/drymodule-2.1.3.tm        111   29
src/edict/genpun-1.1.2.tm     112   65
src/edict/supsub-1.1.2.tm      47   41
src/htms-2.4.4.tm             275  244
src/htmscli-2.4.1.tm          109   93
---------------------------- ----- ---
​                              665  478

Summary

Summary

Bibliography

Take-Aways



Thank you for your attention!