9 ms·
Black Perl
- bmmayer1 13y agoI want to run it, but do I have anything to fear? "Black Perl" suggests it's going to do some bad stuff to my box.
- shubb 13y agoHaha, I don't think this script does much on a machine. It is designed to be interpreted by humans though.
- glockular 13y agodid you even read the article? it was written for (and runs fine on) perl 3. it's basically a huge nop.
- roberto 13y agoNo, the whole point is that this run on Perl 3. It's valid code.
- shubb 13y agoYeah, I get that it's valid Perl code, but it doesn't cause the computer to do something, or give an interesting output. A human can read it and find it interesting. I tried to say that in a witty way. Oh well...
- eruditely 13y agoSo what if it doesn't do anything?
- gph 13y agoIt not doing anything isn't the point. The point is that it's technically valid code, but is still relevant to human interpretation.
- nrivadeneira 13y agoWell, he's answering @bmmayer1's question. It does not do anything, so it is safe to run on your computer.
- darkxanthos 13y agoThe commenter isn't putting it down for that, just explaining he'd be surprised if it did anything let alone something mischievous.
- lifeformed 13y agoOh man, imagine a poem like this that outputted something relevant to the theme of the poem. That'd be amazing.
- justinator 13y agoC'mon man, this is Perl. Easy things are easy, Hard things are possible. In reverse: https://gist.github.com/justingit/6533386 https://gist.github.com/justingit/6533386
- area51org 13y agoI remember this -- I swear this was in one of the Perl books (the Camel book?) way back when. It's valid Perl 3, but it is not supposed to do anything useful. The idea is simply to show how expressive you could be in the language.
- steveklabnik 13y agoIt is in my edition of the camel.
- nandhp 13y agoMost of the discussion on Perl Poetry in the Camel Book is by way of inclusion of this Usenet post: https://groups.google.com/d/msg/news.groups/qSO-Q0rxg_E/RrRnThLKrMMJ https://groups.google.com/d/msg/news.groups/qSO-Q0rxg_E/RrRn...
- andreasvc 13y agoI don't understand what you mean by 'expressive' in this sentence: if it's not to make the program do something specific, you could just wrap everything in a comment block and be as 'expressive' as you like in any language.
- mst 13y agoI elaborated on actual expressiveness here: http://shadow.cat/blog/matt-s-trout/pizza-snakes-bicycle/ http://shadow.cat/blog/matt-s-trout/pizza-snakes-bicycle/ (which post starts by quoting the Black Perl to put you in the mood :)
- rjbond3rd 13y ago"perl -c" checks syntax without executing. (Try it and you'll see a lot of syntax errors using perl 5, so no chance of it executing -- but even if you run it under perl 3, you have nothing to fear.)
- cdman 13y agoCareful with that. perl -c still runs the BEGIN blocks so don't rely on it for safety (ie. if you're handling untrusted code).
- Roboprog 13y agoBob Howard will come and get you. http://en.wikipedia.org/wiki/The_Atrocity_Archives http://en.wikipedia.org/wiki/The_Atrocity_Archives
- roberto 13y agoI wrote a (valid) Python poem a long time ago: import calendar as usual StandardError is usual \ or not usual. month is long try: not coerce finally: quit (help for me in range (usual. MONDAY))
- ricardobeat 13y agoCan anyone explain what happens to all the undefined vars to someone unfamiliar with Perl?
- jrockway 13y agoThey have the value "undef".
- tudorconstantin 13y agoVariables in perl are preceded by a sigil($,@,%,*). Those undefined words are not variables, but, at least in perl5, when you don't use strict, perl tries several fallbacks in order to find their value: see if it is a function (called without paranthesys), see if it is a constant, use it as a string otherwise.
- kbenson 13y agoHaving had a chance to experience Larry up close at a YAPC, I firmly believe he's one of the most quirkily brilliant people in the industry (for whatever industry means in this case).
- greyman 13y agoIs he still active? Haven't heard about him much in the mainstream tech media.
- aduitsis 13y agoHe was there at YAPC::EU 2013 in Kiev. http://www.youtube.com/watch?v=tTbVPb-NhLU http://www.youtube.com/watch?v=tTbVPb-NhLU
- lsiebert 13y agoHe came in June, or maybe late May, signed books, and talked/answered questions at my Advanced Perl class. He's friends with our teacher. Was a real treat. A real nice humble guy. I posted in r/perl at the time. He's active in #perl6 on freenode, I believe. It's a shame that he's had health issues.
- colomon 13y agohttps://github.com/TimToady?tab=activity https://github.com/TimToady?tab=activity
- catwell 13y agoPerl was my first real programming language. I was 12, I have a video game in Perl I wanted to modify (Frozen Bubble), I only knew shell. I did not have an Internet connection at home so I had to boy a book. So I bought Programming Perl 3rd edition, which had recently been released. And I read it. Front to back. Several times. I probably wouldn't advise anybody to start programming by reading 1000+ pages of Larry Wall's prose. I do advise anybody serious about programming to read that book sometime. It is not only a book about a programming language. It is a book about the essence of software, or rather Larry Wall's vision of it, hidden behind a book about a programming language. If I write code for a living today, it was in large part thanks to Larry Wall.
- biggfoot 13y agoSo Larry Wall is a black metal artist in his spare time? kill them, dump qualms, shift moralities, values aside, each one; die sheep! die to reverse the system you accept (reject, respect);
- ewzimm 13y agoImmortal's black metal classic "Call of the Wintermoon" makes much more sense translated to INTERCAL.
- berntb 13y agoAs a hard core atheist, it is good for me to see really religious guys like Larry Wall which are so laid back that they can make fun of their own opinions. For the record, I have met a few. A little bit like when, as an Emacs user, I see a post on a really informative blog about their Vi configuration. Or at a conference when the speaker connects the computer -- "wtf, he use Windows!?" :-) (And as a metal fan I mostly avoid the lyrics, it might destroy the music if they are too stupid. But I'm a wimp which listen mostly to technical death.)
- epsylon 13y agoCompletely offtopic, but there are some black(ish) metal bands with great lyrics. Being a nerd, I am for example very partial to Vintersorg's album Cosmic Genesis (check out the song Algol ! [1]). (The singer, Andreas Hedlund, is actually a primary school teacher) See (and hear) also the Irish band Primordial, who have great songs about Ireland. I've got goosebumps everytime I hear the chorus of "The Coffin Ships" [2] or the ending poem of "Death of the Gods" [3]. I could go on forever, but I'll mention three more bands, Vulture Industries for their very theatrical lyrics [4] and Solefald for the crazy and philosophical stuff [5]. And finally, a personal favorite of mine, Behemoth's "The Youth Manifesto" [6]. (Nergal, the lead singer and guitarist, is a fantastic lyricist and an incredible person) [1] http://www.darklyrics.com/lyrics/vintersorg/cosmicgenesis.html#2 http://www.darklyrics.com/lyrics/vintersorg/cosmicgenesis.ht... [2] http://www.darklyrics.com/lyrics/primordial/thegatheringwilderness.html#5 http://www.darklyrics.com/lyrics/primordial/thegatheringwild... [3] http://www.darklyrics.com/lyrics/primordial/redemptionatthepuritanshand.html#8 http://www.darklyrics.com/lyrics/primordial/redemptionatthep... [4] http://www.darklyrics.com/lyrics/vultureindustries/thedystopiajournals.html#3 http://www.darklyrics.com/lyrics/vultureindustries/thedystop... [5] http://www.darklyrics.com/lyrics/solefald/neonism.html#3 http://www.darklyrics.com/lyrics/solefald/neonism.html#3 [6] http://www.darklyrics.com/lyrics/behemoth/thelema666.html#11 http://www.darklyrics.com/lyrics/behemoth/thelema666.html#11
- HillRat 13y agoThe Perl Poetry contest used to be a thing -- I don't think anyone ever measured up to "Black Perl" in awful audacity, but the parser can take a hell of a lot of abuse before it cries uncle.
- hhenn 13y agoIt never occurred to me how perfect programming languages are for poetry. You have all these extra characters and whitespace to change how a piece of text feels or reads, and it becomes a visual experience too, like looking at art. Are there other program-poems people should look at? The only thing I'd seen like this before was "Sunrise, Sunset" written in PHP. I know these things aren't new for many of you but I keep being surprised by the creativity I find.
- jonah 13y agoThat's pretty dark. :(
- motoboi 13y agoNot literally a poem, a beautiful code written in Perl: http://www.perlmonks.org/?node_id=45213 http://www.perlmonks.org/?node_id=45213 (Camel Code)
- mkching 13y agoI've always liked http://www.cise.ufl.edu/~manuel/obfuscate/piglatin http://www.cise.ufl.edu/~manuel/obfuscate/piglatin as well.
- Mouq 13y agoSee the more recent Acme::EyeDrops : https://metacpan.org/module/Acme::EyeDrops https://metacpan.org/module/Acme::EyeDrops
- sousousou 13y agoMandlebrot flythrough is my personal favorite: http://www.perlmonks.org/?node_id=329492 http://www.perlmonks.org/?node_id=329492
- tlrobinson 13y agoIt seems like it would be trivial to arrange nearly any non-whitespace-significant language into arbitrary ASCII art.
- salvadors 13y agoThe output of this code is also relevant — not just its source.
- nvader 13y agoMy favorite poem is Sharon Hopkins' Listen https://groups.google.com/forum/m/#!topic/comp.lang.perl/V2RqT1dS2Jg https://groups.google.com/forum/m/#!topic/comp.lang.perl/V2R...
- haberman 13y agoThis C program not only reads as a series of letters, it also does something (slightly) interesting: http://www.ioccc.org/1990/westley.c http://www.ioccc.org/1990/westley.c (HN discussion: https://news.ycombinator.com/item?id=375945 https://news.ycombinator.com/item?id=375945)
- shadeless 13y agoReminded of haikus written in Ruby: http://timelessrepo.com/haiku http://timelessrepo.com/haiku
- deleted 13y ago[deleted]
- btilly 13y agoPerl has always had a playful nature. For a surprisingly long time, my top rated post on Perlmonks was http://www.perlmonks.org/?node_id=29977 http://www.perlmonks.org/?node_id=29977. Since it is short, here it is in full: The job I want: $dollars++ while sleep(1); The job I get: { work(); redo; get_rich(); }
- tootie 13y agoPerligata (https://metacpan.org/module/DCONWAY/Lingua-Romana-Perligata-0.50/lib/Lingua/Romana/Perligata.pm https://metacpan.org/module/DCONWAY/Lingua-Romana-Perligata-...) always blew my mind. Write your programs in pure Latin.
- berntb 13y agoDamien scares me a bit, despite that you could probably earn money making a teddybear looking like him and sell to kids. :-) When he talks, you get the feeling it are thoughts that should not be thought; like going crazy from seeing Cthulhu.
- btilly 13y agoHe should scare you. He has one talk where he asks for volunteers from the audience to try to punch him. The ways that he proceeds to immobilize them relate to the various points he's making in his talk. He's also the only person that I can think of who would seek to explain the concept of elementary particles being made of quarks using Mars bars as analogies. Right down to the fact that the sum of 3 of the masses of the small Mars bars slightly exceeds the mass of the large one - that right there is the binding energy! For those who have not experienced him, Damian is hard to explain. For those who have experienced him, the full mind-bending reality is hard to remember. He's the only person about whom I say that if he's giving a presentation you go, just because it is Damian. Even if you don't know the topic. Even if you hate the topic. Even if you're bored by the topic. It is Damian. Go.
- 13y ago
- gall 13y agoHere's a little something in Python that I spent the last few hours writing: def unfalse_poem(): (None is True) and False for subject in [complex(True,False)]: subject is not object for certainty in [complex(False,True)]: certainty is not Exception certainty is not license subject and certainty reduce and coerce coerce and reduce while certainty.real: unexamined for certainty in [complex(False,True)]: return certainty is not certainty.real is not certainty
- nathell 13y agoHow about a simple meta-sonnet game in Natural Inform? From http://forums.penny-arcade.com/discussion/39142/inform-7-programming-a-game-by-talking-to-it http://forums.penny-arcade.com/discussion/39142/inform-7-pro...: Will's Study is a room. The desk is here. A hastily handwritten note is on it. Description is "It's from your friend Shakespeare: 'I've gone to lunch. You'll have to write the sonnet.'" Composing is an action applying to nothing. The quill is a thing that is in the study. Understand "write sonnet" as composing. Description of the quill is "Old and cruddy". Instead of composing when the player has no quill, say "You have not got the quill." Instead of composing, say "And... done. 'Heya', says Will, returning. You say, 'Hello, Will!' Says Shakespeare, 'Thank you for the time you've taken! You really are a pal, Sir Francis Bacon.'"
- JulianMorrison 13y agoYou have to say "is not carrying the" rather than "has no", to get it to compile.
- dandare 13y agoIf "any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clarke] then incantation is really just programming through voice interface done smart.
- jacquesm 13y agoNow I have Margriet Eshuijs in my head.
- winkerVSbecks 13y agoAm I the only one who thought this was about Pelé?