From fcbf64dbe28132a3d4f1e857b66db1ac172a50a0 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:48:22 -0800 Subject: [PATCH 1/2] Format/typo check 1995/heathbar --- 1995/heathbar/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1995/heathbar/README.md b/1995/heathbar/README.md index a1110fbee..9488f78d3 100644 --- a/1995/heathbar/README.md +++ b/1995/heathbar/README.md @@ -37,7 +37,7 @@ end, I made three critical observations: 1. If there's one thing computers are good at, it's math. 2. Simple operations take less time than complicated ones. -3. Every C program seems to contain the word "main". +3. Every C program seems to contain the word `main`. Based on #1, I knew that the Fastest Program had to be one that performed addition. From #2, I reasoned that it ought to directly @@ -46,7 +46,7 @@ high-level, fuzzy-logic, artificial-intelligence, neural-net, client-server, object-oriented abstractions like the C language "+" operator. And it was obvious from #3 that the program should resemble, as closely as possible, a long sequence of the familiar -word "main" repeated over and over, so the computer would be +word `main` repeated over and over, so the computer would be comfortable running the program and wouldn't get distracted dealing with unfamiliar variable names. From cba214fd567317e1107ee2c5d6940c95a8499f35 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:52:03 -0800 Subject: [PATCH 2/2] Minor fixes in 1995/garry Format fixes in README.md. Add missing garry.alt.test.sh script I supposedly added a while back. --- 1995/garry/README.md | 10 ++++++---- 1995/garry/garry.alt.test.sh | 13 +++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 1995/garry/garry.alt.test.sh diff --git a/1995/garry/README.md b/1995/garry/README.md index 635806c93..bc142e2db 100644 --- a/1995/garry/README.md +++ b/1995/garry/README.md @@ -64,7 +64,7 @@ This program is a file filter, designed to do environment-expansion and incorporating the ability to create binary from escaped data in the environment variables. -The calling syntax is pretty simple, just use it with stdio-redirection +The calling syntax is pretty simple, just use it with `stdio`-redirection or inside pipelines, e.g.: ```sh @@ -79,10 +79,12 @@ cat all_my_files/* | ./garry | lp The syntax of the conversion of the input file is as follows: To include the value of an environment variable in the output file, place the name of the -variable between "$"-signs in the input, e.g.: +variable between `$`-signs in the input, e.g.: - My Home-Directory is: $HOME$ - I'm using the path: $PATH$ +``` +My Home-Directory is: $HOME$ +I'm using the path: $PATH$ +``` Unknown Env-variables or malformed expressions are ignored and kept intact. diff --git a/1995/garry/garry.alt.test.sh b/1995/garry/garry.alt.test.sh new file mode 100755 index 000000000..c6f980c80 --- /dev/null +++ b/1995/garry/garry.alt.test.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +# +# garry.alt.test.sh - example of how to use garry.alt + +EXAMPLEON="\33\133\61\73\67\155" +EXAMPLEOFF="\33\133\155" +DOLLAR="$" +export EXAMPLEON EXAMPLEOFF DOLLAR + +# make sure alt code is built, first +make alt || exit 1 + +./garry.alt