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. Table of Content Clang Front End & AST ASTContext Classes Navigating Sources AST Traversal Recursive AST Visitor AST Matchers Cursors Building the Examples Conclusion Related Clang Front End & AST Clang is a C language family front end for LLVM....

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

Proper Printing with HD44780 LCD

I recently purchased a very simple, Hitachi HD44780 compatible LCD screen for an Arduino project. It’s a 20x4 I2C display, which apparently is constructed as a combination of 2 two-line display controllers. This wouldn’t really matter except for the fact that when printing strings longer than a single line, they are displayed in a 1324 matter. So if you set your cursor on the first line and print a string 80 characters long, things get weird....

December 25, 2014

Course Notes & Summaries

For some of the courses I took during my studies in computer science at the University of Leuven, I’ve combined the course material, typically with the help of others, into structured and easy to study documents. Hoping that other students could also benefit from these notes, I’ve made them publicly available, on Github. The documents are writen in LateX which hopefully encourages my fellow students to correct mistakes and improve or extend them....

December 23, 2014

Burglar Alarm: IoT Course

For the Internet of Things (IoT) assignment for the course Capita Selecta: Distributed Systems we were supposed to create a burglar alarm. A passive infrared sensor (IR) detects movements, which triggers a 60 second timer. If the correct code is not entered using a potentiometer and pushbutton, a relay enables the alarm. Although pretty basic, this was probably one of the more fun assignments during my education at the KU Leuven....

December 17, 2014

IPv6 Ready

Woohoo, as of today jonasdevlieghere.com is IPv6 Ready! Wondering why this is important? Check out the explanation by Vint Cerf. Edit: I accidentally configured NGINX to only accept connections on the IPv6 socket. This made my site unavailable to some of my visitors. This problem has been resolved as of the first of November.

October 30, 2014

Real-Debrid Extension

Because going to the Real-Debrid website every time you want to unrestrict a link is such a hassle, and their own Chrome Extension doesn’t work, I decided to come up with my own extension. Basically, it adds an item to your context menu (or right-click menu) that unrestricts the selected link(s) and automatically downloads the respective file. Feedback is provided using Chrome Desktop notifications to make the plugin as unobtrusive and light-weight as possible....

August 11, 2014