Sunday, 2 August 2026

A Note on LSTM

LSTM, or long short term memory, seemingly paradoxically named, was co-invented by German computer scientist Sepp Hochreiter, who incubated it in his 1991 diploma thesis leading to its main publication in 1997. 

LSTM addresses the problem of numerical instability in training recurrent neural networks (RNNs) that prevent them from learning long sequences (the so-called vanishing gradient problem).

In 2007, he and others applied LSTM, optimizing the architecture, to very fast protein homology detection without requiring sequence alignment.

Protein homology detection is the process of identifying whether two proteins share a common evolutionary origin - one of the core problems in computational biology.  Homology implies shared structure and shared function.


Saturday, 1 August 2026

Agentic Coding, IDE Debugging

You've built your software agentically. Now you want to (need to) debug it in an IDE.

You may need to add some extra settings.

OpenAI's Astra Solves More Maths Problems

Astra has solved 10 hard maths problems (published 1 August 2026) following on from its disproof of the Erdös unit distance conjecture (from combinatorial geometry) in May 2026.

A paper of almost 250 pages (inclusive of references) is available from OpenAI's website.

Defensive Perl

Perl is less fashionable than Python these days, but it is a very flexible language which excels in text processing.

Its flexibility allows a myriad of programming styles, however, so having a set of defensive techniques helps.

Here are some top tips:
  • Switch warnings on - use the minus-w command line flag -  #! perl -w
  • Learn and use perlpod - it looks a bit like this at the start of your file  =head1 NAME  myscript =cut
  • Always use strict; at the start of your program (this pragma restricts expressions that are hard to debug)
  • Qualify your variables with type prefixes (similar to "Hungarian" notation) e.g. my $sHeader for strings, my @aCodes for arrays, my %hCodesToDescriptors, and appropriate equivalents for common custom types
Recap on pragmas: A pragma is a module which influences some aspect of the compile time or run time behaviour of Perl, such as strict or warnings. From Perl 5.10 onward - custom pragmata are supported.

Happy Perling!

How Imports Work in Python

The syntax for import is as follows (keywords in quotes):

"import"  module [ "as" identifier ]

There is also a variation to use when testing proposed changes to Python:

"from " "__future__" "import" feature [ "as" identifier ]

The first thing import does is find an load the module. It then initialises the module.



Frozen Frames when Debugging Python

When running pdb, you will notice certain debugging frames as frozen.  This is typically when:
  • code is compiled C-extension code (e.g. importlib, asyncio, threading internals)
  • the debugger cannot step in or modify them
  • they are part of Python's frozen importlib bootstrap
For example, in the following:

<frozen importlib._bootstrap>
<frozen importlib._bootstrap_external>

The modules are embedded in the Python binary.

If you try ll in the Python debugger when compiled code is being processed, you will get the error: *** could not get source code.

Friday, 31 July 2026

Understanding HTTP State Management

HTTP state management is covered in RFC6265.  

Python's request module however refers to its predecessor RFC2965 within the class DefaultCookiePolicy in cookiejar.py. Some programmers say the implementation is quite strict.

One difference in the RFCs is the use of Augmented Backus-Naur form (ABNF) in the latter, not used in the former. ABNF for specifications is formalised in RFC5234 (an Internet standard, proposed to be augmented by RFC7405).

Understanding HTTP Redirects

Introduction

If you want to program an HTTP request module (to make HTTP requests, to download web pages, or other data) there are a number of relevant concepts relating to HTTP that you must understand.

One of these concepts is HTTP redirects. What are they, why do they exist, and what a "reasonable" number of redirects looks like when sending an HTTP request to a server.

What is a redirect - technically speaking?

First the technical part. HTTP redirects occur when a server responds to a client request with the reply 3XX (status code). This is coupled with a location header of the URL it wants the client to load instead.

The browser or other HTTP client (which could be a Python program, for example) then follows the redirect, issuing a new request to the URL in the location header.

Why are they needed?

Examples:
301 Permanent redirect - e.g. for site reorganization, domain migration, SEO link preservation
Also temporary redirects - e.g. for load balancing
HTTP to HTTPS redirect

Redirects can be configure in Apache .htaccess and in nginx.

Pythons requests module allows by default 30 redirects.

PyCharm

PyCharm is an IDE for Python development from JetBrains. Copilot recommends this for large projects.

However to connect to WSL projects you need to have the JetBrains gateway installed.

Know your requirements well to understand if you really need such an overwhelming IDE.

Epigrams on Programming by Perlis: Seek Symmetry Everywhere

The echo of Alan Perlis' insights reverberate in computer science departments around the world, and immortalised in Epigrams on Programming, which he published in 1982. Here is a selection of his well-known aphorisms.

One man's constant is another man's variable.

Everything should be built top-down, except the first time.

Functions delay binding; data structures induce binding. Moral: structure data late in the programming process.

Syntactic sugar causes cancer of the semicolon.

If a program manipulates a large amount of data, it does so in a small number of ways.

Symmetry is a complexity-reducing concept (co-routines include subroutines); seek it everywhere.

A programming language is low level when its programs require attention to the irrelevant.

It is better to have 100 functions operate on one data structure than 10 functions on 10 data structures.

Get into a rut early: Do the same process the same way. Accumulate idioms. Standardize. The only difference (!) between Shakespeare and you was the size of his idiom list - not the size of his vocabulary.

If you have a procedure with 10 parameters, you probably missed some.

Recursion is the root of computation since it trades description for time.

If two people write exactly the same program, each should be put into microcode and then they certainly won't be the same.

In the long run every program becomes rococo - then rubble.

Every program has (at least) two purposes: the one for which it was written, and another for which it wasn't.

A language that doesn't affect the way you think about programming, is not worth knowing.

Wherever there is modularity there is potential for misunderstanding: Hiding information implies a need to check communication.

Optimization hinders evolution.

A good system can't have a weak command language.

To understand a program you must become both the machine and the program.

One can only display complex information in the mind. Like seeing, movement or flow or alteration of view is more important than the static picture, no matter how lovely.

Once you understand how to write a program get someone else to write it.

Around computers it is difficult to find the correct unit of time to measure progress. Some cathedrals took a century to complete. Can you imagine the grandeur and scope of a program that would take as long?

In programming, everything we do is a special case of something more general - and often we know it too quickly.

Simplicity does not precede complexity, but follows it.

Programmers are not to be measured by their ingenuity and their logic but by the completeness of their case analysis.

Everyone can be taught to sculpt: Michelangelo would have to be taught not to. So it is with great programmers.

The most important computer is the one that rages in our skulls and ever seeks that satisfactory external emulator. The standardization of real computers would be a disaster - and so it probably won't happen.

Some programming languages manage to absorb change, but withstand progress.

There are two ways to write error-free programs; only the third one works.

In software systems it is often the early bird that makes the worm.

Sometimes I think the only universal in the computing field is the fetch-execute cycle.

The goal of computation is the emulation of our synthetic abilities, not the understanding of our analytic ones.

Like punning, progamming is a play on words.

As Will Rogers would have said, "There is no such thing as a free variable".

Giving up on assembly language was the apple in our Garden of Eden.

When we understand knowledge-based systems it will be as before - except our fingertips will have been singed.

A LISP programmer knowns the value of everything, but the cost of nothing.

Software is under a constant tension. Being symbolic it is arbitrarily perfectible; but also it is arbitrarily changeable.

It is easier to change the specification to fit the program than vice versa. 

In seeking the unattainable, simplicity only gets in the way.

In programming, as in everything else, to be in error is to be reborn.

When we write programs that "learn", it turns out that we do and they don't.

Often it is the means that justify the ends: Goals advance technique and technique survives even when goal structures crumble.

Is it possible that software is not like anything else, that it is meant to be discarded: that the whole point is to see it as a soap bubble?

Because of its vitality, the computing field is always in desperate need of new cliches: Banality soothes our nervers.

Prolonged contact with the computer turns mathematicians into clerks and vice versa.

