惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

Ruby | 酷 壳 - CoolShell

数据即代码:元驱动编程 | 酷 壳 - CoolShell API设计:用流畅接口构造内部DSL | 酷 壳 - CoolShell 对象的消息模型 | 酷 壳 - CoolShell 程序员眼中的编程语言 | 酷 壳 - CoolShell 编程语言汽车 | 酷 壳 - CoolShell 到处都是Unix的胎记 | 酷 壳 - CoolShell 让Ruby增加30%的性能改进 | 酷 壳 - CoolShell 免费电子书:Ruby Complete | 酷 壳 - CoolShell 2009年脚本语言排名 | 酷 壳 - CoolShell
StackOverflow的404错误页 | 酷 壳 - CoolShell
陈皓 · 2010-06-25 · via Ruby | 酷 壳 - CoolShell

不知道大家有没有注意到StakeOverflow的404错误页面?其显示了下面的这个图片:

这个是一个很有意思的图片,不知道你看懂了吗?看上去像Python,又像 Ruby,还像 Perl,当然也有 C的影子,还有Brainfuck。是的,这是一个杂交程序,杂交了Python,Ruby,Perl,C,还有Brainfuck(注意其中的#号),所有的语句都是输出“404”字符串。

关于这种杂交程序,本站以前也发布过《C语言和sh脚本的杂交代码》,大家可以前往一看。这样的有趣的玩法叫“Polyglot”,也就是说,把N种语言写在一个文件中,然后,该文件在任何编译器下都可以运行,上述的那段代码在Python,Ruby,Perl,Brainfuck下都可以正常运行,也可以被C和的编译器编译通过,并被运行。

下面是这个图片的字符码,以供各位试试。

# define v putchar
#   define print(x) main(){v(4+v(v(52)-4));return 0;}/*
#>+++++++4+[>++++++<-]>++++.----.++++.*/
print(202*2);exit();
#define/*>.@*/exit()

欢迎你留下你的看法。

(全文完)

Loading...