Donnerstag, 21. Januar 2016

Building Cantor From Git

And why it took me 24x longer than it was meant to

A task I had to do is to build any KDE application from git. As I have mostly worked with Cantor (and even written a blogpost about it) I of course chose this app. As a beginner, compared to other people in the KDE community I had no clue where to download the Cantor source. One question in the Telegram group and I directly got the git link.

From there on, I faced multiple problems I didn't expect.I just installed openSUSE on a virtual machine, so I realized that the software I needed wasn't even preinstalled. I though that git would have been enough popular to be installed directly when getting linux...

I even didn't know where to get git from, apart from the internet. People told me there is a 'software manager' (Yes I'm really a beginner).
So after some research, I found it, got git and cloned the Cantor source – just the very first step of everything. Reading the README for what I had to do then, I thought that it was pretty simple - 5 easy commands!

I just again got errors from the commands that some necessary packages and programs weren't installed like CMake and some other related stuff. Those errors said what is missing – but by the name the errors called it, it wasn't existing in the software manager. After asking the KDE community again, I found out that the names of the packages differ between the linux system used – but the errors don't.
Finding the needed packages and installing all those 'necessary things' took me so long. But (taking me 3 days) I managed to do it, so here to full instruction on building Cantor, and any other KDE application from git on openSUSE:

sudo zypper install git

git clone  git://

cd Cantor

Then follow the commands in the README:

mkdir build
(creates build directory)
cd build

(locate into it)
For the next step you will need to go to your software manager YaST2 and search for and install the following:
(-cmake gui if you want, but not necessary)
-extra cmake modules (ecm)
Then you can keep going:

cmake-DCMAKE_INSTALL_PREFIX=/Another/directory /where/tohave/thefinished/program -DCMAKE_BUILD_TYPE=debugfull

Those are the final two commands:

sudo make install

Keep in mind that sudo gives you administrator permissions and you will have to type in the root password.

And that was it! You can now jsut locate to the directory you set in the cmake -DCMAKE_INSTALL_PREFIX command and start Cantor!

This beginner task is meant to be 'done in 3 hours' – Google. Well, I guess this evaluation might be for more experienced linux users because altogether it took me like 3 days :(.
I was really happy when everything worked: I could just start the program and use this comfortable environment: Because with Cantor, there is no need for setting up some other graphic libraries or something like that. You just type in the few command lines, press the button and everything works :) .

Although I felt like an idiot, not knowing basics of linux (whole life usage of windows) I feel that I'm getting used to it and am glad I accepted this task as it teaches me working with this OS.

Mittwoch, 6. Januar 2016

Creating lessons with Cantor

As a student from the competition Google Code In, I saw that there is a task to create lessons in Cantor. Although I haven’t worked with this KDE software before, I accepted the task.

First of all I wanted to test some examples to get an overview of how Cantor works. Having no idea, I downloaded some of them and tried using them, without even knowing what a backend is. Of course it didn’t work and I was getting errors I’ve never heard of and there was text displayed I didn’t know what to do with.

After spending a bit more time on this program, I figured out that it is actually pretty simple: You choose the backend (programming language) and simply type commands, like for example plot(3x…) in and Cantor executes them. When I knew this I found it really easy to create my 2 lessons: Trigonometric – and Polynomial Functions. All I had to do is to type the functions in a specific format in and they were instantly plotted after just clicking “Evaluate Worksheet” – no other configurations and settings!

I successfully finished the task with the math knowledge from school. I’m happy I got through this and now know another program I might need in the future.