Possible Esolang

Some thoughts on an esolang so I don’t forget

An esoteric programming language (sometimes shortened to esolang) is a programming language designed to test the boundaries of computer programming language design, as a proof of concept, as software art, as a hacking interface to another language (particularly functional programming or procedural programming languages), or as a joke.

Wikipedia

There’s a Wiki devoted to Esolangs.

dolphin kindaLike fish

Esolangs are fun but also potentially useful for working out ideas by taking a different perspective on a problem. One nice aspect is that in considering them you’re pretty much forced to separate language features (syntax, semantics…). During typical programming the features of the language in use are locked together and become second nature, when breaking out of that habit may offer better solutions. These could be implemented in the current language by implementing a Domain-Specific Language within it or by creating new features in an existing language that veer away from the core paradigms of the language.

I’ve never had a proper go at designing an esolang, but over the years have had occasional thoughts. One was to somehow embed Description Logics (eg. OWL semantics) right at the lowest level in a data-oriented language, see what happens. I haven’t got past that initial suggestion…

A YouTube recommendation : A Brief Introduction to Esoteric Languages just reminded me of another avenue I’d thought about.

This other Possible esolang idea was spawned in the same general domain. RDF/OWL does (IMHO) hit a sweet spot for expressiveness without excessive complexity for a Web-oriented data language. The Open World Assumption pretty much sorts the problem of unknowns, but within the knowns, (breaking the fourth wall of relational DBs), things are pretty much tied down to things being True or Unknown. This leaves a big space. While things like Fuzzy Logic could potentially extend this (and I’m sure have, in a few obscure papers) they would call for a big leap in complexity.

One case in point was how to neatly express how things are similar, without being any more specific. RDF class relations do offer a lot of flexibility and owl:sameAs is used for identity, but maybe a dedicated term is needed here. Years back, probably on #swhack IRC, Aaron Swartz suggested kindaLike. So you could make statements like dolphins kindaLike fish.

A few months ago, in the context of machine learning stuff, I was pondering the common problem of having to try different algorithms, feature sets etc. to solve a particular task, and how this could be automated. Sure, genetic algorithms and the like can be used to search the spaces (perhaps generating the code), but figuring out the whole genotype-phenotype thing is a huge job in itself.

So what about adding a few keywords for a compiler pre-processor..? I did think through a few more examples, but didn’t write anything down – here’s the kind of thing:

if(maybe x == 1) { 
   // do stuff 
}

From this the pre-processor would generate two programs, one with :

if(x == 1) {     
   // do stuff  
}

and the other with :

if(maybe x == 1) {     
   // do stuff  
}

– which would be sent off to the compiler. After compilation each version would be automatically run and measured against some kind of evaluation measure.

Ok, it’s only a half-formed idea, and as always I’m sure it’s been done before. But at least now I have a placeholder for it.

admin

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment