Sunday, September 03, 2006

Overloading Ideologies

I'm up late programming (yes, even as I post this blog) and currently shifting perspectives on a language feature that I've been at odds with for years. If this doesn't sound interesting to you yet, maybe you'll find amusement in my nerdy attention to syntactic detail.

The scripting language I'm writing has been both the largest project I've undertaken as well as the most revealing about the world of coding in general. Both by inventing and "borrowing" language features to design my ideal code parser and environment, I've been actively comparing each iteration of my design with half a dozen well established giants (C++, Java, C#, Python, Ruby, and Haskell). I often push commonly expected features (like function calls in expressions) out of the specifications when they don't fit my current coding philosophy (or mood). More often than not, those features creep back in when I find myself missing them and forget why they were so undesirable in the first place. Though my notes cover controversial design decisions in detail, after a couple weeks they start to look like passionate forum posts from whiny amateurs "Why can I define this as read only but not write only?" or arrogant attempts at controlling coder's thoughts "Abstract classes can't have member data". Anyway, a recent wave of inspiration tore through my hesitation to implement one of my most hated language features: operator overloading.

Magic language features are dangerous territory, providing functionality to key parts of a language (like concatenating strings in Java) but restricting the coder to those built in mechanisms. It makes perfect sense to add two linked lists, but Java won't do that.

So why do I hate overloading operators if I want to put some of that magic in the coder's hands? Without giving them access to all the operator inner workings, it's like handing a chainsaw to an orangutan. "This is specifically designed to cut wood, but go massacre whatever you want with it". Overloaded operators have an aura of mischief, trespassing on everyone's expectations of how adding should work. So, it's common practice to ignore the feature when it exists and stick to member functions.

Well, what if operators *were* functions, with no magic whatsoever? That's my aim with the scripting language. There are no base types, thus no expression operators that come magicaly packaged with the compiler. Every type, ints included, are actually added to the program in a library instead of coded into the parser. And that library code is written in the script and freely available. The result: thinking of every single operator (even adding two numbers) as a customized, code defined expression. Operators become no different than functions. In fact, I'm leaving it open for coders to define a <|[dlf%[)w}! operator if they so please.

This could be a refreshing take on an old problem, or a feature that everyone but curious beginners ignores like a big red button. Either way, it's nice to change one's mind now and again, to live dynamically rather than statically. (Did I tell you how much I hate the "static" keyword! It's been misrepresenting scope for . . . . . . . )

Well, that's all. Go ahead and clear your head with this:
http://video.google.com/videoplay?docid=-8953743256904057853&hl=en

Saturday, August 26, 2006

Meme musings

I check IT Conversations often, looking for industry innovators and following the open source vibe that first resonated with me almost a year ago. Normally a good presentation means one of Will Wright's ventures into possibility space or an IT analyst geeking out over MMO communities.

But today, something surprised me. For someone with so much respect for Richard Dawkins and his ideas on biological evolution, I had been unaware of the emerging field of Memetics. Susan Blackmore's presentation came from the blue and introduced the concept behind this stunning paradigm.

In short, a meme is a body of information that propagates through thinking systems, carrying self preserving traits as the mental equivalent of a gene. These meme ideas flourish in humans and computers, gaining variation for adaptation from us and rapid lossless travel through our digital conversations. I suggest that you listen to her presentation for a more organized overview.

Curious about the origin of Blackmore's colorful attitude (and hair), I found her website and a very thorough interview. Here, I saw ideas that deviate from Dawkins and reveal a very dynamic and controversial past. Again, I'll not attempt to summarize the content that those links hold just a page away.

Reflection upon her words from the interview (a necessary part of my mental digestive process), I discovered nobility in her practice of Zen and acid. The latter is a world that, for reasons other than society's fear of the unknown, I cannot pursue myself.

Her use of meditation freed her from the noise of constant outside influences. No concerns, no religion, no echoes of conversations past, no expectant dreams. She removed the memes, all the thing that we receive and propagate in our minds and the minds of others. To stand still against the current of information requires leaving objective thought behind. So how could one gain credible knowledge from such an activity? Perhaps memory could capture the value from these experiences for crystallization later. Enlightenment doesn't happen in the void of mediation, but afterward during the review. At the rejoining with the flowing memes, drifting with a new bearing.

Her most radical trait is how liberally she discusses drug use. For her, it is a channel for creativity. Exploring possibilities by fragmenting consciousness. The random patterns create signals that no input signals form the senses could trigger. However, the poisons that induce the experience are no doubt damaging to the body. For all those who take that path, lifespan and clarity are just resources that could be better spent in youth or perusing youthful hallucinations than in a hospital bed at 90.

I'm critical of that activity for selfish reasons. A few brain cells could separate a dream from a breakthrough or replace a tiny key memory with haze. With the singularity approaching, a mind is more than ever a terrible thing to waste.

Just a new paradigm to explore at those times in the day when meme traffic slows and a mind begin to decide what to do with all the chaos.

Thursday, August 24, 2006

It starts up north . . .

To break the ice, I'll start with a poem.

The Arctic

My tracks deface the continuous white plane.
A brilliant shimmer overwhelms my eyes.
Raw wind scraped ears hearken to coarse pain.
Stiff legs, stone hands, a mouth of silent sighs.
The omnipresent sun, unchanging skies,
Shed light that endlessly cuts though chilled air.
Shadowed beneath protective dry skin lies
Dark frozen lungs that sip the atmosphere.
A bright ambiance feigns maternal care.
White ice and frozen blue heavens reach wide.
Deep water, dark space frame the world’s fear.
Upon the infinite unsloped curve, I glide.
The simple halo of the sun spins on.
I am a part of here, purposeless, gone.