Up to Main Index                              Up to Journal for July, 2026

                      JOURNAL FOR FRIDAY 31ST JULY, 2026
______________________________________________________________________________

SUBJECT: Introducing `norem` — a pre-processor for comments
   DATE: Sat  1 Aug 20:33:35 BST 2026

This entry is posted late as I haven’t been feeling up to doing much recently.
In fact, I have not been doing too well this month at all. For nearly the
whole of July there has been a heatwave with temperatures above 25°C during
the day. Between the 6th and 12th it was 30°C and above. My study has mostly
been between 27-33°C for most of the month. Anything above 23°C and I start to
slow down and feel very dopey and incredibly tired.

I have been trying to work on a new tool called `norem` — no remarks/comments.
It is a pre-processor for adding comments to file formats that do not natively
support them: plain text, Markdown, JSON, etc.

Here is a simple JSON example, config.json:


    >cat config.json
    {
      /*
        Production environment overrides.
        These settings are sensitive; do not commit
        to public mirrors.
      */
      "api_version": "2.4",
      "endpoint": "https://api.internal.net", // Primary gateway
      "retry_limit": 5,
      "features": [
        "auth",
        "caching",
        "#debug" // Temporarily disabled for stability
      ]
    }


Here we have a multi-line block comment and two line comments. JSON usually
does not allow comments.

Taking our example `config.json` from above, we can easily remove the comments
using `norem`:


    >norem ./config.json
    {
      "api_version": "2.4",
      "endpoint": "https://api.internal.net",
      "retry_limit": 5,
      "features": [
        "auth",
        "caching",
        "#debug"
      ]
    }


The resulting JSON can be written to a pristine copy of the file using normal
redirection `norem ./config.json > live.json` or it can be piped into other
tools. For example:


    >norem ./config.json | jq -r '.endpoint'
    https​://api.internal.net


I did have a whole article full of `norem` examples. However, I had to hold
off at the last minute due to a complete rewrite of the tool. Hopefully the
weather will cool down, I’ll fell more myself, the tool and article will be
finished.

--
Diddymus


  Up to Main Index                              Up to Journal for July, 2026