Introduction

Hello, world! It is a personal website for webdev experiments and occasional blogging.

News

C++ lambdas as Brian Will's code blocks

Back 10 years ago, Brian Will made a series of YouTube videos on various practical issues in programming. In a video about OOP, he pointed out that a well-structured long procedure can be more readable and maintainable than a bunch of objects, and suggested a "use code block" language feature that works as "an anonymous function that does not see anything in its enclosing scope" and helps to better express the logic of a procedure by structuring its name space. Very similar scoping rules apply to C++ lambdas that were introduced in the 2011 standard. This post takes a look at how lambdas can make long procedures more readable and expressive.
full post#c++

Likely in C++

Attribute [[likely]] is a good minimal example of how software can leverage processor features to achieve maximum performance by providing more information about the program to the compiler. This post shows an example how [[likely]] affects compiled machine code, discusses how it improves utilisation of CPU branch predictors, and brings up a couple topics in C++ program design where it is useful.
full post#c++#cpu#performance

Bus Pirate 3.6 and I2C

"The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff." An excellent tool. The post puts together a couple basics of how Bus Pirate 3.6 works and how to talk to an I2C bus with it. As an example, how to read the ID register 0xD0 of the barometric sensor BMP280 from Bosch. Bus Pirate v3.6
full post#electronics#tools

Projects

Website

A Jekyll-based static website with a fluid layout built on a fixed column grid. It includes a couple project pages, a blog, and an index page.

CMake codemodel graphs

A prototype Python project that makes useful graphs of C++ CMake projects from the codemodel info provided by the CMake file API. It handles clusters of dense dependencies among CMake targets. project page

Modern C++ for programming Ti MSP430

C++14 library for MSP430 and a better workflow for embedded programming. project page

OpenGL lib for data visualisation

C++ library for working with OpenGL and data visualisation, somewhat similar to Glumpy in its object-oriented interface. project page

Perf records in C++

C++ library for software performance studies. project page

Index