Hacker News new | ask | show | jobs
by cipherself 820 days ago
Generating `HTML` from lisps has poisoned any other approach for me, see for example https://www.neilvandyke.org/racket/html-writing/, https://reagent-project.github.io/, and https://edicl.github.io/cl-who/
1 comments

That's very nice, I wonder if we can write a sort of dsl for this in python.
The problem with this is that it doesn’t map nicely to HTML (or more generally XML) as do s-expressions.
My https://pypi.org/project/xml-from-seq/ is a simple mapper from e.g.

    ['p', 'This is a ', ['a', {'href': 'https://example.com'}, 'link']]
to

    <p>This is a <a href="https://example.com">link</a></p>