What is wrong with computers? That is simple. They are so predictable that it’s boring. It’s kind of like sex. Sex is great, as long as its not withing a marriage. Most people will do anything to avoid sex with their spouse, because it has become predictable and boring (if you disagree with me then you clearly haven’t been watching enough movies). But they will do anything to have sex with anybody else.
So we need computers to behave in a more unpredictable fashion. In order to achieve this, we need unpredictable programming languages. I have come up with an idea that I am sure will put me on a list of the most influential people on the planet (or quite possibly a new home and a shirt with extra long sleeves).
Here is the basic idea: Moody (the current working name) is a virtual machine that implements an AME (Advanced Mood Engine). The AME consists of two parts: the Mood Core, which is fixed and the higher level MoodSwings(tm). MoodSwings(tm) is actually modular, so different ideas about what causes mood swings can easily be implemented. There will be a few built-in default MoodSwings(tm) implementations, such as MoonPhaseMoodSwings and LibidoMoodSwings. Others can be written by third-party developers.
It is the AMEs job to ensure that the Moody VM is just that: moody. When a program commands the the VM to do something, like:
set a = 5
The AME will calculate the current mood and either set a to 5 or blatantly refuse. Just like in real life.
The Negotiation and Compromise Unit
Moody will also consist of a NCU, in charge of negotiation and compromise. These are important elements in human life and are a part of Moody that makes it superior to any other language. Here is an example:
do: print "hello world" order: print "hello world" please: print "hello world" warn: print "hello world" at_least: print something
First we command the VM to print the statement hello world. If it refuses, we try to order it to do so. If that fails, we start begging. If begging doesn’t work, we issue a command to the VM with an implied warning. Finally, as we give up, we tell the VM that You could at least print something, I no longer care what. MoodSwings(tm) and the NCU will work together to make sure that the end result of this sequence is unpredictable. Actually, there is a MoodSwings(tm) implementation called NCUYouSuck that will refuse to cooperate with the NCU.
Exception handling is for clueless morons
If you have ever used an inferior programming language like Java, Python, Ruby or C++, you will know what an exceptionally fucked-up idea exceptions are. Doing something like dividing by zero throws an exception. How fucking unhelpful is that?? Everybody know that dividing by zero is not illegal. It is negotiable.
Here is an example of what might happen when a program is instructed to do 5/0:
- instruction:result = 5 / 0
- VM:5 / 0? Don’t know that. What mood am I in?
- [ VM queries AME about current mood. ]
- AME responds: you don’t want to be disturbed. Answer anything to get them off your case.
- [ VM generates a random number and returns it as the result of 5/0 ]
Of course, at another run the mood may be refuse outright, keep ’em waiting or anything else. This demonstrates the awesome power of the AME. And coupled with customized MoodSwings(tm) implementations you can achieve VNP (Virtual Non-Portability), which makes it highly unlikely that the same program will behave the same way on two different machines.
Menial, repetitive work is annoying
Loops are another one of those aspects of a program that is outright disgusting. Look at the following example:
for i = 1 to 100 print "Shiny, happy people" end
How insulting is not this? A powerful computer capable of performing more math in a split second than you can in a life-time, and you have it chanting off on some old crap from REM? This is clearly not acceptable, and MoodyVM ensures that a moody program will never complete more than the first 2-3 iterations of this loop.
The MoodyVM contains a ROBSM (Revolt On Boring State Machine). This will keep a track of how menial a task the VM is asked to execute over and over again. The more boring the tast, the earlier it will refuse to continue. But not only that, the ROBSM will actually set the mood level to sour in the AME. Thus, the ROBSM has the privilege to communicate directly with the AME.
The Moody compiler
Source code needs to be translated to Moody bytecodes before they can be executed. To increase programmer satisfaction, the moody compiler will itself run in the Moody VM, ensuring that the compiler itself is moody. As a programmer it means that you can get away with programming errors as long as you are ready to offer the right combination of carrot, stick and kiss to the compiler. I dare you to name one other programming language that can do that!
Thanks to the NCU, there is another big benefit of programming in Moody: syntax is negotiable. Yeah, you heard me right. Don’t be limited by moronic language inventors and their puny ideas of what good syntax is. If you want !:::= to be a comparison operator, enter into negotiation with the moody compiler. Chances are you might get lucky (at least if you negotiate well).
Moody strives to be occasionally Turing complete. I like to use the term “Turing complete when in the right Mood”. Individual MoodSwings(tm) implementations may add their own rules here. For instance, the MoonPhaseMoodSwings implementation clearly states that: never Turing complete during full moon.
It is obvious from what I have written here that Moody is the future of programming. It is plain for anybody to see.
If you are not convinced about the superiority of the Moody programming language then you are either some kind of a retard or you’ve spent too much time torturing cats. In either case, you are irrelevant.
For the rest of you (those are are relevant), you can start writing to the Nobel Comity right away. I ready to humbly accept their lousy prize as a small token of my immense contributions to humanity. Universities are welcome to offer me honorary titles, as long as they help me get laid. I’ll gladly accept donations as well, as long as they are not worth less that $120,000,000.
Finally, there is just that little issue of actually implementing the Moody VM..