[tw5] Embedding TiddlyWiki syntax in BAM: a ridiculous yet interesting example

BASIC Anywhere Machine


<$list filter="[tag[.bas]first[10]]">

print "{{!!title}}"
</$list>

Totally ridiculous example, and not at all practical (the BAM console window is an HTML canvas, and does not handle screen scrolling/wrapping at all.) But imagine graphics, or text processing returned to TiddlyWiki via browser local/session storage.

Or dynamically generating BASIC code at runtime. Like DATA statements, or anything else imaginable.

This works because of wikification of a BASIC program before dynamically creating the HTML that will be fed to an iframe.

Although I doubt it will ever be a problem, it is important to make sure that there is absolutely nothing in BASIC syntax that could be mistakenly wikified.

Seeing as Iā€™m not particularly confident of my ability to communicate in words the thoughts (well parsed-out from all of the other intertwingled ones) in my head, Iā€™m thinking a good idea to add a screenshot.

1 Like

A great benefit of hosting a programming language in TiddlyWiki: instant ā€œmetaprogrammingā€ characteristics.

Just another silly example to test out the varsWidget:

1 Like