The long way of the German sharp s "ẞ" into Linux

The European Keyboard EurKEY is a keyboard layout based on the American keyboard layout. It is very popular with translators and programmers who appreciate the easy access to special characters. It also offers convenient access to many European letters and accents. In 2017 a long awaited new letter joined the German alphabet: the uppercase sharp S: ß.

Since then, the letter has been added to many keyboard layouts, including the EurKEY layout, which has been mentioned several times in this blog. In 2021, an update was accepted in the software repository xkbdesc/xkeyboard-config, which removes the sharp S again, arguing that "the uppercase Ssharp ẞ is nearly useless". This blog post highlights this controversy.

How to shallow clone a Cow

Rust's “copy on write” Cow abstraction is very useful to avoid costly cloning when dealing with vectors or strings. A Cow allows you to defer allocating new memory until it becomes inevitable. Consider the following example:

use std::borrow::Cow;
fn do_something_or_nothing(v: Cow<str>) -> Cow<str> {
    if v.len() > 3 {
        let s = "Hello ".to_string() + &*v;
        Cow::Owned(s)
    } else {
        v
    }
}

Tp-Note news: Multilingual note-taking with linguistic heuristics

Tp-Note's main design goal is to convert some input text - usually provided by the system's clipboard - into a Markdown note file with a descriptive YAML header and meaningful filename. This blog post explains how to configure Tp-Note for multilingual note-taking. Consider the following note file example:

---
title:    Demokratie und Menschenbild
subtitle: Vorlesung
author:   Prof. Rainer Mausfeld
date:     2023-04-21
lang:     de-DE
---

Kognitionswissenschaftliche Einsichten in die Beschaffenheit des Menschen.

The YAML variable lang: indicates the natural language in which the note text is authored, here de-DE. This IETF language tag is useful when working with grammar and spell checkers. For example: when placed in last position, the grammar checker LanguageTool (LTEX) reads the variable lang: to activate the grammar and spelling rules for the indicated specific language (c.f. blog post). The recently released Tp-Note version 1.21.0 integrates linguistic analysis provided by the Lingua library. This new feature allows Tp-Note to determine automatically the natural language of new note files during their creation process.