Posts about random stuff

Holy Cow!

March 4th, 2010

A little followup, and my final comment on the singularity.

I studied Kurzweil’s analysis and finally realized – by gods, the man is right! If you plot major milestones, you can clearly see a trend! Unfortunately, Kurzweil’s plot is a little outdated and some details are wrong, so I updated it.

Here is his version:

Here is the fixed version:

I can see it now! The Sincowlarity is near! Transbovines are already emerging!

Kurzweil, you are a genius!

The Singularity is Near! (und alle so: yeah…)

March 4th, 2010

Science fiction is dead to me. I can not stand the weak ethics, ridiculous predictions, massive biases and total disconnect with science since at least 50 years any more. At first, that depressed me a little. Losing a whole genre is always tragic, but I have survived the death of horror; I will make it without science fiction, too. But actually, I found something to replace it with: Futurology! In fact, retro-futurology. Find some futurologist, at least some years old, and compare their vision of the future with now – it will be hilariously wrong! No exceptions.

Kurzweil is amazing in that he is wrong even after only half a decade! Clarke at least is sometimes correct when predicting stuff half a century away, but Kurzweil couldn’t even design a five-year-plan for a socialist utopia. He even gets his own data wrong in determining the date for the singularity. That’s mind-boggling. It’s really takes a special kind of intelligence to be so stupid.

Based on JBR’s scoring system, I’ll award between 0 to 1 point per prediction, depending on how good it was. Of course, I only rate predictions that can already be judged (and exclude those that are so vacuus that they don’t say anything at all, like “The rate of paradigm shift (technical innovation) is accelerating, right now doubling every decade.”). “Partially borrowed” from Wikipedia.

  1. “We will have the requisite hardware to emulate human intelligence with supercomputers by the end of this decade.” Not even a single component of the brain can be emulated. 0 points.
  2. Automatic Speech-Recognition Software with good accuracy in 2000. Muahaha. This one is a postdiction and yet, “good”? Yeah, right. Well, it isn’t entirely awful, but “good”?! 0.5 points.
  3. Computers will start to disappear as distinct physical objects, meaning many will have nontraditional shapes or will be embedded in clothing and everyday objects. No. I still don’t have a fridge that orders new milk and I’ve been promised one since I was born! 0 points.
  4. Full-immersion audio-visual virtual reality will exist. No. In fact, entertainment systems are rapidly moving away from “immersion” (thank gods!). As far as I know, there isn’t any full-immersion for training purposes either. 0 points.
  5. Glasses that beam images onto the users’ retinas to produce virtual reality will be developed. Alright, “developed” is correct, but in actual use? Personally, I expect VR to be integrated into phones instead. 0.5 points.
  6. Real-time language translation in which words spoken in a foreign language would be translated into text that would appear as subtitles to a user wearing the glasses. Muahahaha! The smartest company on the planet, Google, can’t even correctly generate subtitles in the same language. 0 points.
  7. Cell phones will be built into clothing and will be able to project sounds directly into the ears of their users. Yeah, right. 0 points.
  8. Exoskeletal, robotic leg prostheses allow the paraplegic to walk. Ok, prototypes exist and work well. The reason they are still rare isn’t so much the robot, but rather the energy source. 1 point.
  9. Telephone calls are routinely screened by intelligent answering machines that ask questions to determine the call’s nature and priority. If only! 0 points.
  10. “Cybernetic chauffeurs” can drive cars for humans. Even humans can’t drive well, but robots are going to do it before they have mastered vision?! That’s… optimistic. 0 points.
  11. The classroom is dominated by computers. No, just no. Laptops might have replaced paper notebooks by now, but it’s very rare for a teacher to be even aware of useful software, like SRS. 0 points. Personal prediction: this won’t be true, ever. School will go extinct before teachers apply science to their job.
  12. A small number of highly skilled people dominates the entire production sector. Yes and no. Specialization is going strong, but companies are larger than ever. 0.5 points.
  13. Tailoring of products for individuals is common. To a degree and for a price, yes. 0.75 points.
  14. Drugs are designed and tested in simulations that mimic the human body. Nope. 0 points.
  15. Blind people navigate and read text using machines that can visually recognize features of their environment. Nope. Unless you count “dogs” as machines. Because, face it, that’s how good you have to be to compete on this market. 0 points.
  16. PCs are capable of answering queries by accessing information wirelessly via the Internet. 1 point.
  17. By 2020, there will be a new world government. While there is still some time, just think of all the paperwork! The UN is breaking apart, the EU is becoming irrelevant and there aren’t any two superpowers speaking with each other. I think we can judge this one. 0 points.