In computing, turning the obvious into the useful is a living definition of the word frustration.
We are on the verge: Today our program proved Fermat's next-to-last theorem.

Motto for a reseach laboratory: What we work on today, others will first think of tomorrow.

Computation has made the tree flower.

The computer is the ultimate polluter : its feces are indistinguishable from the food it produces.

When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop.

Interfaces keep things tidy, but don't accelerate growth: Functions do.

Don't have good ideas if you aren't willing to be responsible for them.

Computers don't introduce order anywhere as much as they expose opportunities.

In man-machine symbiosis, it is man who must adjust: The machines can't.

The proof of a system's value is its existence.

You can't communicate complexity, only an awareness of it.

Within a computer natural language is unnatural.

Most people find the concept of programming obvious, but the doing impossible.

#116

Use of Mathematical Induction in Proofs of Program Correctness

Robert Floyd introduced MI as a systematic method to prove the correctness of computer programs in his 1967 paper "Assigning Meanings to Programs", written at the then Carnegie Institute of Technology, supported by DARPA.

This directly inspired Tony Hoare's axiomatic semantics and the development of Hoare logic (also known as Floyd-Hoare logic).

Floyd acknowledges gestation of these ideas by Perlis and Gorm, albeit in unpublished papers.

Thursday, 30 July 2026

Mathematics in VS Code with Lean

Formalizing mathematics is now possible in VS Code with Lean. See the manual here. Extension here.

Lean functionality is exposed in the UI via the universal quantifier at the top right of VS code.

Consider copying the MIL folder, containing key examples, so you can tinker with the example code.

MIL = Mathematics in Lean.

When you download the MIL, you will see a flurry of activity in your Output Console in VS Code. This will include reams of stuff relating to "Fetching Mathlib build artifact cache" and thousands of file downloads.

You will also see the incantation "lake build" which is the primary build command in the Lean build system.

Advice on how to work through the MIL textbook from the official website - "working through the exercises is central to the experience".

Note: when reading Lean files in VS code turn off Unicode character highlighting (Control-, to get into settings, and update Text Editor settings).

kdb+ - An Intro

kdb+ is a high-performance time series database and analytics engine powered by a vector language q. It has been in existence for over 30 years.

It uses columnar storage for efficient querying. For example, if you have temperature readings, taken at 5 minute intervals, you can pull out the whole vector of temperatures in a single query (you are pulling the full time series vector as opposed to a reading from a time series).

If you have corresponding humidity readings, you can do a similar query.

This avoids reading entire rows even if only one field is needed. Typical relational databases query cross-sectionally.

Wednesday, 29 July 2026

Open Source - and Goldman Sachs??

Goldman Sachs has open sourced some of its code.

The Lean FRO Year 3 Roadmap

Changes to Lean - as articulated by Lean FRO's Y3 roadmap.  

Some items will for sure be done, some may be pushed to Y4.

All roadmap content can be found here.

While we are there, let's say thank you to the Lean Team.

The Draw Tab in Word

The Draw tab in the Word ribbon is a great feature - but it may be turned off by default.

To turn it on do the following:

1.    File
2.   Options
3.   Customize Ribbon
4.   Select Draw

This will enable you to use a freeform marker in your Word doc.

Theorem Proving in Lean - What Makes Dependent Type Theory Dependent?

This precis is based on the Lean Manual, Section 2.8.

Tuesday, 28 July 2026

Zulip

Zulip is an open source chat platform to help distributed teams communicate effectively. The Lean community used Zulip to collaborate.

Lean Ecosystem Decoded

elan - package manager for Lean. elan can be used inside VS code and will manage all versions of Lean on your system

Lake - the standard project structure and build system used in Lean

mathlib4 - the math library for LEAN

mathlib4 can be found here. It contains both programmatic infrastructure and mathematics.

Friday, 24 July 2026

Theorem Proving in Lean - Basics of Dependent Type Theory

The master guide is here.

DTT and its Specific Variant for Lean

Dependent type theory (DTT) allows you to express complex mathematical assertions and reason about them in a "natural and uniform" way. 

Lean is based on a version of DTT called the Calculus of Constructions, with a "countable hierarchy of non-cumulative inverses and inductive types". This sounds complex. 

The following section explains this.

First, let's talk Simple Type Theory

In "type theory" every expression has a specific type. e.g. the expression x+0 may denote a natural number in a specific context. In another context, it may be a floating point number, of a particular precision.

In Lean, a natural number is an arbitrary precision unsigned integer.

Our use of the arbitrary precision (unsigned) integer, reflects the unnatural way of thinking about counting numbers from a computing perspective. In computing, we think of the object, but also the memory it occupies - so we speak of 16 bit integers, 32 bit integers and so on - a nod to the physical limitations of computers. n-bit integers where n is not predefined underlies this concept of arbitrary precision.

An arbitrary-precision integer can grow to any number of bits, limited only by available memory. 

This differs from so-called fixed-width integers (8-, 32-, 64- bit).  

