# Compete, Create, Convert and Replace

Contents

Two weeks ago I set myself an artificial deadline for today for a bunch of things to be done. Those things at the beginning of Wednesday included a number of things that are done, and several which were not.

The progress this week has been solid. A lot of the work that I’ve been doing in the last several weeks has started to fall into place. Unfortunately, by doing so it has exposed a few annoying data errors already, which I’ll have to deal with, but that’s all in the game…

Of the list of things I set out to get done before today, I got a exactly half done. This isn’t failure – as I’ve mentioned before, I like setting lists of goals up such that getting to 50% is ideal, and anything beyond that is amazing. Also, of the half that didn’t get done, every single item is most of the way there, just not done, per se.

I haven’t discussed much about what I’m actually doing on here so far. And for a little while longer I’ll be cagey about the details, but it is no secret that a few months ago I founded a company to try and address a number of problems related to climate change.

But yeah, as of yesterday, I have a frontend that is “demo-worthy”. I’ve also made a lot of backend progress. After this mad rush though, I need to focus a bit on the business end of things in the coming week, so the next sprint will probably be less tech focused and more about figuring out the market better.

One thing I can say now is that my company got into the finals of the Gulleggið competition, which awards 1Mkr (~€7000) in prize money for the “best idea”. The finals have the top 10 out of 81 applications this year. It might not be a huge competition in the grand scheme of things, but proving an idea to be valid happens on a great many levels and this is a challenge I intend for us to win.

## jai-crypto updates and annoyances

I found some free time and updated the jai-crypto library for version 0.1.004 of the compiler and adding support for HMAC-SHA256, which I needed support for for a thing.

I will say, I’m somewhat frustrated at old me for how the library was designed, in particular the SHA-2 suite of functions. It kind of made sense at the time, and might even have been a bit clever, but now there is an endianness issue that gums up the works.

The other thing is that I made the Merkle-Damgård construction be a function that was called externally, which leads to a memory allocation where none should really be needed. Eliminating that would be good.

I’ll probably fix these things eventually, as well as complete the support for AES and EC25519 that I had started making almost two years ago now.

## Unit conversions

Converting between arbitrary units can be a bit of a pain. Either you come up with a table manually and just do the most basic conversions, or you end up also implementing a pretty powerful calculator with a “type system” of sorts, but compound types can mutate and … oh, the fun. Aside from GNU Units, I know of no good software that does these things.

I guess that for what I’m doing I might need to integrate GNU Units, but I need to be careful how I do that so I don’t end up violating the AGPLv3, because the system I’m working on is not (unfortunately) going to be free software, at least for now, even though I’m releasing a lot of the libraries I build in the process as such.

## Mission: Replace Django

I’ve been looking at what is needed to get rid of Django for my web API. While it’s only really a few small things, some of those things also require things. And there are some conveniences that would be nice to have.

Very importantly, I am not focusing my work on this right now. It’s not on the critical path at the moment, although either committing to Django or replacing it will be on the critical path sometime in the next 3-5 months. However, it is fun to work on this, because the notion of replacing large systems with smaller, simpler systems that incidentally run significantly faster is just delightful.

It’s worth saying that this isn’t a criticism of Django per se. I have used it very effectively for over a decade, and while it isn’t perfect, it’s had a great track record of being good software that keeps up with the times and remains true to its ethos of serving “Perfectionists with Deadlines”. It just doesn’t do what I need it to do for this project. While I could just build everything I need for it to fit my needs, I need to write most of that stuff for the processing backends anyway, which need to run super fast, so it would mean a lot of duplication of effort. It’s simply more practical to build a few features up front in the same language the processing backends are going to be in.