What do you guys think is the weirdest practical programming language out there? I added practical because in Google searches the results are commonly languages that no one would ever actually use to program. I think that F# is the weirdest, because of this code:

1 2 3 4

openSystem

Console.WriteLine("Hello world")Console.WriteLine("I'm weird!")

producing the output:

Quote

Hello worldI'm weird!

Also it doesn't allow tabs unless you specifically tell it to do so. It combines no semicolons with no main method which makes it the weirdest language I've ever seen. I assume there are weirder out there though. What do you think is the weirdest language you've encountered?

Oh man... There are so many languages out there not having something like a main method. A main method isn't a must-have for languages. Some people say that a main method is complete shit. 'If I write code in a file, why should I declare it all in a main method? Why shouldn't the interpreter/compiler just start to do the stuff, which is written in the file?'

I've heard of most of those; the only one I've actually tried to write a program in is Piet, which is quite hard to write directly (as opposed to by source-to-source translation). (And, as an aside, I happen to know the guy who proved it Turing-complete).

My favourite esoteric language is GolfScript, which is a stack-based functional language.

Brainf*ck and company are hardly "practical". Some of the strangest looking languages used in the real world would be just about anything written by Arthur Whitney, like APL. This is how you sort a list of words by length in APL:

X[⍋X+.≠' ';]

Successors to APL like J, K, and Q are all ascii-based, but still so terse that they make perl look like COBOL.

MUMPS also deserves an honorable mention for perversely awful syntax, and it's used all over the place in the health care industry.

Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. The first Malbolge program was not written by a human being, it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp.

For me the weirdest practical programming language is definitely http://en.wikipedia.org/wiki/Prolog. It's a powerful language, but even if you're fluent in iterative programming, it's a totally different way of expressing an solving a problem.

Microsoft used a small embedded prolog interpreter in the network interface configuration routines in the original Windows NT. Various workflow apps for UI screens and business processes tend to use logic languages too, and the logic of type systems in languages like Haskell and F# is basically the same as prolog (all about unifying patterns and validating assertions)

1. APL - If you type a list of random characters, including punctuation, there's a fair chance it will compile.2. Forth - Everything is in Reverse Polish Notation and programmed in fixed length frames.3. LISP - Some interesting associative programming functions intended for rule based AI (but they are slow)

All of these are pretty old and are from the days when programming languages were in their infancy. APL was even more confusing than using regular expressions, and I didn't use it for anything actually useful. Forth was better, but the Frame concept (memory was very limited in those days), was very awkward.

If I'm allowed to consider weird CPU architectures, resulting in strange assembler programming, the following are pretty weird, and as a bonus, I've actually used these professionally:

1. TMS570 HET Assembler - 96 bit instruction Risk CPU specialised for counter/timer operations, which is included with a number of Texas Instrument ARM Core based CPUs. There are no data areas, only instructions. Instructions can self modify themselves by design. Every output has a programmable delay, allowing 10nS timing. Hard to code, but capable of some amazing stuff. Well worth the effort.2. RCA 1802 - 16 general purpose registers, any of which can be the program counter and the stack pointer. This made glueing together code from different sources, which used different PC and SP conventions really challenging. Very much like the Thunks you had with early 16 bit/32 bit Intel '86 programming. I think the idea was to make ISR's really efficient, but frankly trying to work out which register was the PC and which was the SP from a code fragment, was hard. You could implement multiple SP's too for added confusion.

I would imagine the transputer would go here too, but I never got to use it.

Slightly off topic, as these are not programming languages, but formal methods.

1. Z I successfully used this to prove part of an algorithm. It was a proof by induction. Works well for small contained problems, but gets increasingly unwieldy for large ones.

I was going to say that you can pretty much type up a list all of useful languages which you haven't been exposed the the syntactic style or major paradigms to answer this question. So I'd say stuff like logical languages. All these "wankery" languages don't really fall into the category of practical to me.

FORTH: One of the most overlooked languages...it's actually really nice.

Ruby is not weird or bad. Its just totally different, like the designers of the language went out of their way to make it exactly the opposite of C. The language and platform has some powerful features, some of which should only be used by frameworks and not code. For example the ability to actually add and change methods of an INSTANCE of an object. A nice way to make your colleagues go crazy if you use that in your own code

There are two completely different reasons to learn a new language:1) Because it is (or might be) directly useful to know.2) Because it teaches you something new about programming.And it's pretty infrequent that you'll run across one that fulls both of these categories at a given time.

If I'm allowed to consider weird CPU architectures, resulting in strange assembler programming, the following are pretty weird, and as a bonus, I've actually used these professionally:...I would imagine the transputer would go here too, but I never got to use it.

I have seen, but not used, a computer which implemented SK-combinator calculus in hardware.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org