A variable-length array of digits/bits are used so it can represent arbitrarily large integers without overflow. (Analogies include - BigInt in Java, or System.Numerics.BigInteger in C#).

Defining Contants in Lean with the def keyword

Let's define some constants in Lean.

/- Define some constants. -/
def  m:  Nat := 1   --m is a natural number
def  n :  Nat := 0
def  b1: Bool := true  --b1 is a Boolean
def  b2: Bool := false

Now check their types using: #check m;  #check n; #check n+0 etc. You can also run some "evals" in Lean: #eval  5*4; #eval m+2 etc.

The def keyword introduces new constant symbols to the working environment. The #check command asks Lean to report their types. The #eval command asks Lean to evaluate the given expression.

Composing New Types from Existing Ones

What makes simple type theory powerful is you can build new types out of others.

For example, if a and b are types, a->b denote the type of functions from a to b, a × b denotes the type of pairs consisting of an element of type a and element of type b.

Note on use of Unicode: (From the Lean Manual): "The judicious use of Unicode improves legibility, and all modern editors have great support for it. In the Lean standard library, you often see Greek letters to denote types, and the Unicode symbol → as a more compact version of ->."

Theorem Proving in Lean - Three Definitions to Get Started

This is an abridged account of Theorem Proving in Lean capturing only the SSPs, or super salient points.

Here are some three starting definitions essential for understanding this topic:

Formal verification - using logical and computational methods to establish claims that are expressed in precise mathematical terms. Example claims - mathematical theorem /hypothesis, claims that pieces of hardware or software, network protocols, security protocols - do what they say they actually do.  The process is "describe your system in mathematical terms" ,then use "theorem proving" to establish truth.

Automated theorem proving - focused on "finding". The "ATP" toolkit includes: resolution theorem provers, tableau theorem provers, fast satisfiability solvers to provide means of establishing validity of formulas in propositional and first-order logic.  Computer algebra systems may be used in concert to carry out mathematical computations.  

Automated reasoning - differs; not as "cast iron" as theorem proving. Automated reasoning is a superset of automated theorem proving, which includes imprecise techniques such as heuristic search and fuzzy logic.





Thursday, 23 July 2026

The Lean Programming Language

The Lean Programming language is being used to create a new proof of Fermat's Last Theorem. Some lecture notes from London's Imperial College set the scene.

Theoretical Foundation (DTT)

Dependent type theory (DTT) is the theoretical foundation of Lean (the link provided takes you into the Lean manual and gives a brief intro to the theory) which bears "categorical semantics".

Getting Started with Lean

Who created Lean

Lean was created by Brazilian computer scientist Leonardo de Moura, in 2013, when he worked in Microsoft Research (where he worked for 16 years). 

Leonardo is now Senior Principal Applied Scientist at AWS, where he works in the Automated Reasoning Group.  This group does a lot of work in Provable Security and Software Assurance.

Lean is available under the Apache 2.0 license.

ngrams, ngrams everywhere

An n-gram is a continuous sequence of n items - words, letters or symbols - from text or speech, used to analyze patterns and predict sequences in language.

Suppose we choose the items of our n-gram as "words". We then have the following taxonomy:

  • unigram - consisting of a single word e.g. design
  • bigram - consisting of two words e.g. design experiments
  • trigram - e.g. design of experiments
Google has a great ngram viewer to see the frequency of certain ngrams in books throughout the ages.

Wednesday, 22 July 2026

mTLS - building machine to machine trust

What is mTLS? 

mTLS is also known as mutual TLS, after the ubiquitous security protocol. It is used in environments where machine-to-machine trust really matters.

Where in general is mTLS used? Where specifically is mTLS used? Did someone say "Kubernetes service mesh"? I think so! 

It's not generally used for public websites, but inside serious enterprise systems, it's a standard way to guarantee only authenticated services speak to each other.

Examples in modern infrastructure include: Kubernetes service meshes (Istio, Linkerd), API gateways, internal microservices, banking and trading and zero-trust networks.

Is mTLS a standard?

It's a section in TLS standard.

Root Certificates

In cryptography, a root certificate is a public key certificate that identifies a root certificate authority (CA).

Examples of certificate authorities (CAs) include SwissSign.

Root certificates are self-signed and forms the basis of an X.509-based public key infrastructure (PKI). Recall the X.509 is the ITU standard for defining the format of a public key certificate.

Worth reading also is RFC5280 which covers X.509 certificates and CRLs (certificate revocation lists).

Certificate Validation with Certifi in Python

The Python certifi package provides Mozilla's "carefully curated collection" of Root Certificates to validate the trustworthiness of SSL certificates while verifying the identify of TLS hosts. 

It has been extracted from the Requests project.

Monday, 20 July 2026

Parity between Azure and AWS

It is worthwhile to maintain knowledge parity between Azure and AWS. 

If you use a cool thing in Azure, chances are the same functionality exists in AWS (e.g. managed kubernetes service - known as AKS or EKS in respective clouds) and so you should know how to do same cool thing in AWS.

Cloud economics may dictate future decisions.

A Nod to AWS EKS

AWS EKS (Elastic Kubernetes Service) is a fully managed Kubernetes service provided by AWS. 

EKS simplifies deployment and management of containerized applications using Kubernetes. Users need not manage the Kubernetes control plane or nodes manually.

Jargon warning: 

The Kubernetes control plane is the central management utility of a Kubernetes cluster. 

It maintains cluster state, making decisions about the cluster and responding to cluster events. It is made up of several key components that work together.

AWS basically runs the control plane for you.

There are a number of use cases suggested by AWS.

Copliot Studio and Cost Analysis

Copilot Studio is a Microsoft product for building and managing AI agents. 

It has a corresponding licensing guide enabling you to estimate costs of building and running agents with it. At time of writing the licensing guide has been updated in July 2026.

Saturday, 18 July 2026

Revisiting Port 443

Port 443 is primarily known for handling HTTPS traffic over TCP, enabling secure communication between browsers and servers.  

It can be used with UDP in specific scenarios like QUIC (for lower latency secure communications) and HTTP/3.

When diagnosing why an HTTPS connection is failing, an in depth knowledge of port 443 is needed.






Visual Studio Community July 2026 Release

See the status of GitHub Copilot from the Visual Studio IDE. Built-in .NET and Azure skills are introduced.

Agent Skills Introduced by Anthropic

Anthropic introduced agent skills which have now been embraced by other vendors too e.g. Microsoft.

Agent skills are a standardized way to extend agent capabilities with specialized knowledge and workflows.  It consists of a folder containing a SKILL.md file.  This contains metadata and instructions for the agent to do its task.

Other stuff can be bundled with the skill as well, as follows.

agents-new-skill/ ├── SKILL.md # Required: metadata + instructions ├── scripts/ # Optional: executable code ├── references/ # Optional: documentation ├── assets/ # Optional: templates, resources └── ... # Any additional files or directories

The PEM Format

PEM (Privacy Enhanced Mail) is a format used for transmitting cryptographic keys, certificates and other data.  

PEM structure consists of a text file in Base64 encoded data format (a binary-to-text encoding consisting of 64 printable characters - the idea is you can push binary data into a communication channel that only supports text). Base64 is famous for its use in attachments, since SMTP in its original form was designed to support 7-bit ASCII characters only.

An alternative to PEM in Java contexts is DER (Distinguished Encoding Rules) used for X.509 certificates and private keys.

Busting Certificate Issues in Ubuntu

Suppose you are running a data pipeline on Linux/Ubuntu that consumes data from the web. You get a RuntimeError: "SSL certificate verification failed".  What do you investigate?

Verifying the ca-certificates package and updating /etc/ssl/certs

 sudo apt-get install -y ca-certificates

installs the ca-certificates package (the -y means "say yes to all prompts").

This software processes certificates in PEM format.

With this installed, new certificates can be added to /usr/local/share/ca-certificates.  

The trust store can then be updated with:

sudo update-ca-certificates

You can then check if the certificate has been added.

ls /etc/ssl/certs | grep local-ca



Programming as Play

Shade Zahrai has noted that "play changes your brain". 

Stress drops (cortisol down, dopamine up) when something feels low-stakes and playful.

Daily light-hearted play can train your brain to get comfortable with taking risks, exploring and trying new stuff. It builds a sense of agency, a belief that action can make a difference.  

This concept is also explored in the context of programming specifically in an article on "Hunting the Wiley Hacker" which covers the joy of Linux.

Friday, 17 July 2026

A Scorecard for the AI Age

Is a very nice article by Sarah Friar, CFO of OpenAI, on measuring value from AI.  But how to measure "AI", or do we create measures across every AI vendor/model pair to work out value per segment?

More on Data Validation in Pydantic

Pydantic Validation is the validation layer of the OpenAI SDK, the Google ADK, the Anthropic SDK, LangChain and others.

Pydantic uses Rust under the hood. This makes it faster than say, something implemented directly in Python.

How are the Python and Rust pieces glued together?

The key is that the validation layer is compiled in Rust (pydantic-core).  Data parsing, validation and in general, any perf-critical operations, are done here. Py03 is used to create bindings in Python.

While there is no need to use the Rust code directly, for reference it can be found in GitHub here.

But what does this validation actually entail?  What's the use case?

How does it work?

Type hints (PEP 484) are one of the tools used in Python validation (GvR himself h as co-authored that PEP).  Type hints enable integration with various static typing tools (like mypy) and IDEs (like VSCode).

The Type hints PEP also references PEP 3107 for function annotations (written by Collin Winter and Tony Lownds).

Classical Reinforcement Learning and the Reward Signal

As a prelim to understanding RLHF, it pays to understand classical reinforcement learning, which has been studied under many different guises within computer science and more traditional engineering.

This is concerned with how an agent should take actions in a dynamic environment in order to maximise a reward signal.




Back to LLM Basics - What is RLHF

RLHF is a core part of how large language models learn. 

It stands for reinforcement learning with human feedback.  Idea is you train models to align with human preferences.

A core input is data from human annotators as an input into the learning process.

The algorithm now widely used in RLHF was pioneered by OpenAI (InstructGPT). The idea is you align the model with human intent. Alignment with human intent is what makes the model (more) useful.

Tuesday, 14 July 2026

Document Intelligence Infrastructure

Article covers GraphRAG and an agentic approach as a path to document intelligence,

GPT-5.6 Sol - Preview

Sol is OpenAI's strongest model yet.

It has a robust safety stack, including protections for higher-risk activity and repeated misuse.

A limited preview is being done with trusted partners first.

Sunday, 12 July 2026

Codex is now the ChatGPT App

Inside the app it says "Powered by Codex and OWL". Codex is the coding agent, OWL is the Chromium-based environment that provides the "runtime shell" for Codex.

OpenCV in Python

pip install opencv-python

More on OpenCV on opencv.org.

Saturday, 11 July 2026

Reverse Debugging

Not all debuggers are created equal. Some allow reverse debugging, some do not.

gdb does
pdb does not

pdb is a forward only debugger. Once a statement runs, its side-effects (e.g. variable changes, I/O etc.) are permanent unless you restart.

History of .NET Core

The evolution of ideas is something very interesting. In this respect, the evolution of ideas within .NET Core is worth reflecting on. This article from June 2019 mentions Maestro, which deals with one specific challenge in the development of .NET Core.

The Debugger Class in .NET

The Debugger class in System.Diagnostics is implemented in Debugger.cs.  Its purpose is to allow communication with the debugger.

This is the class that lets you do a "hard debug" but typing Debugger.Break(), which signals a breakpoint to an attached debugger.

Debugger.Launch() is similarly aggresive. It launches and attaches to a debugger to the process.


Friday, 10 July 2026

Python Debugging: "SSL Certificate Verification Failed"

Ever seen this:

RuntimeError: Failed to fetch (insert_dataset_of_choice) data: SSL Certificate Verification Failed

This may happen in code that was previoulsy working. It can be caused by outdated or missing CA certificates. 

AI - New Ideas Every Day

There are literally new ideas every day in AI. Every day.

New commercial R&D, published and waiting to be read, every day.

GitHub's Agentic Workflows in the Crosshairs of GitLost

Noma Security has publicised GitLost, a technique to get GitHub Agentic Workflows to spill private repository data.

The exploit is aimed at organizations with both public and private GitHub repositories, and relies on prompt injection.

Specifically, it uses indirect prompt injection  where malicious instructions are injected into seemingly regular requests.

GitHub's Agentic Workflows introduce LLMs into GitHub Actions, which is how the exploit is enabled.

Anthropic's Interpretability Research

This is journalled here. The goal is to understand how LLMs actually work internally.

Claude's "Access Consciousness"& Rise of the "J-Space"

Anthropic's Claude model series has claimed "access consciousness" via the J-Space.

The Claim of the "J Space"; And the Parallel with Global Workspace Theory of Neuroscience

This claim has been presented as "A global workspace in language models" described at a high level here, and deep-dived in the paper  Verbalizable Representations Form a Global Workspace in Language Models (July 6, 2026, Wes Gurnee, Nicholas Sonofriew, Jack Lindsey et al). 

From the paper - it is clear that the analysis identifies "data structures of the mind" - where we replace with "mind" with "model" to get a window in on the model's thinking:

"we observe that language models maintain a privileged set of internal representations, available for report, modulation, and flexible internal reasoning, atop a much larger volume of automatic processing. We identify these representations using a new interpretability technique, which surfaces the concepts a model is poised to verbalize at any point in its processing".

What is interesting is the discovery of this so-called "J-Space" but also the interpretability technique. It offers a new way to "commune" with LLMs.

The phenomenon of "access consciousness" is described in the paper, a concept from behavioural and brain science. This is introduced as a purely functional notion - it's purported purpose is utilitarian, and not linked to subjective experience (sometimes called phenomenal consciousness).

Neuroscience has a global workspace theory where a "data structure" can be posted to the brain's "working set area" for use in reasoning and reporting.

The Evidence

The paper poses the question whether functional properties of a global workspace have emerged in LLMs.  It portrays the LLM's thinking as a plethora of vector representations, some constituting low-level bookkeeping and some embodying higher level ideas like "Golden Gate Bridge" or even emotions.  If such a workspace were to exist, we would expect a subtset of vectors to be prominently and preferentially present in the LLM's memory.

The Test for Presence

Verbal report - when asked what it is thinking about, LLM names concepts from its workspace




Thursday, 9 July 2026

What is Pylance?

Pylance is the component that enables Visual Studio Code to provide IntelliSense for Python. 

It is underpinned by Microsoft's Pyright type checker (open source static type checker for Python). Read more about Pyright from the official website.

Wednesday, 8 July 2026

Navigating OpenClaw Architecture

The best place to start is by reading architecture.md in the docs/concepts subdirectory.

Then move on to the other concepts (not all equally weighted in importance) than read the source code.

Tuesday, 7 July 2026

Data Rates Rule...OK!

So git clone is busy "Receiving objects" but it's taking time...what data rate is underlying this operation?

Data rates are measured using a variety of standardised conventions.  

They are usually multiples of bits per second (bit/s) or bytes per second (B/s).  bit and Byte are ISQ symbols (International System of Quantities).

Residential Internet speeds are often measured in Megabits per second (Mbit/s - often abbreviated Mbps - as you will see in the Windows Network Speed Test application).  1 Mbps is 1000 kilo bits per second, or 1000 kbit/s or 1000 kbps).

