Monday, March 23, 2009

It's the end of the world as we know it...

The media is just killing me.  Is there a black hole where we're storing our excess cash?  Did someone leave a bail of hundreds next to the cows?  Did stock sales suddenly become one-sided trades?

I won't go ninja-conspiracy-theory on ya'll - but I'm tired of ludicrous statements where money managers and bank presidents start speaking in cryptic "dissolved, disappeared, or extinguished"  money speak.

In actuality the stock market is merely an anticipation of wealth.  When I buy a stock and it goes down - the actual money has not disappeared.  But my anticipation of making money has when I sell my looser stock.  The simple fact is that the "anticipated money" never existed until I sell out my stock.

Money has not disappeared, dissolved or sublimed - it's simply not being used to buy stock anymore. And there's the rub - who took their money and where is it now?  Is that why we're currently on a cash hunt across the globe?

Monday, March 02, 2009

Compiler, Scanner, and Lexer, Oh My!

As with all my pursuits, I generally sit around and think "real hard" for a "long time."  So, for the checklist of things I have begin, I can now add the ultimate compiler.

Being the generalist, yeah basically a "bard," I have always considered it a formidable task to write a compiler.  For the uninitiated, a compiler takes a string of text and converts it into a machine executable program.

For instance, a "C" program like such:
#include

int main() {
printf("Hello, World!\n");
}
Then would be compiled into a program which would print "Hello, World!" onto the screen.  Simple enough - but actually there's a huge amount of work involved.  Thus, my long arduous "thinking about it... yup"® has persisted, until a couple of days ago when I figured what the hell, I'm not getting any younger!

And as always, I figure that if I'm going to put so much effort into parsing a single language such as "C" then by goodness, I'm going to make a compiler that can parse nearly anything.

So I wrote up a new language, hence forth known as "Plato," and have written the scanner for it. I suppose it's a GLR if you want to be exact, but in actuality it's "what works best" based on a ruleset.  After completing about 50% of the scanner I realized there is indeed a better way, so now I'm writing a full-blown compiler tool suite.

The final product will be a universal compiler - taking Java, C#, C++, C, perl, assembler and Plato languages and generating a program which interoperates between any language you can define a human readable ruleset for.  But for now, I'm simply writing Plato.