Clementine Player

A couple of years back, I was a big fan of Amarok, the music player. Then came along a rewrite and version 2.0, and I also switched to OS X. The version 2.0 was not very nice, stable or useful. The OS X version was very hard to install, due to the KDE dependencies. So I ditched Amarok. I replaced it with CogX for a while, and now I am using the horrid iTunes and the wonderful mpd (together with MPoD and Theremin). But today I read about the Clementine Player. It's a cross platform Amarok 1.4 fork. And after 10 minutes of testing, I think it's wonderful!


Emacs: Convert current buffer to utf-8

I just opened an old TeX file, which was still encoded in latin1. Now I wanted to re-save it as utf-8 in Emacs. This turns out to be very simple, as someone on #emacs at freenode told me. Just hit C-x RET f, and type utf-8 RET. On the next save (C-x C-s), the file will be written as utf-8.


Where to put a label on a LaTeX figure

I just found out that LaTeX is sensitive as to where you put the \label command in a figure environment. For example if you do something like this:
  \caption{Some caption.}
if you now do a \ref{fig:some-pic}, the reference will point to the parent element of the figure environment. For me, I got a reference to the subsection enclosing the figure. This was very irritating, because the text then said "see Figure for details."
Instead you need to place the label in or after the \caption command. For some reason the \ref will then point to the figure:
  \caption{Some caption.}
Update: And here is also the answer to the question why it is necessary to do it this way.


Another OS X git UI: SourceTree

Besides gitx, I now was shown another git user interface for OS X. It is called SourceTree:
It is more mature and feature-rich, compared to gitx. But it is closed source. However, it is free (as in beer) for the time being in the App Store. So far, the program seems really nice. Let's see how long I will continue using it, and if I'll go back to gitx at some point.


XCode 4 is incredibly slow

XCode 4 has always been incredibly slow for me. The first release, 4.0, was especially bad. But that was just a .0 version. The next release 4.1 is much better, but it has also severe drawbacks, concerning performance. Everytime I start it, and not even do much with it, my system gets incredibly slow. That is on both a C2D 2.8 GHz MBP and also on a quad-core i7 MBP. Both machines come with 4 GB of RAM, and after firing XCode up and loading a large project, still at least 500 MB of it remains free. However, speed is abysmal. I just found the tool vmmap in OS X, and it gives me this output:

==== Summary for process 32136
ReadOnly portion of Libraries: Total=265.8M resident=114.4M(43%) swapped_out_or_unallocated=151.5M(57%)
Writable regions: Total=16.2G written=149.6M(1%) resident=360.9M(2%) swapped_out=6156K(0%) unallocated=15.9G(98%)
REGION TYPE                      VIRTUAL
===========                      =======
CG backing stores                  19.4M
CG image                            268K
CG raster data                     2840K
CG shared images                   3472K
CoreAnimation                       180K
CoreGraphics                         16K
CoreImage                           108K
CoreServices                       1704K
IOKit                              61.2M
MALLOC                            337.4M        see MALLOC ZONE table below
MALLOC (reserved)                  15.6G        reserved VM address space (unallocated)
MALLOC freed, no zone              30.5M
MALLOC guard page                    64K
MALLOC metadata                   128.8M
Memory tag=240                        4K
Memory tag=242                       12K
Memory tag=243                        4K
Memory tag=249                      156K
Memory tag=251                       64K
OpenCL                               60K
OpenGL GLSL                        1372K
OpenGL GLSL (reserved)              128K        reserved VM address space (unallocated)
SQLite page cache                  14.6M
STACK GUARD                        56.1M
Stack                              19.7M
VM_ALLOCATE                        16.1M
__CI_BITMAP                          80K
__DATA                             33.9M
__IMAGE                            1256K
__LINKEDIT                         59.5M
__TEXT                            206.4M
__UNICODE                           544K
mapped file                        72.9M
shared memory                      13.6M
===========                      =======
TOTAL                              16.7G
TOTAL, minus reserved VM space      1.1G

So the virtual memory space that XCode takes is more than 16 GB! The actual memory taken is "only" 1.1 GB, which is still huge, but my Emacs also takes 500 MB with tons of C++, Python and LaTeX buffers open.
The question is: can the unallocated, but reserved 16 GB address space degrade the performance? I have too little knowledge of the workings of virtual memory on Intel CPUs under OS X. But this value seems incredibly huge.

