Tuesday, December 28, 2010

Installing Fedora

Well, I planned on having it installed on my system sponer, but it turns out backing up data (all in all around 50GB) takes quite some time. The external drive I'm using seems to write at only 4-6 MB/s...
In addition, the vfat filesystem apparently can't handle files of >=4.2GB; luckily I only have 4 of those (one 6.5GB and the others 8-9GB each), so I was zipping them to then split them into 4GB chunks (resulting in 8 pieces). While copying those, the transfer-rate was at only 3MB/s ^.°
That took like... 6h more than expected o.O

Then moved them on the external drive .... and finally! Let's install Fedora!

I liked Anaconda and at 2AM I got my first view of a new desktop:

After sleeping and setting stuff up, I broke Goggles Music Manager:

I got those -2 songs in the queue resolved, but it would only play one song and then stop.
So I installed Rhythmbox.

Oh, and I wanted to show my new, fancy, self-made wallpaper:

Now about Fedora so far:

yum seems a little slower in searching packages than apt-cache or aptitude, but just as imprecise. Another down is that the package-names are a little inconsistent. Bash-autocompletion for the packages also reacts slower and only works for the first package.
In Ubuntu all libraries were prefixed with lib, while in Fedora some are and some not.

I like yums output a little more than apt-gets though. Generally still a plus for Ubuntus apt-get, unless I somehow configured it wrongly.

Fedoras integration of LXDE works better out-of-the-box than the lubuntu-meta-package of Ubuntu.

Again, on the other hand I'm having some problems with the Flash plugin. It mostly, but not completely, works now; I have hope in the lightspark-project though.

Am I glad to have switched? Well, at least glad that I wiped my old system; If I am glad about the new one will show in time.
I feel a little better about Fedora, but probably just because I've set it up properly, unlike my previous system.

Saturday, December 25, 2010

Tuesday, December 21, 2010

Fedora, here I come!

Yep, Fedora is the one I have chosen.

Lately I have found some packages to be a tiny bit dated. Well, mainly because I was looking for brand-new stuff that I pulled stuff from source repositories and compiled it myself.
Then I looked up a few distros on DistroWatch (a fine site if you want information on a bunch of different distros), and found Fedora to have the most recent versions available. Since it's also one of the most popular (at least according to DistroWatch) those releases seem to be stable enough.

I also had a closer look at aptosid (Debian Squeeze sid/unstable), but for some reason it doesn't get much attention from the security team (second paragraph on the sid/unstable-page), while - at least according to Wikipedia - Fedora has security at a high priority.

I have vacation until New Years, so I will use that time to scrap the data I need together, probably borrow the external harddrive from my sister to back up that data and install Fedora in place of my current Ubuntu.

I've been looking around for a new OS, because when I first set up this Linux it wasn't planned to stay very long. But like usual I got used to it and kept it like it is.
This resulted in a minor disaster within the filesystem and some stuff not being properly configured.

At first I thought of simply re-installing Ubuntu and this time also properly partition the drive, but while thinking ahead to that I was reminded of sidux (the former aptosid).
Fun Fact: Those libraries I was missing are also not present in my current distro anymore (well, the libraries are, but not the developer version).
The thing about these libraries is, that they are dated and were deprecated by a new branch (2.0). And keeping old stuff maintained beyond a certain point is unnecessary work.

This got me thinking of using aptosid, which in turn fired the oven to look beyond, my next target being Arch Linux.

Anyways, now that I'm going to settle with Fedora I'll be sure to post a screenshot of my finished Fedora-installation. I already made a new wallpaper, which replaced my current (well, now old) one and is going to replace the default Fedora one :3
I'm primarily interested how yum will do instead of apt-get. Though if for some reason I should like apt-get more, I can always use apt-rpm :)

Monday, December 20, 2010

Linux != Linux

For those who are not C-savvy: != is the ≠ of (C-like) programming.

Well, clearly Linux == Linux (== is the = of (C-like) programming), but what I meant is that there are lots of different distributions (just look at this fine graph I found on the Wiki-page :3).

Or.. are they really that different?

Just a few moments ago I was researching in quite a bunch of distros; among others there were Arch Linux, Debian (Squeeze), Fedora, openSUSE, Slackware and Ubuntu (which I am using right now). Those are quite popular ones and that usually means it's proven itself and is well maintained.

What defines most of how an OS feels like is the way to configure stuff and the looks. The looks are quite uniform; GNOME is probably the most popular desktop environment, KDE being very wide-spread as well (and just as known).
Xfce for those who like a more minimalistic, but still feature-rich desktop and LXDE as a - as it seems not (yet?) - quite as popular environment and promising an even more efficient desktop than Xfce. It also seems to be more modular to me, due to an obvious component-based design.

It gets even more minimalistic with pure window managers, such as Openbox, Fluxbox, IceWM, ... and even more with tiling window managers.
I'm not sure how many people use compositing window managers, afaik those usually run as a back-end to some desktop environment (again, GNOME, KDE, ..).
I don't really know what's popular in those categories.
I prefer Openbox due to its (quite) minimalistic nature and compliance to the ICCCM and EWMH standards.

Furthermore I choose LXDE, because it offers all I need and still looks sleek. I find minimalistic GUIs to be appealing, it's not just because I want it memory-saving or something; though that is still a welcome effect.

Well, I didn't actually want to get so deep into explaining stuff, but now that it's already there...
Alright, so what's left is the configuration-part. Most (popular) Distros configure themselves upon installing and if you want to tweak something, there are mostly GUI tools.
I've come to like the terminal emulator to do stuff, because I don't have to search for programs in the menu (though stuff is usually easy to find, within a few keystrokes I can also do it in the terminal) and I don't have to wait for the window to pop up, find the button and so on.

This is really no major thing and if I hadn't a terminal I would have no problems doing it with the GUIs; I'm not an elitist here, I just got used to it.

I think most of the configuring part in Linux has roughly the same syntax. Some programs like to use XML though, which to edit in nano is not as convenient as using a simple GUI text editor.

As I've listed Arch Linux up there, it is said that in Arch you don't get as much GUI sugar. This is one of the reasons I was quite interested in it.

So, well, if configuration and the looks are almost the same in most of the popular Distributions, then what to decide on?
At first I just thought about staying with Ubuntu, but I did indeed find another aspect. And this I will discus in my soon to follow blogpost, as that one is getting large enough...

Sunday, December 12, 2010

Finding Scheme

Well, actually Finding a Scheme Compiler/Interpreter, but that way it matches better with the previous post :3

At first I thought of simply searching the Ubuntu-repository for 'scheme' and 'scm', however there were only programs with a slightly different name.
Then I searched for a reference-implementation, which there is none. Then I googled for 'most popular scheme interpreter' and found MIT/GNU Scheme.

I though, "Fuck Yeah! MIT and GNU, I can't go wrong!".
I then tried the repository again, to find out that for some reason it has been removed in the past. Without worries I went on and downloaded a source-packet specifically for x64 Linux and tried to compile that.
iirc it simply failed to compile.

So then I tried the portable C source-package and after a while it was finished. Trying to start it however downright crashed.
Trying to debug it, the debugger had no message except 'SEGMENTATION FAULT' and the stack-pointer being at 0x0000000000000000.

Lucky me I found Ypsilon, which had just one source-code for every supported platform, which compiled just fine and ran as well.
It also supports the newest language revision and claims to be well optimized, also for multi-processor systems.

So far I had no problems and did a few Project Euler exercises in Scheme to get me used to it, but of course it won't cut it, since mathematical problems only require a subset of the languages capabilities.
I guess I will just read on the ebook I have and let the university give me better problems to solve :P

Learning Scheme

I decided to do something programming-related. I don't exactly remember where I left off on my experimental project, which I still plan to revisit, but soon I'll be going to a university.

I'll be attending the TU Darmstadt and I'll be majoring in Computer Science.

