Posts for Sunday, September 20, 2009

MacVim Trouble


I recently upgraded my Mac to Snow Leopard (recently as in the day it shipped from Apple) and while the upgrade was as smooth as possible, I did however have trouble with one (and only one) program. MacVim. I actually find that quite impressive, moving on though. I don’t know yet what exactly changed between 10.5 and 10.6 but whatever it was it turned MacVim retarded. It appears though, as you can see from the link, that Bjorn has the issue more or less worked out he just hasn’t officially released the fix to the public. He was nice enough to include a link to a newer binary on the bug though for the early adopters.

In other news the Falcon programming language is moving right along. First, no matter what platform you use there is now a page in the wiki for how to setup at least one editor on it. Drop a note if you want your editor added. I’d be happy to help you do it, so drop me a note. Falcon is now installable on all the platforms I currently use or care about. Which would include Windows, Mac OS X, Gentoo, and Exherbo. So uhh you should use it. You uhh have no excuse. (Family Guy humor).

Enjoy the Penguins!

Fix nvidia 50 Hz Display Rate


HeaderThis is one of those things I always thought of but never got a chance to fix. I found it a bit irratating that my display was always being detected at 50 Hz. I thought that this was a bug and just waited and waited for updates, but in the last year it’s still there. First thought that this may be a Gnome bug but when I got to KDE, it was there too. Took me awhile to find out, but fixing it is easy enough.

For a single monitor screen, the nvidia driver will set an incorrect display rate for the xorg server by default. This is because the nvidia driver by default enables DynamicTwinView (dual monitor support) and if an option isn’t set to disable it, will not detect the refresh rate and will automatically set a compatible rate of 50 Hz. nvidia considers this a useful feature for people with dual monitors for automatic configuration, I however think it ignores most of how the Linux nvidia users use their computer. Hopefully though, nvidia will get past this and fix it sometime soon. Until then, to disable TwinView put in your ‘/etc/X11/xorg.conf’ devices section:

Section "Device"
  Identifier  "Device0"
  Driver      "nvidia"
  Option      "TwinView" "0"
  Option      "DynamicTwinView" "0"
EndSection

Posts for Saturday, September 19, 2009

Today In PMS FUD: PMS Shot JFK


Patrick Lauer is complaining that one of his patches to PMS was rejected. What he is not telling you is why it was rejected, so I shall explain here:

The version of bash to be required by ebuilds was decided by the Council, as was the specification defining it. The PMS project quite rightly doesn’t have the authority to override a Council decision. Patrick was told this, and was told that the process for getting EAPI definitions retroactively changed was to go to the gentoo-dev list and from there to the Council. Such changes have been made in the past, and they’re open to being made again in the future.

Unfortunately it looks like he’s not interested in getting his concern fixed, and is instead just trying to cause trouble.

Posted in gentoo Tagged: gentoo, pms

Three Simple Tips for Contributing to Open Source Projects


Three simple tips for contributing to open source projects:

  • If a program says “please provide this information when reporting a bug”, provide that information. If it says “please attach these files to your bug report”, attach those files — although you may want to check those files for incriminating data first…
  • When reporting a build failure, make sure the output you provide includes the actual error, and remember that the first such message is the actual error, not the last one. Don’t start your paste at the line that says “make: *** [check] Error 2″ or “9 of 18 tests failed”, since the information needed to handle your bug is before that.
  • When sending a patch, make sure that your patch applies against a recent master. Receiving patches that don’t apply is annoying, although it’s understandable if your patch used to apply recently but now doesn’t (and often a three way merge will fix that automatically). But if you’re basing your patch off unpublished changes and it doesn’t apply, fixing it has to be done by hand. Spend a little of your time making sure your changes work against upstream (’git rebase’ and ‘git cherry-pick’ are immensely handy here), rather than wasting the time of everyone who reviews your patch.
Posted in open source Tagged: bugs, open source

Force Google Chromium to have a normal title bar in KDE

KDE is awesome largely because KWin is awesome. If I had to name one reason I gave up using Gnome and moved to KDE, it'd be KWin.

Some programs (for example, Songbird, aTunes, Google Chrom(e|ium)) try to manage their own windows in silly ways like hiding their title bars and window borders, or fiddling with how they appear in pagers or task managers / application lists, or trying to manage their own sizes and positions. KWin lets you override and force sane preferences upon such programs.

Chromium for Linux is nice enough to give you an option to "Use system title bar and borders" if you right-click the top. But this only changes how Chrome looks; it doesn't make the KWin title bar and borders appear.

Why would you want KWin title bar and borders? Because by default, Chromium's self-managed title bar only gives you Windowsy options like minimize/maximize/close. It doesn't give you Linuxy options like double-clicking the title bar to window-shade the window, or right-clicking the title bar to get the KDE menu to send it between desktops or make it Always on Top, and such goodness. If I wanted gimped up window management I'd go use Windows 95.

To get the normal KWin title bar to appear, go into System Settings, Window Behavior, Window Specific, then New...

Click the Detect Window Properties button and then click an open Chromium window to fill in the details, as in this screenshot.

(Note that for most apps you can right-click the title bar of the window, go to Advanced and Special Application settings and get to the same place, but in the special case of windows without normal title bars, you have to do it in this more roundabout way.)

KWin

Then go to Preferences and set No Border to "Force", and uncheck the box. (This is kind of confusing because it's a double-negative; a checked box means to hide the window borders, and an unchecked box means to show them.)

KWin

Once you save and apply all of this, Chromium will have a normal window title and border forever, whether it likes it or not. Rejoice as sanity is restored to the world.

Chromium

You can use this dialog to do other helpful things like make your IM windows be sticky across all desktops by default. Or to sort your applications to always start (and stay) on certain desktops. Or to force applications to start maximized or have a certain geometry.

Another thing I find very helpful is to turn Focus stealing prevention to the highest setting for any program that likes to throw dialog boxes at me and demand immediate attention. Thunderbird used to be really annoying in this way.

Most other Linux window managers can do some of this kind of thing too with either built-in options or via 3rd-party scripts (last I checked Gnome was the latter but it's been a while). However few do it as well as KWin. The only thing I've used comparable to KWin is probably FVWM, and KWin's GUI configuration is orders of magnitude easier to work with than FVWM config files.

Posts for Friday, September 18, 2009

avatar

ADOM: Game review.

I’m not a gamer. I don’t mind playing games, they’re fun. However I don’t see any sense in wasting a good majority of my day playing a game. Games attract me because of the intellect and flexibility within them, not so much the advance in graphics. Replay-value is probably what I weigh as most important for a game.

A good while back I was – I admit – searching for a game for my computer. As I was on Linux, the game had to be 1) Linux-compatible, 2) Free, and 3) Not lag. A quick public question in IRC came up with the answer: ADOM – Ancient Dungeons of Mystery.

