Recommended Emacs package: cmake-ide

Using emacs with flycheck and company is great experience, but what bothers me is that I need to carefully set many variables so that configuration used by these helper tools matches my actual build configuration – e.g. include directories, extra compiler and linker flags etc. I need to apply these settings per-project, and keep updating them whenever I change my build config in any way. This is particularly inconvenient for projects that feature configurable build process.

I use CMake for most of my projects, and I’ve recently found a package that can utilize it to automatically configure many other Emacs packages. The package is called cmake-ide, and it is available on MELPA.

There is literally zero configuration required. It automatically discovers whether a file you are editing belongs to a CMake project, runs CMake to prepare an out-of-tree build, and investigates compile_commands.json generated by CMake to figure out the precise build config for each file. It then uses this information to set up irony, flycheck, rtags, company-clang, and probably some other packages too. Whenever build config might change, cmake-ide will automatically update everything.

Super convenient.

Advertisements

Coffee Maker 360 Render

Rendered with RGKrt http://cielak.org/phile/software/rgkrt

Original render was 800×1000, so it is best viewed fullscreen with HD enabled.

Coffee Maker model by cekuhnen: http://www.blendswap.com/user/cekuhnen, used under the terms of CC-BY-3.0 license.

My raytracer

It took me quite a while to write about it, but during the last semester I attended a photorealistic graphics course, and made a nice raytracer.

Dragon Sponza render

See the full animation here, or play around with an interactive 360 view here.

More examples an a full list of features are displayed on my website. The source code is available in a GitHub repository.

QEMU – main-loop: WARNING: I/O thread spun for 1000 iterations

When upgrading the virtual machine I use, I stumbled upon an issue where the guest OS would hang every time when performing any kind of heavy hard drive I/O. Qemu monitor would only display:

main-loop: WARNING: I/O thread spun for 1000 iterations

Some digging led me to the following workaround:

diff -u a/vl.c b/vl.c
--- a/vl.c	2015-11-20 01:45:00.179169442 +0100
+++ b/vl.c	2015-11-20 01:44:22.181778840 +0100
@@ -1914,6 +1914,7 @@
 #endif
     do {
         nonblocking = !kvm_enabled() && !xen_enabled() && last_io > 0;
+        nonblocking = 0;
 #ifdef CONFIG_PROFILER
         ti = profile_getclock();
 #endif

For explanation of the nature of this issue, read this discussion.

A few drawings

I find drawing relaxing. Here are some images I recently draw using Inkscape:

blue1redcat1mamooth1Each took about 2-3 evenings to draw. They work pretty well as wallpapers, hi-res versions can be downloaded by clicking on an image.

I do not have much spare time on evenings, so it is rare for me to spend them drawing animals. I do, however, enjoy the results a lot. Vector graphics are fun!