Alright, that’s about it. 3.75 out of 17. I especially like that he is still convinced that translation software is just around the corner.

Yes, futurology will fill the void left by science fiction nicely. *chuckles*

“I love Perl!” =~ s/love/hate/

February 17th, 2010

Perl, we’re finished. I want nothing to do with you, ever again.

I’d like to say “It’s not you; it’s me.”, but this wouldn’t be true. It is you. You just suck beyond reason, suck more than I could have ever imagined.

You know, Perl. It’s the year 2010. Unicode is almost 20 years old. Do you speak it? Of course not. So why do you pretend you do?

You lie to me. “man perlretut” tells me:

\w matches a word character (alphanumeric or _), not just [0-9a-zA-Z_] but also digits and characters from non-roman scripts

But you don’t. “\w+” doesn’t match any Japanese string whatsoever. Not even “Freischütz”. Like, really.

I tell you, explicitely, to use Unicode. You don’t. You match what the fuck you want to match. You really don’t care at all.

Nor can you handle Unicode in a string anyway. You don’t understand how long it is. Or how to print it correctly. Or how to split it. Nothing.

Perl, it’s over. I’m leaving. And I’m not coming back.

Letting Go of Music

February 13th, 2010

It feels very unusual and strange, after thinking critically about the arguments, assessing the evidence and forming a rational conclusion, to arrive at a position that nowadays only two groups share: Christian puritans and the Taliban. It makes me very uncomfortable, but I fail to see any flaw in the reasoning or compelling counter-argument.

What conclusion am I talking about? “Music is a parasite.”, or in practical terms, “Music is bad for you and exploits you.”. This is a very radical statement, so initial skepticism is very much understandable. If it comforts you, let me get one thing out of the way: I do not object to music out of “spiritual” or “religious” reasons, which, unfortunately, seems to be the most common case. Most likely, music does not “corrupt your character” or “lead you away from God” or any such nonsense. It is also not really an argument for asceticism. No, my main argument comes from memetic theory and a cost/benefit analysis. It is, in principle, a very similar argument broad forward by atheists against religion. The Four Horsemen of Atheism (Richard Dawkins, Daniel Dennett, Sam Harris and Christopher Hitchens, all truly awesome) have argued very much alike, but against religion. I will try to show that their reasoning extends to more fields, one of which is music. This is not meant to falsify or parody their position (I in fact agree with it), but to explore and demonstrate the real ramifications.

Before I get going, let’s clarify 3 things. Firstly, I will build on memetic theory, so you will probably need to know what it’s about to understand some of my reasoning. You may want to read “The Meme Machine” by Susan Blackmore or some of Daniel Dennett’s recent books, like “Darwin’s Dangerous Idea”, or at least google it. The arguments aren’t really very technical, but if you aren’t familiar with basic evolution or what a meme is, then my points may seem alien to you. To understand the perspective of replicators, it will also help greatly to read “The Selfish Gene” by Richard Dawkins.

Secondly, let’s establish a few terms. I will refer to “not having music” as amusicality, analog to “not believing in god(s)” being atheism. This is totally different from being tone-deaf, disliking music or the like. To be honest, I was a great fan of music, so this is also not a “disgruntled outsider” kind of argument. Furthermore, I take it as a given that music is a highly advanced memeplex (i.e. group of memes that support each other), in the same way as religion or language, and as such is a replicator and subject to evolution, but independent of genes.

And lastly, why I will bring no argument for amusicality. It might seem odd that I only attack arguments for music, but have no strong argument of my own why “not having music” is too be favored. This follows the same logic of atheism: the one’s making the claim are the one’s in need of evidence and arguments. The Null Hypothesis (i.e. “there is no correlation between A and B” or “A doesn’t exist” or similar) is the default position of science. We start off with an empty set of assumptions and every one we want to add has to be substantiated. To successfully defend the skeptic position, I only have to dismantle all the evidence proponents show, not actively prove the impossibility of the claim. Atheists are used to it in terms of religion: You only show there is no reason to believe in god(s), you don’t need to show there is any evidence against god(s). This is logically evident, as disproving such claims is often impossible or simply impractical.
However, my position isn’t exactly that bleak. I actually can make one simple argument for “not having music”: it eats up your time. Replace any time you spend listening to music with something actually beneficial and you are in a better position. But even if music were “free” (as in, would use up no resources), my position would still be the rational one.

So let’s go and see all the arguments in favor of music. To be clear, it is rare for anyone to defend all of them. But they are, as far as I know, all proposed seriously and the list is complete. Here we go:

The Argument from History.

