Month: May 2024

What Happens in Monads Stays in Monads

There are moments in life when you have to take a stance. You know countless people already tried and possibly succeeded in doing something, but you feel the urge to try it yourself.

So yesterday I attended the Milan C++ Meetup by Marco Arena, presented in a very entertaining and well-organized way, what’s new in C++23. Everything was fine until Marco presented the std::expected template and its “monadic operations”. Now it was in the context of a much wider presentation and there was no time to go into details, but I got the impression that the C++ community has a bit of an ad-hoc approach to monads. I mean C++98 failed to recognize that containers are monads, C++11 failed to recognize that std::future is a monad, C++17 failed to recognize that std::optional is a monad, and C++20 failed to recognize that coroutines are monads. You can see a pattern there.

Continue reading “What Happens in Monads Stays in Monads”

It Is Exactly Twenty Years Today…

… since my first post in this blog:

I’ve just registered the domain ‘maxpagani.org’. This should be the first step in the online life of this site. A little step for a site, nearly unnoticeable for humanity :-D.

Thank you for visiting my website and reading my rants all these years!

It was 2004, and Facebook had just been founded but had still to reach critical mass and take off. RSS had to become a thing and Google Reader had to happen the next year, MySpace was still in its infancy, and “blogosphere” was the trending word. BTW the BASIC language just turned 40 that year.

Back then I worked at UbiStudios Milan and we were told the studios would be downsized, and that programmers would be better off looking for a job elsewhere. So I decided I needed some self-promotion and thought of this blog idea. A place where I could write about stuff that I like letting other people (possibly including prospective employers) know about me.

Initially, the blog was made with a bunch of static pages produced by a sort of template processor written in bash. This is how it looked. Later I implemented the blog section using PHP and plain files. I spent quite a lot of time on PHP trying to evolve the website and even prepared a second version with a better look. But eventually, I switched to WordPress.

I always wrote single, stand-alone posts, until I stumbled against PIC18. A microprocessor so unfriendly to C and so hostile to the high-level programmer, that I decided I needed to write a PIC18 survival guide that spanned over 5 posts. Since then I have written a few series, which I am quite proud of –

Since late 2023 I started collaborating with Embedded Related website and moved my publishing of … embedded related articles there. I plan to continue writing on my blog for everything else.