There is also the Mibit/s convention - which stands for mebibits per second (or MiB/s).

This is 2^20 bits per second, or 1,048,576. Just over a million bits per second, basically.

External Dependencies Are the Root of All Evil

Open source software is great except when it isn't.

Update all the dependencies for a new cool software and older software (using older versions of those co-dependencies) suddenly breaks.  

In Windows, we used to call it "DLL Hell" but it has its manifestations in Linux too.

Then it's a cycle of repair and debugging.

Debugging Python - Module Versions

You may get errors in Python programs when you update external module dependencies, as the newer versions may have added some breaking changes - e.g. stronger validation or security checks. 

You can validate the version of the module you are using if __version__ is exposed by the module. To do this, try the following, using the module name required (urllib3 used here as an example):

python
import urllib3
print( urllib3.__version___)

Thursday, 25 June 2026

Introduction to VLSI Systems (Mead & Conway, 1978)

An early textbook on building semiconductor systems. A key learning was the scaling law: "as transistors grow entirely new classes of computation become feasible".

ApplicationData versus LocalApplicationData

Both refer to app-specific storage locations in Windows.

  • ApplicationData - roaming profile data
  • LocalApplicationData - local, machine-specific data
Data in ApplicationData is not automatically cleaned up - and is treated as "important to the user". Data in LocalApplicationData is generally persistent - but Storage Sense can purge temporary files.

The Powerful System.Environment

System.Environment is an all-powerful class.  

It allows interaction with the current environment and platform. It is something to revere when developing intelligent agents that need to navigate the user's environment.

System.Environment.SpecialFolder is a well-known enum.  

It contains the CSIDLs (these are not .NET "things", they are Windows "things"). 

CSIDL = Constant Special Item ID List.  Here are some of the popular values.

Desktop 0  (logical desktop rather than physical file system location)
ApplicationData 26
LocalApplicationData 28
System 37
ProgamFiles 38

A full rundown of CSIDLs is here.

Codex for Windows

Codex is a programming model from OpenAI. It has a Windows desktop application (633 MB download).

Codex is adept at using PowerShell to build software. An example could be the following:

powershell -ExecutionPolicy ByPass -File .\build.ps1

It will also create a Markdown file (README.md) giving a summary of the software including build instructions and behavior (reflecting the instructions/intent expressed by the user in the Codex console).

Tuesday, 23 June 2026

LiteLLM - Gateway to 100+ LLMs

LiteLLM is an open source library that lets you call into over 100 LLMs.

One aspect of calling into lots of LLMs is you have lots of API keys. These are stored in environment variables like OPENAI_API_KEY, ANTHROPIC_API_KEY - you can also feed these as direct arguments in code to LiteLLM.

You can also integrate a secrets manager like AWS Secrets Manager, Azure Key Vault and Google Secret Manager.

Sunday, 21 June 2026

Cut and Paste Metadata in Word

This metadata can conflict with the document's own metadata - creating inconsistent results for example in spell checking, within the same document.

Windows Voice Control

 Some options:

  • Cortana (deprecated, memory heavy)
  • Voice Access (struggles to isolate the "command voice" when there is background noise)
So no infallible options (yet) for Windows Voice Control.

Docking in Windows is a Superpower

Docking was introduced in Windows 7 as Aero Snap. In Windows 11, Snap Layouts and Snap Groups have been added.

Some basic tips - dock one File Explorer on top of another.

  • Windows Key and up - for explorer 1
  • Windows Key and down - for explorer 2

Tuesday, 16 June 2026

Keeping Ubuntu Up to Date

Keeping Ubuntu up to date in WSL is a manual process (unless automated).

Even if automated, you may need a "revert to manual" process if automation breaks (for whatever reason).

