aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docs/wiki_src/coding/meta-programming.md33
-rw-r--r--docs/wiki_src/custom.css9
2 files changed, 42 insertions, 0 deletions
diff --git a/docs/wiki_src/coding/meta-programming.md b/docs/wiki_src/coding/meta-programming.md
index 716cc7a..a77ecbe 100644
--- a/docs/wiki_src/coding/meta-programming.md
+++ b/docs/wiki_src/coding/meta-programming.md
@@ -52,6 +52,39 @@ add-two* [`(,0 + (+2u))]
:test (!(add-two* `(+2u))) ((+4u))
```
+## Self-interpretation
+
+Using a metacircular self-interpreter, bruijn can reduce the meta
+encoding to its normal form. A 194 bit interpreter in the form of
+bruijn's logo:
+
+``` code-showcase
+01010001 00011100
+11010000 ###### 11100110
+10000 ############ 00001
+01011 ##### ##### 00001
+11100 #### #### 00101
+01110 #### ##### 00011
+00000 #### ###### 10100
+00011 #### ### #### 00111
+10000 #### ## #### 11111
+00001 #### ### #### 11110
+00010 ###### #### 11110
+10011 ##### #### 10100
+11110 #### #### 00011
+11000 ##### ##### 00011
+11000 ############ 01011
+01101110 ###### 00011001
+00011010 00011010
+```
+
+The code can also be found in the `eval`{.bruijn}/`!‣`{.bruijn} function
+of the meta library:
+
+``` bruijn
+:test (!`"tacocat".reverse) ("tacocat")
+```
+
## Meta library [`std/Meta`](/std/Meta.bruijn.html)
The meta library enables simple interaction with the meta encoding.
diff --git a/docs/wiki_src/custom.css b/docs/wiki_src/custom.css
index d68a10c..b688f54 100644
--- a/docs/wiki_src/custom.css
+++ b/docs/wiki_src/custom.css
@@ -70,3 +70,12 @@ h2,h3,h4,h5,h6 {
.terminal h6 > * {
font-size: inherit;
}
+
+pre:has(.language-code-showcase), .language-code-showcase {
+ background-color: transparent;
+ border: 0;
+ margin: 0 auto;
+ width: fit-content;
+ max-width: 100%;
+ white-space: pre;
+}