Re:Major mode for editing SEML (S-Expression Markup Language...
by nfoz on Monday June 03, 2019 @10:36AM
(#20083503)
Your example (and all the SEML documentation it seems) is missing marked-up text. For example, how would you represent:
<p>This is a <b>really cool</b> sentence.</p>
Your solution will probably have to splice the text segments around the embedded markup, something like: (p nil (text "This is a " (b nil "really cool") " sentence."))
In particular, notice the careful whitespace at the edges of the strings.IMO this Sexpr is now more obtuse than the XML, and the more markup you have within text-spans (e.g. nested markup), the worse it gets. This is also a major difference between XML (markup language) vs JSON (data-structure notation).
Maybe you don't need the (text ...) thing, but either way you're changing the grammar. How do SEML and SXML handle this?
Re:Major mode for editing SEML (S-Expression Markup Language...
by undersuit on Monday June 03, 2019 @12:41PM
(#20085185)
The issue is the spaces, so let's get rid of them!
(p nil (text (string-join '("This" "is "a" '(b nil "really") '(b nil "cool") "sentence.") " ")))
No more wondering if the space between 'really' and 'cool' should be bold and no need to have awkward preceding and trailing padding.
Re:Major mode for editing SEML (S-Expression Markup Language...
by zeveb on Tuesday June 04, 2019 @09:04AM
(#20094553)
I think that's mostly an artifact of SEML. In SXML that would be:
(p "This is a " (b "really cool") " sentence.")
Which seems a-okay to me.
Re:Major mode for editing SEML (S-Expression Markup Language...
by MikusR on Monday June 03, 2019 @09:21AM
(#20082795)
Quoting the page: "SEML is short and easy to understand for Lisp hacker."
For someone that has edited a couple of html pages but is not a programmer SEML looks like gibberish (who is nil?).
Re:Major mode for editing SEML (S-Expression Markup Language...
by zeveb on Monday June 03, 2019 @10:13AM
(#20083246)
Honestly, SXML is probably cleaner and easier than SEML. The example in SXML would be:
(html (@ (lang "en"))
(head
(meta (@ (charset "utf-8")))
(title "sample page")
(link (@ (rel "stylesheet") (href "sample1.css"))))
(body
(h1 "sample")
(p "text sample")))
The great thing about standards is that there are so many to choose from.
But the professional, open-minded part of me wonders if maybe 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.
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.
Regardless, SEML looks great.