The Significance of # For Mercurial

Did you know that you have to encode “#” in your path if you work with Mercurial (hg)? I didn’t.

Let’s say I have a repository named “work#A” and so the usual Mercurial usage:

$ hg clone ~/projects/work#A mybranch
$ hg out ../work#A

wouldn’t work, and anything that requires path to a repository wouldn’t either as long you have a “#” in the path.

Excuse Me, What?

First of all you should read Mercurial’s manual on this, or if you fancy go grab a console and type:

$ hg help urls

The Mercurial guys decided to use “#” delimiter between repository path and revision. Does it sounds like a good feature to have? Can’t tell, I never use it but for me it smells like a legacy thing.

It’s A Feature Alright ..

Let’s say you have a can code in C# and you have projects under directory /media/c#/, so now you want to clone a project.

Unfortunately, if you are using Mercurial, you can’t do this:

$ hg clone /media/c#/mylinuxkernelrewrittenindotnet/ /tmp/dummybranch

to clone mylinuxkernelrewrittenindotnet to /tmp/dummybranch.

It will fail because it cannot find repository in /media/c. And if you DO have repository in /media/c, as long you dont have a tag named /mylinuxkernelrewrittenindotnet/ it will fail which is good because in this case we do not want to clone from /media/c up to tag /mylinuxkernelrewrittenindotnet/.

If you do have BOTH, a repository in /media/c and a tag named /mylinuxkernelrewrittenindotnet/ it will clone just that, successfully, but clearly it is not what you thought it is.

Wait, But I Thought Mercurial Is Intuitive?

Right away you thought you can escape this thing by adding a “\“, but nooo.. it wouldn’t work either.

So the Mercurial solution to this is to url-encode that path and put “file:” in front of the path expression. The end result should look like a URL.

Through research we know that a # url-encoded to %23. So with that knowledge, now you can do this:

$ hg clone file:/media/c%23/mylinuxkernelrewrittenindotnet/ /tmp/dummybranch

you can also use relative path as usual:

$ hg out file:../../../../work/foo%231

or :

$ hg pull file:~/work/foo%232

which I have to admit is such a hassle. But really, the alternatives to this (in Mercurial) are:

  • Just rename that stupid directory, or
  • Avoid it by using symlink without “#” in it, or
  • Not to write full path every time at all. In Mercurial we can define paths in hgrc (or .hgrc) and use them as alias.

Why I Think This # Is Ugly

Because the damned “-r” parameter exists, alive, and working that’s why.

Want to clone up to a revision? Type this:

$ hg clone -r 30 repopath newclone

Want to pull a revision from a remote repository? Type this:

$ hg pull -r c723c2da

The reasoning why they have to treat “#” as revision identifier in a path is beyond me. Honestly I never use that feature and probably never will, I cannot think of a situation where this “feature” will be useful.

Leave a comment

Filed under Ilmu, Orang bego punya kegiatan, Pendapat gak penting

SLiM Theme: blackwidow

Here, have a nice theme for SLiM:

SLiM Theme: blackwidow


To use this, you need to install Droid Sans Mono font.

Source image.

1 Comment

Filed under Orang bego punya kegiatan

PXE: Network Booting Into Debian Setup

I just installed Debian on a 2002-ish desktop: Intel Celeron 1.7GHz, 256 SDRAM, 10 GB HDD, an aging floppy drive alongside a dodgy CD drive; just another you-wont-see-me-using-this-on-a-daily-basis desktop PC. I hostnamed it vindauga.

BIOS Setup

First of all, I have to make vindauga to look forward to booting from network. On BIOS I’ve set its boot order to LAN and then HDD, I also have to set it’s “On-board LAN” to “Enabled”.

Connect It To Network

Luckily, I already have a Debian server up and sharing its internet connection. This server is going to bootstrap the installation for vindauga.

The thing about booting from network, is to make vindauga to join my network. Luckily I already run a dhcp server (package name: isc-dhcp-server) on my Debian server, this is my setup:

