1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-27 22:12:10 +00:00

Compare commits

..

No commits in common. "afcc4fd760329a08e9c4f7be46f9610540b125b2" and "59d2bddade15ef2ce498a934a359c1d493ab6d16" have entirely different histories.

5 changed files with 26 additions and 23 deletions

View file

@ -16,9 +16,8 @@ OUTPUT_DIR = public
SSHFLAGS = -o KexAlgorithms=sntrup761x25519-sha512@openssh.com
RSYNCFLAGS += -rlpcv --zc=zstd --zl=6 --skip-compress=gz/br/zst/png/webp/jpg/avif/jxl/mp4/mkv/webm/opus/mp3/gif/ico -e "ssh $(SSHFLAGS)" --chmod=D755,F644
RSYNCFLAGS_EXTRA ?=
# compression gets slow for extreme levels like the old "70109".
# Diminishing returns after level 6; sometimes even larger files.
ECT_LEVEL=6
# compression gets slow for extreme levels like the old "70109"
ECT_LEVEL=9
csv/webrings.csv:
sh scripts/populate-webrings.sh
@ -32,14 +31,14 @@ hugo: csv/webrings.csv $(SRCFILES)
# .hintrc-local for linting local files
# same as regular .hintrc but with a different connector.
.hintrc-local: .hintrc
jaq --tab '.connector .name = "local" | del(.connector .options)' <linter-configs/hintrc >.hintrc-local
jq --tab '.connector .name = "local" | del(.connector .options)' <linter-configs/hintrc >.hintrc-local
.hintrc-devserver: .hintrc
jaq --tab '.extends = ["development"] | .hints["http-compression","https-only","ssllabs","sri"] = "off"' <linter-configs/hintrc >.hintrc-devserver
jq --tab '.extends = ["development"] | .hints["http-compression","https-only","ssllabs","sri"] = "off"' <linter-configs/hintrc >.hintrc-devserver
.PHONY: clean
clean:
rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports
rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports mentions.json data/webmentions.json
.PHONY: lint-css
lint-css: $(CSS_DIR)/*.css
@ -57,8 +56,8 @@ equal-access:
.PHONY: validate-json
validate-json:
jaq -re '""' $(OUTPUT_DIR)/manifest.min.*.webmanifest 1>/dev/null
jaq -re '""' $(OUTPUT_DIR)/webfinger.json 1>/dev/null
jq -reM '""' $(OUTPUT_DIR)/manifest.min.*.webmanifest 1>/dev/null
jq -reM '""' $(OUTPUT_DIR)/webfinger.json 1>/dev/null
.PHONY: validate-html
validate-html:
@ -118,6 +117,15 @@ xhtmlize:
copy-to-xhtml:
find $(OUTPUT_DIR) -type f -name "*.html" -exec sh scripts/copy-file-to-xhtml.sh {} \;
# save webmentions to a file, don't send yet
mentions.json: hugo
# gather old version of the site
# rsync $(RSYNCFLAGS) --exclude '*.gz' --exclude '*.br' --exclude '*.png' --exclude-from .rsyncignore $(WWW_RSYNC_DEST)/ old
static-webmentions -f mentions.json.unfiltered find
# filter the webmentions a bit; jq offers more flexibility than config.toml
jq '[ .[] | select(.Dest|test("https://(git.sr.ht/~seirdy/seirdy.one/log/master|seirdy.one|web.archive.org|archive.is|en.wikipedia.org|matrix.to|([a-z]*.)?reddit.com|github.com)") | not) ]' <mentions.json.unfiltered >mentions.json
rm mentions.json.unfiltered
.PHONY: deploy-html
deploy-html:
rsync $(RSYNCFLAGS) $(RSYNCFLAGS_EXTRA) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete

View file

@ -6,11 +6,11 @@ replyTitle: "“regular” expressions"
replyType: "SocialMediaPosting"
replyAuthor: "Chjara"
replyAuthorURI: "https://tuxcrafting.online/"
syndicatedCopies:
- title: 'The Fediverse'
url: 'https://pleroma.envs.net/notice/AZ8TzJQpYkHFYzw0CO'
#syndicatedCopies:
# - title: 'The Fediverse'
# url: ''
---
De-facto standard extensions for recursion and variable-length look-arounds have existed for ages; the word "regular" in most regular-expression engines is there for historical reasons. I first read about this in {{<mention-work itemtype="TechArticle">}}{{<cited-work name="Apocalypse 5: Pattern Matching" extraName="headline" url="https://raku.org/archive/doc/design/apo/A05.html">}} by {{<indieweb-person itemprop="author" first-name="Larry" last-name="Wall" url="http://www.wall.org/~larry/">}}{{</mention-work>}} (he loves his biblical terminology).
I _would_ like to just use Raku rules for a concise way to describe more advanced grammars; I'd then just keep my regexes to the PCRE subset that's common between Google's RE2 and the Rust regex crate. I doubt they're both "regular" but both guarantee linear time matching. Part of the reason I don't do this is portability. Not everything runs Raku, but almost every platform has [a regex engine with the features I need](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines).
I _would_ like to just use Raku rules for a concise way to describe more advanced grammars; I'd then just keep my regexes to the PCRE subset that's common between Google's RE2 and the Rust regex crate; I doubt they're both "regular" but both guarantee linear time matching. Part of the reason I don't do this is portability. Not everything runs Raku, but almost every platform has [a regex engine with the features I need](https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines).

View file

@ -649,12 +649,6 @@ whinge.town OR whinge.house
: [Ableist misogyny](https://web.archive.org/web/20230806223813/https://whinge.town/notice/AXq0Y0n2HDzVWsmOMi).
: Both instances were set up by the same user ([confirmation 1](https://web.archive.org/web/20230806224027/https://whinge.house/notice/ARzsikv2kOK3V5JaWO), [confirmation 2](https://web.archive.org/web/20230806224027/https://freespeechextremist.com/notice/ARzRYo4L2sPkJv1E2a)), who mains on the former.
wideboys.org
: There used to be an instance on the "social" subdomain, but it shut down. However, there is still a WriteFreely instance on the "blog" subdomain. The instance on the "social" subdomain has been mostly superseded by beefyboys.win.
: On the root domain is [a wiki describing how this domain is affiliated with beefyboys.win](https://web.archive.org/web/20230827195937/https://wideboys.org/BEEFYBOYS.WIN). The [beefyboys.win "about" page](https://web.archive.org/web/20230827200822/https://beefyboys.win/about) confirms this.
: Since beefyboys.win is on FediNuke and wideboys.org is part of the same network with staff and member overlap, and wideboys.org still federates on the "blog" subdomain, it's on the list too. But since it only federates via WriteFreely at the time of writing, it looks like a smaller harassment vector so it's demoted to my tier-0 list.
{{</ nofollow >}}
</details>

View file

@ -52,15 +52,16 @@ run_validator() {
}
validate_feed() {
# silence "self reference doesn't match" because i'm testing a localhost copy.
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace (rel-mentioned).
rel_mention_string="Unregistered link relationship \($rel_mention_count occurrence"
if [ "$rel_mention_count" = '1' ]; then
rel_mention_string="Unregistered link relationship"
fi
full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value for atom:updated|Validating $url"
# silence "self reference doesn't match" because i'm testing a localhost copy.
# 'should not contian" has a false positive triggered by ARIA
# entries with the same timestamp isn't a big deal
# unregistered link relationship is a false positive caused by an unknown namespace.
full_regex="Use of unknown namespace|Self reference doesn't match|$rel_mention_string|entries with the same value|Validating $url"
run_validator \
| grep -Ev "$full_regex"

View file

@ -3,7 +3,7 @@
set -e -u
root_dir="$(dirname "$0")/.."
vnu_output="$(jaq --from-file "$root_dir/linter-configs/vnu_filter.jq")"
vnu_output="$(jq --from-file "$root_dir/linter-configs/vnu_filter.jq")"
if [ "$vnu_output" = '' ]; then
echo "All markup is valid"
else