Humans have been playing music for, at least, thousands of years and probably millions of years. It is completely natural for us to do so. Evolution has shaped our brain to encourage this.

This is true, but a fallacy: what “is” can never inform us what “ought” to be. Evolution has also made men good at killing and raping, for example. (And also enabled us to use language and science, of course.) What has happened in the past can inform us, but can not be our sole guide. You must provide actual, current benefits.

In fact, I suspect there is a strong correlation with “being spiritual” and “liking music”. The link is probably the ease with which memes can enter your brain – your memetic immune system, if you want. This holds true for me (I was a gnostic theist for a long time, having personally talked to several gods and all. It was a hard struggle towards logic and reason for me.) and many people I know. But in the end, it is just a suspicion, and I wouldn’t commit to it.

The Argument from Social Integrity.

Human society is, among other things, united by music. People engage in collective music, like festivals, camp fires or choirs. They define their own identity through it (“Are you a metalhead, too?”). It is one reason why human society is so stable and productive. Do you want to advocate chaos and anarchy?

This is probably the strongest argument in favor of music. It is true that music is a very important social “glue” and it might very well be true that society as we know it would not function without it. But the same thing can be said of religion. There is not a single historical case of a society that got from family-sized tribes to city-states without major help from religion. That, however, doesn’t make any religion particularly true. And even if this were true in the past, it doesn’t have to be true for the future.

I’ll have to admit that I can not completely disprove this argument. I would not advice on any changes to society, like outlawing music, but I can point some things out.
First, there are societies without music. The most famous one are the Taliban, who are thriving and have a stable history. They certainly are a competitive and strong society. Also, the deaf community is active and very tight-knit. The claim is probably overstated, but might have some justification.
Second, I do understand the danger of trying to experiment on this. What if the argument is right and we accidentally do harm civilization? Is it really worth the risk?

Those are powerful ideas, but in the end, I accept the risk for my life. I only advocate self-experimentation and personal growth, not necessarily a revolution. Even if society can only tolerate “some” abstinence, it would be an improvement. Any freed mind would increase our collective mental capacity.

The Argument from Pleasure.

Humans take great joy from music. It invokes many emotions, from happiness to anger to sadness. It gives their life meaning, but also just passes boredom.

This one is easy to argue against, but hard to understand. You do not enjoy music because of benefits, but because music is shaped (and has shaped you) to be enjoyable. It (ab)uses your reward system, your fear response, anger response and so on, to pass itself on. It is self-perpetuating, making you feel good so you listen to it so you feel good so you listen to it… Memetic evolution predicts this: brains that are “bored” without music will propagate it more, so any successful music will incorporate selection for this property. This is obvious to any outsider, as it is with any drug, but not for the afflicted. Observe anyone under the effect of a drug, during a panic attack and so on, while you yourself are neutral, unaffected. They will be blind to it; their brain pays no attention to this fact.

Arguing that pleasure in itself is a good thing, is tautological at best and addictive behaviour at worst. If you propose this, then you should also strive for direct stimulation of your reward center. Electrodes can be inserted, a little switch can be attached and you can sit there all day, feeling great! This is what this argument is really saying.

The Argument from Morals.

Music can influence our moral behaviour. Playing wholesome and delightful music to children will shape their character for the better!

This is a bold statement, especially because it has no evidence whatsoever. There is no psychological study supporting this, no disproportionately large chunk of deaf people in jail, no connection between crime rate and music education. If there is any link, it is minuscule.

There is, however, a strong connection between indoctrination and music. Almost every cult, religion or otherwise strong ideology will use music for its purposes. Music’s strong  potential to move people’s emotion can easily be exploited to instill fake unity, bliss or aggression. I would not go so far to disqualify music for this reason, but reject any moral claims as at least neutral. If it has positive effects, it might as well have negative ones. You can not advocate only the one part you profit from.

This argument is sometimes used negatively, e.g. “Modern music corrupts our children!”. If you believe it, you must accept this conclusion as well. Music censorship, at least partially, would be the only responsible thing to do.

The Argument from Profits.

Billions of dollars are involved. Music is a very profitable industry.

So is heroin. I don’t feel I have to say more about this; it is such an empty argument.

The Argument from Benign Symbiosis.

Music is useful to us. It enhances our ability to recognize patterns. It supports the learning of languages. It improves our ability to adopt other memes. It has been documented that children that learnt an instrument perform better in school. Music can help to treat mental illnesses.

There exists barely any valid research for any of those claims. The strongest is probably the learning of languages. Basically, this uses musics strong reproductive capabilities by hijacking it. You take language memes, like a poem, or just some words, and apply them as text to some music, thereby making them “stick” a lot better. This seems to work, as far as we can tell. There is, of course, no conclusive evidence. (This is mostly because of the failure of language education and linguistics, and unrelated to music, in my opnion.)