# this is an excerpt from my /etc/dhcp/dhcpd.conf
subnet netmask {
    # this subnet is for wired LAN at eth2

    option subnet-mask;
    # broadcast address to nodes in this subnet
    option broadcast-address;

    # set resolver & gateway to this computer/my Debian-server (
    option domain-name-servers;
    option routers    ;

    host VINDAUGA { # assign fixed IP address for vindauga for now
        hardware ethernet       00:E0:4C:99:DF:E7;
        fixed-address ;

    # this is the most important of all; with this, dhcp server will provide
    # NOT ONLY network details (address, gateway, etc.) but also a bootstrap
    # program for vindauga to run
    filename "pxelinux.0";

The filename "pxelinux.0"; part is to make vindauga to expect a program named pxelinux.0 for booting. As you might already know a dhcp server does not transfer file, basically it just giving the client a hint about the file, the one who actually transfer that file over the wire is another program called tftp-hpa, basically it is a simplified-ftp server. In Debian you can find its package named as “tftpd-hpa“.

Get tftp-hpa To Deliver

This tftp-hpa program —by default— uses UDP on port 69 so I punched a hole in my firewall to allow this traffic.

Now, its configuration file:

# /etc/default/tftpd-hpa


As you can see, on TFTP_ADDRESS I set it to listen on port 69. This is the IP address on my Debian server for eth1, which is connected to vindauga. The TFTP_OPTIONS is to make tftp-hpa to be verbose (the “-v” part), and to serve on a specific root (the “-s”).

The “-s” part is significant because it allows the dhcp server to say just pxelinux.0 and tftp-hpa would resolve it as /srv/tftp/pxelinux.0.

What To Deliver

This (highly-anticipated :)) pxelinux.0 file can be found in the netboot distribution of Debian:

Since I’m in Indonesia it is the fitting Debian mirror for me, feel free to use another mirror.

I download pxelinux.0, all files under debian-installer/ and pxelinux.cfg/ directory and put them in /srv/tftp/. I skipped the debian-installer/i386/pxelinux.0 because its a symlink to pxelinux.0 and end up with this:

├── pxelinux.cfg
│   └── default
├── pxelinux.0
└── debian-installer
    └── i386
        ├── linux
        ├── initrd.gz
        └── boot-screens
            ├── xfce
            │   ├── txtdt.cfg
            │   ├── txt.cfg
            │   ├── prompt.cfg
            │   ├── prmenu.cfg
            │   ├── menu.cfg
            │   ├── adtxtdt.cfg
            │   └── adtxt.cfg
            ├── vesamenu.c32
            ├── txt.cfg
            ├── syslinux.cfg
            ├── stdmenu.cfg
            ├── splash.png
            ├── rqtxt.cfg
            ├── prompt.cfg
            ├── menu.cfg
            ├── lxde
            │   ├── txtdt.cfg
            │   ├── txt.cfg
            │   ├── prompt.cfg
            │   ├── prmenu.cfg
            │   ├── menu.cfg
            │   ├── adtxtdt.cfg
            │   └── adtxt.cfg
            ├── kde
            │   ├── txtdt.cfg
            │   ├── txt.cfg
            │   ├── prompt.cfg
            │   ├── prmenu.cfg
            │   ├── menu.cfg
            │   ├── adtxtdt.cfg
            │   └── adtxt.cfg
            ├── f9.txt
            ├── f8.txt
            ├── f7.txt
            ├── f6.txt
            ├── f5.txt
            ├── f4.txt
            ├── f3.txt
            ├── f2.txt
            ├── f1.txt
            ├── f10.txt
            ├── exithelp.cfg
            ├── dtmenu.cfg
            └── adtxt.cfg

Boot It Up

I restart my dhcp server to make configuration changes into effect and start tftpd-hpa on my Debian server:

$ sudo /etc/init.d/isc-dhcp-server restart
$ sudo /etc/init.d/tftpd-hpa start

I turn on vindauga and lo, it boot into Debian’s setup menu.

Leave a comment

Filed under Ilmu, Orang bego punya kegiatan

TP-LINK TF-3200 On Debian

So I bought a FastEthernet NIC, a cheap TP-LINK PCI card, somewhere around $3,5. Here’s the box:

The model is TF-3200, and I want to install it alongside my D-LINK .. something.


The hardware installation is boring, I unwrap it, put it on one of the empty PCI slots and fasten its screw to the casing.

Get My Debian To Use It

Strangely at first boot my Debian didn’t recognize it. Yay!! There is only one way to install a PCI card and I could swear even a brick couldn’t get it wrong, so knowing hardwares love-hate relationship with Linux I have to suspect it’s more down to modules and stuff.

Fortunately, for a $3.5 LAN card, it also comes with a “Resource CD”; it’s a driver CD. In short, there is a driver for Linux located in TF-3200/LinuxDriver/ and it comes in source form.

Aww, that’s cute!

I did try to compile but somehow I cant get it to work:

$ make
make -C /lib/modules/2.6.39-2-486/build SUBDIRS=/tmp/LinuxDriver modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.39-2-486'
  CC [M]  /tmp/LinuxDriver/sundance_main.o
/tmp/LinuxDriver/sundance_main.c: In function ‘sundance_probe1’:
/tmp/LinuxDriver/sundance_main.c:712: error: implicit declaration of function ‘SET_MODULE_OWNER’
/tmp/LinuxDriver/sundance_main.c:735: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c:762: error: ‘struct net_device’ has no member named ‘open’
/tmp/LinuxDriver/sundance_main.c:763: error: ‘struct net_device’ has no member named ‘hard_start_xmit’
/tmp/LinuxDriver/sundance_main.c:764: error: ‘struct net_device’ has no member named ‘stop’
/tmp/LinuxDriver/sundance_main.c:765: error: ‘struct net_device’ has no member named ‘get_stats’
/tmp/LinuxDriver/sundance_main.c:766: error: ‘struct net_device’ has no member named ‘set_multicast_list’
/tmp/LinuxDriver/sundance_main.c:767: error: ‘struct net_device’ has no member named ‘set_mac_address’
/tmp/LinuxDriver/sundance_main.c:768: error: ‘struct net_device’ has no member named ‘do_ioctl’
/tmp/LinuxDriver/sundance_main.c:769: error: ‘struct net_device’ has no member named ‘tx_timeout’
/tmp/LinuxDriver/sundance_main.c:771: error: ‘struct net_device’ has no member named ‘change_mtu’
/tmp/LinuxDriver/sundance_main.c: In function ‘mdio_read’:
/tmp/LinuxDriver/sundance_main.c:1029: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘mdio_write’:
/tmp/LinuxDriver/sundance_main.c:1059: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_open’:
/tmp/LinuxDriver/sundance_main.c:1088: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c:1094: error: ‘SA_SHIRQ’ undeclared (first use in this function)
/tmp/LinuxDriver/sundance_main.c:1094: error: (Each undeclared identifier is reported only once
/tmp/LinuxDriver/sundance_main.c:1094: error: for each function it appears in.)
/tmp/LinuxDriver/sundance_main.c:1141: error: ‘SPIN_LOCK_UNLOCKED’ undeclared (first use in this function)
/tmp/LinuxDriver/sundance_main.c: In function ‘check_speed’:
/tmp/LinuxDriver/sundance_main.c:1195: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_timer’:
/tmp/LinuxDriver/sundance_main.c:1242: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘tx_timeout’:
/tmp/LinuxDriver/sundance_main.c:1258: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘init_ring’:
/tmp/LinuxDriver/sundance_main.c:1311: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘tx_poll’:
/tmp/LinuxDriver/sundance_main.c:1354: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘start_tx’:
/tmp/LinuxDriver/sundance_main.c:1381: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘reset_tx’:
/tmp/LinuxDriver/sundance_main.c:1423: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘intr_handler’:
/tmp/LinuxDriver/sundance_main.c:1487: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘rx_poll’:
/tmp/LinuxDriver/sundance_main.c:1621: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c:1677: error: implicit declaration of function ‘eth_copy_and_sum’
/tmp/LinuxDriver/sundance_main.c: In function ‘refill_rx’:
/tmp/LinuxDriver/sundance_main.c:1718: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_error’:
/tmp/LinuxDriver/sundance_main.c:1749: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘get_stats’:
/tmp/LinuxDriver/sundance_main.c:1772: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘set_rx_mode’:
/tmp/LinuxDriver/sundance_main.c:1801: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c:1811: error: ‘struct net_device’ has no member named ‘mc_count’
/tmp/LinuxDriver/sundance_main.c:1816: error: ‘struct net_device’ has no member named ‘mc_count’
/tmp/LinuxDriver/sundance_main.c:1822: error: ‘struct net_device’ has no member named ‘mc_list’
/tmp/LinuxDriver/sundance_main.c:1822: error: ‘struct net_device’ has no member named ‘mc_count’
/tmp/LinuxDriver/sundance_main.c:1823: error: dereferencing pointer to incomplete type
/tmp/LinuxDriver/sundance_main.c:1824: error: dereferencing pointer to incomplete type
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_ethtool_ioctl’:
/tmp/LinuxDriver/sundance_main.c:1869: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_ioctl’:
/tmp/LinuxDriver/sundance_main.c:1953: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘netdev_close’:
/tmp/LinuxDriver/sundance_main.c:2001: error: ‘struct net_device’ has no member named ‘priv’
/tmp/LinuxDriver/sundance_main.c: In function ‘sundance_remove1’:
/tmp/LinuxDriver/sundance_main.c:2118: error: ‘struct net_device’ has no member named ‘priv’
make[4]: *** [/tmp/LinuxDriver/sundance_main.o] Error 1
make[3]: *** [_module_/tmp/LinuxDriver] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.39-2-486'
make: *** [all] Error 2

Anyway, after a quick glance at the Makefile it seems it (supposed to) generate sundance.o and to install it to /lib/modules/$(KernelVersion)/kernel/drivers/net/ as sundance.ko. Fortunately a quick ls -lh /lib/modules/$(uname -r)/kernel/drivers/net/ | grep sundance told me that I already have it. So I hope I can skip it, now that I know my Debian already have its sundance.ko.

About sundance.ko

Of course, the next step is to get to know this sundance.ko thing. I query that driver by running:

$ sudo modinfo /lib/modules/$(uname -r)/kernel/drivers/net/sundance.ko
filename:       /lib/modules/2.6.39-2-486/kernel/drivers/net/sundance.ko
license:        GPL
description:    Sundance Alta Ethernet driver
author:         Donald Becker 
alias:          pci:v000013F0d00000200sv*sd*bc*sc*i*
alias:          pci:v000013F0d00000201sv*sd*bc*sc*i*
alias:          pci:v00001186d00001002sv*sd*bc*sc*i*
alias:          pci:v00001186d00001002sv00001186sd00001040bc*sc*i*
alias:          pci:v00001186d00001002sv00001186sd00001012bc*sc*i*
alias:          pci:v00001186d00001002sv00001186sd00001003bc*sc*i*
alias:          pci:v00001186d00001002sv00001186sd00001002bc*sc*i*
depends:        mii
intree:         Y
vermagic:       2.6.39-2-486 mod_unload modversions 486
parm:           media:array of charp
parm:           debug:Sundance Alta debug level (0-5) (int)
parm:           rx_copybreak:Sundance Alta copy breakpoint for copy-only-tiny-frames (int)
parm:           flowctrl:Sundance Alta flow control [0|1] (int)

I found the author (Donald Becker) match with the information found at sundance_main.c. Another interesting information I found is the dependency of this module, it says it depends on another module named mii, so I ran a check on that one too:

$ sudo modinfo mii
filename:       /lib/modules/2.6.39-2-486/kernel/drivers/net/mii.ko
license:        GPL
description:    MII hardware support library
author:         Jeff Garzik 
intree:         Y
vermagic:       2.6.39-2-486 mod_unload modversions 486

This sundance depends on mii, where we also have mii.c and mii.h lying on the source directory too, so this DEFINITELY it.

I already have it! So now it should be working after I enable those two modules, okay then:

$ sudo modprobe mii; sudo modprobe sundance;

And then I want to see if anything happened:

$ dmesg | grep -i eth | tail
.. unrelated texts ..
[53251.562523] eth1: IC Plus Corporation IP100A FAST Ethernet Adapter at 00019800, 54:e6:fc:83:12:72, IRQ 19.
[53251.563050] eth1: MII PHY found at address 0, status 0x7849 advertising 01e1.
.. unrelated texts ..

It seems my card finally recognized by Linux! One final check just to make sure :

$ ip link show
1: lo:  mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:19:5b:5b:cb:22 brd ff:ff:ff:ff:ff:ff
3: eth1:  mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 54:e6:fc:83:12:72 brd ff:ff:ff:ff:ff:ff
4: wlan0:  mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:11:09:be:fe:0d brd ff:ff:ff:ff:ff:ff

Yep, it’s there.

Okay, Now What?

I put it into use, duh! I update my shorewall configurations and make dhcpd to serve on that interface too, etc.. all is well until I get to reboot.

I forgot that I have to automatically load those two modules at boot, so I add sundance.conf to /etc/modprobe.d:

# /etc/modprobe.d/sundance.conf
alias eth1 sundance
options sundance debug=3

Now everything works as it should be.

Leave a comment

Filed under Ilmu, Orang bego punya kegiatan

My QtCurve KDE

Just want to share my desktop look, because I’ve been using it for a while and still satisfied by it —you can at least try to fake a shock and awe now.

Now, a nice screenshot:
KDE4 QtCurve Screenshot

What it is

Most of the look customization provided by QtCurve with my own minor hacks to the code, but really I have to say mostly are unnoticeable from vanilla QtCurve compile.

In general, its a blue-ish with smooth gradient look on an Oxygen-like window decoration. It looks great on native KDE apps and not so great for GTK apps, most notably the thin scrollbar which I found somewhat troublesome when using LibreOffice Calc.

Small sheet tabs on LibreOffice Calc

Other than that I’m satisfied with it.


What, you want it too? Well, I just happen to zip all the files (with two additional themes, and a color scheme) and unconsciously upload it to a download-friendly file hosting.

My KDE + QtCurve

Leave a comment

Filed under Orang bego punya kegiatan

I Prefer to Start At ~/ Please

For people (me included) who gets annoyed to find they start at ~/Documents every time they use Konsole/Terminal/urxvt/whatever, Vim, Dolphin, etc. here’s what to do to make it start at ~/:

  1. Edit file ~/.config/user-dirs.dirs
  2. Add or edit an entry named XDG_DOCUMENTS_DIR having value of "$HOME/":

  3. Save it.

Restart any application as needed. You’re welcome.

Leave a comment

Filed under Ilmu

PulseAudio di Windows Sudah Tidak Gagap Lagi

Latar Belakang

Kadang kalau lagi mau main game terpaksa harus boot ke Windows XP. Lebih sering lagi kalau lagi main ingin sambil enjoy musik, sama seperti kalau lagi pakai Linux.

Sayangnya port server PulseAudio (PA) untuk Windows terlalu jadul, masih versi 0.9.6, dari tahun 2007-an dan agak keteteran mengikuti perkembangan development di Linux yang udah versi 0.9.20-an.


Katanya sih karena ada kesulitan waktu porting, maklum aja soalnya PA habitat aslinya di Linux-land sih. Feature-feature baru di test di Linux, dan kebanyakan developernya orang-orang Linux juga, jadi port untuk Windows jadi anak tiri. Ada sukur.. gak ada ya gak usah sewot, gitu maksudnya.

Gw udah pernah coba compile sendiri pake mingw32 tapi emang gak bisa.

Karena lagi mumet malas baca kode punya orang, gak penting-penting amat (masih bisa streaming lewat http), dan gak sakti-sakti amat ilmu Linux gw jadi gw (macam) postpone aja dulu, akhirnya “terpaksa” nyangkut pakai binary dari Cendio

Mau denger musik aja kok repot?

Lah iya, soalnya musik saya di komputer terpisah. Komputer yang nyimpen file-file musik jalanin program mpd, lalu nanti dia stream lagu ke komputer lainnya.

Karena komputer yang digunakan sebagai penyimpanan lagu ini sering di-update maka Music Player Daemon (MPD), program yang digunakan untuk menjalankan musik, sudah beberapa kali di-update versinya dan wajar kalau sudah pakai library PA yang lebih baru.

Server PA yang di Windows, yang masih menggunakan kode dari tahun 2007, suaranya sering putus-putus seperti orang gagap, beda dengan server PA yang di Linux.

Berdasarkan analisa ala-kadarnya, nampaknya setiap kali pakai server PA Windows penggunaan CPU MPD selalu naik sampai 100%. Anehnya, kalau coba set output ke ALSA atau streaming lewat http cpu utilization-nya gak sampai 10%, jadi masalahnya pasti di sekitar PA.

Kalau di server PA Linux tidak menunjukkan gejala seperti itu maka kesimpulan berikutnya adalah karena ada mekanisme yang berubah di PA, yang sayangnya tidak backward-compatible dengan kode dari tahun 2007.

Oh oke, jadi kenapa nge-blog?

Ini lho, nampaknya sudah ada yang mengerjakan Windows port yang baru, walaupun status masih UNSUPPORTED dan belum semua fasilitas sudah di port ke Windows.

Jadi lewat blog ini saya mau bilang terima kasih/”thank you” kepada Maarten Bosmans (mkbosmans), yang sudah menyediakan binary yang siap pakai.

Gimana cara pakainya?

  1. Ekstrak.
  2. Edit file etc/pulse/ dan masukkan parameter-parameter yang diperlukan, misal:
    load-module module-native-protocol-tcp auth-ip-acl=;
  3. Copy file module-module yang dibutuhkan (kalau saya: module-native-protocol-tcp.dll, module-null-sink.dll, dan module-waveout.dll) dari direktori lib/pulse/modules ke direktori bin.
  4. Buat shortcut ke bin/pulseaudio.exe -D

Kalau mau lebih jelas, silahkan baca The Perfect Setup.

Leave a comment

Filed under Orang bego punya kegiatan

Portal, Now THAT Is A Game

I found this thing about Portal 2, with all the hype around it. I haven’t heard this title before, okay maybe a couple of times, but because I’m not an avid gamer myself I decided not to look it up.

The game description didn’t lend any justice to it, at least for me:

Portal™ is a new single player game from Valve. Set in the mysterious Aperture Science Laboratories, Portal has been called one of the most innovative new games on the horizon and will offer gamers hours of unique gameplay.

I’ve seen a lot of “innovative” and “unique” being thrown around in game descriptions that doesn’t add up to that level (for me anyway), so being more conservative about it is my general stance on gaming.

The game screenshots, I’ve seen them —since years ago— they looks just like Half-Life. Although I’m not a person who put graphic first, but as I said earlier, I’m not a gamer I’ve got things to do so I pass it as “it’s just another damn game kids are playing nowadays”.

Then this Portal 2 show up. Got an e-mail, and it sparked my curiosity. I mean, how good is this “Portal” game that it warranted a sequel? Well, since I have a few time to kill, I decided to try it. Being a few years old also helps, so it rather cheap by now. And it’s not a multi-player game too, so I know I don’t have to curse my internet connection.

Oh BTW, my internet connection still suck, thank you.

And what is this cake about?

I gave it a go and it was great. I can’t rephrase it any better: it was great.

First off, it’s a short game. I found myself fighting the final boss after 4 hours (or so) playing it. But for those hours, I cherished because I’m “in the zone” for the entire time. I don’t have to dedicate hours on this game —like RPG games I have sitting there, waiting for me to come back, *sigh*— and yet I got entertained in the ways a game can.

Second, as many will testify, the gameplay IS unique. Being a so-so fan of FPS, when I get the portal gun I was thinking “great what kind of baddies I have to aim at?”. But no, this is not about killing for fun, it’s about solving puzzle. So instead me, killing everything that moves, it was me thinking how to get through the challenges.

Third, the thing who speak to you through the entire game —I won’t spoil the game for those who haven’t played it— is hilarious. You just have to play through the game to know this.

All this brings me to the question: should I get Portal 2? Well, to be honest with you, maybe not this year. Maybe a year or two after it’s release, after the price gets low enough for my range.

Leave a comment

Filed under Orang bego punya kegiatan, Pendapat gak penting

Redo After hgpullsvn Aborted By External Causes

This is yet another case where a power outage giving you trouble. Just in case you haven’t struck by any of it in the last ~ 3 months consider yourself lucky. I know I’m not.

I just noticed —via Mercurial’s web interface— that my fpc, lazarus, and fpcdoc repository is several days old. While I haven’t put any mechanism to update my local repositories automatically on every start-up, but I kept my self to update it everyday whenever I get to use my computer; I put it as one of “after I log in”-rituals.

I’m fully aware that the fpc and lazarus SVN repository are updated daily since both are being actively developed. So I expect that when I update them the last time, exactly yesterday, so it must have pulled some changes (a.k.a “commits”). But seeing that it was last modified “5 days ago” then I strongly suspect something went (quietly) wrong.

Define “wrong”

Something not right.

Okay smart-ass, I’m going to close this tab right here in 3 … 2 …

Anyway, my fpc and lazarus local repository should be no more than 24 hours late. Because I remember doing update yesterday, and the day before that, but I’m getting report that it was updated 5 days ago. I also recall that roughly five days ago we had a power outage (note: I also recall one more outage since that day) for more than an hour or so.

Uh oh..

Exactly. This may have to do with when it was interrupted; and consequently, on how Subversion and Mercurial deal with this sort of accident.

First, I want to confirm into this power outage theory. So I login to my server computer and do a hgpullsvn manually on my local fpc repository:

$ hgpullsvn

it gave me this:

Interrupted, please wait for cleanup!

External program failed (return code 255): hg '--encoding' 'utf-8' 'up' '-C' 'default'
abort: unknown revision 'default'!

Wait, what?

I have to say that after a bit while (10 seconds or so) I left my computer because I ran out of drink. So unless someone (or something) accidentally trip over the keyboard which is very unlikely because a) I don’t have any pet, and b) the computer is in my room; nobody mess with the computers in MY room. So I ran the same thing again, this time patiently waiting in front of the screen and with more output just to make sure:

$ hgpullsvn --verbose --debug

which gave me this:

* hg '--encoding' 'utf-8' 'root'
* hg '--encoding' 'utf-8' 'qapplied'
* svn 'info' '--xml' '.'
Retrieving remote SVN info...
* svn 'info' '--xml' ''
* hg '--encoding' 'utf-8' 'branch'
* hg '--encoding' 'utf-8' 'branches'
* hg '--encoding' 'utf-8' 'st' '-mard'
* hg '--encoding' 'utf-8' 'up' '-C' 'trunk'
* hg '--encoding' 'utf-8' 'branch' 'trunk'
* hg '--encoding' 'utf-8' 'parents' '--template' '{tags}'
Fetching SVN log for revisions 16959-16969...
* svn 'log' '--xml' '-v' '-r' '16959:16969' '--limit' '10' '.'
* svn '--version' '-q'
* svn 'up' '--ignore-externals' '--accept' 'postpone' '-r' '16959' '.'

Interrupted, please wait for cleanup!

* svn 'cleanup'
* hg '--encoding' 'utf-8' 'parents' '--template' '{tags}'
* svn 'up' '--ignore-externals' '-r' '16958' '.'
* hg '--encoding' 'utf-8' 'up' '-C' 'default'
External program failed (return code 255): hg '--encoding' 'utf-8' 'up' '-C' 'default'
abort: unknown revision 'default'!

