``` 神秘语言挑战程序员跳出固有思维模式 ```
Forty-Four Esolangs: The Art of Esoteric Code

原始链接: https://spectrum.ieee.org/esoteric-programming-languages-daniel-temkin

## 隐秘编程语言的世界 丹尼尔·坦金即将出版的书籍《四十四种隐秘语言:深奥代码的艺术》,探索了引人入胜且常常古怪的隐秘编程语言世界——这些语言被设计用于创意表达,而非实际应用。这些语言的范围从使用乐谱到使用照片作为代码,甚至包括有意设计成像人类语言一样模棱两可的语言。 坦金自己的语言Valence,故意模仿自然语言的模糊性,可能从单个代码片段中产生多种程序解释。他认为这些语言为人工智能生成代码日益自动化的“完美解决方案”提供了一个反面观点,并提供了一种重新审视我们对机器的控制的方式。另一个例子,Olympus,需要“恳求”希腊神祇来构建代码,突出了程序员与计算机之间复杂的关系。 隐秘语言可以追溯到计算机早期,例如INTERCAL等语言,一直以来都是程序员的试验场和技术艺术的庆祝。它们依赖于社区,邀请其他人探索和扩展其可能性,通常利用易于访问的平台,如JavaScript,以最大限度地提高可共享性。最终,这些语言并非关于效率,而是关于质疑代码和创造力本身的本质。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 异想天开的编程语言挑战程序员跳出固有思维 (ieee.org) 8 分,eso_eso 1小时前 | 隐藏 | 过去 | 收藏 | 1 条评论 xeonmc 13分钟前 [–] 相关: “与异想天开编程语言学者访谈” https://www.youtube.com/watch?v=ieqsL5NkS6I 回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请YC | 联系 搜索:
相关文章

原文

Have you ever tried programming with a language that uses musical notation? What about a language that never runs programs the same way? What about a language where you write code with photographs?

All exist, among many others, in the world of esoteric programming languages, and Daniel Temkin has written a forthcoming book covering 44 of them, some of which exist and are usable to some interpretation of the word “usable.” The book, Forty-Four Esolangs: The Art of Esoteric Code, is out on 23 September, published by MIT Press.

I was introduced to Temkin’s work at the yearly Free and Open source Software Developer’s European Meeting (FOSDEM) event in Brussels in February. FOSDEM is typically full of strange and wonderful talks, where the open-source world gets to show its more unusual side. In Temkin’s talk, which I later described to a friend as “the most FOSDEM talk of 2025,” he demonstrated Valence, a programming language that uses eight ancient Greek measuring and numeric symbols.

Temkin’s intention with Valence was to emulate the same ambiguity that human language has. This is the complete opposite of most programming languages, where syntax typically tries to be explicit and unambiguous. “Just as you could create an English sentence like, ‘Bob saw the group with the telescope,’ and you can’t quite be sure of whether it’s Bob who has the telescope and he’s seeing the group through it, or if it’s the group that has the telescope,” he says. “What if we wrote code that way so you could write something, and now you have two potential programs? One where Bob has a telescope and one where the group has a telescope.”

How Esoteric Languages Spark Creativity

Creating a language or an interpreter has often been the proving ground of many engineers and programmers, and esoteric languages are almost as old as nonesoteric ones. Temkin says his current effort has a lot to do with AI-generated code that seeks to do nothing but provide seemingly straight solutions to problems, removing any sense of creativity. Esoteric languages inherently make little sense and frequently serve little purpose, making them conceptually completely counter to AI-generated code and thus often not even understood by them—almost the code equivalent of wearing clothing to confuse facial recognition software.

While the syntax of esoteric languages may be hard to understand, the actual programming stack is often wonderfully simple. Temkin believes that part of the appeal is also to explore the complexity of modern programming. “I come back a lot to an essay by Joseph Weizenbaum, the creator of the Eliza chatbot, about compulsiveness and code,” he says. “He described ‘the computer bomb,’ the person who writes code and becomes obsessed with getting everything perfect, but it doesn’t work the way they want. The computer is under their control. It’s doing what they’re telling it to do, but it’s not doing what they actually want it to do.”

