当前位置:网站首页>世界上最难的5种编程语言
世界上最难的5种编程语言
2022-07-05 16:50:00 【小灰】
当我们谈论 c,c++ ,Java,Python的时候,有些语言不仅很难,而且对于大多数软件开发者来说几乎是无法理解的。
这些语言被称为深奥的编程语言,英文称为esoteric programming language,简称esolang。
下面是五种最难理解的语言,我试着用这些语言编写程序Hello World,貌似非常有趣的样子。
Malbolge
Malbolge 是 Ben Olmstead 在1998年发明的,这种 esolang 被认为是最复杂的编程语言。
据说,Malbolge 编程语言的作者从来没有用这种语言编写过任何代码,而且Malbolge的 hello world 代码出现在 Olmstead 发明这门语言两年之后。
这是Malbolge 打印“ Hello World! ”的代码片段。
(=<`#9]~6ZY32Vx/4Rs+0No-&Jk)"Fh}|Bcy?`=*z]Kw%oG4UUS0/@-ejc(:'8dc
输出结果如下:
INTERCAL
INTERCAL是“Compiler Language With No Pronounceable Acronym”的缩写,Jim Lyon和Don Woods在1972年发明了INTERCAL,讽刺了当时各种编程语言的很多方面,以及在20世纪60年代拟定的语言结构和注译。
INTERCAL有很多看起来令人无语的设计。
例如: 它使用诸如“ PLEASE”之类的修饰语,如果代码中不经常使用“ PLEASE” ,编译代码就会报错。它认为这个项目不够礼貌,如果修饰语“ PLEASE”过多,编译器也会报错,他认为你“过分礼貌”... ...
下面是 INTERCAL 中打印“ Hello,World! ”的代码片段。
DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP
输出结果如下:
Brainfuck
Brainfuck是由 Urban Muller 于1993年开发的,这种语言就是程序员无聊发明的。中文翻译:真他妈的... ...,谷歌给我提供了一个新思路,叫做脑干... ...
整个语言只包含8个不同的字符,用于实现任何代码,由 Muller 开发的原始编译器只使用了296个字节。
这种语言,是一种按照“Turing complete(图灵完备)”思想设计的语言,它的主要设计思路是:用最小的概念实现一种“简单”的语言。
这是Brainfuck 打印“ Hello World! ”的代码片段。
++++++++++[>+++++++>++++++++++>+++<<<-]>++.>+.+++++++
..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.
输出结果如下:
另外对于这个语言,知乎上还有一个很有意思的视频,可以搜索看看。
COW
Cow是由 Sean Heber在2003年发明的,一旦你看到 hello world 代码,你就会明白为什么这种语言被命名为COW。
Cow在难度水平上与 Brainfuck 相似,与 Brainfuck 相比,它又多了4条命令,也就是说,整个语言中有12条命令。
下面是用 COW 打印“ Hello,World! ”的代码片段。
MoO MoO MoO MoO MoO MoO MoO MoO MOO moO MoO MoO MoO MoO MoO moO MoO MoO MoO MoO moO MoO MoO MoO MoO moO MoO MoO MoO MoO MoO MoO MoO
MoO MoO moO MoO MoO MoO MoO mOo mOo mOo mOo mOo MOo moo moO moO moO moO Moo moO MOO mOo MoO moO MOo moo mOo MOo MOo MOo Moo MoO MoO
MoO MoO MoO MoO MoO Moo Moo MoO MoO MoO Moo MMM mOo mOo mOo MoO MoO MoO MoO Moo moO Moo MOO moO moO MOo mOo mOo MOo moo moO moO MoO
MoO MoO MoO MoO MoO MoO MoO Moo MMM MMM Moo MoO MoO MoO Moo MMM MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo Moo mOo MoO Moo
输出结果如下:
Whitespace
Whitespace是由Chris Morris 和 Edwin Brady 在杜伦大学开发的,而且是在2003年的愚人节发布的。
大部分的现代程式设计语言都不将空白字符视为语法的一部分,但Whitespace却只把空白格、制表符和换行符作为语法的一部分,Whitespace的解释器忽略所有非空白字符,并将其视为代码注释。
下面是用空格打印“ Hello World! ”的代码片段。在下面的代码中,每个空格、制表符或换行符前面分别加上注释“ s”、“ t”或“ l”。
S S S T S S T S S S L
T L
S S S S S T T S S T S T L
T L
S S S S S T T S T T S S L
T L
S S S S S T T S T T S S L
T L
S S S S S T T S T T T T L
T L
S S S S S T S T T S S L
T L
S S S S S T S S S S S L
T L
S S S S S T T T S T T T L
T L
S S S S S T T S T T T T L
T L
S S S S S T T T S S T S L
T L
S S S S S T T S T T S S L
T L
S S S S S T T S S T S S L
T L
S S S S S T S S S S T L
T L
S S L
L
L
输出结果如下:
Image for post
最后,这个网站还有更多的esolang,可以自己去尝试玩玩,都挺有意思的,另外知乎有个话题也叫做esolang,里面的帖子也不少,感兴趣的也可以去看看。
本文内容来自https://levelup.gitconnected.com/5-most-difficult-programming-languages-in-the-world-549c3cf91b23 翻译。
—————END—————
边栏推荐
- C how TCP restricts the access traffic of a single client
- flask解决CORS ERR 问题
- MySql 查询符合条件的最新数据行
- 启牛商学院股票开户安全吗?靠谱吗?
- 机器学习01:绪论
- How MySQL uses JSON_ Extract() takes JSON value
- Machine learning 01: Introduction
- How does the outer disk futures platform distinguish formal security?
- Embedded-c Language-1
- 阈值同态加密在隐私计算中的应用:解读
猜你喜欢

The first EMQ in China joined Amazon cloud technology's "startup acceleration - global partner network program"

First day of learning C language

Error in composer installation: no composer lock file present.

Embedded UC (UNIX System Advanced Programming) -3

腾讯音乐上线新产品“曲易买”,提供音乐商用版权授权

阈值同态加密在隐私计算中的应用:解读

stirring! 2022 open atom global open source summit registration is hot!

拷贝方式之DMA

The survey shows that the failure rate of traditional data security tools in the face of blackmail software attacks is as high as 60%

Deeply cultivate 5g, and smart core continues to promote 5g applications
随机推荐
Wsl2.0 installation
一文了解Go语言中的函数与方法的用法
Cloud security daily 220705: the red hat PHP interpreter has found a vulnerability of executing arbitrary code, which needs to be upgraded as soon as possible
云安全日报220705:红帽PHP解释器发现执行任意代码漏洞,需要尽快升级
C (WinForm) the current thread is not in a single threaded unit, so ActiveX controls cannot be instantiated
ECU简介
张平安:加快云上数字创新,共建产业智慧生态
The two ways of domestic chip industry chain go hand in hand. ASML really panicked and increased cooperation on a large scale
Machine learning 01: Introduction
关于mysql中的json解析函数JSON_EXTRACT
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.
flask解决CORS ERR 问题
Deeply cultivate 5g, and smart core continues to promote 5g applications
PHP talent recruitment system development source code recruitment website source code secondary development
ternary operator
Precision epidemic prevention has a "sharp weapon" | smart core helps digital sentinels escort the resumption of the city
Read the basic grammar of C language in one article
Zhang Ping'an: accélérer l'innovation numérique dans le cloud et construire conjointement un écosystème industriel intelligent
Error in composer installation: no composer lock file present.
Error in compiling libssh2. OpenSSL cannot be found