93% of paint splatters are valid Perl programs (2019)
在 SIGBOVIK 2019 上发表的这项研究,回应了编程社区里一个异想天开却又始终挥之不去的问题:能否在墙面上制造出一滩"油漆飞溅",它看起来像代码,但却并不构成一个有效的 Perl 程序。这个想法源自社交媒体上的讨论——主张要尽早向孩子教授职业编程技能,于是研究者展开了对抽象表现主义与 Perl 语法之间交叉点的实证探索。
为检验这一假设,研究采用实证方案:借助光学字符识别(OCR)软件,对一份包含一百张油漆飞溅图像的数据集进行分析。结果表明,尽管其中相当一部分飞溅物确实能够被解读为可执行代码,但"所有这些飞溅物都能成为有效 Perl"这一说法并不成立。具体来说,数据显示,被分析的飞溅物中有 93% 能成功解析为有效的 Perl 程序,剩下的极少数则无法满足该语言以"高度灵活"著称的语法要求。
论文中给出了这些发现的详尽例子,展示了如何把原始的视觉痕迹转化为可运行的代码。有些飞溅物经 OCR 处理后,会生成能被计算为诸如零这种简单数值的字符串;而另一些则会转化为字符字符串。作者也强调了这种解读本身带有主观色彩:当 OCR 设置可能产生多种候选时,研究者会用审美判断挑选出更有趣的那一个程序。
这些结果已作为 2019 SIGBOVIK 会议论文正式归档。该会议以用轻松有趣的方式推进计算机科学研究而闻名。作者还附上了补充材料,例如飞溅物及其对应代码的完整画廊,便于他人独立验证解析结果。就算在最初提交截止日期之后,研究者仍继续补充分析,又找到了更多不符合标准的飞溅示例,进一步证实这种不寻常的"语言交叉"现象依然引人入胜。
The research presented at SIGBOVIK 2019 tackles a whimsical but persistent question in the programming community: whether it is truly possible to create a paint splatter on a wall that does not constitute a valid Perl program. This inquiry emerged from a social media discussion regarding the early introduction of vocational programming skills to children, leading to an empirical investigation into the intersection of abstract expressionism and Perl syntax.
To test this hypothesis, the study utilized an empirical approach involving optical character recognition (OCR) software to analyze a dataset of one hundred paint splatter images. The findings confirm that while a significant portion of these splatters can indeed be interpreted as executable code, the assertion that all such splatters are valid Perl is incorrect. Specifically, the data indicates that 93% of the analyzed splatters successfully parse as valid Perl programs, leaving a small minority that defy the language's notoriously flexible syntax.
The paper provides detailed examples of these findings, showcasing how raw visual input can be transformed into functional code. Some splatters, when processed by OCR, result in strings that evaluate to simple numerical values like zero, while others translate into character strings. The author highlights the subjective nature of this interpretation, noting that when OCR settings yield multiple possibilities, aesthetic judgment was used to select the most interesting program.
These results were officially documented as part of the 2019 SIGBOVIK proceedings, a conference known for its playful approach to computer science research. The author included supplementary materials, such as a complete gallery of the splatters and their corresponding code, to allow for independent verification of the parsing results. Even after the initial submission deadline, further analysis revealed additional examples of non-standard splatters, confirming the persistent intrigue of this unusual linguistic intersection.
77 comments • Comments Link
• SIGBOVIK 的出版物依然是学术幽默里备受喜爱的来源,经常配有创意十足的免责声明,提醒人们别把它的研究成果当成现实用途的依据。
• 大多数笑点来自 Perl 独特的语言设计,尤其是它的"unquoted strings"特性:它能把任意字母数字序列当作字符串来解析,而不是直接报语法错误。
• 关于"paint splatters 也算是有效程序"的说法,恰好凸显了计算语言学与抽象艺术之间的有趣交集;有人戏称 Jackson Pollock 可能是不小心写出了代码。
• 技术观察认为,Perl 过于宽松的解析方式让人联想到更早期的脚本语言,于是也有人猜测:其他同样松散语法的语言,是否也会呈现类似的效果。
• 除了段子本身,Perl 的设计还被视为既随意又带点刻板印象般的"固定印象",在编程史上占据了一个独特位置,并持续勾起怀旧情绪。
• 对这些程序背后所用 OCR 方法的科学有效性,讨论中多有质疑;不过支持者强调,这项工作本意是讽刺而非严肃学术研究。
• 论文里藏着不少巧妙的彩蛋,比如把某些内容写成"错误消息"或类似 Python 整数表示的字符串,充分展示了研究中有意为之的荒诞感。
• 高级用户深入挖掘了更深层的含义,识别出"perl error quines",并指出可以怎样借助特定语言特性来制造混淆。
• 评论也对编程文化的演进做了反思:把"vibecoding"那一代的语境,与 Perl 过去更"magical"的名声放在一起做对比。
• 这个主题多年反复被提起,说明人们在文化层面对 Perl 那种持久的、带"necromantic"气质的本质仍然津津乐道。
讨论聚焦在 Perl 作为技术讽刺题材的持久吸引力:大家从异想天开与历史讽刺的角度看待它那种宽松的语法。多数参与者都认为,虽然对 paint splatters 的研究并不等同于对计算机视觉的严肃课题,但它却非常适合用来凸显 Perl 的古怪之处。整个讨论在技术层面上既交流了解析器如何处理任意输入,也形成了共识:这个项目的价值不在实用性,而在于它那种富有创造力的荒诞。 • SIGBOVIK publications remain a beloved source of academic humor, often featuring creative disclaimers that warn against the practical application of their findings.
• Much of the humor stems from Perl's unique language design, specifically its "unquoted strings" feature, which allows arbitrary alphanumeric sequences to be parsed as strings rather than syntax errors.
• The claim that paint splatters are valid programs highlights a playful intersection between computational linguistics and abstract art, with observers joking that Jackson Pollock may have been an unintentional programmer.
• Technical observations note that Perl's permissive parsing is reminiscent of older scripting languages, leading to speculation that other languages with loose syntax might exhibit similar properties.
• Beyond the jokes, Perl's design is noted for being both remarkably unceremonious and unexpectedly rigid, occupying a unique space in programming history that continues to elicit nostalgia.
• Skepticism exists regarding the scientific validity of the OCR methodology used to derive the programs, though proponents emphasize that the exercise is intended as satire rather than a rigorous academic study.
• The paper includes clever easter eggs, such as strings that double as error messages or Python integer representations, showcasing the intentional absurdity embedded in the research.
• Advanced users have explored the deeper implications of the project, identifying "perl error quines" and noting how specific language features can be leveraged for obfuscation.
• Commentary reflects on the evolution of programming culture, contrasting the "vibecoding" era with the older, more "magical" reputation of Perl.
• The persistent reappearances of this topic over several years illustrate a cultural appreciation for the enduring, "necromantic" nature of the Perl language.
The discussion centers on the enduring appeal of Perl as a subject of technical satire, viewing the language's permissive syntax through a lens of whimsy and historical irony. Participants generally agree that while the research into paint splatters is not a serious study of computer vision, it serves as an excellent vehicle for highlighting the eccentricities of Perl. The thread balances technical insights into how parsers handle arbitrary input with a collective recognition that the project's value lies in its creative absurdity rather than its utility.