Your Style ? Stylish presentations without Powerpoint or Keynote

11 11 2011

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.


Easy parsing of sysfs to get CPU topology data using libsystopo

20 01 2011

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.h>
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!

– Martin

Emacs Movement Shortcuts Wallpaper

9 10 2010

Stumbling across the Vim Movements Shortcuts Wallpaper, I decided to make one for Emacs. Basically I really like the idea of having a real quick reference to the most important shortcuts on your desktop.

Emacs Wallpaper

If you have any additional shortcuts that you would love to have, please leave a comment. If you want to modify the wallpaper, I uploaded the original PDF version of the wallpaper that you can easily modify with any tool of your choice.