Tag Archives: rant

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

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

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

Upgrade to Ubuntu 9.10

Kubuntu 9.10 ScreenshotAs if continuing to my own tradition, that is to upgrade to every x.10 release, I just manage to upgrade my Linux install to Kubuntu 9.10. Yay, another 600-`somthing` megabytes wasted. I would like to report my experience so far, and if you don’t like about it you are more than welcome to navigate away from this page, on my seemingly dead blog.

First, the download, as usual, filled with guilt and curses. Mainly moaning about my slow internet connection and various hate-themed blog drafts on the subject never made it here just because the connection was too crappy while downloading.

Next, the live CD session was a good thing. I’ve seen worse from the Kubuntu dev team *cough*8.10*cough* so I didn’t budge at the very least. Kubuntu 9.10 featuring a sane interface, IMO, and everything seems shiny. The QtCurve is a big factor in this release because in the very first minute with Karmic Koala I switched from Oxygen to QtCurve because I’m too lazy to waste my time by getting senile over inconsistency between Qt and GTK apps. Karmic Koala with QtCurve made my day, or night, whatever.

Next, as upgrading on every-other Kubuntu release made me learn, is `that GRUB menu` issue. Because I want to allocate more space for linux partition, (don’t worry here I did backup my stuff, I think..) and I want to use the sexxxxy ext4, so reformat it is. The usual drill for Windows partition: backup, scan, defrag, have been done before I made the final plunge. *aargh!*

I was half surprised, although it is obvious because I just formatted my partition so I’m going to see new files but my gotcha moment came from the missing /boot/grub/menu.lst file. Instead, I was greeted by a shell-script-like grub.cfg file with fancy *.mod files scattered all around. Okay now, I have to confess that I didn’t follow GRUB development progress like EVERY Kubuntu user, so I did (a little, a little bit.. coz you know, I have to maintain my image as a resourceful IT dude *hehehehe..*) freaked out for 5 seconds or so. The vulnerability feeling sucks, even for a minute. I have to get online, Google for a while, before learning the NEW and IMPROVED(tm) way to do the same old stuff. Bastards.

After the mandatory apt-get update, pulling in a few important apps, setting up ssh, compiling FPC + Lazarus, mucking around with python installation, and sudo nvidia-settings, and a futile attempt browsing the games package (in short: getting used to the new environment) I realized my audio didn’t work. Somewhere along the line between my first login to a few sudo apt-get install killed the sound. I recalled there was audio on login but somehow sox cant play my ogg files now.

The solution to my audio problem was to create the .asoundrc, .pulse/default.pa, and .pulse/daemon.conf file, add myself to pulse group, and crank the volume using alsa-mixer, a minute of BIG DEAL. So I’m a little bit experienced with PulseAudio, so what? Pull in gmpc (and its dependency) from the repository and in no time I can listen to music streaming from my server computer.

Now I’m sitting here, headphone in my ears, sipping coffee while one hand typing this post.

Leave a comment

Filed under Orang bego punya kegiatan

Stupid Debian Kernel

I freaked out when my server computer didn’t boot to my new Debian install. I guess something about this generic kernel just ain’t right; I mean at least on this computer, because somehow it ran just fine on VirtualBox.

For a quick hack I tried booting from some live cd (I think it was a Slax) so at least I can mount it and get an older kernel from my other computer, extract the old 2.6.22-generic kernel from backup archive (that was coming from an Ubuntu 7.04 partition, because that’s my only kernel backup) and get that damned grub to play nicely by setting it to default. Why? Because I’m using an old CRT monitor, so old that I can’t see anything before 3 to 5 minutes after the first time i press power-on button or reset; I know.. I know it’s time to get a new one;).

Now at least I can get online from LAN-sharing because I can’t get Huawei E220 to work yet. Something that was as trivial as ‘wvdial MyNetProfile &’ have to wait because I know that I have to get/compile a better kernel. So, yeah busy. But the bright side of this whole situation is nothing of value deleted from this install …….. yet (O’ UNIX gods, please guide my fingers).


Leave a comment

Filed under Orang bego punya kegiatan

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!


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.


Leave a comment

Filed under Pendapat gak penting, Uncategorized

Gimana mo baca coba?

Kemaren gw dikirim e-mail dari seorang temen, yang ingin menanyakan tentang ERD. Temen gw ini adek kelas, jadi masih satu ‘perguruan’ juga gitu jadi yaa karena gw kan orang baik (*wahahahaha…*) ya gw bantu lah.

Singkat cerita dia kirim diagram ER ke gw, dan berharap minta pendapat gw. Jadi yang dia kirim begini:

ERD penyek

Begitu buka attachment dari e-mail gw bingung, ini bacanya susah amat ya? Minta kirim lagi diagram yang bener, eh yang dapet ya yang begini lagi. Gw minta lagi yang bener diagramnya sampe sekarang belum dibales.

Cape deh…

Leave a comment

Filed under Pendapat gak penting

E-mail berbahaya

Hari ini download e-mail yang menurut tanggalnya dikirim 2 hari yang lalu, isinya gini (hasil copy & paste):

aduH t0lOngiN dOng gWe, gImana nIh kOk tIAp kaLi gW mo jAlan1n dElpHi adA keLuar bAnyAk eRror gItu. tUlIsaNya “cannot find library” gItu dHe… gW dapEt peSEn beGiNi sEtElaH gw InsTall coMp. VirTuAllisTvIew daRi sofTgMes.com. aPa di kOmpoTerNya b0sS kEluRr JuGa erR0r k4ya gItu> cape nIh, maNa lIstRik bYar peT muLu LagI… uDaH dwa mInGgU kOmPuteR g k4lO Mo jAlaNin deLPhi kEluaR GiNian.

gImaNa d0ng bOss?

Tebakan gw nih orang pasti umurnya kalo gak 11 tahun, ya 15 tahun.. atau antara 11 – 17 tahun. Sampe sekarang gw blon bales e-mailnya, baca semuanya aja belom, baru 1 kalimat aja mata udah sakit. Dasar semprul…
NB: Kalo ngetik apa gak bisa pake kapitalisasi yang bener? Kalo gw mo baca tulisan yang kaya ginian, gw bakalan pergi ke Friendster.

Leave a comment

Filed under Orang bego punya kegiatan