Update: I have asked a question on Stackoverflow, and have gotten some useful answers. What did help was removing my build/ folder from the git. Accidentally, a colleague checked in four files in the build/ folder. This made Xcode very slow, since it was checking the git status during compilation all the time. Still, Xcode 4 is much slower than Xcode 3 after this. So I also upgraded our machines to have at least 8 GB of RAM. This was definitely much of an improvement. It seems that development machines using Xcode 4 should have 8 GB RAM minimum. The more, the better...


LaTeX formulas in gnuplot

As a reminder to myself: On the TeX Stackexchange, there is a nice question and discussion by me and some helpful people on how to use LaTeX code in gnuplot / how to embed LaTeX equations in a plot. A copy of my revised answer:

First, we set up a gnuplot called test.plt:

plot [-5:5] [-1.5:1.5] sin(x+pi) title "$\\sin(x+\\pi)$"

Then we also set up a small Makefile:

.SUFFIXES: .plt .tex .pdf

%.tex: %.plt
gnuplot -e " \
	set format '$%g$' ; \
	set terminal epslatex standalone color ; \
	set output '$@' \
	" $<

%.pdf: %.tex
	pdflatex $<

all: test.pdf
Running "make all" will produce this plot:


Emacs other-window backwards

I am currently writing a lot of text in Emacs, and I need to work on multiple files in parallel. So I use the split window functionality a lot. With C-x o you can switch to the next split window. However, it would be nice to go backward as well. The solution is simple, and is given on Stackoverflow and some other blogs:

(defun prev-window ()
  (other-window -1))
