From ab4459ea2446ced5b93e84aa779f29d80708f374 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sat, 14 Sep 2024 15:44:33 -0600 Subject: 11ty --- _posts/2018-06-23-slicing-images-gimp-python.md | 1 + _posts/2020-06-26-police-scanner-setup.md | 4 +- _posts/2020-08-21-survey-of-rust-gui-libraries.md | 2 +- ...020-10-13-crowbar-2-simplifying-c-type-names.md | 5 +- _posts/2020-10-19-crowbar-3-this-is-tough.md | 5 +- _posts/2021-02-09-anti-rust-horseshit.md | 2 +- _posts/2021-02-22-can-we-please-move-past-git.md | 16 ++--- ...a-deeply-unhealthy-relationship-with-twitter.md | 1 + ...2021-10-24-2021-survey-of-rust-gui-libraries.md | 2 +- _posts/_posts.11tydata.js | 77 ++++++++++++++++++++++ 10 files changed, 100 insertions(+), 15 deletions(-) create mode 100644 _posts/_posts.11tydata.js (limited to '_posts') diff --git a/_posts/2018-06-23-slicing-images-gimp-python.md b/_posts/2018-06-23-slicing-images-gimp-python.md index 83264b8..e22f539 100644 --- a/_posts/2018-06-23-slicing-images-gimp-python.md +++ b/_posts/2018-06-23-slicing-images-gimp-python.md @@ -10,6 +10,7 @@ GIMP also has powerful scripting support with Python (and also Scheme, but miss ## TL;DR how do i do the thing 1. Save your large image somewhere with a useful filename; this script will chuck `_1_1` and `_1_2` etc on the end of the existing filename. + 2. Open that image in GIMP. 3. Go to the Filters menu, open Python-Fu, and hit Console. 4. Set up the width and height of your tiles. For 64x64 tiles, for example, type diff --git a/_posts/2020-06-26-police-scanner-setup.md b/_posts/2020-06-26-police-scanner-setup.md index b8c621b..4eb7884 100644 --- a/_posts/2020-06-26-police-scanner-setup.md +++ b/_posts/2020-06-26-police-scanner-setup.md @@ -79,7 +79,7 @@ of audio input and output devices. check the number in the input list that goes with CABLE Output - for me it's 3. pull up notepad and make a new file. since my input was number 3, i'm typing -```bat +```batch DSDPlus.exe -i3M ``` @@ -194,7 +194,7 @@ you'll need to set DSD+ to output to "CABLE-A Input" like how you set it to input from "CABLE Output" - Cable A is the fourth output in DSD+, so my run.bat now looks like this: -```bat +```batch DSDPlus.exe -i3M -o4 ``` diff --git a/_posts/2020-08-21-survey-of-rust-gui-libraries.md b/_posts/2020-08-21-survey-of-rust-gui-libraries.md index 6f0b3d4..5f650fa 100644 --- a/_posts/2020-08-21-survey-of-rust-gui-libraries.md +++ b/_posts/2020-08-21-survey-of-rust-gui-libraries.md @@ -36,7 +36,7 @@ error: failed to run custom build command for `servo-freetype-sys v4.0.5` Caused by: process didn't exit successfully: `D:\Melody\Projects\we-are-not-gui-yet\target\debug\build\servo-freetype-sys-1fae054761ff82c5\build-script-build` (exit code: 101) --- stdout -running: "cmake" +running: "cmake" <snip> --- stderr CMake Error: Could not create named generator Visual Studio 16 2019 diff --git a/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md b/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md index 9a825e3..e5c41b4 100644 --- a/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md +++ b/_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md @@ -1,8 +1,11 @@ --- title: "Crowbar: Simplifying C's type names" +description: > + I've been working intermittently on drawing up a specification for Crowbar, a C replacement aiming to be both simpler and safer. + I'm still nowhere near done, but I'm proud of the concept I've reached for type names, and I want to explain it in depth here. --- -(Previously in Crowbar: [Defining a good C replacement](/2020/09/28/crowbar-1-defining-a-c-replacement.md).) +(Previously in Crowbar: [Defining a good C replacement](_posts/2020-09-28-crowbar-1-defining-a-c-replacement.md).) I've been working intermittently on drawing up a specification for [Crowbar](https://sr.ht/~boringcactus/crowbar-lang/), a C replacement aiming to be both simpler and safer. I'm still nowhere near done, but I'm proud of the concept I've reached for type names, and I want to explain it in depth here. diff --git a/_posts/2020-10-19-crowbar-3-this-is-tough.md b/_posts/2020-10-19-crowbar-3-this-is-tough.md index a499bc1..4caa701 100644 --- a/_posts/2020-10-19-crowbar-3-this-is-tough.md +++ b/_posts/2020-10-19-crowbar-3-this-is-tough.md @@ -1,8 +1,11 @@ --- title: "Crowbar: Turns out, language development is hard" +description: > + Originally, I hadn't decided whether Crowbar should be designed with an eye towards compiling to C or with an eye towards compiling directly. + Compiling to C massively cuts down the scope of Crowbar as a project, but compiling directly gives me more comprehensive control over what all happens. --- -(Previously in Crowbar: [Defining a good C replacement](/2020/09/28/crowbar-1-defining-a-c-replacement.md), [Simplifying C's type names](/2020/10/13/crowbar-2-simplifying-c-type-names.md)) +(Previously in Crowbar: [Defining a good C replacement](_posts/2020-09-28-crowbar-1-defining-a-c-replacement.md), [Simplifying C's type names](_posts/2020-10-13-crowbar-2-simplifying-c-type-names.md)) Originally, I hadn't decided whether Crowbar should be designed with an eye towards compiling to C or with an eye towards compiling directly. Compiling to C massively cuts down the scope of Crowbar as a project, but compiling directly gives me more comprehensive control over what all happens. diff --git a/_posts/2021-02-09-anti-rust-horseshit.md b/_posts/2021-02-09-anti-rust-horseshit.md index e2716f8..6745bb3 100644 --- a/_posts/2021-02-09-anti-rust-horseshit.md +++ b/_posts/2021-02-09-anti-rust-horseshit.md @@ -1,6 +1,6 @@ --- title: I'm tired of this anti-Rust horseshit -unlisted: yeah +unlisted: true --- **This is not my, or hopefully anyone's, actual opinion.** diff --git a/_posts/2021-02-22-can-we-please-move-past-git.md b/_posts/2021-02-22-can-we-please-move-past-git.md index 61296d5..cf7521c 100644 --- a/_posts/2021-02-22-can-we-please-move-past-git.md +++ b/_posts/2021-02-22-can-we-please-move-past-git.md @@ -103,14 +103,14 @@ The manual gives [installation instructions](https://pijul.org/manual/installing However, someone involved in the project [showed up in my mentions to say that it works on Windows](https://twitter.com/nuempe/status/1359614145415548939), so we'll just follow the generic instructions and see what happens: ```text -PS D:\Melody\Projects> cargo install pijul --version "~1.0.0-alpha" +PS D:\Melody\Projects> cargo install pijul --version "~1.0.0-alpha" Updating crates.io index Installing pijul v1.0.0-alpha.38 - Downloaded - Compiling + Downloaded <a bunch of stuff> + Compiling <a bunch of stuff> error: linking with `link.exe` failed: exit code: 1181 | - = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX64\\x64\\link.exe" + = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX64\\x64\\link.exe" <lots of bullshit> = note: LINK : fatal error LNK1181: cannot open input file 'zstd.lib' @@ -123,10 +123,10 @@ Let's try it over on Linux: ```text UberPC-V3:~$ cargo install pijul --version "~1.0.0-alpha" - +<lots of output> error: linking with `cc` failed: exit code: 1 | - = note: "cc" + = note: "cc" <a mountain of arguments> = note: /usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lzstd /usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lxxhash collect2: error: ld returned 1 exit status @@ -135,7 +135,7 @@ error: linking with `cc` failed: exit code: 1 error: aborting due to previous error UberPC-V3:~$ sudo apk add zstd-dev xxhash-dev UberPC-V3:~$ cargo install pijul --version "~1.0.0-alpha" - +<lots of output again because cargo install forgets dependencies immediately smdh> Installed package `pijul v1.0.0-alpha.38` (executable `pijul`) ``` @@ -161,7 +161,7 @@ They also pointed me towards [the state of the art in getting Pijul to work on W So if we have a working Pijul install, let's see if we can add that CI setup to the manual: ```text -PS D:\Melody\Projects\misc> pijul clone https://nest.pijul.com/pijul/manual pijul-manual +PS D:\Melody\Projects\misc> pijul clone https://nest.pijul.com/pijul/manual pijul-manual ✓ Updating remote changelist ✓ Applying changes 47/47 ✓ Downloading changes 47/47 diff --git a/_posts/2021-05-25-how-to-develop-a-deeply-unhealthy-relationship-with-twitter.md b/_posts/2021-05-25-how-to-develop-a-deeply-unhealthy-relationship-with-twitter.md index abe6915..2dc15b0 100644 --- a/_posts/2021-05-25-how-to-develop-a-deeply-unhealthy-relationship-with-twitter.md +++ b/_posts/2021-05-25-how-to-develop-a-deeply-unhealthy-relationship-with-twitter.md @@ -1,5 +1,6 @@ --- title: How to Develop a Deeply Unhealthy Relationship with Twitter +description: a step-by-step guide --- 1. Follow some cool people on Twitter. diff --git a/_posts/2021-10-24-2021-survey-of-rust-gui-libraries.md b/_posts/2021-10-24-2021-survey-of-rust-gui-libraries.md index 2e39ade..3375637 100644 --- a/_posts/2021-10-24-2021-survey-of-rust-gui-libraries.md +++ b/_posts/2021-10-24-2021-survey-of-rust-gui-libraries.md @@ -2,7 +2,7 @@ title: A 2021 Survey of Rust GUI Libraries --- -A year and a half ago I [looked at a bunch of different Rust GUI libraries](/2020/08/21/survey-of-rust-gui-libraries.md); that's a long time, so let's see if things have changed. +A year and a half ago I [looked at a bunch of different Rust GUI libraries](_posts/2020-08-21-survey-of-rust-gui-libraries.md); that's a long time, so let's see if things have changed. As before, some context: diff --git a/_posts/_posts.11tydata.js b/_posts/_posts.11tydata.js new file mode 100644 index 0000000..2e07a0e --- /dev/null +++ b/_posts/_posts.11tydata.js @@ -0,0 +1,77 @@ +import markdownIt from "markdown-it"; +const md = markdownIt(); + +export default { + layout: "default", + tags: "post", + permalink: + "/{{ page.date | date: '%Y/%m/%d', 'Etc/UTC' }}/{{ page.fileSlug }}.html", + showDate: true, + eleventyComputed: { + description: async (data) => { + if (data.description !== undefined && data.description !== "") + return data.description.trim(); + if (data.page.rawInput === undefined) return null; + const markdownAST = md.parse(data.page.rawInput, {}); + let firstParagraph = ""; + let skippingBlockquote = false; + let skippingStrikethrough = false; + extractParagraph: for (const astNode of markdownAST) { + if (skippingBlockquote) { + if (astNode.type === "blockquote_close") skippingBlockquote = false; + continue; + } + switch (astNode.type) { + case "paragraph_open": + continue; + case "inline": + for (const child of astNode.children) { + if (skippingStrikethrough) { + if (child.type === "s_close") { + skippingStrikethrough = false; + // hopefully this is just never wrong + if (firstParagraph.endsWith(" ")) { + firstParagraph = firstParagraph.replace(/ $/, ""); + } + } + continue; + } + switch (child.type) { + case "text": + firstParagraph += child.content; + break; + case "softbreak": + firstParagraph += " "; + break; + case "link_open": + case "link_close": + case "em_open": + case "em_close": + case "strong_open": + case "strong_close": + break; + case "s_open": + skippingStrikethrough = true; + break; + default: + console.log(data.page.fileSlug, "inline", child); + } + } + break; + case "paragraph_close": + break extractParagraph; + case "blockquote_open": + skippingBlockquote = true; + break; + case "ordered_list_open": + throw TypeError( + `Can't auto-generate description for ${data.page.inputPath} - starts with list`, + ); + default: + console.log(data.page.fileSlug, "block", astNode); + } + } + return firstParagraph; + }, + }, +}; -- cgit v1.2.3