In this blog post I explore __attribute__((cleanup(...)))
. I discuss what it
does, how it does it, why use it, performance considerations, and finish by
saying it’s absolutely fantastic.
This is a quick introdution to the Monte Carlo method for integration. I develop it here from scratch relying on known statistical properties. To tie this in to programming, I also provide a short, simple implementation in Python.
In this post, I describe how to get Fedora 33 Server running on the Dragonboard 410c board.
Many times, a library or framework allows you to register a callback function. Usually, you are also allowed to register a pointer (an opaque) that will be passed to your callback function. In this post, I explain this pattern.
The endianness of an architecture describes the order of bytes in which multi-byte values are stored. But the endianness also affects the order of bits in a single byte. I explore this notion here.
In this post I’ll discuss how to use socat
to magically bring X-forwarding
to network namespaces (and, I guess, containers), with no direct networking.
In the previous part, I showed an example of a duck-typed function in C++. It bothered me that I have to recompile the code for every duck (due to template instantiation), and that I have to put the code in the header file. I’d prefer most of the code (except, say, adaptors) to sit in .cpp files.
Dynamically typed languages, such as Python, or Lua, have duck-typing. What about C++? In this post, I will try to bring duck-typing into C++.
In this post I will show how to use ptrace to redirect the standard output of a running programme.
In this post I explore the torment a stack goes through when a Linux process handles a signal.
I ran into this error: “Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?”, and a quick google did not return a result that really explains what I saw.
In this three-parter I will go over and annotate the code for Dragonflow’s publish/subscribe mechanism. In this third part, I will go over and annotate two publish/subscribe driver implementations: ZMQ, and Redis. In Part 1 I introduced the API, and in Part 2 I went over code in Dragonflow which uses the API.
In this three-parter I will go over and annotate the code for Dragonflow’s
publish/subscribe mechanism. In this second part, I will go over and annotate
two key locations where the API is used. Namely the NbApi
class, and the
publisher service. In Part 1
I introduced the API, and in Part 3
I will show driver implementation examples.
This is the first of a three-parter where I will go over and annotate the code for Dragonflow’s publish/subscribe mechanism. In this first part, I will review the API. Part 2 will give API usage examples, and Part 3 will give driver implementation examples.
In this post I describe a method for testing the network between virtual machines, using python scripts. The rationale is to avoid costly elements such as virtual machines or even containers.
In this post, I describe how I placed a class reading from a tap interface in a greenthread. This was not completely trivial, since greenthreads are expected to be cooperatively release the CPU. A method that blocks on a read system call hogs the CPU all to itself.