I've been using SXML [0] for all my sgml needs in Racket and the quality of life improvement from having a sane and regular syntax for everything is hard to overstate. seml looks like it might have the same kind of quality of life improvements for some of my elisp-only code. I'm not sold on the way that missing attributes are handled using nil, that seems like a design decision that was made to simplify parsing at the expense of making the representation more cluttered.<p><a href="https://docs.racket-lang.org/sxml/" rel="nofollow">https://docs.racket-lang.org/sxml/</a>
I used to spend a lot of time manually typing up examples of why S-expressions are cleaner and more readable than XML, HTML, JSON, YAML &c. They are, they really are. And yet for some reason there's a population of people who prefer:<p><pre><code> <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>sample page</title>
<link rel="stylesheet" href="sample1.css"/>
</head>
<body>
<h1>sample</h1>
<p>
text sample
</p>
</body>
</html>
</code></pre>
to:<p><pre><code> (html ((lang . "en"))
(head nil
(meta ((charset . "utf-8")))
(title nil "sample page")
(link ((rel . "stylesheet") (href . "sample1.css"))))
(body nil
(h1 nil "sample")
(p nil "text sample")))
</code></pre>
I don't understand it, but it seems to be true. The egotistical part of me feels that they just haven't experience the enlightenment of understanding the benefits of have all data & code be manipulable, structured data rather than dead text which must be painstakingly parsed, combined with the benefits of a <i>single</i>, general, universal, cheaply-parseable representation.<p>But the professional, open-minded part of me wonders if maybe <i>I</i> am missing the point. Maybe all that painful-to-parse, irregular syntax is buying something. Maybe there's a reason every generation for the last 50 years has been approximating some but not all of the features of Lisp. Maybe those other languages and formats have worthwhile benefits. Maybe they're even superior.<p>Or maybe most folks really are stuck in a local maximum, like kids who like being read to and don't see the advantage of learning to read. I honestly don't know.<p>Regardless, SEML looks great.
Makes me think of Edi Weitz's CL-WHO, which works very nicely if creating web pages from Common Lisp.
<a href="https://edicl.github.io/cl-who/" rel="nofollow">https://edicl.github.io/cl-who/</a>
This reminds me very much of Hiccup[1]. Both nested s-expressions and HTML describe trees.<p>[1] <a href="https://github.com/weavejester/hiccup" rel="nofollow">https://github.com/weavejester/hiccup</a>
This is interesting. It reminds me of the API behind JSX. But I'm not sure what problem this is seeking to solve exactly. Is it showing that HTML and s-expressions are technically interchangeable?