8 ms·
Esoteric Topics in Computer Programming (2002)
- no_protocol 10y agoCan someone provide examples of programming forms, practices, or languages intentionally born esoteric that eventually turned mainstream? Nothing from this page popped out to me. It seems like sometimes an idea is so odd that it gets widespread attention just due to its oddness.
- fit2rule 10y agoObject Oriented Programming? I'm only half-kidding/-serious, btw. But it seems to me that there are a lot of things that become mainstream after an initial bump of esoteria .. React? Lua? Isn't this sort of the norm for new technologies ..
- qznc 10y agoDoes Funtional Programming qualify? It is mainstream now that it is integrated into Java, C#, etc. It was considered esoteric 20 years ago. Haskell initially had the slogan "avoid success at all costs". SQL, HTML, CSS were probably esoteric at some point.
- arethuza 10y agoFunctional programming was definitely pretty esoteric when I learned about it during a CS degree in the mid 1980s! HTML was regarded as too mundane to be interesting when it first came out - a lot of people working on hypertext at the time (early 90's) regarded it as a simplistic toy.
- jakub_h 10y agoIt's still a simplistic toy, albeit a highly formalized one nowadays.
- chriswarbo 10y agoTo clarify, the Haskell quote is usually parsed as 'avoid "success at all costs"', rather than 'avoid "success" at all costs'. Part of its rising popularity is probably the infrastructure work; despite the rough edges of Cabal and friends, I struggle to imagine what it must have been like before them! Perhaps a more interesting example is the MLs, which have been around far longer than Haskell and seem to be gaining popularity for implementating and transforming other languages (that was their original purpose, after all!). Scheme's also managed to maintain a minor presence since the 70s, especially in education and as an extension/configuration language.
- yiyus 10y agoUNIX was born as what you could consider a relatively esoteric response to the more popular MULTICS project. Same with B/C and BCPL. But I think that considering C and UNIX esoteric is a bit of a stretch, taking into account that they were developed at Bell Labs and almost everything related with computers could be considered esoteric back then.
- SonOfLilit 10y agoJavascript? j/k Duff's Device comes close. It was born out of a real engineering problem, but spread as esoterica and I'm sure I'm far from the only one to learn it as esoterica and later use it in production.
- taneq 10y agoIf you're going to list Duff's Device, we should also mention Carmack's fast square root (despite it not actually being invented by Carmack). I dunno if you'd call it mainstream but for a while there it was in every wannabe game engine coder's repertoire.
- qwertyuiop924 10y agoYeah, you should really call it SGI's FastInvSqrt. It's still a pretty cool hack.
- SonOfLilit 10y agoOh, and I wrote small web apps in Camping.rb. Working with _why's code was a great pleasure, especially in those rare cases when the documentation wasn't good enough and I had to dig through the code.
- qwertyuiop924 10y agoYeah, that squares with what I've heard about _why: Great ideas, not-so-great code.
- SonOfLilit 10y agoNononononono. The documentation was great, the times where I had to read the code were rare, and they were a pleasure. His code is not always the most pragmatic or straightforward, but it is packed with beauty, and I much prefer it to digging through heaps of very readable, character-less code.
- qwertyuiop924 10y agoAh. I've heard tales of some of his code being absolutely unmaintainable. Guess I was wrong.
- SonOfLilit 10y agoThere was some unix utility (`yes`?) that was implemented on many systems as an empty shell script. I read about in in an HN comment, can't remember which.
- myst 10y agoC++
- mlvljr 10y agothis :)
- prof_hobart 10y agoThere's at least one on that list that's (at least in my experience) gone from relatively mainstream to esoteric - self-modification. Back in the day when both memory and clock cycles were very precious, it wasn't unknown to use self-modifying code as a performance optimisation trick. I did it at least once in the late 80s, when I was working on comms software that had to be as fast as possible in order to avoid missing incoming data. There was a check that needed to be done on every byte - I think it was whether I was now processing graphics characters or not - but the check was taking valuable time, and the value didn't change very often. So the most efficient way I found to do it was to wait until I got a "switch to/from graphics" byte in the input stream and then update the instruction at a given location to either be "unconditional jump to graphics routine" or a "no operation (NOP)", which passed straight through to the routine for normal characters. It was a horrible hack, but it worked. Thankfully, I've not felt the need to even consider this approach for the past 20 years.
- userbinator 10y agoThat eventually turned into JITs, and it's still a very powerful technique for tight loops on modern processors, although the pipeline means the benefit happens with more iterations than on the old non-pipelined/cacheless CPUs. It can even be done across multiple cores, as I coincidentally explained here a short while ago: https://news.ycombinator.com/item?id=12485205 https://news.ycombinator.com/item?id=12485205 I don't think SMC has ever been "relatively mainstream", at least after HLLs gained popularity over Asm. But in Asm, it still has its uses where a full JIT would be far too much overhead.
- pklausler 10y agoVery long ago, before index registers were a fancy new feature for the cool kids, one would modify the address fields of load/store instructions in order to stride through memory or traverse a list.
- jakub_h 10y ago> Thankfully, I've not felt the need to even consider this approach for the past 20 years. That's because of all the branch predictors, probably. ;)
- SonOfLilit 10y agoOh, I forgot the most prominent one as of late: Urbit, which started as a functional esoteric language with a Martian aesthetic... written by a guy famous for... other things... and... somehow hopped on the blockchain gravy train? last I heard it was... auctioning address space? for surprisingly large amounts of money?
- jbpetersen 10y agoEven within the blockchain space it's still quite esoteric. Personally I think it looks like a great opportunity for an interesting weekend.
- chc4 10y agoUrbit is probably one of my favorite things. The language is insane. The base virtual machine it runs on is insane. The entire stack rewrites everything for the sake of doing everything perfectly. It redefines whatever it wants. And somehow, it's actually usable. Hoon is a programming language that uses two-character runes instead of reserved words. It's purely functional and vaguely Lisp-like. It compiles down to a minimal combinator-based virtual machine built entirely out of cons cells and bignums, where the only operator is addition. And yet throughout all of that, it's actually possible (and scarily easy) to code in, and I'm somehow fluent in it. That kinda scares me.
- nl 10y agoR Five or so years ago it as an esoteric language for statisticians, which had been around forever (especially if you count the predecessor S language). Now the IEEE ranks it the 5th(!) most important (or something?) language[1], and it's the fastest growing language on StackOverflow[2]. That's a pretty amazing change for a language which has few redeeming factors (ha!) as a language, apart from lots of very useful libraries. [1] http://blog.revolutionanalytics.com/2016/07/r-moves-up-to-5th-place-in-ieee-language-rankings.html http://blog.revolutionanalytics.com/2016/07/r-moves-up-to-5t... [2] http://jkunst.com/r/what-do-we-ask-in-stackoverflow/ http://jkunst.com/r/what-do-we-ask-in-stackoverflow/
- zeveb 10y agoFWIW I was using R to produce Unix system-utilisation charts about 15 years ago — I never thought it was particularly esoteric.
- pmoriarty 10y agoEvery language and every practice that is now popular was once obscure.
- no_protocol 10y agoSure, but most weren't designed to be intentionally indecipherable or obtuse.
- chriswarbo 10y agoINTERCAL is famous for having a COMEFROM instruction, as an inverse of GOTO. With GOTO, we can read a section of code and if it contains "GOTO N" then we know the execution will jump to location "N", so we can look up that location and keep reading. We have no idea if any other code will jump into the code we're currently reading, unless we search for "GOTO <location we're reading>". COMEFROM is the opposite: when we're reading a section of code and we see "COMEFROM N", we know that the code at location "N" will jump to this section. We have no idea if the code we're reading will jump to somewhere else, unless we search for "COMEFROM <location we're reading>". Despite being invented as a joke, this is very popular in mainstream programming, under the name "exception handling" ;)
- kd0amg 10y agoException handling requires some piece of code to actually throw the exception though. A more thorough instantiation of the idea would be aspect-oriented programming.
- yiyus 10y agoNo love for ternary computers?
- talideon 10y agoYou're looking for Malbolge: https://esolangs.org/wiki/malbolge https://esolangs.org/wiki/malbolge
- yiyus 10y agoI was actually thinking in the Setun: https://en.wikipedia.org/wiki/Setun https://en.wikipedia.org/wiki/Setun and DSSP. But thanks for the reference, I did not know Malbolge (though it looks like it uses the set 0, 1, 2 instead of the IMO more useful -1, 0, 1).
- talideon 10y agoMalbolge (and Dis) are the classic ternary esolangs. I fiddled around with that in a long lost esolang back in the day. Keep in mind that Malbolge is meant to be awkward, so while (-1, 0, 1) might be more useful, (0, 1, 2) suit Malbolge's perverseness much better, though I doubt that was a conscious decision.
- nickpsecurity 10y agoThis is when you know you're about to experience a steep, learning curve: "language designed to be as difficult to program in as possible. The first "Hello, world!" program written in it was produced by a Lisp program using a local beam search of the space of all possible programs."
- talideon 10y agoAnd why Dis exists.
- anotheryou 10y agotempleOS should be mentioned here :) (written by a genuine bigot)
- newman8r 10y agothat guy is insane - it's a constant reminder to never get too overzealous about the value of your work. But I do have to admit, gotta love his intensity.... but he's a bigot so fuck him lol.
- talideon 10y agoTo be fair, the reason for a lot of that is his schizophrenia, so cut him a bit of slack.
- anotheryou 10y agoThis is an interesting topic in itself. As soon as you are diagnosed you are excused. I don't generally oppose that, but would want to extend it to all people. As a believer in causality and a bit of chaos, I think we are 100% product of our surrounding and in that all innocent in all behavior. In my home country (germany) this is luckily somewhat founded in the legislative system. If I'm not mistaken nobody here will get punished for the sake of revenge, but just to protect society. No matter what you do, you deserve the right to live an OK life. If you are are a danger to society its safety might however stand above your freedom of movement. It's all about prevention through detention and deterrence. I don't believe much in deterrence, but want to keep up the corrective of society and make no exception for the bad behavior of this guy. If I'd address him directly I would aim for a more diplomatic approach tough. In general I want to express that I'm very much against some of his views and found it difficult to promote his work without distancing myself from his behavior and criticizing it.
- JadeNB 10y agoI disagree, not necessarily with your premise (that we are 100% a product of our surroundings) but with the conclusion (that we are all innocent in all behaviour)—since, if we're all innocent, then the word (or at least the distinction between innocence and guilt) loses its meaning, and it seems like a meaning that I want to preserve. However, I like your vision even if I find it unrealistically utopian, and I upvoted you for the sentiment "No matter what you do, you deserve the right to live an OK life", which is curiously heartwarming.
- talideon 10y agoChris' site didn't go anywhere, it just changed URLs: http://catseye.tc/ http://catseye.tc/
- rajandatta 10y agoBeautiful and lots of fun. Thanks for sharing.
- robert_tweed 10y agoOne of my favourite examples is the blank C program that won the "Worst Abuse of the Rules" award in the 1994 Obfuscated C Code contest (last entry here): http://web.archive.org/web/20020615054101/http://www.nyx.net/~gthompso/self_c.txt http://web.archive.org/web/20020615054101/http://www.nyx.net... It's a Quine, a Palindrome and a Null Program all in one!
- exDM69 10y agoI've said it before and I'll say it again: go and learn Brainfuck. Just write a program that outputs your name or does FizzBuzz or something trivial, that's enough to get a grasp of it. Brainfuck is to Turing machines what Lisp is to Lambda calculus. Minimum viable amount of syntactic sugar (and a bit of "semantic sugar" as well, it's nicer to work in bytes than bits) to make it usable as a programming language. Lambda calculus is just a bit more practical formalism than Turing machines, that's why Lisp is genuinely useful as a programming language, unlike Brainfuck. That doesn't make learning about Turing machines any less useful as a brain teaser exercise.
- nickpsecurity 10y agoI've always thought the Turing LISP was Forth. It's a tiny, stack machine with few ops plus some LISP capabilities. Also implemented in efficient hardware.
- bogomipz 10y agoIs Turing Lisp a flavor of LISP? This is the first I've heard of it.
- nickpsecurity 10y agoTuring Machines and Lambda Calculus are equivalent in power, but opposite in style, ways of formally describing computing. Imperative programming came from one and functional programming from the other. One of simplest... conceptually and in implementation... versions of Lambda Calculus is LISP. I'm guessing you already know what it can do. In Turing/Imperative Land, I suggested Forth comes closest to being simplest of very powerful languages. There's probably implementations of all of these in all the others out there. I'm just saying Forth is a Turing-style language with LISP-like simplicity and benefits.
- bogomipz 10y agoAh OK, thanks for the clarification. That dichotomy makes perfect sense. I haven't really looked at Forth, is your comment about its "LISP-like simplicity" why is such a perennial favorite amongst language aficionados? Any recommended readings on the subject(Forth) ?
- tener 10y agoFunny how non-imperative programming languages, so for example FP, are in the "esoteric" group. Looking at the industry today it no longer seems to be true.
- JoeDaDude 10y agoI'm disappointed LOLCODE [1][2] is not on the list. [1] http://lolcode.org/ http://lolcode.org/ [2] https://en.wikipedia.org/wiki/LOLCODE https://en.wikipedia.org/wiki/LOLCODE
- JD557 10y agoOn the palindrome section: > I'd like to see one where the entire code is executed, or one done in Brainf*ck, as well. I might be wrong, but this seems a really bad example for palindromes. Aren't all palindrome strings made of `+-.,<>` valid brainfuck programs? I know that this subset is not turing-complete, but I also think that any valid brainfuck program with `[]` can't be a palindrome, which again would make this language a bad example.
- defen 10y agoMissing from this list: FRACTRAN, a turing-complete language based on fractions, invented by John Conway. https://en.wikipedia.org/wiki/FRACTRAN https://en.wikipedia.org/wiki/FRACTRAN
- jnordwick 10y agoI'm surprised no APL or its successors: K and J https://en.wikipedia.org/wiki/K_%28programming_language%29 https://en.wikipedia.org/wiki/K_%28programming_language%29 https://en.wikipedia.org/wiki/J_%28programming_language%29 https://en.wikipedia.org/wiki/J_%28programming_language%29