(global-set-key (kbd "C-x p") 'prev-window)

Just put this in you init.el, and you can cycle backwards using C-x p.


SSL Everywhere for Safari

The EFF has published a Firefox extension to force HTTPS on as many websites as possible. This is a good idea(tm). But on OS X I use Safari, not Firefox. So I was wondering if there is a similar extension for Safari. It turns out there is. However, this extension is available in source only. The reason for this is given in a blog post by the developer. In short: The Safari extension API is limited, and the extension cannot guarantee that all your session cookies are transferred via HTTPS, making you vulnerable to stuff like Firesheep. And that is a bad thing(tm). But it is still useful, since it will redirect you to secure versions of the websites. One thing to note when following the build instructions: You need to enroll in the free Safari Dev program, and get a developer certificate. This is very well described over at Apple's developer center. After that, you can enable the developer menu in Safari's settings and just install the extension from the cloned git repository.


What are the best Web Galleries?

I am one of the few avid MobileMe users. I use the gallery and like it. Nice upload features, integration into iPhoto. Not perfect, but it does the work, plus I have lots of disk space. However, Apple makes the transition from MobileMe to iCloud. During this transition, several features of MobileMe will be dropped. Besides the very useful syncing of keychains between computers, the gallery will cease to function. Some strange photo stream service will be introduced, which does not seem to be a real gallery replacement, but more like a large cache of you last 1,000 pictures taken. Useful, but only to a limited extent. So what are my alternatives? I need (in order of importance):

  • Share with other people (who are not signed in, a la Facebook)
  • 5-10 GB space for pictures or more
  • Able to make photo albums, user gets a nice web browser based viewer
  • Option for users to download the photos
  • Optional high resolution versions of photos (2048 pixels or more)
  • Good integration with iPhone, iPhoto et al.
I would pay for that service, if it includes 10 GB space or more. 

I already found out that Flickr and Picasa Web offer unlimited space, but in the free version there are quite the restrictions (limited image resolution, image usage by hoster, limited number of photos that can be controlled, advertisements, ...). Plus for example the Picasa Web Uploader for the Mac is horribly outdated (iPhoto '08...?).

So what other options are there? Which one is the best?


Even better gitx with push/pull support

Many moons ago, I posted a link to brotherbard's fork of the GitX GUI for git. There is an even better fork, which is based partially on brotherbard's work, and which is currently actively maintained. You can find it over at German Laullon's website.


Switching the active branch in a bare git repository

If you ever need to delete the "active" branch in a git repository, you need to first switch the active branch. Because you cannot delete the branch you are sitting on... You cannot checkout a branch, as you would usually do. You have to change the symbolic reference called HEAD. You can do this with the symbolic-ref command:

$ git branch
* deletethis
$ git symbolic-ref HEAD refs/heads/somebranch
$ git branch
* somebranch
$ git branch -d deletethis

Accessing the keychain in OS X from the command line

There is a very useful utility called security(1) in OS X, which lets you manipulate your keychain from the command line. You can easily im- and export keys and certificates using this. This is especially useful for AppStore developers, who code on multiple Macs. Having the signing keys in sync is kind of a challenging solution, if you don't use keychain syncing via MobileMe. For example you can import a key like this into your login keychain:

$ security list-keychains
$ security import -k /Users/yourguy/Library/Keychains/login.keychain somekey.pem
1 key imported.

Hope this helps.


Installation of the EQ3 SynScan Upgrade

I just got the Skywatcher EQ3 SynScan Goto Upgrade. It comes with lots of documentation. For example on how to wire up the controller boxes. However, it does not explain, how to mount the motors, that come with the upgrade box! And neither does the EQ3-2 manual.

Hence I will describe how I installed the motors. I don't know if I did it correctly, but my SynScan seems to work, so I cannot be far off. If you use this description for assembling your own upgrade kit, you do it on your own risk! You have been warned... By the way, one screw was left over in the end. But isn't it always?

So the first thing to do is to remove your telescope, your counterweights and the flexible tuning knobs. This leaves you with your tripod and your EQ3 mount. I am describing this for my EQ3-2 with aluminium tripod (rectangular legs).  If you have an EQ3, NEQ3 (round legged steel tripod) your mileage may vary. The manual first tells us to mount the holders for the motor controller and the SkyScan controller. The first one is a bugger: it's made for the round legged tripod. But do not fear! We can use a rubber band to help it stay affixed to the aluminium legs. Make sure the ground plate has contact with the aluminium legs!

Next up are the gears for the motors. They are not labelled, so I had to figure them out myself. The big one is for the Dec motor, the small one for the RA motor. The motors themselves also were not labeled. The naked one is the RA motor, the boxed one is the Dec motor.

Ok, so we will begin with the RA motor. This is the place where it will be mounted:

There is already a screw here, and the axle for the gear. Mount the RA gear on the axle, so that it fits nicely with the end of the axle. This will be the right height for the RA motor gear. use the two small inset screws to firmly attach the gear. Make sure not to make it to loose, nor to tight! Then you can attach the RA motor as pictured on the mount point. The mounting plate will fit snugly into the corner of the mount, and will keep the motor in place. You can jiggle it around before fastening the screw, so that the two gears fit well together. Check the photos on how this should look from the front and behind.

You noticed that there is a cable hanging from the RA motor. Find the black casing with the two DIN sockets. It will have a fitting socket for the dangling cable. Attach both and put the casing on top of the motor and the gear assembly. Take good care to carefully wrap the coloured cables into one corner of the black box! They fit in there, without any trouble, but you have to find the right corner. If you managed to fit the box, you will see two screw holes ligning up on the front and top of the box.
Use the two tiny black screws to fixate the RA box. The top screw might be hard to reach, even with the small screwdriver that comes with the kit. I used a ratchet with a PH bit for this part.
Ok, that's the RA assembly. Now for the Dec motor. The mounting point for this is on the other side of the EQ3. See the picture for details.
The mount point where the screw belongs is circled. first, attach the Dec gear. Leave about 1/2 mm space between the mount and the gear. Again, there are two small inset screws to fasten it. You can adjust the gear again later, if needed. Now attach the motor using a screw and a washer (they come with the upgrade kit). With both motors, test if the gears touch tightly enough, so they will not skip, and they will not have too much friction either. See the picture for a view of the mounted motor. Strangely, I could not get the Dec gear to be parallel with the motor gear. But still, the whole thing works. I might try to re-align it later.

That's it! Now you only need to attach all the cables, as described in the manual, and you're ready to go, or to go-to. :) I still had one thing left: a black soft rubber thing. If anyone knows what it is for, please drop me a note. It was not described in the manual either.


Note to self: codesigning for OS X and iOS on the command line

As a reminder for myself, here is how you can codesign an OS X application for the AppStore on the command line:

codesign -f -s "3rd Party Mac Developer Application: Your Company" -v YourApp.app
productbuild --component YourApp.app /Applications --sign "3rd Party Mac Developer Installer: Your Company" YourApp.pkg

There is a lot more to do, of course, like having the correct bundle ID set, but this speeds up codesigning, if you do not use XCode to build your application.

For iOS it is pretty similar, except you don't need the productbuild:

codesign -f -s "iPhone Distribution: Your Company" -v YourApp.app


Fixing broken GNU texinfo dir file on MacPorts

Somehow, MacPorts does not seem to update the GNU texinfo dir file contained in /opt/local/share/info. But there is a nice script available in the ctan, which generates a new dir file. You can download it here.


Saving matplotlib plots as PDF

I recently started using matplotlib together with PyQt, and I love it. It's awesome and has many more features compared to PyQWT. However, I needed to save the plots to a PDF file. Here is how you do that:
import matplotlib.backends.backend_pdf
   def printPlots(self):
      filename,_ = QtGui.QFileDialog.getSaveFileName(self, "Save plots as PDF file", "", "Portable Document File (*.pdf)")
      if filename == "":
      pp = matplotlib.backends.backend_pdf.PdfPages(filename)

Assuming that your figure is called self.plotFigure. You can connect the above slot to a QAction and map it to some nice menu item or shortcut.


Is "not None" maybe "Something"?

I just had a funny thought. In Python you can write:

if not someObject is None:
    print "someObject is None!"

This reads a bit strange. So what if you could alias "not ... is None" to "... is Something"?

if someObject is Something:
    print "someObject is None!"

It seems that this idea was thought of almost eight years ago already. This lead to some PEP 0326, which got rejected. If Python were a macro or functional language, you could probably hack something up to do the same thing, but it does not work like that:

>>> Something = not None
>>> Something
>>> A = [1,2,3]
>>> if A is Something:
...     print "This is something"
... else:
...     print "This is nothing"
This is nothing

The problem here being, that "non None" is immediately evaluated to "True", since "None" can be implicitly converted to "False" in a boolean sense. Was a funny thought, though.

Update: Turns out you can at least write "if someObject is not None:", which is more readable.


Static Libraries in XCode 4

Someone at Carbon Five posted a nice article about XCode 4 and using external dependencies. For XCode 3, I already know how to use direct dependencies and static libraries. The above article seems pretty well explained, though I have not yet tested it. I will try to give some feedback once I have the time to try it myself.


Direct Dependencies in iOS projects

I found a nice blog entry that explains how to build static libraries and dependent projects with XCode. This is quite nice for iOS development, and relatively elegant. The only thing that bothers me is that the search path for headers has to be augmented manually. I wonder if there is a nice solution...


Controlling MPD with the iPhone

I just installed mpd on an OpenWRT router. It works great and I can recommend using MPoD for controlling it. The whole thing looks like this then:


Alignment of double values on ARM architectures

Consider the following code:

class C {
uint8_t *data;
size_t size;

void writeDouble(double v)
    reinterpret_cast<double*>(this->data)[this->size] = v;
    this->size += sizeof(double);


Looks harmless enough, doesn't it? But here is the problem: It's not necessarily portable or well behaving code. After debugging for about three hours, I found out something interesting. Namely that on ARM platforms, such as the iPhone, double values on the stack need to be stored at 8 byte aligned memory addresses. This was some existing code I was using, so it took me a while to get to this function and to its problem. Single precision float values have no such restriction, by the way. There are two workarounds in the above case. 1) Write a small for-loop that casts the double value to a uint8_t * and copy the double value byte-wise, or 2) use malloc to copy the value. I did the for-loop, since I thought that maybe the malloc call has too much overhead. I guess you could also cast the double to a uint32_t * pointing to two 32 bit words. Anyway, take care when doing such drastic casts. Some platforms might want alignment for some datatypes!


