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 […]

gnuplot and Excel, scratching the surface

Microsoft’s Excel is ubiquitous in finance. The current version (version 2105) provides the Surface chart type, with four varieties of the chart: 3-D Surface, Wireframe 3-D Surface, Contour, and Wireframe Contour. The underlying data is provided as a rectangular grid or, rather, a list of series of data. The names of the series provide the […]

The big blue

On 9 July 2020, I received a new Dell XPS 8930. From about 13 August 2020, I have had a series of BugCheck events (Event ID 1001), logged in the System log. All of them, except two, were code 154. Could I find the cause? I thought I had but it was a false dawn. […]

Road to partition

The home PC (a Dell XPS 8700) failed, leading to the painfully slow backup and recovery of Windows 8.1, the upgrade again to Windows 10 version 2004 and, luckily, the recovery of data. A few weeks later, it failed again, the lock screen and mouse frozen at 3:06 am on a Tuesday morning, rebooting only […]

Locale hero

I was interested in the internationalisation (‘i18n’) of Haskell programs. The Haskell wiki has a page on the subject, referring variously to: using the constructors of a Haskell type to represent messages, GNU’s gettext, or the Grammatical Framework programming language. A starting point was identifying the user’s locale. As is often the case, that was […]

Logjammin’

Discontent with the verbose output of version 2.3.3 of the Haskell Tool Stack when using a Solarized Dark terminal theme took me down the rabbit-hole of logging with the rio and monad-logger packages. RIO.logDebug The RIO module exports logDebug: In respect of the RIO env a type, RIO env is an instance of MonadIO and […]