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 DBLP Mode for better Papers in LaTeX

25 10 2010

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
;; DBLP mode
(add-to-list 'load-path "~/.emacs.d/elisp/dblp.el")
(require 'dblp)
(add-hook 'LaTeX-mode-hook 'dblp-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.

-Martin





rDBLP version 0.4.5 released

11 10 2010

DBLP version 0.4.5 is more or less a maintenance release. It fixes several connection problems and as an improvement removes the cross-reference from the BibTeX entry. The book title in the main entry is now replaced by the title of the cross-reference. This should be more convenient with regards to the limited space in a research paper.

To update your gem execute

sudo gem install dblp

For more detail see my original post.

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

-Martin





[slimtimercli] Version 0.1.8 published

5 02 2010

It’s been while since I worked on slimtimercli but today I received a pull request via Github telling me that evaryont polished the gem and updated it and fixed some bugs. I took a few minutes to make slimtimercli use gemcutter and published it again — with version 0.1.8.

I love open source software!

- Martin





Be kind? Re-Kind! – Easy Reformatting of Scientific Papers

31 01 2010

The first time I held a Kindle in my hands I thought, this might be a game changer – at least until you start reading scientific papers which have a two column layout. Which is great for printed media, but as soon as you want to read it using a device zooming won’t help. Thanks to a hint of Christian I found this blog entry from Steven Wittens presenting the idea of cutting a two-column PDF page into 4 pieces. The complete program was written in Python and a no-brainer to execute – if you love the command line as I do. Unfortunately lot’s of my colleagues don’t and were wishing for a nice UI to easily drag and drop files to rework.

Based on the idea of Steven I rewrote the code and added the possibility to have multiple configurations (as how many columns you are splitting and how many vertical splits you want to make) and put it together using Titanium application. The result is a neat desktop app that presents a simple UI for the task.

To select files that you want to split just drag and drop them in the dropbox and click on process as soon as you are finished. The output files will be in the same directory as the input files but with a rekind appended to the filename.

To download the applicaton for Mac or Linux go to its Titanium application page, the complete source for the Titanium project and is available on Github using the MIT license.

As usual I’m glad for any feedback and feature requests.

-Martin





[PyPalm] 0.20.17 released

26 01 2010

Today I released PyPalm version 0.20.17 and it adds one bugfix and one feature:

The bugfix fixes the issue that one could encode the $L() call with single quotes instead of double quotes – both can now be used. The feature was proposed by Johan in the comments of this entry and adds a default text (which is the key) for each untranslated item and prepends the key with “_%_” so that when preparing your application for translation you see if you found every string that needs localization.

As a last step I added backwards compatibility for all those people without Python 2.6 and no built-in json support. If you have at least simplejson installed everything should be fine.

But please, feel free to report any bugs!





PyPalm for Palm webOS development

18 12 2009

In the recent days I had the chance to get my hands on a Palm Pre and sure this device may not be as feature complete as Apples iPhone but the UI is appealing and it brings some new UI concepts into the game. The development environment is really nice since the Palm emulator is not homegrown piece of software but a plain small linux that boots into a browser using VirtualBox as a virtualization solution.

Now the developer can choose between using either his editor of choice and the supplied command line tools or use a plugin for Eclipse that was developed by Palm. From my point of view this gives the developer a real freedom to choose whatever development workflow he likes and does not force him into new IDEs where you have to start learning your work environment from the beginning.

However the command line tools have a little shortcoming as they do not derive information from the appinfo.json that is available in the application directory. For me the first thing I created was a deploy bash script that would allow me to package, build and deploy to the virtual machine in one step. Again the issue was that already available information about the application from config files was not derived.

So I started writing a small command line application called PyPalm in Python that would allow all that what I mentioned above and regroup the Palm tools together.

To install PyPalm just open a terminal and use easy_install or pip to install the package via the command:

sudo easy_install pypalm

As soon as this is completed you can enjoy the full power of PyPalm. Just change to your applications directory and execute

pypalm --help

to get an idea of the supported commands. When you now execute

pypalm deploy

it will automatically determine the current version and ID of the application from the configuration file and package your application plus installing it to the VM or the attached phone.

Neat, isn't it?

Currently the feature set is kind of small but there can be more (generators,...). If you have any ideas please feel free to leave a comment.

-Martin








Follow

Get every new post delivered to your Inbox.