From d568f6138a16c054be55ac3a5533076872f9f280 Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 16 Jun 2025 22:00:54 -0400 Subject: [PATCH] fixed syntax highlighting, finally, I hope --- acl.cool/site/draft/derive-appfun.dj | 2 +- build.sh | 2 +- syntax_wrapper.sh | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/acl.cool/site/draft/derive-appfun.dj b/acl.cool/site/draft/derive-appfun.dj index 54cc72c..ad3bfd8 100644 --- a/acl.cool/site/draft/derive-appfun.dj +++ b/acl.cool/site/draft/derive-appfun.dj @@ -43,7 +43,7 @@ module FunctorOfMonad (M : Monad) : end ``` -Each of these accepts an instance of a less general structure and uses only the elements the module provides to implement an instance of the more general structure. The last one is boring, obviously, being just the composition of the former two. +Each of these accepts an instance of a less general structure and uses only the elements the module provides to implement an instance of the more general structure. The last one is boring, obviously, being just the composition of the former two, but those are a _little_ interesting. It turns out that there are multiple ways to implement the derivation functors--- also multiple ways to implement a particular monad--- and they don't all behave the same. That makes it hard to predict whether the more-general, derived implementations are the "natural" ones that you expected to get without _ad hoc_ testing, which rather defeats the point of "gratis". On the other hand, the derivations here can be performed pretty mechanically, with little insight, by following the types in much the same way one might mechanically prove an easy proposition. diff --git a/build.sh b/build.sh index 10d13fb..c61f2fe 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,6 @@ #! /usr/bin/env nix-shell #! nix-shell -i bash --pure -#! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 --pure +#! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 recode --pure if ! [[ -d pgvv/ ]]; then python3 -m venv pgvv diff --git a/syntax_wrapper.sh b/syntax_wrapper.sh index ef19810..f380aef 100755 --- a/syntax_wrapper.sh +++ b/syntax_wrapper.sh @@ -1,9 +1,7 @@ #! /usr/bin/env bash if [[ $# -lt 1 ]] || ! pygmentize -L lexers | grep -qw "$1"; then - printf "" - cat - printf "" + recode ascii..html else pygmentize -l $1 -f html | head -c -13 | awk -F '
' '{print $NF}'
 fi
\ No newline at end of file