Article Publishing
~ square lisp wiki syntax idea
This is a suggestion (that I will also likely implement myself) about a markup for a wiki (does not have to be wiki, could be blog, forum, or other) that offers a quick but extensible markup, similar to a Lisp language but instead uses square brackets.

The markup (or down) looks as follows:

    This is an article with some [b bold text] and also [i italic text] with 
    a [url http://somesite.com web link] too.

    This is some [b bold and [i italic] text] in a nest, so that the word 
    italic is both bold and italic

For source code embedded in a wiki article, one would have to escape or ignore the square brackets, as source code often contains square brackets for arrays/slices.

Theory of parser: if it comes across a url, it consumes the first two items in the list, the second being the actual url to a website, then the rest of the items are the text label that is clickable.

If the parser comes across a "b" inside a square bracket, it consumes the rest of the items and that text will be shown bold. Same for italic.

The syntax could be extended with a config file to make:

    [custom some text]

Where custom defines some html property. I.e. to make text big, a config file could specify "big" as a new custom markup allowed:

    [big some text here] and maybe [small some text here] and this is 
    regular text here.

It would also allow code to be executed, if necessary, or calculated. I.e. + 1 2 6 will add the numbers 1, 2, and 6 and output the result into the wiki. Important note: although this is a wiki markup, it could also be a full (or partial) programming language.

There is also the opportunity to do the Lisp Wiki syntax the other way around, such as
[some text b]
...where some text is bold, with the operator b being for bold, and
[some text i]
where some text is italic, with i as the italic operator, and
[1 2 6 +]
to add the numbers 1, 2, and 6. (Postfix versus Prefix)

A back quote or a quote could be used to specify the start of a string, but maybe it is not even necessary for a wiki. As a programming language instead of just a wiki syntax, it would indeed require more detail.

Square brackets are used for ease of typing, since no shift key required, but round brackets could be used too.

The key efficiency and beauty of this parser is that the first item in the list (or last, in postfix) is really all that is required to then markup the rest of the items.. And in some cases the first two items are needed, in the case of a url. A config file could specify if the first one, two, or three, or even more items are required, then the rest of the items are all consumed until the closing bracket.

It is likely easier on the eyes than ugly xml or html, and is quicker to type. It is less verbose than bbcode markup, but I do like bbcode since square brackets seem aesthetically more pleasant and easier to type without a shift key on standard english keyboard, compared to XML.

https://encrypted-tbn0.gstatic.com/image...EKKqv5AFXg

There must be some disadvantages to square lisp markup idea, which I would have to think about, or try the parser out and see. But why bother in a universe of idiots playing mind games? We will see if time allows. Otherwise, fuck you, and have a bad day faggots.
Copyright © War Strategists, M.G. Consequences 2009-2017    Help! Edit Page