Category Archives: Pendapat gak penting

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 http://something.com/hg/

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

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

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

Sumber Musik Alternatif

Karena saya sedang muak dengan musik yang beredar di Indonesia saya sarankan orang-orang untuk mencari alternatif di ClassicCat. Banyak pilihannya, ada banyak bacaan sebagai referensi atau saran untuk “orang baru”, dan bisa diunduh gratis; setidaknya itu yang tertulis disitu.

Mungkin, kalau gelombang otak kita sama, maka anda akan menikmatinya. Saya sendiri terkejut dengan kenyataan bahwa saya bisa menikmati beberapa nomor dari jenis musik tersebut.

Entah memang karena dongkol atau sudah umurnya saya tidak tahu. 😀

Leave a comment

Filed under Pendapat gak penting

Pascal, Python, C

A quick question: How many days you can go writing code alternately in three different programming language without accidentally mixing them?

My answer is 3 days. I caught writing def, return on Pascal file, := on C and Python files, and … for .. in in C. So it is true, sometimes you can type faster than your brain remembering minor detail called syntax.

Leave a comment

Filed under Orang bego punya kegiatan, Pendapat gak penting

That face and angle

Why people can’t take pictures of themselves without making that face? Almost every profile picture I’ve seen featuring the person in *that face*, am I missing something here? It irritates me. What is that? Really..

And that angle, the one I’d like to call as ‘puberty-teen’-angle. Are you people having conditions that making it hard to take picture straight? Is this the cool stuff nowadays? Or maybe just a trick to hide the fact that you’re a fat loser, such an attempt on camera trick perhaps?

Leave a comment

Filed under Pendapat gak penting

Facebook sekarat? Yay!!

tee..hee..hee..Setelah sekian banyak website social networking yang “menjangkiti” Indonesia, dimana yang terbaru adalah Facebook (FB). Dengan banyaknya orang sekeliling gw yang mulai “main” FB gw bisa konfirmasikan bahwa Facebook punya basis pengguna yang cukup lumayan di Indonesia.

Kesan yang gw dapatkan dalam dua tahun terakhir adalah Facebook “lebih trendy” dan “gaul” daripada website-website sebelumnya seperti Multiply, Friendster, dan sebagainya. Kalau orang yang pintar bisa lebih kritis karena “trendy” dan “gaul” (yang disini berupa kata sifat) sangat subjektif dan tidak menjelaskan banyak hal; selain populer. Kesimpulan sementara yang bisa gw ambil: dasar latah.

Anyway, kemarin gw baca berita bahwa FB memiliki kesulitan finansial karena cost yang di-anggarkan untuk tiap user –dengan jumlah user sekarang ini yang sangat banyak– menyebabkan masalah serius dalam bisnis mereka. Nampaknya antara pemasukan dan pengeluaran mereka sudah njomplang sebelah gitu.

Untuk sementara gw sedang tertawa dalam hati seperti kucing dalam post ini. Pendapat pribadi gw? Biarin aja mati, gw mau lihat orang-orang yang keranjingan FB merana selama beberapa minggu. Emangnya tiap hari gak bisa hidup kalau tidak sentuh FB?

Kalo gw sendiri sih gak punya soalnya ogah!

3 Comments

Filed under Pendapat gak penting

Lo, Intrepid Ibex is coming

It would be a couple of minutes now, to finish my download of Kubuntu Intrepid Ibex. Yeah really, I embraced the idea to download Ubuntu, something was unthinkable on my previous dial up connection. Nice to see someone spend their monthly quota on something other than stupid Youtube video streams, right?

I’m using Kubuntu Gutsy Gibbon and the idea got into me after I drool over a few KDE 4 screenshots. The decision was not without doubt, however, I put quite a few days before hitting that download link yesterday. I know there are several issues on KDE 4, both on usability front and stability wise with the later more weighs more important to me.

Well, its done now. I shall march forward to the sweat, blood, and tears after a fresh install!! (and prospective self-loathing why I did this in the first place). This might my last time posting this using my trusted Kubuntu 7.10.

Leave a comment

Filed under Pendapat gak penting

“Default namespace”

So if I have to getting pissed on something this week that would be default namespace “feature” of XML. Why? Because sometimes XML documents uses them but not declaring it properly, or they use it but gives no URI and they rely on targetNamespace.

Note that the least ethical way to declare a default namespace is to write xmlns=”{YOUR_URI_HERE}”, you can’t just replace it with targetNamespace attribute. It serves different purpose, and doing that intentionally is not even funny!

It just doesn’t make sense, if the point is to minimize size why not using some sort of compression? Well I know libxml2 can compress XML document ‘on the way out’ (eg. saving it to file, for another I/O, etc.). Besides, it is not that difficult to use compression like (let’s say..) Zlib, since there’s a lot of port/binding to it for God-knows-what programming language you use. Sure it turns your XML to binary, but you can just un-compress it on the other end; just because its XML it doesn’t say that it has to be ‘text’ all the time.

Just because you can churn out that crap and “it works” on your development environment or where you are working, doesn’t mean that everybody else can use it right away. I mean, that’s the reason why we have standards right?

If it was for me to decide, I’ll force everyone to follow the proper way to declare any namespaces, and the hell with saving some bytes. The only case of default namespace is (X)HTML, I make it an exception because it seems back in the days where HTML were new they have slow network connection.

Now that we have broadband internet (or at least 56Kbps over the phone line), and nobody uses 9600 baud modems over the internet anymore, so stop doing that!! The amount of extra bytes is moot compared to yet another complexity that doesn’t exists in the first place if everybody use the proper way to do it.

I’m sorry for all that, I was pissed because I have to come out with some XPath statements (well basically a program) to parse WSDL files and how it was created is clearly not something that I can control. More lines, more code.. yeah, this stupid thing sucks.

Bye

Leave a comment

Filed under Pendapat gak penting, Uncategorized

Komputer lama jadi server

WinXP Pro SP2 server desktop from VNCOke jadi gw punya komputer tua dengan spesifikasi: Pentium 4 1,7GHz, 256 SDRAM, NVidia GForce4MX, 80 GB HDD, 1 CD-RW, on-board soundcard, dan 4 port USB v1.0. Komputer ini gw setup sebagai komputer server pribadi, untuk melayani beberapa komputer dan sebuah notebook yang sama-sama lebih baru daripada komputer ini.

Di komputer lama ini gw install dua OS (system), yaitu Mandriva Linux 2006 Free Edition (Mandriva) dan Microsoft Windows XP Pro SP2 (WinXP Pro SP2). Sebenarnya pada awalnya hanya ada WinXP Pro SP2, karena gw pernah bekerja menggunakan komputer ini dan pekerjaan gw semua serba Windows. Mandriva baru di-install kira-kira satu tahun sebelum gw memutuskan untuk membeli komputer baru.

Sekedar informasi, sebenarnya WinXP Pro SP2 agak jarang dijalankan karena hampir semuanya sudah bisa dilakukan di Mandriva. WinXP Pro SP2 (masih) ada karena ada beberapa program yang hanya jalan di system Windows (oke, sebenarnya karena gw malas coba-coba dengan Wine :D), seperti FMA untuk ponsel, untuk membaca kamera digital, dsb.
Continue reading

6 Comments

Filed under Orang bego punya kegiatan, Pendapat gak penting