Weirdest Practical Programming Language

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:


open System

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

producing the output:

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?

What is so strange about that output? ???

There are lots of weird ones, I’m not sure how practical they are though :slight_smile:

Mike

Missing the good old Brainfuck language there. Loved all the others though, none of which I’d heard of before.

Cas :slight_smile:

It’s not the output, it’s the lack of a main method.

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?’

Here some languages having such a feature:
[x] the language you showed us
[x] Scheme
[x] Haskell
[x] Scala (Apps)
[x] Common Lisp
[x] much more

Just find out about more languages out there and you’ll see…

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.

Top ten? Is that the most you can find?
Eat this. :slight_smile:

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.

Brainfuck is my absolute FAVORITE language!

Oh, and any language that uses “easy-to-learn becuase of small syntax” as one of it’s main selling points is also weird stupid. (cough Python cough)

If you can’t manage the syntax, then you shouldn’t be programming.

EDIT: I don’t have anything against Python. I just think they should’ve considered their priorities: Easy-to-learn vs Easy-to-understand.

Of the ones I’ve had to deal with I would say Vim script… Or Emacs lisp… :slight_smile:

Of the ones I’ve heard about Malbolge is number one.


 ('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#"
 `CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>

Should print out “Hello World!”.

Quoted from wikipedia:

[quote]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.
[/quote]

I think PHP is just totally weird. Why do people put up with that?

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.

For example, this supposedly solves the Towers of Hanoi problem:


move(1,X,Y,_) :-  
    write('Move top disk from '), 
    write(X), 
    write(' to '), 
    write(Y), 
    nl. 
move(N,X,Y,Z) :- 
    N>1, 
    M is N-1, 
    move(M,X,Z,Y), 
    move(1,X,Y,_), 
    move(M,Z,Y,X).  

Prolog is not intended fro general purpose language but mostly for AI, especially when involving usage of natural language.

Yeah PHP is weird. JS and Ruby too.

There is a site where you guess what language from a code snippet, forget the link…

Brainfuck, shakespear and whitespace are my favorite.

Whitespace is especially neat :slight_smile:

And I vote Erlang for hard to understand language.

If you could find that website, it would be very fun!

It has complete enough programming reference, have fun :slight_smile:

http://wtpl.heroku.com/

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)