Digital identities and what they mean for the web have become a hot topic of discussion in the last few years. They have also brought many controversies: age verification laws and what they mean for online anonymity, Wikipedia potentially having to verify the identify of its users in the UK, the reliance on official iOS and Android operating systems as mandatory form factors for digital identity…
This Sunday – incidentally on International Women’s Day – Swiss citizens will vote on an initiative about taxes for married couples: if it passes, married couples with tax residence in Switzerland will file taxes individually rather than jointly. The rationale behind this proposal is that married couples currently pay a different level of tax than if they weren’t married, due to how the tax…
This week-end project started by browsing the open-data repository of Paris’ public transport network, which contains various APIs to query real-time departures, current disruptions, etc. The data reuse section caught my eye, as it features external projects that use this open data. In particular, the RATP status website provides a really nice interface to visualize historical disruptions on…
This post is the second part of my adventures to optimize a Rust workload running on multiple threads. In the first post, I explored how the rayon parallelism framework works, and explained how I designed a faster replacement for my use case.
In a previous post, I’ve shown how to use the rayon framework in Rust to automatically parallelize a loop computation across multiple CPU cores. Disappointingly, my benchmarks showed that this only provided a 2x speedup for my workload, on a computer with 8 CPU threads. Worse, the total “user” and “system” times increased linearly with the number of threads, meaning potentially more wasted work.…
Writing const functions has been supported since Rust 1.31 in 2018. These functions can be evaluated at compile time, which is for example useful to shift expensive calculations before the program runs. Knowing values at compile time is also necessary for const generic parameters, a feature available since Rust 1.51 in 2021.
Many discussions about open source dependencies and maintenance happened in the last month. Two posts caught my eye in the Rust ecosystem: Sudo-rs dependencies: when less is better about the Rust rewrite of sudo trimming its dependency graph, and On Tech Debt: My Rust Library is now a CDO about a Rust package being flagged as unmaintained, triggering complaints across downstream projects failing…
It’s been almost 8 years since I started this blog, and 3 years since my last behinds-the-scenes post when I had to reinstall my website due to a datacenter fire, so it’s high time for another update. In recent years, I decided to finally add a dark mode, which browsers have now supported for 5 years. However, this was easier said than done, as I first needed to inventory all the colors defined by…
In this blog post, I’m announcing STV-rs, a Rust implementation of Single Transferable Vote (STV) algorithms. STV is a voting method that allows voters to rank the candidates, with an iterative counting process that automatically re-distributes votes when candidates get elected or defeated. For example, considering the ballot “Alice > Bob > Charles”, if the candidate ranked first (Alice) loses the…
This blog post is the last one of a series exploring SIMD support with Rust on Android. In the previous two posts, I introduced how to compile Rust libraries for Android and detect SIMD instructions supported by the CPU at runtime.
This post is the second of a series on testing Rust’s support of SIMD instructions on ARM with Android. In the first post, we’ve seen how to compile Rust libraries for Android with the command-line tools, and tested that we could reliably detect the CPU architecture.
In a previous blog post, I mentioned how to use CPU-specific instructions in Rust to speed up the Shamir’s Secret Sharing algorithm. In my initial implementation, I only wrote an optimized version for Intel CPUs, but ARM supports similar instructions, so I mentioned that it would be nice to add an optimized implementation for it as well.
In a previous blog post, I described some benchmarks I wrote for a program written in Rust. While presenting the results, I mentioned a strange behavior: things that should have been very fast (a few nanoseconds) were reported as instantaneous. I wrote that it was probably fine given that the bigger benchmarks (above 10 nanoseconds) were seemingly working well, following the expected asymptotic…
In the previous blog post, I’ve described how Shamir’s Secret Sharing works from a mathematical point of view. In this blog post, I’ll focus on my Rust implementation. The motto of the Rust programming language is “empowering everyone to build reliable and efficient software”. I’ll therefore discuss how this applies to mathematical algorithms and cryptography, illustrated by my Horcrux…
As I mentioned in a previous blog post, I think that Rust is a good programming language to implement cryptographic algorithms, thanks to its memory safety, strong type system, ease of unit testing, and high performance. I’ve already experimented with that some years ago with the Gravity-SPHINCS algorithm that I designed during my master’s thesis. I recently wanted to try Rust again to implement a…