OpenCL Memory Pattern Analyser

by ritze

A few months ago I finished my bachelor thesis at the Chair for Computer Architecture and Parallel Processing at KIT. My task was to find a way to get a memory pattern of a given OpenCL kernel program for one of many OpenCL devices. The result is a static kernel code analyser which gives you an abstract pattern of reads and writes for each bit of the memory.

I published my source code under GPLv3 licence on GitHub. Additionaly you can download my bachelor thesis and the appertaining presentation in German.

But you can also download the files here:

Gigabyte GA-970A-UD3: USB 2.0 and LAN doesn't work

by ritze

I bought me new pc components including the motherboard GA-970A-UD3 (rev 3.0) from Gigabyte. First I installed Windows which worked without any problem. Then I tried to boot my existing Arch Linux partition.

The Realtek RTL8111/8168 LAN controller was correctly identified by the kernel but when I tried to establish a lan connection the receiver recieved no packages at all. Another problem was USB 2.0. Only USB 3.0 ports worked.

After half a morning of searching and trying to solve the problem, I found the solution on Arch Linux Forum:

teekay wrote: > “You need to enable IOMMU in the BIOS of the Gigabyte board.”

That’s it. After I did that the network and the USB 2.0 ports work fine.

Compile Docbook documents for Kindle

by mks

I wanted to have the Linux from Scratch book on my Kindle, but didn't find a current version of it online. Here are the steps I had to do in Ubuntu 12.04 in order to create one. Maybe it helps somebody.

# First, install svn, xsltproc and docbook-xsl
sudo apt-get install svn xsltproc docbook-xsl

# Get current LFS (or get the source for a release)
svn co svn:// lfs

# Finally create the book
mkdir lfsbook
cd lfsbook
xsltproc --xinclude /usr/share/xml/docbook/stylesheet/docbook-xsl/epub/docbook.xsl ../lfs/index.xml
echo "application/epub+zip" > mimetype
zip -0Xq  lfsbook.epub mimetype
zip -Xr9D lfsbook.epub *

# Convert to Kindle format using Calibre; sudo apt-get install calibre if you need this
ebook-convert lfsbook.epub

How to let XBMC scan for new content on network connect

by elm

I have a Raspberry Pi with Raspbmc in my living room to watch tv shows and stuff. XBMC is really great software. I have the Pi hooked up to an Airport Express and there is a problem. The Airport Express takes some time to connect to my wifi network. This takes so long that the Pi is done booting and XBMC is running for some minutes by the time the network comes up. This disables one very useful feature of XBMC: the automatic library scan. When XBMC tries to scan all the sources for new content the network is not available and so it does nothing or at least does not find anything new.

The solution is to set the network manager to send a command to XBMC to scan the video sources when the network comes up.

You need to place the following script in /etc/network/if-up.d/. Each script in this folder is called on network up. This script sends a JSON request to XBMC to scan all video sources for new content. You may need to change the user, password or the port if you changed them in the XBMC settings. This are the default settings.


# Don't run if the loopback device comes up
[ "$IFACE" != "lo" ] || exit 0

# Send JSON command to XBMC to scan video sources
/usr/bin/wget --header='Content-Type: application/json' --post-data='{"jsonrpc": "2.0", "method": "VideoLibrary.Scan", "params": {"directory": "" }}' http://xbmc:xbmc@ --spider
To install this script you need to ssh into the Pi and place it in /etc/network/if-up.d/xbmcupdate. Now you can enjoy your latest downloads linux distributions without any hazzle.

EDIT: The parameter directory seems to be mandatory now.

Erfahrungsbericht über Google Summer of Code

by ritze

Diesen Artikel habe ich ursprünglich für verfasst und möchte somit meine Erfahrungen im Rahmen des Google Summer of Code schildern.

Alles begann als ich Anfang des Jahres bei heise online mal wieder über Google Summer of Code las. Ich wollte schon immer meinen Teil zum Projekt Gnome beitragen und so etwas an die Gemeinschaft zurückzugeben. Ich benutze den Desktop nun schon seit mehr als vier Jahre. Also fing ich an im Wiki von Gnome ein wenig herumzustöbern und stieß auf eine Seite mit Ideen zum diesjährigen Google Summer of Code. Nach längerer Überlegung dachte ich mir, ich versuch es einfach einmal bei Anjuta.

Read more »

Sudowars on Google Play

by ritze

It is done. Finally we have published Sudowars on Google Play and you no longer have to download it from the Website and install the apk manually. I hope that more people encounter Sudowars now. And the best thing about it is you can read the source code, write more code or fork it.

I have many new ideas for Sudowars, but I don't know when I will find the time for it. Meanwhile, you can play the multiplayer.

Status report: Final spurt

by ritze

Three week ago I wrote two exams, which I had to learn. Therefore I had no time for Anjuta. My energy for this semester was as well as consumed and the documentation for Clang is not really the best. Finally the Olympic games were no help, because that were too exciting to ignore that games. So a TV in my room interrupted me frequently from programming. ;-)

Thus after finish merging same code of the language support plugins I hadn't find many time to write the Clang plugin. As you can see my code this plugin isn't complete, but it's a good base to complete it.

