A Lazy SequenceRecenthttps://brehaut/feeds/everything2023-11-30T11:00:00.000ZAndrew Brehautandrew@brehaut.netGenerating character names with AI toolshttps://brehaut.net/blog/2023/generating_character_names_with_ai_tools2023-11-30T11:00:00.000Z<p>
AI tools for tabletop RPGs came up in a slack conversation today which reminded me to write this down. I always like to generate lists of names ahead of time, and do it in blocks of 26: one for each letter of the alphabet. I find it simplifies keeping all the characters separated in the heads of everyone at the table.
</p>
<p>
Previously I’d do this by trawling through name websites and compiling the list myself, but we can easily leverage an AI tool to do this for us. Here’s an example prompt:
</p>
<figure>
<p>
<em>create 26 names that are an amalgamation of medieval french and modern Finnish, one for each letter of the alphabet, and include an english transliteration in parentheses</em>
</p>
</figure>
<p>
And by way of example, the output:
</p>
<figure>
<ul>
<li>Aimonen (eh-mwah-nen)</li>
<li>Bérjami (bayr-yah-mi)</li>
<li>Cyprieri (seep-ree-eh)</li>
<li>Druuvant (droo-vant)</li>
<li>Éliasari (ay-lee-ah-sah-ree)</li>
<li>Filorin (fee-loh-reen)</li>
<li>Gérsami (zher-sah-mi)</li>
<li>Harvorin (har-vor-een)</li>
<li>Iisakor (ee-sah-kor)</li>
<li>Jovaric (zhoh-var-eek)</li>
<li>Kallian (kal-ee-an)</li>
<li>Loriane (loh-ree-ah-neh)</li>
<li>Maugrisi (moh-gree-see)</li>
<li>Nétheri (neh-teh-ree)</li>
<li>Ombertti (ohm-bert-tee)</li>
<li>Pérjas (pehr-yahs)</li>
<li>Quillan (kee-lahn)</li>
<li>Raufin (rah-oo-feen)</li>
<li>Sylvein (seel-vayn)</li>
<li>Théodar (tay-oh-dar)</li>
<li>Ullran (ool-ran)</li>
<li>Vérkki (vehrk-ki)</li>
<li>Walerian (wah-leh-ree-an)</li>
<li>Xanrion (zahn-ree-on)</li>
<li>Yvonel (ee-voh-nel)</li>
<li>Zépharin (zay-fah-rin)</li>
</ul>
</figure>Downloadable macOS Typefaceshttps://brehaut.net/blog/2023/downloadable_macos_typefaces2023-11-06T11:00:00.000Z<p>Apple licences a <a href="https://developer.apple.com/fonts/system-fonts/">large number of typefaces</a> for use on macOS (and it’s other operating systems). For some reason, on macOS they choose to not install all of these typefaces by default.
I’ve listed some of my favorites below.</p>
<p>You can easily install these typefaces through the system <em>Font Book</em> app. Make sure you have the sidebar visible (the icon appears to the right of the three window control dots), and selected either <em>All Fonts</em>, or a suitable language (such as <em>English</em>). Select the <em>Downloadabled</em> in the filter toolbar above the font list. Any greyed-out typefaces is available but not installed. Selecting a typeface will cause a small download button to appear in the top right corner of the font tile.</p>
<h2>Founders Grotesk</h2>
<figure>
<img src="/media/2023/downloadable_macos_fonts/founders_grotesk.svg" alt="Founders Grotesk sample" loading="lazy">
</figure>
<p>First on this list is <a href="https://klim.co.nz/blog/founders-grotesk-design-information/">Founders Grotesk</a> from <a href="https://klim.co.nz/">Klim Type Foundry</a> is <q>a contemporary amalgamation of classic grotesks.</q> On macOS it is available in three variants (<em>display</em>, <em>text</em>, and <em>condensed</em>) and a wide variety of weights and italics. This typeface has become my goto, and is a great alternative to a more typical grotesk choice. Compared to a more idiomatic grotesk, it feels a little wider. Additional variants, and a monospace version, are <a href="https://klim.co.nz/collections/founders-grotesk/">available direct from Klim</a>.</p>
<h2>Proxima Nova</h2>
<figure>
<img src="/media/2023/downloadable_macos_fonts/proxima_nova.svg" alt="Proxima Nova sample" loading="lazy">
</figure>
<p>Mark Simonson’s famous <a href="https://www.marksimonson.com/fonts/view/proxima-nova">Proxima Nova</a> stormed the web a decade ago, as it was available through Typekit (now Adobe Fonts), and bears a striking resembelance to <a href="https://frerejones.com/">Tobias Frere-Jones’</a> very zeitgeisty <a href="https://www.typography.com/fonts/gotham/overview">Gotham</a> (famously used by the Obama campaign) from <a href="https://www.typography.com/">Hoefler & co</a>.</p>
<p>Once again, macOS offers this typeface in a very wide range of weights and with italic.</p>
<h2>Publico</h2>
<figure>
<img src="/media/2023/downloadable_macos_fonts/publico.svg" alt="Publico sample" loading="lazy">
</figure>
<p>Publico is a contempory serif typeface from <a href="https://commercialtype.com/catalog/publico">Commercial Type</a>. This will be familiar to readers of <a href="https://www.theguardian.com/">The Guardian</a>, as it is derived from the font created for that paper. Available in both <em>headline</em> and <em>text</em> variants, with multiple weights and italics in macOS.</p>
<h2>Domaine Display</h2>
<figure>
<img src="/media/2023/downloadable_macos_fonts/domaine_display.svg" alt="Domaine (Display) sample" loading="lazy">
</figure>
<p>A second entry from Klim, <a href="https://klim.co.nz/blog/domaine-design-information/">Domaine</a> ships in three weights, and italics on macOS. Unlike the other typefaces in this list it only ships in a <a href="https://en.wikipedia.org/wiki/Display_typeface">display</a> version, so (as is evident in the sample above), it’s not really suitable for use for laying out a <a href="https://www.fonts.com/content/learning/fontology/level-1/type-anatomy/text-v-display">lot of small body text</a>. As with Founders Grotesk above, more weights, and variations—including a text version—are <a href="https://klim.co.nz/collections/domaine/">available direct from Klim</a> if you need more.</p>
Some notes from finally learning PowerShellhttps://brehaut.net/blog/2023/powershell_first_steps2023-11-02T11:00:00.000Z<p>I have to use Windows at my day job, and that means a lack of familiar unix tools. I’ve finally stopped putting off actually learning <a href="https://en.wikipedia.org/wiki/PowerShell">PowerShell</a> properly. Here are some notes for my future self.</p>
<h2>Autocomplete doesn’t have to suck</h2>
<p>I am boggled why the default tab completion in Windows shells insists on being the terrible full completion of first match. Unlike <code>cmd</code>, PowerShell doesn’t have to suck.</p>
<p>The built in command</p>
<pre><code class="hljs powershell"><span class="hljs-built_in">Set-PSReadlineKeyHandler</span> <span class="hljs-literal">-Key</span> Tab <span class="hljs-literal">-Function</span> MenuComplete</code></pre>
<p>switches to using a bash/zsh/fish style menu completion.</p>
<p>Place it in a <a href="https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.3">profile script</a> to run on shell launch.</p>
<h2>Documentation seemingly isn’t installed by default</h2>
<p>Powershell’s commands, cmdlets, and functions support a lot of declarative self documentation via argument definitions etc. Itʻs easy to be unaware that full human authored documentation also exists. <code>help help</code> will tell you in a remark at the very bottom of the page that is easy to miss.</p>
<p>Curiously, if you use the full command <code>Get-Help -Name Get-Help</code> rather than the aliases <code>help</code> or <code>man</code>, you are prompted immediately on first run to download the documentation.</p>
<p>Full documentation can be installed (or updated) with</p>
<pre><code class="hljs powershell"><span class="hljs-built_in">Update-Help</span></code></pre>
<p>Still need to figure out how to stop it yelling about missing resources.</p>
<h2>Many things are exposed as “drives”</h2>
<p>Environment variables, script variables, aliases, registry keys, and more, are available as labelled drives. You can list them like you would any other drive in Windows.</p>
<p>The <code>alias:</code> drive is particularly useful for learning interactive commands, as it lists short abbreviations useful for interactive work, making it easier to overcome the verbosity of PowerShell when working interactively, as per unix.</p>
<h2>Common unix (and cmd) commands are aliased to PowerShell cmdlets</h2>
<p><code>man</code>, or <code>ls</code> for example are both usable in PowerShell, but because they alias PowerShell commands rather than being their unix equivalents, things can get confusing.</p>
DOM input eventshttps://brehaut.net/blog/2023/dom_input_events2023-04-13T12:00:00.000Z<p>Sometimes web API changes slip by you: Today I learned that the DOM now has a dedicated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event"><code>input</code></a> event for text entry on <code>input</code> and <code>textarea</code> elements (and <code>contentEditable</code>, but who wants to be touching that, yikes!) that is raised whenever the <code>value</code> has changed.</p>
<p>This is different from the <code>change</code> event, which is only raised when the <code>value</code> has changed <em>and</em> the widget is blurred (defocused).</p>
<p>Previously, the if <code>change</code> wasn’t granular enough, a developer would resort to <code>keyup</code> or <code>keypress</code> which may seem like a near enough match for behaviour, but that’s only true for langauges such as English where each keypress is exactly equal to one character. In a langauge with that use an <abbr title="Input Method Editor">IME</abbr> multiple keypresses are required to produce a single character (Japanese for example), you will instead be getting an invalid partial state.</p>
<p>Related to <code>input</code> is <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforeinput_event"><code>beforeinput</code></a> which is raised just before the <code>value</code> changes.</p>
<p>Proper handling of input composition with IMEs is also handled with <code>CompositionEvent</code> now.</p>
Manticore 2.0https://brehaut.net/blog/2023/manticore_22023-02-27T11:00:00.000Z<p>At the end of last year, <a href="https://brehaut.net/blog/2022/the_future_of_manticore">I was unsure</a> if <a href="https://manticore.brehaut.net/">Manticore</a>—my app for generating encounters for <cite><a href="https://pelgranepress.com/product/13th-age/">13th Age</a></cite>—had a future with the announcement of <cite>13th Age <a href="https://pelgranepress.com/2022/08/18/announcing-13th-age-2nd-edition/">second</a> <a href="https://pelgranepress.com/2022/08/19/13th-age-2e-more-info/">edition</a></cite> and it’s changes to the encounter building rules.</p>
<p>Part of my reticence was due to the state of the build system, and the user of React.js. A week ago, I decided to give <a href="https://svelte.dev/">Svelte</a> and <a href="https://kit.svelte.dev/">Svelte Kit</a> a shot to see what it was like, and that has resulted in a near complete rebuild of the UI and build infrastructure.</p>
<p>The major user facing changes so far are:</p>
<ul>
<li>Support for the 13th Age 2e playtest rules for building encounters. These rules are much simpler, and appear to scale up to larger party sizes better. This is currently available behind a toggle control, which currently defaults to the existing first edition rules.</li>
<li>The filters section has been split out so that individual monster selection happens after filtering is done, allowing you to winnow the pool using the filters, and then refine the selection. This also provides a new workflow where you can just use Manticore to quickly find viable monsters for building your own encounters.</li>
<li>Each filter group has a toggle switch to clearly indicate if it is enabled or disabled. Under the hood this makes no difference, but it is much clearer for end users.</li>
<li>The <em>Generate</em> button is gone. Instead, Manticore will kick of encounter generation whenever the selection changes.</li>
<li>Second edition includes notes about monsters that need care, or are probably a mistake to include in the table on page 176. This is reflected in colour coding of monsters in encounters. A future change may allow you to filter these monsters out before generation occurs.</li>
</ul>
<p>I’ve also addressed some small issues and bugs. Most notably, I discovered that there were some cases where the app would underspend resulting in subtly easy encounters. That is no longer the case.</p>
<p>The application will stay in <em>alpha</em> status while <cite>13th Age 2e</cite> is in development. I don’t anticipate any major issues in getting it finalised once the rules are.</p>