It’s a command-line run game – a roguelike. For those unaffiliated with this genre a picture speaks a thousand words:

adom

Ok – it already looks ancient. As you might’ve guessed, it’s all text based, and you move about just like you would in any modern day RPG. The story revolves around you as a young explorer trying to discover the source of some evil thing called chaos that is destroying your world. You complete quests and learn through experimentation how to survive in this magical and mysterious world.

Being text-based, it allows me to play it when SSH’ed in remotely. This is a very ideal scenario for people who don’t do gaming seriously like me. It also helps that you can pretty much stop playing anytime and resume later exactly where you were without fear of the consequences.

What makes it fun is the flexibility and complexity of the game. There are a lot of things you can do – there are even several ways of winning. For example, I can attack a monster by throwing my hat at it – it probably won’t be very effective, but you get the idea. Or I could kill some rats and eat their corpses – or if there was a cat nearby I could feed it some rat corpses and it might become my pet. There are spells, races, classes, potions, herbs, weapons, shields, clothing, amulets, gods, quests, pets, shops, skills, talents, curses, special effects – you get the idea: it’s detailed. You can do a lot of stuff – and stuff you do affects stuff that happens to you. Heck, locations are randomly generated every single time you play the game. If that’s not awesome replayability, I don’t know what is. ADOM’s Wikipedia entry says a lot more about it than I can mention in this post.

Don’t be fooled by the hideous graphics – or lack of graphics. It’s a challenging and interesting gaming experience. I still haven’t won it – not even come close. True I’ve only played it 20 times or so (savefiles are limited to one per character, and once dead, that’s it. No saves), but yes, it’s challenging. You actually have to reason once in a while.

Just because it’s a console-based game doesn’t mean it doesn’t play nice with Windows or Macs. If you’re looking for an interesting gaming experience to try out next weekend I would recommend ADOM. Just a note: it takes time to learn, and it’s hard – don’t be discouraged if you keep on dying.

Related posts:

  1. Hello, world!
  2. A Little 21 Fun with C++.
  3. Windows Mobile 6.5 Review

No accounting for taste

Somehow my post from yesterday about Church numerals in Clojure hit the front page of Reddit briefly. I don't understand why. It wasn't that interesting. It was an interesting topic, but there are other sites with better information about the topic. (Even Wikipedia has more/better info. This one is nice too in spite of being C#.)

I think it's because it was submitted to Reddit with a vague and inflammatory title about brain explosions, and people click links without thinking too much about what they're doing. Even programmers do, I guess.

My blog got around 14,000 visits yesterday, which is not much these days, but a lot by the standards of my tiny blog. If you added up everyone I ever had a conversation with in real life, would it be 14,000 people? I doubt it. Kind of crazy.

I run three websites out of one JVM/Clojure instance on my lowly VPS server and it didn't crash, so I'm kind of happy about that. I've crashed from lesser loads than that in the past. So either my programming is getting better, or my new host is better than my old one, or it was dumb luck.

All of my data is persisted in Tokyo Cabinet nowadays but mostly it's read from caches in Clojure refs, so maybe that helped a bit too. Maybe. Who knows? I know nothing about scaling websites. Slashdot would reduce this site to a puddle of goo.

In any case I appreciate the opportunity to blather about things and have people listen.

Posts for Thursday, September 17, 2009

Paludis 0.40.1 Released


Paludis 0.40.1 has been released:

  • Bugfix: sometimes fetch failures would not register as errors.
Posted in paludis releases Tagged: paludis

Posts for Wednesday, September 16, 2009

avatar

Uzbl to you too!

I’ve been trying uzbl for the last few days and I am pretty much impressed on how useful such a small application can be in certain usage cases!

I installed it on my Debian testing using the following blog post: Installing uzbl on Debian Squeeze .
Be sure to make install else you’ll have no config and uzbl will be unusable!!!

The first place I used it was for the urlLauncher plugin of urxvt. On my .Xdefaults I have the following piece of code:
urxvt.perl-ext-common: default,matcher,-option-popup,-selection-popup,-realine
urxvt.matcher.button: 1
urxvt.urlLauncher: /usr/local/bin/urxvt-url.sh

and my /usr/local/bin/urxvt-url.sh contains:
#!/bin/sh
uzbl "$1"

Now every url on the console get’s highlighted and I can open it with uzbl. And that means opening really fast!

Example:
urxvt terminal (tabbed by fluxbox) with some urls highlighted by the perl matcher plugin of urxvt:
urxvt-url-highlight

left clicking on one of the urls opens it with uzbl:
uzbl-window

Apart from that, I’ve started using uzbl to open links on instant messengers, IRC clients and in every other place that people send me simple links to check out or I need a fast browser instance. Some people might say that it looks like links2 graphical mode, but it’s NOT like opening urls with “links -G” because uzbl is based on webkit and that means it can deal with javascript, java, flash, whatever…

I just love the way you can keybind all the actions you want on it…on the example config that comes with it, you quit the browser by typing ZZ…how great is that ? :D

Some usage tips
1) Tabbed behavior (if you have fluxbox):
In ~/.config/uzbl/config add
bind t _ = spawn uzbl --uri %s
and in ~/.fluxbox/apps add the [group] tag before the [app] tag for uzbl like that:

[group]
 [app] (name=uzbl) (class=Uzbl)
  [Workspace]   {0} 
  [Head]    {0} 
  [Dimensions]  {800 1284}
  [Position]    (UPPERLEFT) {0 0}
  [Maximized]   {yes}
  [Jump]    {yes}
  [Close]   {yes}
[end]

Now the command t www.google.com inside uzbl, will open a new tabbed window of uzbl with www.google.com loaded in it.

2) Close uzbl window with ctrl+w
In ~/.config/uzbl/config add:

bind     ctrl+v ctrl+w    = exit

(press ctrl+v ctrl+w one after the other and you will get something like ^W in the file)

P.S. If you are a person that just came from the point and click windows world to the beautiful world of linux, or you are a person that loves bloated desktop managers like KDE/gnome/etc or bloated applications like firefox/iceweasel/konqueror don’t even think of installing it. You’ll never understand its value…
P.S.2. If Richard Stallman decided to browse the web and had an internet connection uzbl would probably be his browser of choice :P

Church Numerals in Clojure

Church Numerals are a way of encoding natural numbers using lambda expressions. A number n is represented by a function that composes another function f around its argument x, n times. So:

0 ≡ λf.λx. x
1 ≡ λf.λx. f x
2 ≡ λf.λx. f (f x)
...

These can be implemented very easily in Lisps and other languages with first-class functions. In Clojure, this would be:

0 ≡ (fn [f] (fn [x] x))
1 ≡ (fn [f] (fn [x] (f x)))
2 ≡ (fn [f] (fn [x] (f (f x))))
...

The insane thing is that you can do arithmetic on these things using nothing but more anonymous functions. It's lambdas all the way down.

Once you understand this, your brain will explode, and hopefully little bits of it will land next to the remnants of my own brain to keep it company.

So based on the Wikipedia article, here are some functions that convert numbers to and from Church encoding, and then some functions to do basic arithmetic on Church numerals. I understand this down to exp (via lots of pencil and paper expansions) but I gave up understanding at pred.

(defn church
  "Convert a natural number to a Church numeral."
  [n]
  (loop [n n, acc (fn [f] (fn [x] x))]
    (if (zero? n)
      acc
      (recur (dec n)
             (fn [f]
               (fn [x]
                 (f ((acc f) x))))))))

(defn unchurch
  "Convert a Church numeral to a plain integer."
  [n]
  ((n inc) 0))


(def plus
     (fn [m]
       (fn [n]
         (fn [f]
           (fn [x]
             ((m f) ((n f) x)))))))

(def mult 
     (fn [m]
       (fn [n]
         (fn [f]
          (n (m f))))))

(def exp
     (fn [m]
       (fn [n]
         (n m))))

(defn pred [n]
  (fn [f]
    (fn [x]
      (((n (fn [g]
             (fn [h]
               (h (g f)))))
        (fn [u] x))
       (fn [u] u)))))

(def sub
     (fn [m]
       (fn [n]
         ((n pred) m))))

