Browse code

Archive given files

Robert Cranston authored on 09/05/2025 21:51:04
Showing 3 changed files

1 1
new file mode 100644
... ...
@@ -0,0 +1,8 @@
1
+/task.txt
2
+/sha1sums.txt
3
+/codex-key.txt
4
+/codex.umz
5
+/sandmark.umz
6
+/sandmark-output.txt
7
+/um.um
8
+/um-spec.txt
... ...
@@ -7,3 +7,30 @@ all:
7 7
 .PHONY: clean
8 8
 clean:
9 9
 	git clean -Xi
10
+
11
+URL = http://boundvariable.org
12
+task.txt:
13
+	curl -sSL $(URL)/task.shtml \
14
+	| pandoc --from html --to plain --columns=79 \
15
+	| awk ' \
16
+	  /^An Urgent Appeal$$/           { body = 1;      } \
17
+	  /^Carnegie Mellon University$$/ { print; exit;   } \
18
+	  /^[[:punct:]]+$$/               { getline; next; } \
19
+	  body; \
20
+	' > $@
21
+sha1sums.txt:
22
+	curl -sSL $(URL)/task.shtml \
23
+	| pandoc --from html --to plain --columns=79 \
24
+	| awk ' \
25
+	  $$1 == "[]"    { file = $$2; } \
26
+	  $$1 == "SHA-1" { print $$3, "*" file; } \
27
+	' > $@
28
+codex-key.txt: task.txt
29
+	awk 'key { print; exit; } /decryption key/ { key = 1; }' task.txt > $@
30
+codex.umz sandmark.umz: sha1sums.txt
31
+	curl -sSL $(URL)/$@ > $@
32
+	awk '$$2 == "*$@"' sha1sums.txt | sha1sum -c
33
+sandmark-output.txt um.um:
34
+	curl -sSL $(URL)/$@ > $@
35
+um-spec.txt:
36
+	curl -sSL $(URL)/$@ | awk 'sub(/ *$$/, "") || 1;' > $@
... ...
@@ -5,6 +5,39 @@ Research notes regarding the [Cult of the Bound Variable][] and affiliates.
5 5
 [`boundvariable`]: https://git.rcrnstn.net/rcrnstn/cult-of-the-bound-variable
6 6
 [Cult of the Bound Variable]: http://boundvariable.org
7 7
 
8
+## Universal Machine (UM)
9
+
10
+### An puzzling appeal
11
+
12
+The association of amateur computational archaeolinguistics, of which I am
13
+a/the member, has heard the call of Professor Emeritus Harry Q. Bovik and
14
+intend to contribute to the [task][] outlined if we can.
15
+
16
+As an archaeolinguist my first instinct is to sort through what we know so far
17
+and archive it locally, I hope Professor Bovik doesn't not mind. I also hope
18
+you like [AWK][]. The [`Makefile`][] now downloads/generates the following:
19
+
20
+-   [`task.txt`][]: Slightly trimmed plain text version of the task.
21
+-   [`sha1sums.txt`][]: File hashes extracted from the task.
22
+-   [`codex-key.txt`][]: Codex key extracted from the task.
23
+-   `codex.umz`: The codex.
24
+-   `sandmark.umz`: The benchmark.
25
+-   [`sandmark-output.txt`][]: Expected output of the benchmark.
26
+-   [`um-spec.txt`][]: Specification for the Universal Machine.
27
+-   `um.um`: CMU Reference implementation of the Universal Machine.
28
+
29
+These files are all committed but also added to `.gitignore` and removed by
30
+`make clean`.
31
+
32
+[tasks]: http://www.boundvariable.org/task.shtml
33
+[AWK]: https://en.wikipedia.org/wiki/AWK
34
+[`Makefile`]: Makefile
35
+[`task.txt`]: task.txt
36
+[`sha1sums.txt`]: sha1sums.txt
37
+[`codex-key.txt`]: codex-key.txt
38
+[`sandmark-output.txt`]: sandmark-output.txt
39
+[`um-spec.txt`]: um-spec.txt
40
+
8 41
 ## License
9 42
 
10 43
 Licensed under the [ISC License][] unless otherwise noted, see the