Some points:
  • The /etc directory is your friend in all this
  • cat /etc/os-release - needs to be done before and after to check the release has been complete
  • You should upgrade regularly - not least because you need to get the latest security updates
To ensure the upgrade can happen successfully you need to check/edit the release-upgrades file.

sudo emacs -rv /etc/update-manager/release-upgrades

Change Prompt=never to Prompt=LTS (the latter checks to see if a new LTS release is available).

Useful commands:
  • sudo apt update
  • sudo apt full-upgrade
  • sudo do-release upgrade
Don't forget to check os-release for successful install.

Official documentation here.

Process Based Automation

If you have a strong, underlying process, it should be trivial to automate it.

Monday, 15 June 2026

Latest Haskell Compilers

A good, up-to-date Haskell compiler is the GHC

Unlike earlier compilers e.g. Hugs, GHC has support for concurrency and parallelism, including Software Transactional Memory.

There are some language extensions available, including support for the FFI, or Foreign Function interface, which is enabled by default.

The latest Haskell Report on which the current version of GHC is based on is Haskell 2010.

One unfortunate fact about Haskell is poorly maintained external libraries.

What is IFNDR in C++ And Why is it Important

The June 2026 meeting for the ISO Standard C++ group concluded in Brno. 

A key objective discussed was reduction in undefined behaviour (UB) and IFNDR ("ill formed no diagnostic required") scenarios in C++. 

IFNDR is used greatly in the C++ context and refers to a situation where a program is ill-formed but the compiler is not required to generate an error.  This can result in runtime issues.

A website summarised the dangers of UB can be found here.

Thursday, 11 June 2026

RDAP is the new whois

You may see the message on websites "Use of the RDAP service is limited to lawful business purposes only". 

RDAP is the Registration Data Access Protocol developed by the IETF as the successor to whois.

Key difference: 

whois returns free text, RDAP returns JSON, making it machine readable and easier to automate. It also supports RESTful web services, allowing for HTTP based queries, error codes, authentication and access control.

RDAP also supports Internationalized Domain Names (IDNs), which are domain names utilizing non-Latin characters. Languages can include Arabic, Chinese, Cyrillic or Devanagari. As DNS is limited to ASCII characters, an ASCII encoding called Punycode (deliberately designed to rhyme with Unicode) is used for name translation.

All that said, whois is still probably more frequently used than RDAP.

Tuesday, 9 June 2026

C++ 26

The new C++ is C++ 26.  It has been effusively promoted by Herb Sutter.  A lot of new features have already been implemented in gcc - MSVC and Intel C++ need to catch up.

Profiles in C++

Profiles are a relatively new concept from the C++ Core Guidelines.

Their aim is to improve code safety, portability and maintainability.

Profiles are (portably) enforceable rules to achieve a specific guarantee. For example a Bounds Safety profile would force the compiler or static analyzer to flag the following:

int arr[5];
arr[10] = 42;  // out of bounds access - flagged by profile

A presentation by Stroustrup at a Safety Study Group explores this. Herb Sutter also published an interesting paper which refers to levelling up versus Rust.

Monday, 8 June 2026

What is a WEBP file?

WEBP is a file image format created by Google (introduced in 2010) providing both lossy and lossless compression, usually producing much smaller file sizes than JPEG or PNG while keeping similar visual quality. 

WEBP is based on the RIFF (the famous Resource Interchange File Format) container structure.

Thursday, 4 June 2026

Decline of Computer Magazines in the US

Nicely summarised here.

Visual Studio 2026

Visual Studio 2026 is now out. Previous versions are no longer supported.

C/C++ on VS Code

You can edit C/C++ code in VS Code but you need the C/C++ Extension Pack for more features.

gcc on Windows

gcc on Windows can be used from WSL2. 

gcc --version

gives you the version you are using and the operating system.

gcc versions can be found here.

The C ABI

 The C ABI refers to the C Application Binary Interface.

This will differ depending on platform.

Platform specific ABI specifications include:

x64 ABI Conventions

ABI for Unix/Linux

Very important for C/C++ and assembly programmers.

C++ Value Categories

Every Win Joe knows an lvalue when they see one, but there are subtleties.

glvalue
prvalue
xvalue

Recap here (from cppreference.com).

Flags for cl.exe

cl /EHs 

enable C++ EH (no SEH exceptions)

SEH (Structured Exception Handling) is a Windows-specific mechanism for handling system-level exceptions e.g. access violations or hardware faults, using __try, __except and __finally. It is not part of the C++ standard.

cl /EHc

extern "C" defaults to nothrow

Explanation: extern "C" tells the compiler to use C linkage (C-style symbol names, no name mangling), and by virtue of defaulting to "C mode" we don't have exceptions (the C ABI has no concept of exceptions). 

So extern "C" functions therefore  implicitly move from:

extern "C" void foo();

to:

extern "C" void foo() noexcept;

noexcept was introduced in C++11.

Wednesday, 3 June 2026

The Return of C++

The Microsoft C/C++ Optimizing Compiler is making a comeback. 

Building an EXE with a decent UI is as easy as this two step process:

1. Opening "Developer Command Prompt" in Windows (hit windows key and type "Developer..")

2. cl /EHsc mySuperUI user32.lib gdi32.lib

Bye bye heavy frameworks which rely on Windows API functions anyway.

High Touch Vs Low Touch Human in the Loop

Some technologies and programming languages are winning on high-touch vs low-touch HITL systems.  This is largely due to the maturity of AI models - where the high quality training is happening - and probably lots of other factors - but it's a fast moving target.  Competitive advantage lies in the low touch.

AI Obsolesence

Interestingly, the race to build new AI features has made older versions of IDEs (Visual Studio case in point) obsolete at breakneck speed, the requirement to constantly upgrade is such that if you linger on even a slightly older version, the AI you relied on could be non-functional.

Tuesday, 2 June 2026

JetBrains Releases Mellum2

JetBrains (the home of IntelliJ and PyCharm) has released its Mellum2 Mixture-of-Experts coding model, of 12B parameters. 

The model is available under the Apache 2.0 license. 

The model has been published on Hugging Face and can be run locally.

A mixture-of-experts model works via a "gating network" which delegates work to smaller neural networks, the "experts", optimising overall performance. This model also leads to "sparse activation" - which means of all the possible parameters utilised by the model, only a subset are used per input.

Training an MoE model requires training the gating network and training the various "experts".

Monday, 1 June 2026

OpenCode and GLM Models

OpenCode is an open source AI coding agent. It connects to free models and also allows connection to commercial models. GLM models are supported.

C++ 26 is a Work in Progress

The current status of ISO C++ standards can be found here.

Thursday, 28 May 2026

MESI and MOESI

MESI and MOESI are cache coherency protocols to ensure consistent data across CPU caches. The terms are abbreviations for the various states of the cache.

Tuesday, 26 May 2026

Windows 11 Taskbar Icons Resize Dynamically

If you open too many applications, watch those icons shrink in your taskbar.

What is DNSSEC?

DNSSEC uses a cryptographic signature of DNS records to protect domains against forged DNS answers.

DNSSEC stands for Domain Name System Security Extensions, and comprises a suite of protocols to protect against DNS Spoofing, cache poisoning and man-in-the-middle attacks.

A scenario in layman's terms would be an attack that sends a user to a fake copy of your site. E-commerce and SaaS platforms in particular must take care to ensure they use DNSSEC for added protection.

DNSSEC can be skipped for very early stage projects where DNS server settings may change frequently.

Multi-signer DNSSEC is an additional way to implement DNNSEC. An RFC covers this (note that it is not an Internet Standard however), with contributors from Salesforce and Verisign.

Working with Word Templates

Word templates offer a good starting point for documents you may be required to mass-produce e.g. a document explaining IT strategy or architecture for multiple organizations.  However they may not work well out-of-the-box.

Things to look out for:

1. Word templates may do funny stuff with margins.  This is to create interesting and effective custom alignments - particularly for cover sheets. However, you may want to use more standard margins for the broader document if you need a more traditional, essay-style flow for your document.  For this go to  Layout and explore the various Margins, ranging from Narrow, Moderate, Wide up to Custom Margins.

