{"version":"https://jsonfeed.org/version/1","title":"A Lazy Sequence","description":"Andrew Brehaut’s blog.","author":{"name":"Andrew Brehaut","email":"andrew@brehaut.net"},"favicon":"https://brehaut.net/static/favicon.ico","icon":"https://brehaut.net/static/apple-touch-icon.png","feed_url":"https://brehaut.net/feeds/everything.json","home_page_url":"https://brehaut.net/","user_comment":"This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL — https://brehaut.net/feeds/everything.json — and add it your reader.","items":[{"id":"1701342000000_generating_character_names_with_ai_tools","title":"Generating character names with AI tools","content_html":"
\n 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.\n
\n\n\n 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:\n
\n\n\n\n\nAnd by way of example, the output: \n
\n\n","date_published":"2023-11-30T11:00:00.000Z","url":"/blog/2023/generating_character_names_with_ai_tools"},{"id":"1699268400000_downloadable_macos_typefaces","title":"Downloadable macOS Typefaces","content_html":"Apple licences a large number of typefaces 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.\nI’ve listed some of my favorites below.
\nYou can easily install these typefaces through the system Font Book app. Make sure you have the sidebar visible (the icon appears to the right of the three window control dots), and selected either All Fonts, or a suitable language (such as English). Select the Downloadabled 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.
\nFirst on this list is Founders Grotesk from Klim Type Foundry is a contemporary amalgamation of classic grotesks.
On macOS it is available in three variants (display, text, and condensed) 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 available direct from Klim.
Mark Simonson’s famous Proxima Nova stormed the web a decade ago, as it was available through Typekit (now Adobe Fonts), and bears a striking resembelance to Tobias Frere-Jones’ very zeitgeisty Gotham (famously used by the Obama campaign) from Hoefler & co.
\nOnce again, macOS offers this typeface in a very wide range of weights and with italic.
\nPublico is a contempory serif typeface from Commercial Type. This will be familiar to readers of The Guardian, as it is derived from the font created for that paper. Available in both headline and text variants, with multiple weights and italics in macOS.
\nA second entry from Klim, Domaine ships in three weights, and italics on macOS. Unlike the other typefaces in this list it only ships in a display version, so (as is evident in the sample above), it’s not really suitable for use for laying out a lot of small body text. As with Founders Grotesk above, more weights, and variations—including a text version—are available direct from Klim if you need more.
\n","date_published":"2023-11-06T11:00:00.000Z","url":"/blog/2023/downloadable_macos_typefaces"},{"id":"1698922800000_powershell_first_steps","title":"Some notes from finally learning PowerShell","content_html":"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 PowerShell properly. Here are some notes for my future self.
\nI am boggled why the default tab completion in Windows shells insists on being the terrible full completion of first match. Unlike cmd
, PowerShell doesn’t have to suck.
The built in command
\nSet-PSReadlineKeyHandler -Key Tab -Function MenuComplete
\nswitches to using a bash/zsh/fish style menu completion.
\nPlace it in a profile script to run on shell launch.
\nPowershell’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. help help
will tell you in a remark at the very bottom of the page that is easy to miss.
Curiously, if you use the full command Get-Help -Name Get-Help
rather than the aliases help
or man
, you are prompted immediately on first run to download the documentation.
Full documentation can be installed (or updated) with
\nUpdate-Help
\nStill need to figure out how to stop it yelling about missing resources.
\nEnvironment 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.
\nThe alias:
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.
man
, or ls
for example are both usable in PowerShell, but because they alias PowerShell commands rather than being their unix equivalents, things can get confusing.
input
events","content_html":"Sometimes web API changes slip by you: Today I learned that the DOM now has a dedicated input
event for text entry on input
and textarea
elements (and contentEditable
, but who wants to be touching that, yikes!) that is raised whenever the value
has changed.
This is different from the change
event, which is only raised when the value
has changed and the widget is blurred (defocused).
Previously, the if change
wasn’t granular enough, a developer would resort to keyup
or keypress
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 IME multiple keypresses are required to produce a single character (Japanese for example), you will instead be getting an invalid partial state.
Related to input
is beforeinput
which is raised just before the value
changes.
Proper handling of input composition with IMEs is also handled with CompositionEvent
now.
At the end of last year, I was unsure if Manticore—my app for generating encounters for 13th Age—had a future with the announcement of 13th Age second edition and it’s changes to the encounter building rules.
\nPart 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 Svelte and Svelte Kit a shot to see what it was like, and that has resulted in a near complete rebuild of the UI and build infrastructure.
\nThe major user facing changes so far are:
\nI’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.
\nThe application will stay in alpha status while 13th Age 2e is in development. I don’t anticipate any major issues in getting it finalised once the rules are.
\n","date_published":"2023-02-27T11:00:00.000Z","url":"/blog/2023/manticore_2"}]}