mirror of
https://git.acl.cool/al/pages.git
synced 2025-12-16 12:31:18 -05:00
Compare commits
No commits in common. "015dfd1769449361d0207b087ad131734451f044" and "9092be7e61af368c07d9855e955cf899db8f9fa3" have entirely different histories.
015dfd1769
...
9092be7e61
9 changed files with 67 additions and 67 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,5 +4,3 @@ css/code.css
|
||||||
pgvv/
|
pgvv/
|
||||||
all_chars.txt
|
all_chars.txt
|
||||||
**/fonts/**/*-Subset.*
|
**/fonts/**/*-Subset.*
|
||||||
woff2/
|
|
||||||
**/serve_*
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -78,7 +78,7 @@ let various_floats = [1.0; 4.0; 9.0]
|
||||||
let together : float ListMonad.t = ListMonad.bind sqrt various_floats
|
let together : float ListMonad.t = ListMonad.bind sqrt various_floats
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's an example of the monad in action. `together` is `[1.0; -1.0] @ [2.0; -2.0] @ [3.0; -3.0]`, which of course is `[1.0; -1.0; 2.0; -2.0; 3.0; -3.0]`. In this case, we used the taking-all-branches nature of the list monad to compute all the square roots of the numbers in the provided list. If taking the square-root is considered to be an ambiguous operation[^i-know], then *yada yada*. This monad is often used to run operations that have some ambiguous result, to capture the idea that multiple possible return values are valid, e.g. "the square root of four" can be considered ambiguous, since both 2^2^ and (-2)^2^ are 4. Another example of this can be found in parsing with ambiguous grammars. Parser combinator libraries often make it easy to define ambiguous-on-the-face parsers and resolve the ambiguity through some convention, but perhaps
|
Here's an example of the monad in action. `together` is `[1.0; -1.0] @ [2.0; -2.0] @ [3.0; -3.0]`, which of course is `[1.0; -1.0; 2.0' -2.0; 3.0; -3.0]`. In this case, we used the taking-all-branches nature of the list monad to compute all the square roots of the numbers in the provided list. If taking the square-root is considered to be an ambiguous operation[^i-know], then *yada yada*. This monad is often used to run operations that have some ambiguous result, to capture the idea that multiple possible return values are valid, e.g. "the square root of four" can be considered ambiguous, since both 2^2^ and (-2)^2^ are 4. Another example of this can be found in parsing with ambiguous grammars. Parser combinator libraries often make it easy to define ambiguous-on-the-face parsers and resolve the ambiguity through some convention, but perhaps
|
||||||
|
|
||||||
looks like multiple return with only one in the chain, but the sequencing is what gives us nondeterminism; multiple return doesn't chain the same. To do this without a monad we'd need to do
|
looks like multiple return with only one in the chain, but the sequencing is what gives us nondeterminism; multiple return doesn't chain the same. To do this without a monad we'd need to do
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Reading Order of The Culture
|
# Reading Order of The Culture
|
||||||
|
|
||||||
I've generated a reading order dependency graph for books in Iain M. Banks' unsurpassable Sci-Fi classic, the _Culture_ series. The idea is that if there's an arrow from book A to book B, then to get the most possible enjoyment from either A or B, A should be read before B.
|
I've generated a reading order dependency graph for books in Iain M. Banks' monumental _Culture_ series. The idea is that if there's an arrow from book A to book B, then to get the most possible enjoyment from either A or B, A should be read before B.
|
||||||
|
|
||||||
 Above is the graph, and [right here](/culture.dot.txt) is the vizgraph description file that lists my rationale for each dependency.
|
 Above is the graph, and [right here](/culture.dot.txt) is the vizgraph description file that lists my rationale for each dependency.
|
||||||
|
|
||||||
|
|
|
||||||
73
build.sh
73
build.sh
|
|
@ -1,77 +1,48 @@
|
||||||
#! /usr/bin/env nix-shell
|
#!/bin/bash
|
||||||
#! nix-shell -i bash --pure
|
|
||||||
#! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 --pure
|
|
||||||
|
|
||||||
if ! [[ -d pgvv/ ]]; then
|
./deps.sh
|
||||||
python3 -m venv pgvv
|
|
||||||
source ./pgvv/bin/activate
|
find acl.cool/serve/ ytheleus.org/serve/ -type f -mmin +11 -delete
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
pip install --upgrade pygments
|
|
||||||
deactivate
|
|
||||||
fi
|
|
||||||
|
|
||||||
function soup_config {
|
function soup_config {
|
||||||
rm soupault.toml
|
rm soupault.toml
|
||||||
cp ../soupault.toml soupault.toml
|
cp ../soupault.toml soupault.toml
|
||||||
cat soupault.toml.frag* >>soupault.toml
|
cat soupault.toml.frag* >> soupault.toml
|
||||||
}
|
}
|
||||||
|
|
||||||
source ./pgvv/bin/activate
|
source ./pgvv/bin/activate
|
||||||
|
|
||||||
find acl.cool/site/ ytheleus.org/site/ -type f \( -name '*.dj' -o -name '*.html' \) -exec cat {} + >all_chars.txt
|
find acl.cool/site/ ytheleus.org/site/ -type f \( -name '*.dj' -o -name '*.html' \) -exec cat {} + > all_chars.txt
|
||||||
cat common_chars.txt >>all_chars.txt
|
cat common_chars.txt >> all_chars.txt
|
||||||
|
|
||||||
for font in fonts/JuliaMono/*{-Light,-Regular,-SemiBold}{,Italic}.woff2; do
|
for font in fonts/JuliaMono/*{-Light,-Regular,-SemiBold}{,Italic}.woff2; do
|
||||||
woff2_decompress "$font"
|
echo "Subsetting $font"
|
||||||
ttf_font="${font%.woff2}.ttf"
|
pyftsubset "$font" --flavor=woff2 --text-file=all_chars.txt --layout-features='*' \
|
||||||
|
--output-file="$(awk -F '.woff2' '{print $1}' <<< "$font")-Subset.woff2"
|
||||||
subset_ttf="${ttf_font%.ttf}-Subset.ttf"
|
|
||||||
hb-subset "$ttf_font" \
|
|
||||||
--output-file="$subset_ttf" \
|
|
||||||
--text-file=all_chars.txt \
|
|
||||||
--layout-features='*' \
|
|
||||||
--passthrough-tables
|
|
||||||
|
|
||||||
woff2_compress "$subset_ttf"
|
|
||||||
|
|
||||||
rm "$subset_ttf" "$ttf_font"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
for font in \
|
#for font in fonts/Alegreya/static/Alegreya-{Regular,Italic,Bold,BoldItalic}.ttf; do
|
||||||
fonts/Alegreya/static/Alegreya-{Regular,Italic,Bold,BoldItalic}.ttf \
|
# echo "Subsetting $font"
|
||||||
fonts/Alegreya_Sans/AlegreyaSans-{Regular,Italic,Bold,BoldItalic}.ttf; do
|
# pyftsubset "$font" --text-file=all_chars.txt --layout-features='*' \
|
||||||
subset_ttf="${font%.ttf}-Subset.ttf"
|
# --output-file="$(awk -F '.ttf' '{print $1}' <<< "$font")-Subset.ttf"
|
||||||
hb-subset "$font" \
|
#done
|
||||||
--output-file="$subset_ttf" \
|
#
|
||||||
--text-file=all_chars.txt \
|
#for font in fonts/Alegreya_Sans/AlegreyaSans-{Regular,Italic,Bold,BoldItalic}.ttf; do
|
||||||
--layout-features='*' \
|
# echo "Subsetting $font"
|
||||||
--passthrough-tables
|
# pyftsubset "$font" --text-file=all_chars.txt --layout-features='*' \
|
||||||
|
# --output-file="$(awk -F '.ttf' '{print $1}' <<< "$font")-Subset.ttf"
|
||||||
woff2_compress "$subset_ttf"
|
#done
|
||||||
|
|
||||||
rm "$subset_ttf"
|
|
||||||
done
|
|
||||||
|
|
||||||
rm css/code.css
|
rm css/code.css
|
||||||
pygmentize -f html -S algol_nu | grep -v 'line-height' >css/code.css
|
pygmentize -f html -S algol_nu | grep -v 'line-height' > css/code.css
|
||||||
|
|
||||||
builtin pushd acl.cool
|
builtin pushd acl.cool
|
||||||
soup_config
|
soup_config
|
||||||
soupault
|
soupault
|
||||||
|
|
||||||
NEXT_DIR="serve_$(date +%s)"
|
|
||||||
cp -a serve "$NEXT_DIR"
|
|
||||||
ln -sfn "$NEXT_DIR" serve_
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
builtin pushd ytheleus.org
|
builtin pushd ytheleus.org
|
||||||
soup_config
|
soup_config
|
||||||
soupault
|
soupault
|
||||||
|
|
||||||
NEXT_DIR="serve_$(date +%s)"
|
|
||||||
cp -a serve "$NEXT_DIR"
|
|
||||||
ln -sfn "$NEXT_DIR" serve_
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
deactivate
|
deactivate
|
||||||
|
|
|
||||||
|
|
@ -56,56 +56,56 @@
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySerif';
|
font-family: 'BodySerif';
|
||||||
src: url('../assets/fonts/Alegreya/static/Alegreya-Regular-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya/static/Alegreya-Regular.ttf') format('truetype');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySerif';
|
font-family: 'BodySerif';
|
||||||
src: url('../assets/fonts/Alegreya/static/Alegreya-Italic-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya/static/Alegreya-Italic.ttf') format('truetype');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySerif';
|
font-family: 'BodySerif';
|
||||||
src: url('../assets/fonts/Alegreya/static/Alegreya-Bold-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya/static/Alegreya-Bold.ttf') format('truetype');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySerif';
|
font-family: 'BodySerif';
|
||||||
src: url('../assets/fonts/Alegreya/static/Alegreya-BoldItalic-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya/static/Alegreya-BoldItalic.ttf') format('truetype');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySans';
|
font-family: 'BodySans';
|
||||||
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Regular-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Regular.ttf') format('truetype');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySans';
|
font-family: 'BodySans';
|
||||||
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Italic-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Italic.ttf') format('truetype');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySans';
|
font-family: 'BodySans';
|
||||||
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Bold-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-Bold.ttf') format('truetype');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'BodySans';
|
font-family: 'BodySans';
|
||||||
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-BoldItalic-Subset.woff2') format('woff2');
|
src: url('../assets/fonts/Alegreya_Sans/AlegreyaSans-BoldItalic.ttf') format('truetype');
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
7
css/index.css
Normal file
7
css/index.css
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
@import url(fonts.css);
|
||||||
|
|
||||||
|
@import url(looks.css);
|
||||||
|
|
||||||
|
@import url(layout.css);
|
||||||
|
|
||||||
|
@import url(code.css);
|
||||||
27
deps.sh
Executable file
27
deps.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if ! [[ -d pgvv/ ]]; then
|
||||||
|
python3 -m venv pgvv
|
||||||
|
source ./pgvv/bin/activate
|
||||||
|
python3 -m pip install --upgrade pip
|
||||||
|
pip install --upgrade pygments
|
||||||
|
pip install --upgrade fonttools
|
||||||
|
pip install --upgrade brotli
|
||||||
|
deactivate
|
||||||
|
fi
|
||||||
|
|
||||||
|
which opam 2> /dev/null
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
opam install -y soupault
|
||||||
|
else
|
||||||
|
echo 'failed to install soupault with opam' >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
which cargo 2> /dev/null
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
cargo install jotdown
|
||||||
|
else
|
||||||
|
echo 'failed to install jotdown with cargo'
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
@ -4,10 +4,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title> <!-- set automatically, see soupault.conf --> </title>
|
<title> <!-- set automatically, see soupault.conf --> </title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="/css/fonts.css">
|
<link rel="stylesheet" href="/css/index.css">
|
||||||
<link rel="stylesheet" href="/css/layout.css">
|
|
||||||
<link rel="stylesheet" href="/css/looks.css">
|
|
||||||
<link rel="stylesheet" href="/css/code.css">
|
|
||||||
<link rel="icon" type="image/png" href="/assets/favicon.png">
|
<link rel="icon" type="image/png" href="/assets/favicon.png">
|
||||||
<script>
|
<script>
|
||||||
const class_ = `font-${window.devicePixelRatio >= 1.3 ? 'hidpi' : 'lodpi'}`;
|
const class_ = `font-${window.devicePixelRatio >= 1.3 ? 'hidpi' : 'lodpi'}`;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue