Blog

PHP 7.3.13

I switched from PHP 7.2.26 to PHP 7.3.13 and that broke my WordPress blog. The problem was Aram Kocharyan’s Crayon Syntax Highlighter plugin. Version 2.8.4 has not been updated for 4 years. PCRE to PCRE2 The transition from PHP 7.2.x to PHP 7.3.x upgraded the PCRE (Perl Compatible Regular Expressions) extension to PCRE2. User ‘baseapp’ […]

Programming ligatures

A ligature is a glyph formed by two or more graphemes. Computer fonts with programming ligatures use ligatures to present lexemes formed of two or more symbols. There is disagreement over whether that is useful or harmful – harmful because the presentation masks the symbols required to form the lexeme in code. Ian Tuomi’s Hasklig […]

The more you study …

Trying to make Haskell-related things work on Windows, you can learn a lot about Unix-like operating systems. Sometimes you can learn about Windows too. Looking at RIO.Process.findExecutable provided by rio-0.1.12.0, I learnt about the PATHEXT environment variable. PATH and PATHEXT The Command Prompt (cmd.exe) and other executables use the environment variables PATH and PATHEXT to […]

Help? Help.

The package optparse-applicative provides a Haskell library for parsing options at the command line. A minimal example, providing only minimal help, is as follows:

On Windows 10, the ‘Usage:’ help text depends on how the executable is called and can include a filename extension. For example, at the Command Prompt, a test executable, opTest.exe, […]

Lawnmower Key

The Gtech Cordless Lawnmower comes with a plastic safety key. If the key is misplaced, the mower will safely not work. A spare key became a 3D printing project. I measured the dimensions of the key using a digital caliper and modelled it in Autodesk’s Fusion 360. I exported the model as an STL file […]

Political landscape II

About 47.6 million people were registered as entitled to vote in the United Kingdom’s general election on 12 December 2019 and about 32.1 million did so. I used Haskell to view the outcome with cartograms in which each of the 650 constituencies is represented by a regular hexagon of the same size. Turnout percentage I […]

Political landscape I

About 47.6 million people were registered as entitled to vote in the United Kingdom’s general election on 12 December 2019 and about 32.1 million did so. I wanted to use Haskell to view the outcome. Results The House of Commons Library publishes the results of the election as two comma-separated values (CSV) files, the smaller […]

Access Access

I had a lot of data in a table in an Excel spreadsheet file and I was planning to use Haskell to analyse it. The data would be better structured as a database. Microsoft Office 365 provides Access, a database management system (DBMS). Could Haskell access data in an Access .accdb file? The short answer […]

Parametric pill box

Autodesk’s Fusion 360 allows the parametric modelling of solids. I used it to create a better pill box, where user parameters defined the box diameter (default 38 mm), box height (3 times the radius, between the hemispherical caps), wall thickness (2 mm), minimum wall thickness (0.8 mm), clearance (between the overlapping parts) (0.25 mm), number […]

Pill box

A right circular cylinder, about three times its radius in height, capped by hemispheres makes a satisfying pill shape. I bisected the pill perpendicular to its axis of circular symmetry to allow both the hemispheres to be 3D printed convex. The two halves would need to be joined. Pill box 1 On my first attempt, […]