There, so I've heard, we'll be learning Java and Scheme. Now, Java I kinda know already, but Scheme not so much. I actually don't know any functional language.
If it wasn't for the CS courses there, I'd probably have chosen Common Lisp or Haskell. Possibly F#. The reason is that I've heard of those before, while I never before heard of Scheme.

People seem to be complaining about different operator notation (e.g. to add two numbers x and y you write (+ x y) in Scheme, while in for example C or Pascal it'd just be x + y).
However, doing it the 'Scheme-way' makes sense in the way that you call to other functions, which are not represented as simple symbols, the same way (e.g. (square-root x), while in C or Pascal that'd be square-root(x)).

And I heard people complaining about lots and lots of parenthesis.
At first I though you can probably get through with it if you indent the code properly, but there's really a shitton of parenthesis.

While I do wonder if this language has any value for bigger, serious projects, I can't compare it to any other functional language, since it is the only one I know so far. At least it make me think of different approaches to programming problems; the language is basically centered around using recursion.
I've read about 1/3 of the introduction I am using and so far had no problems understanding everything.

The next blog-post will be a follow-up. I could write it right now, but this would make this post larger and this way I can also claim to post a tad more frequently than I really am :3

Monday, December 6, 2010

Ankle Pain

I've had some weird problems with my right ankle two months ago (I couldn't bend my foot in a certain way without pain), which seemed to have occurred randomly.
Sadly the soonest appointment to see the orthopedist was a month from that, and when that day came, that problem was almost, though not completely, inexistent.

During that time I didn't go to sport, with two exceptions before the appointment since my foot was doing quite good.

Well, the doctor couldn't find out what's wrong, prescribed me pads for my shoes though. Shortly after that I twisted my ankle in sport. Though the pain was quite serve at first, most of it went away in about a minute.
I told my superior and went to the hospital the following day.
The doctor ordered a X-ray and didn't see what's causing it to swell and slightly pain when putting weight on it.

She told me to stay home for a week, wear a splint, rest the foot and lay it high.
Funny that exactly by that time I got a cold, and quite a serve one, too.

It looks good now and my cold is mostly gone (just a little rest stuck in the nose), though my old woe on my right ankle came back.

Again I'll take a time out.

During that time I didn't do much. I mostly just watched some movies and surfed on the Internet. That idleness seems like it will continue quite a while more :(
I also saw Dollhouse, quite an interesting show, although it only lasted two seasons.

Monday, November 22, 2010

Building g++

Trying to go down the clang-route failed. libc++ supposedly is not in a working state, at least for Linux.

So then I decided to build a trunk-version of g++ (well, gcc, g++ and libstdc++). Said, done. I also build it with LTO support.

The trunk of gcc is 1.3GB, the build-directory 1.9GB according to du.
Timing of the build (just the call to make, not including the call to configure and make install):

real 98m55.125s
user 101m28.610s
sys 5m39.180s

g++ -v output:

z33ky@mobileblahbuntu:~$ g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-gold=both --enable-languages=c,c++ --with-gold --enable-build-with-cxx --enable-lto --disable-multilib
Thread model: posix
gcc version 4.6.0 20101120 (experimental) (GCC)

Attempting to build my current project failed after that, but the errors were quickly fixed.
Now I am re-writing a small part of the code making use of unrestricted unions, where I had a union of pointers before.
Yawn!! BORING!!

Saturday, November 13, 2010

Building clang

So, I decided to get libc++ and use it instead of libstdc++.
They're both implementations of the C++ Standard Library.
For those who don't program: A Library contains stuff a programmer can use, so he doesn't have to write it for himself. For example algorithms for sorting a list of numbers.
The Standard Library is special to other libraries, because it's part of the C++ language.

I ran into a problem with the C++0x's random number generator, producing numbers outside the range [0..1], although I told it so. Supposedly this is a known problem, but since I cannot use clang with libstdc++ C++0x-features, I decided to get libc++ and use it instead of libstdc++.

When I installed clang, it came without clang++ (which basically is clang, except it adds some flags to properly compile C++ code) for some reason, and I always had to explicitly state to link against the C++ Standard Library. Since libc++ didn't seem easily configurable I downloaded the llvm (required to compile clang) and clang source codes to compile them myself and finally obtain clang++.

So, first I used gcc to compile it, then I wanted to use clang to compile them.
The first problem was some bug in the configuration utility when using automatically selected optimization flags. I found out through trial and error.
Then when I tried to compile with clang, it complained about the code not being linkable.
After a bit of trial and error I found out it was the maximum optimization flag (-O4); using the one beloq (-O3) it worked.
A little research and I found out that -O4 enables something called 'link-time optimization' and while usually the linker is independent of compiler optimizations, this of course requires a compatible linker.

Note: when compiling code, one usually means compile and link. Compiling turns individual source-code files into files with in intermediate language. Linking takes all those files in the intermediate language and turns them into the binary.

I installed the linker supporting it, still no avail. I found out I have to build llvm with that specific feature enabled, which required me to have the source-code of the linker so that llvm can use its link-time optimization features. I couldn't find the headers after I installed the dev and source packages, so I proceeded to download the source off their CVS and compile it myself.

Compiling the binutils bugs at some places using clang, but I got 'em all resolved.
Mostly complaining about unused results (due to -Werror) I at first wanted to fix by voiding the expressions, but because it was getting tedious work I simply added -Wno-error=unused-value.
And where I am now is compiling the gold-module (which actually will enable the link-time optimization support), failing at some special function attribute.

gcc is the one established C and C++ compiler (maybe for some other languages, too, I dunno). For Windows, MSVC is also quite popular. Sadly, this results in code not properly compilable with other compilers - such as clang.
This isn't the first library I have problems with. I'll just use gcc, but it's still kind of funny since certain coders are often anal about standard compliance.

Saturday, October 30, 2010

Time dissolving

It really amazes me how little time I seem to spend on coding.
I remember times I almost daily made a blogpost about my progress, now a month won't do.

Well, I proceeded using OGRE, done some tutorials and looking to setup OgreBullet, which is an integration of the physics library Bullet in OGRE.

Apart from that there's not really much programming-related to write about.

I was encouraged by someone to blog my thoughts about time (in a philosophical/physical way). I'm not sure if my English background is well enough so that I can express these thoughts accurately and clearly enough.

Besides, it seems I have about 3 guys really following my blog, and 2 are probably real-life friends with whom I already have shared this theory.
I do get more views on my blog, but they seem to be the result of Google-searches since those are pretty focused on two old posts.

Tuesday, October 12, 2010

Stranded OGRE

So uhh... funny title, huh? This blogpost will actually cover it, whether you believe it or not.

Well, I've had the sudden idea of downloading OGRE. I did and got a working Window with stuff rendered and input via OIS.
I've looked for alternatives, found G3D and IrrLicht. G3D was buggy and it doesn't really officially support Linux and about IrrLicht I just heard some bad things, I guess I'll still take a look though.

OGREs interface is a bit C-like. It seems they didn't take the 'academic' route, there's also stuff where I would have said, integers suffice, but strings are present.
That may be the reason why it's gotten released and is still maintained, as opposed to wrangling with having a pretty, academic interfaces.

For now I'm just playing around. I do have in mind, to maybe try on a project with this, but as the past has shown, that's not really reliable that it'll get released, much less finished.

If you know any good and similar libraries, let me know!

I have been looking for a survival-game running Linux-native. No hordes come and try to kill you, but rather find resources, build a tent, hunt animals, create campfile, stuff like that.
I found one game, something mars simulator or so. Not really what I was looking for though.

I know Stranded II for Windows. I really wanted to play it now, so I gave into my dislike for wine, downloaded and installed it through that wrapper.

Not that I think wine is bad software. It's really awesome what they did and still do. Really admirable. But this may be one of the reasons why Software doesn't get so much native Linux support.
On the other hand, it probably gets more users to use Linux and still run the Software they require.

Anyways, now I'm hooked to Stranded II. I'm really amazed how time flies by :(
I'll try to get unhooked and return to some coding. Hopefully using some bigger libraries as backend will help me not get distracted. I already caught myself thinking about wrappers for OGRE to make its interface more .. the style I want.

Saturday, September 25, 2010

Stressed Coding

I just looked for something to do and stuff had gedit open with a kd-tree class I wanna write and I just though "meh". I reminded that I wrote that while I was at the red cross (alternative service).

When I think back, it seems that I code the most effective while a little stressed, such as school time.
I often thought that I can use the holidays to write a fuckload of code, but that never went true. Much more the opposite: I was watching movies or cartoons or something and playing games the whole day.

Maybe I become lethargic when not really having an immediate obligation to do something.

Coding only seemed shit when I had to force myself to code because of having nothing better to do. It's much more fun when I want to kill time instead when I have to - like right now.
Coding is fun, but you do need to think straight, unlike when watching some movies and different from playing games. Well, I don't really play many demanding games. Demanding as in thinking strategically ahead like a good chess-player would. Not like needing good reactions and making tactically clever moves that must be made quickly.

A little stress is always encouraging if you know that it won't become a burden.

Some people stated that they publicly announced their projects to get feedback from others and to get pushed more into finishing and releasing it.
I am not sure if this is wise with my projects. I did it with ViruZ, but I simply do not have enough experience with real projects as opposed to simple proof-of-concepts.
ViruZ finally froze because I was being too general again. I should have continued with my path to keep it simple, even if that means a reduction in quality of implementation.
I am not sure why Solace died. It was not my fault, I was away while it died and contributed after I was back at home, finding that noone else has uploaded anything in quite some time.

I plan on re-coding ViruZ soonish. I need to properly setup DSSS to get SDL working. Then I will just use sprites (images) as opposed to using raw OpenGL and using programmatic approaches to draw stuff.
Currently I am just doing some experimental stuff.

I can safely tell about my approach to the Google AI Challenge. I downloaded the C++ starter-kit, didn't like it, rewrote it and hoped for the community to like and prefer it.
I released it on the forums but it seemed to slip by rather unnoticed, unlike another kit. I did extend functionality by now, but it seems useless to post.

That post got way larger than I expected. At least I could tie up some loose ends :)

Thursday, September 23, 2010

Quickly the time is passing

Well, it's really fucking rushing. I suspect that comes from the alternative service as opposed to school since this is the only thing that changed.

Since I don't really know what interesting stuff I could write about, I'll just do a quick wrap up of what I have to do for assisted transportation in the German Red Cross.

Mainly I just drive to the people that have difficulties getting to a hospital or something, pick them up, accompany them into the building and either wait till they're finished or if that time would be too long drive back to the district association to bring them home later.

For this we have either a stretcher trolley or a stair chair. Additionally we have means of transporting a wheelchair.

Some patients can walk short distances, those are of course the easiest, since you don't have to carry them out of their home and onto the car and so on. You can just let them get into the chair themselves and roll them around.

Otherwise we will have to get into their home, lift them into the stair chair and often carry them downstairs (and upstairs when returning). This can be rather difficult when the person to transport is rather well build (even the lesser good build will require some strength) and staircases seem to often be rather small as well.
Added fun when the person is demented and they grab the handrail out of fear of falling.

Since wheelchairs are not meant to be lifted (with a person still in them) we have a car with a hydraulic lift and one with a ramp.
We simply get them into the car like that and strap the wheelchair. Easy-peasy.

Stretcher trolleys are usually easy to transport. Just the act of getting the person on it can be difficult.

Transportation of this kind of personnel requires a special certificate, which we don't get anymore for doing alternative service as it was shortened to 9 month, and recently even down to 6.
Thus employed full-time drivers will do the actual driving while we just help with handling the patients.
We may, and usually do, empty runnings though (e.g. from the district association to the patients home and from there back to the association).

Additionally we help the janitor, e.g. collecting trash, doing yard work, washing cars 'n stuff.
We still sometimes get free-time up to a few hours. I bring along my laptop and my colleagues usually watch TV, one likes to take a nap sometimes and the other also reads a book from time to time.

Tuesday, September 7, 2010

needs moar post

needs moar content

So yeah. I haven't forgotten to blog, I just didn't have anything worth blogging.
And I actually still don't have anything, but this life sign. So yeah...

Time really flies by.

Been playing some Doom 3. I like it. It's a decent shooter, the story isn't really deep, but the atmosphere around it is build up very well and with love for the detail! It's really a great piece of work.
And remember, it's the first game to use a completely dynamic lighting system in a 3D environment that doesn't suck (afaik), though compared to todays lighting in games, softshadows, penumbras and ambient occlusion are missing.

And I found a program similar enough to foobar2000 that runs natively on Linux: Goggles Music Manager. It's less fancy, but I don't care :) It's mainly running in the background anyways.
It actually does way less than foobar2000; for example it lacks a plugin-system and you can't rip CDs. But I've only been using a small subset of foobar2000s features, so it works for me (using abcde for ripping CDs).