But is this worth its price? Are you able to contain it? Recall that you are using music exactly because it is so fertile. It seems like the opposite of a safe operation to me. Also, is it really effective? Instead of using music to get small benefits in school or elsewhere, read books. Learn critical thinking. Solve puzzles. Address the problem directly, instead of trying to do it through some remote synergy with a symbiant.

However, it can be argued that music was a major driving force behind the development of our big brains. We needed more and more capable meme machines to spread music more reliably, so we were selected for it. We profit from this because the human brain is largely a universal machine, not specialized for any particular meme and so all kinds of useful memes spread better as well. Everyone wants a better memetic “soil”, if you want. But if this is true (I suspect it is), then there is a fiendish little twist to it: We can exploit the parasite now! Sure, music used us for its own purposes, endowing us with bigger brains to get a better chance itself, but now that we have those brains, we don’t need to have any affiliation to music anymore! What do we care if music survives? Let’s use those brains for something good! So long, and thanks for all the neurons!

The medical use of music might be justified. Psychotherapy is in a terrible state right now, but the existing studies seem to support effectiveness of music in some cases. While I personally would prefer other methods, I would nonetheless agree that a reasonable case can be made for music in the hands of a professional. And this is the crux: we are talking about serious illnesses and therapy, certainly not recreational use.

Finally, I feel that this argument is very dishonest. It is really a rationalisation. No one sits down, thinks “Hey, singing those songs would get me better test scores in 10 years!” and then does so. You listen to music because you like it. Later on come the “reasons” and “beliefs” on why it really is good for you. If I showed studies disproving all such claim, would it change the argument? Most likely not. You would still listen to music, those scientists be damned. They are probably frauds anyway!

Conclusion

In the end, you will have to admit one thing: your attitude towards music, and your rationalizing of it, are indistinguishable from memetic addiction. You are being exploited by it. Music has shaped your brain for its reproductive advantages. Sure, you may have won some sexual selection yourself, but this is of little concern to music. The memeplex has all characteristics of a virus. It eats up as much of individual resources as it can without disabling its host. You are constantly encouraged to listen to more music, get more music, recommend it to your friends and so on. It spreads for the sake of spreading. Good music is judged not by its inherent benefits to individuals or the species, but by how popular it is, that is, how good it is at spreading. Being an ear worm is a good thing for music to be. If someone states he doesn’t listen much to music, then the most common response is one of disbelief, utterances of “How empty and meaningless my life would be without music!”, of “What is wrong with you? Are you depressed?”, followed by hundreds of recommendations because “There has to be some music out there that you like! Just listen more to it!”.

It is the behaviour of addicts. If you are not devoted to music, at least a bit, you must try harder! These are memes that ruthlessly exploit their hosts. Natural selection has shaped them to be highly resistant, persuasive and addictive. All of music theory and education is only occupied with how to make more popular music, how to spread it better, how it increase its impact. It conveys no message (or only an empty shell of one), it teaches nothing, it gives you nothing except pleasure. It circumvents the purpose of a reward system by directly stimulating it without giving something in return. It is a parasite.

But what now?

I thought, “Okay, calm down. Let’s just try on the not-believing-in-God glasses for a moment, just for a second. Just put on the no-God glasses and take a quick look around and then immediately throw them off”. So I put them on and I looked around.

I’m embarrassed to report that I initially felt dizzy. I actually had the thought, “Well, how does the Earth stay up in the sky? You mean we’re just hurtling through space? That’s so vulnerable!” I wanted to run out and catch the Earth as it fell out of space into my hands…

I wandered around in a daze thinking, “No one is minding the store!” And I wondered how traffic worked, like how we weren’t just in chaos all the time. And slowly, I began to see the world completely differently. I had to rethink what I thought about everything. It’s like I had to go change the wallpaper of my mind.

-Julia Sweeney, “Letting Go of God (which my title is, of course, an allusion to)

That’s a bit how I feel right now. Really, can my reasoning be right? It must be wrong! Dvořák’s 9th symphony, a parasite? ゆらゆら帝国’s “Sweet Spot”, detrimental? Demons & Wizards, really a satanic band? Impossible! And even if, can I ever be able to let go of them? Can I not listen to music? Will I not die of boredom, depression, isolation? Will it not cheapen my life to be amusical? Will nostalgia not overpower me?

But it begins to settle in. I remember the same thing, happening to religion. Not praying, not talking with the gods, not feeling this sense of mystical bliss, this was really hard for me. But it is the only honest thing to do. The only true understanding you can have. And after a while, the old way seems silly. You begin to truly understand the world a bit better, not making excuses, running down dead ends, but learning an actual powerful lesson.

No one said it would be easy. Letting go of those false attachments is hard, but it is worth it. I expect to get more comfortable with it over time. It will probably take weeks until I like my decision, and plenty of thought and meditation. The full implications of being a meme machine begin to settle in. My thoughts are not my possessions, I am just one of them. They are not “my” thoughts, not “my” believes, not “my” desires. I do not create them, or control them. There truly is no self. My brain is just a kind of computer, running all kinds of programs. And some of those – are viruses.

New habits will grow to fill the void, better habits. New memes will come. The world goes on.

Quote(s) of the Month

February 11th, 2010

But in order to [see itself], evidently [the world] must first cut itself up into at least one state which sees, and at least one other state which is seen. In this severed and mutilated condition, whatever it sees is only partially itself. We may take it that the world undoubtedly is itself (i.e. is indistinct from itself), but, in any attempt to see itself as an object, it must, equally undoubtedly, act so as to make itself distinct from, and therefore false to, itself. In this condition it will always partially elude itself.

To any person prepared to enter with respect into the realm of his great and universal ignorance, the secrets of being will eventually unfold, and they will do so in a measure according to his freedom from natural and indoctrinated shame in his respect of their revelation.

existence*
* ex = out, stare = stand. Thus to exist may be considered as to stand outside, to be exiled.

George Spencer Brown, in Laws of Form

I could quote the man all month. *gush*

Polyglot Writing

December 30th, 2009

Prof. Argüelles critizes the term “polyglot” for its sound and often misleading implications. While I personally like the pronunciation (but I have been a fan of harsh, guttural languages ever since, with a special fondness for /k/), I never really got the rest of his criticism until today. I mean, polyglottery is really only about learning 4+ languages. You only do what everyone else does to learn your second language, then do the same thing a few more times. At best, you use a few techniques to organize the whole effort, but fundamentally, it’s just more of the same.

But when I looked at my notebook (the paper one, that is), I realized what he really meant. The languages start to merge and the families and cultures start to develop new patterns. It’s the difference between a single switch and millions of them that make up a computer. You begin to understand people not in one particular mindset that your first language (and its culture) imposed on you, but soon develop alternatives (the second or third language) and then begin to see general patterns. You go from the perspective of the Romans, who realized that Greek had something to do with Latin, but they couldn’t quite figure out what exactly, to a more general view that understands the development of the Indo-European language as a whole, to maybe a global perspective.

Anyway, enough “make me one with everything”, I actually just realized I used German (using both the modern and old German Kurrent writing), English, Japanese, Ouwi and some ad-hoc pictograms on the same page in a coherent manner. You know you are a polyglot once you run out of space for all the languages to use.

Meditation on Xmonad

December 15th, 2009

Ignorance is the root of all suffering – ignorance about reality, about what is. By holding wrong assumptions, we create false expectations and false needs. [0]

I will not reflect on large parts of reality, but only a small one: window managers (WM). [1]

The most basic ignorance about WMs is the ignorance about their existence. The computer does not just show data to us, but it can show it to us in any way we want. It is this basic understanding that leads to the first conclusion: If the way data is shown to us is lacking, it is not our fault, but the computer is not doing it’s job properly. Furthermore, if we have to spend a lot of time just telling the computer how we would like to see something, we are actually doing someone (or rather, something) else’s work.

Therefore, tiling WMs. If you arrange your own windows, why are you using a WM at all? Wouldn’t it be more honest, instead of saying “I’m running Windows / KDE / OS X to show my windows”, to admit “Windows / KDE / OS X is running me to show it’s windows.”? Sure, the computer can not read your mind and some occassional hints might be necessary, but the less work you do, the better.

Desire creates suffering. This is maybe the most misunderstood of Buddhist truthes. People hear “desire creates suffering” and think “What? Is this going to be a moral how material possesions are bad for me? Money, cars, houses and so on lead to greed, obsession, and so on. I get it.”. This is not what this is about. The problem with desire is not the desire itself. It is not a problem that we want to be happy, to be rich and so on. The problem is, instead, that what we want is impossible. Our desires fail us. We are mistaken about the nature of reality and expect the wrong things. We think that money could make us happier, so we want more of it, but it ultimately won’t. From wrong assumptions you can only get bad results.

