Topic: Programming/C++

14th story: Top 11 C++ Libraries.

In this article, we will see the different important external libraries that give the C++ programmers the ability of doing their jobs without any difficulties.

C++ lacks providing libraries, while other languages usually come with all the libraries needed for most applications, such as graphics, user interfaces, networking, resource handling, and so on, C++ provides, more or less, nothing more than the bare minimum of algorithms, threads, and, as of C++17, file system handling. For everything else, programmers have to rely on external libraries. For instance, Python comes with the support of…

13th story: how to create a dll under Microsoft Visual C++.

DLL stands for Dynamic Link Library and it is useful in many use cases. Let’s start by enumerating its advantages:

Promotes modular architecture:

A DLL helps promote developing modular programs. This helps you develop large programs that require multiple language versions or a program that requires modular architecture. An example of a modular program is an accounting program that has many modules that can be dynamically loaded at run time.

Uses fewer resources:

When multiple programs use the same library of functions, a DLL can reduce the duplication of…

Topic: Programming/C++.

12th story: C++20 features (PART II)

In this story, we will continue our discussion about the new features released by C++20.

Three way comparison:

The three-way comparison operator (<=>) was added in C++20 to provide a simple way to overload the four comparison operators <, >, <=, and >=.

When used on a whole number type, as in the following example, the operator returns an object representing either equal, less, or greater.

#include <compare> // std::strong_ordering

class Length



int i;

std::strong_ordering operator<=>(const Length& right) const {

return i <=> right.i;



With this operator defined…

Topic: Programming/C++.

11th story: C++20 features (PART I)

The C++ programming language is a general-purpose multiparadigm language created by Bjarne Stroustrup. The development of the language started in 1979 under the name “C with classes.” As the name implies, it was an extension of the C language with the additional concept of classes. Stroustrup wanted to create a better C that combined the power and efficiency of C with high-level abstractions to better manage large development “projects. The resulting language was renamed C++ (pronounced “C-plus-plus”) in 1983. As a deliberate design feature, C++. C++ is updated and maintained by the…

Topic: Compilers/ LLVM/ PL.

10th story: LLVM & Haskell (PART III)

Welcome to this third and last part of our discussion about LLVM. We will continue to see the operators and the mutable variables.

User-defined Operators

The “operator overloading” that we will add to Kaleidoscope is more general than languages like C++. In C++, we are only allowed to redefine existing operators: we can’t programmatically change the grammar, introduce new operators, change precedence levels, etc. In this story, we will add this capability to Kaleidoscope, which will let the user round out the set of operators that are supported.


Topic: Compilers/ LLVM/ PL.

9th story: LLVM & Haskell (PART II)

In the first part we have seen an introduction to LLVM with Haskell, also how to transform the Abstract Syntax Tree into LLVM IR, some code generation, the Lexer and the Parser. In this part “2”, we will continue our discussion and go deeper into JIT and Control flow. I expect a third part and it will be the last one.

Optimization Passes:

LLVM provides many optimization passes, which do many different sorts of things and have different trade-offs. Unlike other systems, LLVM doesn’t hold to the mistaken notion…

Topic: Compilers/ LLVM/ PL.

8th story: LLVM & Haskell (PART I)

Hello & welcome to this story. It runs through the implementation of a simple language, and the basics of how to build a compiler in Haskell, showing how fun and easy it can be. An intermediate knowledge of Haskell is required. We will make heavy use of monads and transformers without pause for exposition. If you are not familiar with monads, applicatives and transformers then it is best to learn these topics before proceeding. Conversely if you are an advanced Haskeller you may notice the lack of modern technics…

Topic: Programming/ C++.

7th story: STL, for expert.

In this story, we will see the following topic:

  • STL architecture
  1. Containers
  2. Iterators
  3. Algorithms
  4. Functors
  • STL containers
  1. Sequence
  2. Associative
  3. Unordered
  4. Adaptors

Let’s look into the STL topics one by one in the following sections.

1. The Standard Template Library architecture:

The C++ Standard Template Library (STL) offers ready-made generic containers, algorithms that can be applied to the containers, and iterators to navigate the containers. The STL is implemented with C++ templates, and templates allow generic programming in C++.

The STL encourages a C++ developer to focus on the task at hand by…

Topic: CS/ Data Application.

6th story: Stream Processing

So far we have talked about where streams come from (user activity events, sensors, and writes to databases), and we have talked about how streams are transported (through direct messaging, via message brokers, and in event logs).

What remains is to discuss what you can do with the stream once you have it – namely, you can process it. Broadly, there are three options:

  1. You can take the data in the events and write it to a database, cache, search index, or similar storage system, from where it can then be queried…

Topic: Data structures.

5th story: Batch Processing with Unix Tools

Let’s start with a simple example. Say you have a web server that appends a line to a log file every time it serves a request. For example, using the nginx default access log format, one line of the log might look like this:

. – – [07/Aug/2020:18:30:11 +0000] “GET /css/typography.css HTTP/1.1"

. 200 3377 “http://idriss” “Mozilla/5.0 (Macintosh; Intel Mac OS X

. 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115

. Safari/537.36"

(That is actually one line; it’s only broken onto multiple lines here for readability.) There’s a lot…

Idriss Chaouch

C++ | STL | Semiconductors | VHDL | SoCs | FPGAs | Python | Visual Studio | sometimes Go

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store