C++ Docker remote API client

I’ve built a block to control Docker daemon from C++ source code. It’s available here: lasote/docker_client

biicode-cplus-docker

What’s Docker


Docker
is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.

What’s Docker remote API?

Docker also exposes a REST API to control your docker service. This API is at least as powerfull as the Docker client.

Why would I need a C++ Docker client for Docker’s remote API?

Because you can fully control Docker daemon from your C++ source code!
For example, you may want to automate the creation of some images, or run some linux instances on demand to build your software, maybe build a CI platform…

Continue reading

A Tiny Metaprogramming Library: Extending the Metaphor, entering metafunctions

I know I’m repeating this everytime I write a new article, but it’s one of the key points to make template metaprogramming feasible, which means: TMP is just a functional language. A language with a “Aghhhh, my eyes, please!!! Aaahhhhhg!!!” syntax, but still a functional language.

To start a C++ metaprogramming library the right way, we’d better have a clear idea of what a metafunction is, and how our library represents and manages a metafunction.

Continue reading

Metaprogramming with Modern C++: The Haskell Metaphor

I you are one of who have been following our post series about template metaprogramming with modern C++, at this time you should have become a C++ template Guru. At least thats what I expect ;).

You know about class templates, function templates, value parameters, type parameters, variadic templates… Your template metaprogramming toolbox is full of great things to play with. Thats good, but you want to start playing with your compiler, writting some cool metaprograms.

Lets start the game!

Continue reading

BITSCAN: a C++ library for bit strings

A comprehensive view of BITSCAN

BITSCAN is a C++ library dedicated to efficient processing of bit strings. In programming, a bit string is a data structure that stores collections of bits (ones and zeros). It gets interesting when these bits have semantics, i.e.  refer to a Boolean property of a group, so that each element is identified by a bit in the chain. In previous posts I have repeatedly stated that BITSCAN “is a useful library to manage bit strings”, and that was that. Readers of our blog have questioned the usefulness of bit strings in practice so I will start this post explaining some common situations in which bit strings may be an alternative to more common data structures.

Bit strings can now be processed more powerfully with BITSCAN hosted in biicode

Continue reading

Why a FILE BASED dependency manager rocks for C/C++

We have a big problem. We have miserably failed to explain the core value proposition of biicode: a file-based dependency manager. We have tried to communicate it in the homepage, in features landing pages, videos, etc. While we certainly are growing, it is also true that not as fast as we would like.

There are many reasons that explain this: People understand that we are a dependency manager for C/C++, but also realize that we still don’t have premium accounts (for private code), in-house deployment or that we’re not open-source. This is all true, we are working in all these features, including going open-source regarding which we will soon announce something relevant. But we think these are not reasons (stoppers) enough to not engage with the platform now, try it, check how it works, give feedback to help define the tool to your needs.

We believe that the main problem is that we didn’t explain properly what makes biicode so special, and we failed because we have used the wrong channels. Here, I will explain it with the language we, developers, all love: source code.

C/C++ dependency manager

Continue reading

Template Metaprogramming with Modern C++: templates in depth

Template Metaprogramming with Modern C++: Templates in depth

The last time  we learnt what metaprogramming was, how metaprogramming in C++ via templates works, and the functional spirit of the embedded language that C++ template metaprogramming is.

In this post we will learn C++ templates in depth: Class and function templates, template parameters, variadic templates, all with in depth examples.
SPOILER: Finally, there is no SFINAE explanation on this post. This has a large amount of contents to be read and understood, I think understanding correctly the template system and the different categories of template parameters is good enough for a single (But large) blog post. Of course, if there is any problem feel free to post a comment here.

Template Metaprogramming Modern C++ in biicode
Continue reading

Sparse bitsets in C++ with BITSCAN

Sparse bitsets in C++

Sparsity when referring to systems indicates that they are loosely coupled. Thus, a sparse matrix is a matrix in which most of its elements are zero, a sparse graph has very few adjacent vertices (its adjacency matrix is also sparse) etc. Opposite to sparsity is density, and dense systems are those that are strongly coupled.

In a recent post we proposed BITSCAN  a recent C++ library to manipulate bit strings. A comparative survey with other state of the art implementations (such as bitset (STL), or dynamic_biset(BOOST)) may be found here. This post brifely describes how BITSCAN operates with sparse bitsets.

Sparse bitsets in C++ with biicode's library BITSCAN

Figure 1

Continue reading

Our Story (II): Miguel Hernando’s road to entrepreneurship

How did biicode begin?

…certainly not in a parking lot, but Pablo San Segundo and I were pretty close to the one at the University the very first time Diego explained biicode to us.

I consider myself lucky for being part of biicode’s birth. The day we decided its name, or those endless meetings with a chalkboard full of diagrams, the first “battle logo” as we named our first “company mascot”.
In addition, I really enjoy my work as a university professor and engineer. Thanks to the university I have had the opportunity to devote myself to something that fascinated me since I was a child: robotics. But you cannot master robotics without solid programming skills, so I’ve been programming since I started hacking the fascinating Commodore 64, with its “peek” and “poke”, and his incredible voice synthesizer accessible through a simple command: “say”.

Hacking Commodore 64 is the beginning of our story

Hacking the Commodore 64 was classy.

Continue reading