views:

866

answers:

18

Do you know any example of an esoteric language used to write any practical-use, real-world program? Is there any, however obscure, domain of computer science where an esoteric language has actually been proven useful for solving a specific problem?

+4  A: 

Understanding Turing machine, Computability and having a practical sense of what is implied by the theory of computation. All the practical benefits can be gathered if you use an esoteric language like brain****.

I am sure, there are others too.

Senthil Kumaran
+8  A: 

If there is a practical use to a language it wouldn't be called esoteric. The two terms are mutually exclusive.

shoosh
Esoteric doesn't imply impractical. From the definition "1b. Of or relating to that which is known by a restricted number of people"
Brian Agnew
The definition of "esoteric programming language" doesn't come from combining the definitions of "esoteric" and "programming language" in normal use any more than the definition of "the white house" does from combining the definitions of "white" and "house".
Pete Kirkham
"restricted number of people" defines the entirety of human experience - C isn't known universally. Therefore C is esoteric.
warren
He didn't ask if the language was practical, only if anyone had written practical apps with it ;-)
Jaykul
+14  A: 

job security!!!

wefwfwefwe
A: 

Developing of esoteric language is like creating Mandala. After endings of work you can forget it or even destroy.

macropas
+4  A: 

I would consider perl a widely deployed esoteric language...

Matthieu M.
Perl is not an esoteric programming language.
Jörg W Mittag
+34  A: 

Sure! People use Perl all the time.

Tirpen
Perl is not an esoteric programming language.
Jörg W Mittag
They sure had me fooled.
ryeguy
A: 

Eiffel, Erlang, Ocaml, Haskell. These are all "niche" languages for most of the programmers out there, yet they are practical inside their domains. Your question simply doesn't make sense, it might be well asking "Are there any good languages that we don't use in popular problem domains?"

Daniel Goldberg
These are by no means esoteric languages!
Agos
I wonder if anybody who answered this question has even a remote understanding of what an esoteric programming language even is?
Jörg W Mittag
I think it would be worth clarifying this point (perhaps in a comment below the question), don't you ?
Brian Agnew
+1  A: 

Code obfuscation is a very common practical use :-p

And I don't know if the APL/J/K family could be called esoteric, but they've been used in production systems from a long time.