In retrospect, I can see this clearly now on my journey to a better window manager. It was my unwillingness to let go of old habits, my wrong ideas about what I really need or want, that made adopting a new WM hard. So I went first to WMs that offered great configuralibity and many features. “You can do anything you want!” But this lead to useless features and distractions. It is only now that most WMs fail me because my hardware setup is a bit tricky, that I can understand. Only now when I understand better what my brain really needs, do I grow tired of those full of bad design.

Xmonad, in a way, is peace for me. It is mathematical in nature. The fact that it is written in Haskell might seem like a gimmick at first, but the connection is in fact very deep. I understand now that it could not have been written in anything else. Xmonad exemplifies the idea of purely functional programming. “Normal” programming is almost always imperative – the programmer tells the computer how to do something. But in functional programming, the hacker instead tells the computer what something is. This is a profound difference.[3]

In any other customizable WM I have ever used, I would create a complex configuration to tell it exactly what I wanted it to do in some case or another. I would do the bulk of the lifting, so to speak, either by constantly adjusting the windows the WM handled wrong or by writing elaborate procedures to automate this work. But with Xmonad, this is different. It is not my job to figure out how to arrange windows, so I should never have to tell my WM anything about this. The only thing I ever have to tell it is about what is. I should never write something like “to go to the next tag, you read in all tags, sort them, filter some out, find the current one and then shift to the next in the list”. I instead write: “I want the next non-empty, non-visible tag now”. I give Xmonad a few simple hints and that is it. “If it’s name is in this list, I want it floating. If I’m currently out of space here, try a different screen. There is a status bar I’m running, so be careful not to overlap it.”

For the first time, I feel like my WM is actually intelligent and wants to help me. It is not my slave, not my servant who follows my orders. It does not look down on me, thinking itself smarter than me, only an obstactle to its flawless performance. Instead, Xmonad is my friend. It understands window handling and can take care of it. I only tell it some personal preferences. If it doesn’t think I need something, it is probably right.

It is astonishing how easily we pick up delusions. We see something once and think it should always be that way. Rarely do we question “Is this really necessary? Is there no other way?”

For me, those are some of the delusions that clouded my judgement about WMs.

“I need space! I want to see my desktop wallpaper!” What for? Have I not something better to do than to stare at pretty pictures?

“I want to tell my WM what window is in the foreground and what in the background.” The very concept is wrong. There is no “foreground” with focus – you either see something or you don’t. A window you can not read might as well not be there at all.

“I understand now, I use a tiling WM. But I want to control what window is where!” Why? The very idea of a tiling WM is that the WM figures out what to show you and how. You simply tell it what application has your focus right now and what other applications belong to it (by giving them all the same tag / workspace).

“Xmonad has no stacked layout like wmii! I can not easily put dozens of windows in one column!” Why would you do this in the first place? You certainly can not read them all. Let Xmonad only show you the ones that matter and search for other ones if you need them. Or think about grouping them better. Why open 20 PDFs in separate windows if your viewer can take care of that?

“Xmonad has no title bars.[4] I will miss those!” Are you sure? What do you use them for? The window content itself tells you what the window is. If the content is not visible, then a title bar will only waste space. If you need to find something, let the WM do it for you. If you want status reports, use notifications.

By embracing not complexity, but simplicity, confusion ends. The best solution to a problem is to make it obsolete – as Gordon Bells said, “The cheapest, fastest, and most reliable components are those that aren’t there.”. By concentrating not on “how”, but on “what”, false desires disappear. By letting go off false desires, suffering ends.

guru

[0] Yeah, I have been reading Buddhist philosophy and history again. Can you tell?
[1] The old monks have understood one thing: Truths about reality must be visible everywhere. There can not be any aspect of reality that is not permeated by them. Thus, we can improve our efforts by just focusing on one simple object. Traditionally, one’s breath, a candle or a rock have served this purpose. Some Zen traditions use 只管打坐 (shikantaza, “simply correct sitting”) for this. If you can’t understand reality just by sitting down and concentrating, then reality can’t be understood at all.  Therefore we must be able to see all those Buddhist observations in everything we use, including the most fundamental GUI software – our window manager.
[2] I will focus exclusively on *nix. There are tiling WMs for Windows, OS X etc., but they are all very lacking.
[3] The classical example to demonstrate this is Quicksort. If you have ever programmed something, Quicksort was probably among it, but just to help you remember, I’m gonna tell you again what Quicksort is. We define Quicksort recursively like so: An empty sort is always sorted. To sort a list with at least one element, we take the first element (called the pivot) in the list and then separate the rest into two lists, one containing all the elements that are smaller and one containing all that are larger than the pivot. Now, to get the sorted result, we simply sort the first list, than add the pivot and finally add the sorted second list. Think about how you would solve this in an imperative language. In C, it would go something like this:

