当前位置:网站首页>世界上最难的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—————
边栏推荐
- Is it safe and reliable to open futures accounts on koufu.com? How to distinguish whether the platform is safe?
- flask解决CORS ERR 问题
- ECU introduction
- 云安全日报220705:红帽PHP解释器发现执行任意代码漏洞,需要尽快升级
- 华为云云原生容器综合竞争力,中国第一!
- In depth understanding of redis memory obsolescence strategy
- 【剑指 Offer】63. 股票的最大利润
- 拷贝方式之DMA
- Embedded UC (UNIX System Advanced Programming) -2
- 【jmeter】jmeter脚本高级写法:接口自动化脚本内全部为变量,参数(参数可jenkins配置),函数等实现完整业务流测试
猜你喜欢

Practical example of propeller easydl: automatic scratch recognition of industrial parts
What are the precautions for MySQL group by

Embedded-c Language-1

ECU introduction

机器学习01:绪论

CMake教程Step2(添加库)

High number | summary of calculation methods of volume of rotating body, double integral calculation of volume of rotating body

33: Chapter 3: develop pass service: 16: use redis to cache user information; (to reduce the pressure on the database)

干货!半监督预训练对话模型 SPACE
Summary of optimization scheme for implementing delay queue based on redis
随机推荐
ECU introduction
ternary operator
Is it safe to open an account for digging wealth stocks? How is it safe to open a stock account?
Practical example of propeller easydl: automatic scratch recognition of industrial parts
C# TCP如何限制单个客户端的访问流量
拷贝方式之DMA
[Jianzhi offer] 66 Build product array
一文了解Go语言中的函数与方法的用法
Understand the usage of functions and methods in go language
WR | 西湖大学鞠峰组揭示微塑料污染对人工湿地菌群与脱氮功能的影响
张平安:加快云上数字创新,共建产业智慧生态
Excuse me, is the redis syntax used in DMS based on the commands of the redis community version of the cloud database
Winedt common shortcut key modify shortcut key latex compile button
飞桨EasyDL实操范例:工业零件划痕自动识别
mysql中取出json字段的小技巧
Machine learning 02: model evaluation
Redis+caffeine two-level cache enables smooth access speed
阈值同态加密在隐私计算中的应用:解读
PHP talent recruitment system development source code recruitment website source code secondary development
Use JDBC technology and MySQL database management system to realize the function of course management, including adding, modifying, querying and deleting course information.