Blog

External storage

My laptop is a Dell XPS 13 9360. I was pleased with it when it arrived in September 2017, and still am. Six years ago, I thought its 220 GB SSD would be plenty. Now, despite the cloud, that drive was often almost full, in part tested by Haskell’s requirements. I turned to an external […]

The website implodes

I updated this website to PHP 8.0.13 and WordPress 6.3.1, and it fell over with “There Has Been a Critical Error on Your Website”. Rolling back to WordPress 6.1.3 did not help. Debug In wp-config.php, I changed (temporarily): to: That sees logging in debug.log in directory wp-content. Diagnose The log reported: The documentation for implode […]

Haskell and concurrency

Stack can perform actions during building concurrently. I wanted to understand how it acheived that. IORef As a preliminary, Haskell provides for mutable references, in the IO monad. For example, the code below makes use of the mutable variable (of type IORef Int) created by action newIORef :: a -> IO (IORef a): The action […]

Haskell and GUI

I saw an introduction to GUI programming in Haskell by Vladislav Zavialov. In his video, he referred to Unix-like operating systems but not Windows. I wanted to reproduce his example on Windows. As is often the case, it was not straightforward. A test project I created a new project gtkTest using stack new gtkTest and […]

Stack and options

The Haskell Tool Stack’s stack command can run a Haskell source file as a script, making use of a Stack interpreter options comment at the start of the file. Stack’s stack script command can also run a script file, but it ignores any interpreter options comment – all Stack flags and arguments must be specified […]

Random numbers

A pseudo-random number generator (PRNG) is a function g -> (a, g) where the sequence of a values from its repeated application to the g values meets certain criteria. The System.Random module of the random package for Haskell exports a class RandomGen g which promises functions including genWord64 :: g -> (Word64, g). It also […]

Programming ligatures revisited

Since version 1.40, Visual Studio Code allows fine-grained control over OpenType font features. Windows Terminal v1.11.2921.0 (pre-released in v1.11.2421.0) now allows the same. However, Cascadia Code has gone backwards (from a Haskell perspective). I decided to swap Fira Code for Cascadia Code. Visual Studio Code In Visual Studio Code’s settings.json: cv02 turns on a variant […]

Unicode

The Haskell type Char represents Unicode code points. I was struggling with the output of certain Unicode characters by Haskell code on Windows Terminal, under Windows 11. Specifically: either did not work at all or, when the OEM code page was changed in PowerShell Core 7.2.1 from the default 437 to 65001 (UTF-8) (using command […]

Windows 11

Offered the opportunity to replace Windows 10 with Windows 11, I took it up. Having done so, I had mixed feelings. Chat The Chat app is integrated with Windows 11 and its icon appears on the Taskbar by default. At first, the app did not work at all, reporting only that it ran into unspecified […]

Reanimator revived

Over a year ago, I hit a dead end on Windows 10 with David Himmelstrup’s reanimate package. I returned to the package with a simple animation in mind. In the interim, things had moved on. I had no difficulty creating the animation and rendering it to a GIF image: Dependencies On Windows 10, the Haskell […]