“So they make it more complicated, and then it works the way they want,” Temkin adds. “This is the classic bind in programming. We command the machine when we’re writing code, but how much control do we really have over what happens? I think that we’re now all used to the idea that much of what’s out there in terms of code is broken in some way.”

Temkin explored the idea of control in his language Olympus, where the interpreter consists of a series of Greek gods, each of which will do specific things, but only if asked the right way.

A computer window that reads: Father Zeus, defender of cities, defender of homes, defender of the traveler and of those far from home, please create a loop counting from 99 to 1 called beer loop. Temkin’s Olympus language includes an interpreter consisting of Greek gods, which must be asked to do things in the proper way.Daniel Temkin

“One example regarding complicating our relationship with the machine and how much we’re in control is my language, Olympus, where code is written to please different Greek gods,” says Temkin. “The basic idea of the language is that you write in pseudo-natural language style, asking various Greek gods to construct code the way that you want it to be. It’s almost as if there’s a layer behind the code, which is the actual code.

“You’re not actually writing the code,” Temkin adds. “You’re writing pleas to create that code, and you have to ask nicely. For example, if you call Zeus father of the gods, you can’t call him that again immediately because he doesn’t think you’re trying very hard.”

“And then of course, to end a block of code, you have to call on Hades to collect the souls of all the unused variables. And so on,” Temkin says.

The History of Esoteric Programming Languages

Temkin continues a long-running tradition: esoteric languages date back to the early days of computing, with examples such as INTERCAL (1972), which had cryptic syntax, meaning coders often needed to plead with the compiler to run it. The scene gained momentum in 1993, with Wouter van Oortmerssen’s FALSE, in which most syntax maps to a single character. Despite this, FALSE is a Turing-complete language that allows creating programs as complex as any contemporary programming language. Its syntactical restrictions meant the compiler (which translates the syntax to machine-readable instructions) is only 1 kilobyte, compared to C++ compilers, which were generally hundreds of kilobytes.

Exploring further, Chris Pressey wondered why code always had to be written from left to right and created Befunge in 1993. “It took the idea of the single-character commands and said if you’re going to have commands that are only one letter, why do we need to read it left to right?” says Temkin. “Why can’t we have code move a little bit to the right, then turn up, and then go off the page and come up off the bottom and so on?“ So Pressey decided to create a language that would be the most difficult language to build a compiler for,” Temkin continues. “I believe that was the original idea, allowing the code to turn in different directions and flow across the space.”

Much of the mid-90s trend coincided with the rise of shareware, the demo scene, and the nascent days of the Internet, when it was necessary to program everything to be as small as possible to share it. “There’s definitely a lot of crossover between these things because they involve this kind of artistry, but also a kind of technical wizardry in showing, ‘Look how much I can do with this really minimal program,’ ” Temkin says.

“What really interested me in esoteric languages specifically is the way that it’s community-based,” Temkin says. “If you make a language, it’s an invitation for other people to use the language. And when you make a language and somebody else shows you what’s possible to do with your language or discovers something new about it that you couldn’t have foreseen on your own.”

Columns and rows of white cuniform text over a black background. One of Temkin’s esoteric languages uses a cuneiform script.Daniel Temkin

You can play with many of Temkin’s languages on his website, as well as the Esoteric Languages Wiki, which raises the question: In the modern connected age, how does one create a shareable esoteric language?

“It’s something that I’ve changed my attitude about over the years,” says Temkin. “Early on, I thought I had to write a serious compiler for my language. But now I think what’s really important is that people across different platforms and spaces can use it. So in general, I try to write everything in JavaScript when I can and have it run in the browser. If I don’t, then I tend to stick with Python as it has the largest user base. But I do get a little bored with those two languages.”

“I realize there’s a certain irony there,” Temkin adds.

From Your Site Articles

Related Articles Around the Web

联系我们 contact @ memedata.com