Rust: fear => love => hate => love => disillusion

Originally published on Medium: https://dariodip.medium.com/rust-fear-love-hate-love-disillusion-fa9f6f05b54e My journey through Rust was very tortuous and tormented. During this article, I want to retrace my steps towards the discovery of that amazing programming language. First encounter: fear When I was at the university, a colleague of mine and I have been started working on a project for the course of Data Compression. That was something very low-level and bitwise. We already knew a bit of C, Java, Python, and JavaScript. Every of those, except C, were not suitable at all to work with bits, and since we don’t want to work with C anymore, we decided to pick a brand new programming language (the worst idea ever when you have to finish your project as soon as possible). ...

January 31, 2022 · 6 min · Dario Di Pasquale

Find duplicates using Python

Originally published on Medium: https://dariodip.medium.com/find-duplicates-like-a-boss-f46422f54dd1 The exercise of finding duplicates in a list is a classical example of a didactic problem that you may find during your journey through learning algorithms. During this post, we will try solving this problem using different algorithms, showing the differences between each one. This article has been mainly written for fun and as a writing exercise. Its main purpose is to show different solutions to a single problem, explaining the reasoning behind certain decisions. ...

January 19, 2022 · 6 min · Dario Di Pasquale

Understanding Linux Containers: explore User Space, cgroups and Namespaces

Originally published on Medium: https://dariodip.medium.com/understanding-linux-containers-a-simple-recipe-7c24cc1137b4 What is a container? Actually, it is not a real thing. In this post, I will try to explain what containers are and how they work, decomposing them and understanding their components, without going too deep in some concepts which require a way long explanation than the one I could give in a single post. Currently, there are many technologies for containers (e.g. Docker, containerd, runC and so on), but this post is not going to talk about them and therefore, will be (almost) technology agnostic. This does not mean that you should take this information for implementing your own containers in production (this is totally insane, even if you are a nerd 😃). ...

April 10, 2021 · 10 min · Dario Di Pasquale

//go:embed unleashed

Originally published on Medium: https://dariodip.medium.com/go-embed-unleashed-1eab8b4b1ba6 One of the reasons why I love Go is that Go compiler creates static binaries by default unless you use cgo to call C code, in which case it will create a dynamically linked library. It makes it easy to ship Go programs, create very lightweight Docker images and exploit cross-compiling and plugins. Starting from Go 1.16, it also gives you the opportunity to ship your own “batteries” using the package embed. ...

April 3, 2021 · 5 min · Dario Di Pasquale