2.Colour schemes. May be garish. Decide if you want to tone down the schemes for ease of printing. Or perhaps go the other way and tone up for maximum impact.

In short, expect to do a great deal of customisation, even if you have a standard template ready-to-run.

Who's that MAC?

Got a strange MAC address connecting to your private Wifi network? 

Find out what kind of device it is using https://maclookup.app/.

The underlying database is regularly updated using IEEE and Wireshark data.

MAC addresses are 48 bits (6 bytes)  long, the first 24 bits are known as the OUI (assigned by the IEEE Registration Authority to the vendor/manufacturer) and the last 24 bits are assigned by the manufacturer. 

Basics of NAT

NAT refers to Network Address Translation.

NAT allows multiple devices in a private network to access the Internet using a single, public IP address. This results in a number of benefits, one being conservation of IP addresses (relevant for IPv4) and hides internal systems for added security.

Routers perform NAT to relay information between connected devices and the public Internet.

What is iptables?

iptables is a command in Linux for maintenance of IP packet filter rules in the Linux kernel. It enables configuration of security policies, control of incoming and outgoing traffic and network address translation (NAT).

iptables is not available in cmd.exe but it is available in WSL2.

A Windows Joe may therefore not have much exposure to iptables in day-to-day administration but should nevertheless have a good working knowledge of NAT and its terminology, as it's a universal networking concept.

Convert a Word Doc into A Presentation (Ad Hoc)

A Word doc can be brought to life as a presentation quite easily.

Go to View in the Ribbon.

Under Page Movement select Side to Side (this changes the display so you can see the flow of the document - it is not strictly needed - but helpful to start visualising flow).

Now under Views, you will most likely see "Print Layout" selected.  Select instead "Read Layout". 

This will start a presentation-mode document presentation.

(There is also a third layout; called Web Layout, which effectively turns your document into a web page - albeit a very messy one in all probability).

Friday, 22 May 2026

The Weird World of OCSP Revocation Checks (Certificate Status)

OCSP, or Online Certificate Status Protocol, enables real-time verification (for clients like web browsers) of digital certificate validity (rather than use downloaded lists of revoked certificates, a la CRLs, or certificate revocation lists). 

It reduces overhead in validation (could be useful in real-time use cases e.g. transaction processing).

Statuses can be "good", "revoked" or "unknown".

Certificate Authorities (CAs) are mandated to track certificates they revoke.

whois under the hood (just basic TCP)

The whois protocol is a very basic TCP-based query-response protocol that gives information on domain names. Unfortunately, it is not installed by default in cmd.exe but is available in WSL. 

It works by opening a TCP connection (SYN, SYN+ACK), query sent, response sent and a close (FIN, FIN)- very basic indeed. It has no mechanism for indicating character set used, and there has been no effort to support internationalisation in that respect. Historically the predominant encoding used has been US-ASCII.

It has no security provisions. Mechanisms for access control, integrity and confidentiality are excluded.

rdap is a modern alternative to whois. RDAP stands for Registration Data Access Protocol.

Content Credentials

Want to know if something was generated by generative AI?  

Maybe try Content Credentials, a scheme supported by the Coalition for Content Provenance and Authenticity (C2PA) with support from Abode, Microsoft, Google, OpenAI and Sony.

Adobe's Creative Cloud website details their support for it here.

Thursday, 21 May 2026

jsDelvr - Free CDN for Open Source Projects

 jsDelvr is a free CDN for open source projects ("fast, reliable, automated"). It is optimised for JS and ESM delivery (not "Enterprise Service Delivery" in this case but ECMAScript modules).

Monday, 18 May 2026

The HTTP 400 Error

The HTTP 400 error translates to Bad Request. It can sometimes be seen when attempting a logon to a website unsuccessfully.

In short, the server cannot process your request - potentially due to malformed URLs, corrupted cookies or outdated DNS data.

You can try flushing the DNS cache as well:

ipconfig /flushdns

which should yield the output "Successfully flushed the DNS Resolver Cache" if successful.

Friday, 8 May 2026

Debugging Web Access Issues with Microsoft Edge

Edge comes with Developer Tools (Control-Shift-I).  

These tools are surprisingly powerful. The tools appear right next to the rendered webpage in the browser.

Suppose you are trying to log in to a service called "Microsoft New Service" but it doesn't work.  The tab text says "Sign in to Microsoft New Service". Open up Dev Tools. Click on Network (the wifi-style icon). 

Now reload the webpage.  

You will see entire flow of HTTP requests and responses. A 200 response is status code OK, a 204 means No Content. In fact, any status code between 200 and 299 is a form of success. 300-399 are redirection messages, and anything about that represents an error.

You may be surprised by the number of conditional access-related HTTP requests that are involved in an authentication attempt.

Why Pre Shared Keys are not Wifi Passwords

It is tempting to think of wifi passwords as equivalent to Pre Shared Keys (PSKs) used in authenticating wifi connections.  In fact, the wifi password is combined with the SSID (Service Set Identifier) of the wifi network to produce a 256-bit cryptographic key.

The Pre Shared Key model is not ideal for enterprise deployments, as anyone who knows the password can decrypt traffic, if they capture the handshake. IoT devices using Pre Shared Keys are also not secure where keys are leaked in plaintext logs. This is why there is a separate WPA2-Enterprise that abandons the PSK model.

WPA3-Personal replaced PSK with SAE (Simultaneous Authentication of Equals) to enhance security, adding a principle of forward security, by introducing unique keys for every session.

Tuesday, 5 May 2026

Protecting RAM

Attacks on RAM are one of the arguments to better protect data in use.

There are various security attacks on RAM. One is malware that can scrape memory e.g. for plaintext credit card numbers (once read into RAM prior to encryption).  Modern systems aim to encrypt data as early as possible in the processing pipeline.

Privileged operators (e.g. cloud admins) can peek into RAM. This is why confidential VMs isolate memory to hide data-in-use from cloud providers. 

DMA devices such as Thunderbolt peripherals can read system memory (and hence potentially sensitive data, from RAM). Modern operating systems restrict "hot-plug" DMA access.

Note: this list of compromise attacks is non-exhaustive. This is a big field of operations.

Microsoft's GitHub

Microsoft's GitHub is worth perusing from time-to-time. Some of the big projects are VS Code and TypeScript but many more additions are made to cover new directions like confidential computing.

Microsoft also have a website (opensource.microsoft.com) detailing their open source initiatives more broadly.  The Microsoft open source blog is also worth reading.

OHTTP

OHTTP (Oblivious HTTP) is an IETF network protocol to enable anonymous HTTP transactions over the Internet. 

Its primary goal is to enable users (browsers, agents, other software) to send HTTP requests without revealing their IP address.

It is defined by RFC9458.

IPv4 vs IPv6

Purpose of IP Addresses and the Problem IPv6 Solves

An IP address (Internet Protocol address) is a numeric label to identify a network interface of a computer or network node participating in a computer network using the relevant IP version.

IPv6 was created to tackle the problem of IPv4 exhaustion.

IPv6 uses 128 bit addresses, yielding an address space of 2^128 possible addresses.   This contrasts massively with IPv4 which is only 32 bits!!

Why is there no Planned IPv7?

The address space of IPv6 is so large that address exhaustion is not a foreseen possibility, and hence no IPv7 is planned at present.

What transition technologies are in play to help move to IPv6?

There are some transition technologies e.g. NAT64, aimed at easing the transition from IPv4 to IPv6.

Apart from Bigger Address Space, what else does IPv6 Bring to the Table?

Apart from bigger size, IPv6 also adds some interesting new features. Learn these.

Thursday, 30 April 2026

Understanding localhost

Everyone has used localhost. But few have explicitly thought about and written down what it really means. 

localhost is a reserved domain name that the OS maps to itself; typically 127.0.0.1 for IPv4 and ::1 for IPv6.

It bypasses DNS as requests to localhost never go out to the Internet. The OS resolves it internally.

