It’s been a while since anything happened here on my page, so I thought I need to give it some change and so I moved most of my old blog posts from wordpress.com to this new location. Basically nothing will change.

For the last few days I’ve been investigating possibilities to create presentations that will output a mixture of HTML / CSS / JS and are created by either using plain HTML or some kind of markup language. The general idea behind this approach is that for 90% of the presentation you create you will follow a simple set of styles and you will not need some special visualizations.

What is most interesting for me is to use my standard work environment, like my editor of choice and leave the styling to a predefined set of markups, probably following some corporate identity guidelines.

Long story short, I’m disappointed with what I’ve seen. Basically there are two reasons why everything I looked at falls short of my requirements:

  • PDF generation - I want to generate a PDF of my slides that I can easily distribute (static HTML does not do the trick, publishing slides to Heruko or Github neither)
  • Templates - I have no idea why non of the tools I looked at provides simple support for templates. Is CI something that was lost in the whirlwinds of Web 2.0? And by templates I mean more than putting a logo at the bottom right.
And here are the tools I observed with their shortcomings:
  • Showoff - Markdown for the slides is perfect, templating impossible and PDF generation fails for images defined by CSS backgrounds ( I might have a patch for that)
  • Deck.js - HTML is just to noisy to work on slides, print markup does not look like the original slide
  • Slippy - HTML is to noisy
  • LaTeX Beamer - LaTeX as markup is fine for me, PDF output is perfect, templating is a pain in the ...
In general the markup based solutions are very easy to setup and use, but typically fall short to allow fine-grained customization of the layout. The simplest example is that there is typically no way to place the slide title and the slide body separately.

As a result it looks like I’m back to Powerpoint.

You want to improve your “old” C++ code base by allowing new features or bug fixes to be enhanced with C++11? The questions you will face on the way are manifold. First, what exactly allows me C++11 to do? Where is some documentation? What is the purpose of those features. Compared to languages like Ruby or Python the C++ standard library and language itself is not too well documented online.

As a preparation for a lecture I’m holding in the next semester I was compiling a list of links to C++11 / C++0x documentation sites and as some kind of personal archive I will post them here:

General C++11 / C++0x FAQ

New Features (Overview)

Compiler Support</strong>

Standard Library Documentation

I will update this list as I find new sources. If you have any more links you think that are missing, please mention them in the comments and I will add them.

When you are working with main memory it is crucial to make sure that all the data structures are correctly sized and aligned. A typical approach is to create blocks of data that are processed independently. For the developer, the question is how large such blocks should be? The answer is that those blocks should always be either cache sized.

Now, how large is the cache on the system you are using? Either you can go for experiments detecting the different cache levels and the cache line sizes, or if you are happy to have a Intel Linux system at hand, to simply explore the information as it is stored in the sysfs filesystem exported by the Kernel.

However, parsing this information at development time might be ok, at run-time the best way is to adjust the system settings based on the actual configuration. At the moment, libudev does not support to read the information, so your off to yourself.

To avoid that everybody writes the same code I took some time to write a small library that reads the information about the CPU caches and the CPU topology and allows to easily process this information in your program. You can find the most current version of the code as usual at Github.

#include <systopo.>

using namespace systopo;

int main(void)
{
    System s = getSystemTopology();
    return 0;
}

The System definition parses all data from sysfs and can be reviewed here:

    struct Cache
    {
        size_t coherency_line_size;
        size_t level;
        size_t number_of_sets;
        size_t physical_line_partition;
        size_t size;
        size_t ways_of_associativity;
    
        std::string type;
    
    };

    struct Topology
    {
        size_t core_id;
        size_t physical_package_id;
        std::vector<size_t> core_siblings;
        std::vector<size_t> thread_siblings;
    };

    struct CPU
    {
        std::vector<Cache> caches;
        Topology topology;
    };


    struct System
    {
        std::vector<CPU> cpus;
        std::vector<size_t> online_cpus;
        std::vector<size_t> offline_cpus;
    };

For more information about the meaning of the Topology please refer to the Kernel documentation. The meaning for the CPU cache fields should be clear or refer to "What every programmer should know about memory".

If you have feedback, comments or ideas, I’m glad to respond!

Do you remember the last time you were writing a paper and you knew that you reached the perfect point for a citation. You knew the author or the paper but you did not want to lookup the BibTeX entry or even create it? So you started to use rDBLP, but now you have to lookup the citation key every time again and again. Since your BibTeX file is now build after the paper was compiled the first time, there is no chance to use common BibTeX management tools.

As a consequence from this problem I wrote a small minor mode for Emacs that allows to search the DBLP database directly from Emacs and insert the correct citation key.

To install this minor mode follow these steps:

  1. Go to your local site lisp directory - e.g. ~/.emacs.d/elisp
  2. git clone git@github.com:grundprinzip/dblp.el.git
  3. and now add the following lines to your Emacs configuration to activate the minor mode as soon as you enter LaTeX mode

If you want to use the querying hit “C-M-c” if the DBLP mode is activated and this will start an interactive mode to query DBLP.

Currently the minor mode requires Ruby to be available on the platform. I plan to port the parser and querying to Lisp but currently it’s easier for me to write it in Ruby. Do you have any comments or questions, please leave me a message in the comments.