fortran
APL, J and K aren't esoteric programming languages.
Jörg W Mittag
Look up the definition of esoteric (http://thefreedictionary.com/esoteric): known by a small group of people, or requiring a special knowledge to be understood. Those write-only cipher-like languages fall well into that definition.Also, take a look to this: http://en.wikipedia.org/wiki/Write-only_language as you can see, the boundaries are not very clear.
fortran
Look up the definition of esoteric programming language (http://EsoLangs.Org/wiki/Esoteric_programming_language): An esoteric programming language is a computer programming language designed to experiment with weird ideas, to be hard to program in, or as a joke, rather than for practical use.
Jörg W Mittag
And how was born APL, if not as a _proof of concept_ of a new mathematical notation developed by Iverson? It seems that esoteric, when talking about programming languages, also means unconventional, not just unusable or crazy (http://en.wikipedia.org/wiki/Esoteric_programming_language)
fortran
A: 

Order of Dagon website ;)

wefwfwefwe
A: 

See this question

iDevlop
why this -1 ???
iDevlop
Because the answer has absolutely no relevance whatsoever to the question.
Jörg W Mittag
+3  A: 

Some classes of esoteric programming languages have applications in theoretical computer science.

Turing tarpits have uses for illustrating certain results in computability theory and the halting problem. See for example the work of Ianov (there's a slightly more accessible summary partway down this article).

Fundamental results for classes of Turing machines are another practical application. For example, Wikipedia notes that P'' was "the first 'GOTO-less' imperative structured programming language to be proven Turing-complete."

Binary combinatory logic is a useful tool for analysing Kolmogorov complexity.

ire_and_curses
+30  A: 

There is no practical use for an esoteric programming language, pretty much by definition. However, just because you cannot use them, doesn't mean they aren't useful.

For example, when you look at esoteric programming languages, you can roughly divide them into categories: some are created as a joke, some are created just for fun, some are created as Turing tarpits, but there are also some that are created to prove or illustrate a point. And these are actually useful for exactly that: illustrating a point, maybe in a programming languages class, maybe to the community or to the industry. Even though they are useless for practical purposes, they are use*ful* for educational purposes.

Take non-deterministic esoteric programming languages. These are programming languages for which the evaluation semantics of certain expressions are not defined deterministically, but for example probabilistically or based on the phase of the moon or something like that. If you look at the definition of such a language, you will immediately think: "Well, that's just stupid." And it is! (For example, the Hello World program in Java2k is almost a page of code, and it isn't even guaranteed to print "Hello World" every time, only most of the time.) And yet, most of today's mainstream programming languages have non-deterministic concurrency models. IOW: as soon as you start a thread in Java, C#, Python, Ruby, Perl, even Erlang or Clojure, your program becomes just as random as in the esoteric language Java2k. So, why do we think one is stupid and accept the other as normal, even though they are essentially the same thing? By taking non-determinism to the extreme, and packaging it up in a fun way, esolangs allow us to ask that question.

Another example is Turing tarpits. A Turing tarpit is an esolang which has almost no features but is still Turing-complete. Such a Turing tarpit can be used to demonstrate two different things: you can use it to demonstrate what exactly it is that makes some languages more "powerful" (in the sense of expressive power) than others. If you search around on the web, you will find people ask "if Lisp is so much better than Java, why don't you show me some program that you can write in Lisp but I cannot write in Java." And, of course, that's stupid: both languages are Turing-complete, so there is no such program. However, by contrasting Java with, say, Brainfuck, you can show that this is just not meaningful question to ask.

And the other thing you can demonstrate with Turing tarpits is that you can never make a language more powerful (in both senses of the word: computational power and expressive power) by removing features. It sounds obvious, but there are people who actually believe that Microsoft should just remove mutable state from C#, and it would magically become more powerful.

In general, Turing tarpits are good for demonstrating the distinction between the computational power and the expressive power of a programming language.

Other ways in which esolangs can be useful is that they can serve as an inspiration for programming language research. Think of Unlambda, which, as the name implies, is a functional language which is not based on the lambda calculus. In other words: it's a functional language which doesn't have functions.

And last but not least, esolangs can force you to look at a problem from a completely different angle (yes, I admit, it's mostly an awkward angle, but hey, some movie directors (Hitchcock, for example) owe their whole career to looking at things from awkward angles) and they tease your brain like a good puzzle. That is, for example, the whole reason for the existence and the name of Brainfuck.

Jörg W Mittag
+1 for the effort, although tl;dr
Charlie Somerville
Read it - enjoyed it - great post :)
Jiaaro
"as soon as you start a thread in Java, C#, Python, Ruby, Perl, even Erlang or Clojure, your program becomes just as random as in the esoteric language Java2k" couldn't bear to read past this absolute nonsense claim. How does starting a thread somehow make your program random?
JimN
All threading schedulers are by definition non-deterministic. He's completely correct. Of course, we do our best to fix the problem by using mutexes, locks, critical sections, etc.
David Titarenco
+1  A: 

The only practical benefit that I see, is that if you wrote code in an esoteric language, it would cause you to think about problems in new and interesting ways. Learning new ways to approach problems will benefit even when you are back programming in a mainstream language.

Last year I read Charles Petzold's 'Annotated Turing'. I certainly have no intention to ever program a Turing machine, at least as he describes it. But thinking about solving problems with his 'language' stretched my mind. I'm a better C# programmer for it.

epotter
+3  A: 

Inspired by this question, and its answer, I too have found a practical use for such a language: GolfScript, a language designed specifically for code golf:

GolfScript is a stack oriented esoteric programming language aimed at solving problems (holes) in as few keystrokes as possible. It also aims to be simple and easy to write.

There you have it, straight from the people who wrote it. Although it might be debatable whether or not code golf is a practical matter, my personal belief is that it gets as close as it gets to something you and I might actually write and encounter, not to mention it's a fun programming exercise, and a competition with a lot of fans. So... if gaming, football, and all kinds of other entertaining activities are in a way or another... practical... I'm feeling free to include code golf too :)

luvieere
A: 

If you judge only by the Wikipedia link:

An esoteric programming language (sometimes shortened to esolang) is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke. There is usually no intention of the language being adopted for real-world programming.

then, no, there is no practical application of such a language to a real problem.

The reasons aren't insults to the languages, they focus on "practical":

  1. In practice, if you're solving a problem, you need to be able to convince yourself that you've solved it. If you're using a language that is specifically designed to be hard to read, it's going to be hard to visually inspect your solution and say "Yes, this is correct."
  2. In practice, you're not working in a vacuum. In real life, you're always working with a non-zero set of other people (even if it's just you-in-the-future). Someone else is going to have to maintain your solution, adding a feature here, fixing a problem there or, worse, trying to document what you did and why.
  3. If neither 1 nor 2 apply, you have created a solution to a problem that is (a) trivially easy to inspect and (b) never requires maintenance because it is never used in practice. It is, therefore, a trivial / non-practical problem.
Bob Cross
A: 

There exists a language called Pilot. It is a interpretive language written in Dartmouth BASIC (an interpetive language). It's initial use was for non-programming teachers to be able to program their tests. All commands in the language are single letters and the letter used defines what options are available. It is ancient, (I learned it in 1976) and as far as I can tell, no longer has any use.

Dave
+2  A: 

Sure; Fungot, the IRC bot: http://zem.fi/~fis/fungot.b98.txt

Pikhq
+3  A: 

Real world apps, eh?

The game Lost Kingdom won the First Annual Classic 2k Text Adventure Competition in 2004, and has been (re)written and enhanced by the original author in brainfuck

How about an IRC bot in Befunge or this text editor? And I suppose if you like writing in esoteric languages, you might consider a befunge to C compiler or a brainfuck to C compiler very useful...

Jaykul