/images/avatar.jpg

What's inside the Klein Bottle?

Random wanderings in the abstract world of mathematics and beyond

Help, my paths aren't smooth

For a little over three years at this point, I’ve been working on a project called Datasig. This is a combined effort between several groups at different universities and institutions in the UK aimed at making the tools and techniques from rough path theory available for data scientists. So what on earth is a rough path? It has taken me a very long time to understand what exactly is a rough path, and how they might be useful to data scientists.

Learning With Matrices

Recently I was talking to a new software engineer who is trying to learn Rust. They felt like they had a good grasp of the basics and wanted to write a small application to test their skills. My suggestion was that they code up a matrix struct (and later, a trait) that encapsulates the behaviour expected of a general matrix. This seemed like quite a fun task, so I had a go too.

Making a Mockery of Coding

Lately I’ve been writing a lot of library code for working with streams of data to expand the esig package for Python. This is a Python C++ extension that acts as a bridge between the low-level C++ library libalgebra where computations happen and the Python world where people tend to work with data. The gap between static (compiled) types of libalgebra and C++ templates and the dynamic (runtime) types of Python is about as large as it can be, and ultimately this relies on a giant switch statement and some careful encapsulation.

My Algebra Is a Little Rusty

On of my main responsibilities in my job as a research software engineer is maintaining and developing a C++ library for computing in abstract algebraic objects called libalgebra (link). This is a mature and fairly complete library in terms of its capabilities, and it has excellent support for the tensor algebra and Lie algebras. However, it was mostly written a long time ago, and it doesn’t take advantage of more recent features of C++ (even those in C++11).

Small Update on Infrastructure

Last year I stopped using Wordpress and move to using a static site generator (Lektor) to manage my website. I’ve been fairly happy with this choice, even though I’ve hugely neglected my blog over the past year. This is something I hope to rectify. The biggest problem I had was that the design of the last attempt was terrible. I am not blessed with good design talent, so my attempts to make a website inevitably failed to make something that functioned properly and didn’t look terrible.

Rusty bit Sudoku solving

Recently I’ve been doing a lot of Sudoku puzzles, following the discovery of the Cracking the Cryptic YouTube channel. I’ve always enjoyed Sudoku and they have served to entertain me during long journeys for many years. However, I’d never encountered any of the newer variants of the original puzzle such as “chess Sudoku” or “thermo Sudoku”, where the placement of a value is restricted based on what values are within a standard chess move or the position on a “thermometer”.

New start with a different twist

I’ve been thinking recently about moving my blog from being hosted as a Wordpress site and instead deploying a custom made app using Python behind the scenes. My first idea was to try and build a Django app, built completely from scratch, which made for some interesting experimentation. Unfortunately, I quickly realised that the limiting factor in building a new website from scratch was not my skill at writing Python code, but in making the html templates to make the page look the way I want.

Formatting Matrices from Numpy to LaTeX

LaTeX is a great tool for producing high quality documents, but it can sometimes be rather cumbersome for producing things like matrices, which hold large amounts of information in an array with many rows and columns. This is made especially frustrating when the matrix you wish to format has been computed using Python and Numpy, and is right there on the PC. I thought that writing a small Python function that formats a Numpy array into LaTeX syntax would be a nice, easy exercise in the Python course (for first year mathematics students) that I teach.

Grant Applications and the EPSRC

I recently attended a workshop on the grant application procedure ran by the Engineering and Sciences Research Council (EPSRC). The EPSRC is one of several UK research councils and is responsible for funding research across engineering, science, and mathematics through a number of grant and fellowship schemes. I went to the workshop with many questions, and misconceptions, about the grant review process and how funds are allocated. I’m happy to say that I learned a lot, and most of my questions were answered.

The napkin ring problem

I heard an interesting thought experiment on a podcast some time ago, but I am not sure of the origins of the problem. This problem is the napkin ring problem. Despite hearing this problem some time ago I have only just found time to convince myself that it is true, surprising as it is. I thought I would share the solution since it is a lovely application of multiple integrations. The problem is as follows: