Guaranteed Copy Elision

The new C++17 standard brings many exciting new features. A smaller, more subtle improvement it brings is guaranteed copy elision. The keyword is guaranteed, as copy elision itself has always been part of the standard. Although it might not be a change as radical as, say, structured bindings, I’m very happy to see it made it into the standard. Copy Elision Before discussing what changed in the latest version of the standard, it might be useful to revisit the basics of copy elision as they are currently defined by the C++14 standard....

November 21, 2016

LibEBC & ebcutil

In a previous blog post I wrote about bitcode. Embedding it was already possible for quite some time with Apple’s fork of LLVM that ships with Xcode. Recently, Apple upstreamed (parts of) their implementation making it possible to do the same with the open source clang compiler. However, there are some differences between the two implementations. Bitcode embedded with Apple’s version of clang is bundled into a xar-archive. Metadata such as compiler commands used to create the binary and dylibs which the code linked against, are kept in the archive’s table of content....

October 13, 2016

Public Key

-----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.5 mQINBFdy74MBEAC75SzUR+ibt50wrTmQ2Exi/E2Oqrson4a1+C3y2KfTngfPU1pcHweHuqGl Fi0Qx5wPmj9vWeGAX5n/MLO4NTRlwPYS2pp8khk/0JQI39F7z/gjJatWmtWjNtDBkifXQfzL EO8Yd6kN3eFRCSgYZ2r/rzFj1rtrqgZJZY8ANgPciytJeNQSKvr2DtkKPXUY72Vn8Y2Rn2jo /KwxRagLh8I1+8djv0M/84DFTmTGNMqaG+cBWXRmWYeEpxiLgXXpdDZkukby51m0lalgNXvd X5UVnvpSvKAMhxiUfvoVB5EfHayqxYTwcTgUaq0z3QcYxz3HUrHEBSkgVwvsEASwA8pbPVnp NV32dNxA4Zfmy917W3566edkdYJtBRD2Kvk9KxLMMe2BdDGBZTULZJvB61/y+ejPhoPaARNR 899tF2SFzKyw+AKlNBdpcXGSghS367FP8uhiAiWAvg4vpfXvJYlhKWjfWxuxM1NijaOV9OJf qCT+ud0KkHv30wuSijZTbGBnACvZZacdN6LzN6xMdsGHuILIYGTZMiQbo7yX1CHp2CgS+ydd JsZuNmT/4ZNemYMs/xqCVsD8xNtHn4ysKOeqeFAC6yuyEv+FGb30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FAINlRlsCmQKkjgmgH4djWxtcZBWqIaqZLhShojI9OdQixTPUeM7 8kjVxc/vGDPG7X/vRJAE8t+sp9OIrmlpihW/jLlVtTLA2v3lbree4C3JAbFrUBHNQrZH7jZR kxBq8IFVWABmiydtnaJtiXqLez64xRxqfpr1aZNjtuZ7CuNoGow1g9NTxVvatp/h1NmX+on2 PdQ= =fXbQ -----END PGP PUBLIC KEY BLOCK-----

August 17, 2016

Embedded Bitcode

Little over a year ago, Apple announced at WWDC 2015 the ability to embed bitcode in Mach-O files. Bitcode is the intermediate representation used by the LLVM compiler and contains all the information required to recompile an application. Having the bitcode present, in addition to machine code, Apple can further optimize applications by compiling and linking specifically for the user’s target device. This is one approach to app thinning, which aims to achieve smaller binaries and therefore more free space on your iDevice....

June 21, 2016

MAsCOT

Self-Adaptive Opportunistic Offloading for Cloud-Enabled Smart Mobile Applications with Probabilistic Graphical Models at Runtime I’m proud to announce that the paper summarizing the findings in my master’s thesis (Intelligent Offloading Decisions for Mobile Cloud Applications) will be presented at the 49th Hawaii International Conference on System Sciences (HICSS). Abstract: Although extensive progress has been made in Mobile Cloud Augmentation, automated decision support on the device that enables the opportunistic and intelligent use of cloud resources is missing....

January 4, 2016

Understanding the Clang AST

Clang is everywhere; It is the core of my favorite Vim plugin YouCompleteMe, it recently got supported by Microsoft Visual Studio, it is mentioned in numerous episodes of CppCast and it powers the excellent clang formatter. Naturally, I wanted to get a better understanding of how the clang front end works under the hood. Clang Front End & AST Clang is a C language family front end for LLVM. In compiler design, a front end takes care of the analysis part, which means breaking up the source code into pieces according to a grammatical structure....

December 31, 2015

A better YouCompleteMe Config

If you’re like me and have (1) been using Vim for a while and (2) have been programming in C++, you’ve likely heard about YouCompleteMe. YCM is an awesome auto-completion engine for Vim. For C++ and other C-based languages it uses the libclang under the hood, but it integrates with other engines as well to support C#, Python and Go to name a few. If you’re not yet convinced, check out the author’s website and this blog post....

July 26, 2015

Packages I Wish I Knew When Starting LaTeX

I’ve been using LaTeX for almost a decade now. Even after that much time, I keep running into new problems that require a solution I wasn’t aware of. LaTeX has a great community and usually there’s someone that already faced your problem. Every time I learn something new. This post discusses some packages that I consider to be essential, or that you should be at least aware of. I’m assuming you already know the basics, but if you don’t (and maybe even if you do) I can recommend The Not So Short Introduction to LATEX 2ε by Tobias Oetiker....

June 11, 2015

Word Search Solver

When browsing the Medium homepage I came across this post about #wordsearchwednesday. Although I enjoy a puzzle as much as the next guy, I immediately thought that this was something Haskell lends itself to very well. Less than an hour later I had a working solver. It simply brute-forces the solution by checking every combination with a dictionary. I used the Hunspell dictionaries but anything will do. toSet :: ByteString -> Set ByteString toSet = Set....

February 13, 2015

Arduino Display

As I already mentioned in a previous post, I recently purchased a 4 line LCD display to play around with. It provides an I2C Bus which means that it can be connected to your Arduino or similar microcontroller with only two wires. I could’ve come up with a thousands things to do with this display: using it for showing notifications, as an RSS scroller or as a hardware dashboard with temperatures and statistics....

December 28, 2014