Re:Ask HN: Most difficult programming language?
by Someone on Thursday September 12, 2013 @11:27AM
(#6374629)
That depends a bit on how one measures difficulty. Brainfuck is hard to read only because its operators are so limited, and is not that hard to write; for a Turing machine, it is fairly powerful, and it has [ and ] to jump around.
Intercal, IMO, is more difficult, but it would not be that hard to improve on it. For example, one could bring back the joy of delay line memory (http://en.wikipedia.org/wiki/Delay_line_memory) by having some metric for the complexity of a statement, and having the computer skip some statements depending on that complexity. Ideally (for the goal of complicating the language), the complexity of a statement would depend on the runtime values of variables. For example, 'A = B * C' is easy when C=10, a bit harder when it is 11, and harder still when C=13, unless, of course, B equals zero or one. Similarly, 'IF A > 7' is easy when A is <= 3 or >= 20, but hard for intermediate values. Of course, a true language would not use such simple notions of complexity. The complexity of 'A = B * C' should also depend on the number of binary carries (better yet, use a mixed-base number system), and, of course, the delay of 'OUTPUT X' depends not only on the length of X, but also on the question whether this flushes the output buffer.
And, of course, the only way of control flow should be something like Cobol's ALTER, all statements should be executed probabilistically, and the language should be a funge in some weird topology (while at it, change the topology when certain conditions apply (number of statements executed modulo 34567 equals 325, number of 1 bits in variable memory is a prime, it's Monday morning, but not a full moon, etc)
Re:Ask HN: Most difficult programming language?
by yoklov on Thursday September 12, 2013 @11:58AM
(#6374852)
Writing a reasonable program in Brainfuck isn't that hard. Malborge, on the other hand, was specifically designed to be impossible to write useful programs in. IIRC, Brainfuck was designed to be easy to write a compiler for.
From the wikipedia article linked above: "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"... "A correct 99 Bottles of Beer program, which deals with non-trivial loops and conditions, was not announced for seven years".
Re:Ask HN: Most difficult programming language?
by redxblood on Thursday September 12, 2013 @10:48AM
(#6374393)
Well, i was thinking more of a "difficulty in learning" kind.
And yes, every programming language count. The point is to see which one would take the longest for someone to feel comfortable with.
Re:Ask HN: Most difficult programming language?
by nithinbekal on Thursday September 12, 2013 @10:45AM
(#6374365)
I recently read about BANCstar, and it seems like a good contender. 0-9, comma, minus sign and return are the only legal characters in it, and despite that, it's actually used in serious applications.
Re:Ask HN: Most difficult programming language?
by ksherlock on Thursday September 12, 2013 @12:25PM
(#6375082)
BANCStar is a VM. You could program the JVM or .net CIL or any real machine using only octal (0-7 and white space only!) and it would be just as bad. Most people have enough sense not to do that, though.
Re:Ask HN: Most difficult programming language?
by bulte-rs on Thursday September 12, 2013 @01:13PM
(#6375400)
<insert random language> when used in a badly designed project, maintained by 10+ dev's in 15+ different styles using 20+ different external dependencies written in 25 days.
Re:Ask HN: Most difficult programming language?
by Q4273j3b on Thursday September 12, 2013 @11:08PM
(#6378339)
I mean, how "extremely difficult" are we talking? So long as it isn't esoteric, it can't be so difficult... otherwise no one would learn it, and it would become by definition esoteric...
I guess "real hard but still non-esoteric" could include
* Functional ones like OCaml or Haskell (so I hear... "What are these monads you speak of?")
* Super legit ones like C/C++ for systems programming
* Rare and majestic ones like Lisp
* Ones that require outside math knowledge like Julia or Fortran
* Really new ones that don't have many packages / docs / community members yet
"Hello World" in Malbolge:
[1]: http://en.wikipedia.org/wiki/Malbolge"Hello World" in Brainfuck:
Intercal, IMO, is more difficult, but it would not be that hard to improve on it. For example, one could bring back the joy of delay line memory (http://en.wikipedia.org/wiki/Delay_line_memory) by having some metric for the complexity of a statement, and having the computer skip some statements depending on that complexity. Ideally (for the goal of complicating the language), the complexity of a statement would depend on the runtime values of variables. For example, 'A = B * C' is easy when C=10, a bit harder when it is 11, and harder still when C=13, unless, of course, B equals zero or one. Similarly, 'IF A > 7' is easy when A is <= 3 or >= 20, but hard for intermediate values. Of course, a true language would not use such simple notions of complexity. The complexity of 'A = B * C' should also depend on the number of binary carries (better yet, use a mixed-base number system), and, of course, the delay of 'OUTPUT X' depends not only on the length of X, but also on the question whether this flushes the output buffer.
And, of course, the only way of control flow should be something like Cobol's ALTER, all statements should be executed probabilistically, and the language should be a funge in some weird topology (while at it, change the topology when certain conditions apply (number of statements executed modulo 34567 equals 325, number of 1 bits in variable memory is a prime, it's Monday morning, but not a full moon, etc)
From the wikipedia article linked above: "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"... "A correct 99 Bottles of Beer program, which deals with non-trivial loops and conditions, was not announced for seven years".
http://en.wikipedia.org/wiki/BANCStar_programming_language
Here's an article about it:
https://github.com/jloughry/BANCStar
http://en.wikipedia.org/wiki/Whitespace_(programming_languag...
Here are some cool answers:
http://stackoverflow.com/questions/18330/what-is-the-hardest...
http://www.tuxradar.com/content/programming-languages-melt-y...
Seriously: I'd go for befunge or malebolge.
I would much rather program in assembler, such as Sigma-7.
But difficulty is kind of a vector, really.
I guess "real hard but still non-esoteric" could include * Functional ones like OCaml or Haskell (so I hear... "What are these monads you speak of?") * Super legit ones like C/C++ for systems programming * Rare and majestic ones like Lisp * Ones that require outside math knowledge like Julia or Fortran * Really new ones that don't have many packages / docs / community members yet