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

Towards a better BBCode

Name: !Xarn.JCoew 2010-05-24 20:28

cairnarvon@feynman:~$ cat hello.txt
Hello {spoiler /prog/}.

What do you think of my {sup new} syntax for {i {sup B}{sub B}code} based on S-expressions? It supports {b.i.u function composition} and {sup*2 iteration {sub*3 (and nesting, obviously)}}. It uses curly braces {m \{\}} rather than the traditional {b (}parentheses{b )} because that will require less escaping.

{aa No more unmatched or misnested tags!}

I've written a {spoiler.i terrible} FIOC {i.m SexpCode-to-BBCode} translator, which you can find here: http://sprunge.us/KPWB?py
cairnarvon@feynman:~$ python sexpcode.py < hello.txt
Hello [spoiler]/prog/[/spoiler].

What do you think of my [sup]new[/sup] syntax for [i][sup]B[/sup][sub]B[/sub]code[/i] based on S-expressions? It supports [b][i][u]function composition[/u][/i][/b] and [sup][sup]iteration [sub][sub][sub](and nesting, obviously)[/sub][/sub][/sub][/sup][/sup]. It uses curly braces [m]{}[/m] rather than the traditional [b]([/b]parentheses[b])[/b] because that will require less escaping.

[aa]No more unmatched or misnested tags![/aa]

I've written a [spoiler][i]terrible[/i][/spoiler] FIOC [i][m]SexpCode-to-BBCode[/m][/i] translator, which you can find here: http://sprunge.us/KPWB?py


Hello /prog/.

What do you think of my new syntax for BBcode based on S-expressions? It supports function composition and iteration (and nesting, obviously). It uses curly braces {} rather than the traditional (parentheses) because that will require less escaping.

No more unmatched or misnested tags!

I've written a terrible FIOC SexpCode-to-BBCode translator, which you can find here: http://sprunge.us/KPWB?py

Name: Anonymous 2010-05-24 23:24

>>35
How exactly the fuck do you propose that the parser handle writing } inside a code block and still know when to close it, without having to modify one or the other? And what the fuck are you even babbling about? This has nothing to do with ``literate'' bullshit, it's about how the proposition to use one single character to close a block is a far worse proposition than duplicating one character.

And you obviously can use [b] as an array subscript, without having to change the code. The only thing you can't write without modifying it is [/code], and that's not valid syntax in any programming language I can think of offhand.

>>37
I brought up [/] already in >>20. This same syntax could of course be used with HTML (which no one has yet come up with a single actual reason for not using).

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