Skip to content(if available)orjump to list(if available)

Forty-Four Esolangs: The Art of Esoteric Code

alabhyajindal

> I try to write everything in JavaScript when I can and have it run in the browser.

Question for the author if they are here: why not use one of the many languages that compile to Wasm to write compilers for esoteric languages?

gcanyon

I don't know the list of languages included in the book, but anyone interested should try out:

   - J: https://www.jsoftware.com/#/ you'll learn arbitrary dimension arrays, verb composition and more
   - Lisp: I don't know the right Lisp to recommend. Macros stand out as something to learn
   - Forth: I don't know the right Forth to recommend. The stack is an interesting metaphor
   - A constraint-based language: maybe https://www.minizinc.org constraints are super interesting
Those are all practical languages -- none is esoteric just for the sake of strangeness.

There are more of course.

userbinator

I don't think those languages would be "esoteric" in the meaning of the article (purposefully designed to be different for the sake of being different) but they are more like domain-specific languages designed to fit certain use-cases extremely well, and in doing so, depart from the traditional imperative model.

jacquesm

The right Forth is the one you write.

Nevermark

In your Forth.

olmo23

Racket is the canonical LISP (well, Scheme) to recommend to new users.

https://racket-lang.org/

tmtvl

Yeah, as much as I love Common Lisp and prefer it to Scheme (despite learning Scheme first), the fact you can read the entirety of R7RS small in a single afternoon is, in my opinion, quite important in making the language approachable to beginners.

7thaccount

Good choices. Add APL, Prolog, and Rebol.

lordhumphrey

Hmmm. GP listed three languages which are not esoteric, and you've patted them on the back and shared three more which are not esoteric. Oops.

Esoteric language =/= any non-mainstream language.

Here's the definition from the esoteric programming language wiki, which is a lovely resource for anyone interested https://esolangs.org/wiki/Esoteric_programming_language:

> An esoteric programming language is a computer programming language designed to experiment with weird ideas, to be hard to program in, or as a joke, rather than for practical use.

UltraSane

I would add an SMT solver like Z3. It can solve problems when they are translated into first order logic.

jacquesm

Ook!

I love esoteric languages. They're a never ending rabbit hole, and they really force you to revisit all of your assumptions about what it means to program. The most interesting ones for me were the Lambda calculus and Brainfuck.

And of course there is Forth. Which always felt like it was just around the corner from some kind of breakthrough but it never really happened.

Collaborative software projects and all of the modern tooling feel like massive (and endless) layers of abstraction on top of some pretty simple principles. Esoteric programming languages allow you to revisit programming without all of that super structure and for that alone they are valuable, they are pretty pure in that sense.

Y_Y

There's more than one good way to define "esoteric" but it gave me cognitive whiplash to hear the term used about lambda calculus.

I can understand that perspective, there are plenty of purpose-built esolangs which are very close to the OG lambda calculus, and depending on your background the whole thing might seem bizarre and unfamiliar and ancient and irrelevant.

At least logically I see that could happen, but my heart disagrees. I see lambda calculus as a root of the conjoined tree[0] which supports all of modern programming. It feels to me like calling written English esoteric because some people get by without reading and writing!

