编程术语晦涩_晦涩的编程语言的乐趣

编程术语晦涩

As a linguistics major, I’ve always loved testing the boundaries of language design, especially fascinated by constructed languages, or “conlangs.” Consciously devised languages, conlangs may be created with the intent to solve a linguistic problem in a unique way, like Esperanto, the self-proclaimed universal second language for world peace, or they may be created as an addition to a fictional environment, like Klingon, the Star Trek creation which boasts around twenty fluent speakers to date.

作为语言学专业的学生,​​我一直很喜欢测试语言设计的边界,尤其是对构造语言(“ conlangs”)着迷的人。 精心设计的语言可能是为了以独特的方式解决语言问题而创建的,例如世界语,它是自称为世界和平的通用第二语言,也可能是虚构环境的补充,例如克林贡语。 ,是《星际迷航》的创作者,迄今为止已有大约20名流利的演讲者。

Programming languages, on the other hand, are all consciously devised; However, there is certainly a division between practical, widely-used languages, like Java and Python, and esoteric languages, or the computer programmer’s equivalent of a conlang. These obscure systems are rarely created with the purpose of wide-scale use, and are better known for pushing the limits of programming, proving computer science concepts, and most commonly — for jokes.

程序设计语言,在另一方面,自觉地设计; 但是,在广泛使用的实用语言(例如Java和Python)与深奥的语言(或等效于conlang的计算机程序员)之间肯定存在区分。 这些晦涩的系统很少以大规模使用为目的而创建,而以打破编程的局限性,证明计算机科学概念而闻名,而最普遍的笑话是。

If you’ve had enough of your standard “System.out.println” statements to last a lifetime, take a look at these impractical, yet interesting, alternatives:

如果您有足够的标准“ System.out.println”语句可以使用一生,请查看以下不切实际但有趣的替代方法:

  1. chicken

Tired of memorizing the syntax whenever you start a new language? Chicken consists of two tokens: “chicken” and “\n” (the newline character). Invented by Torbjörn Söderstedt, the number of space-separated “chickens” per line corresponds to an opcode, a specification to the machine of the operation to be performed. The Swedish programmer was inspired to create this language after hearing software engineer Doug Zongker’s parody of scientific papers (unsurprisingly, a presentation that consisted only of the word “chicken”).

厌倦了在每次开始使用新语言时都会记住语法吗? Chicken由两个标记组成:“ chicken”和“ \ n”(换行符)。 由TorbjörnSöderstedt发明,每行用空格分隔的“小鸡”的数量与操作码相对应,该操作码是要执行的操作的机器规范。 在听到软件工程师道格·宗格(Doug Zongker)模仿科学论文(毫无疑问,仅包含“鸡”一词的演示文稿)之后,瑞典程序员被启发创建这种语言。

A partial Hello World program written in chicken:

用鸡肉编写的部分Hello World程序:

2. chef

2.厨师

If you’d rather opt for a high-level language with easy readability, one might direct you to Python, but I would suggest “chef” instead. Invented by David Morgan-Mar, chef reads like a recipe, and not a program. According to the chef homepage, the language is bound by design principles such as, “program recipes should not only generate valid output, but be easy to prepare and delicious.” Valid commands include, “Take ingredient from refrigerator,” which translates to, “read a numeric value from STDIN into the ingredient named, overwriting any previous value.”

如果您希望选择一种易于阅读的高级语言,则可以将您引向Python,但我建议您使用“ chef”。 厨师是大卫·摩根·马(David Morgan-Mar)发明的,读起来就像是食谱,而不是程序。 根据厨师的主页,该语言受设计原则的约束,例如“程序食谱不仅应产生有效的输出,而且应易于准备和美味”。 有效的命令包括“从冰箱中取出配料”,它转换为“从STDIN读取数值到指定的配料中,覆盖以前的任何值”。

Hello World program written in chef:

主厨编写的Hello World程序:

Image for post

3. legit

3.合法

A hello world program written in legit looks like the following:

合法编写的hello world程序如下所示:

Image for post

An empty file. So, if you’re a programmer who despises coding, this may be the language for you! However, if you look at the version control, you’ll find where all the inner workings reside, due to the fact that legit is defined entirely by the graph of commits in a Git repository. The creator, Sebastian Morr, was inspired to create his own esoteric language after giving a talk on the matter at his university. Additionally, due to the nature of git commands, all programs need to be written backwards, without making any errors in order to run.

一个空文件。 因此,如果您是一个讨厌编码的程序员,那么这可能是适合您的语言! 但是,如果您查看版本控制,则会发现所有内部工作所在的位置,因为合法性完全由Git存储库中的提交图定义。 创作者塞巴斯蒂安·莫尔(Sebastian Morr)在大学演讲后受到启发,创造了自己的深奥语言。 另外,由于git命令的性质,所有程序都需要向后编写,而不会出现任何错误才能运行。

4. Piet

4. Piet

For anyone whose eyes glaze over after staring at lines of seemingly identical code for hours, Piet is a visually pleasing alternative. Also invented by David Morgan-Mar, and named for abstract artist Piet Mondrian, this language uses combinations of twenty distinct colors laid out in a bit map, guided by the principle, “program code will be in the form of abstract art.” To operate, a pointer is used to move from region to region, along with a single stack for data storage.

对于任何人看了几个小时看似相同的代码行之后,眼睛都呆呆了的人,Piet是一个视觉上令人愉悦的选择。 该语言也是由大卫·摩根·马(David Morgan-Mar)发明的,并以抽象艺术家彼得·蒙德里安(Piet Mondrian)命名,该语言使用在位图中布置的二十种不同颜色的组合,并遵循以下原则:“程序代码将采用抽象艺术的形式。” 为了进行操作,将指针与单个堆栈一起用于数据存储,从而在一个区域之间移动。

Hello World program written in Piet:

用Piet编写的Hello World程序:

Image for post

Esolangs have little practical use, yet there is an active internet community surrounding them, creating, testing, and debating the Turing-completeness of each language. Although they may not be used anytime soon to build the next Facebook or to program your GPS, esoteric languages make us think outside the box as to what we consider the standards of programming and computer science, a field that is constantly evolving and may look entirely different in a few years. One day, you might find the source code of your web browser homepage to read something along the lines of, “chicken chicken chicken chicken chicken.”

Esolangs几乎没有实际用途,但是周围有活跃的互联网社区,他们在创建,测试和辩论每种语言的图灵完备性。 尽管可能不会很快使用它们来构建下一个Facebook或对GPS进行编程,但深奥的语言使我们可以对我们考虑的编程和计算机科学标准进行开箱即用的思考,这个领域正在不断发展并且可能看起来完全几年后有所不同。 有一天,您可能会在网络浏览器主页上找到源代码,以类似于“鸡鸡鸡鸡鸡”的意思阅读内容。

Caitlin is a sophomore at Rutgers University double-majoring in Computer Science and Linguistics, with a minor in Cognitive Science. When she’s not debugging code or pondering the pragmatics of the English language, she enjoys writing and playing guitar and bass.

Caitlin是罗格斯大学的大二学生,主修计算机科学和语言学,主修认知科学。 当她不调试代码或不考虑英语的实用性时,她喜欢写作和弹吉他和贝斯。

翻译自: https://medium.com/rutgers-wics/fun-with-obscure-programming-languages-a436da334ed6

编程术语晦涩

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值