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

bbcode v0.1

Name: Anonymous 2007-09-11 22:38 ID:uR52DJVN

[bbcode]
[title="Hello World"]
[author="Anonymous"]

[main]
  [let="a"]5[/let]
  [while]a>0[do]
  [let="a"]a-1[/let]
  Hello, World!
  [val="a"]
  [/do]
  [/while]
  [call="test"]
[/main]

[test]
hihihi world!
[/test]

[/bbcode]

suggest and improve.

Name: Anonymous 2007-09-13 11:50 ID:Lxi/dWxS

>>39
I propose that anything at top level that is not a function call should be treated as literal (and HTML-escaped). This way:
[b]a b c[/b]
would be treated as (display "<B>") (display (html-escape "a b c")) (display "</B>") yet
[foo a b c]
would be treated as (foo a b c).

The problem with [foo]a b c[/foo] is how to treat what's outside the square brackets. Is it three symbols? A string? Is whitespace significant? Etc. We'd have to treat everything outside [] as a whitespace-sensitive string, and all functions would have to be functions of one string argument returning one string. And this means we can't return functions. And this means we can't fix the one arg limit as you would in Lambda Calculus. Unless you allow nesting [], which would be piss ugly... (add 1 2) would become:
[[add]1[/add]]2[/[add]1[/add]]

All of this means we'd be getting something worse than Tcl. So I propose a Lisp, with the toplevel exception I described.

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