Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

S-expression HTML as Standard

Name: Anonymous 2013-09-17 13:25

Who the fuck thought it would be a good idea to use opening and closing tags as DA STANDARD for SHITML? Are the people at W3 dumb?

For those who don't know what I'm talking about,
look how ugly and unnecessarily long HTML is.

<html>
<head>MY WEBSITE</head>
<title>MY WEBSITE</title>
<body>
<p>THIS KIND OF MARKUP IS <b><i><u>SHIT QUALITY</u></i></b></p>
</body>
</html>


But compared to the S-expressions

(html (head "MY WEBSITE")
(title "MY WEBSITE")
(body (p "THIS MARKUP IS" (b.i.u "SATORI QUALITY"))))


It looks far cleaner and makes your eyes feel right at home. It's easier to parse and won't take up as a few kilobytes / megabytes (depending on the page) less Internet bandwidth. Sure it has a lot of parenthesis but it's more attractive than the repeating shitstorm of </tags>.

I know there are a lot of implementations to this but there should be one STANDARD to rule them all. The next version of HTML in the standard should be something like this.

Name: Anonymous 2015-11-03 3:20

Something I've noticed among most (all?) popular languages is that they are easy to format with dumb text editors. My first experience doing anything resembling programming was creating a homepage in Microsoft Notepad. At the time, the thought of indenting my HTML for readability had never occurred to me, and I wrote my HTML with 1 tag per line (with the exception of formatting tags like <b>. But had I been aware, it would have been very easy for me to format, even in Notepad: just hit Tab a few times before you type.

Which I ended up doing in one of my first brushes with "real" programming, C++. Writing "guess the number" games and other trivial examples out of a book (before it went waaay too far over my 10~ year old head with C++ arcana) in Notepad, Tab'ing away at every new line. Of course, when I discovered "real" text editors and their ability to auto-indent newlines, I was overjoyed, but nevertheless I had been undeterred by the tedium of formatting HTML and C++ by hand for a few years.

Several years later I discovered SICP through /prog/, and with it, Lisp. I didn't quite "get it" the first time, thinking of the book as any other introductory programming book but with needlessly complicated and math-heavy examples, and though of Lisp as just another programming language, but with strange formatting. It certainly didn't help that I didn't have a text editor capable of formatting sexps at the time. Mashing space to line up sexps correctly got old fast, so I used an Algol-like formatting until I gave up on the whole ordeal.

A few years later, I'd come to understand emacs just well enough to make writing Lisp possible, and with that, I was able to truly appreciate the beauty of SICP and Lisp. But how many others like me never made that leap? And how many others like me understood emacs but hated using it so much that they never touched a piece of Lisp code outside SICP ever again? I'd love to write more Lisp, but I think I'd have to write my own text editor and Scheme before I could justify it, so instead I stick with my comfort zone of C.

Likewise, I made a pass at Haskell around that time (again because of /prog/'s memes). Likewise, the strange syntax, formatting, and dependence on emacs and vim turned me off (though in Haskell's case the semantics of a purely functional language and the community's obsession with faux-intellectual formalizations of simple concepts turned me off harder).

Call my an idiot all you like for having bad taste in text editors and programming languages, but my point is that if you need a special text editor to write in a language, it will probably never ever take off amongst the masses of "simpler-minded" programmers that make or break platforms, let alone the non-programmers that once wrote their own homepages in Notepad. So while today we can sit around and bemoan the comparative ugliness of HTML and Javascript, the web as we know it might not exist without their relative ugliness.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List