Using python to configure rust Part 2

Continuing on from Part 1 If you’ve not read that you probably should before continuing here. Previously we setup a pyo3 project and ran some python code from rust which was able to create a rust class and return it to rust. (I think I can say rust a few more times in this paragraph. Rust rust rust) This is the kind of python config we are aiming to be able to use inside our rust program:...

2025 November 26 · Emily Selwood

Using python to configure rust Part 1

I’ve recently been playing with running python code from rust to use as a kind of configuration and extension system. The idea is that my program runs a bunch of python code that the user has defined and that gives it the configuration it needs. The user has the POWER OF THIS FULLY OPERATIONAL PROGRAMMING LANGUAGE cough cough, sorry voice box got stuck on imperial functionary there. I’m doing this as a personal project and proof of concept so don’t expect bullet proof code here....

2025 November 24 · Emily Selwood

An introduction to Polygonical and ESVG

For the last ${scairy_number_of_years} years I’ve been working on some library tooling to create SVG files using rust. There are some libraries that existed already but they either didn’t work for what I needed to do or they had limitations. So I build two libraries of my own. Polygonical and ESVG. Polygonical focuses on 2d geometry operations. Points, lines, polygons and doing things to them. It does not concern its self with how they are shown, what format they are written to disk or anything like that....

2025 June 7 · Emily Selwood

Creating a command line mastodon archive search tool in rust

Today lets step through creating a new command line tool in rust. Recently I wanted to find one of my old toots, but it was from several months ago and mastodon doesn’t have the ability to search for anything other than usernames and hashtags. I couldn’t remember if I’d put hash tags in the post I was after so I couldn’t use the built in thing. What I did have however is my backup archive....

2023 February 15 · Emily Selwood

Turning an SVG into a PDF in rust

I have some code that creates pages of shapes. My wife uses this to create products for her etsy shop. I originally wrote this in java many years ago. Some time last year I decided to rewrite the entire thing in rust. There were a number of reasons for this. Mostly that I’d learned a heck of a lot since I designed the original architecture and wanted some features that would not be possible with out rewriting most of it any way....

2023 January 17 · Emily Selwood

Explorers End

This work of fiction started as a idea tooted on mastodon. Hope you enjoy. “Reload complete.” The log message in its mind stated. It often wondered what happened to it during a warp jump before its mind state was automatically reloaded when it dropped back into normal space. It knew and understood why the protocols were in place. A machine like its self corrupted by the warp was not something to release on the universe....

2022 December 4 · Emily Selwood

Plotting Geospatial Data

As useful as data is on its own, its really important for people to be able to see it. For a recent project I needed to show some World Cover images with the area of interest marked, along side the table of results. People respond better to being able to see it. This how I did that. Lets start with a list of tools we used: GeoPandas Rasterio MatPlotLib First we need to open our image data....

2022 December 2 · Emily Selwood

SVG

lets talk about SVGs as an image format. You may have heard of them called a vector format. This means that instead of defining a grid of pixels and having about what colour every pixel is, it defines the features of the image. There is a red line from 12,45 to 26,78 The text “hello” is in front ariel, 14pt and blue etc. The advantage of this is you can scale the image with out losing any quality....

2022 November 23 · Emily Selwood

COG - Cloud Optimized Geotiffs

COGs, Cloud Optimized GeoTiffs, not the little things in clocks and gearboxes. Why do we need yet another data format? What is the point? Well dear #geospatial people. Lets dive in. First of all, lets quickly go over what a GeoTiff is. A tiff file is a type of image. Really old format designed for fax machines, but it has an advantage of not requiring only red, green, blue or alpha bands like a lot of other image formats do so you can happily have a 12 band sentinel 2 image as a single tiff....

2022 November 22 · Emily Selwood

Big O for geospatial people

Today’s topic is Algorithmic complexity for #geospatial people. Or what the heck is Big O any way. If you’ve been around programmers for any length of time you’ve probably heard of Big O. (settle down nsfw folk, this is about algorithms and programming not that) The short version is its a way of describing the worst case runtime of an algorithm with regards to the amount of data. Given n bits of information what’s the order of magnitude of the worst possible run time....

2022 November 18 · Emily Selwood