(def is-zero?
     (fn [n]
       ((n (fn [x] 'FALSE)) 'TRUE)))

And this somehow actually works:

user> (unchurch (fn [f] (fn [x] (f (f (f (f (f (f (f x))))))))))
7
user> (unchurch (church 7))
7
user> (unchurch ((plus (church 2)) (church 3)))
5
user> (unchurch ((mult (church 2)) (church 3)))
6
user> (unchurch ((exp (church 2)) (church 3)))
8
user> (unchurch ((sub (church 7)) (church 3)))
4
user> (is-zero? (church 0))
TRUE
user> (is-zero? (church 7))
FALSE

This is the kind of thing I wish I'd studied more in college. I covered some cool stuff, some small amount of theory of computation and whatnot, but not nearly enough of this. Not enough functional programming, not enough Lispy goodness.

A lot of people say all programmers should learn assembler language so you understand what's happening at a low level. But shouldn't it be just as important to learn lambda calculus? It's another kind of low level, a very important one at that.

Recover a Non-booting Linux System

Ok, inevitably, it will come to pass that if you are testing out Alpha Releases, you will experience at least one time in your life where the system will not boot.

Recently, while working on Karmic (Ubuntu 9.10), I did an update an rebooted into a non functional system. Apparently just before freeze for Alpha 6, there were some uploads which caused the build systems to not completely build all the necessary packages. Hence I had a partial update.

Anyway, things seem to be resolved now, so on to recovery. I am documenting this mostly so I remember how to do it again (copy/paste is your friend) and maybe it will be useful to others.

First, you need a live CD/DVD/USB running your favorite Linux. In my case, it's Kubuntu. I used my usb-creator-kde to make a live USB from a known working and recent release.

After booting into your live environment, you need to open a terminal and switch to mount your partitions under /mnt.

To determine the partitions, you can use fdisk as follows:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd88dfd16

Device Boot Start End Blocks Id System
/dev/sda1 * 1 61 489951 83 Linux
/dev/sda2 62 38913 312078690 5 Extended
/dev/sda5 62 1306 10000431 82 Linux swap / Solaris
/dev/sda6 1307 7385 48829536 83 Linux
/dev/sda7 7386 38913 253248628+ 83 Linux

Disk /dev/sdb: 2057 MB, 2057306112 bytes
64 heads, 62 sectors/track, 1012 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes
Disk identifier: 0x0000a283

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1012 2007777 b W95 FAT32

sdb is my USB drive and sda is my HDD. sda1 is /boot, sda6 is / and sda7 is home. Yours will likely be different.

After you figure out your partitions, you will mount them as follows:

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot
ubuntu@ubuntu:~$ sudo mount /dev/sda7 /mnt/home

Verify everything looks correct before proceeding (i.e. you got the partitions correct and mounted in the correct places).

Next, you need to take care of /proc and /dev as follows:

ubuntu@ubuntu:~$ sudo mount -t proc none /mnt/proc
ubuntu@ubuntu:~$ sudo mount -o bind /dev /mnt/dev

Ok, now you have setup your chroot environment, and may change into it:

ubuntu@ubuntu:~$ sudo chroot /mnt

At this point, you should be able to update your system, add/remove packages using apt-get, or edit any files you need to fix the system.

In my case, a simple apt-get update && apt-get upgrade will fix things.

After making your changes you need to exit the chroot and unmount the partitions in the reverse order.

Now you should be able to safely exit the live system and reboot.

Hope this helps.

Posts for Tuesday, September 15, 2009

Ten Ways PMS Raped your Baby


Since hating PMS seems to be back in fashion again this week, I thought I’d list ten of the stupidest claims that I’ve seen of late in the hope that some of the FUD might die down:

1. PMS slows down new features and prevents innovation

Actually, once new ebuild-usable features end up in Portage, they very quickly end up in a published EAPI. The reason you can’t use all the fancy new features in EAPI 3 that you’ve all been waiting for for so long is that Portage still hasn’t implemented them. In addition, we’ve gone from “EAPI 3 will be ready for Portage within a month” three months ago to “there’s an 80% chance EAPI 3 support will be ready in Portage by the end of the year“.

Time-wise, EAPI 3 has been waiting for Portage for six months and before that, for the Council to come to decisions for two months. The total overhead imposed by PMS was around four days, and those four days weren’t holding up anything else anyway.

Still, at least there’s a long way to go before EAPI 3 takes as long as it took Portage to get use dependencies

Similarly, PMS isn’t to blame for profiles not being able to make use of new features. People who are telling you this are probably thinking about an undocumented Portage feature that isn’t in PMS and that isn’t supported by other package managers. This feature could very easily be in PMS, but there’s been no interest from the Council in retroactively adding it to EAPI 3 or in doing an EAPI 2.1 just to include that feature. The feature almost certainly will be in EAPI 4, but work on EAPI 4 isn’t going to start until Portage is done with EAPI 3. So again, PMS isn’t the reason you can’t use it.

2. PMS or EAPI is about ebuilds, not profiles

This one’s from people who haven’t bothered to read the opening of PMS, or who haven’t been paying attention to the Council.

PMS covers ebuilds and the tree format, including things like profiles. The aim is to cover everything necessary to produce a package manager that can use ebuilds (except possibly VDB, which probably shouldn’t be necessary for ebuild support but currently is…).

EAPI is used to indicate the rules used to handle ebuilds, and also profiles following the Council accepting Zac’s proposal last year.

3. PMS imposes an Exherbo agenda upon Gentoo

Exherbo doesn’t use PMS or Gentoo EAPIs.

4. PMS imposes a Paludis agenda upon Gentoo

Again, no. There’s no feature in any EAPI that’s there because of Paludis. Every feature in EAPIs 1, 2 and 3 was either requested by a Gentoo developer or included to make things easier for Portage. To get into an EAPI, features merely have to be vetted by the Portage team and the Council.

5. PMS is only used by Paludis anyway

Nope. PMS is used by both Portage and Paludis, as well as a number of third party libraries and utilities which don’t support full package management operations (things that need to compare two versions, for example, need to use PMS), and it was also used by Pkgcore.

Saying that PMS is only of use for third party package managers is like saying that the HTTP specification is irrelevant for Internet Explorer.

6. PMS stops other distributions from doing things

Again, no. Other distributions can ignore PMS entirely. Doing so would of course be a horrible idea, as all the people who wrote websites to work on Internet Explorer 5 found out, but that’s their decision to make. A much better option would be for those distributions to roll their own derived EAPIs, which, as happened for the Gentoo KDE project’s kdebuild-1, could be added to PMS. That way they are guaranteed that any undocumented features they rely upon won’t break with the next release, as well as avoiding complaints from users who want to use a different package manager, thus avoiding the problems people who wrote Internet Explorer 5 specific code rather than following the HTML specification encountered.

7. PMS stops Gentoo from deciding its own features

PMS is run by a Gentoo developer and approval of new EAPI features is handled by the Portage team and the Gentoo council. For that matter, the PMS team has never rejected a single feature for inclusion in a future EAPI.

8. PMS introduces red tape

No, the previous Council introduced red tape, primarily because a couple of Council members refused to read any submissions more than five minutes before a meeting. Had the Council used the two weeks between meetings to read over and state their opinions on the EAPI 3 feature list, EAPI 3 would have been approved within two meetings rather than dragging on for months.

Unfortunately the current Council doesn’t seem to have improved, with at least one member showing up to a meeting having not read the agenda beforehand.

9. PMS imposed stupid ordering on metadata files

There’s a tendency amongst certain people to blame PMS for stupid or arbitrary rules. A typical example is to moan about PMS because it says that EAPI has to be on line 15 of metadata cache files. Quite how PMS is to blame for a decision that was made before PMS existed, and that was made because line 15 was the first available cache line when EAPI was introduced as a metadata key, is completely beyond me. Similarly, the rules for handling leading 0s in version numbers is Portage’s fault (although ultimately it’s Perl’s fault), as is any other format gripe you care to name.

10. PMS will stop me from using my favourite feature in configuration files

PMS doesn’t discuss user configuration at all. Handling of user configuration is left entirely to the package manager.

Posted in gentoo Tagged: eapi, gentoo, paludis, portage

Posts for Monday, September 14, 2009

Windows makes me one inch shorter!! XD

OK, this is completely random ramblings, but I have to get it out of my system.

Running Windows XP (on default settings) eats away a whole inch of desktop space by just having those obnoxious, ugly, huge window decorations and taskbar! It's driving me nuts! XD

I soooooo miss my pimped out KDE4 with hidden, well organised panels and smaller window decorations that one can turn off... or Awesome WM ...or Fluxbox

...bloody hell, I'll even settle for DWM or IceWM at this point!!!

hook out >> studying while drinking coffee with honey, milk and cardamom pods
<!--break-->

What is going on?

Warning: Pure train of thought.

My primary hard drive has crashed so I have to switch to Windows temporarily. There is nothing special happening lately except for the fact that I am enjoying life to the fullest. I can say that I am on the right track. I really thank God for that. Personal projects are keeping me busy these days. Next month I will be pursuing my MSCS degree. Hopefully this time, I am mature enough to handle school stuffs.

Anyway here are stuffs for you to check,

When Nature is Freakier than Sci-Fi
Artificial Intelligence
Blizzard Entertainment
CitiSecOnline - Philippines Online Stockbroker

avatar

Using WIPUP – a practical example.

Even though WIPUP still needs time to mature (as well as it’s still very incomplete as of writing) as most of the basic functionality is up I wanted to show a practical example of what it is.

WIPUP is my idea for my OpenDesktop competition submission as well as my stepping stone into KDE development. Here is a demonstration on how it could be used.

A while back I told you I was working on a composition. This can be called my “Evan” project, as the name of the piece is “Evan”. It is also a work-in-progress. Originally I would give updates via blog posts, however a system like this allows people to view my updates through time and see it in a consistently formatted matter. If they wanted to keep up to date on what’s going on, they also won’t need to sift through all my blog posts.

So I created a project for it and added what was my previous post on it. You can see the update here. Now you realise from that page you’ve essentially see what I’ve done on the project and nothing else. Compared to my blog post, which contained a lot of my usual drivel, here you see what’s important only. The astute observer would see that that’s not the only thing I’ve submitted from the “Moult’s Other WIPs” section, as well as seeing the timeline arrow buttons on the top right of the update page. Depending on how curious they are on this project, they could move ahead and see how I have progressed.

update1

Today I realised I’ve been a mean person from my logs available on the dashboard (this feature is still under construction) and that I haven’t given you an update in a long time. So I decide to give you another update. Just by glancing at it you can definitely see that I’ve done work. Clicking on the image allows me to preview the score full size to check out in detail and full-resolution glory what has been added. If I liked the changes, I could add a kudos to it. Unfortunately since I own the update I can’t demonstrate this (it’ll be stupid if you kudos your own work).

update2

The update also says to “See next update to download the PDF so you can print it out and try it out on your own.” – so I click the timeline button to bring me into the future (at 88 miles per hour!) and that throws me at another update page. At this page, it’s a no-nonsense here-it-is-go-away style. I can download the music score PDF, print it out and play it to see how horrible it sounds.

update3

Notice this example is of a music composition in the works – it has nothing to do with a programming project. I understand that many people have similar needs (I know I definitely do!) and that’s what WIPUP is all about. Unfortunately the chronological timeline view and profiles page is still under construction or I could’ve shown how we can effectively display “progress over time” to any random person viewing our work.

Many open-source projects use this model too, and I believe this is an invaluable tool to showcase this behind-the-scenes development – and to show that we are a really alive community, not just developers, but users as well! This way it’ll be easy for users to know what’s going on on their favourite projects and applications.

Unfortunately it’s still unfinished but this will later use the OpenCollaboration Services API to allow you to integrate this system into your desktop workflow. Imagine publishing a savefile right from the GIMP itself!

That’s all for today, hope you liked it!

Related posts:

  1. My OpenDesktop Competition Submission: Wipup
  2. SocialDesktop Competition Update: Wipup
  3. Rapid Fire

CableCard and Linux

Microsoft announced this past week that anyone could now purchase a CableCard and install it themselves. No need for OEM help or dealing with pesky cable company rental fees. CableCard allows computer systems to view digital TV transmissions without the aid of a cable box or equivalent.

I have several TV Tuners that I've used with MythTV for years. Unfortunately, these tuners never allowed access to digital channels.

Sadly, CableCards are still a technology restricted to the Windows Operating System. There's no open schematics or plans available to them, so there's very little hope that the technology will be supported in Linux anytime soon. I have little interest in using Windows Media Center, but I've always loved using MythTV.

MythTV is a client-server set up, where the backend is what communicates with the hardware. But I can set up MythTV frontends on any number of PCs in my network (or even over the internet if I wanted), and stream any media from my server to that PC. I believe MythTV's implementation of this feature predates Windows Media Center's implementation by a long shot. And despite the slow release cycle for MythTV, I still believe it to be a better and more expandable product.

Mythbuntu, an Ubuntu-based MythTV distro, made an April Fools' Day Joke this year about Microsoft opening up CableCard development and that CableCards would soon be supported under Linux. Sadly, the next day was a heartfelt tragedy after the truth was realized.

Maybe someday I'll be able to watch digital cable from my desktop.

Posts for Sunday, September 13, 2009

Advanced Urban Terror Setup


HeaderOne of the greatest games I’ve ever played is Urban Terror. Urban Terror takes Quake 3 and transforms it to near perfection. In my opinion, Urban Terror is by far the most successful open source game and the amount of time to play it, learn it, master it is great pleasure in time. In this guide, I’ll show you how to optimize and setup Urban Terror for best performance and usability.

Urban Terror is based on the Quake 3 engine that was released by id software in 2005. Since then it has been edited, refined, fixed and added to, under the name of the ioquake engine. The ioquake team has done an awesome job of keeping the engine up to date and running well, adding 64bit support, ogg support, in engine VOIP support… The current version of Urban Terror is 4.1 and you should be able to find it in the repositories for your distribution.

Keyboard Layout

Though the default layout of Urban Terror keybindings can be gotten by with, advanced users know that you’ll find yourself having to take your hands off the default keyboard positions too many times. In a game were milliseconds count, this can be a disaster. Best to keep grouping of commonly used keys close to your left hand. This keyboard layout groups commonly used functions but is generic and should work well for any game type. However, since I find myself playing capture the flag most of the time, the automated chat (radio commands) are for ctf:

Printable Version

The radio commands are easy enough to change in the configuration below.

Configuration

id software really knows how to make a game engine. The capabilities and options in the engine seem nearly unlimited. I’ve gone through and discovered the most important values to being able to customize your Urban Terror, but first a quick note on configuration files.

The configuration files are stored in ‘~/.urbanterror/q3ut4/’. Before UT 4.1 they were stored in ‘~/.q3a/q3ut4/’. Urban Terror still uses this folder for legacy purposes but if you create a new configuration in ‘~/.urbanterror/q3ut4/’ they will inherit the old values obstructing some of your new settings. Best thing to do is to rename the preferences and start from scratch. You can do this by:

mv ~/.q3a ~/.q3a-old
cd ~/.urbanterror/q3ut4
mv q3config.cfg q3config.cfg.old

For automatic configuration inheriting, Urban Terror (and other id tech games) will look for a file called autoexec.cfg in the configuration folder (~/.urbanterror/q3ut4 in this case). I’m not going to go over all the settings you can do. Rather, I’ll just provide the configuration file which has comments on most of the variables you’ll need. Place the file in ‘~/.urbanterror/q3ut4/’. To edit the file, I’d recommeding changing ‘r_mode’ to “4″ and turning fullscreen off, saving then loading Urban Terror. Edits to the configuration file can be applied on the fly (except some graphic ones). Use the tilda key (~) to get to console and this will release your mouse to make the edits. Make the edit and type:

/exec autoexec.cfg

in the console to reload the configuration. This will also show you if you have any errors in the configuration file as well. Lastly, be sure to read this file and and edit before giving it a full go. Even if you do have a 1440×900 resolution and use OSS there are likely a few other variables that may make UT run poorly or not at all.

// Urban Terror configuration
// http://www.urbanterror.net/urt_manual/controls.htm

// comments marked as * are default values

// # Hardware # //

// Graphic card
seta cg_drawFPS "0"         // fps (frames per second) display (0 off, *1 on)
seta r_colorbits "0"        // color depth (0 desktop default, 16, 32*)
seta r_texturebits "0"      // texture colors (0 desktop default, 16, 32*)
seta r_texturemode "GL_LINEAR_MIPMAP_LINEAR" // (filter: *NEAREST bilinear
                                             // LINEAR trilinear)
seta com_maxfps "125"       // max frames/second, 125 best
seta cg_sfxParticle "0"     // particle effects (- hit effects) (*0 off, 1 on)
seta cg_showBulletHits "0"  // hit info by nme(0 off, 1 where/whom, *2 1+damage)

// Monitor
seta r_fullscreen "1"       // fullscreen mode (*0 off, 1 on)
seta r_mode "-1"            // r_mode list: http://urt.taggedzi.com/guide1.php
seta r_customwidth "1440"   // resolution custom width
seta r_customheight "900"   // resolution custom height
seta r_displayrefresh "0"   // Refresh rate (0 desktop default, 60, 70...)
seta r_swapinterval "0"     // vertical sync (0 off, turn on if getting tearing)

// Gamma/Brightness
seta r_brightness "1"
seta r_gamma "1.15"

// Sound
seta s_driver "oss"         // sound driver (linux: alsa, oss)

// Network
// http://www.www0.org/w/Networking,_lag_meter,_and_gaming_consistency_guide_to_Urban_Terror
seta cg_lagometer "0"       // lag-o-meter display (0 off, *1 on)
seta rate "25000"           // transfer dl threshold (25000 broadband, *3000)
seta cl_maxpackets "42"     // packets sent per frame (*30-42) 42 is usually >

// Mouse
seta sensitivity "13"       // mouse speed (*5)
set m_filter "1"            // smooth mouse by averaging input (*0 off, 1 on)

// # Player # //
seta cg_selectedPlayerName "IsoMetric" // player name
seta raceblue "2"           // player skin (1-4)
seta racered "2"
seta cg_rgb "1 0.5 1"       // player marker color (R G B Alpha)
seta cg_sfxTeamBands "1"    // team bands (0 off, 1* on)

// # General Settings # //
set cg_gunsize "1"          // gunsize (*0 large, 1 small)
set cg_hitsound "1"         // hit sound when hitting opponent (*0 off, 1 on)
// Tac goggle color
cg_nvg "3" // (*0 green,1 red,2 blue,3 yellow,4 cyan,5 purple,6 pink,7 orange)

// # HUD settings # //
seta cg_mapalpha "0.5"    // map transparency (*0.7)
seta cg_maparrowscale "2" // map player arrow size (*3.0)
seta cg_mappos "1"        //map posit. (0 off, *1, top-left, 2-9 counter-clock)
seta cg_mapsize "150"     // map size (*150)
seta cg_hudweaponinfo "1" // Weapon information (0 rounds/clips/mode,
                          // 1 - 0 + weapon, *2 - 1 + icon)
seta cg_drawcrosshair "4"             // crosshair type (1-11)
seta cg_crosshairsize "20"            // crosshair size (*5)
seta cg_crosshairrgb "0 1 0 0.7"      // crosshair color (RGB Alpha[must be 1])
seta cg_crosshairnamestype "3"        // crosshair name types (0-3*)
seta cg_crosshairnamessize "0.2"      // crosshair player name size
seta cg_crosshairfriendRGB "1 .5 0 1" // crosshair color teammates (RGB Alpha)
seta cg_scopefriendrgb "1 .5 0 1"     // crosshair color team scoped (RGBA)
set cg_chatTime "8000"    // chat messages display time (in milliseconds)
seta cg_drawteamoverlayscores "3"     // team box (0 off, *1 both teams,
                                      // 2 1 + nme alive, 3 1 + all alive)

// # Keybindings # //
// http://urt.taggedzi.com/guide1.php - available keys

// Menus
bind b "ui_selectgear"    // gear menu
bind n "ui_selectteam"    // team menu
bind SHIFT "ut_radio"     // radio menu
bind TAB "+scores"        // scoreboard

// Movement
bind e "+forward"         // move forward
bind d "+back"            // move backward
bind s "+moveleft"        // move left
bind f "+moveright"       // move right
bind CAPSLOCK "+moveup"   // jump
bind r "+button8"         // sprint

// Crouch Toggle
set sit "+movedown; wait 15; set crouch vstr stand"
set stand "-movedown; wait 15; set crouch vstr sit"
set crouch "vstr stand" //set default
bind a "vstr crouch"

// Weapons/Items
bind MOUSE1 "+attack"             // fire
bind MOUSE2 "+button6"            // bandage
bind MOUSE3 "+button7"            // activate - open/close door,(def)use bomb
bind MWHEELDOWN "ut_zoomout"      // zoom out
bind MWHEELUP "ut_zoomin"         // zoom in
bind t "+button5"                 // reload
bind c "+button3"                 // weapon mode (automatic, burst...)
bind g "ut_weaptoggle primary"    // primary weapon
bind w "ut_weaptoggle secondary"  // secondary weapon
bind v "weapon 12; weapon 11"     // smoke grenade before hand grenade
bind q "ut_weaptoggle sidearm"    // sidearm
bind x "ut_weaptoggle knife"      // knife
bind z "ut_weapdrop"              // drop weapon
bind 1 "ut_itemnext"              // next item
bind 2 "ut_itemdrop"              // drop item
bind 3 "ut_itemuse"               // use item

// fine grain sniper toggle (lessens mouse sensitivity)
set zoomtoggle1 "cg_zoomfov 15; sensitivity 10; set nextzoomtoggle vstr zoomtoggle2; ut_echo sniper view"
set zoomtoggle2 "cg_zoomfov 22.5; sensitivity 13; set nextzoomtoggle vstr zoomtoggle1; ut_echo regular view"
set nextzoomtoggle "vstr zoomtoggle1"
bind h "vstr nextzoomtoggle"

// Chat
bind y "messagemode"  // chat global
bind u "messagemode2" // chat team
bind i "messagemode3" // chat target (person behind crosshairs)
bind o "ut_radio"     // radio menu

// radio keys
// http://wiki.urbanterror.org.ve/index.php?title=Manual_de_Urban_Terror#Radio_Command_Chart

bind F1 ut_radio 2 1            // Move in.
bind F2 ut_radio 3 9            // Holding here.
bind F3 ut_radio 3 3 [$health]  // I need a medic!
bind F4 ut_radio 4 3            // Base status?
bind F5 ut_radio 7 2            // I'm going for the flag.
bind F6 ut_radio 2 6            // Requesting backup.
bind F7 ut_radio 2 5            // Cover me.
bind F8 ut_radio 5 5            // Incoming!
bind F9 ut_radio 7 6            // Flag exiting left.
bind F10 ut_radio 7 8           // Flag exiting front.
bind F11 ut_radio 7 7           // Flag exiting right.
bind F12 ut_radio 1 5           // Base is secure.

bind 4 ut_radio 1 2             // Negative.
bind 5 ut_radio 1 1             // Affirmative.
bind 6 ut_radio 9 1             // Good job team.
bind 7 ut_radio 4 8             // Who's ya daddy?
bind 8 ut_radio 9 9             // Thanks.
bind 9 ut_radio 6 6 Hi          // Hi (High)
bind 0 ut_radio 6 7 Hello       // lo (Hello)

// System controls
bind - "vote no"                                  // vote no
bind = "vote yes"                                 // vote yes
bind HOME "screenshot; ut_echo screenshot taken"  // take screenshot
bind END "toggle cg_drawFPS"                      // fps display toggle
bind INS "toggle cg_lagometer"                    // lag-o-meter toggle

seta record_demo        "vstr record_demo_start"  // record toggle
seta record_demo_start  "set record_demo vstr record_demo_stop; stoprecord; recorddemo; wait 15; ut_echo recording started"
seta record_demo_stop   "set record_demo vstr record_demo_start; stoprecord; wait 15; ut_echo recording stopped"
bind PGUP "vstr record_demo"

Posts for Saturday, September 12, 2009

Flash: I hate you

If there's a version of Flash on Linux that does not crash my browser multiple times per hour, I'd love to know where I can get it.

When I want to browse more than 2 or 3 movies on Youtube at once, I switch over to Opera, because at least when Flash crashes in Opera, it just turns into a black box and Opera keeps going. Firefox on the other hand shuts down entirely.

But sometimes Flash even manages to crash my X server. That takes real talent. Flash cannot possibly die fast enough. We've been dealing with this atrocity for over a decade now.

Inactivity (or calm before the storm)

The avid reader may have noticed that as of late I didn't post many posts — especially not many of the deeper nature.

This I hope I'll get away with calling a calm before the storm ;)

The thing is not that I didn't write anything, but that I spent the time writing two (at the time of this post, still pending) articles for Linux Journal — one about FCron and another about the EUPL.

Apart from that I'm giving a presentation about "Open Standards and Formats in State Administration" on the yearly Linux Business Conference at the end of the month in Portorož.

So, you see, I'm not slacking off, it's just that some of the FOSS-related work I'm doing is not (supposed to be) on my website (yet).

hook out >> off to bed...
<!--break-->

TGJE no. 5 — On and off again

First off, I want to apologise to all the readers who follow me on Jamendo. A module caused my RSS feed not to be W3C valid anymore and therefore Jamendo did not aggregate it. Today I fixed the problem by removing the troublesome module and it should work again.

Now, if you followed my blog you noticed that my laptop died again, meaning that I am still depending on borrowed hardware and PortableApps.

The good news though is that I started using SongBird (packaged as a portable app), which means that my basic needs in music — scrobbling to Last.Fm, streaming from Jamendo and rating tracks — are met and I can write again about my musical discoveries from the land of the free. Although both its interface and Jamendo plugin are not nearly as good as Amarok's and the lag caused by running it from an USB key is sometimes driving me up the wall, it is bearable.

To keep up with my promise I will also try to post more often, even if that means shorter posts (e.g. only one or two artists per post).

Right now I am too tired to write a longer post, so I will just conclude it with what I am currently listening to:

  • The Morning Light and their (first?) EP — The Morning Light EP. The album was released on Jamendo only yesterday and, truth be told, I found it at the bottom of the page. Their style is a mellow mix of post punk with electronic elements, which takes me through the whole history of the post punk genre, without going too much into the noise rock section. At certain moments (e.g. in the track Troubles and the Low Profile remix of Scars) there are some more trashy or even industrial touches, while others (e.g. Scars) include some riffs that remind of surf rock and UK underground. The vocals are mediocre, but all in all I really really liked the EP and it seems like perfect music to walk around at night to. Mellow, yet powerful at times. Can barely wait to hear more from them!

hook out >> trying to study a bit, going to bed soon, in dire need of a new laptop...

avatar

Playing with Synergy on Gentoo and Debian

I currently have Gentoo/x86 on my desktop system and Debian/testing on my laptop. I wanted a way to be able to use the laptop’s trackpad to control the cursor on the desktop or to use the desktop’s mouse to control the cursos on the laptop. Thankfully I was able to do that with Synergy.

On Gentoo:
# emerge x11-misc/synergy
On Debian:
# aptitude install synergy

My config is pretty simple. That’s Debian’s (hostname lola) /etc/synergy.conf:

section: screens
    lola:
    athlios:
end

section: links
    lola:
        right = athlios
    athlios:
        left  = lola
end

section: aliases
    lola:
        mac 
end

When I want to control athlios (desktop) from lola (laptop), I start synergys on lola, ssh to athlios and start synergyc lola. That’s it, I can then control desktop’s mouse and keyboard from laptop’s touchpad and keyboard. When I move the lola’s cursor far to the right, the cursor starts moving on the desktop. Then if I start typing on the laptop’s keyboard I am actually typing on the desktop. Moving the cursor far to the left of the desktop’s monitor, the cursor starts moving again on the laptop.

A problem that I faced was that some keys (Left and Down arrow) stop repeating if you press them continuously when you start synergyc. The solution is posted on the synergy article on gentoo wiki. You just have to type: xset r 113 (left arrow) and xset r 116 (down arrow) to activate them, then move your mouse to the synergy server and back to the synergy client. If you try typing on the machine where the synergy client has started using its keyboard you will see that repeating doesn’t work at all. Just type xset r to get it back working if you need it.

For people having more than one machine on their desk, synergy is a real salvation in order to stop switching keyboards and mice all the time.

Exherbo is growing

Recently I've been talking about various community issues and how Exherbo handles them. I think Exherbo has been very successful in making sure people enjoy taking part in the daily maintenance and people have often told me that they really enjoy this aspect of Exherbo.

Not only are we solving technical issues that're interesting to people but we're doing so in a way that makes people want to actively take part in it. And while most people takes part in various ways a few have done some really outstanding work and I've wanted to thank them properly for a while now. So in true open source style I've rewarded them by giving them even more responsibility and full access to all our official git repositories.

A big thank you to Markus Rothe for all his PPC64 work, Elias Pipping for lots of Gnome related work as well as general bug fixes, Ali Polatel for his work on Sydbox as well as lots of Python and media related packages, Marvin Schmidt for his always good work and Thomas Anderson for lots of package bumps and fixes all over the place.

Posts for Thursday, September 10, 2009

avatar

mutt: threading like a pro

muttI’m sure I could come up with 5 of these every day if I read the whole user-manual religilously and followed dozens of blogs, but I don’t, so here goes:
mutt supports threading (duh!) through

set sort="threads"
set strict_threads="yes"

But you want threads which have new mails appear at the top/bottom (whichever way you work):

set sort_browser="reverse-date"
set sort_aux="last-date-received"

Voila! Additionally it doesn’t hurt to unset

unset collapse_unread

The default-keybinding for threads isn’t the best, so it’s best to rebind it to something unused but easy:

bind index - collapse-thread
bind index _ collapse-all

Don’t wonder about the absence of “uncollapse”, in mutt there is only toggle (like it or not).
One of the most useful features when communicating with people who don’t give a crap about mail is the split and link-feature for threads: Use the key ‘#’ to break apart a thread, or tag some mails (using ‘t’ for example) and the use the ampersand ‘&’ to link them to another mail (because some people see the “Reply” button as a cheap way to get an address into the To-field).
muttAnother feature of mutt (that’s worth using it over TB alone) is the quickness and ease with which it deletes attachments from mails without breaking the threading or anything else. Just press ‘v’ on mail, select the attachment, mark it deleted with ‘d’, go back to your mailbox and hit ‘$’ to write the changes to the mailbox. This will keep your mailbackups lean.

Changing the from field when sending email

This is simple, but I always forget how to do it when I need it and it’s hard to find on google for some reason.

echo "hi" | mail -s "My Subject" to@someone.com -- -f from@someone.com

Posts for Wednesday, September 9, 2009

avatar

Hello. I hacked the GIS website.

Not only did I hack it. I plastered my name all over it. Because what I really want to do is go to jail. I also want to get on bad terms with my school just before they write my references for my university application. Oh, I especially want to fill up that field saying “criminal records” on the UCAS application website.

My sense of humour is limited to rickrolling people on the internet. It is my life’s dream and destiny for my name to become synonymous with Rick Astley. I also linked to my blog so that everybody will know who I am. I can get more visitors on my blog and be really famous and popular. Hooray.

I also invented the name “Team Aerosol”. The name demonstrates the amazing linguistic capabilities and love for imagery in literature I have exhibited over the years.

Interestingly enough, when I was hacking the website, a lot of people started adding me as friends on Facebook. I am now extremely popular and I can add it to my list of social networking sites of which I have the most friends.

I also know how to use this fancy technique called “MSSQL injection” to hack the website. That is how I did it. MSSQL stands for Microsoft SQL. This is tribute to my most respected company of all time. Microsoft products have been part of my daily routine and I love nothing more than to purchase their corporate licenses just “for the fun of it”.

With my upcoming year 13 exams, I place hacking the school website as my highest priority.

Also, in all the years I’ve been in the school, I’ve been waiting for the opportune moment to leave such a mark. By leaving it to so late in the game, not only am I certain that they cannot catch me as I will leave to university before they have the chance, but it also ensures that I can make my knowledge about computers inconspicuous for all the previous years and strike without anybody suspecting it was me.

Disclaimer: no. I did not hack it. If you are unable to recognise my dripping sarcasm perhaps that explains why I got a B in English at IGCSE.

Update: it’s past midnight, hacker(s). I like to get a good 6 hours of sleep (at least). It’s healthy. Good night. You should sleep too, continue tomorrow if it pleases you.

Update: this hacker has style.

Related posts:

  1. Never gonna give you up.
  2. Blender Model Repository system upgraded
  3. How to Make a Website Part 1 – The Environment

Planet Larry is not officially affiliated with Gentoo Linux. Original artwork and logos copyright Gentoo Foundation. Yadda, yadda, yadda.