Well, I've written down something, now onto clicking publish post...

Thursday, August 26, 2010

Am I dreaming?

This question I have asked myself recently while I was dreaming. Twice.
The former time was around three months back I think. I don't remember how the dream started out - I was at home and was discussing my new short hair with my parents (nothing bad, just something among the lines of how it's different) - but I had to go to school so sat on my bike and shortly after that I was asking myself that question, since some stuff was rather strange.
My answer was "Nah. If I'd be dreaming I'd know it".
The dream went a bit on and shortly before waking up someone was hurting me and I remember really feeling that pain. And after waking up I felt .. well, scared isn't the right word for it, but it comes close.

The more recent dream where I asked myself that question was just today. I only remember bits of it, for example some paramedics in red pants running through some glass doors. And being called to my alternative service job early, where I had to drive a bunch of paramedics somewhere, following a motorcade.
This cars breaks didn't really work and the opening on the drivers seat to the pedals was really small and hurting my legs.
Strange stuff.
I don't remember when exactly I asked myself that question, but yet again I believed it was the real thing, just to be corrected when my alarmclock rang.

I usually find dreams to be funny, even nightmares - since they are not real - but questioning this reality and concluding that it is not a dream .. well I don't think that's fun and again, scared is not really the word I am looking for, but I can't describe the feeling better. Maybe insecurity.

I have also been looking at a method for lucid dreaming. So far I have not been able to correctly apply it, though from time to time I shall try again.

Friday, August 6, 2010

Time spend .. not too well

I'm unsure of what to write about. Still, here goes a new blogpost:

This weeks free time was mainly spend watching Star Trek or Bleach episodes.
I found Star Trek quite less amazing than I expected it to be. I watched through the original series and the animated series, as well as having seen the first, second and the newest Star Trek movies.
You know, with all the Trekkies and the stereotype of a geek liking Star Trek I just kinda expected it to be something special.
I guess it was back then, and today it's still okay, I don't think it's anything special anymore though. My personal opinion anyways.

Apart from that I also played some games, commented and fixed small stuff in my code for Solace.

My sleeping cycle has been shifted around quite a bit as well.
When I still had to attend to school I would go to bed around 0-1 (not being too tired) and stay up at around 6:30, now I get sleepy at around 23 (11PM) and stay up at 7 (for alternative service). I'll be damned!

My sense of time has gotten a little bit worse as well I think. And from time to time my sense of balance is reacting slow, like lagging a bit. No idea why that is happening - not really just in the morning, it seems to come and go randomly, lasting around half an hour.

This is all I have to say today.
GLaD to make a bunch of blogposts again :3

Saturday, July 31, 2010

Public Transportations

That is something that I rarely use. Not because I always take the car or never leave my home, but rather because every place I have to go is usually quite accessible with my bike. So I ride that.
For some places, though to none of those I (have to) go in regular intervals, I take the car instead if I don't find it easy enough to take the bike. Or sometimes when the weather is bad or I have to take along stuff that I couldn't safely transport with my bike, then I too resort to the car.