So this thing stopped when downloading for commit #16959, well I just have to re-download it manually then.

Fixing It

Now I have to say there are two ways to deal with this, one is to re-download ONLY the offending commit and the other one is to download all commits since the last one until the latest. What I’m going to do here is to re-download only the offending commit, and then leave the rest for hgpullsvn.

Here’s how to download the last commit:

$ svn update -r 16958 --ignore-externals --accept postpone --force

The --force parameter is to ignore the existing, already downloaded files, and to re-download them all; or something like that. 😛

And… I need the commit-message and the name of the person doing the commit so I can put it as Mercurial commit-message and committer name:

$ svn log -r head

All relevant information duly noted.

After the Subversion part is done, I want it to register on Mercurial as well, so we take any changes and commit it as Mercurial commit. This command will add new files and delete removed files since last Mercurial commit:

$ hg addremove

Let’s commit using message and committer name from subversion.

$ hg ci -m "Do not use TProcess to run the compiler when it is not available" -u joost

Don’t forget to tag it with “svn.${SVN-REVISION-NUMBER}” because hgpullsvn needs it:

$ hg tag -r tip -l svn.16959

After manually brought the offending commit, I can continue using hgpullsvn, as usual, to pull the rest of the commits:

$ hgpullsvn --verbose --debug


