C++ 17 has introduced the std::optional<T>template class that is analogous to the Maybe/Optional monad implementation in many other languages. “Analogous” is doing a lot of work in this statement because the C++ type checker is not going to help you avoid dereferencing an empty optional like Rust, Haskell, Scala, Kotlin, TypeScript and many other languages will do. That does not make it useless. As with many things in C++, we will be careful™ when using it and write only programs that d...| Runtime Checks
Joins are an important class of operations in databases and data pipelines. There are many kinds of joins in SQL databases, but this post will focus only on the INNER JOIN. 1 It is possible to make the JOIN between two large tables very efficient if the result is going to be small. That being a common scenario in practice, makes JOINs an interesting topic of research. A naive JOIN algorithm can be very slow because JOINs are essentially nested loops. NestedLoop JOIN based on sequential scans1...| Runtime Checks
In 2017 I decided to print some PDFs to read instead of just have them in an ever-growing folder of Papers to Read. Here is the list of the ones I managed to read this year. Out of the Tar Pit / Ben Moseley, Peter Marks / 2006 This is my favorite paper. It is a bit long (around 60 pages), but well worth reading. It is very thorough in defining what software complexity is. The authors make the distinction between essential and accidental complexity (following Fred Brook’s ideas on the topic)...| Runtime Checks
Being able to easily run and debug a simple operating system can be really useful when you want to learn how low level components are implemented. Xv6 is a very simple Unix-like operating system that allows you to do just that. sillysaurus2 exemplified this in the Hacker News’ thread on Xv6: Have you ever: Wondered how a filesystem can survive a power outage? Wondered how to organize C code? Wondered how memory allocation works? Wondered how memory paging works? Wondered about the differenc...| Runtime Checks