Localhost traffic is routed through a virtual network interface that loops packets back into the machine without touching any physical network hardware.

Developers run local servers (e.g. localhost:3001) to test code quickly, safely and without exposing anything to the Internet.

More on the Common Information Model

We have previously mentioned the CIM, or  Common Information Model, in the context of systems management standards. It is effectively an object-oriented schema for classifying objects pertaining to systems management. 

An example schema can be found here (note: there are multiple versions of the schema).

Notes from Microsoft Learn on this topic can be found in Microsoft's WMI SDK notes here.

From an organization perspective, the most important aspect is consistent adoption of a sufficiently descriptive data model, rather than the details of the data modelling itself.

Wednesday, 29 April 2026

The Mesh Network

A mesh network is a type of LAN topology where every node connects (in a flat layout) to as many other nodes as possible. Nodes can then work together to route data as efficiently as possible.

The LM Link Feature in LM Studio

LM Link is a way to connect devices on which LM Studio is installed; allowing you to load models on remote devices as if they were local. Chats remain local and the only thing loaded on LM Studio's backend servers are your device list.  In a way, it's model-connectivity-as-a-service using your own hardware.

LM Link is implemented on top of Tailscale VPN.

Monday, 27 April 2026

WinJoe, Was ist Delta Format? Sitzt es oben auf Parquet?

Delta format (often called Delta Lake) is an open-source data storage layer originally developed by Databricks. 

It sits on top of Apache Parquet and enhances it with database‑like guarantees and metadata management. 

Delta is designed specifically for large-scale data engineering where reliability, consistency, and performance are essential - according to the creators, Databricks,

Big Data's New Vacation Home - The Lakehouse; Microsoft's Approach

The lakehouse concept combines the capabilities of data lakes (which have scalability qualities) and data warehouses (which have advanced query functionality).

Microsoft Fabric's resources on Data Engineering delves into the concept of data lakehouse (and Microsoft's SaaS implementation, OneLake, billed as OneDrive for data)  with notes on how the lakehouse makes use of Apache Spark.

Friday, 24 April 2026

Troubleshooting WSL2 Memory Hogging

WSL2 hogs memory and doesn't release it even when all consoles are closed. Do wsl --shutdown to free up memory.

Why does TypeScript feel a bit C-Sharpy?

TypeScript was created by Anders Hejlsberg, a Danish software engineer, in 2012. He formerly created C# around the year 2000. He is also known for Turbo Pascal and Delphi, both extraordinary products in their time. Deservedly he is a Microsoft Technical Fellow (a list of whom appear here).

Types in TypeScript

The basic types are called primitives: 
  • boolean
  • number (which represents integers and floating points)
  • string  
There is also:
  •  BigInt (ES2020+) to represent whole numbers larger than 2^53 -1, and
  •  symbol to create unique identifiers
Starting with ES2015, symbol is a primitive type, whose values are created by calling the Symbol constructor.

Examples:

let sym1 = Symbol();
let sym2 = Symbol("keyname");

Symbols are immutable and unique, which can result in what may be initially feel like strange behaviour, but on reflection makes sense.

let sym2 = Symbol("key");
let sym3 = Symbol("key");

sym2 === sym3; // triple equality - false, Symbols are unique.

Node Version Manager - Strongly Recommended

The Node version manager, nvm, is strongly recommended to manage your version of Node.js and npm. 

It also allows switching between various versions of Node (Nodejs and npm) for testing purposes. 

As per official docs, nvm is designed to be installed per-user and invoked per-shell. It works on "any POSIX compliant shell" - including on Unix, macOS and WSL.

Once you install nvm (by wget'ing the installation shell script and piping it to bash) you can restart WSL and start using nvm.

Some nvm commands to know:

nvm install node   # install latest version

nvm install --lts     # install latest LTS version

nvm use node        # switches to latest version

nvm use <version>    #switch to a specific version

To see all Node versions, do nvm ls.   Node uses semantic versioning, following the pattern MAJOR.MINOR.PATCH.

nvm ls shows the version active in shell in blue, and installed versions in green. Yellow are versions referenced by aliases but not installed.

Installing a Transpiler

Do install a transpiler in WSL as follows.

sudo npm install -g typescript

The -g option to npm install is short for --global and means install the said package globally (global npm directory) as opposed to the local node_modules folder of a project.

Binaries are then also exposed on your PATH, so you can run tsc conveniently.

Note that you need an up-to-date installation of Node to run TypeScript. If not, some of the modern operators (e.g. null coalescing operator) will not work when running tsc.

Dawn of the Transpiler

The term "transpiler" (referring to a source-to-source translation tool, or "translating compiler") gained popularity around 2013 with the proliferation of translators from TypeScript and other abstractions (CoffeeScript, Dart) into JavaScript.  

JavaScript at the time was becoming a "universal runtime".

Babel is a popular transpiler. tsc is the official transpiler. It can be installed via npm.

Thursday, 23 April 2026

Downsampling from a Data Science Perspective

Downsampling in data science and data processing is as follows (this excludes the DSP, or digital signal processing, technical definition of downsampling - which is similar in spirit but differently defined).

Downsampling involves reducing the number of data points in a data set to enable comparability (sometimes referred to as "balancing the data").  This helps machine learning models avoid bias towards a dominant class.

Various approaches to downsampling (e.g. random downsampling) are described in this IBM article.

Scala, Scala, Everywhere

For legacy observations on Scala, check out JVM stuff.  Here we build a fresh relationship with Scala.

Scala is a strongly statically typed language supporting OOP and functional programming.  Strong static typing means it avoids implicit type conversions when calling functions and other scenarios.

A good starting point for learning Scala is scala.dev here.

Apache Spark (and its roots in Scala)

Apache Spark is a foundational layer underlying many data platforms. 

It is written both in Java and Scala. Read the source code here.

A good starting point is SparkSession.scala.

One of Spark's "selling points" is "Exploratory Data Analysis (EDA) on petabyte-scale data without having to resort to downsampling" (see detailed post on downsampling). 

A petabyte (PB) holds 1000 terabytes (one thousand million million bytes).

The Apache Incubator

The Apache Incubator services projects seeking to enter the almighty Apache Software Foundation. Projects (called "podlings") are "ingested" and become subject to Apache-style governance and operation.

The name Apache was taken from the Apache Indian people, a Native American tribe known for their warrior spirit and inexhaustible endurance, and was first used in the context of the cross-platform Apache Web Server (launched in 1995; despite being cross-platform most instances run on Linux distributions).

Wednesday, 22 April 2026

Qwen Series of Models

The Qwen series of models comes from Alibaba Cloud.  The Qwen 3.5 models, released in early 2026, has set new records for sub 2B models. It is much smaller than gpt-oss.

Compile to WASM - The Emscripten Toolchain

Emscripten is an open-source compiler toolchain to Wasm. C/C++ (or any other LLVM-supported language) can be compiled and run on the Web, Node.js or other Wasm runtimes.

WebAssembly Not Automatically Blocked by Browsers

WebAssembly is a type of code designed to run in modern web browsers.  It is designed to run alongside JavaScript using WebAssembly JavaScript APIs - creating an option for performance critical functionality.

As WebAssembly increases the browser's attack surface, so browsers contain WASM inside the browser's sandbox and restricts system access. 

A risk maybe breaking out of the sandbox. Adobe Flash was a product sandboxed after a bunch of exploits, and after sandboxing exploits still occurred.

Transmission of WASM does not require TLS, HSTS or any other transport layer security mechanism making it susceptible to man-in-the-middle attacks.

Integrity checking is also impossible as WASM modules need not be signed by the author.

Some security-focused browser configurations can block WASM.

An Insider Look at CPython: The "Compiler-Interpreter"

A run-of-the-mill Python programmer may not necessarily think about CPython on a day-to-day basis. 

But CPython is an interesting thing to think about.

It is the reference implementation for Python, written in C and Python. C was used in theory to make portability easier - it's also more efficient (so there's no C++ or STL in there).

