RSSAmplifier

Blog

blank

sim642.euRSS feed ↗24 posts

Latest posts

A cute challenge with OCaml’s polymorphic variants

While refactoring an OCaml project, I wanted to deduplicate some code, although it was not obvious whether that would be possible. To illustrate the situation, I have extracted the following cute challenge from the project.

Simmo Saan otsib probleemidele lihtsaid ja elegantseid lahendusi 🇪🇪

Aprillis kaitses Simmo Saan oma doktoritööd „Correctness witnesses for thread-modular program analysis“ („Lõimeviisilise programmianalüüsi õigsustõendid“, juhendaja programmeerimiskeelte kaasprofessor Vesal Vojdani). Küsisime, kuidas Simmo teekond teadusmaailmas on kulgenud. Milline on sinu arvates kõige levinum eksiarvamus doktorantuuri kohta? Olen kuulnud arvamust, et doktorantuuris nokitseb…

Times with math: newtx vs Termes

The Institute of Computer Science at the University of Tartu has a LaTeX template for PhD theses. The same template is also suggested by the University of Tartu Press for non-Word users. One major requirement from the press is the use of Times New Roman as the text font.

DOI to Bib(La)TeX – a misery

My PhD-thesis–to–be combines 8 papers from the last 5 years. Their Bib(La)TeX bibliography entries come in a wide range of quality and style. I would like some consistency but it’s quite an effort to achieve across 234 entries. So I was wondering if there’s any good quality and consistent source from where I could (hopefully automatically) update their data via their DOI.

Scraping barcodes with suffix trees

Estonia has a deposit-refund system for drink bottles and cans (like the German Pfand). It is operated by Eesti Pandipakend whose website includes the package registry1. The registry isn’t just a list of all products whose packages are part of the system but rather a search. They call it the packaging register, but that’s a bit of an odd translation of the Estonian term pakendiregister. ↩

Securing applications with oauth2-proxy on Synology NAS

A Synology NAS can be convenient for hosting various Docker-based applications for personal use. Some applications have authentication built in, but others don’t. The latter approach is not unreasonable: it doesn’t make sense for every application to include its own custom user management and authentication.

Highlighting parts of lines in minted

To repeat, I prefer to use the minted package for typesetting syntax-highlighted code in LaTeX. For example: \begin{minted}[linenos]{c} for (int i=0; i < 100; i++) { printf("i = %d\n", i); } \end{minted} This is rendered as:

Referencing lines in fancyvrb/minted

I prefer to use the minted package for typesetting syntax-highlighted code in LaTeX. Occasionally it is necessary to refer to a particular line of code by its number in the accompanying text. Of course one can just hard-code the line numbers into the text, but that’s not very TeX-like. This becomes very error-prone when the code needs to be modified and all hard-coded line number references…

Trends in UniTartuCS theses

The Institute of Computer Science at the University of Tartu (UniTartuCS for short) has a (new) register for bachelor’s and master’s theses. Out of curiosity, I have done some data analysis on these theses and in this post I will present some results.

My (not-so-great) experience with switching Android phones in 2025

In the beginning of February I switched from my old Samsung Galaxy A52 to a new Samsung Galaxy S25+, which was just released. One can find endless complaining online about how the S25 series isn’t worth it, which might be the case for someone coming from S24 series. However, I’m doing a 4-year leap from a mid-range phone that has become genuinely problematic: There’s a well-known issue with the…

Shifting dates and times when resetting a Moodle course

When resetting a Moodle course for a new year/semester, it can be very tedious to update the availability and due dates for all activities/assignments/etc in the course. Moodle (supposedly) provides a convenient way to do this:

Clickable, breakable, colored &amp; underlined URLs in LaTeX

Requirements

TP-Link cannot get IPv6 firewall right

What led to two of my recent posts is TP-Link’s inability to get IPv6 firewall right on their routers.1 The insecurity of TP-Link routers has recently come to broad attention: [Chinese routers to be banned in the US also widespread in Estonia][err-article]. ↩

Tailscale HTTPS certificate on Synology NAS

I recently discovered [Tailscale] for setting up a private VPN. My main goal was to use it for accessing my Synology NAS at home from anywhere in the world. So far I had kept my home NAS publically accessible from the internet, which had been fine but risky nevertheless.

Firefox HSTS bypass

HSTS is a mechanism to force browsers to use HTTPS instead of HTTP to connect to a site. The intention being that an attacker cannot replace it with an insecure version.

Springer anti-typesetters, part 2

This post continues the Springer typesetting saga from part 1 on a pair of papers in March 2024. We had two papers (Saan et al., 2024; Saan et al., 2024) accepted into the same conference proceedings and they were edited very differently. The following compares our submitted camera-ready version with the many proofs from Springer typesetters.

Springer anti-typesetters, part 1

This post describes (only some) of my frustrations with Springer’s typesetting of one paper (Saan et al., 2024) in December 2023 and was also written around that time, but not published. It compares our submitted camera-ready version (which is very similar to the nicely-formatted arXiv version) with the proofs from Springer typesetters.

Automata-theoretic approach to regex crosswords

This post documents my automata-theoretic approach to solving regex crosswords, which is unlike other approaches out there (see Related work below). The biggest limitation of this computer science theory approach is that it only works for truly regular regexes (so no capture groups, look-aheads, etc). I have implemented it in Java using the dk.brics.automaton library.

Error in Conway’s “Regular Algebra and Finite Machines”

I was following “Proof Pearl: Regular Expression Equivalence and Relation Algebra” (Krauss & Nipkow, 2012) to implement a regular expression equivalence checker in OCaml to validate it as a project idea for my “Advanced Topics in Automata, Languages and Compilers” course.

OCaml linting tools and techniques

Recently (but also 3 years ago), I was interested in finding all catch-all exception handlers in Goblint, which is written in OCaml, in order to prevent “uncatchable” exceptions from being caught and accidentally swallowed. “Uncatchable” exceptions are those which should not be ignored, e.g. Out_of_memory. My first attempt was using a Semgrep rule, but it turned out to be too buggy to reliably do…

OCaml dependencies lower-bounds CI

When submitting OCaml packages to the opam package repository, opam-ci runs extensive checks on the package submitted by the pull request. Most of these checks are very standard, involving building and testing the package on various OCaml versions, Linux distributions and OCaml compiler variants. In addition to all of that, there are checks called “lower-bounds”.

Training git rerere

One advanced git feature is git rerere, which helps with resolving the same merge conflicts multiple times, e.g. when regularly rebasing a branch. In short, when activated, git will record the conflicts before and after you manually resolve them. During future conflicts, it will automatically try to apply the recorded resolutions, so you don’t have to manually resolve the same conflict again,…

Program source code as machine learning data

This blog post is part of my project in the Neural Networks course at University of Tartu.

My GitHub Mars 2020 Helicopter Contributor badge

On 19 April 2021 I saw a link titled “Mars 2020 Helicopter Contributor” on /r/programming. It’s a blog post by Daniel Stenberg, the lead developer of curl, about him getting a special badge on his GitHub profile because curl was used for the Mars 2020 Helicopter Mission.