Also noteworthy is that I have no car of my own. I mean, I don't work yet (so financing it would be .. a little hard) and as said, so far I can go everywhere by bike. The car I take otherwise is one of my parents two cars.
This of course implies, that the car is free at this specific moments and that I am not away for too long.
This seminar I had was neither easily accessible by bike, nor could I take the car, so public means of transportation were called for.

As I said, I don't use them often. The internet supplied me with a quick search for when to take what train and where I have to change trains so that I can arrive in time.
Sadly I was dumb enough not to read too carefully, and upon the only change of trains I catched the wrong one. Without noticing.
Shortly before the final destination it was called out, that the train has to halt some stations before, because of some renovations and that instead a rail replacement service will be provided.

For simplicity I will call the final destination city FD (as in Final Destination), the one I got to with the train X and the one I had to get to D (as in Destination).

I got in that bus, which drove me to FD. This city however was not where I am supposed to be. I thought that the bus might have skipped my destination and looked for a train back to X, though I could not find one.
I phoned the organizer of the seminar, reporting that I will get there a bit later. The woman on the phone also told me, that I was in a rather small city and it would have been better if I'd have 'stranded' at some other city like X instead. She proposed taking a Taxi, though I wouldn't get that money back (since I am forced by law to take this seminar, I can recollect the money I needed for the travel).

I saw that the bus I came with was still there, so I asked the driver if he knew how I can get to D, though he didn't even know that city. The bus is circilng between those two destinations (FD and X) and I was like, hey, that woman said that I can get to D from X, so I took the bus back again, looked at the train plan and violá 10min. to go.

I waited 10 minutes, but there was just another train in the wrong direction. I looked at the plan again and found out, that this specific train only goes on weekends. Damn.
Though a little further was another going to D, also driving workdays.
So I waited again and finally arrived at D.

With a small detour I got where I was supposed to go, just in time for lunch. Since I reported that I would not arrive in time, there also weren't any hard feelings.

As I got there the second time (since I was able to go home on the weekend), the mistake became clear to me.
I looked on the Internet again to find out if I did something wrong and checked at that point where I had to change trains and, well, it turned out that I took one train too early.
This time I took the right one and arrived with no difficulties on time.

This experience made me much more confident with using public means of transportation.
At the first ride I felt kinda insecure and was worried that I'd take the right trains 'n stuff, but you can easily just check the plans - or if you really do get lost somewhere you just look how to get back to the next bigger station, since most likely you'll get a train to your desired destination there.

Wednesday, July 28, 2010

So what have I been up to?

This post will briefly go over the productive stuff I have done while not posting in my blog.

I have been going a little bit further on my Linux-port of ViruZ (e.g. I now know where I left off, fixed some issues, but still have startup-bugs).

I took a new look at D, specifically version 2, which specifications now seem to be written down. I've written a hello-world program in D2. I'm looking into using a D-compatible version of OpenGL (I couldn't find no pretty API; I'll probably be using DerelictGL) and possibly port my C++ ViruZ to it for some unknown reason. Seriously though, yes it will further delay ViruZ, so I'm looking to get a working demo of it in C++ first and then port it. The demo will have less features than promised in some earlier blogpost.

And most of my time has gone into a virtual-filesystem using PhysicsFS and a fancy, threaded content-loader; threaded as in loading stuff in the background (unless specifically instructed otherwise) so you can have animated loading screens or possibly loader further content while the game is running. This and some more for Solace.
I must say that I do very much like it, though some parts have been almost driving me mad (damn templates :P). It also not as pretty as it could be, but it does its job well.

Solace is a project I recently joined. You can read some stuff about it here. You can also look for the devs in #solace-dev on freenode (IRC).

I've been using Doxygen to write a documentation from inside the code via especially formatted comments.
I don't like it too much, but it's probably the best way to approach it.

Friday, July 23, 2010

Traffic Jam

You might notice a slight similarity in this and the previous' blogpost titles. That is because I wanted to merge those two at first, but - as you can very well see - I seperated them.

By Traffic Jam I do not mean the actual traffic jam, but much rather a musical event here in my home town.
This year was my first attendant there, and I have gone from it with mixed feelings.

I think most of it was rather enjoyable. The music was mostly fine to pretty good. I expected more metal than punk, but I was informed that this actually was the case the last time. It was contemplated that the event might have become more main-stream and thus less 'extreme' music was voted in.

Anyways, this was also my first time dancing proper pogo. I enjoyed it very much, and it was quite a bit more tiring than I thought. I'm looking forward and dancing it again.

This also brings me to my next point: I feel uncomfortable with 'normal', more traditional dances. One band, Russkaja, animated the people to do this kind of dance in one of their songs, while I prefered to - and also did - stand still. Two friends of mine tried to actively get me to dance, but I resisted.
Needless to say that I felt quite out of the picture.

Another negative point is the loss of time. I usually listen to music in the background, while doing something else. Other than that I use it to pass the time faster when waiting for something.
One might argue that two days - which were not even completly spend at that event - might not be much time and it is okay to enjoy oneself. Well, I did do so, but within two days much can be done. As the proverb has it "Live everyday like it is your last".
Not to say that I am a working machine. Frankly I am not. I would probably have spend quite a while playing Unreal or something if I wouldn't have attended to that event.

So in conclusion, parts were fun. It was defentially worth the experience.
I left a bit money there, but you have to give some to get some.
There were akward and unconfomiting moments, and some I enjoyed, though I am a bit hard for that on myself. In the end, the time lost will probably not matter - I don't even know if I might have spend the whole time being unproductive anyways.
I consider going again in two years - the periode from a year was increased to two years due to personal constraints of the organizers - if the lineup sounds right.

P.S.: As you could see, I had no internets there :-( Though I got back for the weekend :-)

Saturday, July 17, 2010

Internet Jam

My Internets has been quite unstable the last two weeks.
Here's a output I got from pinging Googles primary DNS Server, which I used to see if some site was down or if we were offline without having to check the router:

--- ping statistics ---
12350 packets transmitted, 7864 received, +2340 errors, 36% packet loss, time 12383330ms
rtt min/avg/max/mdev = 28.203/37.691/255.649/17.831 ms, pipe 3

The errors main occurred when we were restarting the router, which would often help to get some Internets for a small timespan.
Sometimes just a minute, sometimes a few hours.

It seemed to have gotten better the last few days.
We already sent a complaint to our provider, but so far they only replied with a bunch of questions, some of which the answers were actually contained in previous E-Mails, some questions where I wonder why they matter (e.g. what OS we are using) and some legit ones.

I'll be going on a seminar for two weeks starting Monday about the civilian service I am doing. Dunno if I get Internets there to write more posts.

Wednesday, July 14, 2010

The Most Remarkable Album On This Entire Planet

It's actually to late to give a shout-out for it, since the donation-time has ended, though I was lucky enough to read about it and leave a small amount just before it ended. I am actually the last one who donated.

So anyways, that am I talking about? Well, The Most Remarkable Album On This Entire Planet. You can see my name at the bottom of this list here.
I've been enjoying paniqs music for a while now and I am confident that I will also like that album.
You can listen to a collection here, find (presumably) all of his work over here.
I also mentioned this guy in a blog post before.

Monday, July 12, 2010

Blog on fasting

Well, since my transitioning to Linux I seem to have forgotten most about the Blog.
Additionally, at that time I was getting ready for my oral Abitur exams, then 1.5 weeks pause and then alternative service.

I'll presume that some of you are not too wandered with german laws, so here's a short version about mandantory military service.
Since 1956 (afaik) it is written in our basic laws, that each male must be mustered for military purpose. If you are fit enough, you have to do a certain time of service, I know it was 2 years once, right now it's 9 months and soon it'll probably get down to just 6 month.

Apart from getting discharged as unfit you can also get away from it if two of your brothers already participated, if you're married, there's also something when your education requires you to not do it at this moment and some more. But basically, most will get mustered.