CPython is both a compiler and an interpreter. Python code is compiled (into bytecode) before being interpreted.  So you can think of it as a "compiler-interpreter".

One (potentially) painful feature of CPython is the Global Interpreter Lock (GIL) - and the GIL is used on each interpreter process - which means effectively only one thread can run at any one time (more explicitly, only one thread can process Python bytecode at any one time). While this simplifies the implementation, it becomes a bottleneck for CPU-intensive tasks.

Concurrency can be achieved by having multiple Python processes (which have by extension, multiple interpreter processes) and enable inter-process communication.  The Python multiprocessing module aims to make this paradigm simpler to implement.  This is however not available on mobile platforms or WebAssembly platforms.

Thursday, 16 April 2026

UTM is Urchin Tracking Module

UTM is something you may come across first in URLs. 

UTM refers to Urchin Tracking Module, named after Urchin, the firm Google acquired in 2005 to form the basis for Google Analytics.

  • utm_source denotes a tracking parameter in a URL - to denote where traffic is coming from
  • utm_source=google indicates traffic came from google
  • utm_source=email traffic came from an email
Google Analytics alternatives such as Plausible have been built which follow the UTM convention.

Saturday, 4 April 2026

TypeScript in CodePen

Can you do TypeScript in CodePen?  

The question is valid as CodePen reveals three containers, one for HTML, one for CSS and one for JavaScript, in its default interface.

To enable TypeScript input, go to Settings, select JavaScript preprocessor and choose TypeScript. Other available preprocessors are LiveScript, CoffeeScript (billed as a "simple and elegant way" to write JavaScript) and Babel.

Note that CodePen will run TypeScript without type-checking errors blocking execution.

Friday, 3 April 2026

Bun - The JavaScript Runtime used by All (Cool Cats)

Bun is a fast JavaScript runtime. It's website is bun.sh (where the suffix sh denotes a St Helena domain). Bun is built from scratch to "serve the modern JavaScript ecosystem".

A major selling point of Bun is it starts fast and runs fast. It extends the performance-minded JS engine built for Safari known as JavaScriptCore. Fast start times leads to fast apps like Claude Code CLI.

Bun also boasts "cohesive DX" (developer experience) with a package manager, test runner and bundler all included.

Design-wise it has been designed to be a drop-in replacement for Node.js. Thousands of Node.js and Web APIs have been implemented in Bun like fs, path and Buffer.

Bun's ambition is to run most of the world's server-side JavaScript.

CodePen

CodePen is a web environment to experiment with front-end code.

Thursday, 2 April 2026

Inside the Claude Code CLI

On 31 March 2026, Anthropic's CLI tool Claude Code that lets you interact with Claude for software engineering tasks from the command line - edit files, search codebases, manage git workflows and more - had its src directory leaked revealing TypeScript code with UI written in React and Ink (React for interactive command-line applications). It uses the Bun runtime - a fast JavaScript, TypeScript and JSX toolkit.

Wednesday, 18 March 2026

PowerShell Inspired Installations using iwr

iwr is the short form for Invoke-WebRequest which can be used in PowerShell via its aliases as iwr, wget or curl.

npm and pnpm - the differences

npm, the Node package manager, can be incredibly disk-inefficient. pnpm was created to be (literally) a "performant npm" sometimes also called "painless npm".

The difference lies in each others' ability to store packages. 

npm duplicates node_modules per project, resulting in a huge disk footprint, whereas pnpm uses a global store and stores links to the same, resulting in 70-90% space savings.

node_modules is a directory in a NodeJS project storing third-party libraries and dependencies.

Tuesday, 17 March 2026

TypeScript for Java and C# Programmers

There is a good tutorial here and also a basic (W3schools) one here.

An important point to note is that while TypeScript adds static typing to JavaScript, the underlying runtime is the same as JavaScript.

Recall that with static typing, the type of every variable and expression is checked before the program runs.  This enables errors to be caught at compile-time rather than run-time (in dynamic typing, by contrast, types are enforced only when code executes).

TypeScript is not a "mandatory" OOP language, in the same way as Java or C# (wherein the class is the basic unit of code organization - all data and behaviour is contained in a class). In JavaScript, and by extension TypeScript, this constraint is not present.  Functions can live anywhere. Avoiding OOP hierarchies where possible tends to be the preferred programming model.

In the spirit of not mandating classes for general programming, static classes are unnecessary in JavaScript. Singletons are also generally not used.

Monday, 16 March 2026

LoRA in Real Workflows

LoRA, or low-rank adaptation, is a fine-tuning technique for LLMs (one of many disparate techniques). 

The idea is to inject low rank matrices into large pre training models.

Recall that the rank of a matrix A is the dimension of the vector space spanned by its columns. This in turn corresponds to the number of linearly independent columns of A.

So LoRA is essentially a dimensionality reduction of the column space of parameters to ease off compute.

Books and Resources on AI Engineering

Apart from staying up to date through websites there are a number of good books on AI Engineering. Here is a recommended reading list.

AI Engineering, Chip Huyen (2025, O'Reilly) - really good book on building systems on top of LLMs. Chip's Github is here.

Hands-On Large Language Models, by Jay Alammar and Maarten Grootendorst (O'Reilly) - uses Python to convey an understanding of how LLMs operate under the hood, covers similar ground to AI Engineering - definitely worth reading. It has quite a few text processing canned examples which are quite interesting.

Mathematics for Machine Learning, by Deisenroth et al. - not as directly connected to AI Engineering but good at explaining some of the underlying maths of ML intuitively (and in somewhat long winded fashion - at least from an engineering perspective).

OpenAI's Open Source Tokeniser

OpenAI has created a Python package called tiktoken which is a BPE tokeniser.

Tokenising is something that's needed by chat interfaces (and other applications: compiler, interpreter etc.) to break text into tokens.

BPE stands for byte-pair encoding. It was described in 1994 by Philip Gage and a modified version is used in LLMs. The original algorithm is a clever compression technique replacing the most frequently occurring pair of bytes with a new byte not in the original data set, and uses as lookup table to recreate the original text. A modification extends this technique into tokenisation.

Sunday, 1 March 2026

Lambda Calculus and System F

The lambda calculus is a theory that treats functions as formulas or expressions. 

Arithmetic is another example of a language of expressions.  

In arithmetic, you have variables (x,y,z..), numbers (1,2,3...) and operators (+, - ...). x+y then denotes the output of applying the addition operator to x and y and this can be extended to more complicated expressions. 

Lambda calculus extends this concept to functions. 

If we define a function f mapping x to x squared; then consider A = f(10); then in the lambda calculus we simply write A = (lambda x. x^2)(10). The expression (lambda x. x^squared) stands for the function that maps x to x squared rather than the statement that x is mapped to x squared.

One advantage of the lambda calculus, is it allows us to easily consider higher-order functions, i.e. functions with functions as inputs and/or outputs. 

An example is the expression f maps to f.f which takes the function f and applies it to the function f, the composition of f with itself. In lambda notation we write (lambda x.f(f(x)) and the operation that maps f to f composed with itself is (lambda f . lambda x. f(f(x)). You can see this is easy to extend to triple composition, and so on.

Technically speaking, lambda calculus is Turing-complete, that is, it is a universal model of computation that can be used to simulate any Turing machine.

Now lambda calculus can be typed or untyped, typed is more restrictive - we say it is weaker than untyped lambda calculus. In untyped lambda calculus we are flexible about domains and codomains. For typed calculus we have simply-typed - where we specify the type of every expression and polymorphically typed, where we have types of a specific form X->X but we don't specify the type.

System F is a form of polymorphic lambda calculus.

System F formalizes parametric polymorphism in languages. In so doing, it forms a theoretical basis for languages like ML and Haskell. 

System F was discovered independently by logician Jean-Yves Girard (1972) working in proof theory, and computer scientist John C Reynolds, who held positions at Edinburgh University, Imperial College and Carnegie Mellon.

The ideas aforementioned stemmed from interest and investigation in the 1930s into what does it mean for a function to be "computable" - in other words, have results derivable using (in principle) pencil and paper only.