Sammidysam
|
 |
«
Posted
2013-03-09 17:15:45 » |
|
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
| open System
Console.WriteLine("Hello world") Console.WriteLine("I'm weird!") |
producing the output: Hello world I'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?
|
|
|
|
davedes
|
 |
«
Reply #1 - Posted
2013-03-09 18:05:37 » |
|
What is so strange about that output? 
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
princec
|
 |
«
Reply #3 - Posted
2013-03-09 19:11:42 » |
|
Missing the good old Brainf**k language there. Loved all the others though, none of which I'd heard of before. Cas 
|
|
|
|
Sammidysam
|
 |
«
Reply #4 - Posted
2013-03-09 19:25:42 » |
|
What is so strange about that output?  It's not the output, it's the lack of a main method.
|
|
|
|
matheus23
|
 |
«
Reply #5 - Posted
2013-03-09 19:29:23 » |
|
What is so strange about that output?  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: - the language you showed us
- Scheme
- Haskell
- Scala (Apps)
- Common Lisp
- much more
Just find out about more languages out there and you'll see...
|
|
|
|
pjt33
|
 |
«
Reply #6 - Posted
2013-03-09 20:18:33 » |
|
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.
|
|
|
|
|
sproingie
|
 |
«
Reply #8 - Posted
2013-03-09 21:08:41 » |
|
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.
|
|
|
|
ra4king
|
 |
«
Reply #9 - Posted
2013-03-09 21:26:17 » |
|
Brainfuck is my absolute FAVORITE language!
|
|
|
|
Games published by our own members! Check 'em out!
|
|
HeroesGraveDev
|
 |
«
Reply #10 - Posted
2013-03-09 22:19:49 » |
|
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.
|
|
|
|
Rickmeister
|
 |
«
Reply #11 - Posted
2013-03-09 23:21:10 » |
|
Of the ones I've had to deal with I would say Vim script.... Or Emacs lisp..  Of the ones I've heard about Malbolge is number one. 1 2
| ('&%: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: 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.
|
|
|
|
erikd
|
 |
«
Reply #12 - Posted
2013-03-10 00:10:08 » |
|
I think PHP is just totally weird. Why do people put up with that?
|
|
|
|
Dejay
Senior Newbie  Medals: 3
|
 |
«
Reply #13 - Posted
2013-03-10 01:31:01 » |
|
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: 1 2 3 4 5 6 7 8 9 10 11 12
| 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). |
|
|
|
|
ReBirth
|
 |
«
Reply #14 - Posted
2013-03-10 02:21:24 » |
|
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...
|
|
|
|
xsvenson
|
 |
«
Reply #15 - Posted
2013-03-10 02:36:35 » |
|
Brainf**k, shakespear and whitespace are my favorite. Whitespace is especially neat 
|
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
ReBirth
|
 |
«
Reply #16 - Posted
2013-03-10 02:48:53 » |
|
And I vote Erlang for hard to understand language.
|
|
|
|
Sammidysam
|
 |
«
Reply #17 - Posted
2013-03-10 02:49:44 » |
|
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...
If you could find that website, it would be very fun!
|
|
|
|
|
sproingie
|
 |
«
Reply #19 - Posted
2013-03-10 03:32:21 » |
|
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)
|
|
|
|
Alan_W
|
 |
«
Reply #20 - Posted
2013-03-10 03:34:45 » |
|
Weirdest ones I've actually tried in order of weirdness.
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.
There are other methods such as B.
|
Time flies like a bird. Fruit flies like a banana.
|
|
|
zngga
|
 |
«
Reply #21 - Posted
2013-03-11 03:28:27 » |
|
Whitespace... WTF 
|
My code never has bugs... it just develops unexpected features!
|
|
|
ReBirth
|
 |
«
Reply #22 - Posted
2013-03-11 03:40:13 » |
|
Whitespace... WTF  Yeah, can't find out why it's useful. Also, where the values come in?
|
|
|
|
Roquen
|
 |
«
Reply #23 - Posted
2013-03-11 06:50:03 » |
|
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. 1 2
| : ( 41 word drop ; immediate ( The previous line defines the comment word, which we can now type like this. Neat, huh? ) |
|
|
|
|
gimbal
|
 |
«
Reply #24 - Posted
2013-03-11 09:39:43 » |
|
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
|
|
|
|
Riven
|
 |
«
Reply #25 - Posted
2013-03-11 09:43:46 » |
|
Javascript pretty much allows the same: 1 2 3
| var stuff = new Stuff(); stuff.tick = function() { ... }; Stuff.prototype.tick = function() { ... }; |
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
princec
|
 |
«
Reply #26 - Posted
2013-03-11 11:20:45 » |
|
Ruby is just an awful abomination. I seem to recall even the original creator of Ruby didn't take it seriously. Cas 
|
|
|
|
ReBirth
|
 |
«
Reply #27 - Posted
2013-03-11 11:36:24 » |
|
I tried to learn Ruby (at least passing codeschool's course) but couldn't find it useful. I am watching this thread, because I am searching for my 2nd language so I can become a fully edged CS operator  Ruby and JS seems kinda out for me.
|
|
|
|
Roquen
|
 |
«
Reply #28 - Posted
2013-03-11 12:44:02 » |
|
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.
|
|
|
|
pjt33
|
 |
«
Reply #29 - Posted
2013-03-11 13:35:12 » |
|
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.
|
|
|
|
|