void swap(int *a, int *b)
{
  int t=*a; *a=*b; *b=t;
}
void sort(int arr[], int beg, int end)
{
  if (end > beg + 1) {
    int piv = arr[beg], l = beg + 1, r = end;
    while (l < r) {
      if (arr[l] <= piv)
        l++;
      else
        swap(&arr[l], &arr[--r]);
    }
    swap(&arr[--l], &arr[beg]);
    sort(arr, beg, l);
    sort(arr, r, end);
  }
}

This is a typical example – we tell the computer exactly what to do to get the result we are interested in. But remember I said that in a functional language, we tell the computer what something is. I already told you what Quicksort is, so let’s write this down in Haskell:

qsort [] = []
qsort (x:xs) = qsort lesser ++ [x] ++ qsort greater
     where lesser  = [y | y <- xs, y < x]
           greater = [y | y <- xs, y >= x]

And that’s it.
[4]Technically, you can add them, but they are not normally there.

Anti-Buddhism

December 12th, 2009

Today, I’m an anti-buddhist. You know, like an anti-christ, i.e. someone who perverts all christian ideals? Specifically, I have perverted the 4 Noble Truths and broken all 8 principles of the Noble Eightfold Path. How so?

The 4 Noble Truths teach us about suffering and how to overcome it. In short, suffering is caused by our attachement to the world. By wanting things, we suffer because it is fundamentally impossible to fulfill this desire. I have perverted this, for I craved for a bigger desktop. I have assembled 3 monitors where I previously had only 1. I suffered for this, so much is true. (I have suffered a lot. Linux is my own personal hell. I am repenting for very grave sins, it seems.) But, I have overcome this suffering without letting go. I have achieved my goal – I have 3 working monitors. But to do this, I had to break everything on the Noble Eightfold Path.

All my sins are:

  1. Right View – I have forsaken the path of the Console and The One True Display. I have merged 2 monitors into one (via TwinView) and added a third one to watch blasphemous movies while working.
  2. Right Intention – I wanted more screen and more windows. I did not want a simpler, easier display, but visual bloat instead.
  3. Right Speech – I have cursed, of course, but I have also lied. I still lie, for every single application I start is a lie – a lie to my xorg-server. It still thinks the monstrosity, the 2-monitors-into-1 is just one screen, but I run a hacked libXinerama instead that tells every application the truth. The server doesn’t know this, it is completely unaware. Only my conspiring GUIs do. [0]
  4. Right Action – I have broken the holiest of rules – I have downgraded. (I now run X.org 1.6 instead of 1.7.3.)
  5. Right Livelihood – I am a slave in the worst of professions – I maintain my own libraries, ignoring all advice from my package manager.
  6. Right Energy – I have spent a whole 3 days setting this up. Do I need to say more?
  7. Right Mindfulness – I have forgotten the pain of changing my xorg.conf and ignored the past. I will forget today’s lesson and, at some point, patch again.
  8. Right Concentration – I have drunken caffeine a-plenty and spent 2 days fiddling with emacs. I was never focused on my ultimate goal, only ever jumping from idea to idea.

Yet, everything works. (Well, except the actual window manager, but this requires patches that are trivial in comparison.) This whole endeavour must have gotten me massive amounts of negative karma.

[0] http://ktown.kde.org/~seli/fakexinerama/ pure awesome-sauce (my modified version: Xinerama.c)

EMACS 2.0

December 10th, 2009

*sigh*

I’m back-paddling on this. I feel I gave emacs a fair chance. I spent a good 3 days getting used to it, setting it all up and I still can’t get it to do what I want.

I’m going back to vim.

There were many things I really liked about emacs. It provides many great features to make coding easier. Integration of other processes, particularly gdb. A better window and buffer handling. Nicer copy&paste (yank cycling ftw!). All those cute modes, like which-function mode (shows the current function you’re in), glasses-mode (pseudo-converts camelCase into proper_names) and so on.

But, just as often, it stands in my way. I don’t want tabs and I’d like emacs to only use spaces, 4 spaces specificially. I spent 3 hours setting this up and it still doesn’t work nicely. Scrolling is fucked up. Visual editing, i.e. being able to move the cursor anywhere in the file, is not possible. And so on and on. About 2/3 of my config right now consists of disabling some GNU feature I don’t want.

I’ve had it, I won’t put up with this any more. Instead, I’ll port all those cool features over to vim. Well, that was pointless…

Of course, this means I don’t need Control and Meta anymore, so I’m back to my old layout. Yadda yadda yadda.