Now since the government doesn't want to force you to disgregard your moral and ethic understanding, they allow you to write a conscientious objection. That will get send to some government institution, read and decided if it is coherent so they will either accept it or not.
If they do not, you can write up a second one and I think if they also decline this you will have to either obey or sue.
I'll not debate what I think of that right now.

My first write-up was declined, my second, which was written with the help of my father, writing stuff up about how my ancestors were involved in the second world war and how my moral and ethics about war were affected by this and then it got accepted.

So, if they will accept your conscientious objection you will have to perform civil service.
As I am already a member of the German Red Cross, I looked for a spot there and got into the assisted transport.

So that's where I'm at now, and this is finally a new blog-post.
More to come.

Friday, May 21, 2010

Meanwhile, at z33kys place

Not much going on. Been enjoying some Nexuiz, done some work for a picture -> ASCII converter in C#.

^^^^^^^^^^^^^^^^^^^^^|%v|+++++++++/^"'"",,^)//)|///////+ixvivvvi/////////////+i".... "^^=`.....";":::::::::=+^^^=:::::::::::::
;^;=/=^^^;;^^^^^^^^+|//++||^,"''"""'':+||/^"",=||+^^^=+|v)+=^^^;^^^^^^^^^^,:::::::::::::::::::::::::::::::::,;"`.-"` .`',+|=^;
^^++^^^======+++++++/||||||////=^,:"'"''"'=/|/=^^;^;^;=|^^^^^^^^^^^^===+:.',:::"::::::::::::::::::::::::::;,_..`'-... `:^^^
^/+++++++//++//++++++++//////||||iv='''"";||//+++==^^^/====++++//////+".`'`.';,::::::"":::::::::::::::,,:_`.._'-... ...-=/
|////++++++//++++++++////+/+++/|))/=":;=/+//+//////+/i/+++/++++////|,.....-_`.-",,:::::::::::::::,,,"'-...-__` .`/
//++++++++++++++++++++++++++/|/=/ii)////+|)+====/||+)|+/+++++++++//' .."-...'_...`'",,:::::,::"'_-`....'''` . .'
/+++++++++++++++++++++++++/|)///+|i)|===+|)|////++/vi+//++/++++++/_...`"......__`.`'_"^:'_'"`. ....-___"-`...... .... ..
+++++++++++++++++///////=;,;,:"":;/+^+=+)/)||///||/||||||||/////|'...."``_'""""":,"`__:.....:``____``_""-````----`... . ..
++++++++++++++////+/;'__________________";=+//++++=++))//|||||||/,:''^^,,::::::::::::,:'''_'':'__'",'"'''-`. ..`-_-. . .
++++++++++//////),__,,""":__________________:+)+=====+|///++/|/^:":^/++///+;:::::::"::":::::::::::::::::::::"-... ..`'` . .
+++++++++++///=,___;^---_":________'=+:::,;'__"++=====+)////|^_..._,;:",,:::::::::::::::::::::::::::::::::"":,:- . .'-.. .._
++++++++++++//+,___:`....-:__"_____:_`....-,____/|//+//|)/+|,___'"-`,,::::::::::::::::::::::::::::::::::::::"":,-.. ..'`...`'
+++++++++++++//|^___''''''__":_____""`...-:"____';+++===+)||^,:;'...._,^;;::::::::::::::::::::::::::::::::::::"::. __..-'.
++++++++++++++/+//;'________;:""'____''""'_____:+|^;,;;=+||:::;- ......':,,,,:::::::"::::::::::::::::::::::::::"^` . ._'.__..
++++++++++++++++////=:'____________________'";=/+:''''':)^:::^- .... . .`::,,,:,,::,,:::::::::::::::::::::::::;......"_'- ..
+++++++++++++++++//+/=::::::'_________'":;^++++;""'''"=/,:::;" ..... `'`"````....-_":,,:::::::::::::::::::;-.....:,-.....
++++++++++++++++++//+'""",)*+"'"^xi:"',/^^^^=;"'"'";+|^::::"^- .. . ..'`. ... ..`-_'"::,,:::::::":;:-.-'_''-.
++++++++++++++++++/|,,,|+=//xviiv//''__,;"'''''";=v)^::"::::^_. `". . ..`--___'::_--__-`.. .
+++++++++++++++++/||++/x***lxv%**{{v;__'^"'",=+++/^:::"""::":;-. .`". .... .... ......
+++++++++++++++++)^;;;+^{{+;;;=^{***i;,^=;;^;^//=::::::::;::"/I+-...`......`"....... . ................ _
+++++++//++////++|=^^=+=*%^^=^+,{**l%/=;,,,,,,=|:^::=::::+,::v}1t*),:,'..._-_'.. ... .... .. ..._/1'
//////////|/=;,,,;=^^+=i)|^;;=^|v/^,,,,,,,,,,,=|:+::+:::^{{x{}**}??*?@@?%='`._'`... ..... ..-__.. ...`':^|}771:
You probably can't quite see it, but it's Peter Griffin trying to sell a Buttscratcher to Louis.
I hope I didn't break any HTML with this :D

Credits go to Chris220 for the application-base (though I also helped with that ;)).
You need Mono 2.4(.4?) or .NET 3(.5?) to run it (it's written in C#).
I just worked on one bug I found out while making this picture for quite exact 2h.

If anyone is interested in the path of development, here's the three threads of the Facepunch forum that essentially contain this information.

And since I have nothing else to tell you, enjoy a screenshot of my Lubuntu:

Sunday, May 16, 2010


So, I finally got it. I used the Ubuntu DVD to install a minimal Ubuntu system, then installed OpenBox, though I couldn't be bothered to set it up, so I installed the lubuntu-meta package. It of course has additional pre-installed features, but it still doesn't run as expected.

The biggest problem being the function-keys not working (display-brightness, enabling/disabling WLAN, volume, ..).
Secondary the buggy flash-plugin. It doesn't seem to always correctly register the mouse-release event and tends to crash a lot. I hope the HTML5 canvas will replace much...

MonoDevelop runs fine on Linux, but I can't really be bothered writing the GUI in Gtk#. Gtk# is okay if you want a rich user interface and invest time in it, but I just want a quick and dirty GUI and that's just not possible with Gtk#.
Funny thing is, I found out that my Sudoku-program runs (almost) fine in Linux:
It's having minor cosmetic bugs (also causing Undo and Redo not to work properly) and Loading and Saving doesn't work, but I guess I could fix that.
But that is not helpful when it doesn't even start up on my mothers Macbook ._.

I'll try out how a 'normal' Xubuntu install works out for me concerning the function-keys.
It'd be sweet to have an Ubuntu running on my laptop, but not with that crippled functionality; the akku'd say good bye in 1h or something and it's kinda inconvenient to do it manually and script are also not the dog's bollocks.

Sunday, May 9, 2010


It felt like it is time for a new blogpost, but nothing particularly interesting happened, so I though I'd just write you my plans for the next few days or so.

As you might now, I wanna slap Lubuntu on my Laptop. The stable beta was released, but only the x86 version though I want my full x64 power. I commented on their release-post but it remained un-answered (apart from some anon who told me that the x86 version runs on x64 processors, which would not be correct for Intels IA64 btw).

chaotika suggested to download the Ubuntu DVD as you can apparently still install a minimal Ubuntu with it, so I did. Thus my plan is yet again to try out U-lite.

But before this, I wanna get my Sudoku-program in a running and playable state. It actually is, but Mono has not completely implemented System.Windows.Forms and my mother, for whom I am writing this, has a Macintosh with OSX.

Since I moved form MonoDevelop to SharpDevelop (which runs just fine btw) I discontinued using Gtk# in favor of System.Windows.Forms, since SharpDevelop has no built-in Gtk#-Designer and Glade decided not to run.

So yeah, C# is actually pretty sleek as I already stated. Here's a screenie of said Sudoku-program:

Currently I'm moving my logic-code to a library and then I'll make a GUI using Gtk# without a fancy designer. Not too much work in that small GUI anyways.

Current features include Saving and Loading, Undo and Redo, basic error-checking and of course laying in numbers. You can either use the radio-buttons below or use the number-keys. You can also place in numbers in bold or italic (e.g. for given numbers and guessed numbers).

Plans include localisation via text-files and possibly Sudoku-creation and Sudoku-solving (thus also just giving a hint ;)).

Tuesday, May 4, 2010

C#, MonoDevelop

I wanted to get into C# for quite a while, so last week I installed MonoDevelop on the my schools computer to replace the Java (eww) IDE. After a short while of using it, I decided to install it on my temporary Windows-setup.
C# seems to be a real treat, but MonoDevelop runs like shit for me. I'm using v2.2.2, which is dubbed as 'stable', but for me it runs pretty unstable.

It seems to like to crash at random, sometimes after crashing it doesn't like to open certain files without further explanation than "Specified method is not supported", which I have no idea what this means relating to opening simple text-files.
It also seems to have a habit of corrupting my UI made with the Gtk# UI Designer.

Dunno how it runs for everyone else, but I'm staying away from MonoDevelop until they are releasing a new major revision.

I'll try out SharpDevelop, from which MonoDevelop forked, but they seem to have gone a little different ways, and hope that MonoDevelop runs fine for me on Lubuntu.

Wednesday, April 28, 2010

Laptop + Ubuntu + LXDE

I decided to install a Linux on my Laptop. Well, I was certain of that before I bought it, but that's not the point.

So far, I'm most confident with Ubuntu and its deviates, since it's piss easy to set up and easy to maintain, plus you get quite recent software updates.

I was also giving Arch Linux, Gentoo and Fedora. I can't remeber why I decided against Fedora, but Archlinux and Gentoo take their work to be set up and Ubuntu runs fine enough.

Next point: LXDE
I want LXDE, because it seems logical to me that with a light weight desktop environment (and window manager) my battery will last a little longer. And I have more resources free for other programs.

I don't need my desktop to look fancy. Of course I use some eye candy, but LXDE doesn't look any worse than GNOME or Xfce IMO.

I found U-lite, which uses Openbox, a very light window manager. There's also Lubuntu, but as U-lite stated, they're more light that Lubuntu, though I guess when it becomes a stable release they will be maintained better, the two teams seem to communicate.

To install U-lite you need to install a base Ubuntu-system, so I downloaded the mini-ISO, put it on a USB-Stick and restarted.
First problem: It didn't seem to have been configured right, because it couldn't find the kernel image.
It was simply named linux, but when it started up it caused a kernel panic due to the root filesystem not being mountable. I found out that you need to set another initrd, which then brought me to the setup screen.

I was happy, thinking that now everything will be easy. WRONG:
No network devices found. I changed a setting in the BIOS to activate the WLAN upon booting (which it then did), but it still could not find a networking device. I googled to find out, that you need a special driver for my Atheros WLAN device.

I got an idea of simply connecting via cable. But yet again, it couldn't find a networking device. Again this was caused by the need for an additional driver. Neat! Fucking Great!

I could download the debian packages of the internet, but I'd have to manually resolve dependencies, besides I wasn't able to mount my NTFS drives, nor did I find my USB Stick in /dev (the latter probably due to my dumbness). It's also possible that the drivers need to run in ring 0 and thus I'd need to recompile the kernel and restart. Dunno if that's possible for an installer.

I now dropped U-lite, but I don't blame it.
I'll wait for the RC of Lubuntu, which they said will come out this month or early beginning of next. I hope that this installer will ship with appropriate drivers :S

P.S.: I don't do web-programming, still I know a little bit of HTML, so I took the liberty of fishing around in the HTML of the blog-posts, which are usually generated via an editor.
Like that I, for example, was able to post correctly formatted code, the media player two posts down (Der Moment) and the abbreviations IMO and RC in this post :3
Man, I suck :< (and the angle bracket of this smiley, because the editor does not correct them)

Saturday, April 24, 2010

Samsung R580

So, I got a laptop yesterday, the Samsung R580.
It's pretty sweet so far, except that the screen is a little too bright.

I was looking for a dual-core with >= 2GHz, a dedicated GeForce graphics card >= 8800GS and >= 3GB RAM. Then of course the longer the battery lasts, the better.
I wanted it for development, multi-core testing and some games among HL2 performance.

I didn't test it out yet, but the GeForce 330M I have in here seems to be quite powerful. The specs of this laptop btw. It's got a 330M really, not a 310M as the page stats. Dunno why it says so, maybe I have a different sub-model or something.

I only had a few minor disadvantages of the keyboard as of yet, which is getting the [Fn]-key instead of LControl, # instead of enter, the left-arrow instead of down and sometimes the NumBlock instead of backspace. But I guess that will become better if I keep using this keyboard.

The built-in numpad is pretty sweet, though I guess I could also have settled for a numpad via the [Fn]-key.

The laptop is also pretty light.

As I was told it has a battery-runtime of 4h, I guess the external graphics card is drawing quite a bit, since most laptops read to have a run-time of 3-4h if they possessed dedicated graphics hardware.
It's not too impressive, but it'll do.

I'm hoping to get either U-lite or Lubuntu, if U-lite proves too cocky to set up, on this thing.

Tuesday, April 20, 2010

Der Moment

This is "Der Moment" by paniq. I found the lyrics to be very beautiful and worth translating and posting on my blog.
paniq composes electronic music, minimal techno and some hip-hop style songs, afaik all are licensed under the Creative Commons.

Download MP3
external Web Player (select "Der Moment")

All albums of his are available in FLAC, except those, whose originals were lost and only the Ogg Vorbis or MP3 versions are still existant.

The lyrics translated to English by myself:
The Moment

Maybe you are on a visit by a friend while listening to this song
even if you are alone, it does not make a difference
the moment you listen and simply let go
will become the moment you die and love yourself for it

Because isn't it like this: You can barely stand yourself
you anxiously walk through the world and feel queasy
when making a mistake you seldom laugh,
because you must take care of doing evenything right.

What you feel and what you think will never be understood by others
and you rarely can look into the eyes of someone else,
but when you don't know the pupils of your friends
why is it that you can still call them your friends?

When theres a person nearby, that one can call a friend,
why don't you now turn to him and take a look
and when you see your sorrow in his eyes,
then you realize, that you still look at yourself.

And maybe it's like that: You are all alone.
What's so good about being together?
If he is a a true friend and knows that you exist
doesn't that also mean, that he really cherishes you?

It's not about possession, about sex or power
and when you look away now, then you've pondered too much
and the moment you look there and simply let go
will become the moment you die and love yourself for it

Maybe you see even more things in the person next to you;
his roots are ancient, he's half god and half animal
and on his side he creates his own reality,
but on the other he will die without your affection.

Don't you know best, just from yourself, what every human needs
and what you give another person is what you also get back from him.
If you wish for someone to clean out your soul,
then it's just not important who will fulfill that wish.

The borders that you know are just an eyewash
live your life like it would end every minute
and give the person, who gladly looks you in the eye,
your hair, your hands, your mouth and your skin.

You take by giving and loose when you win,
but the fear you feel because you surpess your consciousness
closes all doorways to the light that shines within you.
You would kiss by now, if you'd just take heart.

The meaning of this kiss is of a magical character
when you feel the white charm again, then you're finally on the right track
because an answer to the question, why you exist, is really simple:
Because there's someone who loves you.

And with these words, this truth, this song will end
and even if you are now confused, it does not make a difference,
because the moment you believe and simply let go
will become the moment you die, so that love can live.

Friday, April 16, 2010

defective computer

My computer, yet again, crapped out. This time it's my primary hard drive.
It kinda works fine, but after a few minutes it simply vanishes from Windows and that of course hangs the system. If I do a warm restart, even my BIOS will not see it, if I however do a cold restart it is detected again.

My Linux Desktop Manager is not functioning from the previous error I had, but through the terminal I could see that my HDD actually seems to work just fine.

I'm getting kinda worried that the chipset or something is not working properly, thus if I'd now buy a new HDD that something else might break.

So I decided to look around for a replacement. However I actually wanted to wait until GPGPUs are getting popular, so I am looking for laptops.
Nothing really fast, but capable for Games (Source-games in medium graphics quality, no AA) and good RAM, since IDEs tend to take a good share of that, plus around 500GB of disk space, since coding projects do occupy some space...

I actually planned to make a small post about a song with sweet lyrics (german) I found, but that'll just follow tomorrow or something.

P.S.: I will not get a macbook >:(
For one, I don't get around too well with the Desktop Enviroment (though you could probably change that) and the keyboard is just horrible IMO, as well as especially the (default) key layout.

Friday, April 9, 2010

iPhone OS 4 SDK

Apple decided that you can only use OS specific features if you don't use any other API, as well as only in the languages they want and according to specific guidelines given by Apple.

Luckily I don't want to develop for the iPhone. In fact, I don't even have an iPhone. Well, I don't own any product made by Apple.
I might get an Android at some point though. <3 Google :3

Tuesday, April 6, 2010

If you're a C++ programmer

(professional or hobbyist) and already want to read pieces of the upcoming C++0x standard, you should probably read this.
It's about rvalue references, which are kinda confusing as was the open-std.org-introduction.
From the first look it looks fine and sweet, but - to quote from that site (first link) - "Everytime I think I have grasped rvalue references, they evade me again".

I thought maybe there were just over my head, but that tutorial is really easy to understand.
It might be easy to find it via Google, but you have to know that it's not over your head, though still a little freaky.

Be careful though. One cute bunny made out of chocolate ended up in my stomach whilst reading that article.
Happy Easter!

Friday, April 2, 2010

ViruZ Demo Progress-status

So how far is the demo away?
I'm pushing myself to its release, and I've been doing that for 3 month now :P

The switch from cairo to OpenGL was the first obstacle, then finding a decent way to have the shader manage the positions of each virus for instancing, then implementing a geometry shader and now ditching the geometry shader again.

At this very moment I am implementing an easier way to deal with shaders and uploading values to it. That shouldn't take long, most stuff (about 60%) is done, took me around 3h (I was helping someone else and talking to someone else during that, so it took a little longer).

After that it shouldn't be hard to get my virus-shaders working again. Of course I cannot know if I run into any unexpected problems.

Then I will have to find the cause of the serum instantly infecting all viruses upon injection. I don't expect this to be hard to debug.

The switch to a lower OpenGL core version also should be quite fast. Just setting up a bunch of extensions.

The final step before the demo is a basic main-menu, maybe featuring a quality-setting and an animated background. Apart from that the main-menu needs to be able to start the game and exit the application. Getting from the game to the main-menu will probably be done via key-press.

I won't have to think about any trouble regarding the licensing for my code, since the only APIs I am using are OpenGL, OpenMP and the SC++L, all of which are released under a free, open and unenforcing license.
The demo will be source-less and released under some freeware-license.

That being said, I'm having a programmers block. That term kinda describes the inability to keep focus on coding. Dunno, been there since my shader started bitching and my computer broke down. Hopefully this holiday won't go to waste by playing a bunch of games.

Thursday, April 1, 2010


Well, to start this post I should say that the last few days I haven't been working on ViruZ.

My computer stopped working, when I was debugging it and I got some BSOD about some kernel error.
I restarted my computer and instead of showing that loading animation when Win7 starts up the display just stayed black.
I then tried out my Sidux LiveCD (Debian Sid/unstable), which also didn't work. So I installed Debian in some unpartitioned space I have left over for testing OSs.

The graphical install worked and after some minor internet problems I got it completely installed. But booting it didn't work: It showed all the normal console-stuff on startup and when it got to the line where it states that it's starting the desktop manager my display again stayed black.
I found out that the text-interface was working fine and found out that at least my data was undamaged.

At some point I also took out my graphicscard, cleaned it and put it back in, but the result didn't change. It also couldn't have been a temporary overheating, since after I slept and tried again it still didn't work.

So I got a replacement card from a friend, found out that it's AGP (I don't have a AGP slot :P), got another PCI one and it kinda worked. There were some display errors (kinda like a 16 colors-modus), but that was in Linux just as it was present in Windows.
I ordered a new card similar to my old one and half a day later, before going to bed, I tried the broken card again - only to find out that it was now working again.

I canceled the shipping of the new card and my computer runs again.

Now to the actual title of this blogpost: ViruZ will soon not feature a geometry-shader. The program I was using to find out how well the extensions are supported seems to malfunction. Geometry-shaders are supported for GeForce 8000-series or higher and ATi/AMD HD 2000 and higher, which is not acceptable.

Tuesday, March 23, 2010

Instancing and Geometry Shader

ViruZ uses Instancing to draw its graphics.
Instancing is quite simple: You have one piece of geometry (e.g. a rectangle) and you wanna draw it multiple times.
Normally you'd just be like execute the draw-function n times, but Instancing moves this to the graphics-card, meaning that the CPU is free to do more stuff while the graphics card handles drawing the rectangle n times.

This worked quite out-of-the-box for me. Good stuff.
Here's a screenshot:
It has my circle-shader, lightly modified. You can see that the edge of the circles are blurred a bit too much; I've simply been guessing the value then, it's fixed now (at least for 1:1 ratio resolutions..).
I had to turn VSync off in my drivers to get the read FPS (the numbers in the console-window on the left). As you can see, the performance improved greatly (from ~100-120FPS to ~1900-2000FPS). I'm hoping this will make my game run smoother on older hardware.
There are not all 50 viruses visible, because the boundaries are now invalid (the canvas is now -/+1 to -/+1 instead of 0/0 to 800/600 :P).

You might have heard about geometry shaders. They take vertices (points, that define geometry) and may output more vertices in return.

Before that, I've been uploading a quad (rectangle) into the graphics-memory, had a static array of 50 positions (representing the origins of the viruses) and then used Instancing to draw that quad 50 times. The shader took care of translating that quad onto the right position.

Now, with a geometry shader, I'm not uploading any geometry into the graphics-memory, but instead have a dynamically sized array of 2D points (again representing the origins of the viruses) and using that information for Instancing to draw.. well points ^^

I could be satisfied with points for now, but I'm planning on implementing more viruses with different shapes at some point, thus only squares will not always be the best solution.

My geometry shader takes those points and creates 4 vertices for each point by simply translating it to the lower left, then upper left, then upper right and finally lower right, resulting in a square shape.

I had some trouble with this geometry shader, mainly because I've accentually been trying to compile my pixel shader as a geometry shader and it took quite a while to find out that the shader code was actually correct XD

And again a picture:
You can see that I've also implemented the outline of the virus.
It also seemed to slightly have improved my performance to ~2000-2050FPS.

I didn't have too much time, so I spend it on the stuff you can experiment with, instead of stopping in the process of cleaning up a few times.
So yeah, the same excuse goes for the blogpost-less week. Now I've left the written parts of my Abitur behind. Coulda done the math-test better; was spoilt by the really easy CS-test. That thing felt like a joke.

Thursday, March 11, 2010

OpenGL 4.0

Today, the specs of OpenGL 4.0 (and GLSL 4.00) were released. I didn't go through all changes yet (the OpenGL spec is almost 400 pages long! and the GLSL spec additional 100 pages), but what I've seen so far appeals.
Though I still have to learn how this weird packing data into one integer-thing works. I don't know what the name is, but HistoPyramids, which I investigated on a few days ago and didn't understand, seems to be a similar technique.

Well, so what made me make this post is the statement, that Khronos will add extensions to OpenGL 3(.3) to make as much of the OpenGL 4.0-features possible with older hardware.
So then I thought, what hardware actually supports OpenGL 3? And well, all ATi/AMD 2xxx or higher and the nVidia 8000-series or higher (didn't care about Intel and what not).
So I will look into the OpenGL 3-stuff I need/want to use and look if OpenGL 2 supports it through extensions and finally port ViruZ to use OpenGL 2 instead.

btw, the port from cairo to OpenGL is harder than thought. This time to actually finish coding the game, I took the idiom "Make a game, not an engine", thus the cairo-stuff is all over the place and not hidden behind some interface.
Well, my fault after all, since you should stick with your decision if you use that idiom.

Sunday, March 7, 2010


So I downloaded and compiled freeglut, a toolkit for OpenGL.
Then I downloaded GLEW, but it seemed somewhat resource-hungry for its use, because it keeps a complete list of function-pointers to the extensions.
Extensions for OpenGL are functions, which are not officially supported but help greatly with using newer stuff. There are common extensions, which have been approved the ARB, vendor-specific extensions and the ones that multiple vendors have agreed upon.
You can't call the functions like you are used to in a programming-language. You have to query for them in run-time and hope that they're available and supported by the hardware.

To write modern OpenGL 3.x code you need to use extensions.

So I've looked in the smooth_triangle-example of freeglut and ported that code to a very bad C++-version using fancy stuff like std::vectors and std::strings. I made the design so that I should be able to copy most of that code if I'm getting serious.
My and their way of getting extensions is not hidden and looks beautiful and requires more work to set up, but I prefer that solution.
Basically, I need to declare the function myself and then I have a init-function to initialize all functions.

After two stupid mistakes, that took a while to find and were easy and fast to fix after that, I had it running.
I played around with the Shader a little, changed the triangle into a quad and it looked quite pretty. So pretty, that I wanted a wallpaper-formated picture. So I removed the borders I had on the quad, enabled fullscreen-mode and took this:
And it started out with this:

What I've been doing to create this effect is calculating the light-intensity via the formula color.r * 0.3 + color.g * 0.59 + color.b * 0.11. I multiply by different numbers instead of just taking the average, because green looks brighter than red, which looks brighter than blue. The specific numbers seem to be common, you can simply google for them.
To create corners (sharpen the intensity-effect) I've before multiplied the color-value, which is in range [0..1], four-times with itself (that will darken dark colors more than bright ones).
To make this intensity-effect more visible, I multiplied with 8 and finally multiplied the intensity with the actual color-value.
Or in GLSL:

#version 140

smooth in vec4 fg_SmoothColor;
out vec4 fg_FragColor;

void main(void){
  float i = dot(pow(fg_smoothColor.rgb, vec3(4, 4, 4)), vec3(0.3, 0.59, 0.11)) * 8;
  fg_FragColor = vec4(i, i, i, 1) * fg_SmoothColor;

Here's a little less intense version. People with darker desktops (like me) will prefer it. If I darked it more, it doesn't look good anymore.
If anyone wants another resolution, just leave a comment. I can then let my computer calculate a perfectly scaled image, without quality loss :)

I also have a small bug, and that is I get a INVALID_OPERATION error in my exit-function, but I simply blame GLUT for that.

Wednesday, March 3, 2010


You know... like blog and update in one word.... whatever.

Again, I have nothing fancy to tell.
Wanted to work on my assembler-program since I actually wanted to have a working prototype by tomorrow and completely forgot about it, but instead I wasted have of my time playing Call of Duty 2.
I have the basic flesh of the assembler done, now I only need to implement the pseudo-Ops (probably the hardest :P) and decent file parsing. I don't think my current one works fine, even under the circumstances that I didn't spend enough time with it.

I also wanted to code a lock-free queue for ViruZ, so I can easily implement my different looping-method (one thread renders, others update), but I did something wrong and now it only draws one virus :P
A lock-free queue is basically a queue you can do stuffs on without having to wait for other operations to finish.
You need to wait for other operations to finish if you're working with threads sharing data, as the possibility exists that one thread might read some data while the other one is writing to it at the same time. And that can be catastrophic.
A queue is like a waiting-line you know in real-life. You can stack various stuff into it and the first thing that got in is the first thing that's going to get out. The last thing in will be the last thing out.

I have another algorithm for the lock-free queue in mind, though it's a bit more complex. Dunno if I will bother as I don't know if this even is a bottleneck in my code.

I've also read some stuff about shaders in OpenGL and I'm ready to give my first shader a try. I just need to find some time.
When I begin implementing OpenGL and using that as my rendering-backend things should get faster by themselves.

Oh, I also created the tag 'ViruZ' and added it to all my ViruZ-related posts.

Saturday, February 27, 2010

The chaos in Mathcore

This week went by fast and I can't think of anything meaningful to post, so I'll just add a few words to that post.

Mathcore has one major appeal, and this is the chaotic aspect. The rhythm changes unpredictably within one song and atonal sounds are used. These seemingly wrong sounds are what makes the music especially interesting.
What still makes it music is, that it doesn't do that every second. It's still sounding fine and has lyrics like you'd expect. And depending on the song, patters of this anomalies emerge.
The only bad thing about the chaotic aspect is, that you can't really headbang to it. It's also hard to dance to the music.

Ionenbombe and I were joking around and actually found something by inventing 'slizing'. You simply slide your feet around fast on a moderately slippery underground, not moving much out of your place and hold balance.
In addition, you can also wiggle around with your chest.
We found this rather exhausting, but still fun. Especially the chest-wiggling is harder on your muscles and you need to pay even more attention to not fall.
The word is a combination of 'dancing' and 'sliding'. To not confuse it with 'slicing', we replaced the 'c' with a 'z', which also makes the word sound better :P

Going back to the music-genre: The second aspect is, that it's hard. You know, fast drums, shouting, mainly growling and screams, this kinda stuff.
While I listen to a wide variety of genres, metal is one of my favorite. I don't know why I like it, maybe it's just its aggressive nature, but it somehow appeals to me.
Just as well I like slow and emotional songs though, but chaotic rhythms simply don't fit too well in there :P

Wednesday, February 24, 2010

3mm hair?

I want to keep my hair shorter now, so I've been meeting up with a friend last sunday.
I've had 3mm before, so I thought I'll just get 3mm again. So we adjusted the razor to 3mm and shortly after beginning to go through my hair, he started laughing.
The thing is, that 3mm is really short. Like really short. About half the length that I had after going to the barber.
We tried to fix it, since 3mm over all would have looked a little too short. About 5mm seemed to be the length I've really gotten.

What I have now seems to be called a boxer-haircut. It's 3mm on the side and on the back, the rest is 5mm.
When my hair has grown a bit, I'll get my uniform cut again: 5mm all over.
Since he was next, he got the proper cut already.

We could have actually tried 6mm first and gone down till it's fine, but that's just not what you think about when you've said 3mm to the barber without knowing that you've gotten about 5mm.

Thursday, February 18, 2010

VriuZ update 12

I didn't do anything big, but I just thought that I'd let you know that this project is still going somewhere.

I was talking about moving shit around. Well, yesterday I brought it down from 80 errors and >4000 warnings while compiling to 0 errors and ~2000 warnings. The warnings are mostly caused by the standard library or the Windows API. Around 10 or something are by me, but they're harmless.

Parallel to this move I also added a rudimentary level-datatype. At the moment you can only specify the number of viruses and number of simultaneously injections, but of course it will become more useful later on.

Today I quickly added different sizes to my shared graphics.
The viruses get rendered only once for their healthy and sick-state, so you can simply copy the pixels instead of having to calculate them again.
Programmers will know what a map is, so yeah, I simply used a std::map<double, cairo_surface_t*[NUM_SHARED_GFX_STATES]> with double specifying the size and cairo_surface_t* is the image so to say.


You can see 25 small viruses and 25 big ones, as well as two injections at a time. It's also visible, that the bigger viruses have a bigger contamination-radius.