Valgrind checking of iOS programs

Well, this is awesome news. First, valgrind has been available for OS X for some time now. And second, you can use it to check your iOS programs on the simulator with it.

The idea here is to let your program spawn valgrind itself. Because you cannot tell the simulator to run the program through valgrind. Well, maybe you could build a funky bundle, but I think this works just fine. So here is the  code, taken from the above link:

#define VALGRIND "/usr/local/valgrind/bin/valgrind"
int main(int argc, char *argv[]) {
    /* Using the valgrind build config, rexec ourself
     * in valgrind */
    if (argc < 2 || (argc >= 2 && strcmp(argv[1], "-valgrind") != 0)) {
        execl(VALGRIND, VALGRIND, "--leak-check=full", "--dsymutil=yes", argv[0], "-valgrind",
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, @"PeepsAppDelegate");
    [pool release];
    return retVal;

You will obviously want to define the VALGRIND_REXEC macro, if you need valgrind output. You can also pass different command line arguments to valgrind. E.g. you can switch to different valgrind tools this way, or pipe everything to a log-file.
Update: I finally got around to trying out this method. One problem here is that valgrind will fail to run, since it tries to open /dev/random, which I guess is not allowed for sandboxed applications. But one can fix this by patching and recompiling valgrind, which is not too hard. Especially when using MacPorts. Furthermore, I needed to add --dsymutil=yes to the valgrind options, or else the program would just crash.


Conditionally rewriting mail subjects using exim4

Since MobileMe sadly does not support filtering using RegExps, and I get a lot of heterogenous system mails from our computer systems here, I implemented a workaround. I added some text like [System] to the subject, which can be filtered fine by MobileMe.

All of our machines here send their mail to a central smarthost running exim4. All the system mails are directed to "root" at some of our machines. What I did was first adding a file /etc/exim4/exim.filter containing this:

# Exim filter
if "$h_to:" matches \Nroot@.*\.your\.domain\.de\N then
headers add "New-Subject: [System] $h_subject:"
headers remove subject
headers add "Subject: $h_new-subject:"
headers remove new-subject

Since we are running Debian, running exim4 in split configuration, I also added the file /etc/exim4/conf.d/main/80_exim4-config_system_filter, containing this:

system_filter = /etc/exim4/exim.filter

After that I had to run update-exim4.conf and /etc/init.d/exim4 reload. Then I was all set up.


A very small and simple PyQt OpenGL widget

For all of you who would like to have an OpenGL widget for Python. Here you have it! It's very basic. The minimal thing is to overload the paintGL() method. Here is a screenshot:
Good for prototyping or writing small test programs.


Python class attributes versus instance attributes

Today I finally found out the difference between class and instance attributes in Python. In C++, this is done by putting the static modifier in front of the declaration. Consider the following code:

#!/usr/bin/env python

class B:
    b = 2

class C:
    a = B()

    def __init__(self):
        self.a.b = 1

c = C()
c.a.b = 3
b = C()

print c.a.b, b.a.b

Here, a is a class attribute of class C. That is, there exists only one such attribute for all objects of kind C. So the output of the print statement will be "1 1". This is the same as a static attribute in C++. But often I want an instance attribute. The correct way to do this would have been:

#!/usr/bin/env python

class B:
    b = 2

class C:
    def __init__(self):
        self.a = B()
        self.a.b = 1

c = C()
c.a.b = 3
b = C()

print c.a.b, b.a.b

Now the output is "3 1", just as expected. I guess this all somehow makes sense in the Python world, but I tripped over this, and worst of all: Sometimes you don't even notice. If the class attribute is a simple type, like int, the first solution would have worked. However, I have not yet understood why that is the case. One more Python semantic that eluded me so far.


Mobile blog

Finally. My blogs now also support mobile devices with rendering suitable for small screens. All thanks to Blogger, who have introduced a beta version of the mobile templates via their beta program. You can force the template on every blog by appending "?m=1" to the blog URL. On your own blog, you can just enable it in your blog's mobile settings via draft.blogger.com. Here's how my blog looks in the mobile version:


Note to self: C/C++/ObjC code completion for Emacs using CLang

I have to try this out some time: There is an Emacs mode for code completion using CLang. It is mentioned in a blog entry by some guy. The nice thing here would be, that it enables ObjC code completion, which is a good thing™. Especially if your are coding for OS X or iOS.


MapReduce on CUDA using Python (and a Discontinuous Galerkin solver!)

As volcore pointed out, there is a library called pycuda, which allows for CUDA programming in Python. It also comes with a nice ReductionKernel class, which allows one to rapidly develop custom MapReduce kernels.

Update: Even better, the same author has published a Discontinuous Galerkin solver, based on the same stuff. This can be used to solve partial differential equations, e.g. for fluid simulations, but also for EM simulations, using Maxwell's equations.

Cleaning up MacPorts

I like to use MacPorts for installing certain libraries and programs. When running an update old versions are still kept on your disk. I never did care for those old versions, so you can simply let MacPorts remove them while updating:

 $ sudo port -u upgrade outdated

This is taken from another blog post.


Setting the sender of git post-receive hooks

There is a nice stackoverflow posting about how to set the sender of git post-receive hooks. I used this, slightly augmented:


# Use the name and email address of the author of the last commit.
USER_EMAIL=$(git log -1 --format=format:%ae HEAD)
USER_NAME=$(git log -1 --format=format:%an HEAD)
. $(dirname $0)/post-receive-email

I then also changed the default post-receive-email script, to look like this in the send_mail() function:

  if [ -n "$envelopesender" ]; then
    /usr/sbin/sendmail -t -f "$envelopesender"
    /usr/sbin/sendmail -t -F "$USER_NAME" -f "$USER_EMAIL"
This will let the emails come from the last user in the git log. This is only a hack, and might break or not make sense under certain circumstances, but is good enough for most of my needs.


Pimping MobileMe #1: Expiration dates on folders

Well, MobileMe does not yet support the expiration of mails in folders. Especially for mailing lists, I want this feature. After let's say 90 days the mails should be automatically deleted. I do not need to store mailing list contents for longer. So I took the nice tool imapfilter and wrote a config file that expires old mails from a selection of folders. I installed a cronjob on my web server that now automatically calls imapfilter every night. The config file (~/.imapfilter/config.lua) looks like this:

Myaccount = IMAP {
   server = 'mail.me.com',
   username = 'your.name@me.com',
   password = 'yourpassword',
   ssl = 'tls1'

folders = {'folder1', 'folder2', 'folder3'}

for k,folder in pairs(folders) do
   foldername = 'Mailinglists/' .. folder
   results = myaccount[foldername]:is_older(90)

My mailing lists are hosted under a sub-folder called "Mailinglists", as you can notice in the config file above. You can tweak this to your liking. It might also be useful to set different expiration dates. It's easy to augment the lua script to do so.


Migrating from GMX IMAP to MobileMe IMAP

I am currently migrating my >4GiB of mail data from GMX to MobileMe. I have been using offlineimap regularly to backup my mail data. So first step was to update the backup. Now the next step is to run imapsync, which can migrate whole IMAP accounts. The full command I am using for this is:

imapsync --sep1 '/' --prefix1 ''  --ssl1 --ssl2 --authmech1 PLAIN --authmech2 PLAIN --host1 imap.gmx.net --user1 "yourname@gmx.de" --host2 mail.me.com --user2 "yourname@me.com"

I will report back once the sync has finished, this might take a while.

Update: Yup, it worked. My mail is now hosted on MobileMe. More disk space. What is missing at MobileMe is that it does not support automatically expiring mail folders. I.e. for mailing lists, I sort the mails into subfolders for each list. The lists are often high volume traffic, and not very important. So I'd like the mails to expire after, say, 30 days. With GMX this was not a problem, but MobileMe does not yet have such a feature. However, I found a nice tool called imapfilter. It allows you to do all kinds of stuff, besides other things it allows you to filter mails according to date and to delete them. This is what I will do. I'll write another post, when I found out how to do that exactly.


ImageMagick: Convert RGBA to RGB in a sane way

When using ImageMagick to convert an RGBA picture (e.g. an OS X window with shadows) to an RGB JPEG file, you should use the following command:

$ convert input.png -flatten +matte output.jpg

If you don't do that, you will end up with a picture like this:

The right conversion leads to this result instead:


Humble Bundle Games: Braid

I just tried out my second game from the Humble Bundle 2. This one is called Braid. It is a 2D puzzle platform jump and run with a little twist. In the first world that I just started, you can let time run backwards, by hitting the shift key. Other than that, you only have the arrow keys for moving around your character and the space bar for jumping. The graphics are wonderful, in style akin to a aquarel or water colour painting. The music is some violins playing a melancholic soundtrack. The worlds seem to be designed with a lot of love, and it's nice to see a jump and run game with more puzzles than fast action scenes. It's somewhat of a change. Here's a nice screenshot of one of the first levels: