Re:Show HN: HyTags – HTML as a Programming Language
by embedding-shape on Wednesday January 14, 2026 @02:47PM
(#46621827)
> A simplified subset of (HT|X)ML that uses only elements and no attributes is pretty much directyl equivalent to S-expressions, sure.
Add one more type, like a map, now you have attributes
(fn btn ()
(div
{onClick (fn ())}
"Click me"))
Re:Show HN: HyTags – HTML as a Programming Language
by npn on Wednesday January 14, 2026 @09:47PM
(#46627415)
Have you ever tried parsing html in s-expression languages before?
For example, in elixir parsing html is this syntax: `{html_tag, attributes, children}`.
You indeed can include attributes in s expression
Re:Show HN: HyTags – HTML as a Programming Language
by shakna on Thursday January 15, 2026 @03:14AM
(#46629622)
Every Lisp I know of has SXML either baked in, or as a library because it absolutely can represent the fullness of HTML...
(parrot (@ (type "African Grey")) (name "Alfie"))
Becomes: <parrot type="African Grey"><name>Alfie</name></parrot>
https://www.gnu.org/software/guile/manual/html_node/SXML.htm...
Re:Show HN: HyTags – HTML as a Programming Language
by dragonwriter on Thursday January 15, 2026 @03:29AM
(#46629731)
Yes, (HT|X)ML have a semantic model that that can be represented in Lisp syntax, but so does everything else (well, every programming and data representation language, at least.) They don't do it with the same (or simple parallel) single simple syntactic fiundaton as Lisp, but with something more complex.
No, its not. If it was, the attribute vs. child element distinction would not exist. HTML (and HTML-inspired XML) syntax is not a trivial alternative to S-expression syntax, it is more complex with additional distinctions.
A simplified subset of (HT|X)ML that uses only elements and no attributes is pretty much directyl equivalent to S-expressions, sure.