Welcome to our site!

Lords Of Tech
Cloud Server

Setting up a VPS for several small e-commerce businesses (part 1)

Over the years, I’ve had the opportunity to set up a few websites, both static and dynamically generated. A few years ago, I’ve settled on Wordpress as my default choice, initially simply building up sites from themes and plugins, until I bit the bullet and started adding my own snippets of PHP and later building a full, albeit simple, custom theme. This series will hopefully prove to you that setting up a web server, mail server and other neat services is not as hard as you might assume and you can even serve several small businesses using a reasonably priced VPS. In this initial article, we’ll deal with initial setup of our Ubuntu 20.04 server and turning it into a nice little LEMP server. I am expecting you to know at least the bare minimum about terminal, ssh and how to install packages in Debian-based distributions. You should also already own a domain and know how to set up A-records.

C++20 Resumable functions: Goodbye state machines, no one will mourn you

C++20 allows writing functions that suspend and can continue at the next line. This has an amazing application at avoiding writing annoying and error-prone state machines. This article showcases how coroutines can clean up a function that would usually need an ugly state machine.

Error codes are far slower than exceptions

TL;DR On modern 64-bit PC architectures, C++ exceptions only add unreachable code with destructor calls into functions and their effect on performance is below 1%, but such low values are difficult to measure. Handling rare errors with return values requires additional branching that slows down the program in realistic scenarios by about 5% and are also less convenient. If an exception is actually thrown, stack unwinding costs about 2 ┬Ás per stack frame.