(I'm certainyl not saying you're wrong, but just that it's fascinating how different two valid perspectives can be.)

[0] https://en.wikipedia.org/wiki/Inosculation

jacquesm

I'm talking about it not in the sense as the root of other programming languages but as a programming language in its own right.

If there is anything that helped me 'see the light' then it was this: that I could build anything with a core that small.

Someone

> And of course there is Forth. Which always felt like it was just around the corner from some kind of breakthrough but it never really happened.

Forth, (I think even more so than lisp), is fragmented, because its philosophy is not that you write “a forth program”, but that you write “a forth” that does what you need it to do. Don’t like the sign MOD chose to compute ‘-3124 modulo -17’? Don’t add a new one, but change yours. Need better approximations for integer goniometric functions? Change them to work in half-degrees, etc.

That makes sharing code difficult and that, in turn, makes it hard to write large programs.

Nowadays, I guess a ‘solution’ to that problem would be to run zillions of forths as microservices in a single process, but I don’t think that’s practical (could be fun, though. In the limit, one could give each forth a VM page of RAM or maybe even less to work in. Imagine a forth whose sole goal is to maintain and edit a string, with words for string indexing, search, replace, duplication, etc. that runs together with millions of other forths in a single process.

lordhumphrey

Your musings at the end reminded me vaguely of https://www.greenarraychips.com/ a Chuck Moore designed computer chip.

"With 144 independent computers, it enables parallel or pipelined programming on an unprecedented scale. Map a data flow diagram or an analog block diagram onto its array of computers for continuous processes without interrupts or context switching."

jacquesm

Interesting view. The way I approached Forth was to create a DSL that made it easier to write the application in.

The biggest issues that I had with Forth were: hard to work on code as a team, the 'screens', finding it increasingly hard to name words.

lordhumphrey

Forth isn't an esoteric programming language. The word “esoteric” has a specific meaning in this context.

jacquesm

What do you mean? It has a tiny compiler and is quite difficult to understand, are there are any other qualities required for inclusion or is there some secret that I'm not aware of?

cc_ashby

Forth is unbelievably underrated and I think its value is locked in poor DX.

lordhumphrey

Malbolge and then https://github.com/iczelia/malbolge-lisp were mindblowing to me.

And then there's the legendary https://github.com/hundredrabbits/Orca

"Orca is an esoteric programming language designed to quickly create procedural sequencers, in which every letter of the alphabet is an operation, where lowercase letters operate on bang, uppercase letters operate each frame."

null

[deleted]

xeonmc

Related: “Interview with Esoteric Language Academic”

https://www.youtube.com/watch?v=ieqsL5NkS6I

azhenley

I once designed an esolang for my CS students to have fun with during the last week of the semester. A few of them used it in really, really creative ways and also went on to make their own languages for fun.

The one I created for class supports supports concurrency, regular expressions, HTTP requests, and file I/O. The challenging part is that every line executes concurrently in round-robin style (one command per line). There are only 8 commands and each line can only store a single string value.

https://austinhenley.com/blog/hofstadter.html

andoando

My favorite of the esoteric languages has to be Piet https://esolangs.org/wiki/Piet

typpilol

That's definitely one of my favorites.

I also like this one just for the insanity lol

https://esolangs.org/wiki/5D_5D_Brainfuck_With_Multiverse_Ti...

Quick description:

Like 5D Brainfuck With Multiverse Time Travel, 5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel operates on an array of 5D Brainfuck With Multiverse Time Travel program cells initialized to the 5D 5D Brainfuck With Multiverse Time Travel With Multiverse Time Travel program's source code (treated as a 5D Brainfuck With Multiverse Time Travel program). Multiple pointers to memory, and to the program, may coexist in each timeline. The state of the tape is stored as a timeline, allowing programs to rewind time. In addition, programs may create and traverse parallel universes, which are timelines that all execute simultaneously, "below" their parent timeline. Each timeline has its own pointer.

quuxplusone

The wiki page for "5D Brainfuck with Multiverse Time Travel" claims that `(-^.[.]),[,]` is "cat, but faster." But it seems to me that the `.` would never print anything, because the lower universe contains no memory pointers at that point — the only one traveled to the upper universe as a result of the preceding `^` instruction (so now the upper universe contains two memory pointers). Am I missing something or does that example not really work as advertised?

typpilol

I have no idea. Never tried it. I just love the description to send to people lol

hcs

The author's Olympus language is amusing, programs are expressed as prayers to ancient Greek gods. https://danieltemkin.com/Esolangs/Olympus/

It reminded me of an overambitious educational game idea: The player builds interpreters for prayers directed at several gods, each cult having its own theurgic practices resembling different programming paradigms: https://gashlin.net/blog/pages/2010-12-25-shell-script-of-th...

voidUpdate

I was interested by the Olympus language when I saw it in TFA, but I'm a little sad that the authors website doesn't have even a basic spec. I still cant tell if the epithets are syntactic, or you just need some amount of them, like PLEASE in intercal

rramadass

For an introduction to different languages (both from Industry and Academia) from different programming paradigms (i.e. Imperative/OO/Functional/Dataflow/Concurrent/Declarative/Logic/Aggregate) see Raphael Finkel's Advanced Programming Language Design.

behnamoh

IMO there's no such thing as esoteric languages; it's just that some ideas catch on and some don't (or take longer). If C ideas had not caught on, today we'd all it an "esoteric" language.

azhenley

Esolangs are not designed to catch on. They’re designed to be extremely difficult to use in creative ways.

zdragnar

This is missing the point entirely. Esoteric languages are those designed to intentionally be novel in some manner, and frequently allow impractical design choices to support the art, joke or boundary-pushing novelty. They're not intended to be used for day to day professional work.

Consider for example the Olympus language highlighted in the article. It is impractically verbose but is all the more amusing for it.

Other examples include languages made entirely from whitespace, one that I can't remember the name of that is designed to read like poetry in either German or English, and LOLCODE which is to be written in the style of lol cats memes.

tomsmeding

Not sure if this is the one you meant, but https://esolangs.org/wiki/Shakespeare is relevant.