Darker skies mean more time to Hack
Continued working on Practicalli Clojure book improvements
Sticking with the meal replacement diet which seems to be helping with the pain in my foot. I'm also loosing a noticeable amount of body mass in all the right places (still some to go though).
Tweaking the Zensical config for the Practical.li websites to
- add a GitHub repo indicator in the header
- a custom admonition for Clojure Idioms I wish to highlight
- converted the continue reading link in blogs to a button (also raised issue 332 to see if the maintainers would update the Zensical UI theme)
No sign of the Neovim 0.13 release, although AstroNvim 0.7 has been released. Only a few tiny changes have been made, so will create a new config once Neovim 0.13 is released (perhaps on a Friday).
Spatz long sleeve base layers arrived. The are a bit more snug than the short sleeved variant, but should help encourage me with my visceral fat burning regime.
This week I have mostly been listening to America, some excellent tunes with some classic songs such as "Horse with no name"
Zensical¶
Added a few finishing touches to the Zensical configuration, to show the repository details in the website header.
I've wanted a few changes to the theme, which can be tricky when using Zensical UI and Catppuccin-Zensical themes together.
The simplest approach is to create a practicalli.css configuration that contains my customisations.
I've taken inspiration from the Catppuccin-Zensical theme and added my own touches.
A small change was to increase the size of 'inline code', witch the Zensical UI makes smaller. I find this a little harder to read, so changed the 'inline code' to be the same size
I also wanted to make the 'code block' code just a little bigger.
/* Set inline code same size as text */
.md-typeset code {
font-size: 1.0em;
}
/* Set Code blocks size larger than theme default */
.md-typeset pre code
{
font-size: 0.92em;
}
GitHub header¶
# Set to include Repository section in site header
repo_url = "https://github.com/practicalli/journal"
# Define name of repository (default: uses provider name, e.g. GitHub)
repo_name = "practicalli/journal"
Removed the comment on the "content.action.edit", "content.action.view", to enable the GitHub view and edit features, allowing pull requests to be created without firing up an editor.
NOTE: this is useful for small changes, or the start of a more significant change to be done in an editor at a later time.
features [
...
"content.action.edit",
"content.action.view",
...
]
Custom Admonition¶
After a bit of experimentation I created a custom admonition for Zensical.
I wanted a call-out that highlighted a Clojure idiom, so it was easier to spot them in the many pages of Practicalli Clojure book.
Zensical points to the Material for MkDocs custom admonitions example, from which I hacked together something that uses the Catppuccin theme classes to keep everything looking the same.
Initially I used the Practicalli logo for the custom admonition, but the style doesn't match the solid icons used in all the other admonitions.
--md-admonition-icon--clojure-idiom: url(https://raw.githubusercontent.com/practicalli/graphic-design/c40cc063cc5bb07525b524d8a3d638e2f42bc38a/logos/clojure-logo-bullet.svg);
I found a suitable icon for Clojure at Simple Icons and copied the sites content delivery network (CDN) link to the clojure icon.
After a few quick experiements I'd created the necessary CSS code to for the custom admonition, using CLOJURE-IDIOM as the type.
def for namespace values, let for local values
Using def inside a function definition is all kinds of wrong...
Custom Admonition for Clojure Idioms
/* Custom CLOJURE-IDIOM admonition ------ */
:root {
--md-admonition-icon--clojure-idiom: url(https://cdn.simpleicons.org/clojure);
.md-typeset .clojure-idiom > .admonition-title,
.md-typeset .clojure-idiom > summary {
/* this section is required, optionally to set color or background-color */
}
.md-typeset .clojure-idiom > .admonition-title::before,
.md-typeset .clojure-idiom > summary::before {
background-image: var(--md-admonition-icon--clojure-idiom);
-webkit-mask-image: var(--md-admonition-icon--clojure-idiom);
mask-image: var(--md-admonition-icon--clojure-idiom);
}
}
/* -------------------------------------- */
Blog Continue Reading button¶
In a Zensical blog page, one or more blog post summaries are show, assuming each blog post includes a <!-- more --> directive (otherwise the whole post is shown).
Zensical UI uses a text link which works fine, although I feel a button would look far nicer (and be easier to press or click)
There isnt a 'block' in zensical for the Continue Reading link, so I would have to copy the whole partials/posts.html file from the Zensical UI template.
Adding all these same code just to make a text link a button seems wasteful.
Instead I hacked a little CSS to override --md-post__action class.
/* Practicalli Continue Reading Button -- */
.md-post__action a {
display: inline-block;
text-decoration: none;
padding: 0.5em 1em;
background-color: var(--ctp-surface1);
color: var(--ctp-text);
border-radius: 0.92em;
}
.md-post__action a:hover {
background-color: var(--md-accent-bg-color);
color: var(--md-accent-fg-color);
}
/* -------------------------------------- */
Debian Linux¶
Whist checking what music apps were installed on Debian, I found the Gnome Project Music app.
The app focus states its a UI over all the files in your ~/Music directory. It can play songs and whole albums and has repeat options.
Unfortunately this did not find my music. Either I am missing something or it does not look for files with the .opus filename extension.
All my music is in the Opus format, so if they are not supported it makes the Music app irrelevant to my needs.
I raised a ticket on the Gnome Music GitLab issue tracker, after creating a free login account.
Looking further on the app I see the latest release is 51.0 (Debian Linux is 48.0). The latest version only seems available via Flatpack, which I don't use and don't have enough space to install.
I'll use VLC to play my music instead.
AI Challenges¶
An important tenant of automating tasks is to ensure you first full understand how to manually do that task.
Should the automation fail, then knowledge is available to carry out the task whist the automation is fixed. That knowledge should also help diagnose why the automation failed too.
This tenant applies just as much when that automation is with some kind of 'AI' service.
If the AI is a dark box and effectively decided itself how a task should be completed, then its much more challenging understand and manually repeat a task.
Should the AI service fail (or creates unexpected results) then you're not in a good position to resolve issues or put a manual task in its place.
Cycling¶
The left shifter on my Ribble bike has died. (Shimano Ultegra manual gears, hydrolic brakes)
The right shifter died nearly 2 years ago.
I have ridden a lot of distance in that time, but expected the Shimano equipment to last much longer (the shifters on my 2006 Bianchi lasted much longer).
Thank you.