Escape Meta Alt Control Shift

December 6th, 2009

For the last 4 years, I’ve been a vim user. My vim config is hundreds of lines long, my plugin folder is overflowing. For the last year, I’ve been using wmii as my window manager (before that, awesome), its config is similarly a work of art. I’m using my own keyboard layout, with some additional tools to complement it.

This week, all this changed. At first, I changed my monitor setup, but by doing so I had to modify my window manager and long story short, I’m now using Xmonad and I had a big fight, my last one, with vim and I’m now an emacs user, too. But emacs was the straw that broke the camel’s back, so to speak – I have a meta key problem.

I have way to many of them. I have my normal ASCIIbet, then Shift for capitals, Mod3 for punctuation or programming characters, Mod4 for functions like cursor keys or Return, then Control and Alt for emacs, the Windoze key for my window manager and a special key for my IME. It’s too much! It has now become very cumbersome to type certain things and I have to fix this mess.

Design Principles

  1. Hands should move as little as possible and never leave home row. This is a pretty basic requirement, but it prevents me from moving some rarer combinations to the outside of the keyboard.
  2. I must not give up any functionality. Specificially, I must still be able to type in (among others) French, German and Japanese, be able to programm efficiently and have enough keys left to handle Xmonad.
  3. The computer should do as much work for me as possible. If I can let it figure out what I meant and safe a few keystrokes in the average case, I will do it.

Solutions

First, I use my IME more aggressively than before. I’m currently using scim (with anthy and tables) to input any normal text beyond ASCII. This is pretty normal for Japanese, were you type 黒い猫 (kuroi neko, black cat) by activating Japanese mode, then inputting “kuroineko<SPACE>” and the IME converts this first into syllables (くろいねこ, ku ro i ne ko) and then tries to guess the correct meaning. I have already started using this for German a while ago and now use it for all diacritics. For example, I switch to European mode and then input “Verschw”orung” to get “Verschwörung” (conspiracy). This works pretty well because all diacritics are rare anyway and justify the additional key stroke. Each language (family) has its own mode to keep them simple and because I almost never mix them anyway.

This frees up some keys, and thus, my old basic layout:

basic layout

basic layout (left normal keys, right with Mod3 = M3)

(A few keys are redundant because they started out in a bad position, then moved to a better one and I saw no need to leave the old one empty. As you can see, the Mod3 level has still quite some open positions.)

I can’t move the punctuation characters inside my IME, because I generally mix them with normal text (typing something like “$editor =~ s/vi[m]/emacs/g”) and the IME would slow this down a lot. Inputting something like “\s” for “$” isn’t that cool and breaks many hotkeys. But, as you can see, Mod3 is used twice and in 2 really good positions, forcing me to put at least some meta keys in the outer corners at the bottom, which sucks.

So instead I decided to group them tighter together and move all characters to the right. This way I only need one Mod3 key. The Mod4 key, formerly right of Space, moves to the right of Left Shift. I can still press it with my left pinky and use the keys on the left. This frees more keys and leads to the following layout:

new layout (normal, mod3, mod4)

new layout (normal, mod3, mod4)

This might be a little confusing because I used some lazy abbreviations. The Mod4 level on the left has Backspace, Up, Down, Escape at the top, then Left, Down, Right, Insert and finally, at the bottom, Page Up, Page Down, Return, Tab. On the left are the meta keys Mod3, Mod4 and Win. On the right are Control, Meta and the 漢字 key to activate my IME. All the other keys on the keyboard are unchanged, but I can’t reach them anyway, so I don’t use them (except for numbers).

This arrangement isn’t optimal in the sense that some combos have to be typed by one hand, like ^ as M3 + i, and not all good keys are fully exploited (the left home row is under-used), but this is the best compromise in my opinion. All punctuation on the left side is rare and all frequent ones (and combination, like :) or !=) are easy to reach.

I was also experimenting with separating opening and closing parentheses because emacs (or any other editor) can easily match those anyway, but this doesn’t really improve the setup and makes it a lot more illogical and harder to learn. If it were not for programming, I would actually switch to a pseudo-latin input were similar characters would be merged and the IME would tell them apart, e.g. I would put i, j and y on the same key “i” and let the IME decide which to use. This works all pretty well for normal text, but in virtually any programming language, most letters are used frequently and, as a group, more often than punctuation. Having different layouts for different contexts, however, only makes a big mess.

(You might have wondered why I chose this particular key arrangement. It was originally Neo, a (now broken, see my old rant) German layout. I moved the J, X and Y, and removed all those silly additional levels and German characters, though. If I had to start over, I’d choose something like Dvorak as a base.)