It seems like hgpullsvn —and by proxy: Subversion and Mercurial— can not cope with sudden, non-waiting, undetectable abortion such as power outage. To be fair, there is so little any programmer can do either.

So, in the case of hgpullsvn the only thing you can do is to clean up the mess up and do what it do manually.

Leave a comment

Filed under Ilmu, Orang bego punya kegiatan

Wait, Iz Dat Arch Linux?

Got my first Arch Linux installed yesterday, a somewhat different experience for a guy used to Debian, but basically it’s all the same.

I’m bored, please entertain me with your Arch Linux endeavor

In general I spent most of the time preparing for the installation, while the installation itself took less than an hour.

Preparation before the install took 3 hours or so. The mirroring partitions off to a remote computer over 1Gb ethernet connection went about 90 minutes, coupled with partition table preparations (moving partitions, resizing, and formatting a dedicated /boot partition) took the other half of it.

Downloading the very basic stuffs compromising a modern Linux desktop is much tolerable when using a mirror nearby —that is, using local connection.

After that, all I have is a working system and ready to reboot, right? Well unfortunately, no.

So, that bastard gave you a hard time then?

In a way, yes. I swear this feels like the installer itself set up a challenge for me to solve before I can join with the *supposedly* elites being Arch Linux user.

The problem was GRUB throwing me this Error 15: File not found thing. Like any rookie, I hit the internet immediately. After browsing many support forums and mailing list, I developed a sense of what was wrong, and set to fix the damn problem.

