December 6, 2022 - Reading time: ~1 minute
The static initialization order fiasco refers to the ambiguity in the order that objects with static storage duration in different translation units are initialized in. If an object in one translation unit relies on an object in another translation unit already being initialized, a crash can occur if the compiler decides to initialize them in the wrong order. For example, the order in which .cpp files are specified on the command line may alter this order. The Construct on First Use Idiom can be used to avoid the static initialization order fiasco and ensure that all objects are initialized in the correct order.
Within a single translation unit, the fiasco does not apply because the objects are initialized from top to bottom.
November 29, 2022 - Reading time: 4 minutes
Many programming languages don’t require you to think about the stack and the heap very often. But in a systems programming languages like C, C++(this days not very often) and the Rust, whether a value is on the stack or the heap affects how the language behaves and why you have to make certain decisions. Parts of ownership will be described in relation to the stack and the heap later in this chapter, so here is a brief explanation in preparation.
July 6, 2022 - Reading time: ~1 minute
In [1]:
import functools
@functools.cache
def fib(n):
if n < 2:
return n
return fib(n - 1) + fib(n - 2)
July 6, 2022 - Reading time: ~1 minute
Emacs is a programmer’s text editor that can be extended and configured using it’s embedded scripting language ELisp (Emacs Lisp).
There are multiple members of the Emacs editor family, the most popular one being GNU Emacs. These have varying levels of compatibility with each other, ranging from “mostly compatible” to “some key bindings are the same”.
June 20, 2022 - Reading time: 3 minutes
In [1]:
get_ipython().ast_node_interactivity = 'all'
import string
June 18, 2022 - Reading time: ~1 minute
The BunnyCDN log format is a plain-text format. By default, BunnyCDN provides logs for 3 days, and you can fetch these with your account key.
Each request is logged on a separate line, and the fields are delimited by |. Here are the fields in order, and their short descriptions.