Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
S-Expression based markup language (rotahall.org)
58 points by SlyShy on May 30, 2010 | hide | past | favorite | 19 comments


Supported tags are b, i, u, s, o, sub, sup, code, spoiler, quote, blockquote, and m.

Let's get some semantic tags in there; I thought we all agreed that the display elements (bold, underline, italics) are out and semantic elements (strong, emphasis) are in.


The semantic web somehow took a hit when w3c decided to work on html5 at the expense of xhtml2. By the way, the semantic web is a lie (really, I don't think there's a good way to separate content and presentation, as the presentation is somehow part of the content).

What people on a forum are trying to do, is not to make their text look "strong", whatever that means to the person who made the forum stylesheet, but to make their text bold, whatever that means to them.


> What people on a forum are trying to do, is not to make their text look "strong", whatever that means to the person who made the forum stylesheet, but to make their text bold, whatever that means to them.

Well, no, not really; that's like saying that I'm trying to create a grilled-cheese sandwich when I go shopping. Unless I am a professional chef (and thus looking to experiment with the form rather than the content), what I really want is the experience of eating a grilled-cheese sandwich: the taste, texture, aroma, visual of grill-marks on bread, etc.

What people on a forum want is the experience of seeing a bolded or italic word: that they mentally emphasize, or add importance to, the term so marked-up. The bolding is just a mechanism by which to achieve that experience, a communication tool similar to speed lines in a comic book. If a particular comic book does something other than speed lines to indicate movement—or if a particular website does something else to indicate emphasis—then that is what will be sought out, as that is the word used in the "vocabulary" of the site's design to describe emphasis.

Strength or emphasis are the real goals; people just aren't used to stating their real goals, rather than "what they're trying to do." (The bane of IRC help channels everywhere.)


Bold or italic are two way to emphasize a word. (The destinction between "strong" and "emphasis" seems quite arbitrary to me.) Yet, go around and change the bold words in some person's text by italic words, and he will probably not be happy, yet the emphasis is still there.

Edit : hoho, got the same point as Daniel Newby above whitout even looking. If that's not some kind of proof..


However, if you male the strong text red, and the emphasized text green, instead of typographically styling them at all, your audience will begin to understand fairly shortly if your work is text-heavy. In publishing, you underline words in your manuscript that you want to come out emphasized: nowadays, they do it with italics, but before, they did indeed just underline your text in the published copy.


XML and XSLT can separate it, although I don't know anyone who likes writing XSLT.

JSON for content and JavaScript to create HTML DOM would be my choice.


I did xml and xslt once, and tought it was very cool, and certainly under-appreciated. And gosh, it even works under IE6.


the semantic web has nothing tod with semantic markup or html5 or xhtml2.


Let us not over-generalise when it is not needed. Italics and bold are established typographic forms, and if they are what I want let me say so exactly.


Which is why I didn't say the b and i, etc, should be removed, but having a wider range of supported tags in the base distribution (despite that people can extend it themselves) would be good.


What, pray tell, is the semantic difference between "strong" and "emphasis"? They're lawyer words that mean anything you want them to!

The semantics of HTML are whatever the user agent does with them. It is a declarative programming language. If HTML were a semantic tool, I would be able to define what the <strident> element means in my system spec. Instead I have to find an inline element and hijack it, which is about as semantic as a poke in the eye with a sharp stick. The necessity of using templating engines for HTML is proof that it is a pretty weak tool for semantics.

And if somebody wants to inflict S expressions on me, I'd better get macros.

EDITED.


<strong> is intended to convey importance, whereas <em> is intended to convey grammatical emphasis (as you would emphasize a word in a sentence when speaking):

  "You're going to be gone for <em>three</em> weeks?" vs.
  "You're going to be <em>gone</em> for three weeks?"

  "Now we will talk about <strong>encapsulation</strong>".
These definitions taken from the HTML5 spec. Obviously, the words "strong" and "emphasis" are colloquially used interchangeably, but in HTML the language, they mean two distinct things.

Similarly, the old <b> and <i> have been redefined for different use where phrases should be typographically distinguished without the implication of emphasis.

Had we invented HTML today, we probably would have named these tags differently, but that's the nature of backwards compatibility and gradual evolution.


Thanks!

I'm still not a fan of trying to tell machines about the meaning of natural language elements. Doing useful things with the information is equivalent to natural language processing, which is a hard problem. I once found a completely marked-up English dictionary and thought Oh, this will make it easy for the computer to understand English. Ha ha ha no. What the mark-up nerds call semantics turns out to be a microscopic subset of the full semantics.

What is useful is marking up the structure of documents. Knowing what the title is and where the sections are turns out to be useful for search scoping, even if the machine has no idea what the title means.


Or you can use the real thing:

http://weitz.de/cl-who/


You could also use SXML[1].

[1] http://okmij.org/ftp/Scheme/SXML.html


As the author points out, S-expressions using parenthesis as delimiters are probably not appropriate for text.


Looks similar to Latte minus the backslashes. (Which is good; I wrote my old website in Latte minus the backslashes, using a little preprocessor to adjust the syntax.)

http://www.latte.org/

Also http://curl.com/


Neat, but how do you insert links with it?


{url http://example.com/ Click here!}

From the manual/spec at:

http://cairnarvon.rotahall.org/misc/sexpcode.html

An interesting idea, but I'm not convinced that it has that many advantages.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: