TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

93% of paint splatters are valid Perl programs (2019)

515 点作者 ellieh大约 1 年前

27 条评论

tromp大约 1 年前
Concatenative languages [1] have the property that every token sequence is a valid program.<p>For languages using single bits as tokens, every bit sequence is a valid program. One such language is Chris Barker&#x27;s zot [2].<p>Inspired by zot, I defined a concatenative version of Binary Lambda Calculus that shares the same property [3].<p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Concatenative_programming_language" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Concatenative_programming_lang...</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iota_and_Jot#Zot" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Iota_and_Jot#Zot</a><p>[3] <a href="https:&#x2F;&#x2F;cstheory.stackexchange.com&#x2F;questions&#x2F;32309&#x2F;concatenative-binary-lambda-calculus-combinatory-logic" rel="nofollow">https:&#x2F;&#x2F;cstheory.stackexchange.com&#x2F;questions&#x2F;32309&#x2F;concatena...</a>
评论 #40202108 未加载
评论 #40203632 未加载
interroboink大约 1 年前
I enjoyed footnote 5:<p>⁵ This feature does enable a neat quine: the Perl program “Illegal division by zero at &#x2F;tmp&#x2F;quine.pl line 1.”, when saved in the appropriate location, outputs “Illegal division by zero at &#x2F;tmp&#x2F;quine.pl line 1.” The reason for this behavior is left as an exercise for the reader.
评论 #40203837 未加载
评论 #40202593 未加载
评论 #40203859 未加载
评论 #40202230 未加载
dang大约 1 年前
Related:<p><i>93% of Paint Splatters Are Valid Perl Programs (2019)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27929730</a> - July 2021 (163 comments)<p>Also:<p><i>93% of Paint Splatters Are Valid Perl Programs (2019)</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38754686">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38754686</a> - Dec 2023 (1 comment)
broken-kebab大约 1 年前
Jokes aside, isn&#x27;t it wrong that OCR software still always produces textual result from images wich are not text? More than a decade ago I OCRed an old book, and I remember how annoying it was to deal with all the garbage text produced from small pictures, smudges, and dirt. It looks like there&#x27;s not much progress done since in the field
评论 #40212566 未加载
评论 #40206296 未加载
评论 #40212245 未加载
glenstein大约 1 年前
I understand that this discusses recognizing paint splatters as characters with a given &quot;optical character recognition&quot; program, which seems disposed to almost always recognize pain as <i>some</i> combination of characters. Of the many possible ways this could be realized, this is absolutely welcome and in the spirit.<p>However, it did give me the initial impression about other possible ways to do this, such as taking patches of color and empty space as 0s and 1s, and the totality of it as a program. I think the vast majority of those cases would be pointless noise.<p>So there&#x27;s two extremes, one with mostly noise, one with mostly meaning. I suppose the game-within-the-game here is to find what form of interpretation does the most to credit paint splatters with the most possible meaning where, to the greatest extent possible, the meaning truly comes from the structure and not from how aggressive the rules are at choosing to see meaning.
评论 #40204654 未加载
iamleppert大约 1 年前
With Generative AI, you can create new and innovative paint splatters that evaluate to working software, faster than ever before. Generative AI enables a new class of creators to harness and leverage text to image workflows, driving value for businesses of all sizes. New AI models are capable of embedding working software and machine readable codes into a wide variety of high resolution content, engaging viewers and providing creators new and exciting ways to grow their audiences.
dmbche大约 1 年前
More cutting edge computational research here : <a href="https:&#x2F;&#x2F;sigbovik.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sigbovik.org&#x2F;</a>
neilv大约 1 年前
Clever variation on the old &quot;indistinguishable from line noise&quot; jokes.<p>(For those who weren&#x27;t frequently exposed to &quot;line noise&quot;... Imagine an ASCII character video terminal that&#x27;s interpreting a stream of bytes, to display meaningful text. Now imagine that the communication channel gets corrupted somehow (say, someone picks up the phone handset while modem is online, or there&#x27;s interference on the cable), and there&#x27;s no error correction or checksumming, so the bytes being interpreted are effectively become randomized. So random letters, digits, punctuation, control characters, etc., are being interpreted and displayed, and this is familiar, and you know it&#x27;s random and why... but the joke is that it&#x27;s still actually a valid Perl program.)
评论 #40210921 未加载
Mathnerd314大约 1 年前
&gt; (source code not available yet because i am bad at GitHub)<p>Lost forever I guess. Certainly it&#x27;s not at <a href="https:&#x2F;&#x2F;git.mcmillen.dev&#x2F;explore&#x2F;repos" rel="nofollow">https:&#x2F;&#x2F;git.mcmillen.dev&#x2F;explore&#x2F;repos</a>
0xbadcafebee大约 1 年前
as a Perl programmer, I consider that non-functional 7% a bug
syadegari大约 1 年前
Tangentially relevant to this is Perl Secrets, a list of operators and constants discovered by various users: <a href="https:&#x2F;&#x2F;github.com&#x2F;book&#x2F;perlsecret&#x2F;blob&#x2F;master&#x2F;lib&#x2F;perlsecret.pod">https:&#x2F;&#x2F;github.com&#x2F;book&#x2F;perlsecret&#x2F;blob&#x2F;master&#x2F;lib&#x2F;perlsecre...</a>
lupire大约 1 年前
Cute idea, and useful research to answer the question, but the experimental result is essentially nothing. None of the examples generated anything semantically more complex than `0-0`.<p>Many scripting languages will tolerate meaningless input.<p>Instead of these extremely non-character-istic splatters, I think scribbles or random raster bitmaps would be better input.
评论 #40202008 未加载
评论 #40203242 未加载
jhdias大约 1 年前
Posted 1st April. This implies something.
gfldex大约 1 年前
<p><pre><code> $ cat ~&#x2F;.signature -- raku -e &#x27;try { not :2(.fear) } and do not die&#x27; perl -e &#x27;do not $fear and do not die&#x27; raku -e &#x27;say „The Road to Wisdom“; $*ERR and $*ERR and $*ERR but Less and Less and Less&#x27;</code></pre>
stcredzero大约 1 年前
&quot;is it possible to smear paint on the wall without creating valid Perl?&quot;<p>This is just a matter of syntax, right? So could it be determined by a stack machine? Unfortunately, the answer is no. Perl is not context free!<p><a href="https:&#x2F;&#x2F;perlmonks.org&#x2F;?node_id=663393" rel="nofollow">https:&#x2F;&#x2F;perlmonks.org&#x2F;?node_id=663393</a><p>As just a guess, this question maps to the Halting Problem. (EDIT: That would have to be the question where the input is a programming language, not just for Perl. That question has been answered empirically.)
Jsisn大约 1 年前
I don&#x27;t understand how that is done. Can someone explain to me how to do the same? Whether it is reading the raw image, a particular format or the bytes of the print. Surely it&#x27;s not like that, like I said I don&#x27;t understand.
评论 #40209774 未加载
cies大约 1 年前
I&#x27;ve come to prefer languages that score very low on this metric of &quot;paint splats OCRed yield valid $PROG_LANG programs&quot;.<p>A lot of fun I had with a language called Elm, in which runtime errors are nearly impossible to express.
rrr_oh_man大约 1 年前
I love the splatters — what’s the copyright on those?
评论 #40204235 未加载
methods21大约 1 年前
I so wish Perl was still in the &#x27;mainstream&#x27; and Perl 6 didn&#x27;t fizzle. Love Perl.
mlhpdx大约 1 年前
Interesting, but the social relevance would be improved if the input images were graffiti.
tenderfault大约 1 年前
is the ocr system written in perl by any chance?
mrighele大约 1 年前
Now I am wondering the percentage of programs written in Piet [1] that are also valid Perl programs, and if there is any instance where the are two are actually the same.<p>[1] <a href="https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Piet" rel="nofollow">https:&#x2F;&#x2F;esolangs.org&#x2F;wiki&#x2F;Piet</a>
sakesun大约 1 年前
More than a decade ago, I heard a big consulting firm executive stated that he deliberately base his project on Perl, because his team will have less chance to find a new job elsewhere from this skill. :|
Iris2645大约 1 年前
Such a bullshit article.
评论 #40204860 未加载
legitster大约 1 年前
Unrelated, but what a garbage original tweet that this is taken from. Getting taught useful skills is not mutually exclusive to kids being kids.<p>It would have been nice to have learned how to use a drill press in school rather than the Dewey Decimal System. What do you even think school is for? I didn&#x27;t come from a very privileged background - no one was going to hand me a career when I turned 18.<p>&quot;I wish I&#x27;d had more time to be a kid&quot;. I&#x27;m a grown ass man and I still read books too late and splash in puddles. It sounds like you just decided not to be fun one day and are blaming other people for you being boring.
评论 #40202883 未加载
评论 #40202694 未加载
评论 #40203710 未加载
评论 #40203505 未加载
评论 #40202589 未加载
gofreddygo大约 1 年前
serious question: What good is perl in 2024.<p>Follow up: where do you see it going.<p>Full disclosure: never implemented anything useful in perl in my personal or professional capacity for the last decade, except for debugging a few scripts here and there.
评论 #40203446 未加载
评论 #40203758 未加载
评论 #40202292 未加载
评论 #40202018 未加载
评论 #40204248 未加载
评论 #40205108 未加载
评论 #40202416 未加载
评论 #40204104 未加载
评论 #40213779 未加载
评论 #40207061 未加载
评论 #40205054 未加载
评论 #40202171 未加载
评论 #40205969 未加载
评论 #40205383 未加载
评论 #40206060 未加载
luxuryballs大约 1 年前
why is Perl like this??
评论 #40204613 未加载