Unfortunately I won't have time for Anjuta in the near future, because I have to write some exams and add some new feature to my other project Sudowars, which is open source since a couple of weeks. But I'm going to complete the Clang plugin and fix some bugs in Anjuta.

My thanks goes to the Anjuta team and specially on my mentor Johannes. They helped me a lot and I learned many things during Google Summer of Code. I would do it again at any time.

Status report: The new architecture of the language support plugins

by ritze

I'm finished with merging same code of the language support plugins.

The new architecture of the language support plugins

Now all same behaviour of the language plugins like when you start typing and got proposals are merged to one code base. The language support plugins implement their language-specific code through the new subinterface IAnjutaLanguageProvider.

The support class AnjutaLanguageProvider uses this implemented interface and executes the mechanism, which is all the same in each language support plugin. Additionally the language support plugins implement the IAnjutaLanguageProvider with the methods of AnjutaLanguageProvider. It's a little bit complicated, but look at the examples below.

Read more »

List the git repository changes during the last week

by ritze

Today I hacked a little bit on a modify git command. I read the blog article List the modified files on your repository from Filipe Kiss and thought, I could improve his command.

The basis is this:

git whatchanged --since="1 week ago" --format=oneline | grep "^:" | \
sed 's:.*[DAM][ \\''t]*\([^ \\''t]*\):\1:g'

I want to see, if a file was modified, attached or deleted, therefore I left the letters M, A and D and, in addition to that, I replaced the tab after the letter with a space:

git whatchanged --since="1 week ago" --format=oneline | grep "^:" | \
sed ''/.*A\\t/s::A\ :g'' | \
sed ''/.*M\\t/s::M\ :g'' | \
sed ''/.*D\\t/s::D\ :g''

But we live in the year 2012, so we need color:

git whatchanged --since="1 week ago" --format=oneline | grep "^:" | \
sed ''/.*A\\t/s//`printf "\033[33mA\033[0m"`\ /'' | \
sed ''/.*M\\t/s//`printf "\033[32mM\033[0m"`\ /'' | \
sed ''/.*D\\t/s//`printf "\033[31mD\033[0m"`\ /''

I don't want to see duplicate entries. The next is to delete the duplicate entries:

git whatchanged --since="1 week ago" --format=oneline | grep "^:" | \
sed ''/.*A\\t/s//`printf "\033[33mA\033[0m"`\ /'' | \
sed ''/.*M\\t/s//`printf "\033[32mM\033[0m"`\ /'' | \
sed ''/.*D\\t/s//`printf "\033[31mD\033[0m"`\ /'' | \
awk '!x[$0]++'

This method has one problem: The list could have two or even three entries of one file. One for modifiy, attach and delete. If you prefer to see only the latest action on this file, you can use awk '!x[$2]++' instead of the last awk command.

Now we only have to sort the list without being considerate to the action on the file:

git whatchanged --since="1 week ago" --format=oneline | grep "^:" | \
sed ''/.*A\\t/s//`printf "\033[33mA\033[0m"`\ /'' | \
sed ''/.*M\\t/s//`printf "\033[32mM\033[0m"`\ /'' | \
sed ''/.*D\\t/s//`printf "\033[31mD\033[0m"`\ /'' | \
awk '!x[$0]++' | sort --key=2

The command executed on my parser branch:

Highlevel GUI Inconsistencies: Tabbing


Everybody knows tabs and tabbed applications like webbrowsers or OO Calc.

The grouping of multiple instances/windows of a single application makes perfect sense and removes clutter from the user's workspace.

Firefox Tabbing

So what's wrong with it?

Its implementation! Basically tabs are nothing but window management + radio buttons. Somehow toolkit developers started to implement their own tabbed view and handled the window management. Everybody who's familiar with the X protocol (widely used under Linux/Unix) might have figured out already, what I'll be complaining about. X windows have properties. One of them is the window class. This window class property could allow a composite manager to provide a tab view. The tabview could provide a consistent look and feel accross toolkits and even expose tabs in a new (maybe even better) way. Seriously, all a window manager should be doing is handling windows/window groups. It's not the job of a toolkit! Toolkits may proxy tabbing for platforms like Windows, but they shouldn't implement their own!

Why are things the way they are right now?

I guess nobody can tell for sure. But I'd put my bet on a situation where developers said: "Let's implement our own tabview, so we're more awesome than the others.". And maybe they thought: "Our usecase for tabs is waaaay different than those of other applications.". Really? If I had to guess I'd say you'd need a text preview (maybe even a livethumb) connected to a 'show window' like mechanism.

Are only application/toolkit developers to blame?

No, I think it's mostly the fault of desktop environment/shell developers (I'm looking at you GNOME/KDE/Enlightenment/Cinnamon) who didn't show off how nicely tabview/application could be done in a generic fashion yet a bit customizable for using apps. I hope that will change and developers start to use infrastructure that is already there (e.g. PID+window class) instead of propagating inconsistency while making the world a 'better' place.

Maybe I'll even get around to implement some prototype 'generic tabbing' for Enlightenment and it'll gain traction and inspire developers of other desktop environments.

As an outlook of how I - personally - could imagine consistent tab experience, I'd like to refer to Clayton Miller's concept, he presents at 10gui. It already takes the transition of modern input technologies from hard buttons to more touch-based into account.