Match it again Sam

Implementing a structural regular expressions engine for x/fun and.*/ v/profit/

If you have you ever looked at regular expressions and thought "gee, these sure are useful but I wish there was more going on", then do I have a blog post for you!

OK, hear me out. I promise there's some fun stuff in here that's worth a look. It might only be worth an "oh god why?" kind of look, but worth a look none the less.

Allow me to introduce you to the delightful world of structural regular expressions.

xkcd perl Obligatory XKCD.

Read more  ↩︎

Socrates is a state machine

"All men are mortal, Socrates is a man, therefore Socrates is mortal."

Or, "Writing sans I/O APIs by abusing Rust's language features"

If you've ever looked into how Rust Futures work you've probably read at some point that async/await syntax de-sugars into a state machine. If you like to poke at things to see what happens then you might also have wondered if this fact can be abused to instead write other sorts of state machines like, oh I don't know, the state machines you might need for implementing a sans I/O network protocol API.

Does this work? → Yes.

Does this constitute "crimes"? → Also yes.

Am I a little bit too happy with how this turned out? → Maybe...

Read more  ↩︎

the subtle art of winging it

Or, "How I learned to fuck around and find out"

I have a bad habit of telling people that I like to have interesting problems to work on. On its own this isn't so bad, but saying this in interviews quickly ensures that your day-to-day involves being air dropped into weird and wonderful situations with varying amounts of context and high expectations.

So, how do you get better at coping in this sort of environment?

Read more  ↩︎

the origin of ad: an adaptable text editor

As is probably the case with a lot of programmers, I've been searching for my "ideal" text editor for programming for quite a while now. Over the years I've picked up, configured and moved on from a long list of editors and IDEs so it was only really a matter of time before I found myself wondering how hard it would be to write my own from scratch one rainy afternoon.

Spoilers: turns out it's actually a fair amount of work. Who knew.

Read more  ↩︎

Where did Penrose come from?

In 2020 during lockdown at the height of the COVID-19 pandemic I (like so many others) found myself with a lot of time on my hands. A lot of people decided to take up a new hobby, maybe do some work on their house or perhaps get a dog.

Me?

I decided to write an X11 tiling window manager.

Read more  ↩︎