First, I think it would be better to upgrade it to GRUB2 anyway. So I did just that by chrooting to my new system and made GRUB obsolete in one command:

pacman -S grub2-bios

after that I make sure it work this time by asking it to re-probe and rewrite the old bootloader:

grub-install --recheck /dev/sda

Of course the /dev/sda if for my SATA harddrive. If you are reading this to know how to fix your own problem, make sure to change that to whatever disk you are installing GRUB to.

But after that it’s all roses and ponies, right?

Sort of … well, kindda yes. Everything works, yes that’s a good thing. At that point I just have to install what I wants, and embracing how things work in the Arch Linux.

I mean the first thing that strikes me is this rc.conf file. I kindda like it, in Debian there are many files to edit, but in Arch Linux you just have to edit only one file for modules blacklisting, hostname, locale, daemon startups, network-configuration definition.

Of course being a KDE user myself, the next thing I do is to install KDE:

pacman -S kdebase-workspace

along with many interesting programs, including the non-vetted AUR builds.

So you are not a Debian guy anymore huh?

I am a Debian user, just not on my desktop computer. My server computer still running Debian, in fact I just did a stable-upgrade after Debian 6.0 came out. The stability side of Debian is still the best among Linux distributions in my book.

On the other side, for my day-to-day computer where I can tinker with it I chose to live on-the-edge and go with Arch Linux. 😀

1 Comment

Filed under Ilmu, Orang bego punya kegiatan, Pendapat gak penting